提交 6d95ab05 编写于 作者: A Alex Duan

[TS-575]<fix>(query):client allow stable query have limit

上级 86f828da
...@@ -7513,7 +7513,7 @@ int32_t validateLimitNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSqlN ...@@ -7513,7 +7513,7 @@ int32_t validateLimitNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSqlN
*/ */
if (pQueryInfo->limit.limit > 0) { if (pQueryInfo->limit.limit > 0) {
pQueryInfo->vgroupLimit = pQueryInfo->limit.limit + pQueryInfo->limit.offset; pQueryInfo->vgroupLimit = pQueryInfo->limit.limit + pQueryInfo->limit.offset;
pQueryInfo->limit.limit = -1; //pQueryInfo->limit.limit = -1;
} }
pQueryInfo->limit.offset = 0; pQueryInfo->limit.offset = 0;
......
...@@ -3176,7 +3176,7 @@ static SSqlObj *tscCreateSTableSubquery(SSqlObj *pSql, SRetrieveSupport *trsuppo ...@@ -3176,7 +3176,7 @@ static SSqlObj *tscCreateSTableSubquery(SSqlObj *pSql, SRetrieveSupport *trsuppo
pQueryInfo->type |= TSDB_QUERY_TYPE_STABLE_SUBQUERY; pQueryInfo->type |= TSDB_QUERY_TYPE_STABLE_SUBQUERY;
// clear the limit/offset info, since it should not be sent to vnode to be executed. // clear the limit/offset info, since it should not be sent to vnode to be executed.
pQueryInfo->limit.limit = -1; // pQueryInfo->limit.limit = -1; // alexduan subquery limit is same with parent is ok
pQueryInfo->limit.offset = 0; pQueryInfo->limit.offset = 0;
assert(trsupport->subqueryIndex < pSql->subState.numOfSub); assert(trsupport->subqueryIndex < pSql->subState.numOfSub);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册