Skip to content

Add Delta Lake tests with tables from delta-rs and duckdb-delta - #129094

Merged
alexey-milovidov merged 2 commits into
masterfrom
delta-lake-delta-rs-duckdb-tables
Nov 5, 2026
Merged

alexey-milovidov merged 2 commits into
masterfrom
delta-lake-delta-rs-duckdb-tables

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Adopt Delta tables from the test suites of delta-rs (Apache-2.0, crates/test/tests/data, commit 460c9040) and duckdb-delta (MIT, data/inlined, commit 94dde628, license notice included) as stateless tests that read them with deltaLakeLocal. The data is 3.5 MB under tests/queries/0_stateless/data_delta_lake/{delta_rs,duckdb} with provenance READMEs. Tables duplicating the delta-kernel-rs test data were skipped.

Expected rows come from upstream assertions where they exist (delta-rs Python/Rust tests, duckdb-delta sqllogictests) and were otherwise checked against an independent replay of the Delta log over the raw Parquet files.

Coverage: tables written by old Delta/delta-rs writers, stale _last_checkpoint, checkpoints with stats_parsed only or no statistics, checkpointProtection, log-only tables (time travel, vacuumed versions), NULL and URI-escaped partition values, typed partitions, column mapping in id and name modes (renames, partitions, quoted names, legacy protocol, invalid annotations), deletion vectors with checkpoints, in-commit timestamps, liquid clustering with row tracking, Spark INT96 in nested types, and refusal of unknown reader features, unsupported types, catalog-managed tables and Variant.

Fixtures that ClickHouse currently reads incorrectly are committed but not queried; see the header of 05554_delta_lake_duckdb_column_mapping.sh:

  • In column mapping id mode, columns are resolved by physical name instead of the Parquet field id, so files that name columns by logical name read as default values (id_mode_logical_names, id_mode_nested_struct, id_mode_containers_nested_ids), and unresolvable files return default values instead of an error.
  • delta.columnMapping.mode without the columnMapping feature is refused by delta-kernel-rs instead of being ignored.

Related: #129103

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

🤖 Generated with Claude Code


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

Version info

  • Merged into: 26.11.1.1473-master (included in 26.11 and later)

Adopt Delta tables from the test suites of delta-rs (Apache-2.0) and duckdb-delta (MIT)
as stateless tests reading them with `deltaLakeLocal`. Expected rows were taken from
upstream assertions where they exist and otherwise checked against an independent replay
of the Delta log over the raw Parquet files.

- `05550_delta_lake_delta_rs_legacy_writers`: tables written by Delta 0.2/0.8/1.2.1,
  delta-rs Python 0.25.5, `checkpointProtection`, a stale `_last_checkpoint`, statistics
  only in `stats_parsed` or missing.
- `05551_delta_lake_delta_rs_partitions`: NULL and URI-escaped partition values, numeric
  and typed partitions, partition columns renamed or with spaces under column mapping.
- `05552_delta_lake_delta_rs_log_only_tables`: log replay, checkpoints and time travel
  on tables with only `_delta_log`, including vacuumed versions.
- `05553_delta_lake_delta_rs_table_features`: deletion vectors with checkpoints,
  in-commit timestamps, liquid clustering with row tracking, out-of-range INT96,
  an unknown reader feature, `Variant`.
- `05554_delta_lake_duckdb_column_mapping`: column mapping fixtures in `id` and `name`
  modes, Spark-written renames, partitions and quoted field names, invalid annotations.
- `05555_delta_lake_duckdb_fixtures`: Spark INT96 in nested types, in-commit timestamps,
  partition filters, `char`/`varchar`, unsupported types, catalog-managed tables.

Fixtures that ClickHouse currently reads incorrectly are present but not queried;
the reasons are listed in the header of `05554_delta_lake_duckdb_column_mapping.sh`.

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

clickhouse-gh Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [3c2aa1b]

Summary: ✅


AI Review

Summary

Adds six stateless interoperability tests for deltaLakeLocal using fixtures from delta-rs and duckdb-delta. No actionable findings. All six scripts exited successfully and matched their reference output byte for byte in local validation.

Missing context / blind spots
Final Verdict

Status: ✅ Approve. No changes requested.

@clickhouse-gh clickhouse-gh Bot added pr-not-for-changelog This PR should not be mentioned in the changelog comp-testing Test content only (no production code). labels Nov 3, 2026
…fixtures

The columns `ls` (`Array(Tuple(...))`) and `m` (`Map(..., Tuple(...))`) of `spark_nested_name_mode` and
`spark_nested_id_mode` were not queried because ClickHouse read them incorrectly; it is fixed now. The results
are the same as expected by duckdb-delta.

Related: #129103

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov alexey-milovidov self-assigned this Nov 5, 2026

@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.

LGTM

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Nov 5, 2026
Merged via the queue into master with commit 3f74fbe Nov 5, 2026
185 checks passed
@alexey-milovidov
alexey-milovidov deleted the delta-lake-delta-rs-duckdb-tables branch November 5, 2026 23:39
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 5, 2026
@clickhouse-gh clickhouse-gh Bot added comp-delta-lake Delta Lake tables: reading Delta metadata through delta-kernel-rs (table snapshots, schema and ty... 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-delta-lake Delta Lake tables: reading Delta metadata through delta-kernel-rs (table snapshots, schema and ty... pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants