smaheshwar-pltr opened a new issue, #1973:
URL: https://github.com/apache/iceberg-python/issues/1973

   ### Feature Request / Improvement
   
   While thinking about https://github.com/apache/iceberg-python/issues/1971 
and https://github.com/apache/iceberg-python/issues/1972, I realised that V3 
introduces new fields to `Snapshot` - one required for V3 and the other not.
   
   As it stands, it feels inelegant to add the V3 required field as an optional 
field on the `Snapshot` class and e.g. checking within `TableMetadata` 
construction that it's present if the table is V3 (or just not do this). I 
think it might be nicer to encode that information within the typing (model), 
similar to the `TableMetadataV3` excerpt below. 
https://github.com/apache/iceberg-python/blob/201057e4152e6223717b9ab77d8acea3438e26c1/pyiceberg/table/metadata.py#L552-L560
   
   I'm therefore wondering about about "versioning" `Snapshot` similar to 
`TableMetadata`, so that V3 `TableMetadata` would contain a list of V3 
`Snapshot`s. Then, if V3 snapshot fields are present in V2 metadata, we'd get 
the benefit of throwing which I think is nice about PyIceberg's `TableMetadata` 
`Union` setup 
[here](https://github.com/apache/iceberg-python/blob/201057e4152e6223717b9ab77d8acea3438e26c1/pyiceberg/table/metadata.py#L654-L667)
 compared to other implementations.
   
   (I've not fleshed out the details here so not sure feasible but dropping an 
issue for now. Perhaps this has already been discussed / thought about 😄)


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