Typos in the comment for the estimate_multivariate_ndistinct()

Started by Tender Wang9 months ago4 messages
#1Tender Wang
tndrwang@gmail.com
1 attachment(s)

Hi,

While reading the estimate_multivariate_ndistinct(),
I think "If a match it found, *varinfos is
* updated to remove the list of matched varinfos"
should be "If a match is found, *varinfos is
* updated to remove the list of matched varinfos"
I've attached a patch for that.

--
Thanks,
Tender Wang

Attachments:

0001-Fix-a-typo.patchtext/plain; charset=US-ASCII; name=0001-Fix-a-typo.patchDownload
From 55ac0d72303b7ea431d58cbbc242dc5215e13102 Mon Sep 17 00:00:00 2001
From: Tender Wang <tndrwang@gmail.com>
Date: Mon, 14 Apr 2025 21:28:53 +0800
Subject: [PATCH] Fix a typo

---
 src/backend/utils/adt/selfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 588d991fa57..23abfafb165 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -4148,7 +4148,7 @@ estimate_hashagg_tablesize(PlannerInfo *root, Path *path,
 /*
  * Find applicable ndistinct statistics for the given list of VarInfos (which
  * must all belong to the given rel), and update *ndistinct to the estimate of
- * the MVNDistinctItem that best matches.  If a match it found, *varinfos is
+ * the MVNDistinctItem that best matches.  If a match is found, *varinfos is
  * updated to remove the list of matched varinfos.
  *
  * Varinfos that aren't for simple Vars are ignored.
-- 
2.34.1

#2Tender Wang
tndrwang@gmail.com
In reply to: Tender Wang (#1)
Re: Typos in the comment for the estimate_multivariate_ndistinct()

Tender Wang <tndrwang@gmail.com> 于2025年4月14日周一 21:34写道:

Hi,

While reading the estimate_multivariate_ndistinct(),
I think "If a match it found, *varinfos is
* updated to remove the list of matched varinfos"
should be "If a match is found, *varinfos is
* updated to remove the list of matched varinfos"
I've attached a patch for that.

Hi Alvaro,

Can you help me double-check this?

--
Thanks,
Tender Wang

#3Daniel Gustafsson
daniel@yesql.se
In reply to: Tender Wang (#1)
Re: Typos in the comment for the estimate_multivariate_ndistinct()

On 14 Apr 2025, at 15:34, Tender Wang <tndrwang@gmail.com> wrote:

Hi,

While reading the estimate_multivariate_ndistinct(),
I think "If a match it found, *varinfos is
* updated to remove the list of matched varinfos"
should be "If a match is found, *varinfos is
* updated to remove the list of matched varinfos"
I've attached a patch for that.

Seems like a correct change.

--
Daniel Gustafsson

#4Tender Wang
tndrwang@gmail.com
In reply to: Daniel Gustafsson (#3)
Re: Typos in the comment for the estimate_multivariate_ndistinct()

Daniel Gustafsson <daniel@yesql.se> 于2025年4月16日周三 22:20写道:

On 14 Apr 2025, at 15:34, Tender Wang <tndrwang@gmail.com> wrote:

Hi,

While reading the estimate_multivariate_ndistinct(),
I think "If a match it found, *varinfos is
* updated to remove the list of matched varinfos"
should be "If a match is found, *varinfos is
* updated to remove the list of matched varinfos"
I've attached a patch for that.

Seems like a correct change.

Thanks for checking.

--
Thanks,
Tender Wang