alamb commented on code in PR #4582:
URL: https://github.com/apache/arrow-rs/pull/4582#discussion_r1280455576


##########
arrow-data/src/equal/variable_size.rs:
##########
@@ -59,14 +59,9 @@ pub(super) fn variable_sized_equal<T: ArrowNativeType + 
Integer>(
     let lhs_values = lhs.buffers()[1].as_slice();
     let rhs_values = rhs.buffers()[1].as_slice();
 
-    let lhs_null_count = count_nulls(lhs.nulls(), lhs_start, len);
-    let rhs_null_count = count_nulls(rhs.nulls(), rhs_start, len);
-
-    if lhs_null_count == 0
-        && rhs_null_count == 0
-        && !lhs_values.is_empty()
-        && !rhs_values.is_empty()
-    {
+    // Only checking one null mask here because by the time the control flow 
reaches

Review Comment:
   I double checked this was the case and indeed the call site `equal` checks 
the null count already and then calls `equal_values` which then calls this 
function
   
   
https://github.com/apache/arrow-rs/blob/a5d9118c7b420bb413b642cfc024770e38594aab/arrow-data/src/equal/mod.rs#L170-L175
   
   
   
https://github.com/apache/arrow-rs/blob/a5d9118c7b420bb413b642cfc024770e38594aab/arrow-data/src/equal/mod.rs#L100



-- 
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...@arrow.apache.org

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

Reply via email to