Weijun-H commented on code in PR #7901:
URL: https://github.com/apache/arrow-datafusion/pull/7901#discussion_r1371382927
##########
datafusion/common/src/scalar.rs:
##########
@@ -247,6 +247,10 @@ impl PartialEq for ScalarValue {
}
// manual implementation of `PartialOrd`
+//
+// # Panics
+//
+// Panics if there is an error when comparing kernels for arrays
Review Comment:
```suggestion
```
##########
datafusion/common/src/scalar.rs:
##########
@@ -247,6 +247,10 @@ impl PartialEq for ScalarValue {
}
// manual implementation of `PartialOrd`
+//
+// # Panics
+//
+// Panics if there is an error when comparing kernels for arrays
Review Comment:
Could we handle unwarp like this here 🤔
```rust
let lt_res = if let Ok(lt_res) =
arrow::compute::kernels::cmp::lt(&arr1, &arr2)
{
lt_res
} else {
return None;
};
let eq_res = if let Ok(eq_res) =
arrow::compute::kernels::cmp::eq(&arr1, &arr2)
{
eq_res
} else {
return None;
};
```
##########
datafusion/common/src/scalar.rs:
##########
@@ -247,6 +247,10 @@ impl PartialEq for ScalarValue {
}
// manual implementation of `PartialOrd`
+//
+// # Panics
+//
+// Panics if there is an error when comparing kernels for arrays
Review Comment:
Could we handle unwarp like this here 🤔
```rust
let lt_res = if let Ok(lt_res) =
arrow::compute::kernels::cmp::lt(&arr1, &arr2)
{
lt_res
} else {
return None;
};
let eq_res = if let Ok(eq_res) =
arrow::compute::kernels::cmp::eq(&arr1, &arr2)
{
eq_res
} else {
return None;
};
```
--
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]