Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/7238#discussion_r35191890
--- 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 --
@liancheng You are right. This is a very dangerous configuration. So it
should be disabled by default and we are very sure that we have Parquet summary
files along with Parquet data before we enable this to use for better
performance.
I was not think about to find out part-files with no summary files along
with and merge them. But it can be useful to deal with the situations you
mentioned, although it should downgrade the performance a bit.
I will try to add this feature and update this PR later.
---
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]