Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: TextMatchFilterOptimizer grouping for inner compound query #14299

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

itschrispeck
Copy link
Collaborator

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

@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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%) ⬆️
integration 100.00% <ø> (+99.99%) ⬆️
integration1 100.00% <ø> (+99.99%) ⬆️
integration2 0.00% <ø> (ø)
java-11 63.71% <100.00%> (+2.00%) ⬆️
java-21 63.63% <100.00%> (+2.00%) ⬆️
skip-bytebuffers-false 63.73% <100.00%> (+1.98%) ⬆️
skip-bytebuffers-true 63.60% <100.00%> (+35.88%) ⬆️
temurin 63.73% <100.00%> (+1.98%) ⬆️
unittests 63.73% <100.00%> (+1.98%) ⬆️
unittests1 55.39% <100.00%> (+8.50%) ⬆️
unittests2 34.24% <0.00%> (+6.51%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Jackie-Jiang Jackie-Jiang merged commit d41192e into apache:master Nov 1, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants