-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-15098 [R] Add binding for lubridate::duration() and/or as.difftime()
#12506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
af22f2d
first pass at `as.difftime()`
dragosmg 4d997a9
some additions to as.difftime
dragosmg a1727a5
early stage unit tests
dragosmg e6b93bc
first pass at `difftime()`
dragosmg 88444f5
pop
dragosmg ead654b
make tests pass
dragosmg b0743ae
test without timezones to see if Windows still complains
dragosmg 3953f43
switched to `subtract` kernel for the implementation of `difftime`
dragosmg f48eb15
skip timezone tests on windows
dragosmg 7a45459
add unit tests passing a regular R object
dragosmg 4f602e9
match unit arg
dragosmg 20ac204
add unit test for difftime + tz + R object
dragosmg 9de212e
add a bit more substance to `as.difftime()`
dragosmg bc99d53
`as.difftime()` can handle integers
dragosmg cbcd28f
updated unit tests & error message
dragosmg 22c8839
added comment to a unit test
dragosmg 6a78ea9
another try
dragosmg 2b00aa2
replace `"%X"` with `"%H:%M:%S"` on windows + update comments
dragosmg b1caedc
`"%H:%M:%S"` for consistency
dragosmg 70d4a0d
comment + `"%H:%M:%S"` for consistency
dragosmg f13184b
separate `compare_dplyr_binding()` blocks for the unsuported units
dragosmg a797f9b
typo + simplified logic for integer vs double
dragosmg 047f5d0
style
dragosmg 11d0dec
typo + simplified implementation
dragosmg b1b3891
switched back to casting as the simplified version was causing some C…
dragosmg 694d4be
one more step back
dragosmg d8eeafe
go via `int64()` instead of a difference between 2 `time32()`
dragosmg aa3a366
move `as.difftime()` definition and tests from `...-type.R` to `...-d…
dragosmg 31756b0
separate duration bindings and update `as.difftime()` + tests
dragosmg 0c56cd6
missing closing bracket
dragosmg 779fe91
updated NEWS
dragosmg ed5c7ed
removed the testing of the actual error message since it's being surf…
dragosmg 60edf1f
simplified `difftime` binding + updated unit tests
dragosmg 3eddb4b
add some times to the test data frame
dragosmg 6a1ca12
remove the `tz` arg
dragosmg 2755e1b
cleaned up some of the tests
dragosmg b2f7268
`unit` defaults to `"secs"` + improved messages
dragosmg f8837f8
cast only when needed
dragosmg 245ec89
updated unit tests
dragosmg 448268d
rescue the format tests
dragosmg 7e8a837
clean-up after the rebase mess
dragosmg d15b36c
improved testing comment
dragosmg ae9566d
trying the `subtract_checked()` route
dragosmg 638bf21
clean up and replace `subtract_checked` with `-`
dragosmg e4cd5bb
simplify the implementation when `x` is character + ignore attributes…
dragosmg b019b92
use `build_expr()`
dragosmg 1941156
revert to subtracting `y = "0:0:0"` when `x` is an hms string
dragosmg 9b6c7fb
implementation with a chain of casting
dragosmg 958e4f9
added Jon's comment for clarity
dragosmg 5492f71
lint
dragosmg a98f2f9
all branches go through the final cast to `duration("s")` step
dragosmg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.