diff --git a/DESCRIPTION b/DESCRIPTION index fb1835022..63e1c1d17 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: dbplyr Title: A 'dplyr' Back End for Databases -Version: 2.5.0.9000 +Version: 2.5.0.9001 Authors@R: c( person("Hadley", "Wickham", , "hadley@posit.co", role = c("aut", "cre")), person("Maximilian", "Girlich", role = "aut"), diff --git a/NAMESPACE b/NAMESPACE index b2e724c54..11bffbb5f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -278,6 +278,8 @@ S3method(sql_expr_matches,Oracle) S3method(sql_expr_matches,PostgreSQL) S3method(sql_expr_matches,PostgreSQLConnection) S3method(sql_expr_matches,PqConnection) +S3method(sql_expr_matches,Redshift) +S3method(sql_expr_matches,RedshiftConnection) S3method(sql_expr_matches,SQLiteConnection) S3method(sql_join,DBIConnection) S3method(sql_join_suffix,DBIConnection) diff --git a/NEWS.md b/NEWS.md index 496fc7d0b..1abef9094 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # dbplyr (development version) +* Redshift driver has a custom `sql_expr_matches` method, what makes +join operation statements correct when `na_matches="na"` argument is set (#1521). + * `across(everything())` doesn't select grouping columns created via `.by` in `summarise()` (@mgirlich, #1493). diff --git a/R/backend-redshift.R b/R/backend-redshift.R index b3f35d3c5..e8a3ce097 100644 --- a/R/backend-redshift.R +++ b/R/backend-redshift.R @@ -34,6 +34,12 @@ redshift_round <- function(x, digits = 0L) { sql_expr(round(((!!x)) %::% float, !!digits)) } +#' @export +sql_expr_matches.RedshiftConnection <- sql_expr_matches.DBIConnection + +#' @export +sql_expr_matches.Redshift <- sql_expr_matches.RedshiftConnection + #' @export sql_translation.RedshiftConnection <- function(con) { postgres <- sql_translation.PostgreSQL(con)