Class RexExecutorImpl

java.lang.Object
org.apache.calcite.rex.RexExecutorImpl
All Implemented Interfaces:
RexExecutor

public class RexExecutorImpl extends Object implements RexExecutor
Evaluates a RexNode expression.

For this impl, all the public methods should be static except that it inherits from RexExecutor. This pretends that other code in the project assumes the executor instance is RexExecutorImpl.

  • Constructor Details

    • RexExecutorImpl

      public RexExecutorImpl(DataContext dataContext)
  • Method Details

    • getExecutable

      public static RexExecutable getExecutable(RexBuilder rexBuilder, List<RexNode> exps, RelDataType rowType)
      Creates an RexExecutable that allows to apply the generated code during query processing (filter, projection).
      Parameters:
      rexBuilder - Rex builder
      exps - Expressions
      rowType - describes the structure of the input row.
    • reduce

      public void reduce(RexBuilder rexBuilder, List<RexNode> constExps, List<RexNode> reducedValues)
      Do constant reduction using generated code.
      Specified by:
      reduce in interface RexExecutor
      Parameters:
      rexBuilder - Rex builder
      constExps - Expressions to be reduced
      reducedValues - List to which reduced expressions are appended