xiedeyantu commented on code in PR #4678:
URL: https://github.com/apache/calcite/pull/4678#discussion_r2610652049
##########
core/src/main/java/org/apache/calcite/adapter/enumerable/PhysTypeImpl.java:
##########
@@ -642,6 +642,22 @@ private List<Expression> fieldReferences(
}
}
+ private static Expression getListExpressionAllowSingleElement(
+ Expressions.FluentList<Expression> list) {
+ assert list.size() > 0;
+
+ switch (list.size()) {
Review Comment:
Maybe an if-else would be better?
##########
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:
If I remember correctly, `nonEquiConditions` should store non-equality
conditions, and `IS NOT DISTINCT FROM` is also considered a non-equality
condition for `nonEquiConditions`.
##########
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:
If I understand correctly, would `nullAwareKeyFlags` be a better name? It
definitely needs additional documentation.
--
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]