Uh oh!
There was an error while loading. Please reload this page.
ARROW-14098: [C++] subtract(time, time) -> duration kernel - #12105
Conversation
rok
commented
Jan 10, 2022
Thanks for the review @edponce! I'm doubting myself a bit here - the Jira is asking for interval return type while this returns time at the moment. |
edponce
commented
Jan 10, 2022
Oops! Good that you noticed. |
rok
commented
Jan 10, 2022
Although returning time is kind of semantically wrong. Duration is already covered so intervals it is. |
jorisvandenbossche
commented
Jan 10, 2022
Agreed that returning "time" is wrong. How is duration already covered? |
rok
commented
Jan 10, 2022
Ah, I was thinking of |
jorisvandenbossche
commented
Jan 11, 2022
So if And it seems that for subtracting time values to get an interval, we actually already have this covered with the |
rok
commented
Jan 11, 2022
Switched to duration output. |
Uh oh!
There was an error while loading. Please reload this page.
a5ed967 to
9c2140cCompare
pitrou
left a comment
There was a problem hiding this comment.
Thank you. Can you also update docs/source/cpp/compute.rst for the newly supported types (or do you do that in another related PR)?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
rok
commented
Jan 18, 2022
0fdfd55 to
d5f2ddcComparerok
commented
Jan 19, 2022
jorisvandenbossche
commented
Jan 19, 2022
Didn't yet look at the code, but if we having type casting for temporal types during execution, best to add some tests where casting would be unsafe (eg a value in seconds resolution that would not fit in nanosecond resolution) |
b175d89 to
4dc443aComparepitrou
commented
Jan 27, 2022
@rok Are you done with this? I see you're still pushing changes. |
rok
commented
Jan 27, 2022
@pitrou It's done, I just noticed the kernel output type was off. Please proceed :). |
pitrou
commented
Jan 27, 2022
Hmm, can you look at the test failures? |
9dde52d to
1829f69Comparerok
commented
Feb 1, 2022
@pitrou I think this is ready for review. |
There was a problem hiding this comment.
I'm not sure I understand what it means to cast from a point in time to a duration. Does it make sense?
There was a problem hiding this comment.
Turns out we can just subtract times so this is not really needed anymore.
There was a problem hiding this comment.
If these are basically the same checks, why not factor them out?
There was a problem hiding this comment.
I don't see any tests for this, do we need to add some?
There was a problem hiding this comment.
Because subtraction can be done directly on times I removed this.
18b0f87 to
3c1de4dComparerok
commented
Feb 1, 2022
@pitrou Thanks for review! I removed most of the things :). Could you do another pass? |
Benchmark runs are scheduled for baseline = d78967e and contender = 75bcece. 75bcece is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
This is to resolve ARROW-14098.