Class PreProcessLogicalRel
java.lang.Object
org.apache.calcite.rel.RelShuttleImpl
org.apache.drill.exec.planner.logical.PreProcessLogicalRel
- All Implemented Interfaces:
org.apache.calcite.rel.RelShuttle
public class PreProcessLogicalRel
extends org.apache.calcite.rel.RelShuttleImpl
This class rewrites all the project expression that contain convert_to/ convert_from
to actual implementations.
Eg: convert_from(EXPR, 'JSON') is rewritten as convert_fromjson(EXPR)
With the actual method name we can find out if the function has a complex
output type and we will fire/ ignore certain rules (merge project rule) based on this fact.
-
Field Summary
Fields inherited from class org.apache.calcite.rel.RelShuttleImpl
stack
-
Method Summary
Modifier and TypeMethodDescriptionvoid
static PreProcessLogicalRel
createVisitor
(org.apache.calcite.rel.type.RelDataTypeFactory factory, DrillOperatorTable table, org.apache.calcite.rex.RexBuilder rexBuilder) org.apache.calcite.rel.RelNode
visit
(org.apache.calcite.rel.logical.LogicalFilter filter) org.apache.calcite.rel.RelNode
visit
(org.apache.calcite.rel.logical.LogicalIntersect intersect) org.apache.calcite.rel.RelNode
visit
(org.apache.calcite.rel.logical.LogicalJoin join) org.apache.calcite.rel.RelNode
visit
(org.apache.calcite.rel.logical.LogicalMinus minus) org.apache.calcite.rel.RelNode
visit
(org.apache.calcite.rel.logical.LogicalProject project) org.apache.calcite.rel.RelNode
visit
(org.apache.calcite.rel.logical.LogicalUnion union) Methods inherited from class org.apache.calcite.rel.RelShuttleImpl
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitChild, visitChildren
-
Method Details
-
createVisitor
public static PreProcessLogicalRel createVisitor(org.apache.calcite.rel.type.RelDataTypeFactory factory, DrillOperatorTable table, org.apache.calcite.rex.RexBuilder rexBuilder) -
visit
public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalProject project) - Specified by:
visit
in interfaceorg.apache.calcite.rel.RelShuttle
- Overrides:
visit
in classorg.apache.calcite.rel.RelShuttleImpl
-
visit
public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalFilter filter) - Specified by:
visit
in interfaceorg.apache.calcite.rel.RelShuttle
- Overrides:
visit
in classorg.apache.calcite.rel.RelShuttleImpl
-
visit
public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalJoin join) - Specified by:
visit
in interfaceorg.apache.calcite.rel.RelShuttle
- Overrides:
visit
in classorg.apache.calcite.rel.RelShuttleImpl
-
visit
public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalUnion union) - Specified by:
visit
in interfaceorg.apache.calcite.rel.RelShuttle
- Overrides:
visit
in classorg.apache.calcite.rel.RelShuttleImpl
-
visit
public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalIntersect intersect) - Specified by:
visit
in interfaceorg.apache.calcite.rel.RelShuttle
- Overrides:
visit
in classorg.apache.calcite.rel.RelShuttleImpl
-
visit
public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalMinus minus) - Specified by:
visit
in interfaceorg.apache.calcite.rel.RelShuttle
- Overrides:
visit
in classorg.apache.calcite.rel.RelShuttleImpl
-
convertException
- Throws:
SqlUnsupportedException
-