set compressByteConvert/compressDiffConvert to true when defElem is set to true

This commit is contained in:
wuyuechuan
2022-05-18 14:28:26 +08:00
parent ae11cad2c3
commit dbcf479205
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