Jefffrey commented on PR #10400:
URL: https://github.com/apache/arrow-rs/pull/10400#issuecomment-5034319656
i'm not sure about this; on main this test compiles fine:
```rust
#[test]
fn test123() {
let _ = create_array!(Binary, [&[0], &[1]]);
}
```
however with the changes of this PR i get a compile error:
```sh
arrow-rs (tpt/create_array_binary)$ cargo test -p arrow-array
Compiling arrow-array v59.1.0 (/Users/jeffrey/Code/arrow-rs/arrow-array)
error[E0277]: the trait bound
`byte_array::GenericByteArray<types::GenericBinaryType<i32>>:
From<Vec<&[{integer}; 1]>>` is not satisfied
--> arrow-array/src/record_batch.rs:130:30
|
130 | std::sync::Arc::new(<$crate::create_array!(@from
$ty)>::from(vec![$($values),*]))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unsatisfied trait bound
...
1784 | let _ = create_array!(Binary, [&[0], &[1]]);
| ----------------------------------- in this macro
invocation
|
help: the trait `From<Vec<&[{integer}; 1]>>` is not implemented for
`byte_array::GenericByteArray<types::GenericBinaryType<i32>>`
--> arrow-array/src/array/byte_array.rs:87:1
|
87 | pub struct GenericByteArray<T: ByteArrayType> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: the following other types implement trait `From<T>`:
`byte_array::GenericByteArray<T>` implements
`From<arrow_data::ArrayData>`
`byte_array::GenericByteArray<types::GenericBinaryType<OffsetSize>>` implements
`From<Vec<&[u8]>>`
`byte_array::GenericByteArray<types::GenericBinaryType<OffsetSize>>` implements
`From<Vec<Option<&[u8]>>>`
`byte_array::GenericByteArray<types::GenericBinaryType<OffsetSize>>` implements
`From<byte_array::GenericByteArray<types::GenericStringType<OffsetSize>>>`
`byte_array::GenericByteArray<types::GenericBinaryType<T>>`
implements `From<list_array::GenericListArray<T>>`
`byte_array::GenericByteArray<types::GenericStringType<OffsetSize>>` implements
`From<Vec<&str>>`
`byte_array::GenericByteArray<types::GenericStringType<OffsetSize>>` implements
`From<Vec<Option<&str>>>`
`byte_array::GenericByteArray<types::GenericStringType<OffsetSize>>` implements
`From<Vec<Option<String>>>`
and 3 others
= note: this error originates in the macro `create_array` (in Nightly
builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
error: could not compile `arrow-array` (lib test) due to 1 previous error
```
so it seems like a breaking change 🤔
--
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]