diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2024-06-06 13:43:24 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2024-06-06 13:43:24 +0300 |
commit | 0c1af2c35c7b456bd2fc76bbc9df5aa9c7911bde (patch) | |
tree | 05088838be5bebc85300b8e2a2c9389fcea20341 /src/include/nodes/pathnodes.h | |
parent | 91143c03d4ca36406a53e05cd421b19e47d131d1 (diff) |
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
Diffstat (limited to 'src/include/nodes/pathnodes.h')
-rw-r--r-- | src/include/nodes/pathnodes.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h index 14ef296ab72..78489398294 100644 --- a/src/include/nodes/pathnodes.h +++ b/src/include/nodes/pathnodes.h @@ -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 |