zhztheplayer commented on code in PR #7842:
URL: https://github.com/apache/incubator-gluten/pull/7842#discussion_r1865402232


##########
gluten-substrait/src/test/scala/org/apache/gluten/execution/WholeStageTransformerSuite.scala:
##########
@@ -176,25 +176,39 @@ abstract class WholeStageTransformerSuite
       result
   }
 
+  protected def compareResultsAgainstVanillaSpark(
+      sql: String,
+      compareResult: Boolean = true,
+      customCheck: DataFrame => Unit,
+      noFallBack: Boolean = true,
+      cache: Boolean = false): DataFrame = {
+    compareDfResultsAgainstVanillaSpark(
+      () => spark.sql(sql),
+      compareResult,
+      customCheck,
+      noFallBack,
+      cache)
+  }
+
   /**
    * run a query with native engine as well as vanilla spark then compare the 
result set for
    * correctness check
    */
-  protected def compareResultsAgainstVanillaSpark(
-      sqlStr: String,
+  protected def compareDfResultsAgainstVanillaSpark(
+      dataframe: () => DataFrame,
       compareResult: Boolean = true,
       customCheck: DataFrame => Unit,
       noFallBack: Boolean = true,
       cache: Boolean = false): DataFrame = {
     var expected: Seq[Row] = null
     withSQLConf(vanillaSparkConfs(): _*) {
-      val df = spark.sql(sqlStr)
+      val df = dataframe()
       expected = df.collect()
     }
-    // By default we will fallabck complex type scan but here we should allow
+    // By default, we will fallabck complex type scan but here we should allow

Review Comment:
   fixed



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