fallintoplace opened a new pull request, #1313:
URL: https://github.com/apache/iceberg-go/pull/1313

   Summary
   
   - reject sort fields that omit both source-id and source-ids
   - reject zero or negative sort source IDs for both JSON metadata and 
NewSortOrder
   - add regression coverage for missing, empty, zero, negative, and mixed 
invalid source IDs
   
   Why
   
   SortField.UnmarshalJSON treated a missing source-id as the Go zero value and 
accepted it as source ID 0. That allowed invalid sort metadata to enter the 
table model and fail later during compatibility checks or other sort-order use.
   
   Testing
   
   - go test ./table -run 
'Test(NewSortOrderRejectsInvalidSourceIDs|SortFieldMultiArgSourceIDs|UnmarshalSortOrderDefaults|UnmarshalInvalidSort)'
 -count=1
   - go test ./table -count=1
   - go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run 
--timeout=10m ./table/...
   - git diff --check


-- 
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]

Reply via email to