msalib opened a new issue #393:
URL: https://github.com/apache/arrow-rs/issues/393
**Describe the bug**
If you call `take` with an Array of type `Timestamp(Milliseconds,
Some(UTC))`, you'll get a result with type `Timestamp(Milliseconds, None)`.
**To Reproduce**
If you like I can write a test case....
**Expected behavior**
I expect kernels like `take` to return an array with the same data type as
their input.
**Additional context**
I think the problem is in `compute/kernels/take.rs`:
```
DataType::Timestamp(Second, _) => {
downcast_take!(TimestampSecondType, values, indices)
}
DataType::Timestamp(Millisecond, _) => {
downcast_take!(TimestampMillisecondType, values, indices)
}
DataType::Timestamp(Microsecond, _) => {
downcast_take!(TimestampMicrosecondType, values, indices)
}
DataType::Timestamp(Nanosecond, _) => {
downcast_take!(TimestampNanosecondType, values, indices)
}
```
Note the 4 `_`s indicating that the timezone information is being dropped
and never used in constructing `take`'s output.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]