Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.4.0
-
None
Description
On JDK15+, lambda and method references are implemented using hidden classes (https://openjdk.org/jeps/371) According to the JEP,
Class::getCanonicalName returns null, indicating the hidden class has no canonical name. (Note that the Class object for an anonymous class in the Java language has the same behavior.)
This means https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala#L53 will always be null.
This can be fixed by replacing `getCanonicalName` with `getName`