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/05/10 08:30:13 UTC

[GitHub] [calcite] asolimando commented on a diff in pull request #2783: [CALCITE-5109] RelMdAllPredicates and RelMdExpressionLineage support to analyze left/right join

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


##########
core/src/main/java/org/apache/calcite/rex/RexTableInputRef.java:
##########
@@ -46,10 +47,23 @@ public class RexTableInputRef extends RexInputRef {
 
   private final RelTableRef tableRef;
 
-  private RexTableInputRef(RelTableRef tableRef, int index, RelDataType type) {
+  /**
+   * It's a tag, which ref is wrapped by out join. And it always emits nullable = true.
+   * Input ref will be true, if it exists in right's input of left-join
+   * or left's input of right-join are true
+   */
+  private final boolean wrapJoinNullable;
+
+  private RexTableInputRef(RelTableRef tableRef, int index, RelDataType type,
+      boolean wrapJoinNullable) {
     super(index, type);
+    if (wrapJoinNullable) {
+      // Nullable of type must be true, if this input ref is wrapped by left/right join.
+      assert type.isNullable();
+    }
     this.tableRef = tableRef;

Review Comment:
   If possible, try also to add an error message to newly added assertions



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