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

    https://github.com/apache/spark/pull/11891#discussion_r57183266
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala ---
    @@ -439,6 +440,56 @@ private[hive] class HiveMetastoreCatalog(val client: 
HiveClient, hive: HiveConte
         }
       }
     
    +  private def getCached(
    +      tableIdentifier: QualifiedTableName,
    +      metastoreRelation: MetastoreRelation,
    +      schemaInMetastore: StructType,
    +      expectedFileFormat: Class[_ <: FileFormat],
    +      partitionSpecInMetastore: Option[PartitionSpec]): 
Option[LogicalRelation] = {
    +
    +    cachedDataSourceTables.getIfPresent(tableIdentifier) match {
    +      case null => None // Cache miss
    +      case logical @ LogicalRelation(relation: HadoopFsRelation, _, _) =>
    +        val pathsInMetastore = 
metastoreRelation.table.storage.locationUri.toSeq
    +        val cachedRelationFileFormatClass = relation.fileFormat.getClass
    +
    +        expectedFileFormat match {
    +          case `cachedRelationFileFormatClass` =>
    +            // If we have the same paths, same schema, and same partition 
spec,
    +            // we will use the cached relation.
    --- End diff --
    
    And bucketing spec?


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