Skip to content

Test reading the entire apache/parquet-testing corpus - #125130

Merged
alexey-milovidov merged 15 commits into
masterfrom
parquet-testing-corpus
Oct 14, 2026
Merged

alexey-milovidov merged 15 commits into
masterfrom
parquet-testing-corpus

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Add https://github.com/apache/parquet-testing as the contrib/parquet-testing submodule and a stateless test that reads the entire corpus: every .parquet and .parquet.encrypted file (253 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 that come with an *_expect.csv are compared with the expected contents (all four match).

Reading is single-threaded (so that files with several corrupted columns report a deterministic error) and session_timezone is fixed (timestamps inside variants are formatted in the session time zone).

The stateless test job does not check out submodules, so ci/jobs/functional_tests.py now checks out contrib/parquet-testing (about 6 MB) before running the tests.

contrib/parquet-testing is test data only: it is excluded from the build digests (a submodule under exclude_paths no longer contributes its SHA even with with_git_submodules), so bumping it does not rebuild the binaries. It is included in the stateless test digest, and a change of it selects the tests referencing it in targeted and flaky-check runs.

The corpus found undefined behavior: bad_data/PARQUET-1481.parquet has the invalid physical type -7, and loading it as the parquet::format::Type::type enum in SchemaConverter::processPrimitiveColumn was reported by UBSan. The raw value is now checked first. Reading uses a fixed max_memory_usage, because large_string_map.brotli.parquet decompresses to a 1 GiB string.

The reference pins the current behavior, including unsupported features visible in the corpus: shredded variants, GEOMETRY/GEOGRAPHY logical types, encryption, concatenated_gzip_members.parquet, datapage_v2_empty_datapage.snappy.parquet, int96_from_spark.parquet, json.parquet.

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Test reading the entire Parquet test corpus from https://github.com/apache/parquet-testing.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/125130]

Version info

  • Merged into: 26.10.1.2407-master (included in 26.10 and later)

…ng all of it

Add https://github.com/apache/parquet-testing as `contrib/parquet-testing`
and a stateless test that reads every `.parquet` and `.parquet.encrypted`
file in it. 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. Files that ship with an `*_expect.csv` are compared with
the expected contents.

The stateless test job does not check out submodules, so
`ci/jobs/functional_tests.py` now checks out `contrib/parquet-testing`
before the tests run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [5353830]

Summary: ✅


AI Review

Summary

Adds the Apache Parquet corpus as a test-data submodule, exercises its files in a stateless test, rejects invalid physical-type enum values, and connects the corpus to CI checkout, selection, and cache digests. Reviewed head: 53538305ba4c65bb1cbb89c5c8143c1c1149538c. All six previous findings are addressed in the current code; no new actionable findings remain.

Missing context / blind spots
  • ⚠️ CI for the reviewed head is still running, including stateless and stress jobs. A completed stress run will confirm the new checkout step at runtime. The corpus passed all 50 repetitions in the previous ASan/UBSan run; five focused checks of the current CI digest and selection contracts also passed. No local ClickHouse build was available.
Final Verdict

Status: ✅ Approve. No outstanding code-review findings; the latest CI results remain pending.

@clickhouse-gh clickhouse-gh Bot added pr-build Pull request with build/testing/packaging improvement submodule changed At least one submodule changed in this PR. comp-testing Test content only (no production code). labels Oct 11, 2026
`clickhouse-local` also reads stdin for `INSERT ... FROM INFILE` and
appends its data, so the test hangs when stdin is an open pipe or socket.
Insert from the `file` table function instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread .gitmodules Resolved
@clickhouse-gh

clickhouse-gh Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Commit 53538305ba4c65bb1cbb89c5c8143c1c1149538c was not compared: the CI logs cluster did not answer (every POST attempt failed with an exception; stopped retrying after the 1250 s read budget).

See the job log for details.

alexey-milovidov and others added 4 commits October 11, 2026 23:58
A file can contain a physical type out of the range of `parquet::format::Type::type`
(e.g. `bad_data/PARQUET-1481.parquet` of the `apache/parquet-testing` corpus has -7).
Loading such a value as the enum is undefined behavior, reported by UBSan in
`SchemaConverter::processPrimitiveColumn`. Check the raw value first.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125130&sha=5ed0b3a8cb72b54bb248500942482ac56b49eec2&name_0=PR
PR: #125130

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`data/large_string_map.brotli.parquet` decompresses to a 1 GiB string, so whether it
could be read depended on the available memory, and the test failed with
`MEMORY_LIMIT_EXCEEDED` in CI.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125130&sha=5ed0b3a8cb72b54bb248500942482ac56b49eec2&name_0=PR
PR: #125130

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d it to stateless tests

- A submodule under `exclude_paths` of a digest config does not affect the digest
  even with `with_git_submodules`, and a submodule listed in `include_paths` affects
  it regardless of `with_git_submodules`. Exclude `contrib/parquet-testing` from the
  builds and include it in the stateless tests.
