twuebi commented on code in PR #1665:
URL: https://github.com/apache/iceberg-go/pull/1665#discussion_r3750103021
##########
table/sorting.go:
##########
@@ -191,9 +191,11 @@ func (s *SortField) UnmarshalJSON(b []byte) error {
return nil
}
+// Zero is valid: unbound sort orders carry client ordinal placeholder IDs that
+// start at 0. CheckCompatibility rejects IDs that don't resolve against a
schema.
func validateSortSourceID(id int) error {
- if id <= 0 {
- return fmt.Errorf("source ID must be positive: %d", id)
+ if id < 0 {
Review Comment:
NewSortOrder rejects source-id 0 again and
TestNewSortOrderRejectsZeroSourceID is restored
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]