Skip to content

Commit

Permalink
fix max precision for 64 bit decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Dec 11, 2024
1 parent dcda4c6 commit 08c2d67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyarrow/types.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -4603,8 +4603,8 @@ cpdef DataType decimal64(int precision, int scale=0):
]
"""
cdef shared_ptr[CDataType] decimal_type
if precision < 1 or precision > 9:
raise ValueError("precision should be between 1 and 9")
if precision < 1 or precision > 18:
raise ValueError("precision should be between 1 and 18")
decimal_type.reset(new CDecimal64Type(precision, scale))
return pyarrow_wrap_data_type(decimal_type)

Expand Down

0 comments on commit 08c2d67

Please sign in to comment.