提交 c6e93b27 编写于 作者: A Alex Duan

V24 deal with clauseLimit to solve

上级 7edc53a8
......@@ -7547,7 +7547,6 @@ int32_t validateLimitNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSqlN
pQueryInfo->vgroupLimit = pQueryInfo->limit.limit + pQueryInfo->limit.offset;
pQueryInfo->limit.limit += pQueryInfo->limit.offset;
}
pQueryInfo->offsetAdd = pQueryInfo->limit.offset;
pQueryInfo->limit.offset = 0;
}
} else {
......
......@@ -1871,11 +1871,9 @@ int tscProcessRetrieveGlobalMergeRsp(SSqlObj *pSql) {
// global aggregation may be the upstream for parent query
SQueryInfo *pQueryInfo = tscGetQueryInfo(pCmd);
// reset stable limit
if (pQueryInfo->offsetAdd > 0){
ASSERT(pQueryInfo->limit.limit > pQueryInfo->offsetAdd);
pQueryInfo->limit.limit -= pQueryInfo->offsetAdd;
pQueryInfo->limit.offset = pQueryInfo->offsetAdd;
pQueryInfo->offsetAdd = 0;
if (tscOrderedProjectionQueryOnSTable(pQueryInfo, 0)) {
pQueryInfo->limit.limit = pQueryInfo->clauseLimit;
pQueryInfo->limit.offset = pQueryInfo->prjOffset;
}
if (pQueryInfo->pQInfo == NULL) {
......
......@@ -3371,7 +3371,6 @@ void tscInitQueryInfo(SQueryInfo* pQueryInfo) {
pQueryInfo->slimit.limit = -1;
pQueryInfo->slimit.offset = 0;
pQueryInfo->offsetAdd = 0;
pQueryInfo->pUpstream = taosArrayInit(4, POINTER_BYTES);
pQueryInfo->window = TSWINDOW_INITIALIZER;
pQueryInfo->multigroupResult = true;
......@@ -3862,7 +3861,6 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, __async_cb_func_t
pNewQueryInfo->window = pQueryInfo->window;
pNewQueryInfo->range = pQueryInfo->range;
pNewQueryInfo->limit = pQueryInfo->limit;
pNewQueryInfo->offsetAdd = pQueryInfo->offsetAdd;
pNewQueryInfo->slimit = pQueryInfo->slimit;
pNewQueryInfo->order = pQueryInfo->order;
pNewQueryInfo->tsBuf = NULL;
......
......@@ -167,8 +167,6 @@ typedef struct SQueryInfo {
bool globalMerge;
bool multigroupResult;
bool isStddev;
int64_t offsetAdd; // addition add offset
} SQueryInfo;
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册