Uh oh!
There was an error while loading. Please reload this page.
ARROW-14821: [C++] Add ceil_is_strictly_greater and calendar_based_origin temporal round options (to mimic lubridate's date rounding) - #12657
Conversation
rok
commented
Mar 17, 2022
@djnavarro this is almost ready for review. |
b25de93 to
f65728cCompareba00ddb to
92ad204Compare@djnavarro do you think this will cover requirements on R side? @pitrou@jorisvandenbossche could you please review the changes here? The R style rounding demanded some more logic and maybe something I'm missing something that can be simplified. |
rok
commented
Apr 6, 2022
ping :) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Since this is only for ceil, perhaps rename it strict_ceil or something similar? @jorisvandenbossche what do you think?
There was a problem hiding this comment.
Switched to strict_ceil. Would still be interesting to hear from @jorisvandenbossche
There was a problem hiding this comment.
Do we know if "strict ceil" is a typical term for this behaviour?
(it could also be "ceil_on_boundary" to make it more explicit about "ceil")
There was a problem hiding this comment.
Switched to ceil_on_boundary. @pitrou do you think that'll work?
Uh oh!
There was an error while loading. Please reload this page.
657b3d7 to
3ae71e7Comparerok
commented
Apr 21, 2022
@pitrou Could you please do another pass here? |
pitrou
left a comment
There was a problem hiding this comment.
I don't have much to add, see below.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
6a919a8 to
d5bc076Comparerok
commented
Apr 21, 2022
@pitrou Added suggested comments. |
pitrou
left a comment
There was a problem hiding this comment.
Thanks! I'll let @jorisvandenbossche do the final review.
d5bc076 to
18a0fdcComparerok
commented
Apr 22, 2022
CI issues seem unrelated. |
rok
commented
Apr 22, 2022
@jorisvandenbossche this would unblock #12154 which would be great to have for the release :). |
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
rok
commented
May 30, 2022
I think we're ok with
Lubridate actually limits to time multiples smaller or equal than the greater time unit - e.g. "61min" is not a valid rounding, but "60min" is. Your proposal makes things safer but we might want to "deregulate" it later. Leaving things as is gives more options but we might need to limit them later. Dunno, I don't have an opinion on this. |
8c2d6ad to
422b022Comparerok
commented
May 30, 2022
@jorisvandenbossche added an example to doc to present the issue with |
rok
commented
May 31, 2022
@pitrou do you think this is ready to merge? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
pitrou
commented
May 31, 2022
TBH, I'm starting to think that calendar-based rounding is sufficiently different that we might define separate functions for it (e.g. "ceil_calendar" as opposed to "ceil_temporal"). We might also not bother refactoring this again :-) |
rok
commented
May 31, 2022
Thanks for the review, added the changes.
I had that thought yesterday too. Now that tests are worked out it wouldn't be too much work I feel. Perhaps after #12528 is in :). |
rok
commented
Jun 1, 2022
@pitrou or are you saying we should refactor now? :) |
pitrou
commented
Jun 1, 2022
@rok As you prefer. We can merge this as is if you want. |
rok
commented
Jun 1, 2022
@pitrou i would prefer merging this and then discuss/do the refactor separately. |
pitrou
commented
Jun 2, 2022
Ok, let's do it. |
rok
commented
Jun 2, 2022
Thank you for the reviews and feedback @pitrou & @jorisvandenbossche ! |
This implements
RoundTemporalOptions.ceil_is_strictly_greaterandRoundTemporalOptions.calendar_based_originparameters in C++ to enable temporal rounding in R (ARROW-14821).