twuebi opened a new issue, #1099:
URL: https://github.com/apache/iceberg-rust/issues/1099

   ### Apache Iceberg Rust version
   
   None
   
   ### Describe the bug
   
   ```
   if version_id == Self::LAST_ADDED && self.last_added_version_id.is_none() {
     version_id = self.last_added_version_id.ok_or_else(|| {
                   Error::new(
                       ErrorKind::DataInvalid,
   ...
   ```
   
   never works, the Option condition is flipped. Currently, we cannot add a 
view version and then set current view using -1. `self.last_added_version_id` 
will be `Some` and the if is not entered. We then proceed to look up `-1` in 
`self.versions` which does not exist and return an error.
   
   ### To Reproduce
   
   Add a new view version
   Set current view version to -1
   
   ### Expected behavior
   
   no error
   
   ### Willingness to contribute
   
   I can contribute a fix for this bug independently


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

Reply via email to