diff --git a/arrow/src/bitmap.rs b/arrow/src/bitmap.rs index ea02bf50b416..6fb721af66f2 100644 --- a/arrow/src/bitmap.rs +++ b/arrow/src/bitmap.rs @@ -48,7 +48,7 @@ impl Bitmap { } /// Return the length of this Bitmap in bits (not bytes) - pub fn len(&self) -> usize { + pub fn bit_len(&self) -> usize { self.bits.len() * 8 } @@ -121,9 +121,9 @@ mod tests { #[test] fn test_bitmap_length() { - assert_eq!(512, Bitmap::new(63 * 8).len()); - assert_eq!(512, Bitmap::new(64 * 8).len()); - assert_eq!(1024, Bitmap::new(65 * 8).len()); + assert_eq!(512, Bitmap::new(63 * 8).bit_len()); + assert_eq!(512, Bitmap::new(64 * 8).bit_len()); + assert_eq!(1024, Bitmap::new(65 * 8).bit_len()); } #[test] diff --git a/parquet/src/arrow/record_reader/definition_levels.rs b/parquet/src/arrow/record_reader/definition_levels.rs index bc0de1487db2..93de4006c10d 100644 --- a/parquet/src/arrow/record_reader/definition_levels.rs +++ b/parquet/src/arrow/record_reader/definition_levels.rs @@ -411,7 +411,7 @@ mod tests { let bitmap = buffer.split_bitmask(19); // Should have split off 19 records leaving, 81 behind - assert_eq!(bitmap.len(), 3 * 8); // Note: bitmask only tracks bytes not bits + assert_eq!(bitmap.bit_len(), 3 * 8); // Note: bitmask only tracks bytes not bits assert_eq!(buffer.nulls().len(), 81); } }