jayzhan211 commented on code in PR #6695:
URL: https://github.com/apache/arrow-rs/pull/6695#discussion_r1830703463
##########
arrow-array/src/cast.rs:
##########
@@ -778,34 +778,34 @@ pub trait AsArray: private::Sealed {
self.as_bytes_opt().expect("binary array")
}
- /// Downcast this to a [`StringViewArray`] returning `None` if not possible
- fn as_string_view(&self) -> &StringViewArray {
- self.as_byte_view_opt().expect("string view array")
- }
-
/// Downcast this to a [`StringViewArray`] returning `None` if not possible
fn as_string_view_opt(&self) -> Option<&StringViewArray> {
self.as_byte_view_opt()
}
- /// Downcast this to a [`StringViewArray`] returning `None` if not possible
- fn as_binary_view(&self) -> &BinaryViewArray {
- self.as_byte_view_opt().expect("binary view array")
+ /// Downcast this to a [`StringViewArray`] panicking if not possible
+ fn as_string_view(&self) -> &StringViewArray {
+ self.as_byte_view_opt().expect("string view array")
}
/// Downcast this to a [`BinaryViewArray`] returning `None` if not possible
fn as_binary_view_opt(&self) -> Option<&BinaryViewArray> {
self.as_byte_view_opt()
}
- /// Downcast this to a [`GenericByteViewArray`] returning `None` if not
possible
- fn as_byte_view<T: ByteViewType>(&self) -> &GenericByteViewArray<T> {
- self.as_byte_view_opt().expect("byte view array")
+ /// Downcast this to a [`StringViewArray`] panicking if not possible
Review Comment:
Oops
--
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]