You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Michael A. Smith (Jira)" <ji...@apache.org> on 2021/05/22 13:22:00 UTC
[jira] [Created] (AVRO-3146) Test scale validation when encoding
decimal logical schema
Michael A. Smith created AVRO-3146:
--------------------------------------
Summary: 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
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)