soumyakanti3578 commented on code in PR #4567:
URL: https://github.com/apache/calcite/pull/4567#discussion_r2395959275
##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -2359,7 +2359,7 @@ private RexNode simplifySearch(RexCall call, RexUnknownAs
unknownAs) {
return RexUtil.expandSearch(rexBuilder, null, call);
}
}
- return call;
+ return call.clone(call.type, ImmutableList.of(a,
call.getOperands().get(1)));
Review Comment:
It's certainly more efficient to only clone the call when the search operand
is simplified. I have pushed another commit to implement that.
--
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]