peter-toth commented on code in PR #54330:
URL: https://github.com/apache/spark/pull/54330#discussion_r2826758663


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/physical/partitioning.scala:
##########
@@ -346,43 +348,85 @@ case class CoalescedHashPartitioning(from: 
HashPartitioning, partitions: Seq[Coa
 }
 
 /**
- * Represents a partitioning where rows are split across partitions based on 
transforms defined
- * by `expressions`. `partitionValues`, if defined, should contain value of 
partition key(s) in
- * ascending order, after evaluated by the transforms in `expressions`, for 
each input partition.
- * In addition, its length must be the same as the number of Spark partitions 
(and thus is a 1-1
- * mapping), and each row in `partitionValues` must be unique.
+ * Represents a partitioning where rows are split across partitions based on 
transforms defined by
+ * `expressions`. `partitionKeys`, should contain value of partition key(s) in 
ascending order,
+ * after evaluated by the transforms in `expressions`, for each input 
partition.
+ * `partitionKeys` might not be unique when this partitioning is returned from 
a data source, but
+ * the `GroupPartitionsExec` operator can group partitions with the same key 
and so make
+ * `partitionKeys` unique.
  *
- * The `originalPartitionValues`, on the other hand, are partition values from 
the original input
+ * The `originalPartitionKeys`, on the other hand, are partition values from 
the original input

Review Comment:
   I asked Claude to rewrite and clarify the documentation of 
`KeyedPartitioning`: 
https://github.com/apache/spark/pull/54330/commits/d58cafedfd6da01de1a39eb1ac0dc6622f614b21.
 I think its version sounds even better, but let me know.



-- 
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