arrow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neville Dipale <>
Subject [Discuss] Array Cast Kernels Support Matrix
Date Mon, 04 Mar 2019 18:08:15 GMT
Hi Arrow devs,

I'm currently adding support for casting arrays in Rust, and I'm wondering
what casting operations should be supported, and how. Most operations are
simple, but I have a few questions below.

* Struct to Struct: I am not supporting in Rust as it might not make
sense/be easy to support. Is that fine?

* List of type A to List of type B: does it make sense to support casting
as long as the underlying types can be cast to each other? I'm thinking of
casting a list of u32 to list of i32

* Boolean to Decimal: Apache Impala doesn't support this (
we follow suit here?

* Boolean to Utf8: Impala casts 'true' to '1', what are Arrow
implementations doing? I'll also have a look at the CPP codebase.

* Utf8 to Boolean: Impala disallows this, but a case could be made for
supporting this, with the cast operation being limited to (true/false),
(T/F) and what CSV readers infer to be true or false. This could be useful
when reading CSV files (in Rust)

* Primitive to List: I was thinking of creating a list with 1 value for the
primitive (provided the list type is compatible with the from primitive).
Is this too extreme? We could perhaps leave this out and support it someday
in array operations

With regards to temporal arrays, should casting date and time to primitive
types be supported? The inverse makes sense as I might have an Int32Array
with millisecond values that I want to cast to a Timestamp or a Date32.

If there's interest/benefit in documenting the above for future consistency
among the various languages, I don't mind documenting something in the
coming days/weeks.

Thanks and Regards


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message