Package io.prestosql.sql.planner.sanity
Class ValidateAggregationsWithDefaultValues
- java.lang.Object
-
- io.prestosql.sql.planner.sanity.ValidateAggregationsWithDefaultValues
-
- All Implemented Interfaces:
PlanSanityChecker.Checker
public class ValidateAggregationsWithDefaultValues extends Object implements PlanSanityChecker.Checker
When an aggregation has an empty grouping set then a default value needs to be returned in the output (e.g: 0 for COUNT(*)). In case if the aggregation is split into FINAL and PARTIAL, then default values are produced by PARTIAL aggregations. In order for the default values not to be duplicated, FINAL aggregation needs to be separated from PARTIAL aggregation by a remote repartition exchange or the FINAL aggregation needs to be executed on a single node. In case both FINAL and PARTIAL aggregations are executed on a single node, then those need to separated by a local repartition exchange or the FINAL aggregation needs to be executed in a single thread.
-
-
Constructor Summary
Constructors Constructor Description ValidateAggregationsWithDefaultValues(boolean forceSingleNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
validate(PlanNode planNode, Session session, Metadata metadata, TypeOperators typeOperators, TypeAnalyzer typeAnalyzer, TypeProvider types, WarningCollector warningCollector)
-
-
-
Method Detail
-
validate
public void validate(PlanNode planNode, Session session, Metadata metadata, TypeOperators typeOperators, TypeAnalyzer typeAnalyzer, TypeProvider types, WarningCollector warningCollector)
- Specified by:
validate
in interfacePlanSanityChecker.Checker
-
-