apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.64k stars 3.26k forks source link

[Bug] export partition not work when DISTRIBUTED BY RANDOM BUCKETS AUTO #27198

Open user-GitHub-user opened 11 months ago

user-GitHub-user commented 11 months ago

Search before asking

Version

2.0.2

What's Wrong?

when create table by BUCKETS AUTO, An export with partitions exports all of the table's data

What You Expected?

An export with partitions exports only the data in the specified partition

How to Reproduce?

CREATE TABLEkec( timestampdatetime NULL COMMENT "时间" ) ENGINE=OLAP DUPLICATE KEY(timestamp) COMMENT "" PARTITION BY RANGE(timestamp)() DISTRIBUTED BY RANDOM BUCKETS AUTO PROPERTIES ( "dynamic_partition.enable" = "true", "dynamic_partition.time_unit" = "HOUR", "dynamic_partition.end" = "24", "dynamic_partition.prefix" = "p", "replication_num" = "2" )

You need to change the time and partition key: insert into kec values("2023-11-17 16:01:01"); insert into kec values("2023-11-17 17:01:01");

EXPORT TABLE kec PARTITION(p2023111717) TO "file:///tmp/" PROPERTIES ( "label" = "kec_p2023111717" );

SHOW EXPORT WHERE LABEL = "kec_p2023111717" ORDER BY StartTime DESC;

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

Yulei-Yang commented 11 months ago

cannot reproduce in lastest 2.0 and master