Files
greptimedb/tests/cases/standalone/delete/delete_invalid.result
LFC 92963b9614 feat: execute "delete" in query engine (in the form of "LogicalPlan") (#1222)
fix: execute "delete" in query engine (in the form of "LogicalPlan")
2023-03-24 12:11:58 +08:00

29 lines
682 B
Plaintext

CREATE TABLE monitor ( host STRING, ts TIMESTAMP, cpu DOUBLE DEFAULT 0, memory DOUBLE, TIME INDEX (ts), PRIMARY KEY(host)) ;
Affected Rows: 0
insert into monitor(host, cpu, memory, ts) values ('host1', 66.6, 1024, 1655276557000), ('host2', 77.7, 2048, 1655276558000), ('host3', 88.8, 3072, 1655276559000);
Affected Rows: 3
delete from monitor where cpu = 66.6 and ts = 1655276557000;
Affected Rows: 1
delete from monitor where host = 'host1' or ts = 1655276557000;
Affected Rows: 0
delete from monitor where host = 'host1' or ts != 1655276557000;
Affected Rows: 2
delete from monitor where ts != 1655276557000;
Affected Rows: 0
drop table monitor;
Affected Rows: 1