hiltontj commented on code in PR #5622:
URL: https://github.com/apache/arrow-rs/pull/5622#discussion_r1562496654


##########
arrow-json/src/writer/encoder.rs:
##########
@@ -443,3 +448,33 @@ impl<'a> Encoder for MapEncoder<'a> {
         out.push(b'}');
     }
 }
+
+struct FixedSizeBinaryEncoder<'a> {
+    array: &'a FixedSizeBinaryArray,
+    explicit_nulls: bool,
+}
+
+impl<'a> FixedSizeBinaryEncoder<'a> {
+    fn new(array: &'a FixedSizeBinaryArray, options: &EncoderOptions) -> Self {
+        Self {
+            array,
+            explicit_nulls: options.explicit_nulls,
+        }
+    }
+}
+
+impl<'a> Encoder for FixedSizeBinaryEncoder<'a> {
+    fn encode(&mut self, idx: usize, out: &mut Vec<u8>) {
+        if self.array.is_valid(idx) {

Review Comment:
   Indeed, as per 
https://github.com/apache/arrow-rs/pull/5622#issuecomment-2047812089, when I 
first added the test, it was passing without adding the `explicit_nulls` option 
to the `FixedSizeBinaryEncoder`, but I added it anyways. I am totally fine with 
taking it out.



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