Files
greptimedb/tests/cases/standalone/show/show_create.result
Ruihang Xia 8d446ed741 fix: quote ident on rendered SQL (#2248)
* fix: quote ident on rendered SQL

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* read quote style from query context

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* update sqlness result

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2023-08-25 07:25:21 +00:00

44 lines
1.8 KiB
Plaintext

CREATE TABLE system_metrics (
id INT UNSIGNED NULL,
host STRING NULL,
cpu DOUBLE NULL COMMENT 'cpu',
disk FLOAT NULL,
ts TIMESTAMP NOT NULL DEFAULT current_timestamp(),
TIME INDEX (ts),
PRIMARY KEY (id, host)
)
ENGINE=mito
WITH(
ttl = '7d',
write_buffer_size = 1024
);
Affected Rows: 0
SHOW CREATE TABLE system_metrics;
+----------------+-----------------------------------------------------------+
| Table | Create Table |
+----------------+-----------------------------------------------------------+
| system_metrics | CREATE TABLE IF NOT EXISTS "system_metrics" ( |
| | "id" INT UNSIGNED NULL, |
| | "host" STRING NULL, |
| | "cpu" DOUBLE NULL COMMENT 'cpu', |
| | "disk" FLOAT NULL, |
| | "ts" TIMESTAMP(3) NOT NULL DEFAULT current_timestamp(), |
| | TIME INDEX ("ts"), |
| | PRIMARY KEY ("id", "host") |
| | ) |
| | ENGINE=mito |
| | WITH( |
| | regions = 1, |
| | ttl = '7days', |
| | write_buffer_size = '1.0KiB' |
| | ) |
+----------------+-----------------------------------------------------------+
DROP TABLE system_metrics;
Affected Rows: 1