DHRUV6029 commented on issue #25941:
URL: https://github.com/apache/datafusion/issues/25941#issuecomment-5987392215
Hi @Ruchirtripathi, thanks for working on #25099!
While digging into this issue I realized it's the same bug as #25095, just
triggered a bit differently. It uses a fixed-offset time zone like `+05:00` or
`-03:00` instead of a named zone like `Asia/Singapore`. For example:
```sql
CREATE TABLE t AS VALUES (TIMESTAMP '2024-01-01 10:00:00');
SELECT count(*) FROM t
WHERE arrow_cast(column1, 'Timestamp(Nanosecond, Some("+05:00"))')
= arrow_cast('2024-01-01T10:00:00+05:00', 'Timestamp(Nanosecond,
Some("+05:00"))');
-- returns 0 on main, should be 1
```
The root cause is the same: the unwrap_cast rewrite copies the literal's
value without applying the timezone shift.
I applied the change from #25099 on top of current main (`6e319bddd`) and
ran all the queries from this issue. They return the right results now.
Since #25099 fixes both issues, could you add `Closes #25941` to its
description? That way both get closed when it merges.
Thanks!
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]