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

Push PARTIAL TopN into TableScan #7028

Closed
findepi opened this issue Feb 25, 2021 · 0 comments · Fixed by #7563
Closed

Push PARTIAL TopN into TableScan #7028

findepi opened this issue Feb 25, 2021 · 0 comments · Fixed by #7563
Milestone

Comments

@findepi
Copy link
Member

findepi commented Feb 25, 2021

PushTopNIntoTableScan was originally added in the optimizer which creates PARTIAL TopN nodes and pushes them through UNION and outer join.

#6847 simplifies and fixes some things, but for this it moves the PushTopNIntoTableScan into earlier phase (where other PushXxxIntoTableScan live) and disables it for PARTIAL TopN nodes. The intent is – if TopN can be fully pushed down, it should be pushed down at once, before it gets split into PARTIAL and FINAL.

We should revisit this – maybe we should push the SINGLE TopN where possible, but later also attempt to push PARTIAL TopN once these get created.

Add appropriate testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants