-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#19839] YSQL: Pushdown partial aggregate
Summary: Allow to pushdown aggregates where split is AGGSPLIT_INITIAL_SERIAL. Backgrownd: there are 3 types of aggregate split: - AGGSPLIT_SIMPLE - no split, aggregation evaluates both phase 1 and phase 2; - AGGSPLIT_INITIAL_SERIAL - inner part of the split, aggregation evaluates phase 1 only; - AGGSPLIT_FINAL_DESERIAL - outer part f the split, aggregation evaluates phase 2 only. We previously only allowed to pushdown aggregate functions with no split, however we can also safely pushdown AGGSPLIT_INITIAL_SERIAL functions, since the phase 1 is the part of the aggregate function which is actually being pushed down. If a Partial Aggregate is pushed down, the plan node actually does nothing, but forward phase 1 results from the YB scan to upper level, so indicate that fact in the explain output by labeling the aggregate node with pushdown as "Noop Aggregate" instead of "Partial Aggregate". Jira: DB-8771 Test Plan: ybd --java-test 'org.yb.pgsql.TestPgRegressParallel#testPgRegressParallel' Reviewers: jason, tnayak Reviewed By: tnayak Subscribers: yql Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D30579
- Loading branch information
1 parent
51e0dae
commit fd5136c
Showing
4 changed files
with
57 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters