zhouyuan commented on code in PR #11195:
URL:
https://github.com/apache/incubator-gluten/pull/11195#discussion_r2568157775
##########
gluten-ut/spark40/src/test/scala/org/apache/spark/sql/GlutenDataFrameFunctionsSuite.scala:
##########
@@ -49,4 +52,230 @@ class GlutenDataFrameFunctionsSuite extends
DataFrameFunctionsSuite with GlutenS
false
)
}
+
+ testGluten("map_concat function") {
+ val df1 = Seq(
+ (Map[Int, Int](1 -> 100, 2 -> 200), Map[Int, Int](3 -> 300, 4 -> 400)),
+ (Map[Int, Int](1 -> 100, 2 -> 200), Map[Int, Int](3 -> 300, 1 -> 400)),
+ (null, Map[Int, Int](3 -> 300, 4 -> 400))
+ ).toDF("map1", "map2")
+
+ val expected1a = Seq(
+ Row(Map(1 -> 100, 2 -> 200, 3 -> 300, 4 -> 400)),
+ Row(Map(1 -> 400, 2 -> 200, 3 -> 300)),
+ Row(null)
+ )
+
+ intercept[SparkException](df1.selectExpr("map_concat(map1,
map2)").collect())
Review Comment:
I think there are similar tests found when i work on the first patch to
enable unit tests. Is it too heavy to modify the `map_concat `function to throw
the right exception?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]