On Thu, Mar 6, 2025 at 8:17 PM Andrei Lepikhov <lepihov(at)gmail(dot)com> wrote:
> Playing with memoisation, I found the case where the Memoize is put over
> a JOIN node (see attachment).
> I recall a discussion we had with Richard in which he mentioned [1] that
> this feature is still not implemented and is hard to design.
> I'm not sure, but may it be a sign of a potential bug?
In your case, the Memoize node is added on top of a base relation of a
subquery RTE, not a join relation. The final plan might be kind of
confusing because the SubqueryScan node is considered trivial and is
removed from the plan tree.
Thanks
Richard