Package org.apache.calcite.interpreter
Interface Compiler
-
- All Known Implementing Classes:
Interpreter.CompilerImpl
,Nodes.CoreCompiler
public interface Compiler
Context while converting a tree ofRelNode
to a program that can be run by anInterpreter
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RelDataType
combinedRowType(java.util.List<RelNode> inputs)
Scalar
compile(java.util.List<RexNode> nodes, RelDataType inputRowType)
Compiles an expression to an executable form.Context
createContext()
void
enumerable(RelNode rel, Enumerable<Row> rowEnumerable)
Tells the interpreter that a given relational expression wishes to give its output as an enumerable.DataContext
getDataContext()
Sink
sink(RelNode rel)
Creates a Sink for a relational expression to write into.Source
source(RelNode rel, int ordinal)
-
-
-
Method Detail
-
compile
Scalar compile(java.util.List<RexNode> nodes, RelDataType inputRowType)
Compiles an expression to an executable form.
-
combinedRowType
RelDataType combinedRowType(java.util.List<RelNode> inputs)
-
sink
Sink sink(RelNode rel)
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
void enumerable(RelNode rel, Enumerable<Row> rowEnumerable)
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()
-
-