[ https://issues.apache.org/jira/browse/FLINK-34055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17810863#comment-17810863 ]
Shengkai Fang commented on FLINK-34055: --------------------------------------- Merged into master: e1ebcaff52f423fdb54e3cb1bf8d5b3ccafc0a2f 9171194ef2647af1b55e58b98daeebabb6c84ad7 eb848dc0676d2c06adb3d16b3c6e51b378d4c57b > Introduce a new annotation for named parameters > ----------------------------------------------- > > Key: FLINK-34055 > URL: https://issues.apache.org/jira/browse/FLINK-34055 > Project: Flink > Issue Type: Sub-task > Components: Table SQL / Planner > Reporter: Feng Jin > Priority: Major > Labels: pull-request-available > Fix For: 1.19.0 > > > Introduce a new annotation to specify the parameter name, indicate if it is > optional, and potentially support specifying default values in the future. > Deprecate the argumentNames method in FunctionHints as it is not > user-friendly for specifying argument names with optional configuration. > > {code:java} > public @interface ArgumentHint { > /** > * The name of the parameter, default is an empty string. > */ > String name() default ""; > > /** > * Whether the parameter is optional, default is false. > */ > boolean isOptional() default false; > > /** > * The data type hint for the parameter. > */ > DataTypeHint type() default @DataTypeHint(); > } > {code} > {code:java} > public @interface FunctionHint { > > /** > * Deprecated attribute for specifying the names of the arguments. > * It is no longer recommended to use this attribute. > */ > @Deprecated > String[] argumentNames() default {""}; > > /** > * Attribute for specifying the hints and additional information for > function arguments. > */ > ArgumentHint[] arguments() default {}; > } > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)