alamb commented on code in PR #1738:
URL: https://github.com/apache/arrow-rs/pull/1738#discussion_r882041930


##########
arrow/src/compute/kernels/cast.rs:
##########
@@ -1661,6 +1660,34 @@ fn cast_string_to_timestamp_ns<Offset: OffsetSizeTrait>(
     Ok(Arc::new(array) as ArrayRef)
 }
 
+/// Casts Utf8 to Boolean
+fn cast_utf8_to_boolean(from: &ArrayRef, cast_options: &CastOptions) -> 
Result<ArrayRef> {
+    let array = from.as_any().downcast_ref::<StringArray>().unwrap();

Review Comment:
   You can also use `as_string_array()` function if you want to save some typing



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