-
Notifications
You must be signed in to change notification settings - Fork 173
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
dbplyr 2.4.0 - date filter doesn't work anymore, possibly due to absence of single quotes in translation #1450
Comments
Can you please provide a reprex, following the suggestions in https://dbplyr.tidyverse.org/articles/reprex.html? |
@hadley Only a reprex that shows SQL generation.
Further, for all I know, the problem may be specific to Oracle, which I have got. dbplyr 2.3.4
dbplyr 2.4.0
The difference seems to boil down to presence/absence of single quotes in |
For future reference, here's what a minimal reprex might look like: library(dbplyr)
library(dplyr, warn.conflicts = FALSE)
data.frame(x = c(as.Date("2022-01-01"), as.Date("2024-01-01"))) |>
tbl_lazy(con = simulate_oracle()) |>
filter(x >= as.Date("2023-01-01"))
#> <SQL>
#> SELECT `df`.*
#> FROM `df`
#> WHERE (`x` >= DATE 2023-01-01) Created on 2024-02-15 with reprex v2.0.2.9000 And the expected SQL should have quotes around the date. And here's a link to the oracle docs confirming the expected syntax: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Literals.html#GUID-8F4B3F82-8821-4071-84D6-FBBA21C05AC1 |
Last code to touch this was 1e2633e |
Oooh, that commit fixed #1389, which was a duplicate of this issue. So it's fixed in the dev version, and we're working towards a CRAN release in the near future. |
In 2.3.4:
Output of
show_query()
:Collects fine.
In 2.4.0:
Output of
show_query()
:On collecting:
The text was updated successfully, but these errors were encountered: