silundong commented on code in PR #4678:
URL: https://github.com/apache/calcite/pull/4678#discussion_r2611295656
##########
core/src/main/java/org/apache/calcite/rel/core/JoinInfo.java:
##########
@@ -29,33 +29,37 @@
import com.google.common.collect.ImmutableList;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import static java.util.Objects.requireNonNull;
/** An analyzed join condition.
*
* <p>It is useful for the many algorithms that care whether a join has an
- * equi-join condition.
+ * equi-join condition (contains EQUALS and IS NOT DISTINCT FROM).
*
- * <p>You can create one using {@link #createWithStrictEquality}, or call
+ * <p>You can create one using {@link #of(RelNode, RelNode, RexNode)},
+ * {@link #createWithStrictEquality}, or call
* {@link Join#analyzeCondition()}; many kinds of join cache their
* join info, especially those that are equi-joins.
*
* @see Join#analyzeCondition() */
public class JoinInfo {
public final ImmutableIntList leftKeys;
public final ImmutableIntList rightKeys;
+ public final ImmutableList<Boolean> filterNulls;
Review Comment:
`filterNulls` indicates whether each join key is null-safe. If
`filterNulls.get(i)` is FALSE, the i-th key is null-safe (i.e. IS NOT DISTINCT
FROM). I will add a comment and rename it.
> If I remember correctly, nonEquiConditions should store non-equality
conditions, and IS NOT DISTINCT FROM is also considered a non-equality
condition for nonEquiConditions.
I'm not sure I understood your question correctly. Before this commit, IS
NOT DISTINCT FROM was part of `nonEquiConditions`, but in this commit IS NOT
DISTINCT FROM can be treated as a hash join key and is no longer part of
`nonEquiConditions`.
--
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]