macroguo-ghy commented on code in PR #3655:
URL: https://github.com/apache/calcite/pull/3655#discussion_r1477751412


##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java:
##########
@@ -1468,6 +1468,13 @@ private static RelDataType 
deriveTypeMapConcat(SqlOperatorBinding opBinding) {
           ReturnTypes.TO_MAP_VALUES_NULLABLE,
           OperandTypes.MAP);
 
+  /** The "MAP_CONTAINS_KEY(map, key)" function. */
+  @LibraryOperator(libraries = {SPARK})
+  public static final SqlFunction MAP_CONTAINS_KEYS =

Review Comment:
   `MAP_CONTAINS_KEYS` -> `MAP_CONTAINS_KEY`?



##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -7216,6 +7216,43 @@ void checkRegexpExtract(SqlOperatorFixture f0, 
FunctionAlias functionAlias) {
         "INTEGER ARRAY NOT NULL");
   }
 
+  /** Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-6223";>[CALCITE-6223]
+   * Add MAP_CONTAINS_KEY function (enabled in BigQuery library)</a>.

Review Comment:
   BigQuery?



##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java:
##########
@@ -844,6 +845,7 @@ Builder populate2() {
       defineMethod(ARRAYS_ZIP, BuiltInMethod.ARRAYS_ZIP.method, 
NullPolicy.ANY);
       defineMethod(EXISTS, BuiltInMethod.EXISTS.method, NullPolicy.ANY);
       defineMethod(MAP_CONCAT, BuiltInMethod.MAP_CONCAT.method, 
NullPolicy.ANY);
+      defineMethod(MAP_CONTAINS_KEYS, BuiltInMethod.MAP_CONTAINS_KEYS.method, 
NullPolicy.ANY);

Review Comment:
   `MAP_CONTAINS_KEYS` -> `MAP_CONTAINS_KEY`?



-- 
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]

Reply via email to