-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SQL for groupings and csv downloads #448
Conversation
|
||
// Assert | ||
// Uses OR within single filter type | ||
expect(modifiedSQLWithOR).to.include("OR"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this test detect the "()" issue the change is fixing? Would expect(modifiedSQLWithOR).to.include(" OR ")
allow detection of the old code? If we can match more of the generated SQL for correctness, that might make both the test and the intent of the code more easily readable to future workers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This particular test was intended to catch the other bug, where OR was being applied where AND should've been applied. I'll see if I can add a test for the other change as well and possibly clarify this test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remembering now that the other unit test I fixed actually does address the ) OR (
change. The problem was that while we did have a unit test that matched more of the generated SQL code, it was matching the wrong thing (our logic and expectation was wrong, not the code)
Context
Addresses two issues:
closes #442
Changes
In both cases, the issue was with "OR" syntax
Testing