junjunjd commented on code in PR #7901:
URL: https://github.com/apache/arrow-datafusion/pull/7901#discussion_r1378447915


##########
datafusion/common/src/scalar.rs:
##########
@@ -1539,7 +1574,7 @@ impl ScalarValue {
                             if &inner_key_type == key_type {
                                 Ok(*scalar)
                             } else {
-                                panic!("Expected inner key type of {key_type} 
but found: {inner_key_type}, value was ({scalar:?})");
+                                _internal_err!("Expected inner key type of 
{key_type} but found: {inner_key_type}, value was ({scalar:?})")

Review Comment:
   Same as above. This matching branch also has inconsistent handling of 
unreachable errors. Internal error is returned 
[here](https://github.com/apache/arrow-datafusion/blob/main/datafusion/common/src/scalar.rs#L1438-L1442)
 while panic is returned 
[here](https://github.com/apache/arrow-datafusion/blob/main/datafusion/common/src/scalar.rs#L1435)



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

Reply via email to