We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Discussed with @st1page
For example,
select avg(x) a, sum(x) s, count(x) c from t;
will be executed as
select expr1 / expr2, s, c from (select sum(x) as expr1, count(x) as expr2, sum(x) s , count(x) c from t);
Here, the two sum(x) and two count(x) can be simply reused.
sum(x)
count(x)
Another example is NexMark Q15
risingwave/src/frontend/planner_test/tests/testdata/output/nexmark_source.yaml
Line 1126 in 0259125
StreamHashAgg [append_only] { group_key: [$expr1, bidder, auction, flag], aggs: [ count, count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32))]
Obviously the 9 count agg functions can be merged to 3, so that we reduce the aggregation state size to 1/3.
count
The text was updated successfully, but these errors were encountered:
We do not need to implement it in Agg executor but implement it as an optimizer rule we can write a project ahead 🤔
Sorry, something went wrong.
stdrc
Successfully merging a pull request may close this issue.
For example,
will be executed as
Here, the two
sum(x)
and twocount(x)
can be simply reused.Another example is NexMark Q15
risingwave/src/frontend/planner_test/tests/testdata/output/nexmark_source.yaml
Line 1126 in 0259125
Obviously the 9
count
agg functions can be merged to 3, so that we reduce the aggregation state size to 1/3.The text was updated successfully, but these errors were encountered: