fix TD-29562

This commit is contained in:
Yihao Deng 2024-04-19 02:04:32 +00:00
parent d21341c943
commit ee8a96fb42
1 changed files with 14 additions and 7 deletions

View File

@ -149,13 +149,20 @@ int metaDecodeEntry(SDecoder *pCoder, SMetaEntry *pME) {
metaError("meta/entry: invalide table type: %" PRId8 " decode failed.", pME->type); metaError("meta/entry: invalide table type: %" PRId8 " decode failed.", pME->type);
return -1; return -1;
} }
if (pME->type == TSDB_SUPER_TABLE) {
if (TABLE_IS_COL_COMPRESSED(pME->flags)) { if (TABLE_IS_COL_COMPRESSED(pME->flags)) {
if (meteDecodeColCmprEntry(pCoder, pME) < 0) return -1; if (meteDecodeColCmprEntry(pCoder, pME) < 0) return -1;
} else { } else {
int8_t type = pME->type; metatInitDefaultSColCmprWrapper(pCoder, &pME->colCmpr, &pME->stbEntry.schemaRow);
if (type == TSDB_SUPER_TABLE || type == TSDB_NORMAL_TABLE) { TABLE_SET_COL_COMPRESSED(pME->flags);
SSchemaWrapper *pWrapper = type == TSDB_SUPER_TABLE ? &pME->stbEntry.schemaRow : &pME->ntbEntry.schemaRow; }
metatInitDefaultSColCmprWrapper(pCoder, &pME->colCmpr, pWrapper); } 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;
} else {
uDebug("set default type: %d, tableName:%s", pME->type, pME->name);
metatInitDefaultSColCmprWrapper(pCoder, &pME->colCmpr, &pME->ntbEntry.schemaRow);
} }
} }