Skip to content

[Python] pa.decimal128 should validate inputs #21109

@asfimport

Description

@asfimport

The precision shouldn't be higher than 38, but 39 is happily accepted currently:

>>> ty = pa.decimal128(39, 0)                                                                            
>>> arr = pa.array([2**127], type=ty)                                                                  
>>> arr                                                                                                  
<pyarrow.lib.Decimal128Array object at 0x7f9b89444138>
[
  -170141183460469231731687303715884105728
]

Reporter: Antoine Pitrou / @pitrou
Assignee: Antoine Pitrou / @pitrou

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-4563. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions