Class PadReturnTypeInference
java.lang.Object
org.apache.drill.exec.expr.fn.output.PadReturnTypeInference
- All Implemented Interfaces:
ReturnTypeInference
Return type calculation implementation for functions with return type set as
FunctionTemplate.ReturnType.PAD
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetType
(List<LogicalExpression> logicalExpressions, FunctionAttributes attributes) Defines function return type and sets precision if it pad length parameter is int expression.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PadReturnTypeInference
public PadReturnTypeInference()
-
-
Method Details
-
getType
public TypeProtos.MajorType getType(List<LogicalExpression> logicalExpressions, FunctionAttributes attributes) Defines function return type and sets precision if it pad length parameter is int expression. If pad length is less than zero, return type precision is 0.- Specified by:
getType
in interfaceReturnTypeInference
- Parameters:
logicalExpressions
- logical expressionsattributes
- function attributes- Returns:
- return type
-