vjovanov opened a new pull request, #45955:
URL: https://github.com/apache/spark/pull/45955
### What changes were proposed in this pull request?
This change make the classes generated by catalyst:
1. Stable across different runs. The generated code does not contain random
numbers that come from lambda-proxy names (`0x<address>`).
2. Uniquely named. The name uniqueness is achieved by adding the hash code
of the generated code to the class name. The generated classes are name
`org.apache.spark.sql.catalyst.expressions.GeneratedClass$<codeHash>` instead
of `org.apache.spark.sql.catalyst.expressions.GeneratedClass`.
### Why are the changes needed?
The changes were needed to allow running Spark SQL workloads on [GraalVM
Native Image](https://www.graalvm.org/).
### Does this PR introduce _any_ user-facing change?
Yes, it removes the random number from the lambda-proxy name in the UDF
failure error message. Before this change:
```
[FAILED_EXECUTE_UDF] Failed to execute user defined function
(QueryExecutionErrorsSuite$$Lambda$970/0x181260145: (string, int) => string).
```
After this change:
```
[FAILED_EXECUTE_UDF] Failed to execute user defined function (nextChar in
QueryExecutionErrorsSuite$$Lambda$970: (string, int) => string).
```
### How was this patch tested?
The test cases for this code path were already introduced in the following
[PR](https://github.com/apache/spark/pull/41599). This PR modifies these tests
to check for the new format.
### Was this patch authored or co-authored using generative AI tooling?
No!
--
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]