未验证 提交 fead5b90 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #1868 from taosdata/feature/query

[td-225]
...@@ -620,9 +620,13 @@ static void filterDataInDataBlock(STsdbQueryHandle* pQueryHandle, STableCheckInf ...@@ -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) { 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); memmove(pCol->pData, src->pData + bytes * start, bytes * pQueryHandle->realNumOfRows);
} else { // handle the var-string } 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) { for(int32_t k = start; k < pQueryHandle->realNumOfRows + start; ++k) {
char* p = tdGetColDataOfRow(src, k); char* p = tdGetColDataOfRow(src, k);
memcpy(pCol->pData + k * bytes, p, varDataTLen(p)); // todo refactor memcpy(dst, p, varDataTLen(p));
dst += varDataTLen(p);
} }
} }
......
...@@ -43,9 +43,11 @@ if $data07 != 1 then ...@@ -43,9 +43,11 @@ if $data07 != 1 then
return -1 return -1
endi endi
if $data08 != BINARY then if $data08 != BINARY then
print expect BINARY actual: $data08
return -1 return -1
endi endi
if $data09 != NCHAR then if $data09 != NCHAR then
print expect NCHAR actual: $data09
return -1 return -1
endi endi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册