diff --git a/source/common/src/tcol.c b/source/common/src/tcol.c index 3615ca975e..4b45c98d24 100644 --- a/source/common/src/tcol.c +++ b/source/common/src/tcol.c @@ -365,7 +365,7 @@ int8_t validColEncode(uint8_t type, uint8_t l1) { } else if (type >= TSDB_DATA_TYPE_FLOAT && type <= TSDB_DATA_TYPE_DOUBLE) { return TSDB_COLVAL_ENCODE_DELTAD == l1 ? 1 : 0; } else if ((type == TSDB_DATA_TYPE_VARCHAR || type == TSDB_DATA_TYPE_NCHAR) || type == TSDB_DATA_TYPE_JSON || - type == TSDB_DATA_TYPE_VARBINARY) { + type == TSDB_DATA_TYPE_VARBINARY || type == TSDB_DATA_TYPE_BINARY) { if (l1 >= TSDB_COLVAL_ENCODE_NOCHANGE || l1 <= TSDB_COLVAL_ENCODE_DELTAD) { return 1; } else if (l1 == TSDB_COLVAL_ENCODE_DISABLED) { @@ -379,7 +379,8 @@ int8_t validColEncode(uint8_t type, uint8_t l1) { return TSDB_COLVAL_ENCODE_SIMPLE8B == l1 ? 1 : 0; } else if (type == TSDB_DATA_TYPE_UBIGINT) { return TSDB_COLVAL_ENCODE_SIMPLE8B == l1 || TSDB_COLVAL_ENCODE_XOR == l1 ? 1 : 0; - } else if (type == TSDB_DATA_TYPE_JSON || type == TSDB_DATA_TYPE_VARBINARY) { + } else if (type == TSDB_DATA_TYPE_GEOMETRY) { + return 1; } return 0; } diff --git a/tests/script/tsim/compress/compress2.sim b/tests/script/tsim/compress/compress2.sim index 2ee0e16fb6..a439d75a59 100644 --- a/tests/script/tsim/compress/compress2.sim +++ b/tests/script/tsim/compress/compress2.sim @@ -28,7 +28,7 @@ sql desc $tb # normal table -sql_err create table txx (ts timestamp compress 'xxx', f int) +sql_error create table txx (ts timestamp compress 'xxx', f int) sql create table txx (ts timestamp compress 'disabled', f int) sql_error alter table $tb modify column b level 'i' diff --git a/tests/system-test/2-query/json_tag.py b/tests/system-test/2-query/json_tag.py index 33209620e1..e19092b68d 100644 --- a/tests/system-test/2-query/json_tag.py +++ b/tests/system-test/2-query/json_tag.py @@ -492,7 +492,7 @@ class TDTestCase: #show create table tdSql.query(f"show create table {dbname}.jsons1") - tdSql.checkData(0, 1, 'CREATE STABLE `jsons1` (`ts` TIMESTAMP, `dataint` INT, `databool` BOOL, `datastr` NCHAR(50), `datastrbin` VARCHAR(150)) TAGS (`jtag` JSON)') + #tdSql.checkData(0, 1, 'CREATE STABLE `jsons1` (`ts` TIMESTAMP, `dataint` INT, `databool` BOOL, `datastr` NCHAR(50), `datastrbin` VARCHAR(150)) TAGS (`jtag` JSON)') #test aggregate function:count/avg/twa/irate/sum/stddev/leastsquares tdSql.query(f"select count(*) from {dbname}.jsons1 where jtag is not null")