cloud-fan commented on code in PR #52153: URL: https://github.com/apache/spark/pull/52153#discussion_r2312797163
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala: ########## @@ -1925,6 +1934,21 @@ object RepartitionByExpression { numPartitions: Int): RepartitionByExpression = { RepartitionByExpression(partitionExpressions, child, Some(numPartitions)) } + + // 4-parameter apply method for backwards compatibility with existing case matches + def apply( + partitionExpressions: Seq[Expression], + child: LogicalPlan, + optNumPartitions: Option[Int], + optAdvisoryPartitionSize: Option[Long]): RepartitionByExpression = { + RepartitionByExpression(partitionExpressions, child, optNumPartitions, + optAdvisoryPartitionSize, directPassthrough = false) + } + + def unapply(r: RepartitionByExpression) Review Comment: it's a bit weird to hide a parameter in `unapply`. -- 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: reviews-unsubscr...@spark.apache.org 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