You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
Alter 1. remove it and replaced by num_required_bits
Alter 2: return Some(n) when input > 0 and None when input == 0;
Alter 3: use the std function core::num::log2 which has not been stable yet. https://doc.rust-lang.org/std/primitive.u64.html#method.log2
Alter 4: panic when input == 0 (follow the behavior of num::core::log2)
Alter 5: return 0 when input == 0 (follow the behavior of num::core::log2)
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
https://github.com/apache/arrow-rs/blob/master/parquet/src/util/bit_util.rs#L142-L155
To Reproduce
assert_eq!(log2(0), 0);
Expected behavior
Alter 1. remove it and replaced by
num_required_bits
Alter 2: return
Some(n)
wheninput > 0
andNone
wheninput == 0
;Alter 3: use the std function
core::num::log2
which has not been stable yet. https://doc.rust-lang.org/std/primitive.u64.html#method.log2Alter 4: panic when
input == 0
(follow the behavior ofnum::core::log2
)Alter 5: return
0
wheninput == 0
(follow the behavior ofnum::core::log2
)Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: