Repository: spark
Updated Branches:
  refs/heads/master 52d4fe057 -> 11f420b4b


[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 <dongj...@apache.org>

Closes #13913 from dongjoon-hyun/SPARK-10591.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/11f420b4
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/11f420b4
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/11f420b4

Branch: refs/heads/master
Commit: 11f420b4bbcd607346204fb6fd7db7efe948cdac
Parents: 52d4fe0
Author: Dongjoon Hyun <dongj...@apache.org>
Authored: Mon Jun 27 19:04:50 2016 +0800
Committer: Cheng Lian <l...@databricks.com>
Committed: Mon Jun 27 19:04:50 2016 +0800

----------------------------------------------------------------------
 .../src/test/scala/org/apache/spark/sql/DatasetSuite.scala    | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/11f420b4/sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala 
b/sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
index bd8479b..43cbc03 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
@@ -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(


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to