Skip to content

Commit cc5669c

Browse files
committed
Adding outputPartitioning to Repartition does not fix the test.
1 parent 2dfc648 commit cc5669c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/basicOperators.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ case class Repartition(numPartitions: Int, shuffle: Boolean, child: SparkPlan)
245245
extends UnaryNode {
246246
override def output: Seq[Attribute] = child.output
247247

248+
override def outputPartitioning: Partitioning = {
249+
if (numPartitions == 1) SinglePartition
250+
else UnknownPartitioning(numPartitions)
251+
}
252+
248253
protected override def doExecute(): RDD[InternalRow] = {
249254
child.execute().map(_.copy()).coalesce(numPartitions, shuffle)
250255
}

0 commit comments

Comments
 (0)