1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-19 17:02:53 +03:00

Rename PathKeyInfo to GroupByOrdering

0452b461bc made optimizer explore alternative orderings of group-by pathkeys.
The PathKeyInfo data structure was used to store the particular ordering of
group-by pathkeys and corresponding clauses.  It turns out that PathKeyInfo
is not the best name for that purpose.  This commit renames this data structure
to GroupByOrdering, and revises its comment.

Discussion: https://postgr.es/m/db0fc3a4-966c-4cec-a136-94024d39212d%40postgrespro.ru
Reported-by: Tom Lane
Author: Andrei Lepikhov
Reviewed-by: Alexander Korotkov, Pavel Borisov
This commit is contained in:
Alexander Korotkov
2024-06-06 13:43:24 +03:00
parent 91143c03d4
commit 0c1af2c35c
4 changed files with 24 additions and 17 deletions

View File

@@ -1468,14 +1468,21 @@ typedef struct PathKey
} PathKey;
/*
* Combines the information about pathkeys and the associated clauses.
* Contains an order of group-by clauses and the corresponding list of
* pathkeys.
*
* The elements of 'clauses' list should have the same order as the head of
* 'pathkeys' list. The tleSortGroupRef of the clause should be equal to
* ec_sortref of the pathkey equivalence class. If there are redundant
* clauses with the same tleSortGroupRef, they must be grouped together.
*/
typedef struct PathKeyInfo
typedef struct GroupByOrdering
{
NodeTag type;
List *pathkeys;
List *clauses;
} PathKeyInfo;
} GroupByOrdering;
/*
* VolatileFunctionStatus -- allows nodes to cache their