[jira] [Assigned] (AVRO-3146) Test scale validation when encoding decimal logical schema

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Assigned] (AVRO-3146) Test scale validation when encoding decimal logical schema

Dave Cole (Jira)

     [ https://issues.apache.org/jira/browse/AVRO-3146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael A. Smith reassigned AVRO-3146:
--------------------------------------

    Assignee: Michael A. Smith

> 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)