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
ConstructorDescriptionDrillComplexWriterAggFuncHolder
(FunctionAttributes functionAttributes, FunctionInitializer initializer) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
add()
protected void
addProtectedBlock
(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 void
checkNullHandling
(FunctionTemplate.NullHandling nullHandling) Check if function type supports provided null handling strategy.protected String
cleanup()
boolean
boolean
Checks that the current function holder stores output value using field writer instead of vector holder.boolean
isNested()
protected String
output()
renderEnd
(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) Generate methods body and complete the code generation.void
renderMiddle
(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars) com.sun.codemodel.JVar[]
renderStart
(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, FieldReference fieldReference) protected String
reset()
protected String
setup()
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:FuncHolder
Checks that the current function holder stores output value using field writer instead of vector holder.- Specified by:
isComplexWriterFuncHolder
in interfaceFuncHolder
- Overrides:
isComplexWriterFuncHolder
in 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:AbstractFuncHolder
Generate 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:
isNested
in interfaceFuncHolder
- Overrides:
isNested
in classAbstractFuncHolder
-
isAggregating
public boolean isAggregating()- Overrides:
isAggregating
in 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:DrillFuncHolder
Generate the function block itself, without surrounding comments, and whether or not the method is empty.- Overrides:
addProtectedBlock
in classDrillFuncHolder
-
checkNullHandling
Description copied from class:DrillFuncHolder
Check 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:
checkNullHandling
in classDrillFuncHolder
- Parameters:
nullHandling
- null handling strategy defined for a function
-