From a245ae09b5745c0c7f3f10b0579367ce220ed4b8 Mon Sep 17 00:00:00 2001 From: yujiang Date: Mon, 3 Aug 2020 15:25:28 +0800 Subject: [PATCH] adding column storage table does not support partition detection Signed-off-by: yujiang --- src/gausskernel/optimizer/commands/tablecmds.cpp | 7 +++++++ .../regress/input/hw_partition_interval.source | 15 +++++++++++++++ .../regress/output/hw_partition_interval.source | 16 ++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/src/gausskernel/optimizer/commands/tablecmds.cpp b/src/gausskernel/optimizer/commands/tablecmds.cpp index 4591429be9..7976d7c38e 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 71fb886c76..18300baa81 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 0e4316ac8d..c3d788045b 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 -- Gitee