perf(reader): Improve the performance of parquet reader#230
Open
discivigour wants to merge 17 commits intoapache:mainfrom
Open
perf(reader): Improve the performance of parquet reader#230discivigour wants to merge 17 commits intoapache:mainfrom
discivigour wants to merge 17 commits intoapache:mainfrom
Conversation
JingsongLi
reviewed
Apr 9, 2026
| let fetch_bytes = &fetched[idx]; | ||
| let start = (range.start - fetch_range.start) as usize; | ||
| let end = (range.end - fetch_range.start) as usize; | ||
| fetch_bytes.slice(start..end.min(fetch_bytes.len())) |
Contributor
There was a problem hiding this comment.
If the data returned by fetch is not long enough, truncated data will be silently returned here, and downstream may obtain incomplete column chunks, leading to parsing errors or data corruption. Suggest changing it to assert or returning an error, do not silently swallow it.
Contributor
Author
There was a problem hiding this comment.
Good point, I will change it.
JingsongLi
reviewed
Apr 9, 2026
| Ok(ranges | ||
| .iter() | ||
| .map(|range| { | ||
| let idx = fetch_ranges.partition_point(|v| v.start <= range.start) - 1; |
Contributor
There was a problem hiding this comment.
If partition_point returns 0, 0-1 overflow panic will occur here. Although logically fetch_range must cover all original ranges, this is an implicit assumption. It is recommended to add a debug_assert! Or use checked_stub+more explicit error messages
JingsongLi
reviewed
Apr 9, 2026
| /// Default coalesce threshold: 1 MiB. | ||
| const DEFAULT_RANGE_COALESCE_BYTES: u64 = 1024 * 1024; | ||
| /// Default concurrent range fetches. | ||
| const DEFAULT_RANGE_FETCH_CONCURRENCY: usize = 8; |
Contributor
There was a problem hiding this comment.
Same to iceberg, maybe 10?
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.
Purpose
Brief change log
Tests
API and Format
Documentation