ExtractJoinWithBuckets Scala Extractor¶
Destructuring BaseJoinExec¶
unapply makes sure that the given SparkPlan is a BaseJoinExec and applicable.
If so, unapply getBucketSpec for the left and right join child operators.
unapply...FIXME
unapply is used when:
- CoalesceBucketsInJoin physical optimization is executed
isApplicable¶
isApplicable is true when the following all hold:
-
The given BaseJoinExec physical operator is either a SortMergeJoinExec or a ShuffledHashJoinExec
-
The
leftside of the join has a FileSourceScanExec operator -
The
rightside of the join has a FileSourceScanExec operator -
satisfiesOutputPartitioning on the leftKeys and the outputPartitioning of the left join operator
-
satisfiesOutputPartitioning on the rightKeys and the outputPartitioning of the right join operator
hasScanOperation¶
hasScanOperation holds true for SparkPlan physical operators that are FileSourceScanExecs (possibly as the children of FilterExecs and ProjectExecs).
satisfiesOutputPartitioning¶
satisfiesOutputPartitioning holds true for HashPartitioning partitionings that match the given join keys (their number and equivalence).
Bucket Spec of FileSourceScanExec Operator¶
getBucketSpec finds the FileSourceScanExec operator (in the given SparkPlan) with a non-empty bucket spec but an empty optionalNumCoalescedBuckets. When found, getBucketSpec returns the non-empty bucket spec.