Jefffrey commented on PR #18903:
URL: https://github.com/apache/datafusion/pull/18903#issuecomment-3580022677

   > I don't see any way to create a new `FixedSizeBinaryArray` with zero 
length using `try_new`. Is this on-purpose? The comments says 0 should be fine. 
Is this a bug in arrow-rs?
   
   This does seem like a bug; for reference, pyarrow allows it:
   
   ```python
   >>> import pyarrow as pa
   >>> pa.binary(0)
   FixedSizeBinaryType(fixed_size_binary[0])
   >>> pa.array([], type=pa.binary(0))
   <pyarrow.lib.FixedSizeBinaryArray object at 0x102030b80>
   []
   >>> pa.array([], type=pa.binary(0)).type
   FixedSizeBinaryType(fixed_size_binary[0])
   ```
   
   It would be nice to upstream a proper fix to arrow-rs and then can wait for 
it here; otherwise if we need a fix for DataFusion now we can do a workaround 
as you describe:
   
   > We maybe could create a `FixedSizeBinaryArray` using the `From<ArrayData>` 
implementation.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to