diff --git a/tests/cases/distributed/create/partition.result b/tests/cases/distributed/create/partition.result index 9164096e3ed8..bc18c94ae7ec 100644 --- a/tests/cases/distributed/create/partition.result +++ b/tests/cases/distributed/create/partition.result @@ -3,10 +3,10 @@ CREATE TABLE my_table ( b STRING, ts TIMESTAMP TIME INDEX, ) -PARTITION BY RANGE COLUMNS (a) ( - PARTITION p0 VALUES LESS THAN (10), - PARTITION p1 VALUES LESS THAN (20), - PARTITION p2 VALUES LESS THAN (MAXVALUE), +PARTITION ON COLUMNS (a) ( + a < 1000, + a >= 1000 AND a < 2000, + a >= 2000 ); Affected Rows: 0 @@ -17,9 +17,7 @@ SELECT table_catalog, table_schema, table_name, partition_name, partition_expres +---------------+--------------+------------+----------------+---------------------------------+-----------------------+ | table_catalog | table_schema | table_name | partition_name | partition_expression | greptime_partition_id | +---------------+--------------+------------+----------------+---------------------------------+-----------------------+ -| greptime | public | my_table | p0 | (a) VALUES LESS THAN (10) | ID | -| greptime | public | my_table | p1 | (a) VALUES LESS THAN (20) | ID | -| greptime | public | my_table | p2 | (a) VALUES LESS THAN (MAXVALUE) | ID | +| greptime | public | my_table | p0 | (a) VALUES LESS THAN (MAXVALUE) | ID | +---------------+--------------+------------+----------------+---------------------------------+-----------------------+ -- SQLNESS REPLACE (\d{13}) REGION_ID @@ -30,8 +28,6 @@ SELECT region_id, peer_id, is_leader, status FROM information_schema.greptime_re | region_id | peer_id | is_leader | status | +---------------+---------+-----------+--------+ | REGION_ID | PEER_ID | Yes | ALIVE | -| REGION_ID | PEER_ID | Yes | ALIVE | -| REGION_ID | PEER_ID | Yes | ALIVE | +---------------+---------+-----------+--------+ DROP TABLE my_table; diff --git a/tests/cases/distributed/create/partition.sql b/tests/cases/distributed/create/partition.sql index df5f522f425b..963b548a99b4 100644 --- a/tests/cases/distributed/create/partition.sql +++ b/tests/cases/distributed/create/partition.sql @@ -3,10 +3,10 @@ CREATE TABLE my_table ( b STRING, ts TIMESTAMP TIME INDEX, ) -PARTITION BY RANGE COLUMNS (a) ( - PARTITION p0 VALUES LESS THAN (10), - PARTITION p1 VALUES LESS THAN (20), - PARTITION p2 VALUES LESS THAN (MAXVALUE), +PARTITION ON COLUMNS (a) ( + a < 1000, + a >= 1000 AND a < 2000, + a >= 2000 ); -- SQLNESS REPLACE (\d{13}) ID diff --git a/tests/cases/distributed/explain/multi_partitions.result b/tests/cases/distributed/explain/multi_partitions.result index d54f2c4dc644..1053ede24beb 100644 --- a/tests/cases/distributed/explain/multi_partitions.result +++ b/tests/cases/distributed/explain/multi_partitions.result @@ -7,10 +7,10 @@ CREATE TABLE demo( TIME INDEX (ts), PRIMARY KEY(host) ) -PARTITION BY RANGE COLUMNS (host) ( - PARTITION r0 VALUES LESS THAN ('550-A'), - PARTITION r1 VALUES LESS THAN ('550-W'), - PARTITION r2 VALUES LESS THAN (MAXVALUE), +PARTITION ON COLUMNS (host) ( + host < '550-A', + host >= '550-A' AND host < '550-W', + host >= '550-W' ); Affected Rows: 0 diff --git a/tests/cases/distributed/explain/multi_partitions.sql b/tests/cases/distributed/explain/multi_partitions.sql index 7f35c5ad0d7a..7c1068237830 100644 --- a/tests/cases/distributed/explain/multi_partitions.sql +++ b/tests/cases/distributed/explain/multi_partitions.sql @@ -7,10 +7,10 @@ CREATE TABLE demo( TIME INDEX (ts), PRIMARY KEY(host) ) -PARTITION BY RANGE COLUMNS (host) ( - PARTITION r0 VALUES LESS THAN ('550-A'), - PARTITION r1 VALUES LESS THAN ('550-W'), - PARTITION r2 VALUES LESS THAN (MAXVALUE), +PARTITION ON COLUMNS (host) ( + host < '550-A', + host >= '550-A' AND host < '550-W', + host >= '550-W' ); -- SQLNESS REPLACE (-+) - diff --git a/tests/cases/standalone/common/create/upper_case_table_name.result b/tests/cases/standalone/common/create/upper_case_table_name.result index 39562efac4e6..13a00fd8d913 100644 --- a/tests/cases/standalone/common/create/upper_case_table_name.result +++ b/tests/cases/standalone/common/create/upper_case_table_name.result @@ -72,9 +72,7 @@ Affected Rows: 0 create table AbCdEfGe( CoLA string PRIMARY KEY, tS timestamp time index -) PARTITION BY RANGE COLUMNS (cOlA) ( - PARTITION p0 VALUES LESS THAN (MAXVALUE) -); +) PARTITION ON COLUMNS (cOlA) (); Affected Rows: 0 diff --git a/tests/cases/standalone/common/create/upper_case_table_name.sql b/tests/cases/standalone/common/create/upper_case_table_name.sql index 90cedca0057b..5cade9edfd05 100644 --- a/tests/cases/standalone/common/create/upper_case_table_name.sql +++ b/tests/cases/standalone/common/create/upper_case_table_name.sql @@ -29,9 +29,7 @@ drop table aBcDeFgE; create table AbCdEfGe( CoLA string PRIMARY KEY, tS timestamp time index -) PARTITION BY RANGE COLUMNS (cOlA) ( - PARTITION p0 VALUES LESS THAN (MAXVALUE) -); +) PARTITION ON COLUMNS (cOlA) (); drop table abcdefge; diff --git a/tests/cases/standalone/common/show/show_create.result b/tests/cases/standalone/common/show/show_create.result index 0936ab2d7f2e..5db34bb81d5e 100644 --- a/tests/cases/standalone/common/show/show_create.result +++ b/tests/cases/standalone/common/show/show_create.result @@ -7,10 +7,10 @@ CREATE TABLE system_metrics ( TIME INDEX (ts), PRIMARY KEY (id, host) ) -PARTITION BY RANGE COLUMNS (id) ( - PARTITION r0 VALUES LESS THAN (5), - PARTITION r1 VALUES LESS THAN (9), - PARTITION r2 VALUES LESS THAN (MAXVALUE), +PARTITION ON COLUMNS (id) ( + id < 5, + id >= 5 AND id < 9, + id >= 9 ) ENGINE=mito WITH( @@ -34,14 +34,12 @@ SHOW CREATE TABLE system_metrics; | | TIME INDEX ("ts"), | | | PRIMARY KEY ("id", "host") | | | ) | -| | PARTITION BY RANGE COLUMNS ("id") ( | -| | PARTITION r0 VALUES LESS THAN (5), | -| | PARTITION r1 VALUES LESS THAN (9), | -| | PARTITION r2 VALUES LESS THAN (MAXVALUE) | +| | PARTITION ON COLUMNS ("id") ( | +| | | | | ) | | | ENGINE=mito | | | WITH( | -| | regions = 3, | +| | regions = 1, | | | ttl = '7days', | | | write_buffer_size = '1.0KiB' | | | ) | @@ -86,10 +84,10 @@ CREATE TABLE not_supported_table_options_keys ( TIME INDEX (ts), PRIMARY KEY (id, host) ) -PARTITION BY RANGE COLUMNS (id) ( - PARTITION r0 VALUES LESS THAN (5), - PARTITION r1 VALUES LESS THAN (9), - PARTITION r2 VALUES LESS THAN (MAXVALUE), +PARTITION ON COLUMNS (id) ( + id < 5, + id >= 5 AND id < 9, + id >= 9 ) ENGINE=mito WITH( @@ -109,10 +107,10 @@ CREATE TABLE not_supported_table_storage_option ( TIME INDEX (ts), PRIMARY KEY (id, host) ) -PARTITION BY RANGE COLUMNS (id) ( - PARTITION r0 VALUES LESS THAN (5), - PARTITION r1 VALUES LESS THAN (9), - PARTITION r2 VALUES LESS THAN (MAXVALUE), +PARTITION ON COLUMNS (id) ( + id < 5, + id >= 5 AND id < 9, + id >= 9 ) ENGINE=mito WITH( diff --git a/tests/cases/standalone/common/show/show_create.sql b/tests/cases/standalone/common/show/show_create.sql index 50fb9b5a85da..890ac7329d4d 100644 --- a/tests/cases/standalone/common/show/show_create.sql +++ b/tests/cases/standalone/common/show/show_create.sql @@ -7,10 +7,10 @@ CREATE TABLE system_metrics ( TIME INDEX (ts), PRIMARY KEY (id, host) ) -PARTITION BY RANGE COLUMNS (id) ( - PARTITION r0 VALUES LESS THAN (5), - PARTITION r1 VALUES LESS THAN (9), - PARTITION r2 VALUES LESS THAN (MAXVALUE), +PARTITION ON COLUMNS (id) ( + id < 5, + id >= 5 AND id < 9, + id >= 9 ) ENGINE=mito WITH( @@ -39,10 +39,10 @@ CREATE TABLE not_supported_table_options_keys ( TIME INDEX (ts), PRIMARY KEY (id, host) ) -PARTITION BY RANGE COLUMNS (id) ( - PARTITION r0 VALUES LESS THAN (5), - PARTITION r1 VALUES LESS THAN (9), - PARTITION r2 VALUES LESS THAN (MAXVALUE), +PARTITION ON COLUMNS (id) ( + id < 5, + id >= 5 AND id < 9, + id >= 9 ) ENGINE=mito WITH( @@ -59,10 +59,10 @@ CREATE TABLE not_supported_table_storage_option ( TIME INDEX (ts), PRIMARY KEY (id, host) ) -PARTITION BY RANGE COLUMNS (id) ( - PARTITION r0 VALUES LESS THAN (5), - PARTITION r1 VALUES LESS THAN (9), - PARTITION r2 VALUES LESS THAN (MAXVALUE), +PARTITION ON COLUMNS (id) ( + id < 5, + id >= 5 AND id < 9, + id >= 9 ) ENGINE=mito WITH(