[
https://issues.apache.org/jira/browse/AVRO-3146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17350054#comment-17350054
]
Michael A. Smith commented on AVRO-3146:
----------------------------------------
This required a fairly lengthy cascade of fixes to get through, because fixing
one bug uncovered another. But I think it's ready to go now.
[apache/avro#1228|https://github.com/apache/avro/pull/1228]
> Test scale validation when encoding decimal logical schema
> ----------------------------------------------------------
>
> Key: AVRO-3146
> URL: https://issues.apache.org/jira/browse/AVRO-3146
> Project: Apache Avro
> Issue Type: Test
> Components: python
> Affects Versions: 1.10.2
> Reporter: Michael A. Smith
> Assignee: Michael A. Smith
> Priority: Major
>
> Based on [a CodeQL
> finding|https://github.com/apache/avro/security/code-scanning/464], it seems
> decimal logical types are probably broken and need testing with various
> encoding and decoding steps. I think:
> 1. Python decimal exponents are always negative, and avro schema scales are
> always positive, so the {{if exp > scale: raise}} check does not raise an
> exception.
> 2. If it did, it would raise the wrong exception, because it would fail to
> instantiate the exception class.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)