c-thiel commented on code in PR #2188:
URL: https://github.com/apache/iceberg-rust/pull/2188#discussion_r3356512590
##########
crates/iceberg/src/spec/datatypes.rs:
##########
@@ -844,6 +882,42 @@ impl MapType {
}
}
+/// Variant type - can hold semi-structured data of any type.
+/// This is an Iceberg V3 feature.
+#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
+pub struct VariantType;
Review Comment:
`VariantType` is a parameterless marker, but I'd keep it: the
`#[serde(untagged)] SerdeType enum` relies on it carrying its own "variant"
string (de)serialization — a payloadless `Type::Variant` can't be deserialized
from a bare JSON string under untagged serde without custom special-casing. It
also keeps the `Type` enum and the visitor traits uniform with
`Struct/List/Map`. The cost is ~12 trivial lines, so I'd lean to leave it —
open to changing if you feel strongly.
--
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]