Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

take drops timezone from an input array with type Timestamp #393

Closed
msalib opened this issue Jun 3, 2021 · 1 comment
Closed

take drops timezone from an input array with type Timestamp #393

msalib opened this issue Jun 3, 2021 · 1 comment
Labels

Comments

@msalib
Copy link
Contributor

msalib commented Jun 3, 2021

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). I'm looking at version 4.2.0 compiled with rust 1.52.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants