Schema Evolution: Prove the Field-ID Claim
run(ctx, spark, "ALTER TABLE hms.db.orders RENAME COLUMN status TO order_status")
run(ctx, spark, "ALTER TABLE hms.db.orders ADD COLUMN retry_count INT")
run(ctx, spark, "ALTER TABLE hms.db.orders ALTER COLUMN retry_count TYPE BIGINT")That last line is a type promotion, not an arbitrary type change — int → long is one of the handful Iceberg allows without a rewrite (alongside float → double and widening a decimal's precision at fixed scale). Try promoting the other direction, or something outside that allow-list, and Spark rejects it outright rather than silently truncating data.
Now the actual proof. Every Parquet file written before the rename has a column physically named status inside it — nobody rewrote those files. Query the current table, using the new name, filtered down to a row written in the Literal INSERT ... VALUES section, long before the rename existed:
run(ctx, spark, `
SELECT order_id, order_status FROM hms.db.orders WHERE order_id = 1001`)+--------+------------+
|order_id|order_status|
+--------+------------+
|1001 |COMPLETED |
+--------+------------+That value was read out of a Parquet file whose column is still named status on disk — confirm it directly if you want zero doubt:
You do not need to install anything to check this. Point Spark's plain Parquet reader at that one file — bypassing Iceberg, and therefore bypassing the field-ID mapping entirely — and ask what columns it physically contains:
run(ctx, spark, "DESCRIBE SELECT * FROM parquet.`file:///abs/path/to/order_ts_day=2026-01-15/00000-20-....parquet`")+-----------+-------------+-------+
|col_name |data_type |comment|
+-----------+-------------+-------+
|order_id |bigint |NULL |
|customer_id|bigint |NULL |
|order_ts |timestamp |NULL |
|amount |decimal(10,2)|NULL |
|status |string |NULL | <- the OLD name, on disk, right now
|country |string |NULL |
+-----------+-------------+-------+
# no "order_status" anywhere in the file — yet the Iceberg query above
# returned that column's value without rewriting a single byteThe query engine resolved order_status → field ID 5 → the physical column named status inside that specific file, transparently, using the same schemas array from metadata.json you read directly in the Read metadata.json straight, in Go section. This is the mechanism, not an analogy for it.