thomasrebele commented on code in PR #4646:
URL: https://github.com/apache/calcite/pull/4646#discussion_r2559197198
##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -1212,16 +1211,15 @@ private RexNode simplifyIs(RexCall call, RexUnknownAs
unknownAs) {
return rexBuilder.makeLiteral(false);
}
if (RexUtil.isLosslessCast(a)) {
- if (!a.getType().isNullable()) {
- return rexBuilder.makeLiteral(false);
- }
- return rexBuilder.makeCall(SqlStdOperatorTable.IS_NULL,
RexUtil.removeCast(a));
+ a = RexUtil.removeCast(a);
+ // to keep this simplification, we must return IS NULL(a),
Review Comment:
The simplification that I meant is removing the superfluous lossless 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]