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


##########
datafusion/common/src/scalar.rs:
##########
@@ -330,9 +330,9 @@ impl PartialOrd for ScalarValue {
                         let arr2 = list_arr2.value(i);
 
                         let lt_res =
-                            arrow::compute::kernels::cmp::lt(&arr1, 
&arr2).unwrap();
+                            arrow::compute::kernels::cmp::lt(&arr1, 
&arr2).ok()?;

Review Comment:
   The potential downside of returning None rather than panic'ing is that it 
may mask a real bug and make it harder to track down -- comparing scalars of 
different types likely means they should have been coerced before



##########
datafusion/common/src/scalar.rs:
##########
@@ -1970,13 +2020,14 @@ impl ScalarValue {
                 ),
             },
             ScalarValue::Fixedsizelist(..) => {
-                unimplemented!("FixedSizeList is not supported yet")

Review Comment:
   I agree returning NotYetImplemented is a better choice



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