rspears74 commented on code in PR #8562:
URL: https://github.com/apache/arrow-datafusion/pull/8562#discussion_r1443859383
##########
datafusion/common/src/scalar.rs:
##########
@@ -2433,11 +2455,14 @@ impl ScalarValue {
ScalarValue::LargeBinary(val) => {
eq_array_primitive!(array, index, LargeBinaryArray, val)?
}
- ScalarValue::List(arr)
- | ScalarValue::LargeList(arr)
- | ScalarValue::FixedSizeList(arr) => {
- let right = array.slice(index, 1);
- arr == &right
+ ScalarValue::List(arr) => {
+ Self::eq_array_list(&(arr.to_owned() as ArrayRef), array,
index)
+ }
+ ScalarValue::LargeList(arr) => {
+ Self::eq_array_list(&(arr.to_owned() as ArrayRef), array,
index)
+ }
+ ScalarValue::FixedSizeList(arr) => {
+ Self::eq_array_list(&(arr.to_owned() as ArrayRef), array,
index)
Review Comment:
Yeah, I tried this, but the args to `List`, `LargeList`, and `FixedSizeList`
are all different, so they can't be put in the same match arm. This applies to
all 3 comments.
--
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]