rubenada commented on code in PR #4500:
URL: https://github.com/apache/calcite/pull/4500#discussion_r2290308258


##########
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:
   I have pushed a new commit on this regard. IMO this seems a better fix, 
since it makes the code (in both ReduceExpressionsRule#ReducibleExprLocator and 
RexBuilder#makeLiteral) more homogenous.



-- 
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]

Reply via email to