Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In datafusion #6635, we think convert tuple to struct will be helpful to implement multi column In list.
But StructAray is not comparable in arrow-rs since it is nested.
|
if l_t != r_t || l_t.is_nested() { |
|
return Err(ArrowError::InvalidArgumentError(format!( |
|
"Invalid comparison operation: {l_t} {op} {r_t}" |
|
))); |
|
} |
.
Describe the solution you'd like
I don't know if this feature is already implemented in arrow.
In my view, compare PrimitiveArray may be rather different from NestedArray. Take equality of StrutArray as an example, I think it may need those steps:
- check equality of datatype
- check equality of PrimitiveArray for each field
- perform conjunction operation on the results of each field
The process slightly differs from the apply_op process.
|
for bit_idx in 0..64 { |
|
let i = bit_idx + chunk * 64; |
|
packed |= (f(i) as u64) << bit_idx; |
|
} |
Describe alternatives you've considered
Additional context
The equality of other array type may need more further consideration. Like equality for ListArray, shall we considerate out of order between list(which means that whether [[1,2]] and [[2,1]] are equal or not)?
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In datafusion #6635, we think convert tuple to struct will be helpful to implement multi column In list.
But StructAray is not comparable in arrow-rs since it is nested.
arrow-rs/arrow-ord/src/cmp.rs
Lines 201 to 205 in 7e28913
Describe the solution you'd like
I don't know if this feature is already implemented in arrow.
In my view, compare PrimitiveArray may be rather different from NestedArray. Take equality of StrutArray as an example, I think it may need those steps:
The process slightly differs from the
apply_opprocess.arrow-rs/arrow-ord/src/cmp.rs
Lines 361 to 364 in 7e28913
Describe alternatives you've considered
Additional context
The equality of other array type may need more further consideration. Like equality for ListArray, shall we considerate out of order between list(which means that whether [[1,2]] and [[2,1]] are equal or not)?