szehon-ho commented on code in PR #9661: URL: https://github.com/apache/iceberg/pull/9661#discussion_r1484906656
########## format/spec.md: ########## @@ -1150,13 +1161,17 @@ Sort orders are serialized as a list of JSON object, each of which contains the Each sort field in the fields list is stored as an object with the following properties: -|Field|JSON representation|Example| -|--- |--- |--- | -|**`Sort Field`** [1,2]|`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 />`}`| +| V1 | V2 | V3 | Field | JSON representation | Example | +|----------|----------|----------|------------------|---------------------|-------------| +| required | required | required | **`transform`** | `JSON string` | `bucket[4]` | +| required | required | required | **`source-id`** | `JSON int` | 1 | +| | | optional | **`source-ids`** | `JSON list` | `[1,2]` | +| required | required | required | **`direction`** | `JSON string` | `asc` | +| required | required | required | **`null-order`** | `JSON string` | `nulls-last`| Notes: 1. For sort fields with a transform with a single argument, the ID of the source field is set on `source-id`, and `source-ids` is omitted. -2. For sort fields with a transform of multiple arguments, the IDs of the source fields are set on `source-ids`. To preserve backward compatibility, `source-id` is set to -1. +2. For sort fields with a transform with multiple arguments, the IDs of the source fields are set on `source-ids`, and `source-id` is set to -1. This is only allowed in tables of version >= V3, or in tables of version >= V2 where compatibility.multi-arg-transform.enabled is true. In the latter case, no guarantees are made that all implementations will successfully read/write this table metadata. Review Comment: Sorry its quite ingrained as a habit, tried to fix all the instances. -- 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