-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Startree aggregate on mv columns #16836
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
base: master
Are you sure you want to change the base?
Conversation
a9edceb
to
236ba6a
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #16836 +/- ##
============================================
- Coverage 63.54% 63.53% -0.01%
Complexity 1419 1419
============================================
Files 3080 3083 +3
Lines 181656 181788 +132
Branches 27861 27880 +19
============================================
+ Hits 115428 115504 +76
- Misses 57359 57401 +42
- Partials 8869 8883 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
236ba6a
to
85c1e22
Compare
...src/main/java/org/apache/pinot/core/query/aggregation/function/AvgMVAggregationFunction.java
Show resolved
Hide resolved
...src/main/java/org/apache/pinot/core/query/aggregation/function/AvgMVAggregationFunction.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/apache/pinot/core/query/aggregation/function/CountMVAggregationFunction.java
Show resolved
Hide resolved
...c/main/java/org/apache/pinot/core/query/aggregation/function/CountMVAggregationFunction.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/pinot/core/query/aggregation/function/SumMVAggregationFunction.java
Outdated
Show resolved
Hide resolved
85c1e22
to
fdbc976
Compare
bc3d919
to
7b8d65d
Compare
7b8d65d
to
ccff48e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
Since we need to handle aggregated values the same way as single-valued input, another approach would be to support MV in regular Count
, Sum
, Avg
. Essentially add a SV/MV check in these functions so that they can handle MV columns. This way user can directly use the regular function on MV columns.
IMO this way is more user friendly. Do you want to also try this approach out? You can open a separate PR and we can compare the 2 approaches
...src/main/java/org/apache/pinot/core/query/aggregation/function/AvgMVAggregationFunction.java
Show resolved
Hide resolved
...c/main/java/org/apache/pinot/core/query/aggregation/function/CountMVAggregationFunction.java
Show resolved
Hide resolved
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
Outdated
Show resolved
Hide resolved
You can take a look at #17007 to get an idea for the alternative approach. |
Thanks for reviewing. |
thanks, I have seen this kind of support in DistinctCountSmartHLLAggregationFunction but for StarTree aggregation supports on mv, its not enough, the ValueAggregator needs to change as well. I will raise another PR for supporting Startree aggregates on MV columns in regular functions. |
If we end up taking another approach, we will integrate |
Ok I think, I understood what you are suggesting -
|
|
This PR adds support for multi-value columns in startree index aggregates.
select AVGMV(DivLongestGTimes) from airlineStats limit 10