mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-08 22:32:55 +00:00
* parser part Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix test in sql Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * comment out and ignore some logic Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * update sqlness cases Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * update region migration test Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * temporary disable region migration test Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * allow dead code Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * update integration test Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
37 lines
1.5 KiB
Plaintext
37 lines
1.5 KiB
Plaintext
CREATE TABLE my_table (
|
|
a INT PRIMARY KEY,
|
|
b STRING,
|
|
ts TIMESTAMP TIME INDEX,
|
|
)
|
|
PARTITION ON COLUMNS (a) (
|
|
a < 1000,
|
|
a >= 1000 AND a < 2000,
|
|
a >= 2000
|
|
);
|
|
|
|
Affected Rows: 0
|
|
|
|
-- SQLNESS REPLACE (\d{13}) ID
|
|
SELECT table_catalog, table_schema, table_name, partition_name, partition_expression, greptime_partition_id from information_schema.partitions WHERE table_name = 'my_table' ORDER BY table_catalog, table_schema, table_name, partition_name;
|
|
|
|
+---------------+--------------+------------+----------------+---------------------------------+-----------------------+
|
|
| table_catalog | table_schema | table_name | partition_name | partition_expression | greptime_partition_id |
|
|
+---------------+--------------+------------+----------------+---------------------------------+-----------------------+
|
|
| greptime | public | my_table | p0 | (a) VALUES LESS THAN (MAXVALUE) | ID |
|
|
+---------------+--------------+------------+----------------+---------------------------------+-----------------------+
|
|
|
|
-- SQLNESS REPLACE (\d{13}) REGION_ID
|
|
-- SQLNESS REPLACE (\d{1}) PEER_ID
|
|
SELECT region_id, peer_id, is_leader, status FROM information_schema.greptime_region_peers ORDER BY peer_id;
|
|
|
|
+---------------+---------+-----------+--------+
|
|
| region_id | peer_id | is_leader | status |
|
|
+---------------+---------+-----------+--------+
|
|
| REGION_ID | PEER_ID | Yes | ALIVE |
|
|
+---------------+---------+-----------+--------+
|
|
|
|
DROP TABLE my_table;
|
|
|
|
Affected Rows: 0
|
|
|