GitHub user liancheng opened a pull request:
https://github.com/apache/spark/pull/11936
[SPARK-14116][SQL][WIP] Implements buildReader() for ORC data source
## What changes were proposed in this pull request?
This PR implements `FileFormat.buildReader()` for our ORC data source. It
also fixed several minor styling issues related to `HadoopFsRelation` planning
code path.
Unlike what we did for Parquet, it's relatively hard to construct a
`RecordReader` directly for ORC. The approach employed by this PR is:
- Create an `OrcNewInputFormat` within the returned builder function
- Set input path to the file path of the input `PartitionedFile`
- Use the created input format instance to generate splits and record
readers
- Build a `RecordReaderIterator` for each reader and then concatenate them
This PR is still in WIP status in the sense that:
- There are still failing test cases for partitioned ORC tables
- `buildReader()` duplicates part of code from `OrcFileScan`, need to clean
it up
## How was this patch tested?
Existing test cases should do the work
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/liancheng/spark
spark-14116-build-reader-for-orc
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/11936.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 #11936
----
commit e219295cc5ab942c45cd0a3e5ccdc5849345a66a
Author: Cheng Lian <[email protected]>
Date: 2016-03-24T15:36:04Z
WIP
----
---
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]