tustvold commented on code in PR #1589:
URL: https://github.com/apache/arrow-rs/pull/1589#discussion_r853512785


##########
arrow/src/array/equal/mod.rs:
##########
@@ -282,8 +282,7 @@ fn equal_range(
     rhs_start: usize,
     len: usize,
 ) -> bool {
-    utils::base_equal(lhs, rhs)

Review Comment:
   `utils::base_equal` does two things:
   
   1. Compares that the data types are equal
   2. Compares that the lengths are equal
   
   The first is not necessarily correct, as MapArrays are agnostic to field 
names. The second is also not necessarily correct in the presence of non-empty 
null slices. I therefore decided to just remove this and simplify the code. 
   
   Ultimately it isn't clear to me what this check could catch that wouldn't 
represent some violation of a variant somewhere else. If a nested type is 
inconsistent with the length, type, etc... of its parent then you've got UB 
anyway



-- 
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