Files
greptimedb/tests/cases/standalone/common/function/admin/flush_compact_table.result
dennis zhuang 63f2463273 feat!: impl admin command (#4600)
* feat: impl admin statement parser

* feat: introduce AsyncFunction and implements it for admin functions

* feat: execute admin functions

* fix: license header

* fix: panic in test

* chore: fixed by code review
2024-08-26 07:53:40 +00:00

55 lines
1.1 KiB
Plaintext

--- test flush_table and compact_table ---
CREATE TABLE test(ts timestamp time index);
Affected Rows: 0
INSERT INTO test VALUES (1), (2), (3), (4), (5);
Affected Rows: 5
SELECT * FROM test;
+-------------------------+
| ts |
+-------------------------+
| 1970-01-01T00:00:00.001 |
| 1970-01-01T00:00:00.002 |
| 1970-01-01T00:00:00.003 |
| 1970-01-01T00:00:00.004 |
| 1970-01-01T00:00:00.005 |
+-------------------------+
ADMIN FLUSH_TABLE('test');
+---------------------------+
| ADMIN FLUSH_TABLE('test') |
+---------------------------+
| 0 |
+---------------------------+
ADMIN COMPACT_TABLE('test');
+-----------------------------+
| ADMIN COMPACT_TABLE('test') |
+-----------------------------+
| 0 |
+-----------------------------+
--- doesn't change anything ---
SELECT * FROM test;
+-------------------------+
| ts |
+-------------------------+
| 1970-01-01T00:00:00.001 |
| 1970-01-01T00:00:00.002 |
| 1970-01-01T00:00:00.003 |
| 1970-01-01T00:00:00.004 |
| 1970-01-01T00:00:00.005 |
+-------------------------+
DROP TABLE test;
Affected Rows: 0