You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "zoudan (via GitHub)" <gi...@apache.org> on 2023/05/10 08:50:30 UTC
[GitHub] [calcite] zoudan commented on a diff in pull request #3194: [CALCITE-5695] Add MAP_KEYS, MAP_VALUES function (enabled in Spark li…
zoudan commented on code in PR #3194:
URL: https://github.com/apache/calcite/pull/3194#discussion_r1189565277
##########
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:
what is the expected result if the input map is null?
--
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