-
Notifications
You must be signed in to change notification settings - Fork 838
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
Implement collect for int values #2696
Comments
The following will work
I think this could be extended to support &i32, etc... by defining |
Thanks a lot for the fast answer @tustvold . I think your first example is what I want. I'm not so familiar with iterators, and similar examples that I saw used |
I had a look, and the code you shared works great for integer, but for a string array seems it fails: vec!["foo", "bar", "foobar"].iter().collect::<StringArray>()
Is this expected? Is there another syntax for this, or it just doesn't work for Thank you!
|
We've not implemented a NativeAdapter for StringArray yet, so you can only collect an iterator of So
Alternatively you can use https://docs.rs/arrow/22.0.0/arrow/array/struct.GenericStringArray.html#method.from_iter_values |
Ah, I see. Thanks a lot for the help. I may give it a try and see if I can implement it. Closing this issue. |
Not sure if this is related to #169.
Maybe I'm missing something, but I guess it'd be nice if the next code worked:
By the error I'm getting, I assume it's just not implemented. If you can confirm that this would be nice to add, I'm happy to give it a try (any hints welcome, I'm not very experienced with rust). This is the error:
The text was updated successfully, but these errors were encountered: