“ba857d5b93e51f8d64b609628738ca1108bb991b”上不存在“tests/pytest/query”
提交 324eecdd 编写于 作者: H Haojun Liao

fix(query): prepare the buffer before assigning result.

上级 72a942b0
......@@ -299,7 +299,9 @@ int32_t colDataAssign(SColumnInfoData* pColumnInfoData, const SColumnInfoData* p
return numOfRows;
}
ASSERT(pBlockInfo->capacity >= numOfRows);
if (pBlockInfo != NULL) {
ASSERT(pBlockInfo->capacity >= numOfRows);
}
if (IS_VAR_DATA_TYPE(pColumnInfoData->info.type)) {
memcpy(pColumnInfoData->varmeta.offset, pSource->varmeta.offset, sizeof(int32_t) * numOfRows);
......
......@@ -982,7 +982,8 @@ int32_t scalarCalculate(SNode *pNode, SArray *pBlockList, SScalarParam *pDst) {
sclError("no valid res in hash, node:%p, type:%d", pNode, nodeType(pNode));
SCL_ERR_JRET(TSDB_CODE_QRY_APP_ERROR);
}
colInfoDataEnsureCapacity(pDst->columnData, res->numOfRows);
colDataAssign(pDst->columnData, res->columnData, res->numOfRows, NULL);
pDst->numOfRows = res->numOfRows;
taosHashRemove(ctx.pRes, (void *)&pNode, POINTER_BYTES);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册