cloud-fan commented on a change in pull request #33510:
URL: https://github.com/apache/spark/pull/33510#discussion_r747197676



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/TPCDSQueryTestSuite.scala
##########
@@ -131,16 +132,44 @@ class TPCDSQueryTestSuite extends QueryTest with 
TPCDSBase with SQLQueryTestHelp
     }
 
     assertResult(expectedSchema, s"Schema did not match\n$queryString") { 
schema }
-    assertResult(expectedOutput, s"Result did not match\n$queryString") { 
outputString }
+    if (needSort) {
+      val expectSorted = expectedOutput.split("\n").sorted.map(_.trim)
+        .mkString("\n").replaceAll("\\s+$", "")
+      val outputSorted = 
output.sorted.map(_.trim).mkString("\n").replaceAll("\\s+$", "")
+      assertResult(expectSorted, s"Result did not match\n$queryString") { 
outputSorted }
+    } else {
+      assertResult(expectedOutput, s"Result did not match\n$queryString") { 
outputString }
+    }
   }
 
+  val broadcastHashJoinConf = Map(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> 
"10485760")
+
+  val sortMergeJoinConf = Map(
+    SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1",
+    SQLConf.PREFER_SORTMERGEJOIN.key -> "true")
+
+  val shuffleHashJoinConf = Map(
+    SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1",
+    "spark.sql.join.forceApplyShuffledHashJoin" -> "true")
+
+  val shuffleConfSet: Set[Map[String, String]] =
+    Set(broadcastHashJoinConf, sortMergeJoinConf, shuffleHashJoinConf);
+
   if (tpcdsDataPath.nonEmpty) {
     tpcdsQueries.foreach { name =>
       val queryString = resourceToString(s"tpcds/$name.sql",
         classLoader = Thread.currentThread().getContextClassLoader)
       test(name) {
         val goldenFile = new File(s"$baseResourcePath/v1_4", s"$name.sql.out")
-        runQuery(queryString, goldenFile)
+        runQuery(queryString, goldenFile, false)

Review comment:
       SMJ as default SGTM.




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

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