iajoiner commented on code in PR #3347:
URL: https://github.com/apache/arrow-datafusion/pull/3347#discussion_r967239752
##########
datafusion/physical-expr/src/aggregate/approx_distinct.rs:
##########
@@ -219,7 +219,11 @@ macro_rules! default_accumulator_impl {
() => {
fn merge_batch(&mut self, states: &[ArrayRef]) -> Result<()> {
assert_eq!(1, states.len(), "expect only 1 element in the states");
- let binary_array =
states[0].as_any().downcast_ref::<BinaryArray>().unwrap();
+ let binary_array =
states[0].as_any().downcast_ref::<BinaryArray>().ok_or(
Review Comment:
@andygrove Fixed! Actually I expanded the macro and put it in
`datafusion-common` since it is everywhere.
--
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]