Jefffrey commented on code in PR #10222:
URL: https://github.com/apache/arrow-rs/pull/10222#discussion_r3484968070
##########
arrow-string/src/concat_elements.rs:
##########
@@ -571,7 +587,10 @@ mod tests {
let expected = [None,
Some("bazfar")].into_iter().collect::<StringArray>();
- assert_eq!(output, expected);
+ assert_eq!(
+ output.as_any().downcast_ref::<StringArray>().unwrap(),
+ &expected
+ );
Review Comment:
```suggestion
assert_eq!(output.as_string::<i32>(), &expected);
```
similarly etc.
##########
arrow-string/src/concat_elements.rs:
##########
@@ -802,9 +869,12 @@ mod tests {
let left = BinaryViewArray::from_iter(vec![] as Vec<Option<&[u8]>>);
let right = BinaryViewArray::from_iter(vec![] as Vec<Option<&[u8]>>);
- let output = concat_elements_binary_view_array(&left, &right).unwrap();
+ let output = concat_elements_dyn(&left, &right).unwrap();
let expected = BinaryViewArray::from_iter(vec![] as
Vec<Option<&[u8]>>);
- assert_eq!(output, expected);
+ assert_eq!(
+ output.as_any().downcast_ref::<BinaryViewArray>().unwrap(),
+ &expected
+ );
Review Comment:
```suggestion
assert_eq!(output.as_binary_view(), &expected);
```
with `use arrow_array::cast::AsArray`
##########
arrow-string/src/concat_elements.rs:
##########
@@ -406,55 +406,59 @@ pub fn concat_elements_string_view_array(
///
/// This function errors if the arrays are of different types.
Review Comment:
I wonder if we need to slightly update this docstring 🤔
--
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]