Fokko commented on PR #369:
URL: https://github.com/apache/iceberg-go/pull/369#issuecomment-2770464604
@zeroshade found an issue with the `snapshot_id` being updated:
```json
"snapshots": [
{
"snapshot-id": 3510441037372461000,
"sequence-number": 0,
"timestamp-ms": 1743534505231,
"manifest-list":
"/tmp/merge-manifests/metadata/snap-3510441037372461004-0-23f676b6-17d5-43a5-aa58-11a7579a0ad6.avro",
"summary": {
"added-data-files": "1",
"added-files-size": "4848",
"added-records": "3",
"operation": "append",
"total-data-files": "1",
"total-delete-files": "0",
"total-equality-deletes": "0",
"total-files-size": "4848",
"total-position-deletes": "0",
"total-records": "3"
},
"schema-id": 0
},
{
"snapshot-id": 7555903136473091000,
"parent-snapshot-id": 3510441037372461000,
"sequence-number": 0,
"timestamp-ms": 1743534505235,
"manifest-list":
"/tmp/merge-manifests/metadata/snap-7555903136473090822-0-0208f3f6-8436-4c8c-802b-9565fbb68f15.avro",
"summary": {
"added-data-files": "1",
"added-files-size": "4848",
"added-records": "3",
"operation": "append",
"total-data-files": "2",
"total-delete-files": "0",
"total-equality-deletes": "0",
"total-files-size": "9696",
"total-position-deletes": "0",
"total-records": "6"
},
"schema-id": 0
},
{
"snapshot-id": 7590986702594961000,
"parent-snapshot-id": 7555903136473091000,
"sequence-number": 0,
"timestamp-ms": 1743534505239,
"manifest-list":
"/tmp/merge-manifests/metadata/snap-7590986702594961103-0-94fb271e-d83d-45e6-88d8-ba6fc60e7669.avro",
"summary": {
"added-data-files": "1",
"added-files-size": "4848",
"added-records": "3",
"operation": "append",
"total-data-files": "3",
"total-delete-files": "0",
"total-equality-deletes": "0",
"total-files-size": "14544",
"total-position-deletes": "0",
"total-records": "9"
},
"schema-id": 0
}
],
```
```json
avro-tools tojson
/tmp/merge-manifests/metadata/snap-7590986702594961103-0-94fb271e-d83d-45e6-88d8-ba6fc60e7669.avro
| jq .
{
"manifest_path":
"/tmp/merge-manifests/metadata/94fb271e-d83d-45e6-88d8-ba6fc60e7669-m2.avro",
"manifest_length": 3827,
"partition_spec_id": 0,
"added_snapshot_id": 7590986702594961103,
"added_files_count": {
"int": 1
},
"existing_files_count": {
"int": 2
},
"deleted_files_count": {
"int": 0
},
"partitions": {
"array": []
},
"added_rows_count": {
"long": 3
},
"existing_rows_count": {
"long": 6
},
"deleted_rows_count": {
"long": 0
},
"key_metadata": null
}
```
```json
{
"status": 1,
"snapshot_id": 7590986702594961103,
"data_file": {
"file_path":
"/tmp/merge-manifests/data/00000-0-94fb271e-d83d-45e6-88d8-ba6fc60e7669.parquet",
"file_format": "PARQUET",
"record_count": 3,
"file_size_in_bytes": 4848,
"block_size_in_bytes": 0,
"column_sizes": { ... },
"value_counts": { ... },
"null_value_counts": { ... },
"nan_value_counts": { ... },
"lower_bounds": { ... },
"upper_bounds": { ... },
"key_metadata": null,
"split_offsets": {
"array": [
4
]
},
"sort_order_id": null,
"partition": {}
}
}
{
"status": 0,
"snapshot_id": 7590986702594961103,
"data_file": {
"file_path":
"/tmp/merge-manifests/data/00000-0-0208f3f6-8436-4c8c-802b-9565fbb68f15.parquet",
"file_format": "PARQUET",
"record_count": 3,
"file_size_in_bytes": 4848,
"block_size_in_bytes": 0,
"column_sizes": { ... },
"value_counts": { ... },
"null_value_counts": { ... },
"nan_value_counts": { ... },
"lower_bounds": { ... },
"upper_bounds": { ... },
"key_metadata": null,
"split_offsets": {
"array": [
4
]
},
"sort_order_id": null,
"partition": {}
}
}
{
"status": 0,
"snapshot_id": 7590986702594961103,
"data_file": {
"file_path":
"/tmp/merge-manifests/data/00000-0-23f676b6-17d5-43a5-aa58-11a7579a0ad6.parquet",
"file_format": "PARQUET",
"record_count": 3,
"file_size_in_bytes": 4848,
"block_size_in_bytes": 0,
"column_sizes": { ... },
"value_counts": { ... },
"null_value_counts": { ... },
"nan_value_counts": { ... },
"lower_bounds": { ... },
"upper_bounds": { ... },
"key_metadata": null,
"split_offsets": {
"array": [
4
]
},
"sort_order_id": null,
"partition": {}
}
}
```
Tne snapshot-ID should be kept from when the manifest was added, so we
should see three different ones here:

--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]