Skip to content

[Python] pa.array([Decimal("nan")]) raises #35717

@jbrockmendel

Description

@jbrockmendel

Describe the bug, including details regarding any error messages, version, and platform.

pa.array([Decimal("nan")])

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyarrow/array.pxi", line 320, in pyarrow.lib.array
  File "pyarrow/array.pxi", line 39, in pyarrow.lib._sequence_to_array
  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: Decimal precision out of range [1, 38]: -2147483648

Based on how pyarrow handles numpy nans I'd expect this to get converted to a pyarrow null.

pyarrow 11.0.0 on mac

Component(s)

Python

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions