On Thu, Oct 23, 2025 at 12:07 PM David Rowley <[email protected]> wrote: > Or if it's a case of it returning false when it could have returned > true, then maybe the commit message should make that clear. I'm unable > to tell from reading it. Something like; "The previous logic in > query_is_distinct_for() was incomplete [as it failed to detect that a > query was distinct when ...]".
It's the case of failing to recognize distinctness when it actually holds (i.e., a false negative). Therefore, this issue does not cause incorrect results, but rather leads to missed optimization opportunities. How about using the following wording in the commit message? " The previous logic in query_is_distinct_for() was incomplete because the check was insufficiently thorough and could return false when it should have returned true. " - Richard
