wangyum commented on a change in pull request #25775:
[WIP][SPARK-29015][SQL][test-hadoop3.2] fix bug for jdk11, can't use 'add jar'
jar's class as create table serde
URL: https://github.com/apache/spark/pull/25775#discussion_r324626881
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveTableScanExec.scala
##########
@@ -120,7 +121,16 @@ case class HiveTableScanExec(
HiveShim.appendReadColumns(hiveConf, neededColumnIDs, output.map(_.name))
- val deserializer =
tableDesc.getDeserializerClass.getConstructor().newInstance()
+ val currentState = SessionState.get()
+ val deserializer = if (currentState != null) {
+ val originClassLoader = currentState.getConf.getClassLoader
+
currentState.getConf.setClassLoader(sparkSession.sharedState.jarClassLoader)
Review comment:
Another question is why this issue only occurs in JDK 11?
----------------------------------------------------------------
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]