blackmwk commented on code in PR #3044:
URL: https://github.com/apache/iceberg-rust/pull/3044#discussion_r3858699389
##########
crates/property-macro/src/properties.rs:
##########
@@ -139,6 +143,19 @@ pub(crate) fn expand_properties(input: DeriveInput) ->
syn::Result<TokenStream2>
#(#parses,)*
})
}
+
+ /// Parses this typed property set from a flat string-to-string
map,
+ /// using each field's default when that field cannot be parsed.
+ pub fn try_from_loosely(
+ properties: &::std::collections::HashMap<
+ ::std::string::String,
+ ::std::string::String,
+ >,
+ ) -> ::iceberg::Result<Self> {
Review Comment:
That's a good point, but I'm hesitating to the method signature. I prefer to
keep the return type falliable so that in future the signature will not be
broken when introducing other changes.
--
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]