clintropolis commented on code in PR #12971:
URL: https://github.com/apache/druid/pull/12971#discussion_r955524963


##########
sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:
##########
@@ -207,7 +209,16 @@ public static class JsonKeysOperatorConversion implements 
SqlOperatorConversion
             )
         )
         .functionCategory(SqlFunctionCategory.USER_DEFINED_FUNCTION)
-        .returnTypeNullableArray(SqlTypeName.VARCHAR)
+        .returnTypeInference(

Review Comment:
   `returnTypeNullableArray` behaves a bit different from this 
`returnTypeInference` because this is using `ReturnTypes.cascade` instead of 
`ReturnTypes.explicit`, and had some troubles with type mismatch nullable vs 
not until I made this change.
   
   It might make more sense to make `returnTypeNullableArray` always be cascade 
nullable instead of always nullable, but I didn't make that change for now



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to