Tender Wang <[email protected]> writes:
> After finding the SJE bug involving inheritance scans and ONLY, I
> asked an LLM to generate fuzz tests to look for further issues in
> self-join elimination.
> This uncovered another wrong-result case involving restriction clauses
> with different equality operators.

If we're going to refuse that, I wonder if we couldn't simplify
match_unique_clauses a great deal: just insist that the two OpExpr
clauses be equal(), after the ChangeVarNodes substitution on the outer
clause.  Your proposal already breaks commuted-clause cases, which
seem like the only justification for all the futzing around with left
and right operands.  I doubt that detecting that is of any real-world
value anyway.

                        regards, tom lane


Reply via email to