asolimando commented on code in PR #2916:
URL: https://github.com/apache/calcite/pull/2916#discussion_r977552984


##########
core/src/main/java/org/apache/calcite/rel/rules/PruneEmptyRules.java:
##########
@@ -551,15 +554,13 @@ public interface JoinRightEmptyRuleConfig extends 
PruneEmptyRule.Config {
     }
   }
 
-  private static Stream<RexNode> getProjectStream(
-      RelDataType inRowType,
-      RelDataType castRowType,
-      int castRowTypeOffset,
-      RexBuilder rexBuilder) {
-    return inRowType.getFieldList().stream().map(
-        typeField -> rexBuilder.makeCast(
-                castRowType.getFieldList().get(castRowTypeOffset + 
typeField.getIndex()).getType(),
-                rexBuilder.makeInputRef(typeField.getType(), 
typeField.getIndex())));
+  private static Stream<RexNode> castToNullable(
+      RexBuilder rexBuilder, Stream<RexNode> leftExpressions) {

Review Comment:
   We probably want to use `expressions` instead of `leftExpressions` here, 
since the method can be called on left or right, depending on the kind of outer 
join.



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