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

agrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git


The following commit(s) were added to refs/heads/main by this push:
     new 2cc271c0b Fix clippy warnings (#1606)
2cc271c0b is described below

commit 2cc271c0b8d0d691653d1d84017c877bfe2bb2dc
Author: Kristin Cowalcijk <b...@wherobots.com>
AuthorDate: Thu Apr 3 22:37:07 2025 +0800

    Fix clippy warnings (#1606)
---
 native/core/src/execution/shuffle/row.rs       | 2 +-
 native/spark-expr/src/agg_funcs/correlation.rs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/native/core/src/execution/shuffle/row.rs 
b/native/core/src/execution/shuffle/row.rs
index 3c0a2f74f..6fa6259ef 100644
--- a/native/core/src/execution/shuffle/row.rs
+++ b/native/core/src/execution/shuffle/row.rs
@@ -225,7 +225,7 @@ impl SparkUnsafeRow {
     /// The logic is from Spark `UnsafeRow.calculateBitSetWidthInBytes`.
     #[inline]
     pub const fn get_row_bitset_width(num_fields: usize) -> usize {
-        ((num_fields + 63) / 64) * 8
+        num_fields.div_ceil(64) * 8
     }
 
     pub fn new_with_num_fields(num_fields: usize) -> Self {
diff --git a/native/spark-expr/src/agg_funcs/correlation.rs 
b/native/spark-expr/src/agg_funcs/correlation.rs
index a9f8839d8..ee49bd855 100644
--- a/native/spark-expr/src/agg_funcs/correlation.rs
+++ b/native/spark-expr/src/agg_funcs/correlation.rs
@@ -207,7 +207,7 @@ impl Accumulator for CorrelationAccumulator {
             Arc::clone(&states[5]),
         ];
 
-        if states[0].len() > 0 && states[1].len() > 0 && states[2].len() > 0 {
+        if !states[0].is_empty() && !states[1].is_empty() && 
!states[2].is_empty() {
             self.covar.merge_batch(&states_c)?;
             self.stddev1.merge_batch(&states_s1)?;
             self.stddev2.merge_batch(&states_s2)?;


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

Reply via email to