odysa commented on issue #177:
URL: https://github.com/apache/iceberg-rust/issues/177#issuecomment-1925188382

   > The code expect()s current_schema_id should not be None
   
   `current_schema_id` is impossible to be `None` in `TableMetadata`
   
   > But it is valid to be None in TableMetadataV1
   
   It's handled here.
   
https://github.com/apache/iceberg-rust/blob/9ae9e13fb48ea8af20d76644f27dcb2fc8773396/crates/iceberg/src/spec/table_metadata.rs#L556
   
   >  code should instead use the schema field of TableMetadataV1 when the 
current_schema_id field is None
   
   When we convert `TableMetadata` to `TableMetadataV1`, we have to look up 
`schemas` since there is no `schema` field in `TableMetadata`
   
   > expect() is unacceptable in such a case
   
   I agree. It panics only when `schemas` does not contain `current_schema_id`, 
which means `TableMetadataV1` may be invalid.
   


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