-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Search before asking
- I had searched in the issues and found no similar issues.
Version
2.1.3
What's Wrong?
Given a table with a column that is an aggregate key:
CREATE TABLE t1(c0 varchar(1) NOT NULL) AGGREGATE KEY(c0) DISTRIBUTED BY RANDOM PROPERTIES ("replication_num" = "1");
If we insert duplicate entries, and select distinct, we get duplicate rows
INSERT INTO t1 (c0) VALUES ('a');
INSERT INTO t1 (c0) VALUES ('a');
SELECT DISTINCT t1.c0 FROM t1; -- returns both rows
What You Expected?
only distinct rows returned
How to Reproduce?
DROP DATABASE IF EXISTS doris0;
CREATE DATABASE doris0;
USE doris0;
CREATE TABLE t1(c0 varchar(1) NOT NULL) AGGREGATE KEY(c0) DISTRIBUTED BY RANDOM PROPERTIES ("replication_num" = "1");
INSERT INTO t1 (c0) VALUES ('a');
INSERT INTO t1 (c0) VALUES ('a');
SELECT DISTINCT t1.c0 FROM t1;
Anything Else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels