spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liancheng <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-13070][SQL] Better error message when P...
Date Fri, 29 Jan 2016 07:25:08 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message