fsk119 commented on code in PR #24183:
URL: https://github.com/apache/flink/pull/24183#discussion_r1468808120


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/TypeInference.java:
##########
@@ -46,6 +46,8 @@ public final class TypeInference {
 
     private final @Nullable List<String> namedArguments;
 
+    private final @Nullable List<Boolean> optionalArguments;

Review Comment:
   I am worried about the current design of the Function Overload and Optional 
Parameter.
   
   The current implementation suggests that a UDF can only use either function 
overloading or optional parameters, not both.  But in some situation, we may 
need both abilities.
   
   ```
   class ToBytes extends ScalarFunction {
   
       bytes[] eval(String input, String format ="gzip") {}
   
       bytes[] eval(int input, String format = "gzip") {}
   }
   ```
   
   Actually, I think the argument optionals and names(alias) should belong to 
the `InputTypeStrategy`. 



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