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
From 55ac0d72303b7ea431d58cbbc242dc5215e13102 Mon Sep 17 00:00:00 2001
From: Tender Wang <tndrw...@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

Reply via email to