twuebi commented on code in PR #1665:
URL: https://github.com/apache/iceberg-go/pull/1665#discussion_r3750086974


##########
partitions.go:
##########
@@ -162,10 +162,13 @@ func (p *PartitionField) UnmarshalJSON(b []byte) error {
        } else {
                p.SourceIDs = []int{aux.SourceID}
        }
+       // Positivity only holds for specs already bound to a schema. Decoding 
also
+       // covers unbound specs from create-table and commit requests, whose 
source
+       // IDs are client ordinal placeholders starting at 0, remapped by name 
at
+       // bind time.
        for _, sourceID := range p.SourceIDs {
-               _, isVoid := p.Transform.(VoidTransform)
-               if sourceID <= 0 && (!isVoid || hasSourceID || hasSourceIDs) {
-                       return fmt.Errorf("%w: partition source ID must be 
positive: %d", ErrInvalidPartitionSpec, sourceID)
+               if sourceID < 0 {

Review Comment:
   Done



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