junjunjd commented on code in PR #7901:
URL: https://github.com/apache/arrow-datafusion/pull/7901#discussion_r1379698814
##########
datafusion/common/src/scalar.rs:
##########
@@ -739,12 +759,21 @@ macro_rules! build_timestamp_array_from_option {
macro_rules! eq_array_primitive {
($array:expr, $index:expr, $ARRAYTYPE:ident, $VALUE:expr) => {{
- let array = $array.as_any().downcast_ref::<$ARRAYTYPE>().unwrap();
Review Comment:
This error can be unreachable if an invariant is established that the
`array` passed to
[`eq_array`](https://github.com/apache/arrow-datafusion/blob/main/datafusion/common/src/scalar.rs#L1664)
always has the same data type, precision and scale with `self`.
I will change this back to panic and thus making `eq_array` panic instead of
returning Result.
--
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]