This is an automated email from the ASF dual-hosted git repository.
honahx pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-python.git
The following commit(s) were added to refs/heads/main by this push:
new 4355912 Use `.read_bytes()` instead (#325)
4355912 is described below
commit 43559128e9724eadf6b3523e1432e2801af03ae9
Author: Fokko Driesprong <[email protected]>
AuthorDate: Tue Jan 30 18:48:40 2024 +0100
Use `.read_bytes()` instead (#325)
---
pyiceberg/avro/file.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pyiceberg/avro/file.py b/pyiceberg/avro/file.py
index a8befd9..2f21e16 100644
--- a/pyiceberg/avro/file.py
+++ b/pyiceberg/avro/file.py
@@ -194,8 +194,7 @@ class AvroFile(Generic[D]):
raise ValueError(f"Expected sync bytes {self.header.sync!r},
but got {sync_marker!r}")
block_records = self.decoder.read_int()
- block_bytes_len = self.decoder.read_int()
- block_bytes = self.decoder.read(block_bytes_len)
+ block_bytes = self.decoder.read_bytes()
if codec := self.header.compression_codec():
block_bytes = codec.decompress(block_bytes)