This is an automated email from the ASF dual-hosted git repository.
richox pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/auron.git
The following commit(s) were added to refs/heads/master by this push:
new 11164c92 [AURON #1617] Fix NativeConvertersSuite cast trim-disable
test failures (#1618)
11164c92 is described below
commit 11164c92c735dcf0204330a3e33621753005f3e9
Author: Thomas <[email protected]>
AuthorDate: Sat Nov 22 22:29:56 2025 +0800
[AURON #1617] Fix NativeConvertersSuite cast trim-disable test failures
(#1618)
* [AURON #1617] Fix NativeConvertersSuite cast trim-disable test failures
* fix code style
---
.../org/apache/spark/sql/auron/AuronSQLTestHelper.scala | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git
a/spark-extension-shims-spark/src/test/scala/org/apache/spark/sql/auron/AuronSQLTestHelper.scala
b/spark-extension-shims-spark/src/test/scala/org/apache/spark/sql/auron/AuronSQLTestHelper.scala
index f37474a0..45b63c3f 100644
---
a/spark-extension-shims-spark/src/test/scala/org/apache/spark/sql/auron/AuronSQLTestHelper.scala
+++
b/spark-extension-shims-spark/src/test/scala/org/apache/spark/sql/auron/AuronSQLTestHelper.scala
@@ -16,31 +16,27 @@
*/
package org.apache.spark.sql.auron
-import org.apache.spark.SparkEnv
+import org.apache.spark.sql.internal.SQLConf
trait AuronSQLTestHelper {
def withEnvConf(pairs: (String, String)*)(f: => Unit): Unit = {
- val env = SparkEnv.get
- if (env == null) {
- throw new IllegalStateException("SparkEnv is not initialized")
- }
- val conf = env.conf
+ val conf = SQLConf.get
val (keys, values) = pairs.unzip
val currentValues = keys.map { key =>
if (conf.contains(key)) {
- Some(conf.get(key))
+ Some(conf.getConfString(key))
} else {
None
}
}
(keys, values).zipped.foreach { (k, v) =>
- conf.set(k, v)
+ conf.setConfString(k, v)
}
try f
finally {
keys.zip(currentValues).foreach {
- case (key, Some(value)) => conf.set(key, value)
- case (key, None) => conf.remove(key)
+ case (key, Some(value)) => conf.setConfString(key, value)
+ case (key, None) => conf.unsetConf(key)
}
}
}