Skip to content

Commit fe18013

Browse files
committed
[Python] Add PyDecimal_Check(pythopn_decimal) as a ARROW_DCHECK
1 parent 14bf848 commit fe18013

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

python/pyarrow/src/arrow/python/decimal.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ static Status InferDecimalPrecisionAndScale(PyObject* python_decimal, int32_t* p
5151
ARROW_DCHECK_NE(python_decimal, NULLPTR);
5252
ARROW_DCHECK_NE(precision, NULLPTR);
5353
ARROW_DCHECK_NE(scale, NULLPTR);
54+
ARROW_DCHECK(PyDecimal_Check(python_decimal))
55+
<< "python_decimal is not an instance of decimal.Decimal";
5456

55-
// TODO(phillipc): Make sure we perform PyDecimal_Check(python_decimal) as a
56-
// ARROW_DCHECK
5757
OwnedRef as_tuple(PyObject_CallMethod(python_decimal, const_cast<char*>("as_tuple"),
5858
const_cast<char*>("")));
5959
RETURN_IF_PYERROR();

0 commit comments

Comments
 (0)