-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Describe the bug
A clear and concise description of what the bug is.
Duplicate rows in Aggregate Key Table.
To Reproduce
Steps to reproduce the behavior:
- create dest tbl
create table test1(
id int,
dt date,
name varchar(10) replace_if_not_null
) AGGREGATE KEY(id, dt)
partition by range (dt)(
PARTITION pmin VALUES LESS THAN ("2021-01-01"),
PARTITION p20210101 VALUES LESS THAN ("2021-01-02"),
PARTITION p20210102 VALUES LESS THAN ("2021-01-03"),
PARTITION p20210103 VALUES LESS THAN ("2021-01-04"),
PARTITION p20210104 VALUES LESS THAN ("2021-01-05"),
PARTITION p20210105 VALUES LESS THAN ("2021-01-06"),
PARTITION p20210106 VALUES LESS THAN ("2021-01-07"),
PARTITION p20210107 VALUES LESS THAN ("2021-01-08"),
PARTITION p20210108 VALUES LESS THAN ("2021-01-09"),
PARTITION p20210109 VALUES LESS THAN ("2021-01-10"),
...
PARTITION p20210130 VALUES LESS THAN ("2021-01-31")
)DISTRIBUTED BY HASH(`id`) BUCKETS 8
PROPERTIES (
"replication_num" = "3",
"storage_type"="column",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.end" = "2",
"dynamic_partition.prefix" = "p",
"dynamic_partition.replication_num" = "3",
"dynamic_partition.buckets" = "8"
);- insert into data
insert into test1
select id, dt, name
from source_tbl;- execute the Sql multi times in step 2
- query the data in test1 tbl
select * from test1 where id = 123 and dt = '2021-01-01' ;**There are duplicate lines in the result with the same primary key. **
Expected behavior
A clear and concise description of what you expected to happen.'
There is only one line if the data has the same primary key .
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels
