-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support Array
dtype AnyValue Series construction
#12817
Conversation
4f33961
to
4ee2a8e
Compare
@@ -235,6 +235,10 @@ impl Series { | |||
any_values_to_decimal(av, *precision, *scale)?.into_series() | |||
}, | |||
DataType::List(inner) => any_values_to_list(av, inner, strict)?.into_series(), | |||
#[cfg(feature = "dtype-array")] | |||
DataType::Array(inner, size) => any_values_to_list(av, inner, strict)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will allocate list offsets where we don't have to.
We should add a any_values_to_array
. This one can piggy back on any_values to series creation and then store the array in the an arrow fixedsize list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will come back to this; parking in draft for a bit馃憣
4ee2a8e
to
885e1ff
Compare
Array
dtype AnyValue Series constructionArray
dtype AnyValue Series construction
Closes #12719.
Observationally the cast from
List
toArray
is (as expected) extremely cheap (eg: a "with_columns" cast of a 25_000_000 x 4List
col toArray
only takes 0.0096 secs), so this PR seems to be a simple/minimal way to supportArray
AnyValues (absent a dedicated micro-optimised path 馃)This opens up
Array
usage to additional constructors, such aspl.from_dicts
in the linked issue, which otherwise fail.