You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
I want to compare two ArrayRefs (Arc<Array>) with each other
Describe the solution you'd like
Add functions like OP_dyn that did the type dispatch within arrow
So for example, a function like this:
/// Compare the left and right arrays for equality. Returns an error if they are not the exact same typefneq_dyn(left:&dynArray,right:&dynArray) -> result<BooleanArray>{// switch on types and call appropriate eq kernel
...}
and neq_dyn, lt_dyn, etc.
Describe alternatives you've considered
Leave it as is
I took a quick look through the rest of the kernels and most of them either already operate on dyn Array (e.g. cast) or they only logically make sense on certain types of arrays (e.g. the Boolean kernels). Though even for boolean kernels it might be convenient to offer a function that does the downcasting appropriately
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
I want to compare two
ArrayRefs
(Arc<Array>
) with each otherArrow offers compute kernels for primitive (numeric) types(e.g.
eq
), and separate ones for string types (e.g.eq_utf8
).https://docs.rs/arrow/6.0.0/arrow/compute/kernels/comparison/index.html
This means I have to match on the datatype and then dispatch to the appropriate implementation
You can see a bunch of this kind of dispatch (encoded in macros) in Datafusion, for example https://github.com/apache/arrow-datafusion/blob/81fae230b81b97e93bbb95b284cfda6f4d59552e/datafusion/src/physical_plan/expressions/binary.rs#L289-L328
Describe the solution you'd like
Add functions like
OP_dyn
that did the type dispatch within arrowSo for example, a function like this:
and
neq_dyn
,lt_dyn
, etc.Describe alternatives you've considered
Leave it as is
Additional context
See also apache/datafusion#1163 and #842
The text was updated successfully, but these errors were encountered: