You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "waitingkuo (via GitHub)" <gi...@apache.org> on 2023/04/12 17:01:15 UTC

[GitHub] [arrow-datafusion] waitingkuo opened a new issue, #5975: `date_part` doesn't consider timezone

waitingkuo opened a new issue, #5975:
URL: https://github.com/apache/arrow-datafusion/issues/5975

   ### Describe the bug
   
   `date_part` doesn't work for timestamptz with non-utc timezone
   
   ### To Reproduce
   
   `arrow_cast` allows us to cast timestamp to timestamptz (though the behavior of arrow_cast is incorrect now #5952)
   
   ```bash
   ❯ select arrow_cast('2000-01-01T00:00:00'::timestamp, 'Timestamp(Nanosecond, Some("+08:00"))');
   +-----------------------------+
   | Utf8("2000-01-01T00:00:00") |
   +-----------------------------+
   | 2000-01-01T08:00:00+08:00   |
   +-----------------------------+
   1 row in set. Query took 0.002 seconds.
   ```
   
   ```bash
   ❯ select date_part('hour', arrow_cast('2000-01-01T00:00:00'::timestamp, 'Timestamp(Nanosecond, Some("+08:00"))'));
   +----------------------------------------------------+
   | datepart(Utf8("hour"),Utf8("2000-01-01T00:00:00")) |
   +----------------------------------------------------+
   | 0.0                                                |
   +----------------------------------------------------+
   1 row in set. Query took 0.003 seconds.
   ```
   
   ### Expected behavior
   
   should returns 8.0
   
   ### Additional context
   
   cc @tustvold will https://github.com/apache/arrow-rs/issues/1936 solve this?


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb closed issue #5975: `date_part` doesn't consider timezone

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #5975: `date_part` doesn't consider timezone
URL: https://github.com/apache/arrow-datafusion/issues/5975


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] tustvold commented on issue #5975: `date_part` doesn't consider timezone

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5975:
URL: https://github.com/apache/arrow-datafusion/issues/5975#issuecomment-1505623251

   https://github.com/apache/arrow-datafusion/issues/5952 is possibly related


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org