-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support intermediate aggs in Orca plans (#13707)
Orca in GPDB6 has support for intermediate aggs, which isn't used in postgres. This is useful when we have a DQA and a regular "ride-along" agg. However, we need to differentiate when we should run the combine/final/trans functions when this ride-along agg is present. This commit re-adds support for intermediate aggs. The logic here is the same as 6X, however, instead of explicitly using the aggstage, we use the aggsplit, which is determined from the aggstage. The logic is defined in `AGGSPLIT_INTERNMEDIATE`. The changes in nodeAgg.c are to allow the aggref and aggstate to differ for an aggregate. This is necessary and expected in the case of an intermediate agg, as the loop will iterate over each aggstate->aggs, but the aggsplit can now be different between the aggref and the aggstate. Thus the aggsplit references are also changed to use aggref instead of aggstate.
- Loading branch information
1 parent
c6b87f7
commit c2d4bfa
Showing
9 changed files
with
34 additions
and
83 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
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
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