caicancai commented on code in PR #3840:
URL: https://github.com/apache/calcite/pull/3840#discussion_r1664402674


##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -2272,8 +2272,14 @@ && sameTypeOrNarrowsNullability(e.getType(), 
intExpr.getType())) {
           (RexLiteral) e.getOperands().get(1))
           : rexBuilder.makeCast(e.getType(), operand, safe, safe);
       executor.reduce(rexBuilder, ImmutableList.of(simplifiedExpr), 
reducedValues);
-      return requireNonNull(
-          Iterables.getOnlyElement(reducedValues));
+      RexNode reducedRexNode = 
requireNonNull(Iterables.getOnlyElement(reducedValues));
+      if (reducedRexNode instanceof RexCall) {

Review Comment:
   @kasakrisz You should not squash directly. You need to wait until all 
reviewers have reviewed before squashing. Otherwise, the reviewer will not know 
what you changed.



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