iceberg icon indicating copy to clipboard operation
iceberg copied to clipboard

Snapshot `summary` map must have `operation` key

Open kevinjqliu opened this issue 4 months ago • 0 comments

This PR adds additional constraints in the SnapshotParser and also includes tests to verify the behaviors.

Snapshot's summary field is optional in V1 but required in V2. See https://iceberg.apache.org/spec/#snapshots When serializing Snapshot to JSON, if the summary field exists, the operation key must also exist (code). In other words, the summary field without the operation key is considered invalid.

Devlist discussion https://lists.apache.org/thread/h9qmrmlgxh91ol0y2v8olt90b9q6p9xr Relates to apache/iceberg-python/#1106

kevinjqliu avatar Oct 19 '24 19:10 kevinjqliu