chunweilei commented on a change in pull request #1917:
URL: https://github.com/apache/calcite/pull/1917#discussion_r412019712
##########
File path: core/src/main/java/org/apache/calcite/rex/RexUtil.java
##########
@@ -2750,4 +2750,27 @@ public ExprSimplifier(RexSimplify simplify, RexUnknownAs
unknownAs,
return simplify.rexBuilder.makeCast(call.getType(), simplifiedNode,
matchNullability);
}
}
+
+ /**
+ * Utility to fix the inconsistencies of nullable/non-nullable types.
+ */
+ public static class RexInputRefNullabilityFixer extends RexShuttle {
+
+ private final RexBuilder rexBuilder;
+
+ private final RelDataType desiredTypes;
+
+ public RexInputRefNullabilityFixer(RexBuilder rexBuilder, RelDataType
desiredTypes) {
+ this.rexBuilder = rexBuilder;
+ this.desiredTypes = desiredTypes;
+ }
Review comment:
`FixNullabilityShuttle` seems to meet your requirements.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]