Package org.apache.calcite.interpreter
Interface Compiler
- All Known Implementing Classes:
Nodes.CoreCompiler
public interface Compiler
Context while converting a tree of
RelNode
to a program
that can be run by an Interpreter
.-
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.Creates a Sink for a relational expression to write into.
-
Method Details
-
compile
Compiles an expression to an executable form. -
combinedRowType
-
source
-
sink
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 callenumerable(RelNode, Enumerable)
.- Parameters:
rel
- Relational expression- Returns:
- Sink
-
enumerable
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
sink(RelNode)
, then itsNode.run()
method writes into that sink.- Parameters:
rel
- Relational expressionrowEnumerable
- Contents of relational expression
-
getDataContext
DataContext getDataContext() -
createContext
Context createContext()
-