You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2022/11/02 14:46:12 UTC

[GitHub] [calcite] libenchao commented on a diff in pull request #2686: [CALCITE-4982] NonNull field shouldn't be pushed down into leaf of outer-join in 'ProjectJoinTransposeRule'

libenchao commented on code in PR #2686:
URL: https://github.com/apache/calcite/pull/2686#discussion_r1011870569


##########
core/src/main/java/org/apache/calcite/rel/rules/ProjectJoinTransposeRule.java:
##########
@@ -157,7 +159,24 @@ public ProjectJoinTransposeRule(
   @Value.Immutable(singleton = false)
   public interface Config extends RelRule.Config {
     Config DEFAULT = ImmutableProjectJoinTransposeRule.Config.builder()
-        .withPreserveExprCondition(expr -> !(expr instanceof RexOver))
+        .withPreserveExprCondition(expr -> {
+          // Do not push down over's expression by default
+          if (expr instanceof RexOver) {
+            return false;
+          }
+          final RelDataType relType = expr.getType();

Review Comment:
   move this into to `if` branch



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org