-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-38124][SS][FOLLOWUP] Add test to harden assumption of SS partitioning requirement #35529
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
Conversation
case x => fail(s"Unexpected partitionIdExpression $x for $hashPartitioning") | ||
} | ||
|
||
// Validate only HashPartitioning (and HashPartitioning in PartitioningCollection) can satisfy |
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.
Covered all subclasses of Partitioning
here, except DataSourcePartitioning
, because DataSourcePartitioning
is not accessible from this unit test.
cc @cloud-fan, @sunchao, @viirya, @HyukjinKwon and @HeartSaVioR, thanks. |
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.
+1 Thanks for the addition of new test!
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.
looks okay
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.
Thanks, LGTM too
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.
LGTM
Thanks! Merging to master. |
Thank you all for review! |
What changes were proposed in this pull request?
This is a followup of #35419 (comment), to add unit test to harden the assumption of SS partitioning and distribution requirement:
HashPartitioning.partitionIdExpression
to be exactly expected formatPartitioning
againstStatefulOpClusteredDistribution
.Also add a minor comment for
StatefulOpClusteredDistribution
, asSinglePartition
can also satisfy the distribution.Why are the changes needed?
Document our assumption of SS in code as unit test.
So next time when we introduce intrusive code change, the unit test can save us by failing loudly.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
The added unit test itself.