liurenjie1024 commented on code in PR #1578:
URL: https://github.com/apache/iceberg-rust/pull/1578#discussion_r2251044451
##########
crates/iceberg/src/delete_vector.rs:
##########
@@ -43,6 +43,14 @@ impl DeleteVector {
self.inner.insert(pos)
}
+ /// Return whether append positions into delete vectors succeeds.
+ #[allow(dead_code)]
+ pub fn append_positions(&mut self, positions: &[u64]) -> bool {
+ let expected_num = positions.len();
+ let appended_num =
self.inner.append(positions.iter().copied()).unwrap();
+ appended_num as usize == expected_num
Review Comment:
This definition seems odd to me, which treats insertation with duplication
as a failure. I would suggest to return nothing.
##########
crates/iceberg/src/delete_vector.rs:
##########
@@ -43,6 +43,14 @@ impl DeleteVector {
self.inner.insert(pos)
}
+ /// Return whether append positions into delete vectors succeeds.
+ #[allow(dead_code)]
+ pub fn append_positions(&mut self, positions: &[u64]) -> bool {
Review Comment:
```suggestion
pub fn insert_positions(&mut self, positions: &[u64]) -> bool {
```
--
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]