Class ExecNodeBase<T>

java.lang.Object
org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase<T>
Type Parameters:
T - The type of the elements that result from this node.
All Implemented Interfaces:
ExecNode<T>, ExecNodeTranslator<T>, FusionCodegenExecNode
Direct Known Subclasses:
BatchExecAdaptiveJoin, BatchExecBoundedStreamScan, BatchExecDynamicFilteringDataCollector, BatchExecExecutionOrderEnforcer, BatchExecGlobalRuntimeFilterBuilder, BatchExecHashAggregate, BatchExecHashJoin, BatchExecHashWindowAggregate, BatchExecInputAdapter, BatchExecLimit, BatchExecLocalRuntimeFilterBuilder, BatchExecMultipleInput, BatchExecNestedLoopJoin, BatchExecOverAggregateBase, BatchExecPythonGroupAggregate, BatchExecPythonGroupWindowAggregate, BatchExecRank, BatchExecRuntimeFilter, BatchExecScriptTransform, BatchExecSort, BatchExecSortAggregate, BatchExecSortLimit, BatchExecSortMergeJoin, BatchExecSortWindowAggregate, CommonExecAsyncCalc, CommonExecCalc, CommonExecCorrelate, CommonExecExchange, CommonExecExpand, CommonExecLegacySink, CommonExecLegacyTableSourceScan, CommonExecLookupJoin, CommonExecMatch, CommonExecPythonCalc, CommonExecPythonCorrelate, CommonExecSink, CommonExecTableSourceScan, CommonExecUnion, CommonExecValues, CommonExecWindowTableFunction, StreamExecAggregateBase, StreamExecChangelogNormalize, StreamExecDataStreamScan, StreamExecDeduplicate, StreamExecDropUpdateBefore, StreamExecGroupTableAggregate, StreamExecIntervalJoin, StreamExecJoin, StreamExecMiniBatchAssigner, StreamExecMultipleInput, StreamExecOverAggregate, StreamExecPythonGroupTableAggregate, StreamExecPythonOverAggregate, StreamExecRank, StreamExecSort, StreamExecTemporalJoin, StreamExecTemporalSort, StreamExecWatermarkAssigner, StreamExecWindowDeduplicate, StreamExecWindowJoin, StreamExecWindowRank

