viirya commented on a change in pull request #31355: URL: https://github.com/apache/spark/pull/31355#discussion_r565712581
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/connector/distributions/distributions.scala ########## @@ -39,21 +48,29 @@ private[sql] object UnspecifiedDistributionImpl extends UnspecifiedDistribution } private[sql] final case class ClusteredDistributionImpl( - clusteringExprs: Seq[Expression]) extends ClusteredDistribution { + clusteringExprs: Seq[Expression], + numPartitions: Int) extends ClusteredDistribution { override def clustering: Array[Expression] = clusteringExprs.toArray + override def requiredNumPartitions(): Int = numPartitions + override def toString: String = { - s"ClusteredDistribution(${clusteringExprs.map(_.describe).mkString(", ")})" + s"ClusteredDistribution(${clusteringExprs.map(_.describe).mkString(", ")}" + + s" / numPartitions=$numPartitions)" Review comment: Seeing "numPartitions=0" is a bit weird to me. Shall we hide numPartitions info if no requirement? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org