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

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   ```
   >>> scal = pa.scalar(6312878760374611856, type=pa.int64())
   >>> scal.cast(pa.float64())
   <pyarrow.DoubleScalar: 6.312878760374612e+18>
   >>> arr = pa.array([6312878760374611856], type=pa.int64())
   >>> arr.cast(pa.float64())
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "pyarrow\array.pxi", line 926, in pyarrow.lib.Array.cast
     File "C:\pandas2_ps_04323\lib\site-packages\pyarrow\compute.py", line 391, 
in cast
       return call_function("cast", [arr], options)
     File "pyarrow\_compute.pyx", line 560, in pyarrow._compute.call_function
     File "pyarrow\_compute.pyx", line 355, in pyarrow._compute.Function.call
     File "pyarrow\error.pxi", line 144, in 
pyarrow.lib.pyarrow_internal_check_status
     File "pyarrow\error.pxi", line 100, in pyarrow.lib.check_status
   pyarrow.lib.ArrowInvalid: Integer value 6312878760374611856 not in range: 
-9007199254740992 to 9007199254740992
   >>>
   ```
   
   Behavior is not consistent in casting between array and scalar. The array 
behavior of raising does not seem correct, as it seems an int64 should always 
be able to be casted to float64.
   
   ### 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