!1740 compressByteConvert\compressDiffConvert内存判断当且仅当用户输入为true而不是判断用户是否使用该参数

Merge pull request !1740 from 吴岳川/I54KW0
This commit is contained in:
opengauss-bot 2022-05-28 02:02:39 +00:00 committed by Gitee
commit 240f61c595
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 9 additions and 4 deletions

View File

@ -2947,9 +2947,9 @@ void SetOneOfCompressOption(DefElem* defElem, TableCreateSupport* tableCreateSup
} else if (pg_strcasecmp(defname, "compress_level") == 0) {
tableCreateSupport->compressLevel = true;
} else if (pg_strcasecmp(defname, "compress_byte_convert") == 0) {
tableCreateSupport->compressByteConvert = true;
tableCreateSupport->compressByteConvert = defGetBoolean(defElem);
} else if (pg_strcasecmp(defname, "compress_diff_convert") == 0) {
tableCreateSupport->compressDiffConvert = true;
tableCreateSupport->compressDiffConvert = defGetBoolean(defElem);
}
}

View File

@ -89,5 +89,8 @@ ERROR: Can not use compress option in ustore index.
-- segment
CREATE TABLE unspported_feature.segment_table(id int, c1 text) WITH(compresstype=2, segment=on); --failed
ERROR: only row orientation table support compresstype.
CREATE INDEX on unspported_feature.index_test(c1) WITH(compresstype=2, segment=on); --faled
CREATE INDEX on unspported_feature.index_test(c1) WITH(compresstype=2, segment=on); --failed
ERROR: Can not use compress option in segment storage.
-- set compress_diff_convert
create table unspported_feature.compress_byte_test(id int) with (compresstype=2, compress_byte_convert=false, compress_diff_convert = true); -- failed
ERROR: compress_diff_convert should be used with compress_byte_convert.

View File

@ -57,4 +57,6 @@ CREATE TABLE unspported_feature.ustore_table(id int, c1 text) WITH(compresstype=
CREATE INDEX tbl_pc_idx1 on unspported_feature.index_test(c1) WITH(compresstype=2, storage_type=ustore); --failed
-- segment
CREATE TABLE unspported_feature.segment_table(id int, c1 text) WITH(compresstype=2, segment=on); --failed
CREATE INDEX on unspported_feature.index_test(c1) WITH(compresstype=2, segment=on); --faled
CREATE INDEX on unspported_feature.index_test(c1) WITH(compresstype=2, segment=on); --failed
-- set compress_diff_convert
create table unspported_feature.compress_byte_test(id int) with (compresstype=2, compress_byte_convert=false, compress_diff_convert = true); -- failed