LuciferYang opened a new pull request, #13146:
URL: https://github.com/apache/gluten/pull/13146

   ## What changes are proposed in this pull request?
   
   `SparkReflectionUtil.isClassPresent` is used to detect optional connector 
extensions (Delta, Hudi, Paimon, Iceberg) across the backends. It calls 
`classForName(..., initialize = true)` and only catches 
`ClassNotFoundException`. When such a class is on the classpath but cannot be 
linked — a connector built against a different Spark version with a missing 
supertype, or a failing static initializer — `classForName` throws a 
`LinkageError` (e.g. `NoClassDefFoundError`, `ExceptionInInitializerError`) 
instead. That escapes the probe and crashes component discovery at startup, 
which is exactly the version-skew case the probe exists to tolerate.
   
   This catches `LinkageError` alongside `ClassNotFoundException` and returns 
false, so an unlinkable class reads as "not present" like any other unusable 
optional dependency.
   
   ## How was this patch tested?
   
   New `SparkReflectionUtilSuite`: a present-and-linkable class reads true, an 
absent class reads false, and a present class whose static initializer throws 
(surfacing as a `LinkageError`) now reads false instead of propagating.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Yes. Generated-by: Claude Opus.


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