mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-17 05:20:37 +00:00
* feat: expose flownode addrs in information_schema flows Signed-off-by: QuakeWang <1677980708@qq.com> * fix: always include flownode addrs Signed-off-by: QuakeWang <1677980708@qq.com> * test: split flownode_addrs sqlness cases by mode Signed-off-by: QuakeWang <1677980708@qq.com> * test: fix flow_tql sqlness snapshots Signed-off-by: QuakeWang <1677980708@qq.com> * test: fix sqlness information_schema snapshot Signed-off-by: QuakeWang <1677980708@qq.com> --------- Signed-off-by: QuakeWang <1677980708@qq.com> Co-authored-by: dennis zhuang <killme2008@gmail.com>
19 lines
479 B
SQL
19 lines
479 B
SQL
CREATE TABLE http_requests (
|
|
ts timestamp(3) time index,
|
|
host STRING,
|
|
idc STRING,
|
|
val DOUBLE,
|
|
PRIMARY KEY(host, idc),
|
|
);
|
|
|
|
CREATE FLOW calc_reqs SINK TO cnt_reqs EVAL INTERVAL '1m' AS
|
|
TQL EVAL (now() - '1m'::interval, now(), '5s') count_values("status_code", http_requests);
|
|
|
|
SELECT flownode_addrs IS NOT NULL AS flownode_addrs_is_not_null
|
|
FROM information_schema.flows
|
|
WHERE flow_name = 'calc_reqs';
|
|
|
|
DROP FLOW calc_reqs;
|
|
DROP TABLE http_requests;
|
|
DROP TABLE cnt_reqs;
|