Skip to content

Commit c64c89f

Browse files
[SPEC] Add implementation note about schema evolution (#13936)
* [SPEC] Add implementation note about schema evolution * rephrase * rephrase * try to address feedback * Update format/spec.md Co-authored-by: Russell Spitzer <[email protected]> --------- Co-authored-by: Russell Spitzer <[email protected]>
1 parent 2a33050 commit c64c89f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

format/spec.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,6 +1861,16 @@ Java writes `-1` for "no current snapshot" with V1 and V2 tables and considers t
18611861

18621862
Some implementations require that GZIP compressed files have the suffix `.gz.metadata.json` to be read correctly. The Java reference implementation can additionally read GZIP compressed files with the suffix `metadata.json.gz`.
18631863

1864+
### Schema evolution and writing with old schemas
1865+
1866+
Writers must write out all fields with the types specified from a schema present in table metadata. Writers should use the latest schema for writing. Not writing out all columns or not using the latest schema can change the semantics of the data written. The following are possible inconsistencies that can be introduced:
1867+
1868+
* For all null columns, not writing out the column would cause `initial-default` value would be applied on reading instead of `null`.
1869+
* If `write-default` has been changed then using an out-of-date schema would result in the incorrect value being populated.
1870+
* If a `write` is the result of a partial row update (e.g. `update table set col_y = 'xyz'`) an out-of-date schema would silently drop values.
1871+
1872+
Column projection rules are designed so that the table will remain readable even if writers use an outdated schema.
1873+
18641874
## Appendix G: Geospatial Notes
18651875

18661876
The Geometry and Geography class hierarchy and its Well-known text (WKT) and Well-known binary (WKB) serializations (ISO supporting XY, XYZ, XYM, XYZM) are defined by [OpenGIS Implementation Specification for Geographic information – Simple feature access – Part 1: Common architecture](https://portal.ogc.org/files/?artifact_id=25355), from [OGC (Open Geospatial Consortium)](https://www.ogc.org/standard/sfa/).

0 commit comments

Comments
 (0)