more code
This commit is contained in:
parent
f05fe86ef0
commit
28d83d6ab6
|
@ -176,8 +176,7 @@ int32_t tColDataCopy(SColData *pColDataFrom, SColData *pColData, xMallocFn xMall
|
||||||
extern void (*tColDataCalcSMA[])(SColData *pColData, int64_t *sum, int64_t *max, int64_t *min, int16_t *numOfNull);
|
extern void (*tColDataCalcSMA[])(SColData *pColData, int64_t *sum, int64_t *max, int64_t *min, int16_t *numOfNull);
|
||||||
|
|
||||||
int32_t tColDataCompress(SColData *colData, SColDataCompressInfo *info, SBuffer *output, SBuffer *assist);
|
int32_t tColDataCompress(SColData *colData, SColDataCompressInfo *info, SBuffer *output, SBuffer *assist);
|
||||||
int32_t tColDataDecompress(void *input, int32_t inputSize, SColDataCompressInfo *info, SColData *colData,
|
int32_t tColDataDecompress(void *input, SColDataCompressInfo *info, SColData *colData, SBuffer *assist);
|
||||||
SBuffer *assist);
|
|
||||||
|
|
||||||
// for stmt bind
|
// for stmt bind
|
||||||
int32_t tColDataAddValueByBind(SColData *pColData, TAOS_MULTI_BIND *pBind, int32_t buffMaxLen);
|
int32_t tColDataAddValueByBind(SColData *pColData, TAOS_MULTI_BIND *pBind, int32_t buffMaxLen);
|
||||||
|
|
|
@ -2678,13 +2678,10 @@ int32_t tColDataCompress(SColData *colData, SColDataCompressInfo *info, SBuffer
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tColDataDecompress(void *input, int32_t inputSize, SColDataCompressInfo *info, SColData *colData,
|
int32_t tColDataDecompress(void *input, SColDataCompressInfo *info, SColData *colData, SBuffer *assist) {
|
||||||
SBuffer *assist) {
|
|
||||||
int32_t code;
|
int32_t code;
|
||||||
SBuffer local;
|
SBuffer local;
|
||||||
char *inputStart = input;
|
uint8_t *data = (uint8_t *)input;
|
||||||
|
|
||||||
ASSERT(inputSize == info->bitmapCompressedSize + info->offsetCompressedSize + info->dataCompressedSize);
|
|
||||||
|
|
||||||
tBufferInit(&local);
|
tBufferInit(&local);
|
||||||
if (assist == NULL) {
|
if (assist == NULL) {
|
||||||
|
@ -2717,13 +2714,13 @@ int32_t tColDataDecompress(void *input, int32_t inputSize, SColDataCompressInfo
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
code = tDecompressData(inputStart, &cinfo, colData->pBitMap, cinfo.originalSize, assist);
|
code = tDecompressData(data, &cinfo, colData->pBitMap, cinfo.originalSize, assist);
|
||||||
if (code) {
|
if (code) {
|
||||||
tBufferDestroy(&local);
|
tBufferDestroy(&local);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
inputStart += cinfo.compressedSize;
|
data += cinfo.compressedSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->flag == (HAS_NONE | HAS_NULL)) {
|
if (info->flag == (HAS_NONE | HAS_NULL)) {
|
||||||
|
@ -2745,13 +2742,13 @@ int32_t tColDataDecompress(void *input, int32_t inputSize, SColDataCompressInfo
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
code = tDecompressData(inputStart, &cinfo, colData->aOffset, cinfo.originalSize, assist);
|
code = tDecompressData(data, &cinfo, colData->aOffset, cinfo.originalSize, assist);
|
||||||
if (code) {
|
if (code) {
|
||||||
tBufferDestroy(&local);
|
tBufferDestroy(&local);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
inputStart += cinfo.compressedSize;
|
data += cinfo.compressedSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
// data
|
// data
|
||||||
|
@ -2771,13 +2768,13 @@ int32_t tColDataDecompress(void *input, int32_t inputSize, SColDataCompressInfo
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
code = tDecompressData(inputStart, &cinfo, colData->pData, cinfo.originalSize, assist);
|
code = tDecompressData(data, &cinfo, colData->pData, cinfo.originalSize, assist);
|
||||||
if (code) {
|
if (code) {
|
||||||
tBufferDestroy(&local);
|
tBufferDestroy(&local);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
inputStart += cinfo.compressedSize;
|
data += cinfo.compressedSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
|
|
|
@ -1561,10 +1561,9 @@ int32_t tBlockDataDecompressColData(const SDiskDataHdr *hdr, const SBlockCol *bl
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t totalCompressedSize = blockCol->szBitmap + blockCol->szOffset + blockCol->szValue;
|
code = tColDataDecompress(BR_PTR(br), &info, colData, assist);
|
||||||
code = tColDataDecompress(BR_PTR(br), totalCompressedSize, &info, colData, assist);
|
|
||||||
TSDB_CHECK_CODE(code, lino, _exit);
|
TSDB_CHECK_CODE(code, lino, _exit);
|
||||||
br->offset += totalCompressedSize;
|
br->offset += blockCol->szBitmap + blockCol->szOffset + blockCol->szValue;
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
return code;
|
return code;
|
||||||
|
|
Loading…
Reference in New Issue