未验证 提交 2fc0fae2 编写于 作者: S shenglian-zhou 提交者: GitHub

Merge pull request #12150 from taosdata/fix/td-15272

fix: apply function offset/forward step error when session window and order by ts desc
......@@ -1744,6 +1744,9 @@ static void doSessionWindowAggImpl(SOperatorInfo* pOperator, SSWindowOperatorInf
SQueryRuntimeEnv* pRuntimeEnv = pOperator->pRuntimeEnv;
STableQueryInfo* item = pRuntimeEnv->current;
SQueryAttr *pQueryAttr = pRuntimeEnv->pQueryAttr;
bool ascQuery = QUERY_IS_ASC_QUERY(pQueryAttr);
// primary timestamp column
SColumnInfoData* pColInfoData = taosArrayGet(pSDataBlock->pDataBlock, 0);
......@@ -1783,7 +1786,9 @@ static void doSessionWindowAggImpl(SOperatorInfo* pOperator, SSWindowOperatorInf
longjmp(pRuntimeEnv->env, TSDB_CODE_QRY_APP_ERROR);
}
doApplyFunctions(pRuntimeEnv, pBInfo->pCtx, &pInfo->curWindow, pInfo->start, pInfo->numOfRows, tsList,
int32_t forwardStep = pInfo->numOfRows;
int32_t offset = (ascQuery) ? pInfo->start : pInfo->start + forwardStep - 1;
doApplyFunctions(pRuntimeEnv, pBInfo->pCtx, &pInfo->curWindow, offset, forwardStep, tsList,
pSDataBlock->info.rows, pOperator->numOfOutput);
pInfo->curWindow.skey = tsList[j];
......@@ -1803,7 +1808,9 @@ static void doSessionWindowAggImpl(SOperatorInfo* pOperator, SSWindowOperatorInf
longjmp(pRuntimeEnv->env, TSDB_CODE_QRY_APP_ERROR);
}
doApplyFunctions(pRuntimeEnv, pBInfo->pCtx, &pInfo->curWindow, pInfo->start, pInfo->numOfRows, tsList,
int32_t forwardStep = pInfo->numOfRows;
int32_t offset = (ascQuery) ? pInfo->start : pInfo->start + forwardStep - 1;
doApplyFunctions(pRuntimeEnv, pBInfo->pCtx, &pInfo->curWindow, offset, forwardStep, tsList,
pSDataBlock->info.rows, pOperator->numOfOutput);
}
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -806,6 +806,7 @@
3,,develop-test,python3 ./test.py -f 2-query/ts_shortcut.py
3,,develop-test,python3 ./test.py -f 2-query/nchar_funcs.py
3,,develop-test,python3 ./test.py -f 2-query/TD-5902.py
3,,develop-test,python3 ./test.py -f 2-query/sample_order_desc.py
1,,develop-test,python3 ./test.py -f 2-query/TD-14196.py
3,,script,./test.sh -f general/compute/scalar_str_concat_len.sim
3,,develop-test,python3 ./test.py -f 2-query/TD-13414.py
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册