Package org.apache.flink.optimizer.dag
Class AbstractPartialSolutionNode
- java.lang.Object
-
- org.apache.flink.optimizer.dag.OptimizerNode
-
- org.apache.flink.optimizer.dag.AbstractPartialSolutionNode
-
- All Implemented Interfaces:
EstimateProvider,DumpableNode<OptimizerNode>,org.apache.flink.util.Visitable<OptimizerNode>
- Direct Known Subclasses:
BulkPartialSolutionNode,SolutionSetNode,WorksetNode
public abstract class AbstractPartialSolutionNode extends OptimizerNode
The optimizer's internal representation of the partial solution that is input to a bulk iteration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.optimizer.dag.OptimizerNode
OptimizerNode.UnclosedBranchDescriptor
-
-
Field Summary
-
Fields inherited from class org.apache.flink.optimizer.dag.OptimizerNode
cachedPlans, closedBranchingNodes, costWeight, estimatedNumRecords, estimatedOutputSize, hereJoinedBranches, id, MAX_DYNAMIC_PATH_COST_WEIGHT, onDynamicPath, openBranches, uniqueFields
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPartialSolutionNode(org.apache.flink.api.common.operators.Operator<?> contract)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaccept(org.apache.flink.util.Visitor<OptimizerNode> visitor)This method implements the visit of a depth-first graph traversing visitor.voidcomputeInterestingPropertiesForInputs(CostEstimator estimator)Tells the node to compute the interesting properties for its inputs.protected voidcomputeOperatorSpecificDefaultEstimates(DataStatistics statistics)protected voidcopyEstimates(OptimizerNode node)List<PlanNode>getAlternativePlans(CostEstimator estimator)Computes the plan alternatives for this node, an implicitly for all nodes that are children of this node.List<DagConnection>getIncomingConnections()Gets all incoming connections of this node.abstract IterationNodegetIterationNode()org.apache.flink.api.common.operators.SemanticPropertiesgetSemanticProperties()voididentifyDynamicPath(int costWeight)booleanisOnDynamicPath()protected voidreadStubAnnotations()Reads all stub annotations, i.e.voidsetInput(Map<org.apache.flink.api.common.operators.Operator<?>,OptimizerNode> contractToNode, org.apache.flink.api.common.ExecutionMode dataExchangeMode)This function connects the predecessors to this operator.-
Methods inherited from class org.apache.flink.optimizer.dag.OptimizerNode
addBroadcastConnection, addClosedBranch, addClosedBranches, addOutgoingConnection, areBranchCompatible, clearInterestingProperties, computeOutputEstimates, computeUnclosedBranchStack, computeUnclosedBranchStackForBroadcastInputs, computeUnionOfInterestingPropertiesFromSuccessors, getBranchesForParent, getBroadcastConnectionNames, getBroadcastConnections, getClosedBranchingNodes, getCostWeight, getDumpableInputs, getEstimatedAvgWidthPerOutputRecord, getEstimatedNumRecords, getEstimatedOutputSize, getId, getInterestingProperties, getMaxDepth, getMinimalMemoryAcrossAllSubTasks, getOpenBranches, getOperator, getOperatorName, getOptimizerNode, getOutgoingConnections, getParallelism, getPlanNode, getPredecessors, getUniqueFields, hasUnclosedBranches, haveAllOutputConnectionInterestingProperties, initId, isBranching, markAllOutgoingConnectionsAsPipelineBreaking, mergeLists, prunePlanAlternatives, prunePlanAlternativesWithCommonBranching, readUniqueFieldsAnnotation, removeClosedBranches, setBroadcastInputs, setEstimatedNumRecords, setEstimatedOutputSize, setParallelism, toString
-
-
-
-
Method Detail
-
copyEstimates
protected void copyEstimates(OptimizerNode node)
-
getIterationNode
public abstract IterationNode getIterationNode()
-
isOnDynamicPath
public boolean isOnDynamicPath()
- Overrides:
isOnDynamicPathin classOptimizerNode
-
identifyDynamicPath
public void identifyDynamicPath(int costWeight)
- Overrides:
identifyDynamicPathin classOptimizerNode
-
getIncomingConnections
public List<DagConnection> getIncomingConnections()
Description copied from class:OptimizerNodeGets all incoming connections of this node. This method needs to be overridden by subclasses to return the children.- Specified by:
getIncomingConnectionsin classOptimizerNode- Returns:
- The list of incoming connections.
-
setInput
public void setInput(Map<org.apache.flink.api.common.operators.Operator<?>,OptimizerNode> contractToNode, org.apache.flink.api.common.ExecutionMode dataExchangeMode)
Description copied from class:OptimizerNodeThis function connects the predecessors to this operator.- Specified by:
setInputin classOptimizerNode- Parameters:
contractToNode- The map from program operators to optimizer nodes.dataExchangeMode- The data exchange mode to use, if the operator does not specify one.
-
computeOperatorSpecificDefaultEstimates
protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics)
- Specified by:
computeOperatorSpecificDefaultEstimatesin classOptimizerNode
-
computeInterestingPropertiesForInputs
public void computeInterestingPropertiesForInputs(CostEstimator estimator)
Description copied from class:OptimizerNodeTells 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:
computeInterestingPropertiesForInputsin classOptimizerNode- Parameters:
estimator- TheCostEstimatorinstance to use for plan cost estimation.
-
getAlternativePlans
public List<PlanNode> getAlternativePlans(CostEstimator estimator)
Description copied from class:OptimizerNodeComputes 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 callgetAlternatives()on its children to get their plan alternatives, and build its own alternatives on top of those.- Specified by:
getAlternativePlansin classOptimizerNode- Parameters:
estimator- The cost estimator used to estimate the costs of each plan alternative.- Returns:
- A list containing all plan alternatives.
-
getSemanticProperties
public org.apache.flink.api.common.operators.SemanticProperties getSemanticProperties()
- Specified by:
getSemanticPropertiesin classOptimizerNode
-
readStubAnnotations
protected void readStubAnnotations()
Description copied from class:OptimizerNodeReads all stub annotations, i.e. which fields remain constant, what cardinality bounds the functions have, which fields remain unique.- Overrides:
readStubAnnotationsin classOptimizerNode
-
accept
public void accept(org.apache.flink.util.Visitor<OptimizerNode> visitor)
Description copied from class:OptimizerNodeThis method implements the visit of a depth-first graph traversing visitor. Implementers must first call thepreVisit()method, then hand the visitor to their children, and finally call thepostVisit()method.- Specified by:
acceptin interfaceorg.apache.flink.util.Visitable<OptimizerNode>- Specified by:
acceptin classOptimizerNode- Parameters:
visitor- The graph traversing visitor.- See Also:
Visitable.accept(org.apache.flink.util.Visitor)
-
-