Repository navigation
Test reading the entire apache/arrow-testing corpus - #125134
Conversation
… all of it Add https://github.com/apache/arrow-testing as `contrib/arrow-testing` and a stateless test that reads every data file in it in its format: Arrow IPC files and streams (including the integration files of several Arrow versions), Parquet, Avro, CSV and TSV, including the fuzzer-generated files. For each file the test prints the inferred schema, the row count and an order-independent hash of all values, or the error name if the file cannot be read. The test also checks that the Arrow IPC file and stream variants of every integration file give the same result, and compares `blogs.parquet` with its expected contents in `blogs.json`. The stateless test job does not check out submodules, so `ci/jobs/functional_tests.py` now checks out `contrib/arrow-testing` before the tests run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [4451034] Summary: ✅
AI ReviewSummaryAdds the pinned Missing context / blind spots
Final VerdictStatus: ✅ Approve. No code changes requested; await successful CI on the latest head before merging. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units16 translation units recompiled, 53 s compile time in total, 16 of them have a recent master baseline. |
…reading it Map the `contrib/arrow-testing` submodule to `05361_arrow_testing_corpus` in `Targeting`, so that a change of the submodule alone reruns the test in the flaky check, and check out the submodule in the functional test job only when the selected tests include this test (always for a full run). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ader Found by `05361_arrow_testing_corpus` with UBSan on the fuzzer-generated files of `apache/arrow-testing`: - an out-of-range `repetition_type` of a schema element was loaded as an enum in `SchemaConverter::processSubtree`; now it is validated and rejected with `INCORRECT_DATA`; - negative sizes or numbers of values of a column chunk produced negative memory estimates converted to `size_t` in `ReadManager::scheduleTask`; now they are rejected with `INCORRECT_DATA`; - column chunks of zero size made the memory amplification of a prefetch task `0 / 0`, and NaN was converted to `size_t` in `Prefetcher::startPrefetch`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A bit width larger than the value type was passed to `arrow::bit_util::BitReader::GetBatch`, which only checks it with a `DCHECK`: debug builds threw `STD_EXCEPTION`, release builds read garbage until the end of the page. Found by `05361_arrow_testing_corpus` on `clusterfuzz-testcase-parquet-arrow-fuzz-5415048864989184` of `apache/arrow-testing`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uet metadata handling Files with an invalid `repetition_type` in the schema are now rejected at schema inference. Read error messages as text: they may contain binary column names of the fuzzer-generated files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nts before the traversal The traversal looks ahead at descendants, e.g. in `tupleSubtreeIsAllRequired`, so checking each element only when it is visited still compared out-of-range enum values. Also initialize the variable to satisfy `clang-tidy` (`cppcoreguidelines-init-variables`). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…is needed Address review: validating the vectors of every `DictionaryBatch` in `MessageReader::readNextMessage` made a projected read fail on a corrupted dictionary of an unrequested column, breaking the contract covered by `04411_native_arrow_ipc_unrequested_dictionary_corrupt`. Move the check of the dictionary batch into `decodeDictionaryBatch`, which is reached only for needed dictionaries; record batches are still checked right after verification. #125134 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nary Address review: a `DictionaryBatch` of an unrequested column whose `nodes` vector is at 4 mod 8 passes `flatbuffers::Verifier`, and must not fail a projected read; selecting that column must fail with the misalignment error. #125134 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125134&sha=61befa9ad08b191a20ce5b205395b64736a40bdb&name_0=PR&name_1=AST%20fuzzer%20%28amd_release%2C%20oracle%29 (segfault in |
|
The fix is in progress in #119401 (same STID 2844-3993 as #127800). The last fuzzed query in this run's SELECT round(cramersVBiasCorrectedMerge(dynamicElement(CAST(w, 'Dynamic'), 'AggregateFunction(cramersVBiasCorrected, UInt8, UInt8)')), 4)
FROM (SELECT cramersVBiasCorrectedState(toUInt8(number % 10), toUInt8(number % 6)) OVER () AS w FROM numbers(100) LIMIT 1)In |
# Conflicts: # src/Processors/Formats/Impl/Parquet/Prefetcher.cpp
…`xz` in `Avro` #127774 added support for the `bzip2` and `xz` codecs in the `Avro` format, so `data/avro/alltypes_plain.bzip2.avro` and `data/avro/alltypes_plain.xz.avro` are now read, with the same contents as `data/avro/alltypes_plain.avro`. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125134&sha=59dd252d208615c700b477812e3bbb00194d6499&name_0=PR PR: #125134 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
LGTM |
#128436 changed `CSVFormatReader::readField` to treat a field starting with `\r` as empty with `input_format_csv_empty_as_default`, so the fuzzer file `clusterfuzz-testcase-minimized-arrow-csv-fuzz-5085419734892544` now fails with `CANNOT_PARSE_INPUT_ASSERTION_FAILED` instead of being read as one row. This was the reason the merge queue rejected the PR: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=gh-readonly-queue/master/pr-125134-e347281f9c9d421459e72eefc44846ec85d67c06&sha=35025568ed58256edb98198b0a30fd72fa93fb7d&name_0=MergeQueueCI Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 The merge queue rejected this PR because The cause is a semantic conflict with #128436, which landed on master after this branch was last merged. It changed |
Related: #125130
Add https://github.com/apache/arrow-testing as the
contrib/arrow-testingsubmodule and a stateless test that reads the entire corpus (509 files), each in its format: Arrow IPC files and streams (including the integration files written by several Arrow versions), Parquet, Avro, CSV and TSV, including all fuzzer-generated files. For each file the test records the inferred schema, the row count and an order-independent hash of all values, or the error name if the file cannot be read. The files ClickHouse has no format for (Arrow JSON integration files, Flight certificates, a Protobuf schema) are skipped.In addition, the test checks that the
.arrow_fileand.streamvariants of all 91 integration files give identical results, and comparesblogs.parquetwith its expected contents inblogs.json(they match).The stateless test job does not check out submodules, so
ci/jobs/functional_tests.pynow checks outcontrib/arrow-testing(about 12 MB) when the selected tests include this test (always for a full run). A change of the submodule alone reruns the test in the flaky check.The test found several bugs in the native Parquet reader on the fuzzer-generated files, fixed here:
repetition_typein the schema (nowINCORRECT_DATA);ReadManager, only for the columns whose data is read, so the check from this PR was dropped);DELTA_BINARY_PACKEDminiblock bit width larger than the value type was passed to Arrow'sBitReader, which only checks it with aDCHECK.It also found that columns with empty names (e.g. an Arrow field with an empty name, or an empty header in
CSVWithNames) are removed from the inferred schema, but not from a schema taken from the schema cache, so the next read of the same file got a column with an empty name (AMBIGUOUS_COLUMN_NAMEin release builds, an exception on achassertin debug and sanitizer builds). Fixed, with a separate test05401_schema_cache_empty_column_name.It also found that the native Arrow IPC reader rejected
Arrowfiles whose footer has no metadata version (it reads as the defaultV1, while the messages are V4), e.g. three Arrow 0.14.1 integration files, since #125224. Such a footer is now read as V4; every message is still checked for its own version.It also found that the native Arrow IPC reader made a misaligned 8-byte load (reported by UBSan) on a fuzzer-generated stream:
flatbuffers::Verifierdoes not check the alignment of vector elements, andRecordBatch.variadicBufferCountswas placed at an address that is 4 mod 8. The record batch vectors of 8-byte elements and the footer block lists are now checked for alignment after verification (INCORRECT_DATA).The reference pins the current behavior (Arrow dictionaries with duplicate values are read since #125677), including limitations visible in the corpus: big-endian Arrow IPC, unions, duplicate and empty field names, the
nulltype, intervals,ListView, bzip2 and xz Avro codecs, andARROW-17100.parquet(compressed pages with theis_compressedflag unset, written by PyArrow 2.0).Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Test reading the entire Arrow test corpus from https://github.com/apache/arrow-testing.
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/125134]
Version info
26.11.1.1286-master(included in26.11and later)