Describe the bug, including details regarding any error messages, version, and platform.
a = pa.array([545803904.0], type=pa.float32())
>>> a.cast(pa.decimal128(38, 18))
<pyarrow.lib.Decimal128Array object at 0x000001DE8FF59840>
[
545803886.966396699654750208
]
>>>
While encoding of decimal128 and float32 is very different, the difference after the cast seems much larger than expected.
Component(s)
Python