tests/testthat/test-mutate.r

context("Mutate")

home <- Sys.getenv("HOME", "~/.m2/repository")
options(dplyr.jdbc.classpath =  paste0(home, "/.m2/repository"))
src <- src_calcite(getOption('dplyr.calcite.model', NULL))

test_that("mutate some columns", {
  df <- mutate(select(tbl(src, "Master"), playerID, birthYear, weight), x=weight * 100)
  vars <- tbl_vars(df)
  expect_equal(vars, c("playerID", "birthYear", "weight", "x"))
})
piersharding/dplyr-calcite documentation built on May 25, 2019, 6:10 a.m.