akshaytayal commented on code in PR #13025:
URL: https://github.com/apache/gluten/pull/13025#discussion_r4043703880


##########
.github/workflows/util/install-spark-resources.sh:
##########
@@ -122,6 +122,12 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
       install_spark "4.1.1" "3" "2.12"
       mv /opt/shims/spark41/spark_home/assembly/target/scala-2.12 
/opt/shims/spark41/spark_home/assembly/target/scala-2.13
       ;;
+  4.2)
+      # Spark-4.x, scala 2.12 // using 2.12 as a hack as 4.2 does not have a 
2.13 suffix
+      cd ${INSTALL_DIR} && \
+      install_spark "4.2.0" "3" "2.12"
+      mv /opt/shims/spark42/spark_home/assembly/target/scala-2.12 
/opt/shims/spark42/spark_home/assembly/target/scala-2.13

Review Comment:
   Fixed in bc93bbe: the Spark 4.2 post-install move now uses ${INSTALL_DIR} 
for both source and destination paths instead of hardcoding /opt, so a custom 
install dir (e.g. /tmp/shims) works.



##########
gluten-ut/pom.xml:
##########
@@ -238,5 +238,11 @@
         <module>spark41</module>
       </modules>
     </profile>
+    <profile>
+      <id>spark-4.2</id>
+      <modules>
+        <module>spark42</module>

Review Comment:
   Fixed in bc93bbe: added the Spark 4.2 entries to the developer module maps — 
spark-sql-columnar-shims-spark42 and gluten-ut-spark42 in dev/run-scala-test.sh 
and dev/bloop-test.sh, and the spark-4.2 profile in dev/format-scala-code.sh.



##########
gluten-ut/spark42/src/test/scala/org/apache/spark/sql/GlutenPlanStabilitySuite.scala:
##########
@@ -0,0 +1,322 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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._
+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) 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/spark42/spark_home
+ *   export SPARK_SCALA_VERSION=2.13
+ *
+ *   # Generate all 7 suites at once (recommended for consistency)
+ *   ./dev/run-scala-test.sh --mvnd --clean \
+ *     -Pjava-17,spark-4.2,scala-2.13,backends-velox,hadoop-3.3,spark-ut,delta 
\

Review Comment:
   Fixed in bc93bbe: removed -Pdelta from the Spark 4.2 golden-file generation 
command in GlutenPlanStabilitySuite, since no compatible Spark 4.2 Delta 
artifact is published.



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