Class ConcatReturnTypeInference
java.lang.Object
org.apache.drill.exec.expr.fn.output.ConcatReturnTypeInference
- All Implemented Interfaces:
ReturnTypeInference
Return type calculation implementation for functions with return type set as
FunctionTemplate.ReturnType.CONCAT
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetType
(List<LogicalExpression> logicalExpressions, FunctionAttributes attributes) Defines function return type and sets precision if it can be calculated.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ConcatReturnTypeInference
public ConcatReturnTypeInference()
-
-
Method Details
-
getType
public TypeProtos.MajorType getType(List<LogicalExpression> logicalExpressions, FunctionAttributes attributes) Defines function return type and sets precision if it can be calculated. Return type precision is sum of input types precisions. If at least one input type does not have precision, return type will be without precision. If calculated precision is greater thanTypes.MAX_VARCHAR_LENGTH
, it is replaced withTypes.MAX_VARCHAR_LENGTH
.- Specified by:
getType
in interfaceReturnTypeInference
- Parameters:
logicalExpressions
- logical expressionsattributes
- function attributes- Returns:
- return type
-