Skip to content

Commit

Permalink
[planner] Enable partial aggregates (#1676)
Browse files Browse the repository at this point in the history
Summary: Flips the switch to enable partial aggregates. This should
improve query performance.

Relevant Issues: Fixes #1440

Type of change: /kind feature

Test Plan: Tested by skaffolding to a cluster. Saw that `px/cluster` and
other scripts return reasonable results. Compared the node CPU % from
`px/cluster` (calculated through an aggregate) to the actual usage on
the node. Also, used `px:set explain=true` `px:set analyze=true` to
check that the query plan was using partial aggregates.

Changelog Message:
```release-note
Queries now support partial aggregates which should improve query performance significantly in some cases.
```

Signed-off-by: James Bartlett <[email protected]>
  • Loading branch information
JamesMBartlett authored Aug 16, 2023
1 parent febc629 commit 0e5d7d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/carnot/planner/distributed/coordinator/coordinator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,8 @@ StatusOr<SchemaToAgentsMap> LoadSchemaMap(
}

StatusOr<std::unique_ptr<DistributedPlan>> CoordinatorImpl::CoordinateImpl(const IR* logical_plan) {
// TODO(zasgar) set support_partial_agg to true to enable partial aggs.
PX_ASSIGN_OR_RETURN(std::unique_ptr<Splitter> splitter,
Splitter::Create(compiler_state_, /* support_partial_agg */ false));
Splitter::Create(compiler_state_, /* support_partial_agg */ true));
PX_ASSIGN_OR_RETURN(std::unique_ptr<BlockingSplitPlan> split_plan,
splitter->SplitKelvinAndAgents(logical_plan));
auto distributed_plan = std::make_unique<DistributedPlan>();
Expand Down

0 comments on commit 0e5d7d4

Please sign in to comment.