cloud-fan commented on a change in pull request #32781:
URL: https://github.com/apache/spark/pull/32781#discussion_r647997967
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala
##########
@@ -712,7 +712,9 @@ abstract class SparkStrategies extends
QueryPlanner[SparkPlan] {
case r: logical.Range =>
execution.RangeExec(r) :: Nil
case r: logical.RepartitionByExpression =>
- val shuffleOrigin = if (r.optNumPartitions.isEmpty) {
+ val shuffleOrigin = if (r.partitionExpressions.isEmpty &&
r.optNumPartitions.isEmpty) {
+ REPARTITION_BY_NONE
+ } else if (r.optNumPartitions.isEmpty) {
REPARTITION
Review comment:
Let's fully adopt the naming suggestion: REPARTITION_BY_COL,
REPARTITION_BY_NUM, REPARTITION_BY_COL_AND_NUM, REPARTITION_BY_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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]