Github user viirya commented on a diff in the pull request: https://github.com/apache/spark/pull/7238#discussion_r35412702 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/parquet/newParquet.scala --- @@ -345,6 +348,28 @@ private[sql] class ParquetRelation2( // Schema of the whole table, including partition columns. var schema: StructType = _ + def filterDataStatusesWithoutSummaries( + leaves: Seq[FileStatus], + dataStatuses: Seq[FileStatus]): Seq[FileStatus] = { + + // Get the partitions that have summary files + val typeInference = sqlContext.conf.partitionColumnTypeInferenceEnabled() + val summariesPaths = metadataStatuses.map(_.getPath.getParent()) ++ + commonMetadataStatuses.map(_.getPath.getParent()) + val summariesPartitions = PartitioningUtils.parsePartitions(summariesPaths, + PartitioningUtils.DEFAULT_PARTITION_NAME, typeInference).partitions.toSet + + dataStatuses.filterNot { d => + val part = PartitioningUtils.parsePartitions(Seq(d.getPath.getParent()), + PartitioningUtils.DEFAULT_PARTITION_NAME, typeInference) --- End diff -- I updated this part to use all paths to find partitions of part-files.
--- 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