T
- The type of the elements that result from this node.public abstract class ExecNodeBase<T> extends Object implements ExecNode<T>
ExecNode
.FIELD_NAME_DESCRIPTION, FIELD_NAME_ID, FIELD_NAME_INPUT_PROPERTIES, FIELD_NAME_OUTPUT_TYPE
Modifier | Constructor and Description |
---|---|
protected |
ExecNodeBase(int id,
List<InputProperty> inputProperties,
LogicalType outputType,
String description) |
protected |
ExecNodeBase(List<InputProperty> inputProperties,
LogicalType outputType,
String description) |
Modifier and Type | Method and Description |
---|---|
void |
accept(ExecNodeVisitor visitor)
Accepts a visit from a
ExecNodeVisitor . |
String |
getDescription()
Returns a string which describes this node.
|
int |
getId()
Gets the ID of this node.
|
List<ExecEdge> |
getInputEdges()
Returns a list of this node's input
ExecEdge s. |
List<InputProperty> |
getInputProperties()
Returns a list of this node's input properties.
|
static int |
getNewNodeId()
Generate an unique ID for ExecNode.
|
LogicalType |
getOutputType()
Returns the output
LogicalType of this node, this type should be consistent with the
type parameter T . |
protected boolean |
inputsContainSingleton()
Whether there is singleton exchange node as input.
|
void |
replaceInputEdge(int index,
ExecEdge newInputEdge)
Replaces the
ordinalInParent th input edge. |
static void |
resetIdCounter()
Reset the id counter to 0.
|
void |
setInputEdges(List<ExecEdge> inputEdges)
Sets the input
ExecEdge s which connect this nodes and its input nodes. |
Transformation<T> |
translateToPlan(Planner planner)
Translates this node into a
Transformation . |
protected abstract Transformation<T> |
translateToPlanInternal(org.apache.flink.table.planner.delegation.PlannerBase planner)
Internal method, translates this node into a Flink operator.
|
protected ExecNodeBase(int id, List<InputProperty> inputProperties, LogicalType outputType, String description)
protected ExecNodeBase(List<InputProperty> inputProperties, LogicalType outputType, String description)
public static int getNewNodeId()
@VisibleForTesting public static void resetIdCounter()
public final int getId()
ExecNode
public String getDescription()
ExecNode
getDescription
in interface ExecNode<T>
public LogicalType getOutputType()
ExecNode
LogicalType
of this node, this type should be consistent with the
type parameter T
.
Such as, if T is RowData
, the output type should be RowType
. please refer
to the JavaDoc of RowData
for more info about mapping of logical types to internal
data structures.
getOutputType
in interface ExecNode<T>
public List<InputProperty> getInputProperties()
ExecNode
NOTE: If there are no inputs, returns an empty list, not null.
getInputProperties
in interface ExecNode<T>
public List<ExecEdge> getInputEdges()
ExecNode
ExecEdge
s.
NOTE: If there are no inputs, returns an empty list, not null.
getInputEdges
in interface ExecNode<T>
public void setInputEdges(List<ExecEdge> inputEdges)
ExecNode
ExecEdge
s which connect this nodes and its input nodes.
NOTE: If there are no inputs, the given inputEdges should be empty, not null.
setInputEdges
in interface ExecNode<T>
inputEdges
- the input ExecEdge
s.public void replaceInputEdge(int index, ExecEdge newInputEdge)
ExecNode
ordinalInParent
th input edge.replaceInputEdge
in interface ExecNode<T>
index
- Position of the child input edge, 0 is the first.newInputEdge
- New edge that should be put at position `index`.public Transformation<T> translateToPlan(Planner planner)
ExecNodeTranslator
Transformation
.
NOTE: This method should return same translate result if called multiple times.
translateToPlan
in interface ExecNodeTranslator<T>
planner
- The Planner
of the translated Table.protected abstract Transformation<T> translateToPlanInternal(org.apache.flink.table.planner.delegation.PlannerBase planner)
public void accept(ExecNodeVisitor visitor)
ExecNode
ExecNodeVisitor
.protected boolean inputsContainSingleton()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.