Skip to content

PARQUET-751: Add setRequestedSchema to ParquetFileReader. - #379

Closed
rdblue wants to merge 2 commits into
apache:masterfrom
rdblue:PARQUET-751-fix-column-projection
Closed

PARQUET-751: Add setRequestedSchema to ParquetFileReader.#379
rdblue wants to merge 2 commits into
apache:masterfrom
rdblue:PARQUET-751-fix-column-projection

Conversation

@rdblue

@rdblue rdblue commented Oct 14, 2016

Copy link
Copy Markdown
Contributor

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.

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.
@rdblue

rdblue commented Oct 14, 2016

Copy link
Copy Markdown
Contributor Author

@danielcweeks, could you review this? Thanks!

@danielcweeks

Copy link
Copy Markdown

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.
@asfgit asfgit closed this in ece4b70 Oct 19, 2016
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants