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

agg query result error on single tablet table #43223

Closed
silverbullet233 opened this issue Mar 27, 2024 · 0 comments · Fixed by #43842
Closed

agg query result error on single tablet table #43223

silverbullet233 opened this issue Mar 27, 2024 · 0 comments · Fixed by #43842
Assignees
Labels
type/bug Something isn't working

Comments

@silverbullet233
Copy link
Contributor

Steps to reproduce the behavior (Required)

  1. create table and insert data
create table t (
  `c0` int,
  `c1` int,
  `c2` int
) engine=OLAP
primary key(`c0`)
distributed by hash(`c0`) buckets 1
properties("replication_num"="1");
insert into t values (1,1,1),(2,2,2),(3,3,1),(4,4,2);
  1. query and get a wrong result
mysql> set pipeline_dop=2;
Query OK, 0 rows affected (0.00 sec)

mysql> select c2,count(distinct c1,c2) from t group by c2;
+------+------------------------+
| c2   | count(DISTINCT c1, c2) |
+------+------------------------+
|    2 |                      1 |
|    1 |                      2 |
|    2 |                      1 |
+------+------------------------+
3 rows in set (0.01 sec)

Expected behavior (Required)

mysql> select c2,count(distinct c1,c2) from t group by c2;
+------+------------------------+
| c2   | count(DISTINCT c1, c2) |
+------+------------------------+
|    1 |                      2 |
|    2 |                      2 |
+------+------------------------+
2 rows in set (0.01 sec)

Real behavior (Required)

StarRocks version (Required)

mysql> select current_version();
+-------------------+
| current_version() |
+-------------------+
| main-43db8fe |
+-------------------+
1 row in set (0.01 sec)

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
2 participants