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

    https://github.com/apache/spark/pull/7238#discussion_r35087548
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/parquet/newParquet.scala ---
    @@ -407,7 +410,17 @@ private[sql] class ParquetRelation2(
           val filesToTouch =
             if (shouldMergeSchemas) {
               // Also includes summary files, 'cause there might be empty 
partition directories.
    -          (metadataStatuses ++ commonMetadataStatuses ++ 
dataStatuses).toSeq
    +
    +          // If skipMergePartFiles config is true, we assume that all 
part-files are the same for
    +          // their schema with summary files, so we ignore them when 
merging schema.
    +          // If the config is false, which is the default setting, we 
merge all part-files.
    +          val needMerged: Seq[FileStatus] =
    +            if (skipMergePartFiles) {
    +              Seq()
    +            } else {
    +              dataStatuses
    +            }
    +          (metadataStatuses ++ commonMetadataStatuses ++ needMerged).toSeq
    --- End diff --
    
    Summary files are not always available. It's quite possible that 
`metadataStatuses` and `commonMetadataStatuses` are both empty.


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