Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/21361#discussion_r189429006
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollectionExpressionsSuite.scala
---
@@ -397,6 +431,19 @@ class CollectionExpressionsSuite extends SparkFunSuite
with ExpressionEvalHelper
checkEvaluation(ElementAt(m0, Literal("c")), null)
checkEvaluation(ElementAt(m2, Literal("a")), null)
+
+ // test complex types as keys
+ val mb0 = Literal.create(
+ Map(Array[Byte](1, 2) -> "1", Array[Byte](3, 4) -> null,
Array[Byte](2, 1) -> "2"),
+ MapType(BinaryType, StringType))
--- End diff --
ditto
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]