mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-05 21:02:58 +00:00
* fix error text and field_column_names Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * add sqlness test Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * add empty line Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * improve style Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
27 lines
696 B
SQL
27 lines
696 B
SQL
CREATE TABLE test(i DOUBLE, j TIMESTAMP TIME INDEX, k STRING PRIMARY KEY);
|
|
|
|
-- insert two points at 1ms and one point at 2ms
|
|
INSERT INTO test VALUES (1, 1, "a"), (1, 1, "b"), (2, 2, "a");
|
|
|
|
-- explain at 0s, 5s and 10s. No point at 0s.
|
|
-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED
|
|
-- SQLNESS REPLACE (peer-.*) REDACTED
|
|
TQL EXPLAIN (0, 10, '5s') test;
|
|
|
|
DROP TABLE test;
|
|
|
|
CREATE TABLE host_load1 (
|
|
ts TIMESTAMP(3) NOT NULL,
|
|
collector STRING NULL,
|
|
host STRING NULL,
|
|
val DOUBLE NULL,
|
|
TIME INDEX (ts),
|
|
PRIMARY KEY (collector, host)
|
|
);
|
|
|
|
-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED
|
|
-- SQLNESS REPLACE (peer-.*) REDACTED
|
|
TQL EXPLAIN host_load1{__field__="val"};
|
|
|
|
DROP TABLE host_load1;
|