diff --git a/R/backend-spark-sql.R b/R/backend-spark-sql.R index 8cd9288d1..7a690418d 100644 --- a/R/backend-spark-sql.R +++ b/R/backend-spark-sql.R @@ -44,7 +44,7 @@ simulate_spark_sql <- function() simulate_dbi("Spark SQL") }, add_years = function(x, n, ...) { check_dots_empty() - sql_expr(add_months(!!!x, !!n*12)) + sql_expr(add_months(!!x, !!n*12)) }, date_build = function(year, month = 1L, day = 1L, ..., invalid = NULL) { sql_expr(make_date(!!year, !!month, !!day)) diff --git a/tests/testthat/test-backend-spark-sql.R b/tests/testthat/test-backend-spark-sql.R index e1276c7a0..196f6deda 100644 --- a/tests/testthat/test-backend-spark-sql.R +++ b/tests/testthat/test-backend-spark-sql.R @@ -1,6 +1,6 @@ test_that("custom clock functions translated correctly", { local_con(simulate_spark_sql()) - expect_equal(test_translate_sql(add_years(x, 1)), sql("ADD_MONTHS('`x`', 1.0 * 12.0)")) + expect_equal(test_translate_sql(add_years(x, 1)), sql("ADD_MONTHS(`x`, 1.0 * 12.0)")) expect_equal(test_translate_sql(add_days(x, 1)), sql("DATE_ADD(`x`, 1.0)")) expect_error(test_translate_sql(add_days(x, 1, "dots", "must", "be empty"))) expect_equal(test_translate_sql(date_build(2020, 1, 1)), sql("MAKE_DATE(2020.0, 1.0, 1.0)"))