rdblue commented on code in PR #6532:
URL: https://github.com/apache/iceberg/pull/6532#discussion_r1063848387
##########
python/pyiceberg/avro/decoder.py:
##########
@@ -115,7 +115,8 @@ def read_bytes(self) -> bytes:
"""
Bytes are encoded as a long followed by that many bytes of data.
"""
- return self.read(self.read_int())
+ num_bytes = self.read_int()
+ return self.read(num_bytes) if num_bytes > 0 else b""
Review Comment:
Ah, this makes more sense! So we were requesting 0 bytes and hitting an
`EOFError` because of it.
--
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]