mihaibudiu commented on code in PR #4500:
URL: https://github.com/apache/calcite/pull/4500#discussion_r2289167978
##########
core/src/main/java/org/apache/calcite/rel/rules/ReduceExpressionsRule.java:
##########
@@ -1151,10 +1151,11 @@ private void analyzeCall(RexCall call, Constancy
callConstancy) {
// the operands are constants, we still want to reduce those
if ((callConstancy == Constancy.REDUCIBLE_CONSTANT)
&& (call.getOperator() instanceof SqlRowOperator)) {
- callConstancy = Constancy.NON_CONSTANT;
+ // Consider Row call as kind of "struct literal"
+ callConstancy = Constancy.IRREDUCIBLE_CONSTANT;
Review Comment:
This is true for many other "constructor" calls, like ARRAY, MAP, MULTISET,
and various GEOMETRY constructors. These are all reducible if and only if the
arguments are constant.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]