Files
greptimedb/tests/cases/standalone/common/function/admin/build_index_table.sql
Sicong Hu 2783a5218e feat: implement manual type for async index build (#7104)
* feat: prepare for index_build command

Signed-off-by: SNC123 <sinhco@outlook.com>

* feat: impl manual index build

Signed-off-by: SNC123 <sinhco@outlook.com>

* chore: clippy and fmt

Signed-off-by: SNC123 <sinhco@outlook.com>

* test: add idempotency check for manual build

Signed-off-by: SNC123 <sinhco@outlook.com>

* chore: apply suggestions

Signed-off-by: SNC123 <sinhco@outlook.com>

* chore: update proto

Signed-off-by: SNC123 <sinhco@outlook.com>

* chore: apply suggestions

Signed-off-by: SNC123 <sinhco@outlook.com>

* chore: fmt

Signed-off-by: SNC123 <sinhco@outlook.com>

* chore: update proto souce to greptimedb

Signed-off-by: SNC123 <sinhco@outlook.com>

* fix: cargo.lock

Signed-off-by: SNC123 <sinhco@outlook.com>

---------

Signed-off-by: SNC123 <sinhco@outlook.com>
2025-11-25 15:21:30 +00:00

30 lines
723 B
SQL

CREATE TABLE test (
ts TIMESTAMP TIME INDEX,
msg TEXT,
);
INSERT INTO test VALUES
(1,"The quick brown fox jumps over the lazy dog"),
(2,"The quick brown fox jumps over the lazy cat"),
(3,"The quick brown fox jumps over the lazy mouse"),
(4,"The quick brown fox jumps over the lazy rabbit"),
(5,"The quick brown fox jumps over the lazy turtle");
SELECT * FROM test;
ADMIN FLUSH_TABLE('test');
-- SQLNESS SLEEP 1s
-- No fulltext index yet
SELECT index_size FROM INFORMATION_SCHEMA.REGION_STATISTICS;
ALTER TABLE test MODIFY COLUMN msg SET FULLTEXT INDEX;
ADMIN BUILD_INDEX('test');
-- SQLNESS SLEEP 1s
-- Fulltext index built
SELECT index_size FROM INFORMATION_SCHEMA.REGION_STATISTICS;
DROP TABLE test;