karuppayya commented on code in PR #2537:
URL: https://github.com/apache/iceberg-rust/pull/2537#discussion_r3526550024


##########
crates/iceberg/src/catalog/metadata_location.rs:
##########
@@ -121,27 +123,42 @@ impl MetadataLocation {
             (stripped, CompressionCodec::None)
         };
 
-        let (version, id) = stripped.split_once('-').ok_or(Error::new(
+        // Try standard iceberg-rust format: <version>-<uuid>
+        if let Some((version_str, id_str)) = stripped.split_once('-')
+            && let (Ok(version), Ok(id)) = (version_str.parse::<i32>(), 
Uuid::parse_str(id_str))
+        {
+            return Ok((version, Some(id), compression_codec));
+        }
+
+        // Try Java HadoopCatalog format: v<version>

Review Comment:
   Looked at how Java handles the equivalent case: instead of continuing the 
existing version sequence, it resets and [starts numbering from 
0](https://github.com/apache/iceberg/blob/f636995eb1cb22a34b8a4c83d05e4ce7ee905496/core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java#L149-L165).
   Its cosmetic, but good to keep the behavior consistent.



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