alamb commented on code in PR #4004:
URL: https://github.com/apache/arrow-datafusion/pull/4004#discussion_r1008684820


##########
datafusion/row/src/writer.rs:
##########
@@ -326,8 +327,10 @@ pub(crate) fn write_field_date32(
     col_idx: usize,
     row_idx: usize,
 ) {
-    let from = from.as_any().downcast_ref::<Date32Array>().unwrap();
-    to.set_date32(col_idx, from.value(row_idx));
+    match as_date32_array(from) {
+        Ok(from) => to.set_date32(col_idx, from.value(row_idx)),
+        Err(e) => println!("{}", e),

Review Comment:
   Yeah, I agree I prefer "unwrap()" rather than println -- `stdout` may or may 
not be connected to something which would be noticed
   
   



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