Fokko commented on code in PR #12644:
URL: https://github.com/apache/iceberg/pull/12644#discussion_r2016270408


##########
format/spec.md:
##########
@@ -1453,13 +1457,15 @@ Each sort field in the fields list is stored as an 
object with the following pro
 
 | V1       | V2       | V3       | Field            | JSON representation | 
Example     |
 
|----------|----------|----------|------------------|---------------------|-------------|
-| required | required | required | **`transform`**  | `JSON string`       | 
`bucket[4]` |
-| required | required | omitted  | **`source-id`**  | `JSON int`          | 1  
         |
+| required | required | required¹ | **`transform`**  | `JSON string`       | 
`bucket[4]` |
+| required | required | required¹ | **`source-id`**  | `JSON int`          | 1 
          |
 |          |          | required | **`source-ids`** | `JSON list of ints` | 
`[1,2]`     |
 | required | required | required | **`direction`**  | `JSON string`       | 
`asc`       |
 | required | required | required | **`null-order`** | `JSON string`       | 
`nulls-last`|
 
-In v3 metadata, writers must use only `source-ids` because v3 requires reader 
support for multi-arg transforms.
+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.

Review Comment:
   This was the idea:
   
   
![image](https://github.com/user-attachments/assets/16f9fe8f-dc6d-446b-8a2d-d2e03a82d1e9)
   
   But I guess it is not obvious? I think @wgtmac raised the same question in 
https://github.com/apache/iceberg/pull/12644#discussion_r2015906621?
   



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

Reply via email to