From 08c2d67e24e43f659e7a5e60e10ea844920c3b6b Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Fri, 29 Nov 2024 15:10:09 -0600 Subject: [PATCH] fix max precision for 64 bit decimal --- python/pyarrow/types.pxi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pyarrow/types.pxi b/python/pyarrow/types.pxi index 5eccdf25b2b42..df358697aef2a 100644 --- a/python/pyarrow/types.pxi +++ b/python/pyarrow/types.pxi @@ -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)