JosephLenton commented on code in PR #2916:
URL: https://github.com/apache/iceberg-rust/pull/2916#discussion_r3731689752
##########
crates/iceberg/src/spec/values/serde.rs:
##########
@@ -444,6 +449,12 @@ pub(crate) mod _serde {
},
RawLiteralEnum::String(v) => match ty {
Type::Primitive(PrimitiveType::String) =>
Ok(Some(Literal::string(v))),
+ Type::Primitive(PrimitiveType::Uuid) => {
+ let uuid = Uuid::parse_str(&v).map_err(|_| {
+ invalid_err_with_reason("string", "UUID must be a
valid UUID string")
Review Comment:
The leniency was not intentional. I just plugged in UUID, and forgot it
accepts such a variety and others wouldn't.
Looking at Java's UUID fromString
https://docs.oracle.com/en/java/javase/26/docs/api/java.base/java/util/UUID.html#toString()
, I am reading it as only accepting hyphenated UUIDs. I will update this to
only support hyphenated UUIDs to match the Java behaviour.
--
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]