Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added tests
  • Loading branch information
Oscar D. Lara Yejas committed Nov 10, 2015
commit 635bbe77160780223bbd14e99dfaabc2f09f4a07
8 changes: 7 additions & 1 deletion R/pkg/inst/tests/test_sparkSQL.R
Original file line number Diff line number Diff line change
Expand Up @@ -1515,8 +1515,14 @@ test_that("Method coltypes() to get R's data types of a DataFrame", {
structField("c3", "boolean"),
structField("c4", "timestamp"))

# Test primitive types
DF <- createDataFrame(sqlContext, data, schema)
expect_equal(coltypes(DF), c("integer", "logical", "timestamp"))
expect_equal(coltypes(DF), c("integer", "logical", "POSIXct"))

# Test complex types
x <- createDataFrame(sqlContext, list(list(as.environment(
list("a"="b", "c"="d", "e"="f")))))
expect_equal(coltypes(x), "map<string,string>")
})

unlink(parquetPath)
Expand Down