return hll_empty for no input rows in hll_add_agg #155
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When I debugged Issue #129, I observed that the state transition function,
hll_add_trans
, was not being called at all. This was because the values used in the filter did not satisfy the condition. However, I noticed that the final function,hll_pack
, was called with a null input. In this case, I made development so that ifhll_pack
is called with a null input, it will returnhll_empty
.hll_pack
is the final function forhll_union_agg
as well. With my fix, ifhll_pack
is called with a null parameter while usinghll_union_agg
, it returnshll_empty
. This is causing the failure of this test:SELECT hll_union_agg(v1) FROM test_wdflbzfx WHERE recno > 100;
Moreover, when
hll_add_agg
is directly called with null parameters, it also returnshll_empty
, as mentioned in Issue #2. However,hll_union_agg
returns null in such a case. Shouldn'thll_union_agg
also returnhll_empty
when called with null parameters? What are your thoughts on this matter?