Class EnumerableRelImplementor
java.lang.Object
org.apache.calcite.adapter.enumerable.JavaRelImplementor
org.apache.calcite.adapter.enumerable.EnumerableRelImplementor
- All Implemented Interfaces:
RelImplementor
Subclass of
RelImplementor
for relational
operators of EnumerableConvention
calling convention.-
Field Summary
Modifier and TypeFieldDescriptionprotected final Function1<String,
RexToLixTranslator.InputGetter> -
Constructor Summary
ConstructorDescriptionEnumerableRelImplementor
(RexBuilder rexBuilder, Map<String, Object> internalParameters) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearCorrelVariable
(String name) Returns the desired SQL conformance.implementRoot
(EnumerableRel rootRel, EnumerableRel.Prefer prefer) void
registerCorrelVariable
(String name, ParameterExpression pe, BlockBuilder corrBlock, PhysType physType) result
(PhysType physType, BlockStatement block) <T> Expression
Stashes a value for the executor.visitChild
(EnumerableRel parent, int ordinal, EnumerableRel child, EnumerableRel.Prefer prefer) Methods inherited from class org.apache.calcite.adapter.enumerable.JavaRelImplementor
getRexBuilder, getRootExpression, getTypeFactory
-
Field Details
-
map
-
allCorrelateVariables
-
-
Constructor Details
-
EnumerableRelImplementor
-
-
Method Details
-
visitChild
public EnumerableRel.Result visitChild(EnumerableRel parent, int ordinal, EnumerableRel child, EnumerableRel.Prefer prefer) -
implementRoot
-
stash
Stashes a value for the executor. Given values are de-duplicated if identical (seeIdentityHashMap
).For instance, to pass
ArrayList
to your method, you can useExpressions.call(method, implementor.stash(arrayList))
.For simple literals (strings, numbers) the result is equivalent to
Expressions.constant(Object, java.lang.reflect.Type)
.Note: the input value is held in memory as long as the statement is alive. If you are using just a subset of its content, consider creating a slimmer holder.
- Type Parameters:
T
- Java class type of the value when it is used- Parameters:
input
- Value to be stashedclazz
- Java class type of the value when it is used- Returns:
- Expression that will represent
input
in runtime
-
registerCorrelVariable
public void registerCorrelVariable(String name, ParameterExpression pe, BlockBuilder corrBlock, PhysType physType) -
clearCorrelVariable
-
getCorrelVariableGetter
-
result
-
getConformance
Description copied from interface:RelImplementor
Returns the desired SQL conformance.
-