Skip to content

Commit

Permalink
Update test-backend-snowflake.R
Browse files Browse the repository at this point in the history
INT to FLOAT
  • Loading branch information
fh-mthomson authored Jul 8, 2023
1 parent e968b0a commit 5dc1394
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-backend-snowflake.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ test_that("pmin() and pmax() respect na.rm", {
# https://docs.snowflake.com/en/sql-reference/functions/greatest

# na.rm = TRUE: override default behavior for Snowflake
expect_equal(test_translate_sql(pmin(x, y, z, na.rm = TRUE)), sql('-(GREATEST([-`x`], [-`y`], [-`z`])[0]::INT)'))
expect_equal(test_translate_sql(pmax(x, y, z, na.rm = TRUE)), sql('GREATEST([`x`], [`y`], [`z`])[0]::INT'))
expect_equal(test_translate_sql(pmin(x, y, z, na.rm = TRUE)), sql('-(GREATEST([-`x`], [-`y`], [-`z`])[0]::FLOAT)'))
expect_equal(test_translate_sql(pmax(x, y, z, na.rm = TRUE)), sql('GREATEST([`x`], [`y`], [`z`])[0]::FLOAT'))

# na.rm = FALSE: leverage default behavior for Snowflake
expect_equal(test_translate_sql(pmin(x, y, z, na.rm = FALSE)), sql('LEAST(`x`, `y`, `z`)'))
Expand Down

0 comments on commit 5dc1394

Please sign in to comment.