THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Page properties | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Table of Contents
Motivation
...
Code Block | ||
---|---|---|
| ||
public @interface ArgumentHint { /** * The name of the parameter, default is an empty string. */ String name() default ""; /** * Whether the parameter is optional, default is truefalse. */ boolean isOptional() default truefalse; /** * The data type hint for the parameter. */ DataTypeHint type() default @DataTypeHint(); } |
...
Code Block |
---|
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 Block |
---|
public @interface ProcedureHint { /** * 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 procedure arguments. */ ArgumentHint[] arguments() default {}; } |
...
To validate this feature, we can develop custom UDFs or call procedures and use named parameters when invoking them.
Rejected Alternatives
None
1 . https://issues.apache.org/jira/browse/CALCITE-947
2. poc: https://github.com/apache/flink/compare/master...hackergin:flink:poc_named_argument