Fokko opened a new issue, #345:
URL: https://github.com/apache/iceberg-go/issues/345

   ### Apache Iceberg version
   
   None
   
   ### Please describe the bug 🐞
   
   This is a minor thing, but I think it would be nice to get fixed anyway.
   
   While generating some V1 and V2 metadata, I noticed that for V1, properties 
serialize to `{}`, while for V2 it is a `null`. For both the field is optional. 
I think it would be nice to either go for `{}` or leave the keys out.
   
   V1:
   ```
   {
       "schema": {
           "type": "struct",
           "fields": [
               {
                   "type": "int",
                   "id": 1,
                   "name": "id",
                   "required": true
               }
           ],
           "schema-id": 0,
           "identifier-field-ids": []
       },
       "partition-spec": null,
       "format-version": 1,
       "table-uuid": "dd93fa46-a1a7-43bb-8748-6cc7eff107a3",
       "location": "s3a://warehouse/iceberg/iceberg-test-2.db/test-table-2",
       "last-updated-ms": 1742412491193,
       "last-column-id": 1,
       "schemas": [
           {
               "type": "struct",
               "fields": [
                   {
                       "type": "int",
                       "id": 1,
                       "name": "id",
                       "required": true
                   }
               ],
               "schema-id": 0,
               "identifier-field-ids": []
           }
       ],
       "current-schema-id": 0,
       "partition-specs": [
           {
               "spec-id": 0,
               "fields": []
           }
       ],
       "default-spec-id": 0,
       "last-partition-id": 999,
       "properties": {},
       "snapshot-log": null,
       "metadata-log": null,
       "sort-orders": [
           {
               "order-id": 0,
               "fields": []
           }
       ],
       "default-sort-order-id": 0,
       "refs": null
   }
   ```
   
   V2:
   ```
   {
       "last-sequence-number": 0,
       "format-version": 2,
       "table-uuid": "afbf8aa3-3786-47fe-b107-48d1efe7b016",
       "location": "s3a://warehouse/iceberg/iceberg-test-2/test-table-2",
       "last-updated-ms": 1742411676663,
       "last-column-id": 1,
       "schemas": [
           {
               "type": "struct",
               "fields": [
                   {
                       "type": "int",
                       "id": 1,
                       "name": "id",
                       "required": true
                   }
               ],
               "schema-id": 0,
               "identifier-field-ids": []
           }
       ],
       "current-schema-id": 0,
       "partition-specs": [
           {
               "spec-id": 0,
               "fields": []
           }
       ],
       "default-spec-id": 0,
       "last-partition-id": 999,
       "properties": null,
       "snapshot-log": null,
       "metadata-log": null,
       "sort-orders": [
           {
               "order-id": 0,
               "fields": []
           }
       ],
       "default-sort-order-id": 0,
       "refs": null
   }
   ```


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