apache / pinot

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

Support StringJoin aggregation function #13096

Closed xiangfu0 closed 2 weeks ago

xiangfu0 commented 3 weeks ago

Support StringJoin aggregation function which is similar to StringAgg function.

Below syntax is just for v1, we need to rewrite v2 query to this syntax to use the v1 query engine for execution.

StringJoin(expression, separator, isDistinct, [orderByExpr, data Type, isAscending])

Example:

select 
    carrier, 
    stringjoin(
        concat(Origin, Dest, '||'), ',', true, 
        Dest, 'STRING', false, 
        Origin, 'STRING', true) 
from airlineStats 
group by carrier 
limit 10
codecov-commenter commented 3 weeks ago

Codecov Report

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

Project coverage is 62.00%. Comparing base (59551e4) to head (9dcc81f). Report is 412 commits behind head on master.

Files Patch % Lines
...function/string/BaseStringJoinOrderByFunction.java 0.00% 117 Missing :warning:
...gation/function/string/BaseStringJoinFunction.java 0.00% 62 Missing :warning:
...tion/string/StringJoinOrderByDistinctFunction.java 0.00% 42 Missing :warning:
...ion/function/string/StringJoinOrderByFunction.java 0.00% 41 Missing :warning:
...gregation/function/AggregationFunctionFactory.java 0.00% 31 Missing :warning:
...egation/function/string/StringJoinAllFunction.java 0.00% 20 Missing :warning:
...on/function/string/StringJoinDistinctFunction.java 0.00% 20 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #13096 +/- ## ============================================ + Coverage 61.75% 62.00% +0.25% + Complexity 207 198 -9 ============================================ Files 2436 2513 +77 Lines 133233 138124 +4891 Branches 20636 21390 +754 ============================================ + Hits 82274 85646 +3372 - Misses 44911 46077 +1166 - Partials 6048 6401 +353 ``` | [Flag](https://app.codecov.io/gh/apache/pinot/pull/13096/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/13096/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/13096/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/13096/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/13096/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/13096/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `61.96% <0.29%> (+0.25%)` | :arrow_up: | | [java-21](https://app.codecov.io/gh/apache/pinot/pull/13096/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `61.89% <0.29%> (+0.26%)` | :arrow_up: | | [skip-bytebuffers-false](https://app.codecov.io/gh/apache/pinot/pull/13096/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.00% <0.29%> (+0.25%)` | :arrow_up: | | [skip-bytebuffers-true](https://app.codecov.io/gh/apache/pinot/pull/13096/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `27.67% <0.00%> (-0.06%)` | :arrow_down: | | [temurin](https://app.codecov.io/gh/apache/pinot/pull/13096/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.00% <0.29%> (+0.25%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/apache/pinot/pull/13096/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.00% <0.29%> (+0.25%)` | :arrow_up: | | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/13096/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `46.66% <0.29%> (-0.23%)` | :arrow_down: | | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/13096/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `27.69% <0.00%> (-0.05%)` | :arrow_down: | 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.

xiangfu0 commented 2 weeks ago

Close this for v2 support in https://github.com/apache/pinot/pull/13146