Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
hll_add_agg() should return an hll_empty() when aggregating over an empty set #2
The issue is avoidable with some
@TimonK I don't think we'd be breaking consistency here. The PostgreSQL manual says that "except for count, aggregate functions return a null value when no rows are selected." This is consistent with count(expression)'s definition where the return value is "the number of input rows for which the value of expression is not null."
The higher level implications for us is, when we run count(Distinct null_returning_expression), we get 0 in PostgreSQL. When we use postgresql-hll functions, we get back Null.
I'd like to submit a pull request for this if everyone thinks it makes sense. Here's what I had in mind.
First, I thought I'd modify
The proper way to do this is to modify
The proposed change modifies