-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Python] Casting Timestamp scalar does not preserve UTC Suffix #35370
Comments
Good catch! I can reproduce the bug. The scalar code path does not handle timezone info. The pyarrow scalar cast uses a different implementation ( |
Alternatively, you can call the compute function directly:
|
A somewhat related issue: #35040 |
) ### Rationale for this change Scalar cast should use the computer kernel just like Arrays, instead of its own custom implementation. ### Are these changes tested? Added test cases for GH-35370, GH-34901, and GH-35040 ### Are there any user-facing changes? The Scalar.cast() API is enhanced and backwards compatible. * Closes: #35040 Authored-by: Dane Pitkin <[email protected]> Signed-off-by: Alenka Frim <[email protected]>
Fixed as part of #35395 |
apache#35395) ### Rationale for this change Scalar cast should use the computer kernel just like Arrays, instead of its own custom implementation. ### Are these changes tested? Added test cases for apacheGH-35370, apacheGH-34901, and apacheGH-35040 ### Are there any user-facing changes? The Scalar.cast() API is enhanced and backwards compatible. * Closes: apache#35040 Authored-by: Dane Pitkin <[email protected]> Signed-off-by: Alenka Frim <[email protected]>
apache#35395) ### Rationale for this change Scalar cast should use the computer kernel just like Arrays, instead of its own custom implementation. ### Are these changes tested? Added test cases for apacheGH-35370, apacheGH-34901, and apacheGH-35040 ### Are there any user-facing changes? The Scalar.cast() API is enhanced and backwards compatible. * Closes: apache#35040 Authored-by: Dane Pitkin <[email protected]> Signed-off-by: Alenka Frim <[email protected]>
Describe the bug, including details regarding any error messages, version, and platform.
No UTC "Z" suffix is present, but will be present when casting using arrays:
When using the Timestamp array cast, the UTC "Z" suffix is preserved, when using the scalar, it's not preserved.
Component(s)
Python
The text was updated successfully, but these errors were encountered: