public class EnumerableRelImplementor extends JavaRelImplementor
RelImplementor for relational
operators of EnumerableConvention calling convention.| Modifier and Type | Class and Description |
|---|---|
private static class |
EnumerableRelImplementor.TypeFinder
Visitor that finds types in an
Expression tree. |
private class |
EnumerableRelImplementor.TypeRegistrar
Adds a declaration of each synthetic type found in a code block.
|
| Modifier and Type | Field and Description |
|---|---|
protected Function1<String,RexToLixTranslator.InputGetter> |
allCorrelateVariables |
private Map<String,RexToLixTranslator.InputGetter> |
corrVars |
Map<String,Object> |
map |
private Map<Object,ParameterExpression> |
stashedParameters |
(package private) int |
windowCount |
| Constructor and Description |
|---|
EnumerableRelImplementor(RexBuilder rexBuilder,
Map<String,Object> internalParameters) |
| Modifier and Type | Method and Description |
|---|---|
private ClassDeclaration |
classDecl(JavaTypeFactoryImpl.SyntheticRecordType type) |
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, getTypeFactoryprivate final Map<String,RexToLixTranslator.InputGetter> corrVars
private final Map<Object,ParameterExpression> stashedParameters
int windowCount
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)
private ClassDeclaration classDecl(JavaTypeFactoryImpl.SyntheticRecordType type)
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.