You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/05/17 17:02:48 UTC

[GitHub] [arrow-datafusion] velvia opened a new issue #355: Implement `to_timestamp_millis` etc

velvia opened a new issue #355:
URL: https://github.com/apache/arrow-datafusion/issues/355


   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 
   (This section helps Arrow developers understand the context and *why* for this feature, in addition to  the *what*)
   
   This is a follow up from the discussion in this PR:
   https://github.com/apache/arrow/pull/10005
   
   Namely for first class casting to non nanosecond timestamp types and functions supporting those.
   
   There was also a email thread on the list about this.
   
   **Describe the solution you'd like**
   A clear and concise description of what you want to happen.
   
   The proposal is as follows:
   * A function `to_timestamp_millis()` which converts from the following types:
       * String - converts timestamp strings, just like `to_timestamp()` except to a TimestampArray with Milliseconds
       * Other TimestampArray's - casts them with truncation as necessary to Millisecond resolution
       * Int64 - assumes the values are already millisecond resolution and just does a cast to TimestampArray with Millis
   * Similar functions `to_timestamp_micros()` and `to_timestamp_seconds()`
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features you've considered.
   
   We considered in the above threads to reuse `datetime_trunc()` for this purpose.
   
   The issues with using `datetime_trunc()` are as follows:
   * Datetime trunc is primarily used for truncating an existing timestamp to say millis, seconds, hours, minutes, etc., and not for changing the type of the date time.
   * Without modifying the existing signature it would not be possible to disambiguate between, for example, using `datetime_trunc` to truncate to seconds but keeping nanosecond resolution, or actually casting to Timestamp type with Seconds resolution
   * Additional infrastructure is needed in the function evaluation code to support evaluating text/constant arguments in function type output determination, right now the output type is determined based on the input types alone
   
   **Additional context**
   Add any other context or screenshots about the feature request 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.

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



[GitHub] [arrow-datafusion] velvia commented on issue #355: Implement `to_timestamp_millis` etc

Posted by GitBox <gi...@apache.org>.
velvia commented on issue #355:
URL: https://github.com/apache/arrow-datafusion/issues/355#issuecomment-842486419


   /cc @alamb 


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

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



[GitHub] [arrow-datafusion] alamb commented on issue #355: Implement `to_timestamp_millis` etc

Posted by GitBox <gi...@apache.org>.
alamb commented on issue #355:
URL: https://github.com/apache/arrow-datafusion/issues/355#issuecomment-842632602


   Mailing list link: https://lists.apache.org/thread.html/r8df8e698e5d408f8584ada8da7ed59b5357c96895400d80d016f9e6c%40%3Cdev.arrow.apache.org%3E


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

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



[GitHub] [arrow-datafusion] velvia commented on issue #355: Implement `to_timestamp_millis` etc

Posted by GitBox <gi...@apache.org>.
velvia commented on issue #355:
URL: https://github.com/apache/arrow-datafusion/issues/355#issuecomment-842486419


   /cc @alamb 


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

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



[GitHub] [arrow-datafusion] alamb closed issue #355: Implement `to_timestamp_millis` etc

Posted by GitBox <gi...@apache.org>.
alamb closed issue #355:
URL: https://github.com/apache/arrow-datafusion/issues/355


   


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

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



[GitHub] [arrow-datafusion] msathis commented on issue #355: Implement `to_timestamp_millis` etc

Posted by GitBox <gi...@apache.org>.
msathis commented on issue #355:
URL: https://github.com/apache/arrow-datafusion/issues/355#issuecomment-846354726


   @velvia It makes sense for you to do it since you're already familiar with it. 👍 💯  


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

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



[GitHub] [arrow-datafusion] msathis commented on issue #355: Implement `to_timestamp_millis` etc

Posted by GitBox <gi...@apache.org>.
msathis commented on issue #355:
URL: https://github.com/apache/arrow-datafusion/issues/355#issuecomment-846163186


   I can pick this if no one else is working on 👍


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

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



[GitHub] [arrow-datafusion] velvia commented on issue #355: Implement `to_timestamp_millis` etc

Posted by GitBox <gi...@apache.org>.
velvia commented on issue #355:
URL: https://github.com/apache/arrow-datafusion/issues/355#issuecomment-846285517


   If you’d like, though I have bits and pieces already in place from previous PRs that I was going to cobble together.
   
   > On May 21, 2021, at 11:45 AM, sathis ***@***.***> wrote:
   > 
   > 
   > I can pick this if no one else is working on 👍
   > 
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub <https://github.com/apache/arrow-datafusion/issues/355#issuecomment-846163186>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAIDPW7GETISAA2LPPQOHRTTO2S5DANCNFSM45A3EA2A>.
   > 
   
   


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

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



[GitHub] [arrow-datafusion] velvia commented on issue #355: Implement `to_timestamp_millis` etc

Posted by GitBox <gi...@apache.org>.
velvia commented on issue #355:
URL: https://github.com/apache/arrow-datafusion/issues/355#issuecomment-859116365


   Quick update: starting on the implementation, hopefully should be done in a few days


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

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