You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "liuyongvs (via GitHub)" <gi...@apache.org> on 2023/05/10 09:15:26 UTC

[GitHub] [calcite] liuyongvs commented on a diff in pull request #3194: [CALCITE-5695] Add MAP_KEYS, MAP_VALUES function (enabled in Spark li…

liuyongvs commented on code in PR #3194:
URL: https://github.com/apache/calcite/pull/3194#discussion_r1189605267


##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -3797,6 +3798,16 @@ public static List distinct(List list) {
     return new ArrayList<>(result);
   }
 
+  /** Support the MAP_KEYS function. */
+  public static List mapKeys(Map map) {
+    return (List) map.keySet().stream().collect(Collectors.toList());

Review Comment:
   return null @zoudan 



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org