-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[CALCITE-6554] Check for correlation variables in project during SqlToRelConverter.createAggImpl #3938
Conversation
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.
I am not familiar with the builder, so I cannot make a confident statement, but the tests seem fine.
@@ -668,6 +668,53 @@ FROM (SELECT 1 AS a) AS t; | |||
|
|||
!ok | |||
|
|||
# [CALCITE-6554] Nested correlated subqueries |
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.
It should be the same as the Jira Summary.
@@ -3770,6 +3770,34 @@ void checkCorrelatedMapSubQuery(boolean expand) { | |||
sql(sql).withExpand(false).withDecorrelate(false).ok(); | |||
} | |||
|
|||
@Test void testCorrelationInProjectionWith1xNestedCorrelatedProjection() { |
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.
Maybe the first test case can add the Jira link and description.
@ian-bertolacci, can you please address the comments from @NobiGo? |
@ian-bertolacci Please squash commit so that this PR can be merged |
…e in SqlToRelConverter.createAggImpl
64348b2
to
5b728ce
Compare
I've gone ahead and done it, but I'm pretty sure Github has squash-and-merge functionality, which would be nice if we could use. |
|
Check for correlation variables in intermediate project when converting aggregation.
Its probably wise for us to check other places where this may be an issue.
I'm open to alternative solutions which have a wider effect, such as having the RelBuilder or even the constructor collect the correlation variables when the variable set is otherwise undefined.