Github user ueshin commented on a diff in the pull request:
https://github.com/apache/spark/pull/22013#discussion_r208811790
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/HigherOrderFunctionsSuite.scala
---
@@ -59,6 +59,12 @@ class HigherOrderFunctionsSuite extends SparkFunSuite
with ExpressionEvalHelper
ArrayFilter(expr, createLambda(at.elementType, at.containsNull, f))
}
+ def transformKeys(expr: Expression, f: (Expression, Expression) =>
Expression): Expression = {
+ val valueType = expr.dataType.asInstanceOf[MapType].valueType
+ val keyType = expr.dataType.asInstanceOf[MapType].keyType
+ TransformKeys(expr, createLambda(keyType, false, valueType, true, f))
--- End diff --
We should use `valueContainsNull` instead of `true`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]