public class EnumerableRelImplementor extends JavaRelImplementor
RelImplementor
for relational
operators of EnumerableConvention
calling convention.Modifier and Type | Field and Description |
---|---|
protected Function1<String,RexToLixTranslator.InputGetter> |
allCorrelateVariables |
Map<String,Object> |
map |
Constructor and Description |
---|
EnumerableRelImplementor(RexBuilder rexBuilder,
Map<String,Object> internalParameters) |
Modifier and Type | Method and Description |
---|---|
void |
clearCorrelVariable(String name) |
RexToLixTranslator.InputGetter |
getCorrelVariableGetter(String name) |
ClassDeclaration |
implementRoot(EnumerableRel rootRel,
EnumerableRel.Prefer prefer) |
void |
registerCorrelVariable(String name,
ParameterExpression pe,
BlockBuilder corrBlock,
PhysType physType) |
EnumerableRel.Result |
result(PhysType physType,
BlockStatement block) |
<T> Expression |
stash(T input,
Class<? super T> clazz)
Stashes a value for the executor.
|
EnumerableRel.Result |
visitChild(EnumerableRel parent,
int ordinal,
EnumerableRel child,
EnumerableRel.Prefer prefer) |
getRexBuilder, getRootExpression, getTypeFactory
protected final Function1<String,RexToLixTranslator.InputGetter> allCorrelateVariables
public EnumerableRelImplementor(RexBuilder rexBuilder, Map<String,Object> internalParameters)
public EnumerableRel.Result visitChild(EnumerableRel parent, int ordinal, EnumerableRel child, EnumerableRel.Prefer prefer)
public ClassDeclaration implementRoot(EnumerableRel rootRel, EnumerableRel.Prefer prefer)
public <T> Expression stash(T input, Class<? super T> clazz)
IdentityHashMap
).
For instance, to pass ArrayList
to your method, you can use
Expressions.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.
T
- Java class type of the value when it is usedinput
- Value to be stashedclazz
- Java class type of the value when it is usedinput
in runtimepublic void registerCorrelVariable(String name, ParameterExpression pe, BlockBuilder corrBlock, PhysType physType)
public void clearCorrelVariable(String name)
public RexToLixTranslator.InputGetter getCorrelVariableGetter(String name)
public EnumerableRel.Result result(PhysType physType, BlockStatement block)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.