提交 828ad921 编写于 作者: A Alex Duan

fix(query): found first order by column and stop search

上级 d7a00d89
......@@ -6169,6 +6169,7 @@ SOperatorInfo *createOrderOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorI
goto _clean;
}
bool found = false;
for (int32_t i = 0; i < numOfOutput; ++i) {
SColumnInfoData col = {{0}};
col.info.colId = pExpr[i].base.colInfo.colId;
......@@ -6176,8 +6177,9 @@ SOperatorInfo *createOrderOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperatorI
col.info.type = pExpr[i].base.resType;
taosArrayPush(pDataBlock->pDataBlock, &col);
if (col.info.colId == pOrderVal->orderColId) {
if (!found && col.info.colId == pOrderVal->orderColId) {
pInfo->colIndex = i;
found = true;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册