diff --git a/src/gausskernel/optimizer/commands/tablecmds.cpp b/src/gausskernel/optimizer/commands/tablecmds.cpp index 4591429be9de15128bc983d5a45455d858bc8894..7976d7c38edc6325fd659c311aa876bd0d3eed6e 100644 --- a/src/gausskernel/optimizer/commands/tablecmds.cpp +++ b/src/gausskernel/optimizer/commands/tablecmds.cpp @@ -680,6 +680,13 @@ static void CheckCStoreUnsupportedFeature(CreateStmt* stmt) errdetail("cstore/timeseries don't support relation defination with inheritance."))); } + if (stmt->partTableState && stmt->partTableState->intervalPartDef) { + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("Unsupport feature"), + errdetail("cstore/timeseries don't support interval partition type."))); + } + /* Check constraints */ ListCell* lc = NULL; foreach (lc, stmt->tableEltsDup) { diff --git a/src/test/regress/input/hw_partition_interval.source b/src/test/regress/input/hw_partition_interval.source index 71fb886c76e8f218f19d25b5f7fe58735ac26160..18300baa81020ad9569bc06c08d68cbb6f5b31ba 100644 --- a/src/test/regress/input/hw_partition_interval.source +++ b/src/test/regress/input/hw_partition_interval.source @@ -181,6 +181,21 @@ select relname, parttype, partstrategy, boundaries from pg_partition --clean up drop table interval_normal_date; +-- +---- the cstore table does not support interval partition; +-- +create table partiton_table_001( +COL_1 smallint, +COL_2 char(30), +COL_3 int, +COL_4 date not null +)with (orientation = column) +PARTITION BY RANGE (COL_4) +INTERVAL ('1 month') +( +PARTITION partiton_table_001_p1 VALUES LESS THAN ('2020-03-01') +); + -- ---- tablespace -- diff --git a/src/test/regress/output/hw_partition_interval.source b/src/test/regress/output/hw_partition_interval.source index 0e4316ac8d3e2e11417cc53b87d5712f289c0b0e..c3d788045bbbab4de76eb92c2744e7dc8ab41895 100644 --- a/src/test/regress/output/hw_partition_interval.source +++ b/src/test/regress/output/hw_partition_interval.source @@ -388,6 +388,22 @@ select relname, parttype, partstrategy, boundaries from pg_partition --clean up drop table interval_normal_date; -- +---- the cstore table does not support interval partition; +-- +create table partiton_table_001( +COL_1 smallint, +COL_2 char(30), +COL_3 int, +COL_4 date not null +)with (orientation = column) +PARTITION BY RANGE (COL_4) +INTERVAL ('1 month') +( +PARTITION partiton_table_001_p1 VALUES LESS THAN ('2020-03-01') +); +ERROR: Unsupport feature +DETAIL: cstore/timeseries don't support interval partition type. +-- ---- tablespace -- --date