Skip to content

Commit

Permalink
add a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-wang committed Mar 22, 2015
1 parent faef887 commit 2c5d54d
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,21 @@ class ParquetIOSuiteBase extends QueryTest with ParquetTest {
}
}

test("date type") {
def makeDateRDD(): DataFrame =
sparkContext
.parallelize(0 to 1000)
.map(i => Tuple1(DateUtils.toJavaDate(i)))
.toDF()
.select($"_1")

withTempPath { dir =>
val data = makeDateRDD()
data.saveAsParquetFile(dir.getCanonicalPath)
checkAnswer(parquetFile(dir.getCanonicalPath), data.collect().toSeq)
}
}

test("map") {
val data = (1 to 4).map(i => Tuple1(Map(i -> s"val_$i")))
checkParquetFile(data)
Expand Down

0 comments on commit 2c5d54d

Please sign in to comment.