Class ExprToRex
java.lang.Object
org.apache.drill.common.expression.visitors.AbstractExprVisitor<org.apache.calcite.rex.RexNode,Void,RuntimeException>
org.apache.drill.exec.planner.index.ExprToRex
- All Implemented Interfaces:
ExprVisitor<org.apache.calcite.rex.RexNode,
Void, RuntimeException>
public class ExprToRex
extends AbstractExprVisitor<org.apache.calcite.rex.RexNode,Void,RuntimeException>
Convert a logicalExpression to RexNode, notice the inputRel could be in an old plan, but newRowType is the newly built rowType
that the new RexNode will be applied upon, so when reference fields, use newRowType, when need cluster, plannerSetting, etc, use old inputRel
-
Constructor Summary
ConstructorDescriptionExprToRex
(org.apache.calcite.rel.RelNode inputRel, org.apache.calcite.rel.type.RelDataType newRowType, org.apache.calcite.rex.RexBuilder builder) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.calcite.rel.type.RelDataTypeField
org.apache.calcite.rex.RexNode
visitCastExpression
(CastExpression e, Void value) org.apache.calcite.rex.RexNode
visitSchemaPath
(SchemaPath path, Void value) Methods inherited from class org.apache.drill.common.expression.visitors.AbstractExprVisitor
visitAnyValueExpression, visitBooleanConstant, visitBooleanOperator, visitConvertExpression, visitDateConstant, visitDecimal18Constant, visitDecimal28Constant, visitDecimal38Constant, visitDecimal9Constant, visitDoubleConstant, visitFloatConstant, visitFunctionCall, visitFunctionHolderExpression, visitIfExpression, visitIntConstant, visitIntervalDayConstant, visitIntervalYearConstant, visitLongConstant, visitNullConstant, visitNullExpression, visitParameter, visitQuotedStringConstant, visitTimeConstant, visitTimeStampConstant, visitTypedFieldExpr, visitUnknown, visitVarDecimalConstant
-
Constructor Details
-
ExprToRex
public ExprToRex(org.apache.calcite.rel.RelNode inputRel, org.apache.calcite.rel.type.RelDataType newRowType, org.apache.calcite.rex.RexBuilder builder)
-
-
Method Details
-
findField
public static org.apache.calcite.rel.type.RelDataTypeField findField(String fieldName, org.apache.calcite.rel.type.RelDataType rowType) -
visitSchemaPath
public org.apache.calcite.rex.RexNode visitSchemaPath(SchemaPath path, Void value) throws RuntimeException - Specified by:
visitSchemaPath
in interfaceExprVisitor<org.apache.calcite.rex.RexNode,
Void, RuntimeException> - Overrides:
visitSchemaPath
in classAbstractExprVisitor<org.apache.calcite.rex.RexNode,
Void, RuntimeException> - Throws:
RuntimeException
-
visitCastExpression
public org.apache.calcite.rex.RexNode visitCastExpression(CastExpression e, Void value) throws RuntimeException - Specified by:
visitCastExpression
in interfaceExprVisitor<org.apache.calcite.rex.RexNode,
Void, RuntimeException> - Overrides:
visitCastExpression
in classAbstractExprVisitor<org.apache.calcite.rex.RexNode,
Void, RuntimeException> - Throws:
RuntimeException
-