Jefffrey commented on issue #902:
URL: https://github.com/apache/arrow-rs/issues/902#issuecomment-4862518243
i'll close this since we don't have enough information for a reproduction
for what its worth i tested quickly on current main:
```rust
#[test]
fn test123() {
let array = Arc::new(Date64Array::from(vec![949363200000,
1635811200000])) as ArrayRef;
dbg!(&array);
let batch = RecordBatch::try_from_iter(vec![("a", array)]).unwrap();
let stream_data = {
let mut writer = StreamWriter::try_new(vec![],
&batch.schema()).unwrap();
writer.write(&batch).unwrap();
writer.into_inner().unwrap()
};
std::fs::write("output.bin", &stream_data).unwrap();
}
```
which outputs
```sh
running 1 test
[arrow-ipc/src/writer.rs:4587:9] &array = PrimitiveArray<Date64>
[
2000-02-01,
2021-11-02,
]
test writer::tests::test123 ... ok
```
and read it in with pyarrow:
```python
>>> import pyarrow as pa
>>> with open("output.bin", "rb") as f:
... file_bytes = f.read()
...
>>> f
<_io.BufferedReader name='output.bin'>
>>> with pa.ipc.open_stream(file_bytes) as reader:
... schema = reader.schema
... batches = [b for b in reader]
...
>>> schema
a: date64[ms] not null
>>> batches
[pyarrow.RecordBatch
a: date64[ms] not null
----
a: [2000-02-01,2021-11-02]]
>>> pa.__version__
'24.0.0'
```
so its not a glaring bug. feel free to comment again or raise a new issue if
this still needs to be resolved
--
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]