HyukjinKwon opened a new pull request, #48628:
URL: https://github.com/apache/arrow/pull/48628

   ### Rationale for this change
   
   A 7-year-old TODO suggested adding a type validation assertion in 
`InferDecimalPrecisionAndScale()`. This helps catch type errors during 
development in debug builds.
   
   ### What changes are included in this PR?
   
   Added `ARROW_DCHECK(PyDecimal_Check(python_decimal))` assertion in 
`InferDecimalPrecisionAndScale()` to validate that the input is a 
`decimal.Decimal` instance.
   
   This resolves the TODO added in commit 9515fe92d
   
   ### Are these changes tested?
   
   Yes. Existing tests in `python_test.cc` already execute this code path 
through `DecimalMetadata::Update()`. The assertion is debug-only and doesn't 
change runtime behavior.
   
   ### Are there any user-facing changes?
   
   No, dev-only.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to