Re: Partial join - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Partial join
Date
Msg-id CAN_9JTwYzbHOttsZ0amun0whj5di1S+-Dec9VD3ykA+Odz4KXg@mail.gmail.com
Whole thread Raw
In response to Re: Partial join  (Arne Roland <A.Roland@index.de>)
Responses Re: Partial join  (Arne Roland <A.Roland@index.de>)
List pgsql-hackers


On Thu, Aug 1, 2019 at 7:46 PM Arne Roland <A.Roland@index.de> wrote:

Hello Richard,

thanks for your quick reply.


> We need to fix this.


Do you have a better idea than just keeping the old quals - possibly just the ones that get eliminated - in a separate data structure? Is the push down of quals the only case of elimination of quals, only counting the ones which happen before the restrict lists are generated?

In you case, the restriction 'sl = sl' is just not generated for the
join, because it forms an EC with const, which is not considered when
generating join clauses.

Please refer to the code snippet below:

@@ -1164,8 +1164,8 @@ generate_join_implied_equalities(PlannerInfo *root,
                List       *sublist = NIL;

                /* ECs containing consts do not need any further enforcement */
                if (ec->ec_has_const)
                        continue;

Thanks
Richard

pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Partial join
Next
From: Thomas Munro
Date:
Subject: Re: Store FullTransactionId in TwoPhaseFileHeader/GlobalTransactionData