Files
greptimedb/tests/cases/standalone/common/ttl/basic.sql
dennis zhuang ff4c153d4b test: adds sqlness test for TTL (#5063)
* test: adds sqlness test for TTL

* chore: restart cluster

* fix: typo

* test: adds database TTL with metric engine tables
2024-12-03 11:32:40 +00:00

16 lines
291 B
SQL

CREATE TABLE test_ttl(ts TIMESTAMP TIME INDEX, val INT) WITH (ttl = '1 second');
INSERT INTO test_ttl VALUES
(now(), 1);
SELECT val from test_ttl;
-- SQLNESS SLEEP 2s
ADMIN flush_table('test_ttl');
ADMIN compact_table('test_ttl');
SELECT val from test_ttl;
DROP TABLE test_ttl;