viirya commented on code in PR #324:
URL: https://github.com/apache/datafusion-comet/pull/324#discussion_r1580148098


##########
spark/src/test/scala/org/apache/comet/exec/CometExecSuite.scala:
##########
@@ -62,6 +62,37 @@ class CometExecSuite extends CometTestBase {
     }
   }
 
+  test("CometShuffleExchangeExec logical link should be correct") {
+    withTempView("v") {
+      spark.sparkContext
+        .parallelize((1 to 4).map(i => TestData(i, i.toString)), 2)
+        .toDF("c1", "c2")
+        .createOrReplaceTempView("v")
+
+      withSQLConf(
+        SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "false",
+        CometConf.COMET_COLUMNAR_SHUFFLE_ENABLED.key -> "true") {
+        val df = sql("SELECT * FROM v where c1 = 1 order by c1, c2")
+        val shuffle = find(df.queryExecution.executedPlan) {
+          case _: CometShuffleExchangeExec => true
+          case _ => false
+        }.get.asInstanceOf[CometShuffleExchangeExec]
+        assert(shuffle.logicalLink.isEmpty)
+      }
+
+      withSQLConf(
+        SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "false",
+        CometConf.COMET_COLUMNAR_SHUFFLE_ENABLED.key -> "false") {
+        val df = sql("SELECT * FROM v where c1 = 1 order by c1, c2")
+        val shuffle = find(df.queryExecution.executedPlan) {
+          case _: ShuffleExchangeExec => true
+          case _ => false
+        }.get.asInstanceOf[ShuffleExchangeExec]
+        assert(shuffle.logicalLink.isEmpty)

Review Comment:
   Okay



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

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to