twuebi commented on PR #638:
URL: https://github.com/apache/iceberg-go/pull/638#issuecomment-3597388509

   Rust source for completeness sake:
   
   ```rust
   /// Remove a reference
       ///
       /// If `ref_name='main'` the current snapshot id is set to -1.
       pub fn remove_ref(mut self, ref_name: &str) -> Self {
           if ref_name == MAIN_BRANCH {
               self.metadata.current_snapshot_id = None;
               self.metadata.snapshot_log.clear();
           }
   
           if self.metadata.refs.remove(ref_name).is_some() || ref_name == 
MAIN_BRANCH {
               self.changes.push(TableUpdate::RemoveSnapshotRef {
                   ref_name: ref_name.to_string(),
               });
           }
   
           self
       }
   ```


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