spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] cloud-fan commented on a change in pull request #25479: [SPARK-28356][FOLLOWUP] fix case with different pre-shuffle partition numbers
Date Fri, 16 Aug 2019 15:41:25 GMT
cloud-fan commented on a change in pull request #25479: [SPARK-28356][FOLLOWUP] fix case with
different pre-shuffle partition numbers
URL: https://github.com/apache/spark/pull/25479#discussion_r314777873
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/execution/ReduceNumShufflePartitionsSuite.scala
 ##########
 @@ -587,4 +587,22 @@ class ReduceNumShufflePartitionsSuite extends SparkFunSuite with BeforeAndAfterA
     }
     withSparkSession(test, 200, None)
   }
+
+  test("Union two datasets with different pre-shuffle partition number") {
+    val test: SparkSession => Unit = { spark: SparkSession =>
+      val df1 = spark.range(3).join(spark.range(3), "id").toDF()
+      val df2 = spark.range(3).groupBy().sum()
+
+      val resultDf = df1.union(df2)
+
+      checkAnswer(resultDf, Seq((0), (1), (2), (3)).map(i => Row(i)))
 
 Review comment:
   does this fail without the fix?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message