“121028d1e0927038f64328122ce8a28d6362dad3”上不存在“projects/stevenjoezhang/imports.yml”
提交 aa161525 编写于 作者: A Alex Duan

fixed TS-597. allow setArithParams update data for each call

上级 693aa8f3
......@@ -1166,8 +1166,8 @@ static TSKEY getStartTsKey(SQueryAttr* pQueryAttr, STimeWindow* win, const TSKEY
static void setArithParams(SArithmeticSupport* sas, SExprInfo *pExprInfo, SSDataBlock* pSDataBlock) {
sas->numOfCols = (int32_t) pSDataBlock->info.numOfCols;
sas->pExprInfo = pExprInfo;
if (sas->colList != NULL) {
return;
if (sas->colList) {
free(sas->colList); // free pre malloc memory
}
sas->colList = calloc(1, pSDataBlock->info.numOfCols*sizeof(SColumnInfo));
for(int32_t i = 0; i < sas->numOfCols; ++i) {
......@@ -1175,6 +1175,9 @@ static void setArithParams(SArithmeticSupport* sas, SExprInfo *pExprInfo, SSData
sas->colList[i] = pColData->info;
}
if(sas->data) {
free(sas->data); // free pre malloc memory
}
sas->data = calloc(sas->numOfCols, POINTER_BYTES);
// set the input column data
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册