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

[multistage] support the rest of the agg functions currently implementable #11208

Merged
merged 5 commits into from
Aug 1, 2023

Conversation

walterddr
Copy link
Contributor

@walterddr walterddr commented Jul 28, 2023

add all supported agg functions to follow up with #11034

the following can be added very soon (some complication due to testing)

the following functions require some revisit

  • histogram not yet supported due to complex ARRAY constructor
  • _ version of the stats function such as COVAR_POP is not supported, (where as coVarPop is) due to calctie built-in operator table conflict.
  • argmin/argmax is not supported due to conflicting signature (e.g. arg column at 1st vs arg column at last convention differs between pinot and calcite)
  • funnelCount due to its complex syntax, there should be an easier solution in v2

@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2023

Codecov Report

Merging #11208 (e04fc30) into master (9d7676e) will decrease coverage by 0.12%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master   #11208      +/-   ##
==========================================
- Coverage    0.11%    0.00%   -0.12%     
==========================================
  Files        2229     2213      -16     
  Lines      119803   119390     -413     
  Branches    18126    18071      -55     
==========================================
- Hits          137        0     -137     
+ Misses     119646   119390     -256     
+ Partials       20        0      -20     
Flag Coverage Δ
integration1temurin11 ?
integration1temurin17 0.00% <0.00%> (?)
integration1temurin20 0.00% <0.00%> (ø)
integration2temurin11 ?
integration2temurin17 0.00% <0.00%> (ø)
integration2temurin20 0.00% <0.00%> (ø)
unittests1temurin11 0.00% <0.00%> (ø)
unittests1temurin17 0.00% <0.00%> (?)
unittests1temurin20 0.00% <0.00%> (?)
unittests2temurin11 ?
unittests2temurin17 ?
unittests2temurin20 ?

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

Files Changed Coverage Δ
.../pinot/query/planner/logical/LiteralHintUtils.java 0.00% <0.00%> (ø)
...che/pinot/segment/spi/AggregationFunctionType.java 0.00% <0.00%> (ø)

... and 16 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@walterddr walterddr added the multi-stage Related to the multi-stage query engine label Jul 28, 2023
@walterddr walterddr marked this pull request as ready for review July 31, 2023 23:21
@@ -46,13 +46,13 @@ public static String literalMapToHintString(Map<Pair<Integer, Integer>, RexExpre
e.getValue().getDataType().name(), e.getValue().getValue()));
}
// semi-colon is used to separate between encoded literals
return "{" + StringUtils.join(literalStrings, ";") + "}";
return "{" + StringUtils.join(literalStrings, ";:;") + "}";
Copy link
Contributor

Choose a reason for hiding this comment

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

where is this ;:; used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the problem is b/c in some agg literals it allows stringify parameter type with ; as the separator. this conflicts with my usage of ; which indicates the "next literal hint".

Thus i used another 3-character splitter ;:; to indicate hint-literal boundaries.

@walterddr walterddr merged commit c68b3be into apache:master Aug 1, 2023
21 of 22 checks passed
s0nskar pushed a commit to s0nskar/pinot that referenced this pull request Aug 10, 2023
…he#11208)

* support the rest of the agg functions
    * support others trivial ones such as DISTINCT_SUM/AVG, MIN_MAX_RANGE, etc
    * add DISTINCT_COUNT variances
    * add PERCENTILE_* variances

* added TODO comments for the rest of the functions

---------

Co-authored-by: Rong Rong <rongr@startree.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multi-stage Related to the multi-stage query engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants