Class SingleInputNode

    • Field Detail

      • keys

        protected final org.apache.flink.api.common.operators.util.FieldSet keys
    • Constructor Detail

      • SingleInputNode

        protected SingleInputNode​(org.apache.flink.api.common.operators.SingleInputOperator<?,​?,​?> programOperator)
        Creates a new node with a single input for the optimizer plan.
        Parameters:
        programOperator - The PACT that the node represents.
      • SingleInputNode

        protected SingleInputNode​(org.apache.flink.api.common.operators.util.FieldSet keys)
      • SingleInputNode

        protected SingleInputNode()
    • Method Detail

      • getOperator

        public org.apache.flink.api.common.operators.SingleInputOperator<?,​?,​?> getOperator()
        Description copied from class: OptimizerNode
        Gets the operator represented by this optimizer node.
        Overrides:
        getOperator in class OptimizerNode
        Returns:
        This node's operator.
      • getIncomingConnection

        public DagConnection getIncomingConnection()
        Gets the input of this operator.
        Returns:
        The input.
      • setIncomingConnection

        public void setIncomingConnection​(DagConnection inConn)
        Sets the connection through which this node receives its input.
        Parameters:
        inConn - The input connection to set.
      • getPredecessorNode

        public OptimizerNode getPredecessorNode()
        Gets the predecessor of this node.
        Returns:
        The predecessor of this node.
      • getIncomingConnections

        public List<DagConnection> getIncomingConnections()
        Description copied from class: OptimizerNode
        Gets all incoming connections of this node. This method needs to be overridden by subclasses to return the children.
        Specified by:
        getIncomingConnections in class OptimizerNode
        Returns:
        The list of incoming connections.
      • getSemanticProperties

        public org.apache.flink.api.common.operators.SemanticProperties getSemanticProperties()
        Specified by:
        getSemanticProperties in class OptimizerNode
      • getSemanticPropertiesForLocalPropertyFiltering

        protected org.apache.flink.api.common.operators.SemanticProperties getSemanticPropertiesForLocalPropertyFiltering()
      • getSemanticPropertiesForGlobalPropertyFiltering

        protected org.apache.flink.api.common.operators.SemanticProperties getSemanticPropertiesForGlobalPropertyFiltering()
      • setInput

        public void setInput​(Map<org.apache.flink.api.common.operators.Operator<?>,​OptimizerNode> contractToNode,
                             org.apache.flink.api.common.ExecutionMode defaultExchangeMode)
                      throws CompilerException
        Description copied from class: OptimizerNode
        This function connects the predecessors to this operator.
        Specified by:
        setInput in class OptimizerNode
        Parameters:
        contractToNode - The map from program operators to optimizer nodes.
        defaultExchangeMode - The data exchange mode to use, if the operator does not specify one.
        Throws:
        CompilerException
      • computeInterestingPropertiesForInputs

        public void computeInterestingPropertiesForInputs​(CostEstimator estimator)
        Description copied from class: OptimizerNode
        Tells the node to compute the interesting properties for its inputs. The interesting properties for the node itself must have been computed before. The node must then see how many of interesting properties it preserves and add its own.
        Specified by:
        computeInterestingPropertiesForInputs in class OptimizerNode
        Parameters:
        estimator - The CostEstimator instance to use for plan cost estimation.
      • getAlternativePlans

        public List<PlanNode> getAlternativePlans​(CostEstimator estimator)
        Description copied from class: OptimizerNode
        Computes the plan alternatives for this node, an implicitly for all nodes that are children of this node. This method must determine for each alternative the global and local properties and the costs. This method may recursively call getAlternatives() on its children to get their plan alternatives, and build its own alternatives on top of those.
        Specified by:
        getAlternativePlans in class OptimizerNode
        Parameters:
        estimator - The cost estimator used to estimate the costs of each plan alternative.
        Returns:
        A list containing all plan alternatives.
      • computeUnclosedBranchStack

        public void computeUnclosedBranchStack()
        Description copied from class: OptimizerNode
        This method causes the node to compute the description of open branches in its sub-plan. An open branch describes, that a (transitive) child node had multiple outputs, which have not all been re-joined in the sub-plan. This method needs to set the openBranches field to a stack of unclosed branches, the latest one top. A branch is considered closed, if some later node sees all of the branching node's outputs, no matter if there have been more branches to different paths in the meantime.
        Specified by:
        computeUnclosedBranchStack in class OptimizerNode
      • accept

        public void accept​(org.apache.flink.util.Visitor<OptimizerNode> visitor)
        Description copied from class: OptimizerNode
        This method implements the visit of a depth-first graph traversing visitor. Implementers must first call the preVisit() method, then hand the visitor to their children, and finally call the postVisit() method.
        Specified by:
        accept in interface org.apache.flink.util.Visitable<OptimizerNode>
        Specified by:
        accept in class OptimizerNode
        Parameters:
        visitor - The graph traversing visitor.
        See Also:
        Visitable.accept(org.apache.flink.util.Visitor)