Package org.apache.drill.exec.expr.fn
Class DrillComplexWriterAggFuncHolder
java.lang.Object
org.apache.drill.exec.expr.fn.AbstractFuncHolder
org.apache.drill.exec.expr.fn.DrillFuncHolder
org.apache.drill.exec.expr.fn.DrillComplexWriterAggFuncHolder
- All Implemented Interfaces:
FuncHolder
-
Constructor Summary
ConstructorsConstructorDescriptionDrillComplexWriterAggFuncHolder(FunctionAttributes functionAttributes, FunctionInitializer initializer) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringadd()protected voidaddProtectedBlock(ClassGenerator<?> g, com.sun.codemodel.JBlock sub, String body, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, boolean decConstantInputOnly) Generate the function block itself, without surrounding comments, and whether or not the method is empty.protected voidcheckNullHandling(FunctionTemplate.NullHandling nullHandling) Check if function type supports provided null handling strategy.protected Stringcleanup()booleanbooleanChecks that the current function holder stores output value using field writer instead of vector holder.booleanisNested()protected Stringoutput()renderEnd(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) Generate methods body and complete the code generation.voidrenderMiddle(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars) com.sun.codemodel.JVar[]renderStart(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, FieldReference fieldReference) protected Stringreset()protected Stringsetup()Methods inherited from class org.apache.drill.exec.expr.fn.DrillFuncHolder
assignInjectableValue, checkPrecisionRange, declare, declareInputVariable, declareVarArgArray, declareWorkspaceVariables, generateBody, getAttributeParameter, getClassLoader, getCostCategory, getExpr, getInputParameters, getNullHandling, getOutputWidthCalculator, getParamCount, getParameters, getParamMajorType, getRegisteredNames, getReturnType, getReturnType, getReturnValue, getWorkspaceVars, isConstant, isDeterministic, isFieldReader, isInternal, isNiladic, isVarArg, matches, meth, meth, toString, variableOutputSizeEstimate
-
Constructor Details
-
DrillComplexWriterAggFuncHolder
public DrillComplexWriterAggFuncHolder(FunctionAttributes functionAttributes, FunctionInitializer initializer)
-
-
Method Details
-
isComplexWriterFuncHolder
public boolean isComplexWriterFuncHolder()Description copied from interface:FuncHolderChecks that the current function holder stores output value using field writer instead of vector holder.- Specified by:
isComplexWriterFuncHolderin interfaceFuncHolder- Overrides:
isComplexWriterFuncHolderin classAbstractFuncHolder- Returns:
- true if current function holder uses field writer to store the output value
-
renderStart
public com.sun.codemodel.JVar[] renderStart(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, FieldReference fieldReference) -
renderMiddle
public void renderMiddle(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars) -
renderEnd
public ClassGenerator.HoldingContainer renderEnd(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) Description copied from class:AbstractFuncHolderGenerate methods body and complete the code generation.- Parameters:
classGenerator- the class responsible for code generationinputVariables- the source of the vector holdersworkspaceJVars- class fieldsholderExpr- holder for the function expression- Returns:
- HoldingContainer for return value
-
setup
-
reset
-
add
-
output
-
cleanup
-
isNested
public boolean isNested()- Specified by:
isNestedin interfaceFuncHolder- Overrides:
isNestedin classAbstractFuncHolder
-
isAggregating
public boolean isAggregating()- Overrides:
isAggregatingin classDrillFuncHolder
-
addProtectedBlock
protected void addProtectedBlock(ClassGenerator<?> g, com.sun.codemodel.JBlock sub, String body, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, boolean decConstantInputOnly) Description copied from class:DrillFuncHolderGenerate the function block itself, without surrounding comments, and whether or not the method is empty.- Overrides:
addProtectedBlockin classDrillFuncHolder
-
checkNullHandling
Description copied from class:DrillFuncHolderCheck if function type supports provided null handling strategy.Keep in mind that this method is invoked in
DrillFuncHolder(FunctionAttributes, FunctionInitializer)constructor so make sure not to use any state fields when overriding the method to avoid uninitialized state.- Overrides:
checkNullHandlingin classDrillFuncHolder- Parameters:
nullHandling- null handling strategy defined for a function
-