wojustme commented on code in PR #2783: URL: https://github.com/apache/calcite/pull/2783#discussion_r869107618
########## 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: @asolimando Yes, you are right. It's a good habit. -- 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-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org