cloud-fan commented on a change in pull request #34785:
URL: https://github.com/apache/spark/pull/34785#discussion_r776569528
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala
##########
@@ -1459,15 +1471,10 @@ object RepartitionByExpression {
*/
case class RebalancePartitions(
partitionExpressions: Seq[Expression],
- child: LogicalPlan) extends UnaryNode {
+ child: LogicalPlan) extends UnaryNode with hasPartitionExpressions {
override def maxRows: Option[Long] = child.maxRows
override def output: Seq[Attribute] = child.output
-
- def partitioning: Partitioning = if (partitionExpressions.isEmpty) {
- RoundRobinPartitioning(conf.numShufflePartitions)
- } else {
- HashPartitioning(partitionExpressions, conf.numShufflePartitions)
- }
+ override def optNumPartitions: Option[Int] = Some(conf.numShufflePartitions)
Review comment:
should this be None?
--
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]