rdblue commented on code in PR #8067:
URL: https://github.com/apache/iceberg/pull/8067#discussion_r1285263152
##########
python/pyiceberg/avro/writer.py:
##########
@@ -136,7 +137,7 @@ class DecimalWriter(Writer):
scale: int = dataclassfield()
def write(self, encoder: BinaryEncoder, val: Any) -> None:
- return encoder.write_decimal_bytes(val)
+ return encoder.write(decimal_to_bytes(val,
byte_length=decimal_required_bytes(self.precision)))
Review Comment:
Like the comment above, we don't need to calculate the size every time since
this is in a tight loop.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]