diff --git a/python/pyarrow/src/arrow/python/decimal.cc b/python/pyarrow/src/arrow/python/decimal.cc index 1ba8d32192a..48fb45a2377 100644 --- a/python/pyarrow/src/arrow/python/decimal.cc +++ b/python/pyarrow/src/arrow/python/decimal.cc @@ -51,9 +51,9 @@ static Status InferDecimalPrecisionAndScale(PyObject* python_decimal, int32_t* p ARROW_DCHECK_NE(python_decimal, NULLPTR); ARROW_DCHECK_NE(precision, NULLPTR); ARROW_DCHECK_NE(scale, NULLPTR); + ARROW_DCHECK(PyDecimal_Check(python_decimal)) + << "python_decimal is not an instance of decimal.Decimal"; - // TODO(phillipc): Make sure we perform PyDecimal_Check(python_decimal) as a - // ARROW_DCHECK OwnedRef as_tuple(PyObject_CallMethod(python_decimal, const_cast("as_tuple"), const_cast(""))); RETURN_IF_PYERROR();