Uh oh!
There was an error while loading. Please reload this page.
ARROW-14101: [C++] multiply(duration, integer) -> duration kernel - #12215
ARROW-14101: [C++] multiply(duration, integer) -> duration kernel#12215rok wants to merge 2 commits into
Conversation
jorisvandenbossche
commented
Jan 27, 2022
For the |
rok
commented
Jan 27, 2022
Another test won't hurt :) I'll add it. |
1fd50f0 to
9f40218Comparerok
commented
Jan 27, 2022
Added the test and removed divide checked (seemed redundant since we're only dividing with integers). |
c27af81 to
6e4f4bdCompare7ad426d to
33d1458Compared4fdb74 to
5c015d4Comparerok
commented
Feb 18, 2022
@pitrou could you please take a look at this one? It covers multiply and divide (ARROW-14102). I think the CI error is due to s3fs. |
There was a problem hiding this comment.
Can you have a case in this test where the division is not exact?
Uh oh!
There was an error while loading. Please reload this page.
jorisvandenbossche
commented
Feb 22, 2022
I would keep |
rok
commented
Feb 22, 2022
Thanks for reviewing @jorisvandenbossche. Agreed on the |
There was a problem hiding this comment.
This looks unexpected to me since int64 is not a temporal at all. @lidavidm What do you think?
There was a problem hiding this comment.
I think this is fine, but maybe we need a better name for what this function does.
That said, I don't think this change is needed for this function to work, anyways. There's only a single temporal argument so there isn't really a meaningful common resolution to cast to.
There was a problem hiding this comment.
To be honest, the function doesn't seem to have changed :-). It's just the additional test that surprised me (but adding a test for existing behaviour is useful, thank you @rok ).
There was a problem hiding this comment.
Well duration has a unit and int64 is dimensionless. The goal of the function is to find the best common unit and I'd argue it still does.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Is it worth also supporting multiply(int64, duration) or would commutativity be handled at an upper level? @lidavidm
There was a problem hiding this comment.
Hmm, I don't see why not. It could just use the same exec function.
There was a problem hiding this comment.
Can you some negative value(s) into the mix?
There was a problem hiding this comment.
Also check that division by zero raises?
Benchmark runs are scheduled for baseline = 194ace5 and contender = 2f8f1e8. 2f8f1e8 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
rok
commented
Feb 23, 2022
Thanks all! |
This is to resolve ARROW-14101 and ARROW-14102.