janosik47 commented on issue #37195:
URL: https://github.com/apache/arrow/issues/37195#issuecomment-2101483670
The problem is even worse when one attempt to 'consume' the record batches
produces by a Flight server in the datafusion lib. The rust is stricter and
just panics ....
I my case I am using Java-based Flight server, java seems to attempt to
align all arrays into 8 bytes, which is not good enough :(
```
thread 'tokio-runtime-worker' panicked at
/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-buffer-50.0.0/src/buffer/scalar.rs:138:17:
Memory pointer from external source (e.g, FFI) is not aligned with the
specified scalar type. Before importing buffer through FFI, please make sure
the allocation is aligned.
stack backtrace:
...
15: 0x7f64fe835924 - core::panicking::panic_fmt::ha328cac7a9cfe5f7
at
/rustc/5119208fd78a77547c705d1695428c88d6791263/library/core/src/panicking.rs:72:14
16: 0x7f64fec6ad57 -
arrow_buffer::buffer::scalar::ScalarBuffer<T>::new::h0250dc699e8f33a4
17: 0x7f64ffe75d32 - arrow_array::array::get_offsets::h09013149e2c97dc4
18: 0x7f64fec5f0c0 - arrow_array::array::make_array::h8a4502f718fae730
19: 0x7f64fec63e13 - <arrow_array::array::struct_array::StructArray as
core::convert::From<arrow_data::data::ArrayData>>::from::hdb29f2e18b297be5
20: 0x7f64feb28ac3 - <arrow_array::record_batch::RecordBatch as
arrow::pyarrow::FromPyArrow>::from_pyarrow::h3dcb8844281b2862
21: 0x7f64fe8c4a27 -
<datafusion_physical_plan::stream::RecordBatchStreamAdapter<S> as
futures_core::stream::Stream>::poll_next::hd4a58bbb60ee7626
22: 0x7f64fff9cb00 -
datafusion_physical_plan::repartition::RepartitionExec::pull_from_input::{{closure}}::h407088640b03822d
```
--
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]