-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove FromSlice
in favor of From
impl in upstream arrow-rs code
#6587
Conversation
af28e59
to
dd51b75
Compare
f1d68b7
to
2a41306
Compare
As an added bonus for non-nullable primitives this conversion will now be zero-copy |
Since this is an API change I plan to leave it open for at least 24 hours in case anyone else wants to comment |
Hi @alamb,
Now the API is gone, I was wondering if you could advise on alternatives. I can copy the old code back into my code or I can contribute to implement Thank you in advance. |
How about using https://docs.rs/arrow/latest/arrow/array/struct.GenericByteArray.html#method.from_iter_values This works for me: let v = vec![vec![1u8,2,3]];
let lba = LargeBinaryArray::from_iter_values(v); |
Thank you @alamb for the reply. I somehow remembered |
Which issue does this PR close?
Part of #1754 (see #1754 (comment))
Rationale for this change
I am trying to extract
physical_plan
into its own crate to improve modularity and compile times -- FromSlice is currently defined in the core crate and used in physical_planI am also trying to make sure the organization of the DataFusion crate is easier to understand for beginners (to make it easier to start) and thus the more we can rely on existing functionality (rather than something that is DataFusion specific) the better.
What changes are included in this PR?
Remove the DataFusion specific
FromSlice
trait in favor of the arrowFrom
implI also added some more docs in arrow-rs to try and make them easier to use: apache/arrow-rs#4379
Are these changes tested?
Covered by existing tests
Are there any user-facing changes?
from_slice
is no longer available (users should use theFrom
impl in arrow-rs instead)