tustvold opened a new issue, #5952: URL: https://github.com/apache/arrow-datafusion/issues/5952
### Describe the bug The scalar coercion logic currently incorrectly interprets a timezone without a timezone qualifier as a time since the UTC epoch. It should instead interpret it as relative to the timezone it is being cast to. ### To Reproduce https://github.com/apache/arrow-datafusion/pull/5914 added the following test (known to be incorrect at the time) ``` query P select arrow_cast(timestamp '2000-01-01T00:00:00', 'Timestamp(Nanosecond, Some( "+08:00" ))'); ---- 2000-01-01T08:00:00+08:00 ``` ### Expected behavior The correct result is ``` 2000-01-01T00:00:00+08:00 ``` ### Additional context Following #5782 which includes the fix for https://github.com/apache/arrow-rs/issues/1936 the array cast is now correct ``` create table foo as select '2000-01-01T00:00:00' as ts; ❯ select arrow_cast(ts, 'Timestamp(Nanosecond, Some( "+08:00" ))') from foo; +---------------------------+ | foo.ts | +---------------------------+ | 2000-01-01T00:00:00+08:00 | +---------------------------+ ``` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
