[
https://issues.apache.org/jira/browse/ARROW-13548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17393135#comment-17393135
]
David Li commented on ARROW-13548:
----------------------------------
Hmm, the functions are a little confusing, but this should be DATEDIFF. I saw
that postgres calls it EXTRACT which can operate on an interval, but it behaves
differently than what I expected; let me edit things to clarify.
> [C++] Implement datediff kernel
> -------------------------------
>
> Key: ARROW-13548
> URL: https://issues.apache.org/jira/browse/ARROW-13548
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: David Li
> Priority: Major
> Labels: compute
>
> Add a kernel to convert a timedelta into a number of years, months, weeks,
> days, hours, minutes, (micro/milli/nano)seconds, or quarters.
> This should act like SQL's DATEDIFF/EXTRACT ([SQL
> Server|https://docs.microsoft.com/en-us/sql/t-sql/functions/datediff-transact-sql?view=sql-server-ver15],
>
> [Postgres|https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT]).
> Pandas doesn't have a convenient equivalent except in the case of days
> (pd.Timedelta.days).
> We have hinnant's date library vendored and this should hopefully be
> implementable with that.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)