-
Notifications
You must be signed in to change notification settings - Fork 413
feat(query): better alias tracker #6909
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2b6169a
to
d0b24b0
Compare
evenyag
reviewed
Sep 8, 2025
discord9
commented
Sep 9, 2025
fengjiachun
reviewed
Sep 10, 2025
evenyag
approved these changes
Sep 10, 2025
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.
Trust the test......
fengjiachun
approved these changes
Sep 10, 2025
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.
LGTM
Signed-off-by: discord9 <discord9@163.com> feat: layered alias tracker Signed-off-by: discord9 <discord9@163.com> refactor Signed-off-by: discord9 <discord9@163.com> docs: expalin for no offset by one Signed-off-by: discord9 <discord9@163.com> test: more Signed-off-by: discord9 <discord9@163.com> simpify api Signed-off-by: discord9 <discord9@163.com> wip Signed-off-by: discord9 <discord9@163.com> fix: filter non-exist columns Signed-off-by: discord9 <discord9@163.com> feat: stuff Signed-off-by: discord9 <discord9@163.com> feat: cache partition columns Signed-off-by: discord9 <discord9@163.com> refactor: rm unused fn Signed-off-by: discord9 <discord9@163.com> no need res Signed-off-by: discord9 <discord9@163.com> chore: rm unwrap&docs update Signed-off-by: discord9 <discord9@163.com>
Signed-off-by: discord9 <discord9@163.com>
Signed-off-by: discord9 <discord9@163.com>
Signed-off-by: discord9 <discord9@163.com>
Signed-off-by: discord9 <discord9@163.com>
Signed-off-by: discord9 <discord9@163.com>
Signed-off-by: discord9 <discord9@163.com>
Signed-off-by: discord9 <discord9@163.com>
Signed-off-by: discord9 <discord9@163.com>
Signed-off-by: discord9 <discord9@163.com>
a2daab2
to
7dcb925
Compare
WenyXu
pushed a commit
to WenyXu/greptimedb
that referenced
this pull request
Sep 17, 2025
* better resolve Signed-off-by: discord9 <discord9@163.com> feat: layered alias tracker Signed-off-by: discord9 <discord9@163.com> refactor Signed-off-by: discord9 <discord9@163.com> docs: expalin for no offset by one Signed-off-by: discord9 <discord9@163.com> test: more Signed-off-by: discord9 <discord9@163.com> simpify api Signed-off-by: discord9 <discord9@163.com> wip Signed-off-by: discord9 <discord9@163.com> fix: filter non-exist columns Signed-off-by: discord9 <discord9@163.com> feat: stuff Signed-off-by: discord9 <discord9@163.com> feat: cache partition columns Signed-off-by: discord9 <discord9@163.com> refactor: rm unused fn Signed-off-by: discord9 <discord9@163.com> no need res Signed-off-by: discord9 <discord9@163.com> chore: rm unwrap&docs update Signed-off-by: discord9 <discord9@163.com> * chore: after rebase fix Signed-off-by: discord9 <discord9@163.com> * refactor: per review Signed-off-by: discord9 <discord9@163.com> * fix: unsupport part Signed-off-by: discord9 <discord9@163.com> * err msg Signed-off-by: discord9 <discord9@163.com> * fix: pass correct partition cols Signed-off-by: discord9 <discord9@163.com> * fix? use column name only Signed-off-by: discord9 <discord9@163.com> * fix: merge scan has partition columns no alias/no partition diff Signed-off-by: discord9 <discord9@163.com> * refactor: loop instead of recursive Signed-off-by: discord9 <discord9@163.com> * refactor: per review Signed-off-by: discord9 <discord9@163.com> * feat: overlaps Signed-off-by: discord9 <discord9@163.com> --------- Signed-off-by: discord9 <discord9@163.com>
WenyXu
pushed a commit
to WenyXu/greptimedb
that referenced
this pull request
Sep 17, 2025
* better resolve Signed-off-by: discord9 <discord9@163.com> feat: layered alias tracker Signed-off-by: discord9 <discord9@163.com> refactor Signed-off-by: discord9 <discord9@163.com> docs: expalin for no offset by one Signed-off-by: discord9 <discord9@163.com> test: more Signed-off-by: discord9 <discord9@163.com> simpify api Signed-off-by: discord9 <discord9@163.com> wip Signed-off-by: discord9 <discord9@163.com> fix: filter non-exist columns Signed-off-by: discord9 <discord9@163.com> feat: stuff Signed-off-by: discord9 <discord9@163.com> feat: cache partition columns Signed-off-by: discord9 <discord9@163.com> refactor: rm unused fn Signed-off-by: discord9 <discord9@163.com> no need res Signed-off-by: discord9 <discord9@163.com> chore: rm unwrap&docs update Signed-off-by: discord9 <discord9@163.com> * chore: after rebase fix Signed-off-by: discord9 <discord9@163.com> * refactor: per review Signed-off-by: discord9 <discord9@163.com> * fix: unsupport part Signed-off-by: discord9 <discord9@163.com> * err msg Signed-off-by: discord9 <discord9@163.com> * fix: pass correct partition cols Signed-off-by: discord9 <discord9@163.com> * fix? use column name only Signed-off-by: discord9 <discord9@163.com> * fix: merge scan has partition columns no alias/no partition diff Signed-off-by: discord9 <discord9@163.com> * refactor: loop instead of recursive Signed-off-by: discord9 <discord9@163.com> * refactor: per review Signed-off-by: discord9 <discord9@163.com> * feat: overlaps Signed-off-by: discord9 <discord9@163.com> --------- Signed-off-by: discord9 <discord9@163.com> Signed-off-by: WenyXu <wenymedia@gmail.com>
WenyXu
pushed a commit
to WenyXu/greptimedb
that referenced
this pull request
Sep 17, 2025
* better resolve Signed-off-by: discord9 <discord9@163.com> feat: layered alias tracker Signed-off-by: discord9 <discord9@163.com> refactor Signed-off-by: discord9 <discord9@163.com> docs: expalin for no offset by one Signed-off-by: discord9 <discord9@163.com> test: more Signed-off-by: discord9 <discord9@163.com> simpify api Signed-off-by: discord9 <discord9@163.com> wip Signed-off-by: discord9 <discord9@163.com> fix: filter non-exist columns Signed-off-by: discord9 <discord9@163.com> feat: stuff Signed-off-by: discord9 <discord9@163.com> feat: cache partition columns Signed-off-by: discord9 <discord9@163.com> refactor: rm unused fn Signed-off-by: discord9 <discord9@163.com> no need res Signed-off-by: discord9 <discord9@163.com> chore: rm unwrap&docs update Signed-off-by: discord9 <discord9@163.com> * chore: after rebase fix Signed-off-by: discord9 <discord9@163.com> * refactor: per review Signed-off-by: discord9 <discord9@163.com> * fix: unsupport part Signed-off-by: discord9 <discord9@163.com> * err msg Signed-off-by: discord9 <discord9@163.com> * fix: pass correct partition cols Signed-off-by: discord9 <discord9@163.com> * fix? use column name only Signed-off-by: discord9 <discord9@163.com> * fix: merge scan has partition columns no alias/no partition diff Signed-off-by: discord9 <discord9@163.com> * refactor: loop instead of recursive Signed-off-by: discord9 <discord9@163.com> * refactor: per review Signed-off-by: discord9 <discord9@163.com> * feat: overlaps Signed-off-by: discord9 <discord9@163.com> --------- Signed-off-by: discord9 <discord9@163.com>
WenyXu
pushed a commit
that referenced
this pull request
Sep 17, 2025
* better resolve Signed-off-by: discord9 <discord9@163.com> feat: layered alias tracker Signed-off-by: discord9 <discord9@163.com> refactor Signed-off-by: discord9 <discord9@163.com> docs: expalin for no offset by one Signed-off-by: discord9 <discord9@163.com> test: more Signed-off-by: discord9 <discord9@163.com> simpify api Signed-off-by: discord9 <discord9@163.com> wip Signed-off-by: discord9 <discord9@163.com> fix: filter non-exist columns Signed-off-by: discord9 <discord9@163.com> feat: stuff Signed-off-by: discord9 <discord9@163.com> feat: cache partition columns Signed-off-by: discord9 <discord9@163.com> refactor: rm unused fn Signed-off-by: discord9 <discord9@163.com> no need res Signed-off-by: discord9 <discord9@163.com> chore: rm unwrap&docs update Signed-off-by: discord9 <discord9@163.com> * chore: after rebase fix Signed-off-by: discord9 <discord9@163.com> * refactor: per review Signed-off-by: discord9 <discord9@163.com> * fix: unsupport part Signed-off-by: discord9 <discord9@163.com> * err msg Signed-off-by: discord9 <discord9@163.com> * fix: pass correct partition cols Signed-off-by: discord9 <discord9@163.com> * fix? use column name only Signed-off-by: discord9 <discord9@163.com> * fix: merge scan has partition columns no alias/no partition diff Signed-off-by: discord9 <discord9@163.com> * refactor: loop instead of recursive Signed-off-by: discord9 <discord9@163.com> * refactor: per review Signed-off-by: discord9 <discord9@163.com> * feat: overlaps Signed-off-by: discord9 <discord9@163.com> --------- Signed-off-by: discord9 <discord9@163.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
many query push down cases need correct alias tracking:
added two methods which be able to query for aliased column's original column(at given grand child of plan) and old columns' aliased column at current level etc. which is useful for all sort of case where need to track if a column exist in current node
since point 2-4 still need more testing, will do it in next PR
for better reviewibility, but the idea is clear, and both query method(bottom-up/up-bottom) is needed and tested
PR Checklist
Please convert it to a draft if some of the following conditions are not met.