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 21:27:55 UTC

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

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


##########
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:
   Yeah I agree with @viirya  



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