未验证 提交 49a32709 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #17229 from taosdata/fix/TD-19385

fix(query): fix inconsistent max value caused by data conversion when reading from sma.
......@@ -1251,12 +1251,12 @@ int32_t doMinMaxHelper(SqlFunctionCtx* pCtx, int32_t isMinFunc) {
}
}
} else if (type == TSDB_DATA_TYPE_FLOAT) {
double prev = 0;
GET_TYPED_DATA(prev, double, type, &pBuf->v);
float prev = 0;
GET_TYPED_DATA(prev, float, type, &pBuf->v);
double val = GET_DOUBLE_VAL(tval);
float val = GET_DOUBLE_VAL(tval);
if ((prev < val) ^ isMinFunc) {
*(double*)&pBuf->v = val;
*(float*)&pBuf->v = val;
}
if (pCtx->subsidiaries.num > 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册