apache / pinot

Apache Pinot - A realtime distributed OLAP datastore
https://pinot.apache.org/
Apache License 2.0
5.17k stars 1.21k forks source link

Filter Reorder Optimization when the child operator is AND or OR #13084

Open wirybeaver opened 1 week ago

wirybeaver commented 1 week ago

The issue https://github.com/apache/pinot/issues/13081 says it at all. We should have recursively visited the child operators of AND / OR operator and use the lowest priority (largest value) of children as the priority of the current AND / OR operator. For AND's kids operator, reorder based on the priority.

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 95.55556% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 62.17%. Comparing base (59551e4) to head (60a8cbf). Report is 453 commits behind head on master.

Files Patch % Lines
...t/core/operator/filter/FilterOperatorRewriter.java 95.00% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #13084 +/- ## ============================================ + Coverage 61.75% 62.17% +0.42% + Complexity 207 198 -9 ============================================ Files 2436 2518 +82 Lines 133233 137922 +4689 Branches 20636 21345 +709 ============================================ + Hits 82274 85756 +3482 - Misses 44911 45790 +879 - Partials 6048 6376 +328 ``` | [Flag](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `<0.01% <0.00%> (-0.01%)` | :arrow_down: | | [integration](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `<0.01% <0.00%> (-0.01%)` | :arrow_down: | | [integration1](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `<0.01% <0.00%> (-0.01%)` | :arrow_down: | | [integration2](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <0.00%> (ø)` | | | [java-11](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.13% <95.55%> (+0.42%)` | :arrow_up: | | [java-21](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.06% <95.55%> (+0.44%)` | :arrow_up: | | [skip-bytebuffers-false](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.16% <95.55%> (+0.41%)` | :arrow_up: | | [skip-bytebuffers-true](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.02% <95.55%> (+34.29%)` | :arrow_up: | | [temurin](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.17% <95.55%> (+0.42%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.17% <95.55%> (+0.42%)` | :arrow_up: | | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `46.77% <95.55%> (-0.12%)` | :arrow_down: | | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/13084/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `27.77% <0.00%> (+0.04%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.

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