Ted-Jiang commented on code in PR #2460:
URL: https://github.com/apache/arrow-rs/pull/2460#discussion_r948630306
##########
parquet/src/file/serialized_reader.rs:
##########
@@ -480,13 +480,17 @@ pub(crate) fn decode_page(
Ok(result)
}
+#[allow(clippy::large_enum_variant)]
Review Comment:
without this clippy get
```
error: large size difference between variants
--> parquet/src/file/serialized_reader.rs:484:5
|
484 | / Values {
485 | | /// The current byte offset in the reader
486 | | offset: usize,
487 | |
... |
492 | | next_page_header: Option<PageHeader>,
493 | | },
| |_____^ this variant is 336 bytes
|
= note: `-D clippy::large-enum-variant` implied by `-D warnings`
note: and the second-largest variant is 72 bytes:
--> parquet/src/file/serialized_reader.rs:494:5
```
but i think the 336 is wrong because in `PageHeader`, most of the large arg
are `option`, clippy can not know when running only one is `some` , so i think
remove this check here is reasonable (or wrap 'Box' i think this will
downgrade)🤔
```
pub data_page_header: Option<DataPageHeader>,
pub index_page_header: Option<IndexPageHeader>,
pub dictionary_page_header: Option<DictionaryPageHeader>,
pub data_page_header_v2: Option<DataPageHeaderV2>,
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]