Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sunchao committed Aug 7, 2023
1 parent 28d16df commit 0d44668
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ case class HashPartitioning(expressions: Seq[Expression], numPartitions: Int)
* 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 input partitions (and thus is a 1-1
* mapping), and each row in `partitionValues` must be unique.
* mapping). The `partitionValues` may contain duplicated partition values.
*
* For example, if `expressions` is `[years(ts_col)]`, then a valid value of `partitionValues` is
* `[0, 1, 2]`, which represents 3 input partitions with distinct partition values. All rows
Expand Down Expand Up @@ -356,7 +356,7 @@ case class KeyGroupedPartitioning(
override def createShuffleSpec(distribution: ClusteredDistribution): ShuffleSpec =
KeyGroupedShuffleSpec(this, distribution)

def uniquePartitionValues: Seq[InternalRow] = {
lazy val uniquePartitionValues: Seq[InternalRow] = {
partitionValues
.map(InternalRowComparableWrapper(_, expressions))
.distinct
Expand Down

0 comments on commit 0d44668

Please sign in to comment.