refactor compress

This commit is contained in:
Yihao Deng 2024-07-24 04:43:48 +00:00
parent d93302a16c
commit 6d9bb3f1fe
1 changed files with 4 additions and 4 deletions

View File

@ -2581,7 +2581,7 @@ int32_t tsCompressTinyint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int3
} else if (cmprAlg == TWO_STAGE_COMP) { } else if (cmprAlg == TWO_STAGE_COMP) {
int32_t len = tsCompressINTImp(pIn, nEle, pBuf, TSDB_DATA_TYPE_TINYINT); int32_t len = tsCompressINTImp(pIn, nEle, pBuf, TSDB_DATA_TYPE_TINYINT);
if (len < 0) { if (len < 0) {
return len; return TSDB_CODE_THIRDPARTY_ERROR;
} }
return tsCompressStringImp(pBuf, len, pOut, nOut); return tsCompressStringImp(pBuf, len, pOut, nOut);
} else { } else {
@ -2612,7 +2612,7 @@ int32_t tsCompressSmallint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int
} else if (cmprAlg == TWO_STAGE_COMP) { } else if (cmprAlg == TWO_STAGE_COMP) {
int32_t len = tsCompressINTImp(pIn, nEle, pBuf, TSDB_DATA_TYPE_SMALLINT); int32_t len = tsCompressINTImp(pIn, nEle, pBuf, TSDB_DATA_TYPE_SMALLINT);
if (len < 0) { if (len < 0) {
return len; return TSDB_CODE_THIRDPARTY_ERROR;
} }
return tsCompressStringImp(pBuf, len, pOut, nOut); return tsCompressStringImp(pBuf, len, pOut, nOut);
} else { } else {
@ -2643,7 +2643,7 @@ int32_t tsCompressInt(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t
} else if (cmprAlg == TWO_STAGE_COMP) { } else if (cmprAlg == TWO_STAGE_COMP) {
int32_t len = tsCompressINTImp(pIn, nEle, pBuf, TSDB_DATA_TYPE_INT); int32_t len = tsCompressINTImp(pIn, nEle, pBuf, TSDB_DATA_TYPE_INT);
if (len < 0) { if (len < 0) {
return len; return TSDB_CODE_THIRDPARTY_ERROR;
} }
return tsCompressStringImp(pBuf, len, pOut, nOut); return tsCompressStringImp(pBuf, len, pOut, nOut);
} else { } else {
@ -2674,7 +2674,7 @@ int32_t tsCompressBigint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32
} else if (cmprAlg == TWO_STAGE_COMP) { } else if (cmprAlg == TWO_STAGE_COMP) {
int32_t len = tsCompressINTImp(pIn, nEle, pBuf, TSDB_DATA_TYPE_BIGINT); int32_t len = tsCompressINTImp(pIn, nEle, pBuf, TSDB_DATA_TYPE_BIGINT);
if (len < 0) { if (len < 0) {
return len; return TSDB_CODE_THIRDPARTY_ERROR;
} }
return tsCompressStringImp(pBuf, len, pOut, nOut); return tsCompressStringImp(pBuf, len, pOut, nOut);
} else { } else {