Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14971#discussion_r95977105
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala 
---
    @@ -427,7 +473,14 @@ private[hive] class HiveClientImpl(
       }
     
       override def alterTable(tableName: String, table: CatalogTable): Unit = 
withHiveState {
    -    val hiveTable = toHiveTable(table)
    +    // 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 hiveSpecificProps = table.ignoredProperties.filter {
    +      case (key, _) => HiveStatisticsProperties.contains(key)
    +    }
    +    val hiveTable = toHiveTable(table.copy(properties = table.properties 
++ hiveSpecificProps))
    --- End diff --
    
    `table.properties ++ hiveSpecificProps`, by doing this, we won't respect 
user-specified Hive-specific properties, which are in `table.properties`.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to