You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/docs/spec.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -646,6 +646,18 @@ Each partition field in the fields list is stored as an object. See the table fo
646
646
647
647
In some cases partition specs are stored using only the field list instead of the object format that includes the spec ID, like the deprecated `partition-spec` field in table metadata. The object format should be used unless otherwise noted in this spec.
648
648
649
+
#### Partition Field ID handling
650
+
651
+
A partition field id is an integer (starting at 1000) used to identify a partition field.
652
+
653
+
Since iceberg release 0.8.0, partition fields are present in every partition field of partition specs in a table metadata.
654
+
655
+
* For backward compatibility, if field ids are missing in a table metadata, iceberg will sequentially generate ids for each field starting at 1000 based on its position in the list of fields.
656
+
* For forward compatibility, if field ids are not supported, iceberg will ignore field ids.
657
+
658
+
Additionally, in table metadata format v2, partition fields are required to have unique field IDs to support partition spec evolution.
659
+
660
+
For tables without partition field IDs, iceberg will generate an auto-increment unique field id starting at 1000 for every partition field.
649
661
650
662
### Table Metadata and Snapshots
651
663
@@ -698,14 +710,17 @@ This serialization scheme is for storing single values as individual binary valu
698
710
### Version 2
699
711
700
712
Writing v1 metadata:
713
+
701
714
* Table metadata field `last-sequence-number` should not be written.
702
715
* Snapshot field `sequence-number` should not be written.
703
716
704
717
Reading v1 metadata:
718
+
705
719
* Table metadata field `last-sequence-number` must default to 0.
706
720
* Snapshot field `sequence-number` must default to 0.
707
721
708
722
Writing v2 metadata:
723
+
709
724
* Table metadata added required field `last-sequence-number`.
710
725
* Table metadata now requires field `table-uuid`.
711
726
* Table metadata now requires field `partition-specs`.
0 commit comments