fix(query): fix bugs caused by refactor.
This commit is contained in:
parent
ad95b27cf2
commit
d69d11a74f
|
@ -87,10 +87,16 @@ static void toDataCacheEntry(SDataDispatchHandle* pHandle, const SInputData* pIn
|
|||
|
||||
int32_t dataLen = blockEncode(pInput->pData, p, numOfCols);
|
||||
int32_t len = tsCompressString(p, dataLen, 1, pEntry->data, pBuf->allocSize, ONE_STAGE_COMP, NULL, 0);
|
||||
|
||||
pEntry->compressed = 1;
|
||||
pEntry->dataLen = len;
|
||||
pEntry->rawLen = dataLen;
|
||||
if (len < dataLen) {
|
||||
pEntry->compressed = 1;
|
||||
pEntry->dataLen = len;
|
||||
pEntry->rawLen = dataLen;
|
||||
} else { // no need to compress data
|
||||
pEntry->compressed = 0;
|
||||
pEntry->dataLen = dataLen;
|
||||
pEntry->rawLen = dataLen;
|
||||
memcpy(pEntry->data, p, dataLen);
|
||||
}
|
||||
taosMemoryFree(p);
|
||||
} else {
|
||||
pEntry->dataLen = blockEncode(pInput->pData, pEntry->data, numOfCols);
|
||||
|
|
|
@ -67,7 +67,7 @@ TEST_F(CfgTest, 02_Basic) {
|
|||
|
||||
SConfigItem* pItem = NULL;
|
||||
SConfigIter* pIter = cfgCreateIter(pConfig);
|
||||
while((pItem == cfgNextIter(pIter)) != NULL) {
|
||||
while((pItem = cfgNextIter(pIter)) != NULL) {
|
||||
switch (pItem->dtype) {
|
||||
case CFG_DTYPE_BOOL:
|
||||
printf("index:%d, cfg:%s value:%d\n", size, pItem->name, pItem->bval);
|
||||
|
|
Loading…
Reference in New Issue