kasakrisz commented on code in PR #3840:
URL: https://github.com/apache/calcite/pull/3840#discussion_r1663912547
##########
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:
@mihaibudiu, @YiwenWu
Thanks for the review, I changed this to check whether the reduced
expression is as CAST.
--
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]