This is an automated email from the ASF dual-hosted git repository.
jackylee-ch pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git
The following commit(s) were added to refs/heads/main by this push:
new c54826d546 [MINOR][CORE] Treat linkage failures as class-not-present
in isClassPresent (#13146)
c54826d546 is described below
commit c54826d5460e1d1159729f94ad222a425621f49a
Author: YangJie <[email protected]>
AuthorDate: Sun Oct 11 02:51:07 2026 -0400
[MINOR][CORE] Treat linkage failures as class-not-present in isClassPresent
(#13146)
---
.../scala/org/apache/spark/util/SparkReflectionUtil.scala | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git
a/gluten-core/src/main/scala/org/apache/spark/util/SparkReflectionUtil.scala
b/gluten-core/src/main/scala/org/apache/spark/util/SparkReflectionUtil.scala
index c1c8a85c85..eb3ba19aa3 100644
--- a/gluten-core/src/main/scala/org/apache/spark/util/SparkReflectionUtil.scala
+++ b/gluten-core/src/main/scala/org/apache/spark/util/SparkReflectionUtil.scala
@@ -16,7 +16,9 @@
*/
package org.apache.spark.util
-object SparkReflectionUtil {
+import org.apache.spark.internal.Logging
+
+object SparkReflectionUtil extends Logging {
def getSimpleClassName(cls: Class[_]): String = {
Utils.getSimpleName(cls)
}
@@ -35,6 +37,13 @@ object SparkReflectionUtil {
} catch {
case _: ClassNotFoundException =>
false
+ case e @ (_: NoClassDefFoundError | _: ExceptionInInitializerError) =>
+ // Present but unusable (a version-skewed optional dependency missing
a supertype,
+ // or a failing static initializer): treat as not present, but log the
cause so the
+ // skew is diagnosable. Broader linkage errors (VerifyError,
UnsupportedClassVersionError,
+ // ...) are left to propagate, since they signal a genuinely broken
build.
+ logWarning(s"Class $className is present but could not be linked;
treating it as absent", e)
+ false
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]