blackmwk commented on code in PR #3810:
URL: https://github.com/apache/iceberg-rust/pull/3810#discussion_r4782312752
##########
crates/property-macro/README.md:
##########
@@ -261,13 +262,17 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
### Property declarations
All field settings must be grouped under `#[property(...)]`. This keeps `key`,
-`default`, `prefix`, `nested`, parser hooks, additional keys, and getter
-generation in one attribute and avoids collisions with ordinary Rust derives.
-
-Exact-key fields require a `default`. The `prefix` setting requires
-`HashMap<String, T>` and returns the entries matched by the prefix, or an empty
-map when none match. `nested` embeds another `Properties` struct while reading
-the same flat map. Neither prefix nor nested fields accept a `default`.
+`default`, `required`, `prefix`, `nested`, parser hooks, additional keys, and
+getter generation in one attribute and avoids collisions with ordinary Rust
+derives.
+
+Exact-key fields must declare either `default` or `required` (mutually
+exclusive). Required fields cannot have type `Option<T>` or use
+`parse_properties_with`; when the key is absent, parsing fails with
Review Comment:
Why required field can't use `parse_properties_with`?
--
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]