alamb commented on code in PR #7778:
URL: https://github.com/apache/arrow-rs/pull/7778#discussion_r2167608750
##########
parquet-variant/src/builder.rs:
##########
@@ -1168,4 +1203,131 @@ mod tests {
assert_eq!(list.get(4).unwrap(), Variant::from(3));
}
+
+ #[test]
+ fn test_nested_object() {
+ /*
+ {
+ "c": {
+ "b": "a"
+ }
+ }
+
+ */
+
+ let mut builder = VariantBuilder::new();
+ {
+ let mut outer_object_builder = builder.new_object();
+ {
+ let mut inner_object_builder =
outer_object_builder.new_object("c");
+ inner_object_builder.append_value("b", "a");
+ inner_object_builder.finish();
+ }
+
+ outer_object_builder.finish();
Review Comment:
Looking at these examples, it seems to me like the current API requires
calling`finish` -- it seems like it might be a nicer API if that just happened
on `drop()` -- so you could use the scope of the example, like you have here,
and the dropping would just complete the object
This would be a great follow on PR
--
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]