()
| 2289 | |
| 2290 | @pytest.mark.numpy |
| 2291 | def test_cast_timestamp_to_int(): |
| 2292 | arr = pa.array(np.array([0, 1, 2], dtype='int64'), |
| 2293 | type=pa.timestamp('us')) |
| 2294 | expected = pa.array([0, 1, 2], type='i8') |
| 2295 | |
| 2296 | result = arr.cast('i8') |
| 2297 | assert result.equals(expected) |
| 2298 | |
| 2299 | |
| 2300 | def test_cast_date32_to_int(): |