feat(explore): support numeric comparison ops on TYPE_ARRAY keys#7935
feat(explore): support numeric comparison ops on TYPE_ARRAY keys#7935manessaraj wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e729799. Configure here.
| if v.WhichOneof("value") not in _NUMBER_VALUE_TYPES: | ||
| raise BadSnubaRPCRequestException( | ||
| f"{ComparisonFilter.Op.Name(op)} on array keys requires a numeric value" | ||
| "(val_int, val_float, val_double)" |
There was a problem hiding this comment.
Missing space in error message string concatenation
Low Severity
The error message uses implicit Python string concatenation between the f-string on line 375 and the plain string on line 376, but there's no space between "value" and "(val_int...". The resulting message reads "...requires a numeric value(val_int, val_float, val_double)" instead of "...requires a numeric value (val_int, val_float, val_double)". The test regex match="on array keys requires a numeric value" still passes because it doesn't cover the parenthesized suffix, so this won't be caught by tests.
Reviewed by Cursor Bugbot for commit e729799. Configure here.
onewland
left a comment
There was a problem hiding this comment.
The idea behind this change is suspect to me (that it's valuable to our users to be able to do comparison operations to filter rows by index-unspecified array elements) but this approach is acceptable if we are stipulating that this functionality itself is useful.
I would not expect it to perform well (in terms of rows processed/s) as a filter, but that might be fine if your other filters narrow the search enough.


Enable
field[*]:>N/<N/>=N/<=Nagainst TYPE_ARRAY columns in the RPC layer. Previously rejected: only=/!=/LIKE were allowed.Example generated query (from TestArrayWildcardSearch::test_trace_item_table_array_op_greater_than_int,
filter
frame_linenos[*]:>50):