klion26 commented on code in PR #8638:
URL: https://github.com/apache/arrow-rs/pull/8638#discussion_r2448800909


##########
parquet-variant-compute/src/variant_to_arrow.rs:
##########
@@ -545,3 +560,24 @@ impl VariantToBinaryVariantArrowRowBuilder {
         Ok(ArrayRef::from(variant_array))
     }
 }
+
+struct FakeNullBuilder(NullArray);
+
+impl FakeNullBuilder {
+    fn new(capacity: usize) -> Self {
+        Self(NullArray::new(capacity))
+    }
+    fn append_value(&mut self, _: ()) {}
+    fn append_null(&mut self) {}
+
+    fn finish(self) -> NullArray {
+        self.0
+    }
+}
+
+define_variant_to_primitive_builder!(
+    struct VariantToNullArrowRowBuilder<'a>
+    |capacity| -> FakeNullBuilder { FakeNullBuilder::new(capacity) },
+    |value|  value.as_null(),

Review Comment:
   This is more obvious: the result is always `Variant::Null`; updated the code.
   As macro  can't receive `_` for `ident` (need change to pat and more), 
changed to `_value`



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