Uses of Class
org.apache.drill.exec.expr.ClassGenerator
Package
Description
Drill expression materialization and evaluation facilities.
-
Uses of ClassGenerator in org.apache.drill.exec.expr
Modifier and TypeMethodDescriptionClassGenerator.getInnerGenerator
(String name) CodeGenerator.getRoot()
static <T> ClassGenerator<T>
CodeGenerator.getRoot
(MappingSet mappingSet, TemplateClassDefinition<T> definition, OptionSet optionManager) static <T> ClassGenerator<T>
CodeGenerator.getRoot
(TemplateClassDefinition<T> definition, OptionSet optionManager) Modifier and TypeMethodDescriptionEvaluationVisitor.addExpr
(LogicalExpression e, ClassGenerator<?> generator) ModifierConstructorDescriptionVectorVariableHolder
(ClassGenerator.HoldingContainer base, ClassGenerator<?> classGen, com.sun.codemodel.JBlock vvSetupBlock, com.sun.codemodel.JExpression vectorExpr, com.sun.codemodel.JExpression recordIndex) -
Uses of ClassGenerator in org.apache.drill.exec.expr.fn
Modifier and TypeMethodDescriptionprotected void
DrillFuncHolder.addProtectedBlock
(ClassGenerator<?> g, com.sun.codemodel.JBlock sub, String body, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, boolean workspaceOnly) Generate the function block itself, without surrounding comments, and whether or not the method is empty.protected void
DrillFuncHolder.assignInjectableValue
(ClassGenerator<?> g, com.sun.codemodel.JVar variable, WorkspaceReference ref) protected com.sun.codemodel.JVar[]
DrillFuncHolder.declareWorkspaceVariables
(ClassGenerator<?> g) protected void
DrillFuncHolder.generateBody
(ClassGenerator<?> g, ClassGenerator.BlockType bt, String body, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, boolean workspaceOnly) Generate the body of a Drill function by copying the source code of the corresponding function method into the generated output.protected ClassGenerator.HoldingContainer
DrillComplexWriterFuncHolder.generateEvalBody
(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, String body, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) protected ClassGenerator.HoldingContainer
DrillSimpleFuncHolder.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.abstract ClassGenerator.HoldingContainer
AbstractFuncHolder.renderEnd
(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) Generate methods body and complete the code generation.DrillComplexWriterAggFuncHolder.renderEnd
(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) DrillSimpleFuncHolder.renderEnd
(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) Render the various code blocks for a simple function.HiveFuncHolder.renderEnd
(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars, FunctionHolderExpression holderExpr) void
AbstractFuncHolder.renderMiddle
(ClassGenerator<?> g, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars) void
DrillComplexWriterAggFuncHolder.renderMiddle
(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, com.sun.codemodel.JVar[] workspaceJVars) abstract com.sun.codemodel.JVar[]
AbstractFuncHolder.renderStart
(ClassGenerator<?> g, ClassGenerator.HoldingContainer[] inputVariables, FieldReference fieldReference) com.sun.codemodel.JVar[]
DrillComplexWriterAggFuncHolder.renderStart
(ClassGenerator<?> classGenerator, ClassGenerator.HoldingContainer[] inputVariables, FieldReference fieldReference) com.sun.codemodel.JVar[]
DrillFuncHolder.renderStart
(ClassGenerator<?> g, ClassGenerator.HoldingContainer[] inputVariables, FieldReference fieldReference) com.sun.codemodel.JVar[]
HiveFuncHolder.renderStart
(ClassGenerator<?> g, ClassGenerator.HoldingContainer[] inputVariables, FieldReference fieldReference) Start generating code -
Uses of ClassGenerator in org.apache.drill.exec.expr.fn.impl.hive
Modifier and TypeMethodDescriptionstatic com.sun.codemodel.JBlock
ObjectInspectorHelper.initReturnValueHolder
(ClassGenerator<?> g, com.sun.codemodel.JCodeModel m, com.sun.codemodel.JVar returnValueHolder, org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector oi, TypeProtos.MinorType returnType) -
Uses of ClassGenerator in org.apache.drill.exec.ops
Modifier and TypeMethodDescription<T> T
BaseFragmentContext.getImplementationClass
(ClassGenerator<T> cg) <T> List<T>
BaseFragmentContext.getImplementationClass
(ClassGenerator<T> cg, int instanceCount) <T> T
FragmentContext.getImplementationClass
(ClassGenerator<T> cg) Generates code for a class given aClassGenerator
, and returns a single instance of the generated class.<T> List<T>
FragmentContext.getImplementationClass
(ClassGenerator<T> cg, int instanceCount) Generates code for a class given aClassGenerator
, and returns the specified number of instances of the generated class.<T> T
FragmentContextInterface.getImplementationClass
(ClassGenerator<T> cg) Generates code for a class given aClassGenerator
, and returns a single instance of the generated class.<T> List<T>
FragmentContextInterface.getImplementationClass
(ClassGenerator<T> cg, int instanceCount) Generates code for a class given aClassGenerator
, and returns the specified number of instances of the generated class. -
Uses of ClassGenerator in org.apache.drill.exec.physical.impl.aggregate
Modifier and TypeMethodDescriptionprotected void
StreamingAggBatch.addRecordValues
(ClassGenerator<StreamingAggregator> cg, LogicalExpression[] valueExprs) protected void
StreamingAggBatch.getIndex
(ClassGenerator<StreamingAggregator> g) protected void
StreamingAggBatch.outputRecordKeys
(ClassGenerator<StreamingAggregator> cg, TypedFieldId[] keyOutputIds, LogicalExpression[] keyExprs) protected void
StreamingAggBatch.outputRecordKeysPrev
(ClassGenerator<StreamingAggregator> cg, TypedFieldId[] keyOutputIds, LogicalExpression[] keyExprs) void
HashAggregator.setup
(HashAggregate hashAggrConfig, HashTableConfig htConfig, FragmentContext context, OperatorContext oContext, RecordBatch incoming, HashAggBatch outgoing, LogicalExpression[] valueExprs, List<TypedFieldId> valueFieldIds, ClassGenerator<?> cg, TypedFieldId[] keyFieldIds, VectorContainer outContainer, int extraRowBytes) void
HashAggTemplate.setup
(HashAggregate hashAggrConfig, HashTableConfig htConfig, FragmentContext context, OperatorContext oContext, RecordBatch incoming, HashAggBatch outgoing, LogicalExpression[] valueExprs, List<TypedFieldId> valueFieldIds, ClassGenerator<?> cg, TypedFieldId[] groupByOutFieldIds, VectorContainer outContainer, int extraRowBytes) protected void
StreamingAggBatch.setupIsSame
(ClassGenerator<StreamingAggregator> cg, LogicalExpression[] keyExprs) protected void
StreamingAggBatch.setupIsSameApart
(ClassGenerator<StreamingAggregator> cg, LogicalExpression[] keyExprs) -
Uses of ClassGenerator in org.apache.drill.exec.physical.impl.common
Modifier and TypeMethodDescriptionstatic void
CodeGenMemberInjector.injectMembers
(ClassGenerator<?> cg, Object instance, FragmentContext context) Generated code for a class may have several class members, they are initialized by invoking this method when the instance created.void
HashTable.setup
(HashTableConfig htConfig, BufferAllocator allocator, VectorContainer incomingBuild, RecordBatch incomingProbe, RecordBatch outgoing, VectorContainer htContainerOrig, FragmentContext context, ClassGenerator<?> cg) HashTable.setup(org.apache.drill.exec.physical.impl.common.HashTableConfig, org.apache.drill.exec.memory.BufferAllocator, org.apache.drill.exec.record.VectorContainer, org.apache.drill.exec.record.RecordBatch, org.apache.drill.exec.record.RecordBatch, org.apache.drill.exec.record.VectorContainer, org.apache.drill.exec.ops.FragmentContext, org.apache.drill.exec.expr.ClassGenerator<?>)
must be called before anything can be done to theHashTable
.void
HashTableTemplate.setup
(HashTableConfig htConfig, BufferAllocator allocator, VectorContainer incomingBuild, RecordBatch incomingProbe, RecordBatch outgoing, VectorContainer htContainerOrig, FragmentContext context, ClassGenerator<?> cg) -
Uses of ClassGenerator in org.apache.drill.exec.physical.impl.partitionsender
Modifier and TypeMethodDescriptionvoid
Partitioner.setup
(ExchangeFragmentContext context, RecordBatch incoming, HashPartitionSender popConfig, OperatorStats stats, OperatorContext oContext, ClassGenerator<?> cg, int start, int count) final void
PartitionerTemplate.setup
(ExchangeFragmentContext context, RecordBatch incoming, HashPartitionSender popConfig, OperatorStats stats, OperatorContext oContext, ClassGenerator<?> cg, int start, int end) -
Uses of ClassGenerator in org.apache.drill.exec.physical.impl.xsort
Modifier and TypeMethodDescriptionprotected void
BaseSortWrapper.generateComparisons
(ClassGenerator<?> g, VectorAccessible batch, org.slf4j.Logger logger) -
Uses of ClassGenerator in org.apache.drill.exec.vector
Modifier and TypeMethodDescriptionstatic void
CopyUtil.generateCopies
(ClassGenerator<?> g, VectorAccessible batch, boolean hyper)