This is an automated email from the ASF dual-hosted git repository.

laskoviymishka pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-verification.git


The following commit(s) were added to refs/heads/main by this push:
     new 77c27f4  Policy: Update reference tables README to allow table 
corrections and additive changes (#30)
77c27f4 is described below

commit 77c27f4426c9a2b734d7098a60ed1311204c4654
Author: Sung Yun <[email protected]>
AuthorDate: Thu Nov 19 03:03:27 2026 -0500

    Policy: Update reference tables README to allow table corrections and 
additive changes (#30)
    
    * update reference tables README to allow table corrections and additive 
changes
    
    * introduce 'Scope' section to reference tables README
---
 reference-tables/README.md                         | 52 +++++++++++++++++-----
 .../v1/partitioned-parquet-data/README.md          | 18 ++++++++
 .../v2/nested-types-parquet-data/README.md         | 14 ++++++
 .../v2/partitioned-parquet-data/README.md          | 15 +++++++
 .../v2/simple-append-parquet-data/README.md        | 14 ++++++
 .../v3/deletion-vector-parquet-data/README.md      | 12 +++++
 .../v3/initial-default-parquet-data/README.md      | 15 +++++++
 7 files changed, 130 insertions(+), 10 deletions(-)

diff --git a/reference-tables/README.md b/reference-tables/README.md
index acfdbb1..585b117 100644
--- a/reference-tables/README.md
+++ b/reference-tables/README.md
@@ -112,8 +112,37 @@ Consumers read it; the `description` field is 
documentation and is ignored.
 }
 ```
 
-A table is written once and not regenerated, so `written-by` is per table: the
-corpus holds whatever version was current when each table was added.
+`written-by` is per table: the corpus holds whatever version was current when
+each table was written.
+
+A table may be regenerated to cover more of its Scope, or to correct it.
+
+An addition must keep these invariants:
+
+- The table's Scope must remain the same: an addition may only cover more of
+  what it states.
+- `written-by` must remain the same: the same release must write the table.
+- The Input's existing `commits` must remain the same, in the same order.
+- The Input may gain columns with new field IDs or rows, and must not lose any.
+- Restricted to the field IDs the table had before, every row of the previous
+  `expected/scan.json` must appear in the snapshot that the same commit
+  produces.
+
+A correction must keep these invariants:
+
+- The table's Scope must remain the same.
+- Every change must be to something wrong: the table does not match its Input,
+  or the Input does not match the spec.
+- `written-by` must remain the same, unless the fault is in that release. The
+  new release must then be the table's `written-by` in `index.json`, and its
+  departures from the spec documented.
+- The pull request must name each expected value that changed and the spec rule
+  it now follows.
+
+Any other change must be a new table. Snapshot IDs, UUIDs and file names are
+random, so a regeneration rewrites every file: the Input and
+`expected/scan.json` are the reviewable diff, and the pull request must say
+that the table was regenerated and why.
 
 `GenerateTables.java` writes these tables. It is compiled against
 `org.apache.iceberg:iceberg-core`, `iceberg-data` and `iceberg-parquet` 1.11.0
@@ -121,14 +150,17 @@ and `org.apache.hadoop:hadoop-common` 3.4.1, and 
parquet-mr 1.17.1 comes with
 `iceberg-parquet`. Its main class is
 `org.apache.iceberg.verification.GenerateTables`. It is not built or run by CI.
 
-Each table directory holds a `README.md` whose Input section gives the table's
-format version, schema, partition spec, and each commit: the rows of one data
-file, the data files of one append, the row positions of one data file that a
-deletion vector deletes, or the updates of a schema change. The generator reads
-that input, creates the table with `HadoopTables`, and commits each in turn,
-writing a deletion vector with Iceberg's `BaseDVFileWriter` in a row delta. It
-writes each table directly at the sentinel root, so the absolute paths are
-correct as written and nothing is rewritten. After writing, it prunes earlier
+Each table directory holds a `README.md` with a Scope section and an Input
+section. Every table makes the assertion above, so the Scope is what sets a
+table apart: it states the reader behavior the table exercises, and what it
+deliberately leaves out and why. The Input section gives the table's format
+version, schema, partition spec, and each commit: the rows of one data file, 
the
+data files of one append, the row positions of one data file that a deletion
+vector deletes, or the updates of a schema change. The generator reads that
+input, creates the table with `HadoopTables`, and commits each in turn, writing
+a deletion vector with Iceberg's `BaseDVFileWriter` in a row delta. It writes
+each table directly at the sentinel root, so the absolute paths are correct as
+written and nothing is rewritten. After writing, it prunes earlier
 `metadata.json` files and deletes Hadoop's `.crc` sidecars and
 `version-hint.text`. Output is not byte-reproducible, because Iceberg assigns
 random UUIDs, snapshot IDs and timestamps.
diff --git a/reference-tables/v1/partitioned-parquet-data/README.md 
b/reference-tables/v1/partitioned-parquet-data/README.md
index 686c64b..1e96f20 100644
--- a/reference-tables/v1/partitioned-parquet-data/README.md
+++ b/reference-tables/v1/partitioned-parquet-data/README.md
@@ -23,6 +23,24 @@ Input to `reference-tables/GenerateTables.java`. The schema 
and partition spec a
 the spec's JSON forms. Each commit appends one data file holding its rows, 
written
 in the spec's single-value JSON keyed by field ID, with `long` values as 
strings.
 
+## Scope
+
+Partitioned scans in a v1 table: an identity partition on a `string` and a 
`day`
+transform on a `timestamptz`, with one data file per partition across two
+snapshots. It is the v1 twin of `v2/partitioned-parquet-data`, so a difference
+between the two points at v1 partition metadata, including the fields the spec
+omits for v1 that Iceberg Java writes anyway (see "Writer behavior outside the
+spec").
+
+The two transforms stand for the two ways a partition value relates to its
+source: `identity` stores the source value itself, while `day` stores a value
+derived from it, of a different type, as `year`, `month` and `hour` also do. A
+reader must read both kinds of partition tuple from the manifests. Two rows
+share the first partition and the second snapshot adds another, so each 
snapshot
+sees a different set of partitions. Other transforms are left out: their values
+are covered by `table-spec/partition-transforms`, and this table checks that
+partition metadata is read, not how each transform computes its value.
+
 ## Input
 
 ```json
diff --git a/reference-tables/v2/nested-types-parquet-data/README.md 
b/reference-tables/v2/nested-types-parquet-data/README.md
index fae1545..1cbe8e8 100644
--- a/reference-tables/v2/nested-types-parquet-data/README.md
+++ b/reference-tables/v2/nested-types-parquet-data/README.md
@@ -23,6 +23,20 @@ Input to `reference-tables/GenerateTables.java`. The schema 
and partition spec a
 the spec's JSON forms. Each commit appends one data file holding its rows, 
written
 in the spec's single-value JSON keyed by field ID, with `long` values as 
strings.
 
+## Scope
+
+Field IDs in nested types: a struct, a list and a map, in four rows that hold
+them populated, null, empty, and holding a null.
+
+Struct fields, list elements, and map keys and values each get their own field
+IDs, so between them the three types use every kind of nested ID a schema
+assigns, and a reader must resolve each by ID rather than by name or position.
+The rows separate the states that Parquet's three-level lists and maps encode
+differently: a populated container, a null container, an empty list and map, 
and
+a list element and a map value that are null. The struct's fields are required,
+so the struct itself is its only optional level. Partitioning, deletes and the
+breadth of primitive types are left to other tables.
+
 ## Input
 
 ```json
diff --git a/reference-tables/v2/partitioned-parquet-data/README.md 
b/reference-tables/v2/partitioned-parquet-data/README.md
index 0d926a4..750e4e9 100644
--- a/reference-tables/v2/partitioned-parquet-data/README.md
+++ b/reference-tables/v2/partitioned-parquet-data/README.md
@@ -23,6 +23,21 @@ Input to `reference-tables/GenerateTables.java`. The schema 
and partition spec a
 the spec's JSON forms. Each commit appends one data file holding its rows, 
written
 in the spec's single-value JSON keyed by field ID, with `long` values as 
strings.
 
+## Scope
+
+Partitioned scans in a v2 table: an identity partition on a `string` and a 
`day`
+transform on a `timestamptz`, with one data file per partition across two
+snapshots.
+
+The two transforms stand for the two ways a partition value relates to its
+source: `identity` stores the source value itself, while `day` stores a value
+derived from it, of a different type, as `year`, `month` and `hour` also do. A
+reader must read both kinds of partition tuple from the manifests. Two rows
+share the first partition and the second snapshot adds another, so each 
snapshot
+sees a different set of partitions. Other transforms are left out: their values
+are covered by `table-spec/partition-transforms`, and this table checks that
+partition metadata is read, not how each transform computes its value.
+
 ## Input
 
 ```json
diff --git a/reference-tables/v2/simple-append-parquet-data/README.md 
b/reference-tables/v2/simple-append-parquet-data/README.md
index 7f9ccf0..a410c74 100644
--- a/reference-tables/v2/simple-append-parquet-data/README.md
+++ b/reference-tables/v2/simple-append-parquet-data/README.md
@@ -23,6 +23,20 @@ Input to `reference-tables/GenerateTables.java`. The schema 
and partition spec a
 the spec's JSON forms. Each commit appends one data file holding its rows, 
written
 in the spec's single-value JSON keyed by field ID, with `long` values as 
strings.
 
+## Scope
+
+The baseline every reader should pass: two appends to an unpartitioned v2 
table,
+four rows, with a flat schema of `long`, `string` and `timestamptz`.
+
+The three types exist in every format version and cover the shapes most columns
+take: a fixed-width integer, a variable-length UTF-8 value, and a logical type
+carrying an annotation. Two appends give the table two snapshots and two
+manifests, so a scan at each snapshot goes through the manifest list rather 
than
+a single file. The one null, in `data` of the last row, checks that an optional
+column reads back as null. Partitioning, nested and other primitive types,
+deletes and schema changes are left to other tables, so that a failure here
+points at basic scan planning.
+
 ## Input
 
 ```json
diff --git a/reference-tables/v3/deletion-vector-parquet-data/README.md 
b/reference-tables/v3/deletion-vector-parquet-data/README.md
index 01e103a..c5dc754 100644
--- a/reference-tables/v3/deletion-vector-parquet-data/README.md
+++ b/reference-tables/v3/deletion-vector-parquet-data/README.md
@@ -25,6 +25,18 @@ each holding its rows, written in the spec's single-value 
JSON keyed by field ID
 with `long` values as strings. The second commit adds one deletion vector for 
the
 named data file, setting the listed row positions, also written as strings.
 
+## Scope
+
+Deletion vectors: one append of two data files, then a deletion vector that
+deletes positions 0 and 3 of the first file only.
+
+Two data files are needed to show that a deletion vector applies only to the
+file it references: a reader that applied it to every file would also drop rows
+of the second. The deleted positions are the first row and an interior one, so
+neither a prefix nor a contiguous range explains the result, and a null 
survives
+in one of the remaining rows. Position delete files and equality delete files
+are left out; each would need its own table.
+
 ## Input
 
 ```json
diff --git a/reference-tables/v3/initial-default-parquet-data/README.md 
b/reference-tables/v3/initial-default-parquet-data/README.md
index 1416b08..da7c688 100644
--- a/reference-tables/v3/initial-default-parquet-data/README.md
+++ b/reference-tables/v3/initial-default-parquet-data/README.md
@@ -27,6 +27,21 @@ A commit with `schema-updates` instead applies those updates 
as one schema chang
 its `write-default`, and `update-default` changes a column's `write-default`.
 Rows of later commits are written in the evolved schema.
 
+## Scope
+
+Default values: three columns added after the first append, a required `int`
+with an `initial-default` of 42, an optional `string` with an `initial-default`
+of "none", and an optional `string` without one, after which the `int`'s
+`write-default` changes to 10.
+
+The three columns are the three ways a field missing from a data file resolves:
+a required column that only its `initial-default` makes readable, an optional
+column with an `initial-default`, and an optional column that falls back to
+null. Changing the `write-default` afterwards checks that rows written before
+the change still read the `initial-default`, which never changes. The second
+data file supplies every column, so values written after the change read back 
as
+written.
+
 `expected/scan.json` has no entry for the first snapshot. The spec does not say
 which schema a scan at an earlier snapshot projects, so that assertion is left
 out until it is settled.

Reply via email to