Package org.apache.drill.exec.expr.fn
Class DrillSimpleFuncHolder
java.lang.Object
org.apache.drill.exec.expr.fn.AbstractFuncHolder
org.apache.drill.exec.expr.fn.DrillFuncHolder
org.apache.drill.exec.expr.fn.DrillSimpleFuncHolder
- All Implemented Interfaces:
FuncHolder
- Direct Known Subclasses:
DrillComplexWriterFuncHolder
Definition of a Drill function defined using the
@FunctionTemplate
annotation of the class which
implements the function. Simple functions have
input parameters as defined by member variables annotated
with the @Param
annotation.-
Constructor Summary
ConstructorDescriptionDrillSimpleFuncHolder
(FunctionAttributes functionAttributes, FunctionInitializer initializer) -
Method Summary
Modifier and TypeMethodDescriptionprotected ClassGenerator.HoldingContainer
generateEvalBody
(ClassGenerator<?> g, ClassGenerator.HoldingContainer[] inputVariables, String body, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) Generate the eval block for a simple function, including the null-handling wrapper, if requested.boolean
isNested()
renderEnd
(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) Render the various code blocks for a simple function.Methods inherited from class org.apache.drill.exec.expr.fn.DrillFuncHolder
addProtectedBlock, assignInjectableValue, checkNullHandling, checkPrecisionRange, declare, declareInputVariable, declareVarArgArray, declareWorkspaceVariables, generateBody, getAttributeParameter, getClassLoader, getCostCategory, getExpr, getInputParameters, getNullHandling, getOutputWidthCalculator, getParamCount, getParameters, getParamMajorType, getRegisteredNames, getReturnType, getReturnType, getReturnValue, getWorkspaceVars, isAggregating, isConstant, isDeterministic, isFieldReader, isInternal, isNiladic, isVarArg, matches, meth, meth, renderStart, toString, variableOutputSizeEstimate
Methods inherited from class org.apache.drill.exec.expr.fn.AbstractFuncHolder
isComplexWriterFuncHolder, renderMiddle
-
Constructor Details
-
DrillSimpleFuncHolder
public DrillSimpleFuncHolder(FunctionAttributes functionAttributes, FunctionInitializer initializer)
-
-
Method Details
-
isNested
public boolean isNested()- Specified by:
isNested
in interfaceFuncHolder
- Overrides:
isNested
in classAbstractFuncHolder
-
createInterpreter
- Throws:
Exception
-
renderEnd
public ClassGenerator.HoldingContainer renderEnd(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) Render the various code blocks for a simple function.- Specified by:
renderEnd
in classAbstractFuncHolder
- Parameters:
classGenerator
- code generatorinputVariables
- value holder references for each input value. Variables are in the same order as the declared function parametersworkspaceJVars
- internal working variables as declared with the@Workspece
annotations. These are simple variables, not Drill value holdersholderExpr
- the function call expression- Returns:
- HoldingContainer for return value
-
generateEvalBody
protected ClassGenerator.HoldingContainer generateEvalBody(ClassGenerator<?> g, ClassGenerator.HoldingContainer[] inputVariables, String body, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) Generate the eval block for a simple function, including the null-handling wrapper, if requested.
-