mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-06 05:12:54 +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>
71 lines
1.2 KiB
SQL
71 lines
1.2 KiB
SQL
CREATE TABLE system_metrics (
|
|
id INT UNSIGNED,
|
|
host STRING,
|
|
cpu DOUBLE,
|
|
disk FLOAT COMMENT 'comment',
|
|
ts TIMESTAMP NOT NULL DEFAULT current_timestamp(),
|
|
TIME INDEX (ts),
|
|
PRIMARY KEY (id, host)
|
|
)
|
|
PARTITION ON COLUMNS (id) (
|
|
id < 5,
|
|
id >= 5 AND id < 9,
|
|
id >= 9
|
|
)
|
|
ENGINE=mito
|
|
WITH(
|
|
ttl = '7d',
|
|
write_buffer_size = 1024
|
|
);
|
|
|
|
SHOW CREATE TABLE system_metrics;
|
|
|
|
DROP TABLE system_metrics;
|
|
|
|
create table table_without_partition (
|
|
ts TIMESTAMP TIME INDEX NOT NULL DEFAULT current_timestamp()
|
|
);
|
|
|
|
show create table table_without_partition;
|
|
|
|
drop table table_without_partition;
|
|
|
|
CREATE TABLE not_supported_table_options_keys (
|
|
id INT UNSIGNED,
|
|
host STRING,
|
|
cpu DOUBLE,
|
|
disk FLOAT,
|
|
ts TIMESTAMP NOT NULL DEFAULT current_timestamp(),
|
|
TIME INDEX (ts),
|
|
PRIMARY KEY (id, host)
|
|
)
|
|
PARTITION ON COLUMNS (id) (
|
|
id < 5,
|
|
id >= 5 AND id < 9,
|
|
id >= 9
|
|
)
|
|
ENGINE=mito
|
|
WITH(
|
|
foo = 123,
|
|
ttl = '7d',
|
|
write_buffer_size = 1024
|
|
);
|
|
CREATE TABLE not_supported_table_storage_option (
|
|
id INT UNSIGNED,
|
|
host STRING,
|
|
cpu DOUBLE,
|
|
disk FLOAT,
|
|
ts TIMESTAMP NOT NULL DEFAULT current_timestamp(),
|
|
TIME INDEX (ts),
|
|
PRIMARY KEY (id, host)
|
|
)
|
|
PARTITION ON COLUMNS (id) (
|
|
id < 5,
|
|
id >= 5 AND id < 9,
|
|
id >= 9
|
|
)
|
|
ENGINE=mito
|
|
WITH(
|
|
storage = 'S3'
|
|
);
|