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

   The [`cast` 
function](https://github.com/apache/arrow-rs/blob/c4ac758e13cbd76651d16d06e786bdf7c04f902a/arrow-cast/src/cast.rs#L336)
 supports cast to string types (Utf8, LargeUtf8). This in turn uses formatting 
capabilities from  
[display](https://github.com/apache/arrow-rs/blob/master/arrow-cast/src/display.rs).
 While the formatter itself allows format options to be specified, cast always 
uses the default format options.
   It would be useful if the cast function also allowed formatting options to 
be passed in. This is useful where an engine using the `cast` function may want 
the output in a format different from the default.
   An example is with timestamps - the default formatting is per `rfc3339` and 
displays `1997-05-19T00:00:03.05`. A different engine might want to  display 
`1997-05-19 00:00:03.050` (For instance that is how Apache Spark casts 
timestamp to string). 
   
   **Describe the solution you'd like**
   Allow cast to accept format options.
   
   **Describe alternatives you've considered**
   There is no other way. The option is hard coded, so the only thing a caller 
can do is to run some string conversion on the returned values.
   


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