Merge branch '3.0' into feature/compressData
This commit is contained in:
parent
d2d7cd854c
commit
ddf37b10a0
|
@ -334,6 +334,13 @@ int8_t validColCompress(uint8_t type, uint8_t l2) {
|
||||||
if (l2 > TSDB_COLVAL_COMPRESS_XZ && l2 < TSDB_COLVAL_COMPRESS_DISABLED) {
|
if (l2 > TSDB_COLVAL_COMPRESS_XZ && l2 < TSDB_COLVAL_COMPRESS_DISABLED) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (l2 == TSDB_COLVAL_COMPRESS_TSZ) {
|
||||||
|
if (type == TSDB_DATA_TYPE_FLOAT || type == TSDB_DATA_TYPE_DOUBLE) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,29 @@ sql create database $db
|
||||||
sql use $db
|
sql use $db
|
||||||
sql create table $tb (ts timestamp, b bool, t tinyint, s smallint, i int, big bigint, str binary(256))
|
sql create table $tb (ts timestamp, b bool, t tinyint, s smallint, i int, big bigint, str binary(256))
|
||||||
|
|
||||||
|
sql alter table $tb add column f bool
|
||||||
|
sql desc $tb
|
||||||
|
sql alter table $tb drop column f
|
||||||
|
sql desc $tb
|
||||||
|
|
||||||
|
sql_error alter table $tb modify column b level 'i'
|
||||||
|
sql alter table $tb modify column b level 'l'
|
||||||
|
sql_error alter table $tb modify column b level 'l' # already exist
|
||||||
|
sql alter table $tb modify column b level 'm'
|
||||||
|
sql_error alter table $tb modify column b level 'l' # already exist
|
||||||
|
|
||||||
|
|
||||||
|
sql_error alter table $tb modify column b compress 'lz4'
|
||||||
|
sql alter table $tb modify column b compress 'xz'
|
||||||
|
sql alter table $tb modify column b compress 'zstd'
|
||||||
|
sql_err alter table $tb modify column b compress 'tsz'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$count = 0
|
$count = 0
|
||||||
while $count < $N
|
while $count < $N
|
||||||
$ms = 1591200000000 + $count
|
$ms = 1591200000000 + $count
|
||||||
|
|
Loading…
Reference in New Issue