Skip to content

Commit

Permalink
Use .read_bytes() instead (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fokko authored Jan 30, 2024
1 parent 2836c4a commit 4355912
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pyiceberg/avro/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 4355912

Please sign in to comment.