SPARK-26560, we ensured that Hive UDF using JAR is executed regardless of current thread context classloader.
Found a potential problem: here we call HiveSimpleUDF.dateType (which is a lazy val), to force to load the class with the corrected class loader.
However, if the expression gets transformed later, which copies HiveSimpleUDF, then calling HiveSimpleUDF.dataType will re-trigger the class loading, and at that time there is no guarantee that the corrected classloader is used.
I think we should materialize the loaded class in HiveSimpleUDF.
This JIRA issue is to track the effort of verifying the potential issue and fixing the issue.