scovich commented on code in PR #9599:
URL: https://github.com/apache/arrow-rs/pull/9599#discussion_r2977834257


##########
parquet-variant-compute/src/shred_variant.rs:
##########
@@ -102,19 +102,50 @@ pub fn shred_variant(array: &VariantArray, as_type: 
&DataType) -> Result<Variant
     ))
 }
 
+/// Controls how `append_null` is encoded for a shredded `(value, 
typed_value)` pair.
+///
+/// | Mode | Struct validity bit | `value` | `typed_value` | Meaning |
+/// | --- | --- | --- | --- | --- |
+/// | `TopLevelVariant` | null | NULL | NULL | SQL NULL at the top-level 
variant row |
+/// | `ObjectField` | non-null | NULL | NULL | Missing object field |
+/// | `ArrayElement` | non-null | `Variant::Null` | NULL | Explicit null array 
element |
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub(crate) enum AppendNullMode {
+    TopLevelVariant,
+    ObjectField,
+    ArrayElement,
+}
+
+impl AppendNullMode {
+    fn append_to_null_row(

Review Comment:
   This isn't a very intuitive name (at least, not to me):
   ```rust
   null_mode.append_to_null_row(... builders...);
   ```
   
   Maybe plain `append_null` is good enough?
   ```rust
   null_mode.append_null(... builders ...);
   ```
   Or `append_null_to`?
   



-- 
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]

Reply via email to