svenwb commented on a change in pull request #7379:
URL: https://github.com/apache/arrow/pull/7379#discussion_r437992880



##########
File path: rust/arrow/src/json/reader.rs
##########
@@ -448,42 +453,55 @@ impl<R: Read> Reader<R> {
                             let mut builder = ListBuilder::new(values_builder);
                             for row in rows {
                                 if let Some(value) = row.get(field.name()) {
-                                        // value can be an array or a scalar
-                                        let vals: Vec<Option<String>> = if let 
Value::String(v) = value {
-                                            vec![Some(v.to_string())]
-                                        } else if let Value::Array(n) = value {
-                                            n.iter().map(|v: &Value| {
-                                                if v.is_string() {
-                                                    
Some(v.as_str().unwrap().to_string())
-                                                } else if v.is_array() || 
v.is_object() {
-                                                    // implicitly drop nested 
values
-                                                    // TODO support 
deep-nesting
-                                                    None
-                                                } else {
-                                                    Some(v.to_string())
-                                                }
-                                            }).collect()
-                                        } else if let Value::Null = value {
-                                            vec![None]
-                                        } else if !value.is_object() {
-                                            vec![Some(value.to_string())]
+                                    // value can be an array or a scalar

Review comment:
       This was only changed by the formatter




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to