From 43559128e9724eadf6b3523e1432e2801af03ae9 Mon Sep 17 00:00:00 2001 From: Fokko Driesprong Date: Tue, 30 Jan 2024 18:48:40 +0100 Subject: [PATCH] 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 a8befd9f91..2f21e165b4 100644 --- a/pyiceberg/avro/file.py +++ b/pyiceberg/avro/file.py @@ -194,8 +194,7 @@ def _read_block(self) -> int: 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)