-
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-6834] In query that applies COALESCE to nullable SUM, Enumer… #4201
Conversation
|
for (RexNode rexInputRef : rexInputRefs) { | ||
selectList.add(rexInputRef.accept(rexShuttle)); | ||
} | ||
builder.project(selectList.build()); |
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 think you can achieve the same effect with one line of code: use RelBuilder.cast
to convert the output row type of aggregate
to what project
expects it to be. If cast
adds a CAST
call then project
will flatten the expression on top of it.
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.
What you are referring to here should be RelBuilder.convert
, which also requires us to build a new RowType based on Mapping, so I have not made any changes here.
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 [email protected] list. Thank you for your contributions. |
@julianhyde @mihaibudiu Could you please review this PR? Then we can move forward with it. |
core/src/main/java/org/apache/calcite/rel/rules/ProjectAggregateMergeRule.java
Outdated
Show resolved
Hide resolved
…bleProjectToCalcRule throws AssertionError
…ableProjectToCalcRule throws AssertionError