Package org.apache.drill.exec.expr
Class CloneVisitor
java.lang.Object
org.apache.drill.common.expression.visitors.AbstractExprVisitor<LogicalExpression,Void,RuntimeException>
org.apache.drill.exec.expr.CloneVisitor
- All Implemented Interfaces:
ExprVisitor<LogicalExpression,
Void, RuntimeException>
Creates a deep copy of a LogicalExpression. Specifically, it creates new instances of the literal expressions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvisitBooleanOperator
(BooleanOperator op, Void value) visitCastExpression
(CastExpression e, Void value) visitConvertExpression
(ConvertExpression e, Void value) visitDateConstant
(ValueExpressions.DateExpression intExpr, Void value) visitDecimal18Constant
(ValueExpressions.Decimal18Expression decExpr, Void value) visitDecimal28Constant
(ValueExpressions.Decimal28Expression decExpr, Void value) visitDecimal38Constant
(ValueExpressions.Decimal38Expression decExpr, Void value) visitDecimal9Constant
(ValueExpressions.Decimal9Expression decExpr, Void value) visitDoubleConstant
(ValueExpressions.DoubleExpression dExpr, Void value) visitFloatConstant
(ValueExpressions.FloatExpression fExpr, Void value) visitFunctionCall
(FunctionCall call, Void value) visitFunctionHolderExpression
(FunctionHolderExpression holder, Void value) visitIfExpression
(IfExpression ifExpr, Void value) visitIntConstant
(ValueExpressions.IntExpression intExpr, Void value) visitIntervalDayConstant
(ValueExpressions.IntervalDayExpression intExpr, Void value) visitIntervalYearConstant
(ValueExpressions.IntervalYearExpression intExpr, Void value) visitLongConstant
(ValueExpressions.LongExpression intExpr, Void value) visitNullConstant
(TypedNullConstant e, Void value) visitNullExpression
(NullExpression e, Void value) visitSchemaPath
(SchemaPath path, Void value) visitTimeConstant
(ValueExpressions.TimeExpression intExpr, Void value) visitTimeStampConstant
(ValueExpressions.TimeStampExpression intExpr, Void value) visitUnknown
(LogicalExpression e, Void value) Handles implementation-specific expressions not known to the visitor structure.visitVarDecimalConstant
(ValueExpressions.VarDecimalExpression decExpr, Void value) Methods inherited from class org.apache.drill.common.expression.visitors.AbstractExprVisitor
visitAnyValueExpression, visitParameter, visitTypedFieldExpr
-
Constructor Details
-
CloneVisitor
public CloneVisitor()
-
-
Method Details
-
visitFunctionCall
- Specified by:
visitFunctionCall
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitFunctionCall
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitFunctionHolderExpression
public LogicalExpression visitFunctionHolderExpression(FunctionHolderExpression holder, Void value) throws RuntimeException - Specified by:
visitFunctionHolderExpression
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitFunctionHolderExpression
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitIfExpression
- Specified by:
visitIfExpression
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitIfExpression
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitBooleanOperator
public LogicalExpression visitBooleanOperator(BooleanOperator op, Void value) throws RuntimeException - Specified by:
visitBooleanOperator
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitBooleanOperator
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitSchemaPath
- Specified by:
visitSchemaPath
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitSchemaPath
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitFloatConstant
public LogicalExpression visitFloatConstant(ValueExpressions.FloatExpression fExpr, Void value) throws RuntimeException - Specified by:
visitFloatConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitFloatConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitIntConstant
public LogicalExpression visitIntConstant(ValueExpressions.IntExpression intExpr, Void value) throws RuntimeException - Specified by:
visitIntConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitIntConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitLongConstant
public LogicalExpression visitLongConstant(ValueExpressions.LongExpression intExpr, Void value) throws RuntimeException - Specified by:
visitLongConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitLongConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitDecimal9Constant
public LogicalExpression visitDecimal9Constant(ValueExpressions.Decimal9Expression decExpr, Void value) throws RuntimeException - Specified by:
visitDecimal9Constant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitDecimal9Constant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitDecimal18Constant
public LogicalExpression visitDecimal18Constant(ValueExpressions.Decimal18Expression decExpr, Void value) throws RuntimeException - Specified by:
visitDecimal18Constant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitDecimal18Constant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitDecimal28Constant
public LogicalExpression visitDecimal28Constant(ValueExpressions.Decimal28Expression decExpr, Void value) throws RuntimeException - Specified by:
visitDecimal28Constant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitDecimal28Constant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitDecimal38Constant
public LogicalExpression visitDecimal38Constant(ValueExpressions.Decimal38Expression decExpr, Void value) throws RuntimeException - Specified by:
visitDecimal38Constant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitDecimal38Constant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitVarDecimalConstant
public LogicalExpression visitVarDecimalConstant(ValueExpressions.VarDecimalExpression decExpr, Void value) throws RuntimeException - Specified by:
visitVarDecimalConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitVarDecimalConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitDateConstant
public LogicalExpression visitDateConstant(ValueExpressions.DateExpression intExpr, Void value) throws RuntimeException - Specified by:
visitDateConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitDateConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitTimeConstant
public LogicalExpression visitTimeConstant(ValueExpressions.TimeExpression intExpr, Void value) throws RuntimeException - Specified by:
visitTimeConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitTimeConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitTimeStampConstant
public LogicalExpression visitTimeStampConstant(ValueExpressions.TimeStampExpression intExpr, Void value) throws RuntimeException - Specified by:
visitTimeStampConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitTimeStampConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitIntervalYearConstant
public LogicalExpression visitIntervalYearConstant(ValueExpressions.IntervalYearExpression intExpr, Void value) throws RuntimeException - Specified by:
visitIntervalYearConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitIntervalYearConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitIntervalDayConstant
public LogicalExpression visitIntervalDayConstant(ValueExpressions.IntervalDayExpression intExpr, Void value) throws RuntimeException - Specified by:
visitIntervalDayConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitIntervalDayConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitDoubleConstant
public LogicalExpression visitDoubleConstant(ValueExpressions.DoubleExpression dExpr, Void value) throws RuntimeException - Specified by:
visitDoubleConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitDoubleConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitBooleanConstant
public LogicalExpression visitBooleanConstant(ValueExpressions.BooleanExpression e, Void value) throws RuntimeException - Specified by:
visitBooleanConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitBooleanConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitQuotedStringConstant
public LogicalExpression visitQuotedStringConstant(ValueExpressions.QuotedString e, Void value) throws RuntimeException - Specified by:
visitQuotedStringConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitQuotedStringConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitCastExpression
- Specified by:
visitCastExpression
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitCastExpression
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitConvertExpression
public LogicalExpression visitConvertExpression(ConvertExpression e, Void value) throws RuntimeException - Specified by:
visitConvertExpression
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitConvertExpression
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitNullConstant
- Specified by:
visitNullConstant
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitNullConstant
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitNullExpression
- Specified by:
visitNullExpression
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitNullExpression
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-
visitUnknown
Description copied from class:AbstractExprVisitor
Handles implementation-specific expressions not known to the visitor structure. Since there are no "visitFoo" methods for these "unknown" expressions, subclassses should use the functionally-equivalentinstanceof
approach to parse out these "unknown" expressions.- Specified by:
visitUnknown
in interfaceExprVisitor<LogicalExpression,
Void, RuntimeException> - Overrides:
visitUnknown
in classAbstractExprVisitor<LogicalExpression,
Void, RuntimeException> - Throws:
RuntimeException
-