mroeschke opened a new issue, #36677:
URL: https://github.com/apache/arrow/issues/36677

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   ```
   >>> import pyarrow as pa
   >>> pa.__version__
   '12.0.1'
   >>> pa.scalar(43260.0).cast(pa.time32("s"))
   <pyarrow.Time32Scalar: datetime.time(12, 1)>
   
   >>> pa.__version__
   '13.0.0.dev497'
   >>> pa.scalar(43260.0).cast(pa.time32("s"))
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "pyarrow/scalar.pxi", line 91, in pyarrow.lib.Scalar.cast
     File 
"/opt/miniconda3/envs/pyarrow-pandas-dev/lib/python3.11/site-packages/pyarrow/compute.py",
 line 403, in cast
       return call_function("cast", [arr], options, memory_pool)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "pyarrow/_compute.pyx", line 572, in pyarrow._compute.call_function
     File "pyarrow/_compute.pyx", line 367, in pyarrow._compute.Function.call
     File "pyarrow/error.pxi", line 144, in 
pyarrow.lib.pyarrow_internal_check_status
     File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
   pyarrow.lib.ArrowNotImplementedError: Unsupported cast from double to time32 
using function cast_time32
   ```
   
   Not sure if this will be an intentional change, but it appears casting from 
double to temporal types has changed. In theory for the example above `43260.0` 
can be cast exactly back to `datetime.time(12, 1)`. I could see how for a value 
like `43260.1` there would be implicit rounding in pyarrow 12
   
   ### Component(s)
   
   Python


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