Shekharrajak commented on code in PR #2414:
URL: https://github.com/apache/iceberg-rust/pull/2414#discussion_r3213767920


##########
crates/iceberg/src/delete_vector.rs:
##########
@@ -68,6 +80,88 @@ impl DeleteVector {
     pub fn len(&self) -> u64 {
         self.inner.len()
     }
+
+    #[allow(dead_code)]
+    pub fn deserialize_blob(blob_bytes: &[u8], expected_cardinality: 
Option<u64>) -> Result<Self> {
+        if blob_bytes.len() < DV_MIN_BLOB_SIZE {
+            return Err(Error::new(
+                ErrorKind::DataInvalid,
+                format!(
+                    "deletion-vector-v1 blob too short: {} bytes (minimum 
{DV_MIN_BLOB_SIZE})",
+                    blob_bytes.len()
+                ),
+            ));
+        }
+
+        // 2GB cap matches Java's signed-i32 length field.
+        if blob_bytes.len() > i32::MAX as usize {

Review Comment:
   2GB cap - Java's Integer.MAX_VALUE is 2,147,483,647 — exactly i32::MAX - 
similar to java implementation 



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