Files
greptimedb/tests/cases/standalone/common/function/admin/flush_compact_table.sql
T
Lei, HUANG f524a0b5b4 feat: support time range in manual compaction (#8669)
* feat: support time range in manual compaction

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>

* fix: reject overflowing compaction range alignment

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>

* fix: preserve range across compaction continuations

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>

* perf: use graph traversal for compaction windows

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>

* chore: bump proto to commit on main

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>

* docs: explain compaction window dependency closure

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>

---------

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-07-29 13:33:10 +00:00

33 lines
606 B
SQL

--- test flush_table and compact_table ---
CREATE TABLE test(ts timestamp time index);
INSERT INTO test VALUES (1), (2), (3), (4), (5);
SELECT * FROM test;
ADMIN FLUSH_TABLE('test');
ADMIN COMPACT_TABLE('test');
ADMIN COMPACT_TABLE(
'test',
'regular',
'start_time=1970-01-01T00:00:00Z,end_time=1970-01-01T01:00:00Z'
);
ADMIN COMPACT_TABLE(
'test',
'strict_window',
'window=3600,start_time=1970-01-01T00:00:00Z,end_time=1970-01-01T01:00:00Z'
);
SELECT FLUSH_TABLE('test');
SELECT COMPACT_TABLE('test');
--- doesn't change anything ---
SELECT * FROM test;
DROP TABLE test;