Omega359 opened a new issue, #18228:
URL: https://github.com/apache/datafusion/issues/18228

   ### Describe the bug
   
   From the documentation on 
config_options.execution.[time_zone](https://github.com/apache/datafusion/blob/1f434dcdda227504cd4730a6c8bcad468b363983/datafusion/common/src/config.rs#L471)
 it looks like `Extract` in sql used to be aware of the system time zone 
however that looks to have been lost at some point. I am unable to determine 
when exactly but I suspect it was when that functionality was 
extracted/migrated [to use the date_part 
UDF](https://github.com/apache/datafusion/blob/d64b7c3b4b3f446c5626f73e59d61933da6656f0/datafusion/functions/src/datetime/planner.rs#L32).
   
   The fix for this is likely to make date_part udf time zone aware in a 
similar manner that now, to_timestamp, etc are being updated.
   
   I also was unable to find any slt tests that covered this - from what I 
could find the tests for `extract` only ever used +00:00 as the tz.
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   extract(Hour from some_time) should likely be aware of configured timezone. 
   
   ### Additional context
   
   _No response_


-- 
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]

Reply via email to