PARQUET-751: Add setRequestedSchema to ParquetFileReader. - #379
Closed
rdblue wants to merge 2 commits into
Closed
Conversation
This fixes a bug introduced by dictionary filters, which reused an existing file reader to avoid opening multiple input streams. Before that commit, a new file reader was opened and passed the projection columns from the read context. The fix is to set the requested schema on the file reader instead of creating a new instance. This also adds a test to ensure that column projection works to catch bugs like this in the future.
Contributor
Author
|
@danielcweeks, could you review this? Thanks! |
|
LGTM, but there are tests failing and it looks like the one you're adding. Running org.apache.parquet.hadoop.TestInputFormatColumnProjection |
This updates the test to only use the Parquet counters, and to not run for Hadoop 1 because it would require more reflection code that isn't worth adding for Hadoop 1.
rdblue
added a commit
to rdblue/parquet-mr
that referenced
this pull request
Jan 6, 2017
This fixes a bug introduced by dictionary filters, which reused an existing file reader to avoid opening multiple input streams. Before that commit, a new file reader was opened and passed the projection columns from the read context. The fix is to set the requested schema on the file reader instead of creating a new instance. This also adds a test to ensure that column projection works to catch bugs like this in the future. Author: Ryan Blue <blue@apache.org> Closes apache#379 from rdblue/PARQUET-751-fix-column-projection and squashes the following commits: 7ea0c16 [Ryan Blue] PARQUET-751: Fix column projection test. 1da507e [Ryan Blue] PARQUET-751: Add setRequestedSchema to ParquetFileReader.
rdblue
added a commit
to rdblue/parquet-mr
that referenced
this pull request
Jan 6, 2017
This fixes a bug introduced by dictionary filters, which reused an existing file reader to avoid opening multiple input streams. Before that commit, a new file reader was opened and passed the projection columns from the read context. The fix is to set the requested schema on the file reader instead of creating a new instance. This also adds a test to ensure that column projection works to catch bugs like this in the future. Author: Ryan Blue <blue@apache.org> Closes apache#379 from rdblue/PARQUET-751-fix-column-projection and squashes the following commits: 7ea0c16 [Ryan Blue] PARQUET-751: Fix column projection test. 1da507e [Ryan Blue] PARQUET-751: Add setRequestedSchema to ParquetFileReader.
rdblue
added a commit
to rdblue/parquet-mr
that referenced
this pull request
Jan 10, 2017
This fixes a bug introduced by dictionary filters, which reused an existing file reader to avoid opening multiple input streams. Before that commit, a new file reader was opened and passed the projection columns from the read context. The fix is to set the requested schema on the file reader instead of creating a new instance. This also adds a test to ensure that column projection works to catch bugs like this in the future. Author: Ryan Blue <blue@apache.org> Closes apache#379 from rdblue/PARQUET-751-fix-column-projection and squashes the following commits: 7ea0c16 [Ryan Blue] PARQUET-751: Fix column projection test. 1da507e [Ryan Blue] PARQUET-751: Add setRequestedSchema to ParquetFileReader.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a bug introduced by dictionary filters, which reused an
existing file reader to avoid opening multiple input streams. Before
that commit, a new file reader was opened and passed the projection
columns from the read context. The fix is to set the requested schema on
the file reader instead of creating a new instance.
This also adds a test to ensure that column projection works to catch
bugs like this in the future.