Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support peek_next_page() and skip_next_page in serialized_reader. #2044

Merged
merged 6 commits into from Jul 14, 2022

Conversation

Ted-Jiang
Copy link
Member

Which issue does this PR close?

Closes #2043.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the parquet Changes to the parquet crate label Jul 11, 2022
Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good only some minor nits.

parquet/src/util/page_util.rs Outdated Show resolved Hide resolved
parquet/src/file/serialized_reader.rs Outdated Show resolved Hide resolved
parquet/src/file/serialized_reader.rs Outdated Show resolved Hide resolved
parquet/src/file/serialized_reader.rs Show resolved Hide resolved
parquet/src/file/serialized_reader.rs Outdated Show resolved Hide resolved
// total row count.
num_rows: i64,

//Page offset index.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could have something like

enum SerializedPages<T: Read>
    /// Read entire chunk
    Chunk {
        buf: T,
        total_num_values: i64,
    },
    Pages {
        index: Vec<PageLocation>,
        seen_num_data_pages: usize,
        has_dictionary_page_to_read: bool,
        page_bufs: VecDeque<T>
    }

To make it clear what is present in what mode

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good advice! i will try in this mode.👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix in bd5335f @tustvold PTAL, learn a lot from you 😊

parquet/src/file/serialized_reader.rs Outdated Show resolved Hide resolved
Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com>
@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2022

Codecov Report

Merging #2044 (ff66f20) into master (ca5fe7d) will increase coverage by 0.02%.
The diff coverage is 83.17%.

❗ Current head ff66f20 differs from pull request most recent head 058156c. Consider uploading reports for the commit 058156c to get more accurate results

@@            Coverage Diff             @@
##           master    #2044      +/-   ##
==========================================
+ Coverage   83.54%   83.57%   +0.02%     
==========================================
  Files         222      223       +1     
  Lines       58186    58357     +171     
==========================================
+ Hits        48612    48769     +157     
- Misses       9574     9588      +14     
Impacted Files Coverage Δ
parquet/src/arrow/async_reader.rs 0.00% <0.00%> (ø)
parquet/src/column/page.rs 98.68% <ø> (ø)
parquet/src/util/test_common/page_util.rs 86.73% <0.00%> (ø)
parquet/src/file/metadata.rs 94.70% <66.66%> (-0.69%) ⬇️
arrow/src/ffi.rs 87.52% <72.72%> (+0.34%) ⬆️
parquet/src/file/serialized_reader.rs 93.58% <82.11%> (-1.76%) ⬇️
arrow/src/datatypes/ffi.rs 76.56% <92.85%> (+3.83%) ⬆️
arrow/src/array/array_dictionary.rs 92.09% <100.00%> (+0.03%) ⬆️
arrow/src/compute/kernels/filter.rs 88.08% <100.00%> (+0.03%) ⬆️
parquet/src/column/writer.rs 91.53% <100.00%> (+0.05%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca5fe7d...058156c. Read the comment docs.

@Ted-Jiang Ted-Jiang requested a review from tustvold July 14, 2022 01:58
@@ -481,6 +513,18 @@ pub struct SerializedPageReader<T: Read> {

// Column chunk type.
physical_type: Type,
// //Page offset index.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to remove these lines?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@tustvold tustvold merged commit 5e520bb into apache:master Jul 14, 2022
@ursabot
Copy link

ursabot commented Jul 14, 2022

Benchmark runs are scheduled for baseline = 9116297 and contender = 5e520bb. 5e520bb is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@Ted-Jiang
Copy link
Member Author

Nice 👍

Thanks ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support peek_next_page() and skip_next_page in SerializedPageReader
5 participants