-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix queries on columns with different underlying types (#2113)
Queries involving string columns stored internally as UUID did not behave properly when it included a condition involving one of the >, >=, <. <=, LIKE or NOT LIKE operators. The BaseTypeConverter contained an optimization that attempted to use the internal column for the comparison however this is not correct as the comparison returns completely different results depending on the type. This change drops the optimizations on all comparisons except =, !=, IS NULL and IS NOT NULL. Queries containing a mix of optimizable and non optimizable conditions are treated as unoptimized and the external type is used.
- Loading branch information
Showing
6 changed files
with
144 additions
and
10 deletions.
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
5 changes: 5 additions & 0 deletions
5
snuba/query/processors/type_converters/hexint_column_processor.py
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
4 changes: 4 additions & 0 deletions
4
snuba/query/processors/type_converters/uuid_column_processor.py
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