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

    https://github.com/apache/spark/pull/10972#discussion_r51232373
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRelation.scala
 ---
    @@ -799,9 +799,26 @@ private[sql] object ParquetRelation extends Logging {
                   assumeInt96IsTimestamp = assumeInt96IsTimestamp,
                   writeLegacyParquetFormat = writeLegacyParquetFormat)
     
    -          footers.map { footer =>
    -            ParquetRelation.readSchemaFromFooter(footer, converter)
    -          }.reduceLeftOption(_ merge _).iterator
    +          if (footers.isEmpty) {
    +            Iterator.empty
    +          } else {
    +            var mergedSchema = StructType(Nil)
    +            footers.foreach { footer =>
    +              val schema = ParquetRelation.readSchemaFromFooter(footer, 
converter)
    +              try {
    +                mergedSchema = mergedSchema.merge(schema)
    --- End diff --
    
    Yeah you'll right, filter push-down can be affected due to #9940 (which I 
just merged today). Thanks for pointing this out!


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

Reply via email to