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


##########
gluten-core/src/main/scala/org/apache/spark/util/SparkReflectionUtil.scala:
##########
@@ -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)

Review Comment:
   This still lets other `LinkageError` subclasses escape, despite the probe's 
contract and the PR description treating linkage failures as class-not-present. 
For example, a connector compiled for a newer JVM can throw 
`UnsupportedClassVersionError`, and verifier/API mismatches can throw 
`VerifyError` or `NoSuchMethodError`; these optional dependencies will still 
crash component discovery instead of returning `false`. Catch `LinkageError` 
broadly here so every class that cannot be linked is handled consistently.



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