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
fix: address PR feedback to match Java implementations
Changes based on review feedback from @wgtmac:
1. AssertRefSnapshotID: Updated to match Java implementation
- Removed null base check (Java doesn't check, assumes base exists)
- Updated error messages to match Java version
- "was created concurrently" when ref shouldn't exist but does
- "has changed: expected id X != Y" when snapshot IDs don't match
- "is missing, expected X" when ref should exist but doesn't
2. AssertLastAssignedFieldId: Allow null base metadata
- Changed to "if (base && ...)" pattern
- Null base is valid for new tables
3. AssertLastAssignedPartitionId: Allow null base metadata
- Changed to "if (base && ...)" pattern
- Null base is valid for new tables
4. AssertDefaultSpecID: Updated to match Java implementation
- Removed null base check (assumes base is never null)
- Updated error message: "default partition spec changed: expected id X != Y"
5. AssertDefaultSortOrderID: Updated to match Java implementation
- Removed null base check (assumes base is never null)
- Updated error message: "default sort order changed: expected id X != Y"
All implementations now follow Java patterns from:
iceberg-java/core/src/main/java/org/apache/iceberg/UpdateRequirement.java
Updated tests to match new behavior:
- Updated error message assertions
- Removed NullBase tests for methods that don't check null (would cause segfault)
- Changed NullBase tests to expect success for methods that allow null base
0 commit comments