Dandandan commented on a change in pull request #1301:
URL: https://github.com/apache/arrow-rs/pull/1301#discussion_r805303279



##########
File path: arrow/src/json/reader.rs
##########
@@ -942,6 +943,32 @@ impl Decoder {
         ))
     }
 
+    #[allow(clippy::unnecessary_wraps)]
+    fn build_primitive_array_using_format_string<T>(
+        &self,
+        rows: &[Value],
+        col_name: &str,
+        format_string: &str,
+    ) -> Result<ArrayRef>
+    where
+        T: ArrowNumericType + Parser,
+        T::Native: num::NumCast,
+    {
+        Ok(Arc::new(
+            rows.iter()
+                .map(|row| {
+                    row.get(&col_name).and_then(|value| {
+                        if value.is_string() {

Review comment:
       Probably could be simplified a bit by using `value.as_str()` directly 
and pattern match or use `map` on the resulting 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