This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new aa71aea  rename to Bitmap::bit_len (#1242)
aa71aea is described below

commit aa71aeaa3d6f0345690490588640226701e1ac15
Author: Remzi Yang <[email protected]>
AuthorDate: Fri Jan 28 19:43:07 2022 +0800

    rename to Bitmap::bit_len (#1242)
    
    Signed-off-by: remzi <[email protected]>
---
 arrow/src/bitmap.rs                                  | 8 ++++----
 parquet/src/arrow/record_reader/definition_levels.rs | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arrow/src/bitmap.rs b/arrow/src/bitmap.rs
index ea02bf5..6fb721a 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 bc0de14..93de400 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);
     }
 }

Reply via email to