pinot
pinot copied to clipboard
bugfix: TextMatchFilterOptimizer grouping for inner compound query
I missed this edge case when adding TextMatchFilterOptimizer.
For a query such as text_match(col1, 'aaa') AND text_match(col1, 'bbb OR ccc')
, this would have previously been optimized to text_match(col1, '(foo AND bar OR baz)'
, which would return unexpected results.
Applying grouping for each filter (instead of at the merged filter level) produces an faithful translation to text_match(col1, '(foo) AND (bar OR baz)'
.