You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/09 17:58:25 UTC

[GitHub] [arrow-datafusion] viirya commented on a diff in pull request #4154: Improve error messages while downcasting Int64Array

viirya commented on code in PR #4154:
URL: https://github.com/apache/arrow-datafusion/pull/4154#discussion_r1018254807


##########
datafusion/core/tests/user_defined_plan.rs:
##########
@@ -551,11 +552,7 @@ fn accumulate_batch(
         .downcast_ref::<StringArray>()
         .expect("Column 0 is not customer_id");
 
-    let revenue = input_batch
-        .column(1)
-        .as_any()
-        .downcast_ref::<Int64Array>()
-        .expect("Column 1 is not revenue");
+    let revenue = as_int64_array(input_batch.column(1)).unwrap();

Review Comment:
   I think that you can still keep `.expect("Column 1 is not revenue");`?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org