> -----Original Message----- > From: Etsuro Fujita [mailto:fujita.ets...@lab.ntt.co.jp] > Sent: Friday, November 27, 2015 2:40 PM > To: Kaigai Kouhei(海外 浩平); Kyotaro HORIGUCHI > Cc: robertmh...@gmail.com; t...@sss.pgh.pa.us; email@example.com; > shigeru.han...@gmail.com > Subject: Re: [HACKERS] Foreign join pushdown vs EvalPlanQual > > On 2015/11/27 0:14, Kouhei Kaigai wrote: > > >> The documentation says as following so I think the former has. > >> > >> # I don't understhad what 'can or must' means, though... 'can and > >> # must'? > >> > >> + Also, this callback can or must recheck scan qualifiers and join > >> + conditions which are pushed down. Especially, it needs special > > > If fdw_recheck_quals is set up correctly and join type is inner join, > > FDW driver does not recheck by itself. Elsewhere, it has to recheck > > the joined tuple, not only reconstruction. > > Sorry, I don't understand this. In my understanding, fdw_recheck_quals > can be defined for a foreign join, regardless of the join type, > Yes, "can be defined", but will not be workable if either side of joined tuple is NULL because of outer join. SQL functions returns NULL prior to evaluation, then ExecQual() treats this result as FALSE. However, a joined tuple that has NULL fields may be a valid tuple.
We don't need to care about unmatched tuple if INNER JOIN. > and when > the fdw_recheck_quals are defined, the RecheckForeignScan callback > routine doesn't need to evaluate the fdw_recheck_quals by itself. No? > Yes, it does not need to run fdw_recheck_quals by itself (if they can guarantee correct results for any corner cases). Of course, if FDW driver keep expression for scan-qualifiers and join-clauses on another place (like fdw_exprs), it is FDW driver's responsibility to execute it, regardless of fdw_recheck_quals. Thanks, -- NEC Business Creation Division / PG-Strom Project KaiGai Kohei <kai...@ak.jp.nec.com> -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers