Package org.apache.calcite.adapter.jdbc
Class JdbcRules.JdbcJoinRule
- java.lang.Object
-
- org.apache.calcite.plan.RelOptRule
-
- org.apache.calcite.rel.convert.ConverterRule
-
- org.apache.calcite.adapter.jdbc.JdbcRules.JdbcConverterRule
-
- org.apache.calcite.adapter.jdbc.JdbcRules.JdbcJoinRule
-
- Enclosing class:
- JdbcRules
public static class JdbcRules.JdbcJoinRule extends JdbcRules.JdbcConverterRule
Rule that converts a join to JDBC.
-
-
Field Summary
-
Fields inherited from class org.apache.calcite.adapter.jdbc.JdbcRules.JdbcConverterRule
out
-
Fields inherited from class org.apache.calcite.plan.RelOptRule
description, operands, relBuilderFactory
-
-
Constructor Summary
Constructors Constructor Description JdbcJoinRule(JdbcConvention out)
Deprecated.JdbcJoinRule(JdbcConvention out, RelBuilderFactory relBuilderFactory)
Creates a JdbcJoinRule.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
canJoinOnCondition(RexNode node)
Returns whether a condition is supported byJdbcRules.JdbcJoin
.RelNode
convert(Join join, boolean convertInputTraits)
Converts aJoin
into aJdbcJoin
.RelNode
convert(RelNode rel)
Converts a relational expression to the target trait(s) of this rule.-
Methods inherited from class org.apache.calcite.rel.convert.ConverterRule
getInTrait, getOutConvention, getOutTrait, getTraitDef, isGuaranteed, onMatch
-
Methods inherited from class org.apache.calcite.plan.RelOptRule
any, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, hashCode, matches, none, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unordered
-
-
-
-
Constructor Detail
-
JdbcJoinRule
@Deprecated public JdbcJoinRule(JdbcConvention out)
Deprecated.
-
JdbcJoinRule
public JdbcJoinRule(JdbcConvention out, RelBuilderFactory relBuilderFactory)
Creates a JdbcJoinRule.
-
-
Method Detail
-
convert
public RelNode convert(RelNode rel)
Description copied from class:ConverterRule
Converts a relational expression to the target trait(s) of this rule.Returns null if conversion is not possible.
- Specified by:
convert
in classConverterRule
-
convert
public RelNode convert(Join join, boolean convertInputTraits)
Converts aJoin
into aJdbcJoin
.- Parameters:
join
- Join operator to convertconvertInputTraits
- Whether to convert input tojoin
's JDBC convention- Returns:
- A new JdbcJoin
-
canJoinOnCondition
private boolean canJoinOnCondition(RexNode node)
Returns whether a condition is supported byJdbcRules.JdbcJoin
.Corresponds to the capabilities of
SqlImplementor.convertConditionToSqlNode(org.apache.calcite.rex.RexNode, org.apache.calcite.rel.rel2sql.SqlImplementor.Context, org.apache.calcite.rel.rel2sql.SqlImplementor.Context, int)
.- Parameters:
node
- Condition- Returns:
- Whether condition is supported
-
-