Skip to content

Commit

Permalink
add news
Browse files Browse the repository at this point in the history
  • Loading branch information
fh-mthomson committed Jul 8, 2023
1 parent fbba396 commit 74ce855
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@
* Teradata:
* `as.Date(x)` is now translate to `CAST(x AS DATE)` again unless `x` is a
string (@mgirlich, #1285).

* Snowflake:
* `na.rm = TRUE` is now respected in `pmin()` and `pmax()` instead (@fh-mthomson, #1329)

* `remote_name()` now returns a string with the name of the table. To get the
qualified identifier use the newly added `remote_table()` (@mgirlich, #1280).
qualified identifier use the newly added `remote_table()` (@mgirlich, #1329).

* Queries now qualify `*` with the table alias for better compatibility (@mgirlich, #1003).

Expand Down
9 changes: 2 additions & 7 deletions R/backend-snowflake.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,10 @@ sql_translation.Snowflake <- function(con) {
)
sql_expr(DATE_TRUNC(!!unit, !!x))
},
# LEAST / GREATEST on Snowflake will not respect na.rm = TRUE (similar )
# LEAST / GREATEST on Snowflake will not respect na.rm = TRUE by default (similar to Oracle/Access)
# https://docs.snowflake.com/en/sql-reference/functions/least
# https://docs.snowflake.com/en/sql-reference/functions/greatest
# "If any of the argument values is NULL, the result is NULL."
# Source: https://stackoverflow.com/a/74529349/22193215
# [move to PR context] References:
# * https://community.snowflake.com/s/question/0D50Z00009LHFw1SAH/greatest-and-null-values
# * https://stackoverflow.com/questions/74527418/how-to-use-greatest-in-snowflake-with-null-values?newreg=1d65af9409e5443b85843be173894863
# * https://github.com/tidyverse/dbplyr/issues/118
# Solution source: https://stackoverflow.com/a/74529349/22193215
pmin = function(..., na.rm = FALSE) {
if (identical(na.rm, TRUE)) {
dots <- snowflake_pmin_pmax_concat_dots(..., na.rm = na.rm, negate = TRUE)
Expand Down

0 comments on commit 74ce855

Please sign in to comment.