sandeep-katta opened a new pull request #25542: [SPARK-28840][SQL] conf.getClassLoader in SparkSQLCliDriver should be avoided as it returns the UDFClassLoader which is created by Hive URL: https://github.com/apache/spark/pull/25542 ### What changes were proposed in this pull request? Spark loads the jars to custom class loader which is returned by `getSubmitClassLoader` . [Spark code](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala#L337) **In 1.2.1.spark2 version of Hive** `HiveConf.getClassLoader` returns same the class loader which is set by the spark **In Hive 2.3.5** `HiveConf.getClassLoader` returns the UDFClassLoader which is created by Hive. Because of this spark cannot find the jars as class loader got changed [Hive code](https://github.com/apache/hive/blob/rel/release-2.3.5/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java#L395) ### Why are the changes needed? Before creating `CliSessionState` object save the current class loader object in some reference. After SessionState.start() reset back class Loader to the one which saved earlier. ### Does this PR introduce any user-facing change? No ### How was this patch tested? Added Test case and also Manually tested **Before Fix**  **After Fix  **
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
