-
Notifications
You must be signed in to change notification settings - Fork 166
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: add subquery representation #134
Conversation
530f4c2
to
28e87f2
Compare
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.
Generally looks good. Interested to see if others agree.
This looks good to me but I'd like to get some more eyes on it. |
I lied... we need to also add the docs part of this. Once people agree with the shape of this, let's try to update the appropriate parts of the expressions/etc sections. |
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.
Looks good to me as a way of representing unflattened subqueries. The only potential missing feature I see here is support for the ARRAY
subquery, e.g. in Postgres:
select array(select * from generate_series(0,5,1));
-- {0,1,2,3,4,5}
Thanks! Yeah, functions that accept subqueries (or sets of rows) would be an interesting follow up. This would likely also need work in the type system. |
I will add some documentation to the spec later today about subqueries. |
151a830
to
c5c90a0
Compare
7c476a1
to
ae9300e
Compare
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.
Thanks for working through this!
This PR adds support for correlated subqueries to substrait.
Notes:
expressions and relations together to get the protos to compile.
EXISTS
andANY
),we chose to keep a few of the higher level representations so that information about
the original intention is preserved.
Closes #119.
cc @pdet @Mytherin, would love your thoughts here!