You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Shengkai Fang (Jira)" <ji...@apache.org> on 2024/01/25 12:20:00 UTC
[jira] [Assigned] (FLINK-34055) Introduce a new annotation for named parameters
[ https://issues.apache.org/jira/browse/FLINK-34055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shengkai Fang reassigned FLINK-34055:
-------------------------------------
Assignee: Feng Jin
> 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
> Assignee: 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)