From 0b1d93210c6ab07892aca23b7979892aa57bffd3 Mon Sep 17 00:00:00 2001 From: zhongyujiang Date: Fri, 20 Jun 2025 15:32:25 +0800 Subject: [PATCH] fix: correct type mismatch in avro zstd decompression. --- pyiceberg/avro/codecs/zstandard_codec.py | 2 +- tests/utils/test_manifest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyiceberg/avro/codecs/zstandard_codec.py b/pyiceberg/avro/codecs/zstandard_codec.py index a048f68490..4cc815214f 100644 --- a/pyiceberg/avro/codecs/zstandard_codec.py +++ b/pyiceberg/avro/codecs/zstandard_codec.py @@ -39,7 +39,7 @@ def decompress(data: bytes) -> bytes: if not chunk: break uncompressed.extend(chunk) - return uncompressed + return bytes(uncompressed) except ImportError: diff --git a/tests/utils/test_manifest.py b/tests/utils/test_manifest.py index c838c02ac6..825431c776 100644 --- a/tests/utils/test_manifest.py +++ b/tests/utils/test_manifest.py @@ -358,7 +358,7 @@ def test_write_empty_manifest() -> None: @pytest.mark.parametrize("format_version", [1, 2]) -@pytest.mark.parametrize("compression", ["null", "deflate"]) +@pytest.mark.parametrize("compression", ["null", "deflate", "zstd"]) def test_write_manifest( generated_manifest_file_file_v1: str, generated_manifest_file_file_v2: str,