I think the idea is enticing, but it comes with some challenges:

1. Rust is strongly typed so when extracting values we would likely need a
`Scalar` type enum or multiple different `value_bool`, `value_u64` type
functions
2. Such access would likely be much slower (though possible more
convenient) as it would dispatch based on type for each row (whereas the
downcast_as pattern does that dispatch once per array)

Andrew

On Wed, Jan 27, 2021 at 6:27 AM Fernando Herrera <
fernando.j.herr...@gmail.com> wrote:

> Hi,
>
> I'm wondering if it has been considered to move the value function that is
> implemented in all the arrays (StringArray, BooleanArray, ListArray, etc)
> as part of the Array trait?
>
> This would help when extracting values from generic arrays that implement
> dyn Array without having to manually downcast the array all the time to
> read a value from the array.
>
> Thanks,
>

Reply via email to