Class PartialAggregationController
java.lang.Object
io.trino.operator.aggregation.partial.PartialAggregationController
Controls whenever partial aggregation is enabled across all
HashAggregationOperators
for a particular plan node on a single node.
Partial aggregation is disabled after sampling sufficient amount of input
and the ratio between output(unique) and input rows is too high (> uniqueRowsRatioThreshold).
The class is thread safe and objects of this class are used potentially by multiple threads/drivers simultaneously.
Different threads either:
- modify fields via synchronized onFlush(long, long, java.util.OptionalLong).
- read volatile partialAggregationDisabled (volatile here gives visibility).
-
Constructor Summary
ConstructorsConstructorDescriptionPartialAggregationController(io.airlift.units.DataSize maxPartialMemory, double uniqueRowsRatioThreshold) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidonFlush(long bytesProcessed, long rowsProcessed, OptionalLong uniqueRowsProduced)
-
Constructor Details
-
PartialAggregationController
public PartialAggregationController(io.airlift.units.DataSize maxPartialMemory, double uniqueRowsRatioThreshold)
-
-
Method Details
-
isPartialAggregationDisabled
public boolean isPartialAggregationDisabled() -
onFlush
-
duplicate
-