laskoviymishka commented on code in PR #824:
URL: https://github.com/apache/iceberg-go/pull/824#discussion_r3018460862
##########
table/sorting.go:
##########
@@ -84,15 +105,36 @@ func (s *SortField) MarshalJSON() ([]byte, error) {
}
}
+ if len(s.SourceIDs) > 1 {
+ return json.Marshal(struct {
+ SourceIDs []int `json:"source-ids"`
+ Transform iceberg.Transform `json:"transform"`
+ Direction SortDirection `json:"direction"`
+ NullOrder NullOrder `json:"null-order"`
+ }{s.SourceIDs, s.Transform, s.Direction, s.NullOrder})
+ }
+
type Alias SortField
return json.Marshal((*Alias)(s))
}
Review Comment:
spec is quite flexible here :(
--
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]