Package org.apache.calcite.rex
Class RexInterpreter
java.lang.Object
org.apache.calcite.rex.RexInterpreter
- All Implemented Interfaces:
RexVisitor<Comparable>
Evaluates
RexNode
expressions.
Caveats:
- It uses interpretation, so it is not very efficient.
- It is intended for testing, so does not cover very many functions and operators. (Feel free to contribute more!)
- It is not well tested.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Comparable
evaluate
(RexNode e, Map<RexNode, Comparable> map) Evaluates an expression in an environment.visitCorrelVariable
(RexCorrelVariable correlVariable) visitDynamicParam
(RexDynamicParam dynamicParam) visitFieldAccess
(RexFieldAccess fieldAccess) visitInputRef
(RexInputRef inputRef) visitLambda
(RexLambda lambda) visitLambdaRef
(RexLambdaRef lambdaRef) visitLiteral
(RexLiteral literal) visitLocalRef
(RexLocalRef localRef) visitPatternFieldRef
(RexPatternFieldRef fieldRef) visitRangeRef
(RexRangeRef rangeRef) visitSubQuery
(RexSubQuery subQuery) visitTableInputRef
(RexTableInputRef fieldRef) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.calcite.rex.RexVisitor
visitEach, visitList, visitList
-
Field Details
-
SUPPORTED_SQL_KIND
-
-
Method Details
-
evaluate
Evaluates an expression in an environment. -
visitInputRef
- Specified by:
visitInputRef
in interfaceRexVisitor<Comparable>
-
visitLocalRef
- Specified by:
visitLocalRef
in interfaceRexVisitor<Comparable>
-
visitLiteral
- Specified by:
visitLiteral
in interfaceRexVisitor<Comparable>
-
visitOver
- Specified by:
visitOver
in interfaceRexVisitor<Comparable>
-
visitCorrelVariable
- Specified by:
visitCorrelVariable
in interfaceRexVisitor<Comparable>
-
visitDynamicParam
- Specified by:
visitDynamicParam
in interfaceRexVisitor<Comparable>
-
visitRangeRef
- Specified by:
visitRangeRef
in interfaceRexVisitor<Comparable>
-
visitFieldAccess
- Specified by:
visitFieldAccess
in interfaceRexVisitor<Comparable>
-
visitSubQuery
- Specified by:
visitSubQuery
in interfaceRexVisitor<Comparable>
-
visitTableInputRef
- Specified by:
visitTableInputRef
in interfaceRexVisitor<Comparable>
-
visitPatternFieldRef
- Specified by:
visitPatternFieldRef
in interfaceRexVisitor<Comparable>
-
visitLambda
- Specified by:
visitLambda
in interfaceRexVisitor<Comparable>
-
visitLambdaRef
- Specified by:
visitLambdaRef
in interfaceRexVisitor<Comparable>
-
visitCall
- Specified by:
visitCall
in interfaceRexVisitor<Comparable>
-