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 once enough rows has been processed (minNumberOfRowsProcessed)
and the ratio between output(unique) and input rows is too high (> uniqueRowsRatioThreshold).
TODO https://github.com/trinodb/trino/issues/11361 add support to adaptively re-enable partial aggregation.
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).
- read volatile partialAggregationDisabled (volatile here gives visibility).
-
Constructor Summary
ConstructorsConstructorDescriptionPartialAggregationController(long minNumberOfRowsProcessedToDisable, double uniqueRowsRatioThreshold) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidonFlush(long rowsProcessed, long uniqueRowsProduced)
-
Constructor Details
-
PartialAggregationController
public PartialAggregationController(long minNumberOfRowsProcessedToDisable, double uniqueRowsRatioThreshold)
-
-
Method Details
-
isPartialAggregationDisabled
public boolean isPartialAggregationDisabled() -
onFlush
public void onFlush(long rowsProcessed, long uniqueRowsProduced) -
duplicate
-