@@ -406,10 +406,10 @@ predict_num_groups(PlannerInfo *root, Path *subpath, List *group_exprs,
406
406
return (prediction <= 0 ) ? -1 : prediction ;
407
407
}
408
408
409
- double
410
- aqo_estimate_num_groups_hook (PlannerInfo * root , List * groupExprs ,
411
- Path * subpath , RelOptInfo * grouped_rel ,
412
- List * * pgset )
409
+ static double
410
+ aqo_estimate_num_groups (PlannerInfo * root , List * groupExprs ,
411
+ Path * subpath , RelOptInfo * grouped_rel ,
412
+ List * * pgset )
413
413
{
414
414
int fss ;
415
415
double predicted ;
@@ -422,12 +422,8 @@ aqo_estimate_num_groups_hook(PlannerInfo *root, List *groupExprs,
422
422
/* XXX: Don't support some GROUPING options */
423
423
goto default_estimator ;
424
424
425
- /* Zero the estinfo output parameter, if non-NULL */
426
- if (estinfo != NULL )
427
- memset (estinfo , 0 , sizeof (EstimationInfo ));
428
-
429
425
if (aqo_estimate_num_groups_next != NULL ||
430
- estimate_num_groups_hook != aqo_estimate_num_groups )
426
+ estimate_num_groups_hook != aqo_estimate_num_groups_next )
431
427
/* It is unclear that to do in situation of such kind. Just report it */
432
428
elog (WARNING , "AQO is in the middle of the estimate_num_groups_hook chain" );
433
429
@@ -457,10 +453,10 @@ aqo_estimate_num_groups_hook(PlannerInfo *root, List *groupExprs,
457
453
default_estimator :
458
454
if (aqo_estimate_num_groups_next )
459
455
return (* aqo_estimate_num_groups_next )(root , groupExprs , subpath ,
460
- grouped_rel , pgset , estinfo );
456
+ grouped_rel , pgset );
461
457
else
462
458
return estimate_num_groups (root , groupExprs , subpath -> rows ,
463
- pgset , estinfo );
459
+ pgset );
464
460
}
465
461
466
462
void
0 commit comments