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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to