Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/7238#discussion_r35085340
--- 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] =
--- End diff --
So, if I understand this correctly, `skipMergePartFiles` is useful when
dealing with partitioned tables, where each partition directory may contain its
own summary files, right? Namely something like this:
```
.
âââ p=1
â  âââ _metadata
â  âââ _common_metadata
â  âââ ...
âââ p=2
âââ _common_metadata
âââ _metadata
âââ ...
```
And for non-partitioned tables, `skipMergePartFiles` essentially disables
`shouldMergeSchemas`, is it correct?
---
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]