wankunde commented on code in PR #38495:
URL: https://github.com/apache/spark/pull/38495#discussion_r1023487514


##########
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala:
##########
@@ -722,18 +722,15 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, 
hadoopConf: Configurat
       stats: Option[CatalogStatistics]): Unit = withClient {
     requireTableExists(db, table)
     val rawTable = getRawTable(db, table)

Review Comment:
   If we can call client.getRawHiveTable here, will throw exception 
`java.lang.LinkageError: loader constraint violation: loader (instance of 
sun/misc/Launcher$AppClassLoader) previously initiated loading for a different 
type with name "org/apache/hadoop/hive/ql/metadata/Table"` 
   
   Detail stack:
   ```
   [info] 
org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite *** 
ABORTED *** (18 seconds, 552 milliseconds)
   [info]   java.lang.LinkageError: loader constraint violation: loader 
(instance of sun/misc/Launcher$AppClassLoader) previously initiated loading for 
a different type with name "org/apache/hadoop/hive/ql/metadata/Table"
   [info]   at java.lang.ClassLoader.defineClass1(Native Method)
   [info]   at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
   [info]   at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
   [info]   at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
   [info]   at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
   [info]   at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
   [info]   at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
   [info]   at java.security.AccessController.doPrivileged(Native Method)
   [info]   at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
   [info]   at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
   [info]   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
   [info]   at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
   [info]   at 
org.apache.spark.sql.hive.client.HiveClientImpl$.toHiveTable(HiveClientImpl.scala:1115)
   [info]   at 
org.apache.spark.sql.hive.execution.V1WritesHiveUtils.getDynamicPartitionColumns(V1WritesHiveUtils.scala:51)
   [info]   at 
org.apache.spark.sql.hive.execution.V1WritesHiveUtils.getDynamicPartitionColumns$(V1WritesHiveUtils.scala:43)
   [info]   at 
org.apache.spark.sql.hive.execution.InsertIntoHiveTable.getDynamicPartitionColumns(InsertIntoHiveTable.scala:70)
   [info]   at 
org.apache.spark.sql.hive.execution.InsertIntoHiveTable.partitionColumns$lzycompute(InsertIntoHiveTable.scala:80)
   [info]   at 
org.apache.spark.sql.hive.execution.InsertIntoHiveTable.partitionColumns(InsertIntoHiveTable.scala:79)
   [info]   at 
org.apache.spark.sql.execution.datasources.V1Writes$.org$apache$spark$sql$execution$datasources$V1Writes$$prepareQuery(V1Writes.scala:75)
   [info]   at 
org.apache.spark.sql.execution.datasources.V1Writes$$anonfun$apply$1.applyOrElse(V1Writes.scala:57)
   [info]   at 
org.apache.spark.sql.execution.datasources.V1Writes$$anonfun$apply$1.applyOrElse(V1Writes.scala:55)
   [info]   at 
org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$transformDownWithPruning$1(TreeNode.scala:512)
   [info]   at 
org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:104)
   [info]   at 
org.apache.spark.sql.catalyst.trees.TreeNode.transformDownWithPruning(TreeNode.scala:512)
   [info]   at 
org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.org$apache$spark$sql$catalyst$plans$logical$AnalysisHelper$$super$transformDownWithPruning(LogicalPlan.scala:30)
   [info]   at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.transformDownWithPruning(AnalysisHelper.scala:267)
   [info]   at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.transformDownWithPruning$(AnalysisHelper.scala:263)
   [info]   at 
org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.transformDownWithPruning(LogicalPlan.scala:30)
   [info]   at 
org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.transformDownWithPruning(LogicalPlan.scala:30)
   [info]   at 
org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala:488)
   [info]   at 
org.apache.spark.sql.execution.datasources.V1Writes$.apply(V1Writes.scala:55)
   
   ```
   



-- 
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]

Reply via email to