You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/06/08 04:49:33 UTC

[GitHub] [spark] tanelk commented on a change in pull request #32769: [SPARK-35630][SQL] ExpandExec should not introduce unnecessary exchanges

tanelk commented on a change in pull request #32769:
URL: https://github.com/apache/spark/pull/32769#discussion_r647107606



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##########
@@ -4003,6 +4003,56 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
     }
     checkAnswer(sql(s"select /*+ REPARTITION(3, a) */ a b from values('123') t(a)"), Row("123"))
   }
+
+  test("SPARK-35630: ExpandExec should not introduce unnecessary exchanges") {
+    withTable("test_table") {
+      spark.range(11)
+        .withColumn("group1", $"id" % 2)
+        .withColumn("group2", $"id" % 4)
+        .withColumn("a", $"id" % 3)
+        .withColumn("b", $"id" % 6)
+        .write.saveAsTable("test_table")

Review comment:
       I simplified it even a bit further




-- 
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



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