On Wed, Sep 16, 2026 at 1:56 PM Richard Guo <[email protected]> wrote: > I think we have to insist that the preprocessing happens after join > alias expansion, which is what my v2 patch in [1] did. But that patch > was not complete: as I explained in [2], it doesn't handle copies that > were pushed into a SubLink's subselect. I think we can cover those by > also running the preprocessing in preprocess_expression, right before > SS_process_sublinks. That way each upper-level PHV is preprocessed > exactly once, at the level it belongs to, and always after join alias > expansion. > > Hence, the attached fix.
I've pushed this patch and back-patched it to v16. - Richard
