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

    https://github.com/apache/spark/pull/17644#discussion_r116432122
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala 
---
    @@ -408,9 +425,9 @@ private[hive] class HiveClientImpl(
             },
             schema = schema,
             partitionColumnNames = partCols.map(_.name),
    -        // We can not populate bucketing information for Hive tables as 
Spark SQL has a different
    -        // implementation of hash function from Hive.
    -        bucketSpec = None,
    +        // For data source tables, we will always overwrite the bucket 
spec in
    --- End diff --
    
    Sorry I made a mistake. This is true even for hive tables.
    
    If the table is written by Spark, we will put bucketing information in 
table properties, and will always overwrite the bucket spec in hive metastore 
by the bucketing information in table properties. This means, if we have bucket 
spec in both hive metastore and table properties, we will trust the one in 
table properties.
    
    let's update this document.


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