Github user brkyvz commented on a diff in the pull request:
https://github.com/apache/spark/pull/19467#discussion_r144335223
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/basicPhysicalOperators.scala
---
@@ -590,10 +590,33 @@ case class CoalesceExec(numPartitions: Int, child:
SparkPlan) extends UnaryExecN
}
protected override def doExecute(): RDD[InternalRow] = {
- child.execute().coalesce(numPartitions, shuffle = false)
+ if (numPartitions == 1 && child.execute().getNumPartitions < 1) {
--- End diff --
the existing tests for the original problem should catch it
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]