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
Fixes Oracle LIMIT and adds ROracle support #27
Conversation
| @@ -21,11 +21,6 @@ test_that("as.numeric() translated to NUMBER ", { | |||
| df <- data.frame(x = 1, y = 2) | |||
| df_oracle <- tbl_lazy(df, src = simulate_oracle()) | |||
|
|
|||
| test_that("query uses FETCH FIRST x ROWS instead of LIMIT ", { | |||
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.
Can you update this test please?
|
So far, so good : tidyverse/dplyr#2928 (comment) |
|
Any news on this pull request? |
R/db-roracle.R
Outdated
|
|
||
| #' @export | ||
| db_analyze.OraConnection <- function(con, table, ...) { | ||
| db_analyze.Oracle(con = con, table = table) |
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.
Can you please pass ... down through all these functions? That keeps it forward compatible
|
Thanks @edgararuiz! |
|
The fix for backwards compatibility with Oracle 11g no longer works in newer versions of dbplyr. |
|
I can confirm what @thomastallaksen is saying, the newest versions revert to |
|
I don't have the resources to support very old versions of Oracle, and so dbplyr is only compatible with versions that have still extended support. Extended support for 11.2 finished in Dec 2020. |
Fixes #tidyverse/dplyr#2928
An issue was discovered while working out how to add ROracle support. The clause used currently to perform the LIMIT is only available for Oracle version 12c and is not backwards compatible. The alternative is to a technique found here: https://oracle-base.com/articles/misc/top-n-queries. We need to limit the rows in a WHERE clause, so had to use a subquery to fix.
Mapped all of the methods from the Oracle to the ROracle class (
OraConnection). I also mapped someOdbcConnectionmethods as an attempt to provide as much functionality as possible, meaningcopy_to()should work now.