Github user jiangxb1987 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19104#discussion_r136644218
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala 
---
    @@ -495,15 +495,18 @@ private[hive] class HiveClientImpl(
         shim.dropTable(client, dbName, tableName, true, ignoreIfNotExists, 
purge)
       }
     
    -  override def alterTable(tableName: String, table: CatalogTable): Unit = 
withHiveState {
    +  override def alterTable(
    +      dbName: String,
    +      tableName: String,
    +      table: CatalogTable): Unit = withHiveState {
         // getTableOption removes all the Hive-specific properties. Here, we 
fill them back to ensure
         // these properties are still available to the others that share the 
same Hive metastore.
         // If users explicitly alter these Hive-specific properties through 
ALTER TABLE DDL, we respect
         // these user-specified values.
         val hiveTable = toHiveTable(
           table.copy(properties = table.ignoredProperties ++ 
table.properties), Some(userName))
         // Do not use `table.qualifiedName` here because this may be a rename
    -    val qualifiedTableName = s"${table.database}.$tableName"
    +    val qualifiedTableName = s"$dbName.$tableName"
    --- End diff --
    
    Should we add comment to explain this change?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to