tglanz commented on code in PR #1954:
URL: https://github.com/apache/datafusion-comet/pull/1954#discussion_r2184397234


##########
native/spark-expr/src/bloom_filter/spark_bit_array.rs:
##########
@@ -102,8 +101,10 @@ impl SparkBitArray {
     }
 }
 
+/// Returns the number of 64-bit words needed to store a `num_bits`-bits value
+#[inline]
 pub fn num_words(num_bits: i32) -> i32 {
-    bit::ceil(num_bits as usize, 64) as i32
+    ((num_bits as usize) / 64 + ((num_bits % 64 != 0) as usize)) as i32

Review Comment:
   No important reason. It is a duplicate from the core crate which is not a 
dependency. The only use case of the ceil here is for `num_words` so I thought 
it should belong directly there.
   
   Will extract this



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to