Skip to content

Commit

Permalink
All operators
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed May 3, 2024
1 parent 3655703 commit c5ec9d6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/relational-duckdb.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ get_default_duckdb_connection <- function() {
}

duckplyr_macros <- c(
"<" = "(x, y) AS x < y",
"<=" = "(x, y) AS x <= y",
">" = "(x, y) AS x > y",
">=" = "(x, y) AS x >= y",
"<" = '(x, y) AS "r_base::<"(x, y)',
"<=" = '(x, y) AS "r_base::<="(x, y)',
">" = '(x, y) AS "r_base::>"(x, y)',
">=" = '(x, y) AS "r_base::>="(x, y)',
"==" = '(x, y) AS "r_base::=="(x, y)',
"!=" = "(x, y) AS x <> y",
"!=" = '(x, y) AS "r_base::!="(x, y)',
#
"___divide" = "(x, y) AS CASE WHEN y = 0 THEN CASE WHEN x = 0 THEN CAST('NaN' AS double) WHEN x > 0 THEN CAST('+Infinity' AS double) ELSE CAST('-Infinity' AS double) END ELSE CAST(x AS double) / y END",
#
Expand Down

0 comments on commit c5ec9d6

Please sign in to comment.