Class InMemoryHashAggregationBuilder
java.lang.Object
io.trino.operator.aggregation.builder.InMemoryHashAggregationBuilder
- All Implemented Interfaces:
HashAggregationBuilder,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionInMemoryHashAggregationBuilder(List<AggregatorFactory> aggregatorFactories, AggregationNode.Step step, int expectedGroups, List<Type> groupByTypes, List<Integer> groupByChannels, Optional<Integer> hashChannel, OperatorContext operatorContext, Optional<io.airlift.units.DataSize> maxPartialMemory, JoinCompiler joinCompiler, UpdateMemory updateMemory) InMemoryHashAggregationBuilder(List<AggregatorFactory> aggregatorFactories, AggregationNode.Step step, int expectedGroups, List<Type> groupByTypes, List<Integer> groupByChannels, Optional<Integer> hashChannel, OperatorContext operatorContext, Optional<io.airlift.units.DataSize> maxPartialMemory, Optional<Integer> unspillIntermediateChannelOffset, JoinCompiler joinCompiler, UpdateMemory updateMemory) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidintlonglongbuilding hash sorted results requires memory for sorting group IDs.intlongbooleanisFull()Work<?> processPage(Page page) voidcom.google.common.util.concurrent.ListenableFuture<Void> toTypes(List<? extends Type> groupByType, List<AggregatorFactory> factories, Optional<Integer> hashChannel) void
-
Constructor Details
-
InMemoryHashAggregationBuilder
public InMemoryHashAggregationBuilder(List<AggregatorFactory> aggregatorFactories, AggregationNode.Step step, int expectedGroups, List<Type> groupByTypes, List<Integer> groupByChannels, Optional<Integer> hashChannel, OperatorContext operatorContext, Optional<io.airlift.units.DataSize> maxPartialMemory, JoinCompiler joinCompiler, UpdateMemory updateMemory) -
InMemoryHashAggregationBuilder
public InMemoryHashAggregationBuilder(List<AggregatorFactory> aggregatorFactories, AggregationNode.Step step, int expectedGroups, List<Type> groupByTypes, List<Integer> groupByChannels, Optional<Integer> hashChannel, OperatorContext operatorContext, Optional<io.airlift.units.DataSize> maxPartialMemory, Optional<Integer> unspillIntermediateChannelOffset, JoinCompiler joinCompiler, UpdateMemory updateMemory)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceHashAggregationBuilder
-
processPage
- Specified by:
processPagein interfaceHashAggregationBuilder
-
updateMemory
public void updateMemory()- Specified by:
updateMemoryin interfaceHashAggregationBuilder
-
isFull
public boolean isFull()- Specified by:
isFullin interfaceHashAggregationBuilder
-
startMemoryRevoke
- Specified by:
startMemoryRevokein interfaceHashAggregationBuilder
-
finishMemoryRevoke
public void finishMemoryRevoke()- Specified by:
finishMemoryRevokein interfaceHashAggregationBuilder
-
getSizeInMemory
public long getSizeInMemory() -
getGroupIdsSortingSize
public long getGroupIdsSortingSize()building hash sorted results requires memory for sorting group IDs. This method returns size of that memory requirement. -
setSpillOutput
public void setSpillOutput() -
getKeyChannels
public int getKeyChannels() -
getGroupCount
public long getGroupCount() -
buildResult
- Specified by:
buildResultin interfaceHashAggregationBuilder
-
buildHashSortedResult
-
buildSpillTypes
-
getCapacity
public int getCapacity() -
buildTypes
-
toTypes
-