提交 34d8d054 编写于 作者: G Ganlin Zhao

fix(query): fix leastsquares c0+null and also group by output has empty

result

TD-16136
上级 11e55389
......@@ -1754,6 +1754,11 @@ int32_t leastSQRFunction(SqlFunctionCtx* pCtx) {
}
break;
}
case TSDB_DATA_TYPE_NULL: {
GET_RES_INFO(pCtx)->isNullRes = 1;
numOfElem = 1;
break;
}
default:
break;
......@@ -1797,7 +1802,7 @@ int32_t leastSQRFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
size_t len = snprintf(varDataVal(buf), sizeof(buf) - VARSTR_HEADER_SIZE, "{slop:%.6lf, intercept:%.6lf}", param[0][2], param[1][2]);
varDataSetLen(buf, len);
colDataAppend(pCol, currentRow, buf, false);
colDataAppend(pCol, currentRow, buf, pResInfo->isNullRes);
return pResInfo->numOfRes;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册