datapythonista opened a new issue, #2696:
URL: https://github.com/apache/arrow-rs/issues/2696
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:
```rust
vec![1, 2, 3].iter().collect::<Int32Array>();
```
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:
```
$ cargo run
Compiling arrow-examples v0.1.0 (/home/mgarcia/src/arrow-examples)
error[E0277]: the trait bound
`arrow::array::array_primitive::NativeAdapter<Int32Type>: From<&{integer}>` is
not satisfied
--> src/main.rs:18:26
|
18 | vec![1, 2, 3].iter().collect::<Int32Array>()
| ^^^^^^^ the trait `From<&{integer}>` is not
implemented for `arrow::array::array_primitive::NativeAdapter<Int32Type>`
|
= help: the following other types implement trait `From<T>`:
<arrow::array::array_primitive::NativeAdapter<Float16Type> as
From<half::binary16::f16>>
<arrow::array::array_primitive::NativeAdapter<Float32Type> as
From<f32>>
<arrow::array::array_primitive::NativeAdapter<Float64Type> as
From<f64>>
<arrow::array::array_primitive::NativeAdapter<Int16Type> as
From<i16>>
<arrow::array::array_primitive::NativeAdapter<Int32Type> as
From<i32>>
<arrow::array::array_primitive::NativeAdapter<Int64Type> as
From<i64>>
<arrow::array::array_primitive::NativeAdapter<Int8Type> as
From<i8>>
<arrow::array::array_primitive::NativeAdapter<T> as
From<&Option<<T as ArrowPrimitiveType>::Native>>>
and 5 others
= note: required because of the requirements on the impl of
`Into<arrow::array::array_primitive::NativeAdapter<Int32Type>>` for `&{integer}`
= note: required because of the requirements on the impl of
`FromIterator<&{integer}>` for `PrimitiveArray<Int32Type>`
note: required by a bound in `collect`
-->
/home/mgarcia/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1788:19
|
1788 | fn collect<B: FromIterator<Self::Item>>(self) -> B
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in
`collect`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `arrow-examples` due to previous error
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]