Class ConstantExpressionIdentifier
java.lang.Object
org.apache.drill.exec.compile.sig.ConstantExpressionIdentifier
- All Implemented Interfaces:
ExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
public class ConstantExpressionIdentifier
extends Object
implements ExprVisitor<Boolean,IdentityHashMap<LogicalExpression,Object>,RuntimeException>
-
Method Summary
Modifier and TypeMethodDescriptionstatic Set<LogicalExpression>
Get a list of expressions that mark boundaries into a constant space.visitBooleanConstant
(ValueExpressions.BooleanExpression e, IdentityHashMap<LogicalExpression, Object> value) visitDateConstant
(ValueExpressions.DateExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) visitDecimal18Constant
(ValueExpressions.Decimal18Expression decExpr, IdentityHashMap<LogicalExpression, Object> value) visitDecimal28Constant
(ValueExpressions.Decimal28Expression decExpr, IdentityHashMap<LogicalExpression, Object> value) visitDecimal38Constant
(ValueExpressions.Decimal38Expression decExpr, IdentityHashMap<LogicalExpression, Object> value) visitDecimal9Constant
(ValueExpressions.Decimal9Expression decExpr, IdentityHashMap<LogicalExpression, Object> value) visitDoubleConstant
(ValueExpressions.DoubleExpression dExpr, IdentityHashMap<LogicalExpression, Object> value) visitFloatConstant
(ValueExpressions.FloatExpression fExpr, IdentityHashMap<LogicalExpression, Object> value) visitFunctionCall
(FunctionCall call, IdentityHashMap<LogicalExpression, Object> value) visitFunctionHolderExpression
(FunctionHolderExpression holder, IdentityHashMap<LogicalExpression, Object> value) visitIfExpression
(IfExpression ifExpr, IdentityHashMap<LogicalExpression, Object> value) visitIntConstant
(ValueExpressions.IntExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) visitIntervalDayConstant
(ValueExpressions.IntervalDayExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) visitIntervalYearConstant
(ValueExpressions.IntervalYearExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) visitLongConstant
(ValueExpressions.LongExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) visitParameter
(ValueExpressions.ParameterExpression e, IdentityHashMap<LogicalExpression, Object> value) visitQuotedStringConstant
(ValueExpressions.QuotedString e, IdentityHashMap<LogicalExpression, Object> value) visitSchemaPath
(SchemaPath path, IdentityHashMap<LogicalExpression, Object> value) visitTimeConstant
(ValueExpressions.TimeExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) visitTimeStampConstant
(ValueExpressions.TimeStampExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) visitVarDecimalConstant
(ValueExpressions.VarDecimalExpression decExpr, IdentityHashMap<LogicalExpression, Object> value)
-
Method Details
-
getConstantExpressionSet
Get a list of expressions that mark boundaries into a constant space.- Parameters:
e
- expression to check for constants- Returns:
- list of expressions that mark boundaries into a constant space
-
visitFunctionCall
public Boolean visitFunctionCall(FunctionCall call, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitFunctionCall
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitFunctionHolderExpression
public Boolean visitFunctionHolderExpression(FunctionHolderExpression holder, IdentityHashMap<LogicalExpression, Object> value) throws RuntimeException- Specified by:
visitFunctionHolderExpression
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException> - Throws:
RuntimeException
-
visitBooleanOperator
public Boolean visitBooleanOperator(BooleanOperator op, IdentityHashMap<LogicalExpression, Object> value) throws RuntimeException- Specified by:
visitBooleanOperator
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException> - Throws:
RuntimeException
-
visitIfExpression
public Boolean visitIfExpression(IfExpression ifExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitIfExpression
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitSchemaPath
- Specified by:
visitSchemaPath
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitIntConstant
public Boolean visitIntConstant(ValueExpressions.IntExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) throws RuntimeException- Specified by:
visitIntConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException> - Throws:
RuntimeException
-
visitFloatConstant
public Boolean visitFloatConstant(ValueExpressions.FloatExpression fExpr, IdentityHashMap<LogicalExpression, Object> value) throws RuntimeException- Specified by:
visitFloatConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException> - Throws:
RuntimeException
-
visitLongConstant
public Boolean visitLongConstant(ValueExpressions.LongExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitLongConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitDateConstant
public Boolean visitDateConstant(ValueExpressions.DateExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitDateConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitDecimal9Constant
public Boolean visitDecimal9Constant(ValueExpressions.Decimal9Expression decExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitDecimal9Constant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitTimeConstant
public Boolean visitTimeConstant(ValueExpressions.TimeExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitTimeConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitDecimal18Constant
public Boolean visitDecimal18Constant(ValueExpressions.Decimal18Expression decExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitDecimal18Constant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitIntervalYearConstant
public Boolean visitIntervalYearConstant(ValueExpressions.IntervalYearExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitIntervalYearConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitDecimal28Constant
public Boolean visitDecimal28Constant(ValueExpressions.Decimal28Expression decExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitDecimal28Constant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitIntervalDayConstant
public Boolean visitIntervalDayConstant(ValueExpressions.IntervalDayExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitIntervalDayConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitTimeStampConstant
public Boolean visitTimeStampConstant(ValueExpressions.TimeStampExpression intExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitTimeStampConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitDecimal38Constant
public Boolean visitDecimal38Constant(ValueExpressions.Decimal38Expression decExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitDecimal38Constant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitVarDecimalConstant
public Boolean visitVarDecimalConstant(ValueExpressions.VarDecimalExpression decExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitVarDecimalConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitDoubleConstant
public Boolean visitDoubleConstant(ValueExpressions.DoubleExpression dExpr, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitDoubleConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitBooleanConstant
public Boolean visitBooleanConstant(ValueExpressions.BooleanExpression e, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitBooleanConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitQuotedStringConstant
public Boolean visitQuotedStringConstant(ValueExpressions.QuotedString e, IdentityHashMap<LogicalExpression, Object> value) - Specified by:
visitQuotedStringConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitCastExpression
public Boolean visitCastExpression(CastExpression e, IdentityHashMap<LogicalExpression, Object> value) throws RuntimeException- Specified by:
visitCastExpression
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException> - Throws:
RuntimeException
-
visitUnknown
- Specified by:
visitUnknown
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException>
-
visitNullConstant
public Boolean visitNullConstant(TypedNullConstant e, IdentityHashMap<LogicalExpression, Object> value) throws RuntimeException- Specified by:
visitNullConstant
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException> - Throws:
RuntimeException
-
visitNullExpression
public Boolean visitNullExpression(NullExpression e, IdentityHashMap<LogicalExpression, Object> value) throws RuntimeException- Specified by:
visitNullExpression
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException> - Throws:
RuntimeException
-
visitConvertExpression
public Boolean visitConvertExpression(ConvertExpression e, IdentityHashMap<LogicalExpression, Object> value) throws RuntimeException- Specified by:
visitConvertExpression
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException> - Throws:
RuntimeException
-
visitAnyValueExpression
public Boolean visitAnyValueExpression(AnyValueExpression e, IdentityHashMap<LogicalExpression, Object> value) throws RuntimeException- Specified by:
visitAnyValueExpression
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException> - Throws:
RuntimeException
-
visitParameter
public Boolean visitParameter(ValueExpressions.ParameterExpression e, IdentityHashMap<LogicalExpression, Object> value) throws RuntimeException- Specified by:
visitParameter
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException> - Throws:
RuntimeException
-
visitTypedFieldExpr
public Boolean visitTypedFieldExpr(TypedFieldExpr e, IdentityHashMap<LogicalExpression, Object> value) throws RuntimeException- Specified by:
visitTypedFieldExpr
in interfaceExprVisitor<Boolean,
IdentityHashMap<LogicalExpression, Object>, RuntimeException> - Throws:
RuntimeException
-