-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[CALCITE-7197] UnsupportedOperationException when using dynamic parameters inside ROW expression #4553
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
base: main
Are you sure you want to change the base?
Conversation
…eters inside ROW expression
473fa49 to
e324648
Compare
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
Outdated
Show resolved
Hide resolved
| } | ||
| boolean inferred = false; | ||
| for (SqlNode child : nodeList) { | ||
| if (child instanceof SqlBasicCall && SqlKind.ROW == child.getKind()) { |
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.
There are expressions that evaluate to a ROW type that are not ROW expressions.
For example, a[1], where a is an array of ROW values.
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 bringing this up, I might not have considered it before. Can you give a sql example? I will continue to analyze the possible problems in this scenario.
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.
See https://issues.apache.org/jira/browse/CALCITE-7231 for an example
| LogicalValues(tuples=[[{ 1, 2 }, { 3, null }, { 7369, null }, { 7499, 30 }, { null, 20 }, { null, 5 }]]) | ||
| LogicalAggregate(group=[{0, 1}]) | ||
| LogicalValues(tuples=[[{ 1, 2 }, { 3, null }, { 7369, null }, { null, 20 }, { null, 5 }, { 7499, 30 }]]) | ||
| LogicalValues(tuples=[[{ 1, 2 }, { null, 20 }, { 3, null }, { 7369, null }, { 7499, 30 }, { null, 5 }]]) |
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 what I want to ask is this—why has the order changed here? Is this necessary?
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.
|
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@calcite.apache.org list. Thank you for your contributions. |




Ref https://issues.apache.org/jira/browse/CALCITE-7197