(
lhs: &ArrayData,
rhs: &ArrayData,
lhs_type_ids: &[i8],
rhs_type_ids: &[i8],
lhs_offsets: &[i32],
rhs_offsets: &[i32],
lhs_fields: &UnionFields,
rhs_fields: &UnionFiel
| 22 | |
| 23 | #[allow(clippy::too_many_arguments)] |
| 24 | fn equal_dense( |
| 25 | lhs: &ArrayData, |
| 26 | rhs: &ArrayData, |
| 27 | lhs_type_ids: &[i8], |
| 28 | rhs_type_ids: &[i8], |
| 29 | lhs_offsets: &[i32], |
| 30 | rhs_offsets: &[i32], |
| 31 | lhs_fields: &UnionFields, |
| 32 | rhs_fields: &UnionFields, |
| 33 | ) -> bool { |
| 34 | let offsets = lhs_offsets.iter().zip(rhs_offsets.iter()); |
| 35 | |
| 36 | lhs_type_ids |
| 37 | .iter() |
| 38 | .zip(rhs_type_ids.iter()) |
| 39 | .zip(offsets) |
| 40 | .all(|((l_type_id, r_type_id), (l_offset, r_offset))| { |
| 41 | let lhs_child_index = lhs_fields |
| 42 | .iter() |
| 43 | .position(|(r, _)| r == *l_type_id) |
| 44 | .unwrap(); |
| 45 | let rhs_child_index = rhs_fields |
| 46 | .iter() |
| 47 | .position(|(r, _)| r == *r_type_id) |
| 48 | .unwrap(); |
| 49 | let lhs_values = &lhs.child_data()[lhs_child_index]; |
| 50 | let rhs_values = &rhs.child_data()[rhs_child_index]; |
| 51 | |
| 52 | equal_range( |
| 53 | lhs_values, |
| 54 | rhs_values, |
| 55 | *l_offset as usize, |
| 56 | *r_offset as usize, |
| 57 | 1, |
| 58 | ) |
| 59 | }) |
| 60 | } |
| 61 | |
| 62 | fn equal_sparse( |
| 63 | lhs: &ArrayData, |
no test coverage detected