twalthr commented on a change in pull request #17186:
URL: https://github.com/apache/flink/pull/17186#discussion_r716450218



##########
File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/SpecificInputTypeStrategies.java
##########
@@ -46,6 +56,26 @@
     public static final InputTypeStrategy CURRENT_WATERMARK =
             new CurrentWatermarkInputTypeStrategy();
 
+    /**
+     * Input strategy for {@link BuiltInFunctionDefinitions#JSON_OBJECT}.
+     *
+     * <p>The first argument defines the on-null behavior and is followed by 
any number of key-value
+     * pairs. Keys must be character string literals, while values are 
arbitrary expressions.
+     */
+    public static final InputTypeStrategy JSON_OBJECT =
+            compositeSequence()
+                    .argument(symbol(JsonOnNull.class))
+                    .finishWithVarying(
+                            repeatingSequence(
+                                    
and(logical(LogicalTypeFamily.CHARACTER_STRING), LITERAL),
+                                    or(
+                                            
logical(LogicalTypeFamily.CHARACTER_STRING),
+                                            
logical(LogicalTypeFamily.BINARY_STRING),
+                                            
logical(LogicalTypeFamily.TIMESTAMP),
+                                            
logical(LogicalTypeFamily.CONSTRUCTED),

Review comment:
       Could you eloborate this in the JIRA issue? A UDF should work.




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to