public static class Nodes.CoreCompiler extends RelVisitor
Interpreter.CompilerImpl
that knows how to handle the core logical
RelNodes.| Modifier and Type | Field and Description |
|---|---|
protected Interpreter |
interpreter |
protected @Nullable Node |
node |
protected @Nullable RelNode |
rel |
protected @Nullable RelNode |
rootRel |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
combinedRowType(List<RelNode> inputs) |
Scalar |
compile(List<RexNode> nodes,
@Nullable RelDataType inputRowType)
Compiles an expression to an executable form.
|
Context |
createContext() |
void |
enumerable(RelNode rel,
org.apache.calcite.linq4j.Enumerable<Row> rowEnumerable)
Tells the interpreter that a given relational expression wishes to
give its output as an enumerable.
|
DataContext |
getDataContext() |
void |
rewrite(RelNode r)
Fallback rewrite method.
|
Sink |
sink(RelNode rel)
Creates a Sink for a relational expression to write into.
|
Source |
source(RelNode rel,
int ordinal) |
void |
visit(Aggregate agg) |
void |
visit(Bindables.BindableTableScan scan) |
void |
visit(Collect collect) |
void |
visit(Filter filter) |
void |
visit(Join join) |
void |
visit(Match match) |
void |
visit(Project project) |
void |
visit(RelNode p,
int ordinal,
@Nullable RelNode parent)
Visits a node during a traversal.
|
void |
visit(SetOp setOp) |
void |
visit(Sort sort) |
void |
visit(TableFunctionScan functionScan) |
void |
visit(TableScan scan) |
void |
visit(Uncollect uncollect) |
void |
visit(Values value) |
void |
visit(Window window) |
go, replaceRoot@NotOnlyInitialized protected final Interpreter interpreter
protected @Nullable RelNode rootRel
protected @Nullable RelNode rel
protected @Nullable Node node
public void visit(Aggregate agg)
public void visit(Filter filter)
public void visit(Project project)
public void visit(Values value)
public void visit(TableScan scan)
public void visit(Bindables.BindableTableScan scan)
public void visit(TableFunctionScan functionScan)
public void visit(Sort sort)
public void visit(SetOp setOp)
public void visit(Join join)
public void visit(Window window)
public void visit(Match match)
public void visit(Collect collect)
public void visit(Uncollect uncollect)
public void visit(RelNode p, int ordinal, @Nullable RelNode parent)
RelVisitorvisit in class RelVisitorp - Node to visitordinal - Ordinal of node within its parentparent - Parent of the node, or null if it is the root of the
traversalpublic void rewrite(RelNode r)
public Scalar compile(List<RexNode> nodes, @Nullable RelDataType inputRowType)
Compilerpublic RelDataType combinedRowType(List<RelNode> inputs)
combinedRowType in interface Compilerpublic Sink sink(RelNode rel)
CompilerThis method is generally called from the constructor of a Node.
But a constructor could instead call
Compiler.enumerable(RelNode, Enumerable).
public void enumerable(RelNode rel, org.apache.calcite.linq4j.Enumerable<Row> rowEnumerable)
CompilerThis is as opposed to the norm, where a relational expression calls
Compiler.sink(RelNode), then its Node.run() method writes into that
sink.
enumerable in interface Compilerrel - Relational expressionrowEnumerable - Contents of relational expressionpublic Context createContext()
createContext in interface Compilerpublic DataContext getDataContext()
getDataContext in interface CompilerCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.