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


##########
.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:
   This new branch does not honor the script's documented optional install 
directory. With `./install-spark-resources.sh 4.2 /tmp/shims`, the resources 
are installed under the supplied directory but this move still reads from 
`/opt` and fails; use `INSTALL_DIR` for both paths.



##########
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:
   The Spark 4.2 lane intentionally omits Delta because no compatible artifact 
is published, but this new Spark 4.2 generation command still enables 
`-Pdelta`, which selects the placeholder Spark 4.1 Delta coordinates. The 
documented command should not enable that profile.



##########
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:
   Adding this profile/module without updating the developer module maps leaves 
the Spark 4.2 test workflow unusable: `dev/run-scala-test.sh` and 
`dev/bloop-test.sh` cannot resolve `gluten-ut-spark42` because both maps stop 
at spark41, and `dev/format-scala-code.sh` also omits `spark-4.2`. Please add 
the Spark 4.2 entries to those scripts as part of this profile bring-up.



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