pinot icon indicating copy to clipboard operation
pinot copied to clipboard

bugfix: TextMatchFilterOptimizer grouping for inner compound query

Open itschrispeck opened this issue 4 months ago • 1 comments

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)'.

itschrispeck avatar Oct 24 '24 20:10 itschrispeck