JosephLenton commented on code in PR #2916:
URL: https://github.com/apache/iceberg-rust/pull/2916#discussion_r4474948601


##########
crates/iceberg/src/spec/values/serde.rs:
##########
@@ -473,8 +480,20 @@ pub(crate) mod _serde {
                 },
                 RawLiteralEnum::String(v) => match ty {
                     Type::Primitive(PrimitiveType::String) => 
Ok(Some(Literal::string(v))),
+                    Type::Primitive(PrimitiveType::Uuid) => 
Hyphenated::from_str(&v)
+                        // The hyphenated UUID restriction is to match 
behaviour with Java.
+                        .map(|hyphenated_uuid| 
Some(Literal::uuid(hyphenated_uuid.into_uuid())))
+                        .map_err(|_| {
+                            invalid_err_with_reason("string", "UUID must be a 
valid UUID string")
+                        }),

Review Comment:
   Done!



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