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

    https://github.com/apache/spark/pull/14071#discussion_r70017144
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/MetastoreRelation.scala ---
    @@ -162,25 +147,28 @@ private[hive] case class MetastoreRelation(
           tPartition.setTableName(tableName)
           tPartition.setValues(partitionKeys.map(a => p.spec(a.name)).asJava)
     
    -      val sd = new org.apache.hadoop.hive.metastore.api.StorageDescriptor()
    +      val sd = toHiveStorage(p.storage, 
catalogTable.schema.map(toHiveColumn))
           tPartition.setSd(sd)
    -      sd.setCols(catalogTable.schema.map(toHiveColumn).asJava)
    -      p.storage.locationUri.foreach(sd.setLocation)
    -      p.storage.inputFormat.foreach(sd.setInputFormat)
    -      p.storage.outputFormat.foreach(sd.setOutputFormat)
    +      new Partition(hiveQlTable, tPartition)
    +    }
    +  }
     
    -      val serdeInfo = new org.apache.hadoop.hive.metastore.api.SerDeInfo
    -      sd.setSerdeInfo(serdeInfo)
    -      // maps and lists should be set only after all elements are ready 
(see HIVE-7975)
    -      p.storage.serde.foreach(serdeInfo.setSerializationLib)
    +  private def toHiveStorage(storage: CatalogStorageFormat, schema: 
Seq[FieldSchema]) = {
    --- End diff --
    
    This function has a bug, right? `storage` is not being used.


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