Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysena committed Aug 1, 2024
1 parent b64ac1a commit b233ee4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/test-translate-spark.R
Original file line number Diff line number Diff line change
Expand Up @@ -451,5 +451,5 @@ test_that("translate sql server -> spark add column with default", {

test_that("translate sql server -> spark cast string as date", {
sql <- translate("SELECT CAST('20191201' AS DATE);", targetDialect = "spark")
expect_equal_ignore_spaces(sql, "SELECT IF(try_cast('20191201' AS DATE) IS NULL, to_date(cast('20191201' AS STRING), 'yyyyMMdd'), try_cast('20191201' AS DATE))")
expect_equal_ignore_spaces(sql, "SELECT IF(try_cast('20191201' AS DATE) IS NULL, to_date(cast('20191201' AS STRING), 'yyyyMMdd'), try_cast('20191201' AS DATE));")
})

0 comments on commit b233ee4

Please sign in to comment.