From 95365e42fbaaa1ba70f4b8ffd6653467aec4fd89 Mon Sep 17 00:00:00 2001 From: nishad shabbir Date: Mon, 5 Oct 2026 13:27:20 +0530 Subject: [PATCH] GH-52024: [Python] Fix the codec list in show_info() show_info() prints its Compression Codecs section from a hardcoded list that has drifted from the names _ensure_compression() actually accepts. "lz4" and "lz4_frame" both map to CCompressionType_LZ4_FRAME, so the same codec was reported twice under two names, while "lz4_raw", which maps to CCompressionType_LZ4 and is a separate codec, was not reported at all. Seven lines were printed for six codecs, and the seventh codec pyarrow supports was missing. List "lz4" once and add "lz4_raw". --- python/pyarrow/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/pyarrow/__init__.py b/python/pyarrow/__init__.py index f2a874f56fa4..58b7d68188bd 100644 --- a/python/pyarrow/__init__.py +++ b/python/pyarrow/__init__.py @@ -156,7 +156,9 @@ def print_entry(label, value): print(f" {fs: <20}: {status: <8}") print("\nCompression Codecs:") - codecs = ["brotli", "bz2", "gzip", "lz4_frame", "lz4", "snappy", "zstd"] + # "lz4" and "lz4_frame" are the same codec, and lz4_raw is a + # separate one that was missing here. See _ensure_compression(). + codecs = ["brotli", "bz2", "gzip", "lz4", "lz4_raw", "snappy", "zstd"] for codec in codecs: status = "Enabled" if Codec.is_available(codec) else "-" print(f" {codec: <20}: {status: <8}")