提交 8a7d384b 编写于 作者: S shenglian zhou

fix csum/mavg order by ts desc error

上级 b923f25c
......@@ -4558,7 +4558,7 @@ static void csum_function(SQLFunctionCtx *pCtx) {
int32_t notNullElems = 0;
int32_t step = GET_FORWARD_DIRECTION_FACTOR(pCtx->order);
int32_t i = (pCtx->order = TSDB_ORDER_ASC) ? 0 : pCtx->size -1;
int32_t i = (pCtx->order == TSDB_ORDER_ASC) ? 0 : pCtx->size -1;
TSKEY* pTimestamp = pCtx->ptsOutputBuf;
TSKEY* tsList = GET_TS_LIST(pCtx);
......@@ -4623,7 +4623,7 @@ static void mavg_function(SQLFunctionCtx *pCtx) {
int32_t notNullElems = 0;
int32_t step = GET_FORWARD_DIRECTION_FACTOR(pCtx->order);
int32_t i = (pCtx->order = TSDB_ORDER_ASC) ? 0 : pCtx->size -1;
int32_t i = (pCtx->order == TSDB_ORDER_ASC) ? 0 : pCtx->size -1;
TSKEY* pTimestamp = pCtx->ptsOutputBuf;
char* pOutput = pCtx->pOutput;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册