pinot icon indicating copy to clipboard operation
pinot copied to clipboard

bugfix: TextMatchFilterOptimizer grouping for inner compound query

Open itschrispeck opened this issue 1 year 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

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 63.73%. Comparing base (59551e4) to head (4292534). Report is 1237 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #14299      +/-   ##
============================================
+ Coverage     61.75%   63.73%   +1.98%     
- Complexity      207     1557    +1350     
============================================
  Files          2436     2659     +223     
  Lines        133233   145451   +12218     
  Branches      20636    22219    +1583     
============================================
+ Hits          82274    92710   +10436     
- Misses        44911    45894     +983     
- Partials       6048     6847     +799     
Flag Coverage Δ
custom-integration1 100.00% <ø> (+99.99%) :arrow_up:
integration 100.00% <ø> (+99.99%) :arrow_up:
integration1 100.00% <ø> (+99.99%) :arrow_up:
integration2 0.00% <ø> (ø)
java-11 63.71% <100.00%> (+2.00%) :arrow_up:
java-21 63.63% <100.00%> (+2.00%) :arrow_up:
skip-bytebuffers-false 63.73% <100.00%> (+1.98%) :arrow_up:
skip-bytebuffers-true 63.60% <100.00%> (+35.88%) :arrow_up:
temurin 63.73% <100.00%> (+1.98%) :arrow_up:
unittests 63.73% <100.00%> (+1.98%) :arrow_up:
unittests1 55.39% <100.00%> (+8.50%) :arrow_up:
unittests2 34.24% <0.00%> (+6.51%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 24 '24 21:10 codecov-commenter