tustvold commented on a change in pull request #1469:
URL: https://github.com/apache/arrow-rs/pull/1469#discussion_r836184489
##########
File path: arrow/src/array/equal/utils.rs
##########
@@ -66,7 +66,14 @@ pub(super) fn equal_nulls(
#[inline]
pub(super) fn base_equal(lhs: &ArrayData, rhs: &ArrayData) -> bool {
- lhs.data_type() == rhs.data_type() && lhs.len() == rhs.len()
+ let equal_type = match (lhs.data_type(), rhs.data_type()) {
+ (DataType::Union(l_fields, l_mode), DataType::Union(r_fields, r_mode))
=> {
+ // Defer field datatype check to `union_equal`
Review comment:
The spec describes a union as an ordered sequence of types with names.
My interpretation of this is that the fields are order-sensitive and must be
identical for the types to be the same...
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]