advancedxy commented on code in PR #8579: URL: https://github.com/apache/iceberg/pull/8579#discussion_r1453308229
########## format/spec.md: ########## @@ -1149,6 +1195,12 @@ Each sort field in the fields list is stored as an object with the following pro |--- |--- |--- | |**`Sort Field`**|`JSON object: {`<br /> `"transform": <transform JSON>,`<br /> `"source-id": <source id int>,`<br /> `"direction": <direction string>,`<br /> `"null-order": <null-order string>`<br />`}`|`{`<br /> ` "transform": "bucket[4]",`<br /> ` "source-id": 3,`<br /> ` "direction": "desc",`<br /> ` "null-order": "nulls-last"`<br />`}`| +Similar with partition fields, sort fields could also contain multi source-ids for sorting: + +| Field | JSON representation | Example | +|---------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **`Sort Field(multi-arg transform)`** | `JSON object: {`<br /> `"transform": <transform JSON>,`<br /> `"source-id": -1,`<br /> `"source-ids": <list of ids>,`<br /> `"direction": <direction string>,`<br /> `"null-order": <null-order string>`<br />`}` | `{`<br /> ` "transform": "bucketV2[4]",`<br /> ` "source-id": -1,`<br /> ` "source-id": [1,2],`<br /> ` "direction": "desc",`<br /> ` "null-order": "nulls-last"`<br />`}` | Review Comment: Thanks for your suggestion. I added the notes, and after reviewing this part, I think the table of `Sort Fields` could be more consistent with `Partition Fields` and therefore changes that part. WDYT? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org