gengliangwang commented on a change in pull request #34836:
URL: https://github.com/apache/spark/pull/34836#discussion_r765535002
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
##########
@@ -167,6 +167,71 @@ case class MapKeys(child: Expression)
copy(child = newChild)
}
+
+/**
+ * Returns an unordered array containing the keys of the map.
+ */
+@ExpressionDescription(
+ usage = "_FUNC_(map, key) - Returns true if the map contains the key.",
+ examples = """
+ Examples:
+ > SELECT _FUNC_(map(1, 'a', 2, 'b'), 1);
+ true
+ > SELECT _FUNC_(map(1, 'a', 2, 'b'), 3);
+ false
+ """,
+ group = "map_funcs",
+ since = "3.3.0")
+case class MapContainsKey(left: Expression, right: Expression)
Review comment:
Updated. PTAL
--
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]