Change comments of removing useless joins.

From: ywgrit <yw987194828(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Change comments of removing useless joins.
Date: 2024-01-08 09:11:44
Message-ID: CAPt2h2ZgYrZLRwaLUfMK2ggE6EyuhPd=kr1jmtcY6YQ3LA+pRg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

After reading the logic of removing useless join, I think the comment of
this might need to be changed: "Currently, join_is_removable only succeeds
if sjinfo's right hand is a single baserel. " could be changed to
"Currently, join_is_removable only succeeds if sjinfo's min_righthand is a
single baserel. ". Because the useless join in the query "select t1.* from
t1 left join (t2 left join t3 on t3.a=t2.b) on t2.a=t1.a;" would also be
eliminated. That is, the query will be converted to "select t1.* from t1;"

Attachment Content-Type Size
0001-Change-remove-useless-join-comments.patch text/x-patch 572 bytes

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Cheshev 2024-01-08 09:21:34 Re: Multidimensional Histograms
Previous Message John Naylor 2024-01-08 09:03:50 Re: add AVX2 support to simd.h