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

chore: add integration test for dropping partition table #870

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions integration_tests/cases/env/cluster/ddl/partition_table.result
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ tsid,t,name,id,value,
UInt64(5639753573168158607),Timestamp(1651737067000),String("ceresdb3"),Int32(0),Double(103.0),


SELECT * from partition_table_t where name in ("ceresdb0", "ceresdb1", "ceresdb2", "ceresdb3", "ceresdb4") order by name;;
SELECT * from partition_table_t where name in ("ceresdb0", "ceresdb1", "ceresdb2", "ceresdb3", "ceresdb4") order by name;

tsid,t,name,id,value,
UInt64(7867167026748566913),Timestamp(1651737067000),String("ceresdb0"),Int32(0),Double(100.0),
Expand All @@ -79,7 +79,7 @@ UInt64(5639753573168158607),Timestamp(1651737067000),String("ceresdb3"),Int32(0)
UInt64(1510325626916728375),Timestamp(1651737067000),String("ceresdb4"),Int32(0),Double(104.0),


SELECT * from partition_table_t where name in ("ceresdb5", "ceresdb6", "ceresdb7","ceresdb8", "ceresdb9", "ceresdb10") order by name;;
SELECT * from partition_table_t where name in ("ceresdb5", "ceresdb6", "ceresdb7","ceresdb8", "ceresdb9", "ceresdb10") order by name;

tsid,t,name,id,value,
UInt64(7158007527379307345),Timestamp(1651737067000),String("ceresdb10"),Int32(0),Double(110.0),
Expand All @@ -90,3 +90,13 @@ UInt64(9923681778193615344),Timestamp(1651737067000),String("ceresdb8"),Int32(0)
UInt64(4860320137932382618),Timestamp(1651737067000),String("ceresdb9"),Int32(0),Double(109.0),


DROP TABLE IF EXISTS `partition_table_t`;

affected_rows: 0

SHOW CREATE TABLE partition_table_t;

Table,Create Table,
String("partition_table_t"),String("CREATE TABLE `partition_table_t` (`tsid` uint64 NOT NULL, `t` timestamp NOT NULL, `name` string TAG, `id` int TAG, `value` double NOT NULL, PRIMARY KEY(tsid,t), TIMESTAMP KEY(t)) PARTITION BY KEY(name) PARTITIONS 4 ENGINE=Analytic WITH(arena_block_size='2097152', compaction_strategy='default', compression='ZSTD', enable_ttl='false', num_rows_per_row_group='8192', segment_duration='', storage_format='AUTO', ttl='7d', update_mode='OVERWRITE', write_buffer_size='33554432')"),


7 changes: 5 additions & 2 deletions integration_tests/cases/env/cluster/ddl/partition_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ SELECT * from partition_table_t where name = "ceresdb2";

SELECT * from partition_table_t where name = "ceresdb3";

SELECT * from partition_table_t where name in ("ceresdb0", "ceresdb1", "ceresdb2", "ceresdb3", "ceresdb4") order by name;;
SELECT * from partition_table_t where name in ("ceresdb0", "ceresdb1", "ceresdb2", "ceresdb3", "ceresdb4") order by name;

SELECT * from partition_table_t where name in ("ceresdb5", "ceresdb6", "ceresdb7","ceresdb8", "ceresdb9", "ceresdb10") order by name;;
SELECT * from partition_table_t where name in ("ceresdb5", "ceresdb6", "ceresdb7","ceresdb8", "ceresdb9", "ceresdb10") order by name;

DROP TABLE IF EXISTS `partition_table_t`;

SHOW CREATE TABLE partition_table_t;