Cast scalar value to the given data type using an arrow kernel.
(
value: &ScalarValue,
data_type: &DataType,
cast_options: &CastOptions,
)
| 1730 | |
| 1731 | /// Cast scalar value to the given data type using an arrow kernel. |
| 1732 | fn cast_scalar_value( |
| 1733 | value: &ScalarValue, |
| 1734 | data_type: &DataType, |
| 1735 | cast_options: &CastOptions, |
| 1736 | ) -> Result<ScalarValue> { |
| 1737 | let cast_array = cast_with_options(&value.to_array()?, data_type, cast_options)?; |
| 1738 | ScalarValue::try_from_array(&cast_array, 0) |
| 1739 | } |
| 1740 | |
| 1741 | /// An [Interval] that also tracks null status using a boolean interval. |
| 1742 | /// |
no test coverage detected
searching dependent graphs…