yaooqinn commented on code in PR #55901:
URL: https://github.com/apache/spark/pull/55901#discussion_r3252380398


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/physical/partitioning.scala:
##########
@@ -699,6 +705,24 @@ case class PartitioningCollection(partitionings: 
Seq[Partitioning])
     partitionings.map(_.numPartitions).distinct.length == 1,
     s"PartitioningCollection requires all of its partitionings have the same 
numPartitions.")
 

Review Comment:
   Style nit (no need to change): would extracting this block to a `private def 
checkInvariant(): Unit; checkInvariant()` read closer to the other 
`Distribution`/`Partitioning` case-class init blocks in this file (e.g. 
`ClusteredDistribution` L90-94, `OrderedDistribution` L168-172) which use 
single-line `require(...)`? Just a question — current form works.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to