-
Notifications
You must be signed in to change notification settings - Fork 214
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: support subquery in FROM clause #756
Merged
Merged
Conversation
This file contains 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
Signed-off-by: MingjiHan <mjhan@bu.edu>
Signed-off-by: MingjiHan <mjhan@bu.edu>
Signed-off-by: MingjiHan <mjhan@bu.edu>
Signed-off-by: MingjiHan <mjhan@bu.edu>
Signed-off-by: MingjiHan <mjhan@bu.edu>
Signed-off-by: MingjiHan <mjhan@bu.edu>
Signed-off-by: MingjiHan <mjhan@bu.edu>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
wangrunji0408
force-pushed
the
mingji-subquery-binder
branch
from
January 1, 2023 16:42
de97e51
to
4451179
Compare
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
wangrunji0408
force-pushed
the
mingji-subquery-binder
branch
from
January 1, 2023 16:54
e530459
to
5a9e017
Compare
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
wangrunji0408
force-pushed
the
mingji-subquery-binder
branch
from
January 1, 2023 18:43
8917ba8
to
d2b604e
Compare
wangrunji0408
changed the title
Mingji subquery binder
feat: support subquery in FROM clause
Jan 4, 2023
wangrunji0408
approved these changes
Jan 7, 2023
don't know why the result is different from macOS Signed-off-by: Runji Wang <wangrunji0408@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.
This PR introduces
alias
andoutput_alias
to the binder context.For table:
and query:
After binding
from t
, the context will be:Later when binding
a
, it will lookup thealias
map and get node$t.a
.After binding
select -a as a from t
, the context will be:The node
ref
is used to refer an expression as a whole and prevent optimization.Then the
output_alias
will be moved to the upper context:Later the binder will get
(ref (- $t.a))
when bindingselect x.a
.The final binding result of this query will be:
Next it comes to the optimizer. The projection pushdown rules are fixed to properly treat
(- $t.a)
instead of$t.a
as a basic unit above the join node.