Fix typos in ExecChooseHashTableSize()
Hi,
While stepping into the ExecChooseHashTableSize(),
I found two typos in the comments
One is as follows:
/* Check that buckets wont't overflow MaxAllocSize */
if (nbuckets > (MaxAllocSize / sizeof(HashJoinTuple) / 2))
break;
The other one is :
/*
* Check that space_allowed won't overlow SIZE_MAX.
*
* We don't use hash_table_bytes here, because it does not include the
* skew buckets. And we want to limit the overall memory limit.
*/
if ((*space_allowed) > (SIZE_MAX / 2))
break;
In the first comment, "wont't" should be "won't".
In the second comment, "overlow" should be "overflow".
The attached patch fixes these typos.
--
Thanks,
Tender Wang
Attachments:
0001-Fix-typos-in-the-comment.patchapplication/octet-stream; name=0001-Fix-typos-in-the-comment.patchDownload
From 52362452ff8dde767be5f8a089510c931ba3c79a Mon Sep 17 00:00:00 2001
From: Tender Wang <tndrwang@gmail.com>
Date: Tue, 18 Nov 2025 17:20:45 +0800
Subject: [PATCH] Fix typos in the comment.
---
src/backend/executor/nodeHash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c
index 29b43e4d454..88441859bf9 100644
--- a/src/backend/executor/nodeHash.c
+++ b/src/backend/executor/nodeHash.c
@@ -896,7 +896,7 @@ ExecChooseHashTableSize(double ntuples, int tupwidth, bool useskew,
*/
while (nbatch > 1)
{
- /* Check that buckets wont't overflow MaxAllocSize */
+ /* Check that buckets won't overflow MaxAllocSize */
if (nbuckets > (MaxAllocSize / sizeof(HashJoinTuple) / 2))
break;
@@ -904,7 +904,7 @@ ExecChooseHashTableSize(double ntuples, int tupwidth, bool useskew,
Assert((*num_skew_mcvs) < (INT_MAX / 2));
/*
- * Check that space_allowed won't overlow SIZE_MAX.
+ * Check that space_allowed won't overflow SIZE_MAX.
*
* We don't use hash_table_bytes here, because it does not include the
* skew buckets. And we want to limit the overall memory limit.
--
2.34.1
On Tue, Nov 18, 2025 at 6:30 PM Tender Wang <tndrwang@gmail.com> wrote:
In the first comment, "wont't" should be "won't".
In the second comment, "overlow" should be "overflow".
The first one was fixed by Álvaro in another commit. I've just pushed
a fix for the second one.
- Richard
Richard Guo <guofenglinux@gmail.com> 于2025年11月19日周三 10:18写道:
On Tue, Nov 18, 2025 at 6:30 PM Tender Wang <tndrwang@gmail.com> wrote:
In the first comment, "wont't" should be "won't".
In the second comment, "overlow" should be "overflow".The first one was fixed by Álvaro in another commit. I've just pushed
a fix for the second one.- Richard
Thanks for pushing.
--
Thanks,
Tender Wang