zhztheplayer commented on code in PR #11805:
URL: https://github.com/apache/gluten/pull/11805#discussion_r3260376937
##########
gluten-ut/spark40/src/test/scala/org/apache/spark/sql/GlutenPlanStabilitySuite.scala:
##########
@@ -16,19 +16,250 @@
*/
package org.apache.spark.sql
+import org.apache.gluten.backendsapi.BackendsApiManager
+
+import org.apache.spark.sql.catalyst.expressions.AttributeSet
import org.apache.spark.sql.catalyst.util.resourceToString
-import org.apache.spark.sql.execution.exchange.ValidateRequirements
+import org.apache.spark.sql.execution._
+import org.apache.spark.sql.execution.exchange.{Exchange, ReusedExchangeExec,
ValidateRequirements}
import org.apache.spark.sql.internal.SQLConf
+import org.apache.spark.util.Utils
+
+import java.io.File
+import java.nio.charset.StandardCharsets
+import java.nio.file.Files
+
+import scala.collection.mutable
/**
* Gluten plan stability suites verify that Gluten-transformed plans satisfy
Spark's distribution
- * and ordering requirements (via ValidateRequirements). Golden file
comparison against vanilla
- * Spark plans is skipped because Gluten intentionally produces different
physical plans using
- * native Transformer operators.
+ * and ordering requirements (via ValidateRequirements) and compare plans
against Gluten-specific
+ * golden files.
+ *
+ * Golden files are stored under:
gluten-ut/sparkXX/src/test/resources/backends-{backendName}/
+ *
tpcds-plan-stability/gluten-approved-plans-{version}/{query}/{simplified,explain}.txt
+ * gluten-tpch-plan-stability/{query}/{simplified,explain}.txt
+ *
+ * To generate or update golden files:
+ * {{{
+ * export SPARK_GENERATE_GOLDEN_FILES=1
+ * export SPARK_ANSI_SQL_MODE=false
+ * export SPARK_TESTING=true
+ * export SPARK_HOME=/opt/shims/spark41/spark_home
Review Comment:
```
export SPARK_HOME=/opt/shims/spark41/spark_home
```
@baibaichen how can we ensure developer to have Spark 4.1 (should it be
4.0?) installed here? This looks to be a very strict condition.
--
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]