@@ -3443,13 +3443,13 @@ estimate_num_groups(PlannerInfo *root, List *groupExprs, double input_rows,
3443
3443
* expression, treat it as a single variable even if it's really more
3444
3444
* complicated.
3445
3445
*
3446
- * XXX This has the consequence that if there's a statistics on the
3447
- * expression, we don't split it into individual Vars. This affects
3448
- * our selection of statistics in estimate_multivariate_ndistinct,
3449
- * because it's probably better to use more accurate estimate for each
3450
- * expression and treat them as independent, than to combine estimates
3451
- * for the extracted variables when we don't know how that relates to
3452
- * the expressions.
3446
+ * XXX This has the consequence that if there's a statistics object on
3447
+ * the expression, we don't split it into individual Vars. This
3448
+ * affects our selection of statistics in
3449
+ * estimate_multivariate_ndistinct, because it's probably better to
3450
+ * use more accurate estimate for each expression and treat them as
3451
+ * independent, than to combine estimates for the extracted variables
3452
+ * when we don't know how that relates to the expressions.
3453
3453
*/
3454
3454
examine_variable (root , groupexpr , 0 , & vardata );
3455
3455
if (HeapTupleIsValid (vardata .statsTuple ) || vardata .isunique )
@@ -3918,7 +3918,7 @@ estimate_multivariate_ndistinct(PlannerInfo *root, RelOptInfo *rel,
3918
3918
if (!rel -> statlist )
3919
3919
return false;
3920
3920
3921
- /* look for the ndistinct statistics matching the most vars */
3921
+ /* look for the ndistinct statistics object matching the most vars */
3922
3922
nmatches_vars = 0 ; /* we require at least two matches */
3923
3923
nmatches_exprs = 0 ;
3924
3924
foreach (lc , rel -> statlist )
@@ -3964,7 +3964,7 @@ estimate_multivariate_ndistinct(PlannerInfo *root, RelOptInfo *rel,
3964
3964
continue ;
3965
3965
}
3966
3966
3967
- /* expression - see if it's in the statistics */
3967
+ /* expression - see if it's in the statistics object */
3968
3968
foreach (lc3 , info -> exprs )
3969
3969
{
3970
3970
Node * expr = (Node * ) lfirst (lc3 );
@@ -4053,7 +4053,7 @@ estimate_multivariate_ndistinct(PlannerInfo *root, RelOptInfo *rel,
4053
4053
if (!AttrNumberIsForUserDefinedAttr (attnum ))
4054
4054
continue ;
4055
4055
4056
- /* Is the variable covered by the statistics? */
4056
+ /* Is the variable covered by the statistics object ? */
4057
4057
if (!bms_is_member (attnum , matched_info -> keys ))
4058
4058
continue ;
4059
4059
@@ -4075,7 +4075,7 @@ estimate_multivariate_ndistinct(PlannerInfo *root, RelOptInfo *rel,
4075
4075
if (found )
4076
4076
continue ;
4077
4077
4078
- /* expression - see if it's in the statistics */
4078
+ /* expression - see if it's in the statistics object */
4079
4079
idx = 0 ;
4080
4080
foreach (lc3 , matched_info -> exprs )
4081
4081
{
@@ -5252,7 +5252,7 @@ examine_variable(PlannerInfo *root, Node *node, int varRelid,
5252
5252
{
5253
5253
HeapTuple t = statext_expressions_load (info -> statOid , pos );
5254
5254
5255
- /* Get index 's table for permission check */
5255
+ /* Get statistics object 's table for permission check */
5256
5256
RangeTblEntry * rte ;
5257
5257
Oid userid ;
5258
5258
@@ -5276,8 +5276,8 @@ examine_variable(PlannerInfo *root, Node *node, int varRelid,
5276
5276
/*
5277
5277
* For simplicity, we insist on the whole table being
5278
5278
* selectable, rather than trying to identify which
5279
- * column(s) the statistics depends on. Also require all
5280
- * rows to be selectable --- there must be no
5279
+ * column(s) the statistics object depends on. Also
5280
+ * require all rows to be selectable --- there must be no
5281
5281
* securityQuals from security barrier views or RLS
5282
5282
* policies.
5283
5283
*/
0 commit comments