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

   **Describe the bug**
   A clear and concise description of what the bug is.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   
   ```bash
   ❯ select date_part('hour', now());
   Plan("Coercion from [Utf8, Timestamp(Nanosecond, Some(\"UTC\"))] to the 
signature OneOf([Exact([Utf8, Date32]), Exact([Utf8, Date64]), Exact([Utf8, 
Timestamp(Second, None)]), Exact([Utf8, Timestamp(Microsecond, None)]), 
Exact([Utf8, Timestamp(Millisecond, None)]), Exact([Utf8, Timestamp(Nanosecond, 
None)])]) failed.")
   ```
   
   note that it could be fixed by 
   ```bash
   ❯ select date_part('hour', now()::timestamp);
   +-------------------------------------------------------------------+
   | datepart(Utf8("hour"),CAST(now() AS Timestamp(Nanosecond, None))) |
   +-------------------------------------------------------------------+
   | 6                                                                 |
   +-------------------------------------------------------------------+
   1 row in set. Query took 0.000 seconds.
   ```
   
   the reason for that is `now()` output `timestamp with time zone`, but our 
`date_part` doesn't work for it
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **Additional context**
   Add any other context about the problem here.
   


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

Reply via email to