liurenjie1024 commented on code in PR #1578:
URL: https://github.com/apache/iceberg-rust/pull/1578#discussion_r2258868478


##########
crates/iceberg/src/delete_vector.rs:
##########
@@ -43,6 +45,24 @@ impl DeleteVector {
         self.inner.insert(pos)
     }
 
+    /// Marks the given `positions` as deleted and returns the number of 
elements appended.
+    ///
+    /// The input slice must be strictly ordered in ascending order, and every 
value must be greater than all existing values already in the set.
+    ///
+    /// # Errors
+    ///
+    /// Returns an error if the precondition is not met.
+    #[allow(dead_code)]
+    pub fn insert_positions(&mut self, positions: &[u64]) -> Result<usize> {
+        if let Err(err) = self.inner.append(positions.iter().copied()) {
+            return Err(Error::new(
+                ErrorKind::PreconditionFailed,
+                format!("failed to marks rows as deleted because {:?}", err),
+            ));
+        }
+        Ok(positions.len())

Review Comment:
   Oh, sorry, I was not aware that it must be larger than the largest value in 
existing set.



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