Package org.apache.calcite.interpreter
Class Nodes.CoreCompiler
java.lang.Object
org.apache.calcite.rel.RelVisitor
org.apache.calcite.interpreter.Nodes.CoreCompiler
- All Implemented Interfaces:
Compiler
,ReflectiveVisitor
- Enclosing class:
Nodes
Extension to
Interpreter.CompilerImpl
that knows how to handle the core logical
RelNode
s.-
Field Summary
Modifier and TypeFieldDescriptionprotected final Interpreter
protected @Nullable Node
protected @Nullable RelNode
protected @Nullable RelNode
-
Method Summary
Modifier and TypeMethodDescriptioncombinedRowType
(List<RelNode> inputs) compile
(List<RexNode> nodes, @Nullable RelDataType inputRowType) Compiles an expression to an executable form.void
enumerable
(RelNode rel, Enumerable<Row> rowEnumerable) Tells the interpreter that a given relational expression wishes to give its output as an enumerable.void
Fallback rewrite method.Creates a Sink for a relational expression to write into.void
void
void
void
void
void
void
void
void
void
visit
(TableFunctionScan functionScan) void
void
void
void
void
Visits a node during a traversal.Methods inherited from class org.apache.calcite.rel.RelVisitor
go, replaceRoot
-
Field Details
-
interpreter
-
rootRel
-
rel
-
node
-
-
Method Details
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
Description copied from class:RelVisitor
Visits a node during a traversal.- Overrides:
visit
in classRelVisitor
- Parameters:
p
- Node to visitordinal
- Ordinal of node within its parentparent
- Parent of the node, or null if it is the root of the traversal
-
rewrite
-
compile
Description copied from interface:Compiler
Compiles an expression to an executable form. -
combinedRowType
- Specified by:
combinedRowType
in interfaceCompiler
-
source
-
sink
Description copied from interface:Compiler
Creates a Sink for a relational expression to write into.This method is generally called from the constructor of a
Node
. But a constructor could instead callCompiler.enumerable(RelNode, Enumerable)
. -
enumerable
Description copied from interface:Compiler
Tells the interpreter that a given relational expression wishes to give its output as an enumerable.This is as opposed to the norm, where a relational expression calls
Compiler.sink(RelNode)
, then itsNode.run()
method writes into that sink.- Specified by:
enumerable
in interfaceCompiler
- Parameters:
rel
- Relational expressionrowEnumerable
- Contents of relational expression
-
createContext
- Specified by:
createContext
in interfaceCompiler
-
getDataContext
- Specified by:
getDataContext
in interfaceCompiler
-