We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The translation of date_build is slightly incorrect on redshift.
date_build
dbplyr/tests/testthat/test-backend-redshift.R
Line 66 in 8f2fcb0
con <- DBI::dbConnect(RPostgres::Redshift(), dbname = Sys.getenv("CDM5_REDSHIFT_DBNAME"), host = Sys.getenv("CDM5_REDSHIFT_HOST"), port = Sys.getenv("CDM5_REDSHIFT_PORT"), user = Sys.getenv("CDM5_REDSHIFT_USER"), password = Sys.getenv("CDM5_REDSHIFT_PASSWORD")) # current translation sql <- "SELECT TO_DATE(CAST(2020.0 AS TEXT) || '-' CAST(1.0 AS TEXT) || '-' || CAST(1.0 AS TEXT)), 'YYYY-MM-DD') AS dt" cat(sql) #> SELECT TO_DATE(CAST(2020.0 AS TEXT) || '-' CAST(1.0 AS TEXT) || '-' || CAST(1.0 AS TEXT)), 'YYYY-MM-DD') AS dt DBI::dbGetQuery(con, sql) #> Error: Failed to prepare query : ERROR: syntax error at or near "CAST" #> LINE 1: SELECT TO_DATE(CAST(2020.0 AS TEXT) || '-' CAST(1.0 AS TEXT)... #> ^ # corrected sql sql <- "SELECT TO_DATE(CAST(2020.0 AS TEXT) || '-' || CAST(1.0 AS TEXT) || '-' || CAST(1.0 AS TEXT), 'YYYY-MM-DD') AS dt" cat(sql) #> SELECT TO_DATE(CAST(2020.0 AS TEXT) || '-' || CAST(1.0 AS TEXT) || '-' || CAST(1.0 AS TEXT), 'YYYY-MM-DD') AS dt DBI::dbGetQuery(con, sql) #> dt #> 1 2020-01-01 DBI::dbDisconnect(con)
Created on 2024-06-05 with reprex v2.1.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The translation of
date_build
is slightly incorrect on redshift.dbplyr/tests/testthat/test-backend-redshift.R
Line 66 in 8f2fcb0
Created on 2024-06-05 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: