[SPARK-10591][SQL][TEST] Add a testcase to ensure if checkAnswer handles map correctly

## What changes were proposed in this pull request?

This PR adds a testcase to ensure if `checkAnswer` handles Map type correctly.

## How was this patch tested?

Pass the jenkins tests.

Author: Dongjoon Hyun <dongjoon@apache.org>

Closes #13913 from dongjoon-hyun/SPARK-10591.
This commit is contained in:
Dongjoon Hyun 2016-06-27 19:04:50 +08:00 committed by Cheng Lian
parent 52d4fe0579
commit 11f420b4bb

View file

@ -34,6 +34,13 @@ class DatasetSuite extends QueryTest with SharedSQLContext {
private implicit val ordering = Ordering.by((c: ClassData) => c.a -> c.b)
test("checkAnswer should compare map correctly") {
val data = Seq((1, "2", Map(1 -> 2, 2 -> 1)))
checkAnswer(
data.toDF(),
Seq(Row(1, "2", Map(2 -> 1, 1 -> 2))))
}
test("toDS") {
val data = Seq(("a", 1), ("b", 2), ("c", 3))
checkDataset(