Package org.apache.flink.optimizer.dag
Class BinaryUnionNode
- java.lang.Object
-
- org.apache.flink.optimizer.dag.OptimizerNode
-
- org.apache.flink.optimizer.dag.TwoInputNode
-
- org.apache.flink.optimizer.dag.BinaryUnionNode
-
- All Implemented Interfaces:
EstimateProvider,DumpableNode<OptimizerNode>,org.apache.flink.util.Visitable<OptimizerNode>
public class BinaryUnionNode extends TwoInputNode
The Optimizer representation of a binary Union.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBinaryUnionNode.UnionSemanticProperties-
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.TwoInputNode
input1, input2, keys1, keys2
-
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 Constructor Description BinaryUnionNode(org.apache.flink.api.common.operators.Union<?> union)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOutgoingConnection(DagConnection connection)Adds a new outgoing connection to this node.voidcomputeInterestingPropertiesForInputs(CostEstimator estimator)Tells the node to compute the interesting properties for its inputs.protected voidcomputeOperatorSpecificDefaultEstimates(DataStatistics statistics)voidcomputeOutputEstimates(DataStatistics statistics)Causes this node to compute its output estimates (such as number of rows, size in bytes) based on the inputs and the compiler hints.voidcomputeUnionOfInterestingPropertiesFromSuccessors()Computes all the interesting properties that are relevant to this node.List<PlanNode>getAlternativePlans(CostEstimator estimator)Computes the plan alternatives for this node, an implicitly for all nodes that are children of this node.StringgetOperatorName()Gets the name of this node, which is the name of the function/operator, or data source / data sink.protected List<OperatorDescriptorDual>getPossibleProperties()org.apache.flink.api.common.operators.SemanticPropertiesgetSemanticProperties()protected voidreadStubAnnotations()Reads all stub annotations, i.e.-
Methods inherited from class org.apache.flink.optimizer.dag.TwoInputNode
accept, addLocalCandidates, computeUnclosedBranchStack, getFirstIncomingConnection, getFirstPredecessorNode, getIncomingConnections, getOperator, getSecondIncomingConnection, getSecondPredecessorNode, getSemanticPropertiesForGlobalPropertyFiltering, getSemanticPropertiesForLocalPropertyFiltering, instantiate, placePipelineBreakersIfNecessary, setInput
-
Methods inherited from class org.apache.flink.optimizer.dag.OptimizerNode
addBroadcastConnection, addClosedBranch, addClosedBranches, areBranchCompatible, clearInterestingProperties, computeUnclosedBranchStackForBroadcastInputs, getBranchesForParent, getBroadcastConnectionNames, getBroadcastConnections, getClosedBranchingNodes, getCostWeight, getDumpableInputs, getEstimatedAvgWidthPerOutputRecord, getEstimatedNumRecords, getEstimatedOutputSize, getId, getInterestingProperties, getMaxDepth, getMinimalMemoryAcrossAllSubTasks, getOpenBranches, getOptimizerNode, getOutgoingConnections, getParallelism, getPlanNode, getPredecessors, getUniqueFields, hasUnclosedBranches, haveAllOutputConnectionInterestingProperties, identifyDynamicPath, initId, isBranching, isOnDynamicPath, markAllOutgoingConnectionsAsPipelineBreaking, mergeLists, prunePlanAlternatives, prunePlanAlternativesWithCommonBranching, readUniqueFieldsAnnotation, removeClosedBranches, setBroadcastInputs, setEstimatedNumRecords, setEstimatedOutputSize, setParallelism, toString
-
-
-
-
Method Detail
-
addOutgoingConnection
public void addOutgoingConnection(DagConnection connection)
Description copied from class:OptimizerNodeAdds a new outgoing connection to this node.- Overrides:
addOutgoingConnectionin classOptimizerNode- Parameters:
connection- The connection to add.
-
getOperatorName
public String getOperatorName()
Description copied from class:OptimizerNodeGets the name of this node, which is the name of the function/operator, or data source / data sink.- Specified by:
getOperatorNamein classOptimizerNode- Returns:
- The node name.
-
getPossibleProperties
protected List<OperatorDescriptorDual> getPossibleProperties()
- Specified by:
getPossiblePropertiesin classTwoInputNode
-
computeOperatorSpecificDefaultEstimates
protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics)
- Specified by:
computeOperatorSpecificDefaultEstimatesin classOptimizerNode
-
computeUnionOfInterestingPropertiesFromSuccessors
public void computeUnionOfInterestingPropertiesFromSuccessors()
Description copied from class:OptimizerNodeComputes all the interesting properties that are relevant to this node. The interesting properties are a union of the interesting properties on each outgoing connection. However, if two interesting properties on the outgoing connections overlap, the interesting properties will occur only once in this set. For that, this method deduplicates and merges the interesting properties. This method returns copies of the original interesting properties objects and leaves the original objects, contained by the connections, unchanged.- Overrides:
computeUnionOfInterestingPropertiesFromSuccessorsin 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.- Overrides:
computeInterestingPropertiesForInputsin classTwoInputNode- 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.- Overrides:
getAlternativePlansin classTwoInputNode- Parameters:
estimator- The cost estimator used to estimate the costs of each plan alternative.- Returns:
- A list containing all plan alternatives.
-
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
-
getSemanticProperties
public org.apache.flink.api.common.operators.SemanticProperties getSemanticProperties()
- Overrides:
getSemanticPropertiesin classTwoInputNode
-
computeOutputEstimates
public void computeOutputEstimates(DataStatistics statistics)
Description copied from class:OptimizerNodeCauses this node to compute its output estimates (such as number of rows, size in bytes) based on the inputs and the compiler hints. The compiler hints are instantiated with conservative default values which are used if no other values are provided. Nodes may access the statistics to determine relevant information.- Overrides:
computeOutputEstimatesin classOptimizerNode- Parameters:
statistics- The statistics object which may be accessed to get statistical information. The parameter may be null, if no statistics are available.
-
-