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

count(distinct _row_id) causing other count(distinct ...) producing wrong result #20187

Open
stdrc opened this issue Jan 16, 2025 · 0 comments
Open
Labels
type/bug Something isn't working
Milestone

Comments

@stdrc
Copy link
Member

stdrc commented Jan 16, 2025

Describe the bug

No response

Error message/log

No response

To Reproduce

dev=> create table t (foo int, bar int);
CREATE_TABLE
dev=> insert into t values (1, 1), (2, 2), (1, 1);
INSERT 0 3
dev=> select count(foo), count(distinct foo) from t;
 count | count 
-------+-------
     3 |     2
(1 row)

dev=> select count(foo), count(distinct foo), count(distinct _row_id) from t;
 count | count | count 
-------+-------+-------
     3 |     1 |     3
             ^
           wrong
(1 row)

dev=> select count(foo), count(distinct foo), count(distinct bar) from t;
 count | count | count 
-------+-------+-------
     3 |     2 |     2
(1 row)

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@stdrc stdrc added the type/bug Something isn't working label Jan 16, 2025
@github-actions github-actions bot added this to the release-2.3 milestone Jan 16, 2025
@stdrc stdrc changed the title count(distinct _row_id) causing other count producing wrong result count(distinct _row_id) causing other count(distinct ...) producing wrong result Jan 16, 2025
@BugenZhao BugenZhao marked this as a duplicate of #20188 Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant