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


##########
format/spec.md:
##########
@@ -1414,12 +1414,16 @@ Each partition field in `fields` is stored as a JSON 
object with the following p
 
 | V1       | V2       | V3       | Field            | JSON representation | 
Example      |
 
|----------|----------|----------|------------------|---------------------|--------------|
-| required | required | omitted  | **`source-id`**  | `JSON int`          | 1  
          |
-|          |          | required | **`source-ids`** | `JSON list of ints` | 
`[1,2]`      |
+| required | required | required¹ | **`source-id`**  | `JSON int`          | 1 
           |
+|          |          | required¹ | **`source-ids`** | `JSON list of ints` | 
`[1,2]`      |
 |          | required | required | **`field-id`**   | `JSON int`          | 
1000         |
 | required | required | required | **`name`**       | `JSON string`       | 
`id_bucket`  |
 | required | required | required | **`transform`**  | `JSON string`       | 
`bucket[16]` |
 
+Notes:
+
+1. For partition 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 makes the serialization logic much easier, since we don't need to know 
about the table version. Otherwise, we would need to plumb down the table 
version into the 
[serializer](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/PartitionSpecParser.java#L101).



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