From 2fb894004592a12835ef890de24e9b91f88422ba Mon Sep 17 00:00:00 2001 From: Alexander Korotkov Date: Thu, 2 May 2024 23:09:09 +0300 Subject: [PATCH v2 1/4] Clarify the SJE (self-join elimination) acronym This commit ensures each source file containing the SJE acronym has disambiguation in its first occurrence. --- src/backend/optimizer/plan/analyzejoins.c | 2 +- src/test/regress/expected/join.out | 3 ++- src/test/regress/sql/join.sql | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/backend/optimizer/plan/analyzejoins.c b/src/backend/optimizer/plan/analyzejoins.c index 506fccd20c9..b2a633ba4d7 100644 --- a/src/backend/optimizer/plan/analyzejoins.c +++ b/src/backend/optimizer/plan/analyzejoins.c @@ -1705,7 +1705,7 @@ update_eclasses(EquivalenceClass *ec, int from, int to) * "Logically" compares two RestrictInfo's ignoring the 'rinfo_serial' field, * which makes almost every RestrictInfo unique. This type of comparison is * useful when removing duplicates while moving RestrictInfo's from removed - * relation to remaining relation during self-join elimination. + * relation to remaining relation during self-join elimination (SJE). * * XXX: In the future, we might remove the 'rinfo_serial' field completely and * get rid of this function. diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out index 8b640c2fc2f..4e1288814ab 100644 --- a/src/test/regress/expected/join.out +++ b/src/test/regress/expected/join.out @@ -6802,7 +6802,8 @@ explain (costs off) select 1 from reset join_collapse_limit; reset enable_seqscan; --- Check that clauses from the join filter list is not lost on the self-join removal +-- Check that clauses from the join filter list is not lost on the self-join +-- elimination (SJE) CREATE TABLE emp1 (id SERIAL PRIMARY KEY NOT NULL, code int); EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM emp1 e1, emp1 e2 WHERE e1.id = e2.id AND e2.code <> e1.code; diff --git a/src/test/regress/sql/join.sql b/src/test/regress/sql/join.sql index c4c6c7b8ba2..f5d06dbffb1 100644 --- a/src/test/regress/sql/join.sql +++ b/src/test/regress/sql/join.sql @@ -2608,7 +2608,8 @@ explain (costs off) select 1 from reset join_collapse_limit; reset enable_seqscan; --- Check that clauses from the join filter list is not lost on the self-join removal +-- Check that clauses from the join filter list is not lost on the self-join +-- elimination (SJE) CREATE TABLE emp1 (id SERIAL PRIMARY KEY NOT NULL, code int); EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM emp1 e1, emp1 e2 WHERE e1.id = e2.id AND e2.code <> e1.code; -- 2.39.3 (Apple Git-145)