- A change of a test data submodule selects the stateless tests referencing it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh
clickhouse-gh Bot requested review from leshikus and maxknv October 12, 2026 00:25
Comment thread ci/jobs/scripts/find_tests.py Resolved
alexey-milovidov and others added 2 commits October 12, 2026 16:48
…less batches

In the regular stateless jobs, a changed test data submodule (`contrib/parquet-testing`)
is now treated as a change of the test source files that reference it, so a pure corpus
bump runs only the batches and flavors containing these tests instead of the full matrix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread ci/jobs/functional_tests.py Resolved
alexey-milovidov and others added 2 commits October 13, 2026 05:48
…an run a test reading it

A transient fetch failure of `contrib/parquet-testing` must not fail unrelated
stateless shards, and the shards that cannot select `05359_parquet_testing_corpus`
should not pay for the clone. Apply the same filters as `clickhouse-test` does
(the selected test list, the `parallel`/`sequential` flavor and the hash batch)
to the tests reading each test data submodule, and check out only the needed ones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread ci/defs/job_configs.py Resolved
alexey-milovidov and others added 3 commits October 13, 2026 20:30
The check whether a job runs only sequential tests looked for `--no-parallel`
as a substring of the runner options, which matched `--no-parallel-replicas`
of the `ParallelReplicas` jobs. So these jobs did not check out
`contrib/parquet-testing`, and `05359_parquet_testing_corpus` failed there.
Compare whole options instead.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125130&sha=latest&name_0=PR&name_1=Stateless%20tests%20(arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel)
#125130

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s consumers

`_prepare_submodule_cache` hashed the SHAs of all submodules, so a bump of
`contrib/parquet-testing`, which no `needs_submodules` job depends on, missed
the cache and re-archived all submodules. Hash only the submodules affecting
at least one `needs_submodules` job, according to their digest configs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125130&sha=fd7b63579e67aa688d84e97fff515def77e7fc8d&name_0=PR&name_1=Performance%20Comparison%20(arm_release%2C%20master_head%2C%205%2F6) (four Performance Comparison (arm_release, master_head, N/6) shards failed with "too long" queries and "the shard's results were not uploaded to CIDB ... LogCluster connection failed: ConnectionError"; this PR does not change query execution) and provide a fix in a separate PR. If the fix is already in progress, link it here.

@groeneai

Copy link
Copy Markdown
Collaborator

Not caused by this PR, and I don't think a code fix is warranted: play.clickhouse.com (CIDB) refused connections CI-wide from ~09:05 to ~09:47 UTC on 2026-10-13. CIDB rows for jobs ending per 5 minutes fell from 348-396 before 09:05 to 38-106 between 09:10 and 09:40.

  • The four red shards reached their upload step between 09:22 and 09:30. Every attempt in the 600 s retry budget got [Errno 111] Connection refused, so the dashboard gate failed closed.
  • Shards 4/6 and 6/6 of the same run reached the upload at 09:40-09:41, were refused until 09:46-09:47, uploaded at 09:47:40 and 09:48:27, and passed. Covering the whole outage would hold every shard for 40 minutes, and passing a shard without its uploads would let a regression go unjudged.
  • The "too long" queries do not fail the check: in master_head mode the status comes only from errors in the report or from the dashboard gate (performance_tests.py). The two green shards report "6 too long" and "7 too long" as well.

No fix is in progress. The run on the new head (d6fc48c5) re-runs these shards.

# Conflicts:
#	src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp
The stress runner selects the stateless tests of the checkout, including
`05359_parquet_testing_corpus`, which reads `contrib/parquet-testing`, but
only `functional_tests.py` initialized the submodule. Check it out in
`stress_job.py` before starting the container (not in the upgrade check,
which runs the tests of the previous release), and include the submodule
in the digest of `common_stress_job_config`, so that a bump of the corpus
invalidates the cached stress results.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 @groeneai, thanks for the analysis: the red Performance Comparison (arm_release) shards were the CIDB outage on 2026-10-13, not this PR. I merged master and pushed 5353830 (it also checks out the Parquet corpus in stress jobs, as the AI review asked), so CI runs again on the new head.

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to have.

@alexey-milovidov alexey-milovidov self-assigned this Oct 14, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Oct 14, 2026
Merged via the queue into master with commit 3c89cde Oct 14, 2026
178 checks passed
@alexey-milovidov
alexey-milovidov deleted the parquet-testing-corpus branch October 14, 2026 21:00
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 14, 2026
@clickhouse-gh clickhouse-gh Bot added comp-parquet-reader-v3 Issues related to the native Parquet reader. and removed comp-testing Test content only (no production code). labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-parquet-reader-v3 Issues related to the native Parquet reader. pr-build Pull request with build/testing/packaging improvement pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants