caicancai commented on code in PR #3647:
URL: https://github.com/apache/calcite/pull/3647#discussion_r1467381820
##########
site/_docs/reference.md:
##########
@@ -2789,6 +2789,7 @@ In the following:
| s | MAP_ENTRIES(map) | Returns the entries of
the *map* as an array, the order of the entries is not defined
| s | MAP_KEYS(map) | Returns the keys of the
*map* as an array, the order of the entries is not defined
| s | MAP_VALUES(map) | Returns the values of
the *map* as an array, the order of the entries is not defined
+| s | MAP_CONTAINS_KEY(map, key) | Returns true if the
*map* contains the *key*
Review Comment:
done,thank you
##########
core/src/main/java/org/apache/calcite/util/BuiltInMethod.java:
##########
@@ -781,6 +781,7 @@ public enum BuiltInMethod {
MAP_ENTRIES(SqlFunctions.class, "mapEntries", Map.class),
MAP_KEYS(SqlFunctions.class, "mapKeys", Map.class),
MAP_VALUES(SqlFunctions.class, "mapValues", Map.class),
+ MAP_CONTAINS_KEY(SqlFunctions.class, "mapContainsKey", Map.class,
Object.class),
Review Comment:
done,thank you
##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -7189,6 +7189,29 @@ void checkRegexpExtract(SqlOperatorFixture f0,
FunctionAlias functionAlias) {
"INTEGER ARRAY NOT NULL");
}
+ @Test void testMapContainsKeyFunc() {
Review Comment:
done,thank you
--
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]