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

feat(query): add a planner rule to push down bare aggregates #18144

Merged
merged 1 commit into from
May 22, 2020

Conversation

wolffcm
Copy link

@wolffcm wolffcm commented May 18, 2020

This adds a rule to push down aggregates that are directly over a ReadRange source.

I followed the existing example of PushDownWindowAggregateRule and did some refactoring to avoid duplicating logic.

I'll follow up with a pipeline test and a Flux end-to-end test.

Copy link
Contributor

@adrian-thurston adrian-thurston left a comment

Choose a reason for hiding this comment

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

Looks good. Nice to be able to reuse the window aggregate physical node.

Note the feature flags descriptions are written to indicate they are enabling the rewrite rule, not the pushed down physical node. But with this change the feature flags will cover both window aggregate and bare aggregate rules. That's fine with me. Others might want them separate. If not, we just needs to make it clear the flags cover multiple rules.

@wolffcm
Copy link
Author

wolffcm commented May 19, 2020

@adrian-thurston

So with this change the feature flags will cover both window aggregate and bare aggregate rules.

Hmm, I hadn't really thought that through. I was thinking of the feature flag as guarding the storage capability, but I guess that's not the case. I guess the question comes down to: is it possible that we introduce a regression with the bare-agg rule but not the window-agg rule? It seems within the realm of possibility.

I would think that we'd want to avoid an explosion of feature flags though. I'm curious about @yzhang1991 thoughts on this.

Copy link
Contributor

@ethanyzhang ethanyzhang left a comment

Choose a reason for hiding this comment

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

LGTM

@wolffcm wolffcm force-pushed the feat/bare-aggregates-rule branch 2 times, most recently from 16c7ac7 to 30d2789 Compare May 21, 2020 21:06
@wolffcm wolffcm force-pushed the feat/bare-aggregates-rule branch from 30d2789 to ded7170 Compare May 21, 2020 21:19
@wolffcm wolffcm merged commit 53165bf into feat/use-algo-w May 22, 2020
@wolffcm wolffcm deleted the feat/bare-aggregates-rule branch May 22, 2020 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants