This is an automated email from the ASF dual-hosted git repository.
zeroshade pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-go.git
The following commit(s) were added to refs/heads/main by this push:
new c0be1fa34 fix(table)!: use canonical snapshot timestamp reserved key
(#2323)
c0be1fa34 is described below
commit c0be1fa342abee505200c6cf110f5bc4398f9e05
Author: Minh Vu <[email protected]>
AuthorDate: Mon Oct 26 19:04:01 2026 +0100
fix(table)!: use canonical snapshot timestamp reserved key (#2323)
* fix(table): match Java's reserved snapshot timestamp property
Signed-off-by: Minh Vu <[email protected]>
* docs(release): note v1 API compatibility change
* chore: sync release notes with main to resolve conflicts
* test(table): assert reserved timestamp behavior without coupling to list
shape
---------
Signed-off-by: Minh Vu <[email protected]>
Co-authored-by: Matt Topol <[email protected]>
---
table/metadata_builder_internal_test.go | 18 ++++++++++++++++++
table/properties.go | 2 +-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/table/metadata_builder_internal_test.go
b/table/metadata_builder_internal_test.go
index 639da6d7b..81491902f 100644
--- a/table/metadata_builder_internal_test.go
+++ b/table/metadata_builder_internal_test.go
@@ -2198,6 +2198,24 @@ func TestSetReservedPropertiesFails(t *testing.T) {
require.ErrorContains(t, err, "can't set reserved property
"+PropertyCurrentSnapshotId)
}
+func TestSnapshotTimestampReservedPropertyKey(t *testing.T) {
+ const canonical = "current-snapshot-timestamp-ms"
+ const oldKey = "current-snapshot-timestamp"
+
+ require.Equal(t, canonical, PropertyCurrentSnapshotTimestamp)
+
+ builder := builderWithoutChanges(2)
+ require.ErrorContains(t,
builder.SetProperties(iceberg.Properties{canonical: "123"}), "can't set
reserved property "+canonical)
+ require.ErrorContains(t, builder.RemoveProperties([]string{canonical}),
"can't remove reserved property "+canonical)
+ require.False(t, builder.HasChanges())
+
+ // The old spelling is not reserved by Iceberg.
+ require.NoError(t, builder.SetProperties(iceberg.Properties{oldKey:
"custom"}))
+ require.Equal(t, "custom", builder.props[oldKey])
+ require.NoError(t, builder.RemoveProperties([]string{oldKey}))
+ require.NotContains(t, builder.props, oldKey)
+}
+
func TestSetPropertiesClonesProperties(t *testing.T) {
builder := builderWithoutChanges(2)
diff --git a/table/properties.go b/table/properties.go
index f2ba0cb59..46eb237a4 100644
--- a/table/properties.go
+++ b/table/properties.go
@@ -227,7 +227,7 @@ const (
PropertySnapshotCount = "snapshot-count"
PropertyCurrentSnapshotId = "current-snapshot-id"
PropertyCurrentSnapshotSummary = "current-snapshot-summary"
- PropertyCurrentSnapshotTimestamp = "current-snapshot-timestamp"
+ PropertyCurrentSnapshotTimestamp = "current-snapshot-timestamp-ms"
PropertyCurrentSchema = "current-schema"
PropertyDefaultPartitionSpec = "default-partition-spec"
PropertyDefaultSortOrder = "default-sort-order"