mihaibudiu commented on code in PR #3909:
URL: https://github.com/apache/calcite/pull/3909#discussion_r1715567617
##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -5682,11 +5682,17 @@ public static List mapEntries(Map<Object, Object> map) {
/** Support the MAP_KEYS function. */
public static List mapKeys(Map map) {
+ if (map.keySet().contains(null)) {
Review Comment:
what is interesting is that you detect that a map key is null only when you
call the function map_keys. But shouldn't this be detected when inserting
something into the map, if it is indeed illegal?
If it's not illegal to insert entries with null keys, maybe the error
message should say that the function map_keys does not support null keys in
maps.
--
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]