Repository navigation
Add Iceberg tables from the parquetry test kit as stateless tests - #130017
alexey-milovidov wants to merge 7 commits into
Conversation
16 Iceberg tables from https://github.com/tileverse-io/parquetry/tree/fba9d4db27f93fd7e21f2dd121bd81f40646347e/internal/parquetry-testkit/src/main/resources (Apache-2.0), including the vendored https://github.com/jatorre/iceberg-geo-testbed (Apache-2.0): positional and equality deletes, deletion vectors, every scalar type, row lineage, identity partitions omitted from data files, name mapping, and geospatial tables. The expected results are taken from the generator documentation and tests of parquetry and the geo testbed. `05738_iceberg_tileverse_row_lineage` fails until a data file that materializes `_row_id` is no longer pruned by its `first_row_id` range. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [3c7aa2c] Summary: ❌
AI ReviewSummaryAdds five stateless tests covering 16 upstream Iceberg tables, including deletes, scalar types, partitions, name mapping, row lineage, and geometry. Reviewed head Missing context / blind spots
Findings❌ Blockers
Final VerdictStatus: ❌ Block Move the binary corpus outside Git and confirm that all five tests pass. The author’s decision is recorded above; the existing thread is left unchanged. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A row's `_row_id` is the value stored in the data file, or `first_row_id` plus its position where the file stores NULL; `_last_updated_sequence_number` falls back to the data sequence number the same way. The manifest-level pruning used the declared bounds of a lineage column only when the column has no nulls, and otherwise the range `[0, first_row_id + record_count - 1]` (`[0, sequence number]`), which assumes a stored value is below the inherited block. Files that store values above it (compaction or copy-on-write keeping row ids, or other writers) were skipped and their rows lost: `WHERE _row_id > 1000` on the parquetry `iceberg-row-lineage/materialized` table returned nothing instead of ids 6 and 8, and the DuckDB `row_lineage_stored_columns` table (no statistics at all) lost the rows with stored `_row_id` 100/103 and sequence numbers 7/9. A file is now pruned by a lineage column only when its manifest declares bounds for it; when some rows may store NULL the range is the hull of the declared bounds and the inherited range. Without declared bounds (absent, undecodable or inverted) the file is not pruned by that column. The early returns for a missing `first_row_id`, an empty file, a negative sequence number and a block that does not fit in UInt64 stay as they were. The new test vendors both tables unmodified, at the paths used by ClickHouse#130017 and ClickHouse#130010. Closes ClickHouse#130022 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The style check failed with `Gap (5567, 5735) > 100`: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=130017&sha=db98eef79a65e9fa724fe6ff7ac08bdd940fc071&name_0=PR&name_1=Style%20check PR: #130017 Co-Authored-By: Claude Opus 5.5 <[email protected]>
| `59f47a71f641f14994f54e279791e8188edc723f` (Apache License 2.0, | ||
| https://github.com/jatorre/iceberg-geo-testbed/blob/59f47a71f641f14994f54e279791e8188edc723f/LICENSE). | ||
|
|
||
| All 16 tables are included, the files are not modified: |
There was a problem hiding this comment.
[Blocker] Fetch the binary corpus instead of committing it
This import adds 129 binary fixture files (86 Parquet, 42 Avro, and one Puffin), totaling 2,135,120 bytes, directly to Git. That makes the corpus a permanent cost for every full clone; deleting the files later does not remove their blobs from history. The review instructions prohibit committing binary datasets of this size. Please store the corpus as external test data and stage it from a pinned, checksum-verified source during test setup, retaining the existing assertions and directory layout.
There was a problem hiding this comment.
🕵 Not changed for now, a maintainer should decide this. Reasons for keeping the files in the repository: stateless tests are hermetic and run without network access, so fetching from an external source at setup would add a new dependency and a failure mode to CI. The repository already keeps comparable binary fixtures for stateless tests (data_iceberg was 1.1 MB before this PR, data_minio is 8.5 MB). This corpus is about 2.1 MB, its files are small, and they are copied unmodified from a pinned upstream commit, so they will not churn. If the maintainers prefer external storage, the tests can be changed to stage the corpus from a pinned, checksum-verified archive.
…verse fixtures Apache License 2.0 section 4(d) requires retaining the attribution of the upstream `NOTICE` file when redistributing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adopt the Iceberg tables of the parquetry test kit (
internal/parquetry-testkit/src/main/resources/iceberg-*at https://github.com/tileverse-io/parquetry/tree/fba9d4db27f93fd7e21f2dd121bd81f40646347e/internal/parquetry-testkit/src/main/resources, Apache-2.0) as stateless tests. It includes the geospatial tables of https://github.com/jatorre/iceberg-geo-testbed (commit59f47a71f641f14994f54e279791e8188edc723f, Apache-2.0), which parquetry vendors. Most tables were written by the Apache Iceberg 1.11.0 Java API or Spark; the rest by PyIceberg.All 16 tables (151 files, 2.2 MB) are added to
tests/queries/0_stateless/data_iceberg/tileverse, unmodified. Their locations are rooted atfile:///iceberg-<corpus>/<table>. The expected results come from the parquetry generator documentation (row sets and per-row lineage values that Iceberg's own reader reports), the parquetry tests, and the testbed's California probe (196 rows). Pseudo-random columns are checked with aggregates that match PyIceberg 0.12.0 and reading the Parquet files directly.Tests:
05616_iceberg_tileverse_deletes: positional deletes (Spark), equality deletes with a NULL key component, an equality delete keyed on an identity partition column that is omitted from the data files, and a deletion vector.05617_iceberg_tileverse_scalar_types: every scalar type in a v3 table (timestamp[tz],timestamp[tz]_ns,time,decimalon INT32 and FIXED_LEN_BYTE_ARRAY,uuid,fixed,binary,date), partitioned byidentity(ts), with partition-scoped equality deletes keyed onuuidanddecimal, plus filters on each bound encoding.05618_iceberg_tileverse_partitioned_name_mapping: identity partitions with the column kept in or omitted from the data files, and a migrated table without Parquet field ids, read throughschema.name-mapping.default.05619_iceberg_tileverse_row_lineage:_row_idinherited cumulatively within a manifest (data filefirst_row_idis NULL), and_row_idmaterialized in a data file with a mix of stored and NULL cells.05620_iceberg_tileverse_geo: flat bbox columns, a bbox struct, the GeoIceberg V2 convention with WKB, nativegeometry(allow_geo_types_in_iceberg) with and without materialized lineage columns, and the California probe.iceberg-deletes/positional: parquetry expects 890 rows, but when the table was vendored, thefile_pathbounds of the position delete file were not rewritten. They still name the data file at its generation path, so Apache Iceberg (DeleteFileIndex) and PyIceberg do not apply the delete file and return 1000 rows. This is a defect of the upstream fixture (parquetry's vendoring step), not of ClickHouse. ClickHouse returns 1000 rows too, and the reference keeps that (explained in the test and the README).The row lineage pruning bug that
05619_iceberg_tileverse_row_lineageexposed (files with a stored_row_idwere pruned by theirfirst_row_idrange) is fixed on master by #130100, which vendored the sameiceberg-row-lineage/materializedtable.Related: #130022
Related: #130100
All five tests pass on master.
Changelog category (leave one):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/130017]