MCPcopy Create free account
hub / github.com/apache/datafusion / downcast_array_helper

Method downcast_array_helper

datafusion/common/src/lib.rs:156–166  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

154
155 impl<T: Array + ?Sized> DowncastArrayHelper for T {
156 fn downcast_array_helper<U: Any>(&self) -> Result<&U> {
157 self.as_any().downcast_ref().ok_or_else(|| {
158 let actual_type = self.data_type();
159 let desired_type_name = type_name::<U>();
160 _internal_datafusion_err!(
161 "could not cast array of type {} to {}",
162 actual_type,
163 desired_type_name
164 )
165 })
166 }
167 }
168}
169

Callers

nothing calls this directly

Calls 3

downcast_refMethod · 0.45
as_anyMethod · 0.45
data_typeMethod · 0.45

Tested by

no test coverage detected