rdblue commented on code in PR #10981:
URL: https://github.com/apache/iceberg/pull/10981#discussion_r1768951335


##########
format/spec.md:
##########
@@ -1117,27 +1136,28 @@ Schemas are serialized as a JSON object with the same 
fields as a struct in the
 
 Types are serialized according to this table:
 
-|Type|JSON representation|Example|
-|--- |--- |--- |
-|**`boolean`**|`JSON string: "boolean"`|`"boolean"`|
-|**`int`**|`JSON string: "int"`|`"int"`|
-|**`long`**|`JSON string: "long"`|`"long"`|
-|**`float`**|`JSON string: "float"`|`"float"`|
-|**`double`**|`JSON string: "double"`|`"double"`|
-|**`date`**|`JSON string: "date"`|`"date"`|
-|**`time`**|`JSON string: "time"`|`"time"`|
-|**`timestamp, microseconds, without zone`**|`JSON string: 
"timestamp"`|`"timestamp"`|
-|**`timestamp, microseconds, with zone`**|`JSON string: 
"timestamptz"`|`"timestamptz"`|
-|**`timestamp, nanoseconds, without zone`**|`JSON string: 
"timestamp_ns"`|`"timestamp_ns"`|
-|**`timestamp, nanoseconds, with zone`**|`JSON string: 
"timestamptz_ns"`|`"timestamptz_ns"`|
-|**`string`**|`JSON string: "string"`|`"string"`|
-|**`uuid`**|`JSON string: "uuid"`|`"uuid"`|
-|**`fixed(L)`**|`JSON string: "fixed[<L>]"`|`"fixed[16]"`|
-|**`binary`**|`JSON string: "binary"`|`"binary"`|
-|**`decimal(P, S)`**|`JSON string: "decimal(<P>,<S>)"`|`"decimal(9,2)"`,<br 
/>`"decimal(9, 2)"`|
-|**`struct`**|`JSON object: {`<br />&nbsp;&nbsp;`"type": "struct",`<br 
/>&nbsp;&nbsp;`"fields": [ {`<br />&nbsp;&nbsp;&nbsp;&nbsp;`"id": <field id 
int>,`<br />&nbsp;&nbsp;&nbsp;&nbsp;`"name": <name string>,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"required": <boolean>,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"type": <type JSON>,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"doc": <comment string>,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"initial-default": <JSON encoding of default 
value>,`<br />&nbsp;&nbsp;&nbsp;&nbsp;`"write-default": <JSON encoding of 
default value>`<br />&nbsp;&nbsp;&nbsp;&nbsp;`}, ...`<br />&nbsp;&nbsp;`] 
}`|`{`<br />&nbsp;&nbsp;`"type": "struct",`<br />&nbsp;&nbsp;`"fields": [ {`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"id": 1,`<br />&nbsp;&nbsp;&nbsp;&nbsp;`"name": 
"id",`<br />&nbsp;&nbsp;&nbsp;&nbsp;`"required": true,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"type": "uuid",`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"initial-default": 
"0db3e2a8-9d1d-42b9-aa7b-74ebe558dceb",`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"write-default": "ec5911be
 -b0a7-458c-8438-c9a3e53cffae"`<br />&nbsp;&nbsp;`}, {`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"id": 2,`<br />&nbsp;&nbsp;&nbsp;&nbsp;`"name": 
