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 TypeMethodDescriptionvoidstatic PreProcessLogicalRelcreateVisitor(org.apache.calcite.rel.type.RelDataTypeFactory factory, DrillOperatorTable table, org.apache.calcite.rex.RexBuilder rexBuilder) org.apache.calcite.rel.RelNodevisit(org.apache.calcite.rel.logical.LogicalFilter filter) org.apache.calcite.rel.RelNodevisit(org.apache.calcite.rel.logical.LogicalIntersect intersect) org.apache.calcite.rel.RelNodevisit(org.apache.calcite.rel.logical.LogicalJoin join) org.apache.calcite.rel.RelNodevisit(org.apache.calcite.rel.logical.LogicalMinus minus) org.apache.calcite.rel.RelNodevisit(org.apache.calcite.rel.logical.LogicalProject project) org.apache.calcite.rel.RelNodevisit(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:
visitin interfaceorg.apache.calcite.rel.RelShuttle- Overrides:
visitin classorg.apache.calcite.rel.RelShuttleImpl
-
visit
public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalFilter filter) - Specified by:
visitin interfaceorg.apache.calcite.rel.RelShuttle- Overrides:
visitin classorg.apache.calcite.rel.RelShuttleImpl
-
visit
public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalJoin join) - Specified by:
visitin interfaceorg.apache.calcite.rel.RelShuttle- Overrides:
visitin classorg.apache.calcite.rel.RelShuttleImpl
-
visit
public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalUnion union) - Specified by:
visitin interfaceorg.apache.calcite.rel.RelShuttle- Overrides:
visitin classorg.apache.calcite.rel.RelShuttleImpl
-
visit
public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalIntersect intersect) - Specified by:
visitin interfaceorg.apache.calcite.rel.RelShuttle- Overrides:
visitin classorg.apache.calcite.rel.RelShuttleImpl
-
visit
public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalMinus minus) - Specified by:
visitin interfaceorg.apache.calcite.rel.RelShuttle- Overrides:
visitin classorg.apache.calcite.rel.RelShuttleImpl
-
convertException
- Throws:
SqlUnsupportedException
-