Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should skip NULL value in streaming min/max agg functions #4703

Closed
stdrc opened this issue Aug 17, 2022 · 2 comments · Fixed by #4960
Closed

Should skip NULL value in streaming min/max agg functions #4703

stdrc opened this issue Aug 17, 2022 · 2 comments · Fixed by #4960
Labels
component/streaming Stream processing related issue. help wanted Issues that need help from contributors type/bug Something isn't working

Comments

@stdrc
Copy link
Member

stdrc commented Aug 17, 2022

That is the behavior of batch mode and postgres.

@stdrc stdrc added type/bug Something isn't working component/streaming Stream processing related issue. labels Aug 17, 2022
@xxchan
Copy link
Member

xxchan commented Aug 17, 2022

example:

create table t(x int);
insert into t values(NULL),(1);
create materialized view mv as select min(x) as min, max(x) as max from t;

dev=> select * from mv;
 min | max
-----+-----
     |   1
(1 row)

dev=> select min(x), max(x) from t;
 ?column? | ?column?
----------+----------
        1 |        1
(1 row)

@fuyufjh fuyufjh added the help wanted Issues that need help from contributors label Aug 19, 2022
@xiangjinwu
Copy link
Contributor

related: #4272
Skipping null would fix the user-visible behavior. But it looks like the underlying logic is still seeing null as smaller than non-null values, while the expected behavior is that null being largest by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/streaming Stream processing related issue. help wanted Issues that need help from contributors type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants