Feng Jin created FLINK-34055:
--------------------------------

             Summary: 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
             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)

Reply via email to