GitHub user dongjoon-hyun opened a pull request:

    https://github.com/apache/spark/pull/16281

    [SPARK-18860][SQL] Update Parquet to 1.9.0

    ## What changes were proposed in this pull request?
    
    This PR aims to update Parquet to 1.9.0 and remove the hacks due to Parquet 
1.8.1 limitation.
    
    ```scala
    -  // !! HACK ALERT !!
    -  //
    -  // PARQUET-363 & PARQUET-278: parquet-mr 1.8.1 doesn't allow 
constructing empty GroupType,
    -  // which prevents us to avoid selecting any columns for queries like 
`SELECT COUNT(*) FROM t`.
    -  // This issue has been fixed in parquet-mr 1.8.2-SNAPSHOT.
    -  //
    -  // To workaround this problem, here we first construct a `MessageType` 
with a single dummy
    -  // field, and then remove the field to obtain an empty `MessageType`.
    -  //
    -  // TODO Reverts this change after upgrading parquet-mr to 1.8.2+
       val EMPTY_MESSAGE = Types
           .buildMessage()
    -      .required(PrimitiveType.PrimitiveTypeName.INT32).named("dummy")
           .named(ParquetSchemaConverter.SPARK_PARQUET_SCHEMA_NAME)
    -  EMPTY_MESSAGE.getFields.clear()
    ```
    
    ## How was this patch tested?
    
    Pass the existing tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dongjoon-hyun/spark SPARK-18860

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/16281.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #16281
    
----
commit d947a4cbb53751ee9687ac13e1d79b71b6e9e91d
Author: Dongjoon Hyun <[email protected]>
Date:   2016-12-12T21:26:34Z

    [SPARK-18860][SQL] Update Parquet to 1.9.0

----


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

Reply via email to