"data",`<br />&nbsp;&nbsp;&nbsp;&nbsp;`"required": false,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"type": {`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`"type": "list",`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`...`<br />&nbsp;&nbsp;&nbsp;&nbsp;`}`<br 
/>&nbsp;&nbsp;`} ]`<br />`}`|
-|**`list`**|`JSON object: {`<br />&nbsp;&nbsp;`"type": "list",`<br 
/>&nbsp;&nbsp;`"element-id": <id int>,`<br />&nbsp;&nbsp;`"element-required": 
<bool>`<br />&nbsp;&nbsp;`"element": <type JSON>`<br />`}`|`{`<br 
/>&nbsp;&nbsp;`"type": "list",`<br />&nbsp;&nbsp;`"element-id": 3,`<br 
/>&nbsp;&nbsp;`"element-required": true,`<br />&nbsp;&nbsp;`"element": 
"string"`<br />`}`|
-|**`map`**|`JSON object: {`<br />&nbsp;&nbsp;`"type": "map",`<br 
/>&nbsp;&nbsp;`"key-id": <key id int>,`<br />&nbsp;&nbsp;`"key": <type 
JSON>,`<br />&nbsp;&nbsp;`"value-id": <val id int>,`<br 
/>&nbsp;&nbsp;`"value-required": <bool>`<br />&nbsp;&nbsp;`"value": <type 
JSON>`<br />`}`|`{`<br />&nbsp;&nbsp;`"type": "map",`<br 
/>&nbsp;&nbsp;`"key-id": 4,`<br />&nbsp;&nbsp;`"key": "string",`<br 
/>&nbsp;&nbsp;`"value-id": 5,`<br />&nbsp;&nbsp;`"value-required": false,`<br 
/>&nbsp;&nbsp;`"value": "double"`<br />`}`|
+| Type                                        | JSON representation            
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | Example       
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+|---------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| **`boolean`**                               | `JSON string: "boolean"`       
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"boolean"`   
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`int`**                                   | `JSON string: "int"`           
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"int"`       
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`long`**                                  | `JSON string: "long"`          
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"long"`      
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`float`**                                 | `JSON string: "float"`         
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"float"`     
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`double`**                                | `JSON string: "double"`        
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"double"`    
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`date`**                                  | `JSON string: "date"`          
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"date"`      
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`time`**                                  | `JSON string: "time"`          
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"time"`      
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`timestamp, microseconds, without zone`** | `JSON string: "timestamp"`     
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"timestamp"` 
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`timestamp, microseconds, with zone`**    | `JSON string: "timestamptz"`   
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | 
`"timestamptz"`                                                                 
                                                                                
                                                                                
                                                                                
                                                    
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`timestamp, nanoseconds, without zone`**  | `JSON string: "timestamp_ns"`  
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | 
`"timestamp_ns"`                                                                
                                                                                
                                                                                
                                                                                
                                                    
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`timestamp, nanoseconds, with zone`**     | `JSON string: 
"timestamptz_ns"`                                                               
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 | `"timestamptz_ns"`                                                           
                                                                                
                                                                                
                                                                                
                                                       
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`string`**                                | `JSON string: "string"`        
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"string"`    
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`uuid`**                                  | `JSON string: "uuid"`          
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"uuid"`      
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`fixed(L)`**                              | `JSON string: "fixed[<L>]"`    
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"fixed[16]"` 
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`binary`**                                | `JSON string: "binary"`        
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                | `"binary"`    
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`decimal(P, S)`**                         | `JSON string: 
"decimal(<P>,<S>)"`                                                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 | `"decimal(9,2)"`,<br />`"decimal(9, 2)"`                                     
                                                                                
                                                                                
                                                                                
                                                       
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`struct`**                                | `JSON object: {`<br 
/>&nbsp;&nbsp;`"type": "struct",`<br />&nbsp;&nbsp;`"fields": [ {`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"id": <field id int>,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"name": <name string>,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"required": <boolean>,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"type": <type JSON>,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"doc": <comment string>,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"initial-default": <JSON encoding of default 
value>,`<br />&nbsp;&nbsp;&nbsp;&nbsp;`"write-default": <JSON encoding of 
default value>`<br />&nbsp;&nbsp;&nbsp;&nbsp;`}, ...`<br />&nbsp;&nbsp;`] }` | 
`{`<br />&nbsp;&nbsp;`"type": "struct",`<br />&nbsp;&nbsp;`"fields": [ {`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"id": 1,`<br />&nbsp;&nbsp;&nbsp;&nbsp;`"name": 
"id",`<br />&nbsp;&nbsp;&nbsp;&nbsp;`"required": true,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"type": "uuid",`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"initial-default": 
"0db3e2a8-9d1d-42b9-aa7b-74ebe558dceb",`<br />&nbsp;&nbsp;&nb
 sp;&nbsp;`"write-default": "ec5911be-b0a7-458c-8438-c9a3e53cffae"`<br 
/>&nbsp;&nbsp;`}, {`<br />&nbsp;&nbsp;&nbsp;&nbsp;`"id": 2,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"name": "data",`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"required": false,`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;`"type": {`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`"type": "list",`<br 
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`...`<br />&nbsp;&nbsp;&nbsp;&nbsp;`}`<br 
/>&nbsp;&nbsp;`} ]`<br />`}` |
+| **`list`**                                  | `JSON object: {`<br 
/>&nbsp;&nbsp;`"type": "list",`<br />&nbsp;&nbsp;`"element-id": <id int>,`<br 
/>&nbsp;&nbsp;`"element-required": <bool>`<br />&nbsp;&nbsp;`"element": <type 
JSON>`<br />`}`                                                                 
                                                                                
                                                                                
                                                                                
                                                                               
| `{`<br />&nbsp;&nbsp;`"type": "list",`<br />&nbsp;&nbsp;`"element-id": 3,`<br 
/>&nbsp;&nbsp;`"element-required": true,`<br />&nbsp;&nbsp;`"element": 
"string"`<br />`}`                                                              
                                                                                
                                                               
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`map`**                                   | `JSON object: {`<br 
/>&nbsp;&nbsp;`"type": "map",`<br />&nbsp;&nbsp;`"key-id": <key id int>,`<br 
/>&nbsp;&nbsp;`"key": <type JSON>,`<br />&nbsp;&nbsp;`"value-id": <val id 
int>,`<br />&nbsp;&nbsp;`"value-required": <bool>`<br />&nbsp;&nbsp;`"value": 
<type JSON>`<br />`}`                                                           
                                                                                
                                                                                
                                                                                
      | `{`<br />&nbsp;&nbsp;`"type": "map",`<br />&nbsp;&nbsp;`"key-id": 
4,`<br />&nbsp;&nbsp;`"key": "string",`<br />&nbsp;&nbsp;`"value-id": 5,`<br 
/>&nbsp;&nbsp;`"value-required": false,`<br />&nbsp;&nbsp;`"value": 
"double"`<br />`}`                                                              
                                                                                
 
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  |
+| **`geometry(C, E)`**                        | `JSON object: {`<br 
/>&nbsp;&nbsp;`"type": "geometry",`<br />&nbsp;&nbsp;`"crs": <C>,`<br 
/>&nbsp;&nbsp;`"edges": <E>`<br />`}`                                           
                                                                                
                                                                                
                                                                                
                                                                                
                                            | `{`<br />&nbsp;&nbsp;`"type": 
"geometry",`<br />&nbsp;&nbsp;`"crs": "my.crs.table.property",`<br 
/>&nbsp;&nbsp;`"edges": "planar"`<br />`}`                                      
                                                                                
                                                                                
                                                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                                                         |

Review Comment:
   I think the example should be a well-known CRS, like `OGC:CRS84`. We should 
also add a _note_ that states that implementations are encouraged to store the 
PROJJSON representation of the CRS in a table property using the ID from this 
field.



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