This commit is contained in:
hjxilinx 2020-05-11 12:18:56 +08:00
parent 66221096a5
commit 6fb22fdc83
2 changed files with 7 additions and 1 deletions

View File

@ -620,9 +620,13 @@ static void filterDataInDataBlock(STsdbQueryHandle* pQueryHandle, STableCheckInf
if (pCol->info.type != TSDB_DATA_TYPE_BINARY && pCol->info.type != TSDB_DATA_TYPE_NCHAR) {
memmove(pCol->pData, src->pData + bytes * start, bytes * pQueryHandle->realNumOfRows);
} else { // handle the var-string
char* dst = pCol->pData;
// todo refactor, only copy one-by-one
for(int32_t k = start; k < pQueryHandle->realNumOfRows + start; ++k) {
char* p = tdGetColDataOfRow(src, k);
memcpy(pCol->pData + k * bytes, p, varDataTLen(p)); // todo refactor
memcpy(dst, p, varDataTLen(p));
dst += varDataTLen(p);
}
}

View File

@ -43,9 +43,11 @@ if $data07 != 1 then
return -1
endi
if $data08 != BINARY then
print expect BINARY actual: $data08
return -1
endi
if $data09 != NCHAR then
print expect NCHAR actual: $data09
return -1
endi