GitHub user liancheng opened a pull request:
https://github.com/apache/spark/pull/14278
[SPARK-16632][SQL] Use Spark requested schema to guide vectorized Parquet
reader initialization
## What changes were proposed in this pull request?
In `SpecificParquetRecordReaderBase`, which is used by the vectorized
Parquet reader, we convert the Parquet requested schema into a Spark schema to
guide column reader initialization. However, the Parquet requested schema is
tailored from the schema of the physical file being scanned, and may have
inaccurate type information due to bugs of other systems (e.g. HIVE-14294).
On the other hand, we already set the real Spark requested schema into
Hadoop configuration in [`ParquetFileFormat`][1]. This PR simply reads out this
schema to replace the converted one.
## How was this patch tested?
New test case added in `ParquetQuerySuite`.
[1]:
https://github.com/apache/spark/blob/v2.0.0-rc5/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFileFormat.scala#L292-L294
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/liancheng/spark spark-16632-simpler-fix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/14278.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 #14278
----
commit 2ade381403080d1390a34b44366ade05f42f6d4f
Author: Cheng Lian <[email protected]>
Date: 2016-07-20T06:31:10Z
Fixes SPARK-16632
----
---
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]