public class JoinUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JoinUtils.JoinCategory |
| Modifier and Type | Field and Description |
|---|---|
static String |
FAILED_TO_PLAN_CARTESIAN_JOIN |
| Constructor and Description |
|---|
JoinUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addLeastRestrictiveCasts(LogicalExpression[] leftExpressions,
VectorAccessible leftBatch,
LogicalExpression[] rightExpressions,
VectorAccessible rightBatch,
FragmentContext context)
Utility method used by joins to add implicit casts on one of the sides of the join condition in case the two
expressions have different types.
|
static UnsupportedRelOperatorException |
cartesianJoinPlanningException()
Creates new exception for queries that cannot be planned due
to presence of cartesian or inequality join.
|
static Comparator |
checkAndReturnSupportedJoinComparator(JoinCondition condition) |
static boolean |
checkCartesianJoin(org.apache.calcite.rel.RelNode relNode)
Check if the given RelNode contains any Cartesian join.
|
static boolean |
checkCartesianJoin(org.apache.calcite.rel.RelNode relNode,
List<Integer> leftKeys,
List<Integer> rightKeys,
List<Boolean> filterNulls)
Check if the given RelNode contains any Cartesian join.
|
static JoinUtils.JoinCategory |
getJoinCategory(org.apache.calcite.rel.RelNode left,
org.apache.calcite.rel.RelNode right,
org.apache.calcite.rex.RexNode condition,
List<Integer> leftKeys,
List<Integer> rightKeys,
List<Boolean> filterNulls) |
static boolean |
hasScalarSubqueryInput(org.apache.calcite.rel.RelNode left,
org.apache.calcite.rel.RelNode right)
Utility method to check if a any of input RelNodes is provably scalar.
|
static boolean |
isScalarSubquery(org.apache.calcite.rel.RelNode root)
Utility method to check if a subquery (represented by its root RelNode) is provably scalar.
|
public static final String FAILED_TO_PLAN_CARTESIAN_JOIN
public static Comparator checkAndReturnSupportedJoinComparator(JoinCondition condition)
public static boolean checkCartesianJoin(org.apache.calcite.rel.RelNode relNode,
List<Integer> leftKeys,
List<Integer> rightKeys,
List<Boolean> filterNulls)
relNode - the RelNode to be inspected.leftKeys - a list used for the left input into the join which has
equi-join keys. It can be empty or not (but not null),
this method will clear this list before using it.rightKeys - a list used for the right input into the join which has
equi-join keys. It can be empty or not (but not null),
this method will clear this list before using it.filterNulls - The join key positions for which null values will not
match.public static boolean checkCartesianJoin(org.apache.calcite.rel.RelNode relNode)
relNode - RelNode instance to be inspectedpublic static void addLeastRestrictiveCasts(LogicalExpression[] leftExpressions, VectorAccessible leftBatch, LogicalExpression[] rightExpressions, VectorAccessible rightBatch, FragmentContext context)
leftExpressions - array of expressions from left input into the joinleftBatch - left input record batchrightExpressions - array of expressions from right input into the joinrightBatch - right input record batchcontext - fragment contextpublic static boolean isScalarSubquery(org.apache.calcite.rel.RelNode root)
root - The root RelNode to be examinedpublic static JoinUtils.JoinCategory getJoinCategory(org.apache.calcite.rel.RelNode left, org.apache.calcite.rel.RelNode right, org.apache.calcite.rex.RexNode condition, List<Integer> leftKeys, List<Integer> rightKeys, List<Boolean> filterNulls)
public static boolean hasScalarSubqueryInput(org.apache.calcite.rel.RelNode left,
org.apache.calcite.rel.RelNode right)
left - the RelNode to be inspected.right - the RelNode to be inspected.public static UnsupportedRelOperatorException cartesianJoinPlanningException()
UnsupportedRelOperatorException instanceCopyright © 2021 The Apache Software Foundation. All rights reserved.