raminqaf commented on code in PR #29343:
URL: https://github.com/apache/flink/pull/29343#discussion_r4145179612


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/scalar/ParseJsonFunction.java:
##########
@@ -38,8 +38,9 @@ public 
ParseJsonFunction(SpecializedFunction.SpecializedContext context) {
         return eval(jsonStr, false);
     }
 
-    public @Nullable Variant eval(@Nullable StringData jsonStr, boolean 
allowDuplicateKeys) {
-        if (jsonStr == null) {
+    public @Nullable Variant eval(
+            @Nullable StringData jsonStr, @Nullable Boolean 
allowDuplicateKeys) {
+        if (jsonStr == null || allowDuplicateKeys == null) {

Review Comment:
   So this means for a case like 
   ```
   SELECT PARSE_JSON('{"key":"value"}', CAST(NULL AS BOOLEAN));
   ```
   
   I will get `NULL`?
   
   
   I would be open for suggestions here. I see three possibilities: 
   - We can not allow null and throw. What is the semantic of NULL for this 
input parameter at all? 
   - Returning null.
   - going back to the default `false`



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