-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix(parser): allow multiple or conditions in
or
and and
clauses (
#4769) ### Context Even though `or(1, 1, 1, 1)` is valid snql, the clickhouse formatter chokes on it because there's an assumption in [other parts of the code](https://github.com/getsentry/snuba/blob/master/snuba/query/conditions.py#L237-L243) which assumes that ands and ors have two arguments. Breaking that assumption causes an infinite recursion error ### Solution Rather than changing the matching infrastructure and making sure all the query processors using that assumption work afterwards, I just massaged the AST post-parsing to make sure that all `or` and `and` functions had at most two arguments
- Loading branch information
Showing
2 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters