You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/11/03 13:35:34 UTC

[GitHub] [spark] wangyum commented on a change in pull request #30228: [SPARK-33319][SQL][TEST] Add all built-in SerDes to HiveSerDeReadWriteSuite

wangyum commented on a change in pull request #30228:
URL: https://github.com/apache/spark/pull/30228#discussion_r516021085



##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveSerDeReadWriteSuite.scala
##########
@@ -135,11 +135,12 @@ class HiveSerDeReadWriteSuite extends QueryTest with SQLTestUtils with TestHiveS
     }
     // MAP<primitive_type, data_type>
     withTable("hive_serde") {
-      hiveClient.runSqlHive(s"CREATE TABLE hive_serde (c1 MAP <INT, STRING>) STORED AS $fileFormat")
-      hiveClient.runSqlHive("INSERT INTO TABLE hive_serde SELECT MAP(1, 'a') FROM (SELECT 1) t")
-      checkAnswer(spark.table("hive_serde"), Row(Map(1 -> "a")))
-      spark.sql("INSERT INTO TABLE hive_serde SELECT MAP(2, 'b')")
-      checkAnswer(spark.table("hive_serde"), Seq(Row(Map(1 -> "a")), Row(Map(2 -> "b"))))
+      hiveClient.runSqlHive(
+        s"CREATE TABLE hive_serde (c1 MAP <STRING, STRING>) STORED AS $fileFormat")

Review comment:
       Change key type to string because of Avro do not support it:
   ```
   java.lang.UnsupportedOperationException: Key of Map can only be a String:
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org