You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/06/23 11:25:41 UTC
[avro] branch master updated: AVRO-3542: Scale assignment optimization (#1730)
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new f068da73b AVRO-3542: Scale assignment optimization (#1730)
f068da73b is described below
commit f068da73b8543c9f6d151d1af58a43d8164b5adc
Author: Igor Izvekov <iz...@mail.ru>
AuthorDate: Thu Jun 23 14:25:35 2022 +0300
AVRO-3542: Scale assignment optimization (#1730)
---
lang/py/avro/schema.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lang/py/avro/schema.py b/lang/py/avro/schema.py
index 4885e333f..9c2b16d7d 100644
--- a/lang/py/avro/schema.py
+++ b/lang/py/avro/schema.py
@@ -1132,7 +1132,7 @@ def make_avsc_object(json_data: object, names: Optional[avro.name.Names] = None,
size = json_data.get("size")
if logical_type == "decimal":
precision = json_data.get("precision")
- scale = 0 if json_data.get("scale") is None else json_data.get("scale")
+ scale = json_data.get("scale", 0)
try:
return FixedDecimalSchema(size, name, precision, scale, namespace, names, other_props)
except avro.errors.IgnoredLogicalType as warning: