fix(query): sum/min/max/avg query of float type from block sma

This commit is contained in:
Cary Xu 2022-11-13 01:54:46 +08:00
parent b0f36f570b
commit a7e197d2cb
1 changed files with 5 additions and 1 deletions

View File

@ -1187,7 +1187,11 @@ int32_t doMinMaxHelper(SqlFunctionCtx* pCtx, int32_t isMinFunc) {
}
if (!pBuf->assign) {
if (type == TSDB_DATA_TYPE_FLOAT) {
*(float*)&pBuf->v = GET_DOUBLE_VAL(tval);
} else {
pBuf->v = *(int64_t*)tval;
}
if (pCtx->subsidiaries.num > 0) {
index = findRowIndex(pInput->startRowIndex, pInput->numOfRows, pCol, tval);
if (index >= 0) {