fix: allow physical region alter region options (#5046)

allow physical region alter region options
This commit is contained in:
Lanqing Yang
2024-11-27 00:24:34 -08:00
committed by GitHub
parent 91e933517a
commit 8bdef776b3
6 changed files with 170 additions and 13 deletions
@@ -281,3 +281,54 @@ DROP TABLE ato;
Affected Rows: 0
CREATE TABLE phy (ts timestamp time index, val double) engine=metric with ("physical_metric_table" = "");
Affected Rows: 0
ALTER TABLE phy set ttl='2years';
Affected Rows: 0
SHOW CREATE TABLE phy;
+-------+------------------------------------+
| Table | Create Table |
+-------+------------------------------------+
| phy | CREATE TABLE IF NOT EXISTS "phy" ( |
| | "ts" TIMESTAMP(3) NOT NULL, |
| | "val" DOUBLE NULL, |
| | TIME INDEX ("ts") |
| | ) |
| | |
| | ENGINE=metric |
| | WITH( |
| | physical_metric_table = '', |
| | ttl = '2years' |
| | ) |
+-------+------------------------------------+
ALTER TABLE phy UNSET 'ttl';
Affected Rows: 0
SHOW CREATE TABLE phy;
+-------+------------------------------------+
| Table | Create Table |
+-------+------------------------------------+
| phy | CREATE TABLE IF NOT EXISTS "phy" ( |
| | "ts" TIMESTAMP(3) NOT NULL, |
| | "val" DOUBLE NULL, |
| | TIME INDEX ("ts") |
| | ) |
| | |
| | ENGINE=metric |
| | WITH( |
| | physical_metric_table = '' |
| | ) |
+-------+------------------------------------+
DROP TABLE phy;
Affected Rows: 0
@@ -60,3 +60,15 @@ SHOW CREATE TABLE ato;
SHOW CREATE TABLE ato;
DROP TABLE ato;
CREATE TABLE phy (ts timestamp time index, val double) engine=metric with ("physical_metric_table" = "");
ALTER TABLE phy set ttl='2years';
SHOW CREATE TABLE phy;
ALTER TABLE phy UNSET 'ttl';
SHOW CREATE TABLE phy;
DROP TABLE phy;