alamb commented on a change in pull request #1346:
URL: https://github.com/apache/arrow-rs/pull/1346#discussion_r820218437
##########
File path: parquet/src/file/metadata.rs
##########
@@ -428,32 +428,21 @@ impl ColumnChunkMetaData {
self.data_page_offset
}
- /// Returns `true` if this column chunk contains a index page, `false`
otherwise.
- pub fn has_index_page(&self) -> bool {
- self.index_page_offset.is_some()
- }
-
/// Returns the offset for the index page.
pub fn index_page_offset(&self) -> Option<i64> {
self.index_page_offset
}
- /// Returns `true` if this column chunk contains a dictionary page,
`false` otherwise.
- pub fn has_dictionary_page(&self) -> bool {
- self.dictionary_page_offset.is_some()
- }
-
/// Returns the offset for the dictionary page, if any.
pub fn dictionary_page_offset(&self) -> Option<i64> {
self.dictionary_page_offset
}
/// Returns the offset and length in bytes of the column chunk within the
file
pub fn byte_range(&self) -> (u64, u64) {
- let col_start = if self.has_dictionary_page() {
- self.dictionary_page_offset().unwrap()
- } else {
- self.data_page_offset()
+ let col_start = match self.dictionary_page_offset() {
Review comment:
It is up to you -- I always like to keep the code clean and small PRs to
make it better are easy to approve and merge 👍
(welcome back BTW 👋 )
--
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]