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



##########
File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/SpecificInputTypeStrategies.java
##########
@@ -46,6 +55,20 @@
     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(

Review comment:
       I don't think that's possible because the strategy for `MAP` infers the 
common type over all arguments. If we used the repeating sequence strategy 
here, that would only happen on the first two arguments. It also has a minimum 
number of arguments (though this would be easy to add).




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