@@ -450,7 +450,7 @@ group_keys_reorder_by_pathkeys(List *pathkeys, List **group_pathkeys,
450
450
/*
451
451
* pathkeys_are_duplicate
452
452
* Check if give pathkeys are already contained the list of
453
- * PathKeyInfo 's.
453
+ * GroupByOrdering 's.
454
454
*/
455
455
static bool
456
456
pathkeys_are_duplicate (List * infos , List * pathkeys )
@@ -459,7 +459,7 @@ pathkeys_are_duplicate(List *infos, List *pathkeys)
459
459
460
460
foreach (lc , infos )
461
461
{
462
- PathKeyInfo * info = lfirst_node (PathKeyInfo , lc );
462
+ GroupByOrdering * info = lfirst_node (GroupByOrdering , lc );
463
463
464
464
if (compare_pathkeys (pathkeys , info -> pathkeys ) == PATHKEYS_EQUAL )
465
465
return true;
@@ -471,7 +471,7 @@ pathkeys_are_duplicate(List *infos, List *pathkeys)
471
471
* get_useful_group_keys_orderings
472
472
* Determine which orderings of GROUP BY keys are potentially interesting.
473
473
*
474
- * Returns a list of PathKeyInfo items, each representing an interesting
474
+ * Returns a list of GroupByOrdering items, each representing an interesting
475
475
* ordering of GROUP BY keys. Each item stores pathkeys and clauses in the
476
476
* matching order.
477
477
*
@@ -486,13 +486,13 @@ get_useful_group_keys_orderings(PlannerInfo *root, Path *path)
486
486
{
487
487
Query * parse = root -> parse ;
488
488
List * infos = NIL ;
489
- PathKeyInfo * info ;
489
+ GroupByOrdering * info ;
490
490
491
491
List * pathkeys = root -> group_pathkeys ;
492
492
List * clauses = root -> processed_groupClause ;
493
493
494
494
/* always return at least the original pathkeys/clauses */
495
- info = makeNode (PathKeyInfo );
495
+ info = makeNode (GroupByOrdering );
496
496
info -> pathkeys = pathkeys ;
497
497
info -> clauses = clauses ;
498
498
infos = lappend (infos , info );
@@ -528,7 +528,7 @@ get_useful_group_keys_orderings(PlannerInfo *root, Path *path)
528
528
(enable_incremental_sort || n == root -> num_groupby_pathkeys ) &&
529
529
!pathkeys_are_duplicate (infos , pathkeys ))
530
530
{
531
- info = makeNode (PathKeyInfo );
531
+ info = makeNode (GroupByOrdering );
532
532
info -> pathkeys = pathkeys ;
533
533
info -> clauses = clauses ;
534
534
@@ -553,7 +553,7 @@ get_useful_group_keys_orderings(PlannerInfo *root, Path *path)
553
553
(enable_incremental_sort || n == list_length (root -> sort_pathkeys )) &&
554
554
!pathkeys_are_duplicate (infos , pathkeys ))
555
555
{
556
- info = makeNode (PathKeyInfo );
556
+ info = makeNode (GroupByOrdering );
557
557
info -> pathkeys = pathkeys ;
558
558
info -> clauses = clauses ;
559
559
@@ -563,7 +563,7 @@ get_useful_group_keys_orderings(PlannerInfo *root, Path *path)
563
563
564
564
#ifdef USE_ASSERT_CHECKING
565
565
{
566
- PathKeyInfo * pinfo = linitial_node (PathKeyInfo , infos );
566
+ GroupByOrdering * pinfo = linitial_node (GroupByOrdering , infos );
567
567
ListCell * lc ;
568
568
569
569
/* Test consistency of info structures */
@@ -572,7 +572,7 @@ get_useful_group_keys_orderings(PlannerInfo *root, Path *path)
572
572
ListCell * lc1 ,
573
573
* lc2 ;
574
574
575
- info = lfirst_node (PathKeyInfo , lc );
575
+ info = lfirst_node (GroupByOrdering , lc );
576
576
577
577
Assert (list_length (info -> clauses ) == list_length (pinfo -> clauses ));
578
578
Assert (list_length (info -> pathkeys ) == list_length (pinfo -> pathkeys ));
0 commit comments