friendlymatthew opened a new issue, #7140:
URL: https://github.com/apache/arrow-rs/issues/7140

   The `Date` data types can cast to a `Timestamp`, as long as no time zone is 
specified. But you can't cast into a timezone aware timestamp.
   
   For example: 
   ```bash
   > select to_char(arrow_cast('2023-09-04'::date, 'Timestamp(Second, None)'), 
'%Y-%m-%dT%H:%M:%S%.3f');
   
   
+-------------------------------------------------------------------------------------------------------+
   | to_char(arrow_cast(Utf8("2023-09-04"),Utf8("Timestamp(Second, 
None)")),Utf8("%Y-%m-%dT%H:%M:%S%.3f")) |
   
+-------------------------------------------------------------------------------------------------------+
   | 2023-09-04T00:00:00.000                                                    
                           |
   
+-------------------------------------------------------------------------------------------------------+
   1 row(s) fetched.
   
   > select to_char(arrow_cast('2023-09-04'::date, 'Timestamp(Second, 
Some("UTC"))'), '%Y-%m-%dT%H:%M:%S%.3f');
   # doesn't work!
   ```
   
   **Describe the solution you'd like**
   Update the casting rules in `arrow-cast` such that `Date32` and `Date64` can 
cast into a timezone aware timestamp.
   
   
   **Additional context**
   Motivated by https://github.com/apache/datafusion/issues/14638


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