Airblader commented on a change in pull request #16805:
URL: https://github.com/apache/flink/pull/16805#discussion_r699872274



##########
File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java
##########
@@ -1488,6 +1489,20 @@
     // JSON functions
     // 
--------------------------------------------------------------------------------------------
 
+    public static final BuiltInFunctionDefinition IS_JSON =
+            BuiltInFunctionDefinition.newBuilder()
+                    .name("IS_JSON")
+                    .kind(SCALAR)
+                    .inputTypeStrategy(
+                            or(
+                                    
sequence(logical(LogicalTypeFamily.CHARACTER_STRING)),
+                                    sequence(
+                                            
logical(LogicalTypeFamily.CHARACTER_STRING),
+                                            symbol(JsonType.class))))
+                    
.outputTypeStrategy(explicit(DataTypes.BOOLEAN().notNull()))

Review comment:
       `IS JSON` is supposed to never be nullable, and always return true or 
false. However, it does seem this is currently implemented incorrectly. :-/




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