Skip to content

Commit a69f0d1

Browse files
authored
Remove redundant has_ methods for optional column metadata fields (#1345)
1 parent 4b89f7e commit a69f0d1

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

parquet/src/file/metadata.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -469,35 +469,17 @@ impl ColumnChunkMetaData {
469469
self.statistics.as_ref()
470470
}
471471

472-
/// Returns `true` if this column chunk contains page encoding stats, `false` otherwise.
473-
pub fn has_page_encoding_stats(&self) -> bool {
474-
self.encoding_stats.is_some()
475-
}
476-
477472
/// Returns the offset for the page encoding stats,
478473
/// or `None` if no page encoding stats are available.
479474
pub fn page_encoding_stats(&self) -> Option<&Vec<PageEncodingStats>> {
480475
self.encoding_stats.as_ref()
481476
}
482477

483-
/// Returns `true` if this column chunk contains a bloom filter offset, `false` otherwise.
484-
pub fn has_bloom_filter(&self) -> bool {
485-
self.bloom_filter_offset.is_some()
486-
}
487-
488478
/// Returns the offset for the bloom filter.
489479
pub fn bloom_filter_offset(&self) -> Option<i64> {
490480
self.bloom_filter_offset
491481
}
492482

493-
/// Returns `true` if this column chunk contains a column index, `false` otherwise.
494-
pub fn has_column_index(&self) -> bool {
495-
self.column_index_offset.is_some()
496-
&& self.column_index_length.is_some()
497-
&& self.offset_index_offset.is_some()
498-
&& self.offset_index_length.is_some()
499-
}
500-
501483
/// Returns the offset for the column index.
502484
pub fn column_index_offset(&self) -> Option<i64> {
503485
self.column_index_offset

parquet/src/file/serialized_reader.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,6 @@ mod tests {
773773
assert_eq!(col0_metadata.bloom_filter_offset().unwrap(), 192);
774774

775775
// test page encoding stats
776-
assert!(col0_metadata.has_page_encoding_stats());
777776
let page_encoding_stats =
778777
col0_metadata.page_encoding_stats().unwrap().get(0).unwrap();
779778

@@ -782,7 +781,6 @@ mod tests {
782781
assert_eq!(page_encoding_stats.count, 1);
783782

784783
// test optional column index offset
785-
assert!(col0_metadata.has_column_index());
786784
assert_eq!(col0_metadata.column_index_offset().unwrap(), 156);
787785
assert_eq!(col0_metadata.column_index_length().unwrap(), 25);
788786

0 commit comments

Comments
 (0)