0003-Minor-edits-20250402.patch

text/x-patch

Filename: 0003-Minor-edits-20250402.patch
Type: text/x-patch
Part: 2
Message: Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch 0003
Subject: Minor edits 1. Fixed indentation in SH_ declarations 2. Removed a redundant comment 3. Fix sentences in a function prologue.
File+
src/backend/optimizer/path/equivclass.c 3 5
From 13476a46a146ba81f0be6c12bb4c0504f33afcd7 Mon Sep 17 00:00:00 2001
From: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Date: Wed, 2 Apr 2025 17:31:35 +0530
Subject: [PATCH 3/3] Minor edits 1. Fixed indentation in SH_ declarations 2.
 Removed a redundant comment 3. Fix sentences in a function prologue.

Ashutosh Bapat
---
 src/backend/optimizer/path/equivclass.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/backend/optimizer/path/equivclass.c b/src/backend/optimizer/path/equivclass.c
index 853d3904577..3f164fa2b3e 100644
--- a/src/backend/optimizer/path/equivclass.c
+++ b/src/backend/optimizer/path/equivclass.c
@@ -117,7 +117,7 @@ typedef struct
 #define SH_KEY                  key
 #define SH_HASH_KEY(tb, key)	\
 	hash_bytes((const unsigned char *) &(key), sizeof(ECDerivesKey))
-#define SH_EQUAL(tb, a, b)	\
+#define SH_EQUAL(tb, a, b)		\
 	((a).em1 == (b).em1 && (a).em2 == (b).em2 && (a).parent_ec == (b).parent_ec)
 #define SH_SCOPE                static inline
 #define SH_DECLARE
@@ -3634,10 +3634,9 @@ ec_clear_derived_clauses(EquivalenceClass *ec)
  *		Search for an existing RestrictInfo that equates the given pair
  *		of EquivalenceMembers, either from ec_sources or ec_derives.
  *
- * We accept clauses in either operand order, so commutators are matched. We
+ * Return a clause with matching operands in given order or commuted order. We
  * used to require matching operator OIDs, but dropped that since any
- * semantically different operator here would indicate a broken operator
- * family.
+ * semantically different operator here would indicate a broken operator family.
  *
  * Returns NULL if no matching clause is found.
  */
@@ -3717,7 +3716,6 @@ ec_search_derived_clause_for_ems(PlannerInfo *root, EquivalenceClass *ec,
 			if (!rightem &&
 				rinfo->left_em == leftem)
 			{
-				/* See the comment above in hash path for rationale. */
 				Assert(rinfo->right_em->em_is_const);
 				return rinfo;
 			}
-- 
2.34.1