Cast this values's storage type This operation assumes that if the underlying [ScalarValue] can be casted to a given type that any extension type represented by the metadata is also valid.
(
&self,
target_type: &DataType,
)
| 56 | /// to a given type that any extension type represented by the metadata is also |
| 57 | /// valid. |
| 58 | pub fn cast_storage_to( |
| 59 | &self, |
| 60 | target_type: &DataType, |
| 61 | ) -> Result<Self, DataFusionError> { |
| 62 | let new_value = self.value().cast_to(target_type)?; |
| 63 | Ok(Self::new(new_value, self.metadata.clone())) |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /// create a new ScalarAndMetadata from a ScalarValue without |
no test coverage detected