atwam opened a new issue, #5354:
URL: https://github.com/apache/arrow-rs/issues/5354

   **Describe the bug**
   
   When importing a pyarrow RecordBatch, we instantiate a `StructArray`, then 
convert it to a `RecordBatch`.
   This loses the metadata from the original schema. This is not seen in the 
current tests, because pyarrow's
   tests for equality on schemas ignores metadata.
   
   
https://github.com/apache/arrow-rs/blob/31cf5ce23febf076104f064358a24fe8af09ee4b/arrow/src/pyarrow.rs#L357-L358
   
   **To Reproduce**
   
   ```python
   # In arrow-pyarrow-integration-testing/tests/test_sql.py:470
   batch = pa.record_batch([f32_array], ["tensor"], metadata={b'key1': 
b'value1'})
       b = rust.round_trip_record_batch(batch)
       assert b == batch  # OK
       assert b.schema == batch.schema  # OK
       assert b.schema.metadata == batch.schema.metadata  # Fails
   ```
   
   **Expected behavior**
   Imported RecordBatch's schema should keep its metadata.
   


-- 
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]

Reply via email to