public abstract class ExecNodeBase<T> extends Object implements ExecNode<T>
Base class for ExecNode.
  • Constructor Details

    • ExecNodeBase

      protected ExecNodeBase(int id, ExecNodeContext context, org.apache.flink.configuration.ReadableConfig persistedConfig, List<InputProperty> inputProperties, org.apache.flink.table.types.logical.LogicalType outputType, String description)
  • Method Details

    • getContextFromAnnotation

      protected final ExecNodeContext getContextFromAnnotation()
      Retrieves the default context from the ExecNodeMetadata annotation to be serialized into the JSON plan.
    • getPersistedConfig

      public org.apache.flink.configuration.ReadableConfig getPersistedConfig()
    • getId

      public final int getId()
      Description copied from interface: ExecNode
      The unique ID of the node.
      Specified by:
      getId in interface ExecNode<T>
    • getDescription

      public String getDescription()
      Description copied from interface: ExecNode
      Returns a string which describes this node.
      Specified by:
      getDescription in interface ExecNode<T>
    • getOutputType

      public org.apache.flink.table.types.logical.LogicalType getOutputType()
      Description copied from interface: ExecNode
      Returns the output LogicalType of this node, this type should be consistent with the type parameter ExecNode.

      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.

      Specified by:
      getOutputType in interface ExecNode<T>
    • getInputProperties

      public List<InputProperty> getInputProperties()
      Description copied from interface: ExecNode
      Returns a list of this node's input properties.

      NOTE: If there are no inputs, returns an empty list, not null.

      Specified by:
      getInputProperties in interface ExecNode<T>
      Returns:
      List of this node's input properties.
    • getInputEdges

      public List<ExecEdge> getInputEdges()
      Description copied from interface: ExecNode
      Returns a list of this node's input ExecEdges.

      NOTE: If there are no inputs, returns an empty list, not null.

      Specified by:
      getInputEdges in interface ExecNode<T>
    • setInputEdges

      public void setInputEdges(List<ExecEdge> inputEdges)
      Description copied from interface: ExecNode
      Sets the input ExecEdges which connect this nodes and its input nodes.

      NOTE: If there are no inputs, the given inputEdges should be empty, not null.

      Specified by:
      setInputEdges in interface ExecNode<T>
      Parameters:
      inputEdges - the input ExecEdges.
    • replaceInputEdge

      public void replaceInputEdge(int index, ExecEdge newInputEdge)
      Description copied from interface: ExecNode
      Replaces the ordinalInParentth input edge.
      Specified by:
      replaceInputEdge in interface ExecNode<T>
      Parameters:
      index - Position of the child input edge, 0 is the first.
      newInputEdge - New edge that should be put at position `index`.
    • translateToPlan

      public final org.apache.flink.api.dag.Transformation<T> translateToPlan(org.apache.flink.table.delegation.Planner planner)
      Description copied from interface: ExecNodeTranslator
      Translates this node into a Transformation.

      NOTE: This method should return same translate result if called multiple times.

      Specified by:
      translateToPlan in interface ExecNodeTranslator<T>
      Parameters:
      planner - The Planner of the translated graph.
    • accept

      public void accept(ExecNodeVisitor visitor)
      Description copied from interface: ExecNode
      Accepts a visit from a ExecNodeVisitor.
      Specified by:
      accept in interface ExecNode<T>
      Parameters:
      visitor - ExecNodeVisitor.
    • setCompiled

      public void setCompiled(boolean compiled)
      Description copied from interface: ExecNode
      Declares whether the node has been created as part of a plan compilation. Some translation properties might be impacted by this (e.g. UID generation for transformations).
      Specified by:
      setCompiled in interface ExecNode<T>
    • translateToPlanInternal

      protected abstract org.apache.flink.api.dag.Transformation<T> translateToPlanInternal(PlannerBase planner, ExecNodeConfig config)
      Internal method, translates this node into a Flink operator.
      Parameters:
      planner - The planner.
      config - per-ExecNode configuration that contains the merged configuration from various layers which all the nodes implementing this method should use, instead of retrieving configuration from the planner. For more details check ExecNodeConfig.
    • inputsContainSingleton

      protected boolean inputsContainSingleton()
      Whether singleton distribution is required.
    • getSimplifiedName

      protected String getSimplifiedName()
    • createTransformationUid

      protected String createTransformationUid(String operatorName, ExecNodeConfig config)
    • createTransformationName

      protected String createTransformationName(org.apache.flink.configuration.ReadableConfig config)
    • createTransformationDescription

      protected String createTransformationDescription(org.apache.flink.configuration.ReadableConfig config)
    • createTransformationMeta

      protected TransformationMetadata createTransformationMeta(String operatorName, ExecNodeConfig config)
    • createTransformationMeta

      protected TransformationMetadata createTransformationMeta(String operatorName, String detailName, String simplifiedName, ExecNodeConfig config)
    • createFormattedTransformationDescription

      protected String createFormattedTransformationDescription(String description, org.apache.flink.configuration.ReadableConfig config)
    • createFormattedTransformationName

      protected String createFormattedTransformationName(String detailName, String simplifiedName, org.apache.flink.configuration.ReadableConfig config)
    • getTransformation

      @VisibleForTesting public org.apache.flink.api.dag.Transformation<T> getTransformation()
    • supportFusionCodegen

      public boolean supportFusionCodegen()
      Description copied from interface: FusionCodegenExecNode
      Whether this ExecNode supports OFCG or not.
      Specified by:
      supportFusionCodegen in interface FusionCodegenExecNode
    • translateToFusionCodegenSpec

      public OpFusionCodegenSpecGenerator translateToFusionCodegenSpec(org.apache.flink.table.delegation.Planner planner, CodeGeneratorContext parentCtx)
      Description copied from interface: FusionCodegenExecNode
      Translates this node into a OpFusionCodegenSpecGenerator.

      NOTE: This method should return same spec generator result if called multiple times.

      Specified by:
      translateToFusionCodegenSpec in interface FusionCodegenExecNode
      Parameters:
      planner - The Planner of the translated graph.
      parentCtx - Parent CodeGeneratorContext.
    • translateToFusionCodegenSpecInternal

      protected OpFusionCodegenSpecGenerator translateToFusionCodegenSpecInternal(PlannerBase planner, ExecNodeConfig config, CodeGeneratorContext parentCtx)
      Internal method, translates this node into a operator codegen spec generator.
      Parameters:
      planner - The planner.
      config - per-ExecNode configuration that contains the merged configuration from various layers which all the nodes implementing this method should use, instead of retrieving configuration from the planner. For more details check ExecNodeConfig.