This repository has been archived by the owner on Apr 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
How to calculate and produce count of empty aggregations #318
Milestone
Comments
It's worth checking the Postgres docs:
end of 7.2.3: https://www.postgresql.org/docs/9.6/static/queries-table-expressions.html#QUERIES-GROUP via @jmarton |
Related literature (thanks to @bergmanngabor): https://dl.acm.org/citation.cfm?id=137852 |
This causes BI Q7 to break. A simplified version shows the issue:
|
The problem can be pinpointed to the following condition in if (oldValues != newValues) Of course, this line is there for a reason... |
szarnyasg
added a commit
that referenced
this issue
Mar 4, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Handling aggregations incrementally is tricky. For example, the simple query of
should return a single row (containing
0
) for an empty database. So, the philosophical question is, for an empty aggregation set, do we return an0
or nothing?The issue can be demonstrated with a PostgreSQL console:
However, if we aggregate for
a
:Or, if you think aggregating for
a
is ugly, we can aggregate forb
:The issues of handling
null
s forOPTIONAL MATCH
clauses is also related...The text was updated successfully, but these errors were encountered: