viirya commented on code in PR #4154:
URL: https://github.com/apache/arrow-datafusion/pull/4154#discussion_r1018307185
##########
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:
As this is test code, I think if the test data is correct, it must return a
Int64Array for column 1. `Column 1 is not revenue` as error message, I think
its purpose is to indicate that.
Both (previous and this PR) are fine. I'd keep it but it looks okay too for
this change.
--
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]