Files
greptimedb/tests/cases/distributed/tql-explain-analyze/explain.sql
Ruihang Xia 23bf55a265 fix: __field__ matcher on single value column (#1805)
* 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>
2023-06-21 10:59:58 +08:00

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;