cloud-fan commented on a change in pull request #26685: [SPARK-30050][SQL]
analyze table and rename table should not erase hive table bucketing info
URL: https://github.com/apache/spark/pull/26685#discussion_r351145023
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala
##########
@@ -537,7 +537,17 @@ private[spark] class HiveExternalCatalog(conf: SparkConf,
hadoopConf: Configurat
rawTable.storage
}
- val newTable = rawTable.copy(
+ // Fills in Hive provider if necessary. Otherwise, `Hive.alterTable` will
overwrite
+ // important table metadata like bucketing when altering table.
+ val tableMeta = rawTable.properties.get(DATASOURCE_PROVIDER) match {
+ // This is a Hive serde table, set its provider.
+ case None if rawTable.tableType != VIEW =>
Review comment:
Does it mean this table is created by Hive?
----------------------------------------------------------------
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]