You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Similar to the "count-bug" case that produces incorrect results #15032
The well-known "count-bug" is not specific to the count aggregate, and outer-join does not solve it.
The anomaly can occur on any aggregate function; aggregates need modification to distiguish empty set from null values; and optimizing out the outerjoin depends on utilization context
Activity
suibianwanwank commentedon Mar 5, 2025
take
suibianwanwank commentedon Apr 2, 2025
Additionally, I tried this query in several other databases—here are some execution plans.
SQL server execution plan:
Presto execution plan:
BTW, I ran this query in DuckDB and found that DuckDB also has this issue.
FYI, @xudong963 @jayzhan211
jayzhan211 commentedon Apr 2, 2025