-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Parquet] Minor: Update comments in page decompressor #8764
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -387,8 +387,6 @@ pub(crate) fn decode_page( | |
| can_decompress = header_v2.is_compressed.unwrap_or(true); | ||
| } | ||
|
|
||
| // TODO: page header could be huge because of statistics. We should set a | ||
| // maximum page header size and abort if that is exceeded. | ||
| let buffer = match decompressor { | ||
| Some(decompressor) if can_decompress => { | ||
| let uncompressed_page_size = usize::try_from(page_header.uncompressed_page_size)?; | ||
|
|
@@ -398,6 +396,8 @@ pub(crate) fn decode_page( | |
| let decompressed_size = uncompressed_page_size - offset; | ||
| let mut decompressed = Vec::with_capacity(uncompressed_page_size); | ||
| decompressed.extend_from_slice(&buffer[..offset]); | ||
| // decompressed size of zero corresponds to a page with only null values | ||
| // see https://github.com/apache/parquet-format/blob/master/README.md#data-pages | ||
|
||
| if decompressed_size > 0 { | ||
| let compressed = &buffer[offset..]; | ||
| decompressor.decompress(compressed, &mut decompressed, Some(decompressed_size))?; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.