Arnab Karmakar has uploaded this change for review. ( https://gerrit.cloudera.org/25433
Change subject: IMPALA-15715: Read zstandard-compressed Avro files ...................................................................... IMPALA-15715: Read zstandard-compressed Avro files Java Avro and Trino write Avro object files with avro.codec "zstandard". The Avro scanner rejected that codec, and ZSTD decompression required a preallocated output buffer. Streaming writers also omit the content size, so the decompressed size is unknown up front. Changes: - Map "zstandard" to ZSTD in HdfsAvroScanner::ParseAvroCodecMetadata(). - ZstandardDecompressor::MaxOutputLen() returns the ZSTD_decompressBound() upper bound instead of -1. ProcessBlock() without a preallocated buffer uses it and rejects bounds above 512 MB. Testing: - BE: ZSTD decompressor tests with and without content size, the 512 MB limit, empty input, invalid headers and multiple frames. Avro codec mapping test in HdfsAvroScannerTest. - E2E: new fixture testdata/data/iceberg_test/iceberg_avro_trino_zstd, an Iceberg Avro table written by Trino 481 (5 rows, one NULL row) whose data file uses the zstandard codec. - test_iceberg_avro_trino_zstd asserts the codec in the Avro header and runs QueryTest/iceberg-avro-trino-zstd. Change-Id: If4ad7111254f2f71acf017db80bab3c3c80d6060 Assisted-by: Claude Haiku 5.5 (Cursor) --- M be/src/exec/avro/hdfs-avro-scanner-test.cc M be/src/exec/avro/hdfs-avro-scanner.cc M be/src/exec/avro/hdfs-avro-scanner.h M be/src/util/decompress-test.cc M be/src/util/decompress.cc M testdata/data/README A testdata/data/iceberg_test/iceberg_avro_trino_zstd/data/20261113_074657_00003_cnerw-52f6060c-91fe-43cf-a7f1-d0c9a87bb73e.avro A testdata/data/iceberg_test/iceberg_avro_trino_zstd/metadata/045c871f-b9cf-40e8-9bd3-808e0cf0ff52-m0.avro A testdata/data/iceberg_test/iceberg_avro_trino_zstd/metadata/20261113_074657_00003_cnerw-a9321611-0e8e-42dd-b5ed-f0304e8f4682.stats A testdata/data/iceberg_test/iceberg_avro_trino_zstd/metadata/snap-5791881991514383645-1-0d0ed2da-16fd-4630-ac65-1e8ebf3ef928.avro A testdata/data/iceberg_test/iceberg_avro_trino_zstd/metadata/snap-8967065855710616314-1-045c871f-b9cf-40e8-9bd3-808e0cf0ff52.avro A testdata/data/iceberg_test/iceberg_avro_trino_zstd/metadata/v1.metadata.json A testdata/data/iceberg_test/iceberg_avro_trino_zstd/metadata/v2.metadata.json A testdata/data/iceberg_test/iceberg_avro_trino_zstd/metadata/version-hint.text A testdata/workloads/functional-query/queries/QueryTest/iceberg-avro-trino-zstd.test M tests/query_test/test_iceberg.py 16 files changed, 280 insertions(+), 16 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/33/25433/1 -- To view, visit https://gerrit.cloudera.org/25433 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If4ad7111254f2f71acf017db80bab3c3c80d6060 Gerrit-Change-Number: 25433 Gerrit-PatchSet: 1 Gerrit-Owner: Arnab Karmakar <[email protected]>
