hackergin commented on code in PR #24183: URL: https://github.com/apache/flink/pull/24183#discussion_r1468763844
########## flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/extraction/TypeInferenceExtractorTest.java: ########## @@ -1810,4 +1844,30 @@ public String eval(String f1, String f2) { return ""; } } + + private static class ArgumentHintScalarFunctionNotNullTypeWithOptionals extends ScalarFunction { + @FunctionHint( + argument = { + @ArgumentHint( + type = @DataTypeHint("STRING NOT NULL"), + name = "f1", + isOptional = true), + @ArgumentHint(type = @DataTypeHint("INTEGER"), name = "f2", isOptional = true) + }) + public String eval(String f1, Integer f2) { Review Comment: After verification, there will be a NullPointerException during execution. I have added relevant detection and judgment, but this may not only be an optional issue. If the primitive is declared as a nullable type, there may be similar problems, but currently there is no similar detection. However, in order to avoid modifying the existing Function temporarily, I have not made any changes to this part. In the future, a separate JIRA can be created to track this issue. -- 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