Annotation Type FunctionTemplate
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
Function scope is used to indicate function output rows relation: simple / scalar (1 -> 1) or aggregate (n -> 1).static enum
static enum
Estimates the average size of the output produced by a function that produces variable length outputstatic enum
Return type enum is used to indicate which return type calculation logic should be used for functions. -
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
boolean
boolean
Defines if a function is internal and not intended for public use [e.g.boolean
Set Operand type-checking strategy for an operator which takes no operands and need to be invoked without parentheses.boolean
boolean
Defines if a function accepts variable arguments countName of function (when only one.) Use this annotation element if there is only one name for the function.String[]
Names of function (when multiple).int
-
Field Summary
-
Field Details
-
OUTPUT_SIZE_ESTIMATE_DEFAULT
static final int OUTPUT_SIZE_ESTIMATE_DEFAULT- See Also:
-
-
Element Details
-
scope
-
-
-
name
String nameName of function (when only one.) Use this annotation element if there is only one name for the function. Note: If you use this annotation don't usenames()
.TODO: Refer to wherever list of possible or at least known names is, to resolve the current issue of spaces vs. underlines in names (e.g., we have both "less_than" and "less than".
- Returns:
- function name
- Default:
- ""
-
names
String[] namesNames of function (when multiple). Use this annotation element if there are multiple names for the function. Note: If you use this annotation don't usename()
.TODO: Refer to wherever list of possible or at least known names is, to resolve the current issue of spaces vs. underlines in names (e.g., we have both "less_than" and "less than".
- Returns:
- list of function names
- Default:
- {}
-
returnType
FunctionTemplate.ReturnType returnType- Default:
- DEFAULT
-
nulls
- Default:
- INTERNAL
-
isBinaryCommutative
boolean isBinaryCommutative- Default:
- false
-
isRandom
boolean isRandom- Default:
- false
-
desc
String desc- Default:
- ""
-
costCategory
FunctionTemplate.FunctionCostCategory costCategory- Default:
- SIMPLE
-
isNiladic
boolean isNiladicSet Operand type-checking strategy for an operator which takes no operands and need to be invoked without parentheses. E.g.: session_id is a niladic function.
Niladic functions override columns that have names same as any niladic function. Such columns cannot be queried without the table qualification. Value of the niladic function is returned when table qualification is not used.
For e.g. in the case of session_id:
select session_id from table -> returns the value of niladic function session_id
select t1.session_id from table t1 -> returns session_id column value from table- Default:
- false
-
checkPrecisionRange
boolean checkPrecisionRange- Default:
- false
-
isInternal
boolean isInternalDefines if a function is internal and not intended for public use [e.g. castEmptyStringNullableVarBinaryToNullableVarDecimal(..) ]- Default:
- false
-
isVarArg
boolean isVarArgDefines if a function accepts variable arguments count- Default:
- false
-
outputWidthCalculatorType
FunctionTemplate.OutputWidthCalculatorType outputWidthCalculatorType- Default:
- DEFAULT
-
outputSizeEstimate
int outputSizeEstimate- Default:
- -1
-