jarredhj0214 commented on PR #12015:
URL: https://github.com/apache/gravitino/pull/12015#issuecomment-4978039651
> @jarredhj0214
>
> Have you verified whether the following code works in your environment?
>
> ```java
> try {
> return clazz == null ? doLoadClass(name, resolve) : clazz;
> } catch (ClassNotFoundException e) {
> throw e; // benign miss: keep it cause-less for probe-driven callers
(Janino)
> } catch (Exception e) {
> throw new ClassNotFoundException("Failed to load " + name, e);
> }
> ```
Yes, I verified it with a Paimon 1.4.1 codegen path close to the original
failure.
The verification loads `paimon-bundle-1.4.1.jar` through two isolated
`URLClassLoader` variants and triggers the same codegen path:
`UserDefinedSeqComparator.create(...)`
-> `CodeGenUtils.newRecordComparator(...)`
-> `GeneratedClass.compile(CodeGenUtils.class.getClassLoader())`
-> Paimon's shaded Janino compile.
With the old behavior, where class loading misses are wrapped into a caused
`ClassNotFoundException`, the compile fails with:
```text
ClassNotFoundException: Override
--
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]