Repository navigation
Add tests with the golden Delta tables of delta-kernel-rs - #129093
Conversation
Copy the golden tables of delta-kernel-rs (`kernel/tests/golden_data` at commit 88ff5a9 of the `contrib/delta-kernel-rs` submodule, generated by Spark with `GoldenTables.scala` of delta-io/delta, Apache License 2.0) to `tests/queries/0_stateless/data_delta_lake/kernel_golden`, and compare what `deltaLakeLocal` returns with the expected data written by Spark. Stateless test jobs do not check out build submodules, so the data is copied. The tests cover data types (primitives, arrays, maps, nested structs, dates and timestamps in various time zones, `timestamp_ntz`, INT96, decimals of every precision and dictionary encodings), log replay (updates, deletes, merges, restores, classic, multi-part and V2 checkpoints, a corrupted `_last_checkpoint`, a log of only checkpoints), filters with data skipping on every column type (including the number of files read), deletion vectors (with checkpoints, column mapping and small blocks), time travel with `delta_lake_snapshot_version` over schema and partitioning changes, repartitioning and vacuum, and invalid tables that must be rejected. `table-with-columnmapping-mode-id` and `table-with-columnmapping-mode-name` are not included, because ClickHouse reads structs nested in arrays and maps incorrectly under column mapping. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The root `.gitignore` excludes `*.bin`, so the deletion vector files of the tables were not committed, and the tests with deletion vectors would fail. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [05839df] Summary: ✅ AI ReviewSummaryAdds seven stateless tests using Spark-generated Delta Lake golden tables to check types, decimals, log replay, data skipping, deletion vectors, time travel, and invalid tables. Reviewed all 759 changed files, the current scripts and references, fixture metadata, and all prior discussion at head Findings❌ Blockers
Tests
Final VerdictStatus: ❌ Block. Exclude the large fixture blobs from merged Git history, and merge the iterator fix with passing TSan coverage before merging these tests. No new review comments or thread-state changes were posted. |
`05526_delta_lake_kernel_golden_errors` started `clickhouse-local` for each of the 11 tables and timed out in the flaky check with TSan, where starting it is slow and the test runs many times in parallel. Read all tables with `--ignore-error` in one process instead. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=129093&sha=e01d39ce69719e92d58eb4e0f7919b7a927c3711&name_0=PR&name_1=Stateless%20tests%20%28amd_tsan%2C%20flaky%20check%29 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tables `table-with-columnmapping-mode-id` and `table-with-columnmapping-mode-name` were added with the fix of reading structs inside arrays and maps under column mapping. Related: #129103 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 Merged master. The only remaining CI failure is the timeout of |
`TableSnapshot::Iterator::setScanException` set `scan_exception` and `shutdown` without holding `next_mutex` and then notified `data_files_cv`. If the notification came after `next` checked the condition of the wait but before it started waiting, `next` waited forever, and the query hung. This happens when the scanning thread fails, e.g. with `PATH_ACCESS_DENIED` for a data file outside of the table directory, and it was seen with TSan. The destructor set `shutdown` in the same way before notifying the scanning thread, which waits on `schedule_next_batch_cv` with the same condition, so it could hang in `join` as well. Set them under the mutex. This also makes `next` read `scan_exception` after it is written. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=129093&sha=23927a29eeb17c626ca415713a6eae693f2d74c9&name_0=PR&name_1=Stateless%20tests%20%28amd_tsan%2C%20s3%20storage%2C%20targeted%29 Related: ClickHouse#129093 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add stateless tests that read the golden Delta tables of delta-kernel-rs (
kernel/tests/golden_dataat commit 88ff5a9 ofcontrib/delta-kernel-rs, generated by Spark withGoldenTables.scalaof delta-io/delta, Apache License 2.0) withdeltaLakeLocaland compare the result with the expected data written by Spark. No ClickHouse test used this corpus before. The tables are copied totests/queries/0_stateless/data_delta_lake/kernel_golden(3.4 MB), because stateless test jobs do not check out build submodules.The seven tests cover:
timestamp_ntz(also with column mapping), INT96, millis and micros timestamps, decimals of every precision, dictionary-encoded decimals with 1M rows;_last_checkpoint, a log of only checkpoints, protocol and metadata changes;DeltaLakeScannedFiles);delta_lake_snapshot_versionover every version (the golden tables are stages of the same table), with schema and partitioning changes, repartitioning and vacuum;_delta_log, files outside of the table directory), which must be rejected.table-with-columnmapping-mode-idandtable-with-columnmapping-mode-nameare not included, because ClickHouse reads structs nested in arrays and maps incorrectly under column mapping (anArray(Tuple(...))column is read as[], aMap(..., Tuple(...))value as(NULL)); they were added with the fix in #129103.The generated corpus in
tests/queries/0_stateless/data_lake_corpus(Iceberg and Parquet files) uses a different layout of references (JSON produced by pyarrow), while here the references are the Parquet files of Spark and time travel, data skipping and error cases are checked, so the tables are kept next to the other Delta tables indata_delta_lake.05526_delta_lake_kernel_golden_errorsfound a hang of the Delta Lake data file iterator with TSan, fixed in #129547.Related: #129103
Related: #129547
Changelog category (leave one):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/129093]
Version info
26.11.1.1516-master(included in26.11and later)