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

    https://github.com/apache/spark/pull/10498#discussion_r48823466
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala ---
    @@ -240,6 +241,23 @@ private[hive] class HiveMetastoreCatalog(val client: 
ClientInterface, hive: Hive
           }
         }
     
    +    if (userSpecifiedSchema.isDefined && bucketSpec.isDefined) {
    +      val BucketSpec(numBuckets, bucketColumns, sortColumns) = 
bucketSpec.get
    +
    +      tableProperties.put("spark.sql.sources.schema.numBuckets", 
numBuckets.toString)
    +      tableProperties.put("spark.sql.sources.schema.numBucketCols", 
bucketColumns.length.toString)
    +      bucketColumns.zipWithIndex.foreach { case (bucketCol, index) =>
    +        tableProperties.put(s"spark.sql.sources.schema.bucketCol.$index", 
bucketCol)
    +      }
    +
    +      if (sortColumns.isDefined) {
    +        tableProperties.put("spark.sql.sources.schema.numSortCols", 
sortColumns.get.length.toString)
    --- End diff --
    
    I think so. Looks like it's not a problem for partition/bucket/sort 
columns, shall we just use a delimiter and store all column names in one line?


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