sdf-jkl commented on code in PR #9599:
URL: https://github.com/apache/arrow-rs/pull/9599#discussion_r2977732505
##########
parquet-variant-compute/src/shred_variant.rs:
##########
@@ -102,19 +102,49 @@ 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_struct_nulls(self, nulls: &mut NullBufferBuilder) {
Review Comment:
Merged them here:
https://github.com/apache/arrow-rs/pull/9599/commits/5b52ba9c7e3c2675dcaa661edabb46851ced75e0
--
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]