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

Pass literal within AggregateCall via rexList #13282

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

Jackie-Jiang
Copy link
Contributor

Another try of #13217

  • In PinotAggregateExchangeNodeInsertRule, reconstruct all AggregateCall to carry the literal within the newly created AggregateCall
  • Address the arguments logic for aggregation within PinotAggregateExchangeNodeInsertRule to significantly simplify the special handling in AggregateOperator
  • Fix the bug of not allowing using LEAF to process distinct aggregates
  • Fix the bug of wrong plan potentially created when collation exists

@Jackie-Jiang Jackie-Jiang added backward-incompat Referenced by PRs that introduce or fix backward compat issues bugfix cleanup multi-stage Related to the multi-stage query engine labels May 31, 2024
@Jackie-Jiang Jackie-Jiang requested a review from xiangfu0 May 31, 2024 02:49
@codecov-commenter
Copy link

codecov-commenter commented May 31, 2024

Codecov Report

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

Project coverage is 62.16%. Comparing base (59551e4) to head (107874c).
Report is 527 commits behind head on master.

Files Patch % Lines
...el/rules/PinotAggregateExchangeNodeInsertRule.java 89.62% 9 Missing and 5 partials ⚠️
...inot/query/runtime/operator/AggregateOperator.java 78.57% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13282      +/-   ##
============================================
+ Coverage     61.75%   62.16%   +0.40%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2534      +98     
  Lines        133233   139300    +6067     
  Branches      20636    21530     +894     
============================================
+ Hits          82274    86590    +4316     
- Misses        44911    46234    +1323     
- Partials       6048     6476     +428     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 62.11% <89.30%> (+0.40%) ⬆️
java-21 62.03% <89.30%> (+0.40%) ⬆️
skip-bytebuffers-false 62.13% <89.30%> (+0.38%) ⬆️
skip-bytebuffers-true 62.01% <89.30%> (+34.28%) ⬆️
temurin 62.16% <89.30%> (+0.40%) ⬆️
unittests 62.15% <89.30%> (+0.40%) ⬆️
unittests1 46.72% <89.30%> (-0.17%) ⬇️
unittests2 27.76% <0.00%> (+0.02%) ⬆️

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.

break;
default:
throw new IllegalStateException("Illegal aggregation function operand type: " + operand.getKind());
assert operand instanceof RexExpression.Literal;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this be a function call e.g. array of literals?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't be. We only extract literal as operand, others will remain input reference.

@Jackie-Jiang Jackie-Jiang force-pushed the aggregation_literal branch from 8924721 to 107874c Compare May 31, 2024 07:38
@Jackie-Jiang Jackie-Jiang merged commit e2c5e73 into apache:master Jun 1, 2024
19 checks passed
@Jackie-Jiang Jackie-Jiang deleted the aggregation_literal branch June 1, 2024 01:00
gortiz pushed a commit to gortiz/pinot that referenced this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backward-incompat Referenced by PRs that introduce or fix backward compat issues bugfix cleanup multi-stage Related to the multi-stage query engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants