We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
if_else()
1 parent 59366d9 commit 1f2d4b1Copy full SHA for 1f2d4b1
R/relational-duckdb.R
@@ -38,7 +38,7 @@ duckplyr_macros <- c(
38
# "as.Date" = '(x) AS strptime(x, \'%Y-%m-%d\')',
39
40
"grepl" = "(pattern, x) AS (CASE WHEN x IS NULL THEN FALSE ELSE regexp_matches(x, pattern) END)",
41
- "if_else" = "(test, yes, no) AS (CASE WHEN test THEN yes ELSE no END)",
+ "if_else" = "(test, yes, no) AS (CASE WHEN test IS NULL THEN NULL ELSE CASE WHEN test THEN yes ELSE no END END)",
42
"|" = "(x, y) AS (x OR y)",
43
"&" = "(x, y) AS (x AND y)",
44
"!" = "(x) AS (NOT x)",
0 commit comments