-
Notifications
You must be signed in to change notification settings - Fork 29.2k
[SPARK-56877][SQL] Enforce KeyedPartitioning invariant in PartitioningCollection
#55901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,8 @@ trait ShuffledJoin extends JoinCodegenSupport { | |
|
|
||
| override def outputPartitioning: Partitioning = joinType match { | ||
| case _: InnerLike => | ||
| PartitioningCollection(Seq(left.outputPartitioning, right.outputPartitioning)) | ||
| PartitioningCollection.fromPartitionings( | ||
| Seq(left.outputPartitioning, right.outputPartitioning)) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Techincally, |
||
| case LeftOuter | LeftSingle => left.outputPartitioning | ||
| case RightOuter => right.outputPartitioning | ||
| case FullOuter => UnknownPartitioning(left.outputPartitioning.numPartitions) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit (no need to change): would extracting this block to a
private def checkInvariant(): Unit; checkInvariant()read closer to the otherDistribution/Partitioningcase-class init blocks in this file (e.g.ClusteredDistributionL90-94,OrderedDistributionL168-172) which use single-linerequire(...)? Just a question — current form works.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Extracted in a4329cc.