mroeschke commented on issue #40538:
URL: https://github.com/apache/arrow/issues/40538#issuecomment-1997736174

   Ping-ponging back here: Looks like `assume_timezone` on empty 
`pa.ChunkedArray[pa.TImestampArray]` drops the empty `pa.TimestampArray`
   
   ```python
   In [3]: import pyarrow as pa
   
   In [4]: arr = pa.chunked_array([pa.array([], type=pa.timestamp("ns"))])
   
   In [5]: arr
   Out[5]: 
   <pyarrow.lib.ChunkedArray object at 0x10791b600>
   [
     []
   ]
   
   In [6]: import pyarrow.compute as pc
   
   In [7]: pc.assume_timezone(arr, "UTC")
   Out[7]: 
   <pyarrow.lib.ChunkedArray object at 0x10789bc40>
   [
   
   ]
   
   In [8]: pa.__version__
   Out[8]: '15.0.1'
   
   In [9]: pc.assume_timezone(arr, "UTC").chunks
   Out[9]: []
   
   In [10]: arr.chunks
   Out[10]: 
   [<pyarrow.lib.TimestampArray object at 0x10797ee00>
    []]
   ```


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