-
Notifications
You must be signed in to change notification settings - Fork 0
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
Date vs string #71
Date vs string #71
Conversation
…ssages that are different
|
||
expect_snapshot(error = TRUE, | ||
spaceship_rfuns(as.Date("2024-03-21"), "not a date", "==") | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding those so that we can track the errors we get in both cases. I don't think the rfuns error should match the R error, but we could adjust if needed, i.e. catch the ConversionException
thrown by Date::FromString()
and make it look more like the R error.
duckdbrfuns:::spaceship_rfuns(as.Date("2024-03-21"), "not a date", "==")
#> Error in `map()` at duckdb-rfuns-r/R/relop.R:75:3:
#> ℹ In index: 1.
#> ℹ With name: x.
#> Caused by error:
#> ! Error evaluating duckdb query: Conversion Error: date field value out of range: "not a date", expected format is (YYYY-MM-DD)
duckdbrfuns:::spaceship_r(as.Date("2024-03-21"), "not a date", "==")
#> Error in `map()`:
#> ℹ In index: 1.
#> ℹ With name: ==.
#> Caused by error in `charToDate()`:
#> ! character string is not in a standard unambiguous format
Created on 2024-04-01 with reprex v2.1.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for timestamps:
duckdbrfuns:::spaceship_rfuns(as.POSIXct(strptime("2024-02-21 14:00:00", format = '%Y-%m-%d %H:%M:%S')), "not a time", "==")
#> Error in `map()` at duckdb-rfuns-r/R/relop.R:75:3:
#> ℹ In index: 1.
#> ℹ With name: x.
#> Caused by error:
#> ! Error evaluating duckdb query: Conversion Error: timestamp field value out of range: "not a time", expected format is (YYYY-MM-DD HH:MM:SS[.US][±HH:MM| ZONE])
duckdbrfuns:::spaceship_r(as.POSIXct(strptime("2024-02-21 14:00:00", format = '%Y-%m-%d %H:%M:%S')), "not a time", "==")
#> Error in `map()`:
#> ℹ In index: 1.
#> ℹ With name: ==.
#> Caused by error in `as.POSIXlt.character()`:
#> ! character string is not in a standard unambiguous format
Created on 2024-04-01 with reprex v2.1.0
I think the build errors are unrelated. |
Upstream: hendrikmuhs/ccache-action#184 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
No description provided.