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

[GitHub] [arrow-rs] parthchandra opened a new issue, #4168: Allow cast to take in a format specification

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

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


[GitHub] [arrow-rs] tustvold commented on issue #4168: Allow cast to take in a format specification

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

   `label_issue.py` automatically added labels {'arrow'} from #4169


-- 
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-rs] tustvold closed issue #4168: Allow cast to take in a format specification

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #4168: Allow cast to take in a format specification
URL: https://github.com/apache/arrow-rs/issues/4168


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