commit
69222543a2
|
@ -67,6 +67,8 @@ uint8_t getDefaultEncode(uint8_t type) {
|
|||
return TSDB_COLVAL_ENCODE_SIMPLE8B;
|
||||
case TSDB_DATA_TYPE_MEDIUMBLOB:
|
||||
case TSDB_DATA_TYPE_GEOMETRY:
|
||||
return TSDB_COLVAL_ENCODE_DISABLED;
|
||||
|
||||
case TSDB_DATA_TYPE_MAX:
|
||||
return TSDB_COLVAL_ENCODE_SIMPLE8B;
|
||||
|
||||
|
@ -365,7 +367,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_BINARY) {
|
||||
type == TSDB_DATA_TYPE_VARBINARY || type == TSDB_DATA_TYPE_BINARY || type == TSDB_DATA_TYPE_GEOMETRY) {
|
||||
return l1 == TSDB_COLVAL_ENCODE_DISABLED ? 1 : 0;
|
||||
// if (l1 >= TSDB_COLVAL_ENCODE_NOCHANGE || l1 <= TSDB_COLVAL_ENCODE_DELTAD) {
|
||||
// return 1;
|
||||
|
|
|
@ -149,17 +149,22 @@ int metaDecodeEntry(SDecoder *pCoder, SMetaEntry *pME) {
|
|||
metaError("meta/entry: invalide table type: %" PRId8 " decode failed.", pME->type);
|
||||
return -1;
|
||||
}
|
||||
if (pME->type == TSDB_SUPER_TABLE) {
|
||||
if (TABLE_IS_COL_COMPRESSED(pME->flags)) {
|
||||
if (meteDecodeColCmprEntry(pCoder, pME) < 0) return -1;
|
||||
} else {
|
||||
metatInitDefaultSColCmprWrapper(pCoder, &pME->colCmpr, &pME->stbEntry.schemaRow);
|
||||
TABLE_SET_COL_COMPRESSED(pME->flags);
|
||||
}
|
||||
} else if (pME->type == TSDB_NORMAL_TABLE) {
|
||||
if (!tDecodeIsEnd(pCoder)) {
|
||||
uDebug("set type: %d, tableName:%s", pME->type, pME->name);
|
||||
if (meteDecodeColCmprEntry(pCoder, pME) < 0) return -1;
|
||||
TABLE_SET_COL_COMPRESSED(pME->flags);
|
||||
} else {
|
||||
uDebug("set default type: %d, tableName:%s", pME->type, pME->name);
|
||||
if (pME->type == TSDB_SUPER_TABLE) {
|
||||
metatInitDefaultSColCmprWrapper(pCoder, &pME->colCmpr, &pME->stbEntry.schemaRow);
|
||||
} else if (pME->type == TSDB_NORMAL_TABLE) {
|
||||
metatInitDefaultSColCmprWrapper(pCoder, &pME->colCmpr, &pME->ntbEntry.schemaRow);
|
||||
}
|
||||
TABLE_SET_COL_COMPRESSED(pME->flags);
|
||||
}
|
||||
|
||||
tEndDecode(pCoder);
|
||||
|
|
|
@ -2652,7 +2652,7 @@ int32_t colCompressDebug(SHashObj *pColCmprObj) {
|
|||
const char *l1str = columnEncodeStr(l1);
|
||||
const char *l2str = columnCompressStr(l2);
|
||||
const char *lvlstr = columnLevelStr(lvl);
|
||||
metaInfo("colId: %d, encode:%s, compress:%s,level:%s", colId, l1str, l2str, lvlstr);
|
||||
metaDebug("colId: %d, encode:%s, compress:%s,level:%s", colId, l1str, l2str, lvlstr);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue