nevi-me commented on a change in pull request #702:
URL: https://github.com/apache/arrow-rs/pull/702#discussion_r692736108



##########
File path: arrow/src/json/reader.rs
##########
@@ -1225,6 +1225,14 @@ impl Decoder {
                             })
                             .collect::<StringArray>(),
                     ) as ArrayRef),
+                    DataType::Binary => Ok(Arc::new(
+                        rows.iter()
+                            .map(|row| {
+                                let maybe_value = row.get(field.name());
+                                maybe_value.and_then(|value| value.as_str())

Review comment:
       I thought `value.as_str()` would return an error if the binary data 
can't be converted to UTF8, but then we probably wouldn't be able to read the 
file in that case.
   
   Just an observation, no action needed

##########
File path: arrow/src/array/array.rs
##########
@@ -668,7 +668,7 @@ mod tests {
                 "entry",
                 DataType::Struct(vec![
                     Field::new("key", DataType::Utf8, false),
-                    Field::new("key", DataType::Int32, true),
+                    Field::new("value", DataType::Int32, true),

Review comment:
       An oversight on my end, should have been "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