Merge pull request #18093 from taosdata/fix/TD-20299-D

fix(query): min/max query of float type from block sma
This commit is contained in:
dapan1121 2022-11-14 10:10:33 +08:00 committed by GitHub
commit d7c0c054aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {
pBuf->v = *(int64_t*)tval;
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) {