Reinterprets this array's contents as a different data type without copying This can be used to efficiently convert between primitive arrays with the same underlying representation Note: this will not modify the underlying values, and therefore may change the semantic values of the array, e.g. 100 milliseconds in a [`TimestampNanosecondArray`] will become 100 seconds in a [`TimestampSecondArray`
(&self)
| 856 | /// let b: TimestampNanosecondArray = a.reinterpret_cast(); |
| 857 | /// ``` |
| 858 | pub fn reinterpret_cast<K>(&self) -> PrimitiveArray<K> |
| 859 | where |
| 860 | K: ArrowPrimitiveType<Native = T::Native>, |
| 861 | { |
| 862 | PrimitiveArray::new(self.values.clone(), self.nulls.clone()) |
| 863 | } |
| 864 | |
| 865 | /// Applies a unary infallible function to a primitive array, producing a |
| 866 | /// new array of potentially different type. |