-
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
base: main
Are you sure you want to change the base?
Conversation
…ableProjectToCalcRule throws AssertionError
…ableProjectToCalcRule throws AssertionError
|
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.
…ableProjectToCalcRule throws AssertionError