提交 7bb242a4 编写于 作者: D dapan1121

fix: join limit issue

上级 be306dcf
...@@ -581,6 +581,9 @@ static int32_t tscLaunchRealSubqueries(SSqlObj* pSql) { ...@@ -581,6 +581,9 @@ static int32_t tscLaunchRealSubqueries(SSqlObj* pSql) {
SQueryInfo *pQueryInfo = tscGetQueryInfo(&pNew->cmd); SQueryInfo *pQueryInfo = tscGetQueryInfo(&pNew->cmd);
pQueryInfo->tsBuf = pTsBuf; // transfer the ownership of timestamp comp-z data to the new created object pQueryInfo->tsBuf = pTsBuf; // transfer the ownership of timestamp comp-z data to the new created object
SQueryInfo* pParQueryInfo = tscGetQueryInfo(&pSql->cmd);
pQueryInfo->clauseLimit = pParQueryInfo->clauseLimit;
// set the second stage sub query for join process // set the second stage sub query for join process
TSDB_QUERY_SET_TYPE(pQueryInfo->type, TSDB_QUERY_TYPE_JOIN_SEC_STAGE); TSDB_QUERY_SET_TYPE(pQueryInfo->type, TSDB_QUERY_TYPE_JOIN_SEC_STAGE);
memcpy(&pQueryInfo->interval, &pSupporter->interval, sizeof(pQueryInfo->interval)); memcpy(&pQueryInfo->interval, &pSupporter->interval, sizeof(pQueryInfo->interval));
...@@ -1639,7 +1642,7 @@ static void joinRetrieveFinalResCallback(void* param, TAOS_RES* tres, int numOfR ...@@ -1639,7 +1642,7 @@ static void joinRetrieveFinalResCallback(void* param, TAOS_RES* tres, int numOfR
SSqlRes* pRes = &pSql->res; SSqlRes* pRes = &pSql->res;
SQueryInfo* pQueryInfo = tscGetQueryInfo(pCmd); SQueryInfo* pQueryInfo = tscGetQueryInfo(pCmd);
if (pParentSql->res.code != TSDB_CODE_SUCCESS) { if (pParentSql->res.code != TSDB_CODE_SUCCESS) {
tscError("0x%"PRIx64" abort query due to other subquery failure. code:%d, global code:%d", pSql->self, numOfRows, pParentSql->res.code); tscError("0x%"PRIx64" abort query due to other subquery failure. code:%d, global code:%d", pSql->self, numOfRows, pParentSql->res.code);
if (quitAllSubquery(pSql, pParentSql, pSupporter)) { if (quitAllSubquery(pSql, pParentSql, pSupporter)) {
...@@ -2132,6 +2135,8 @@ int32_t tscCreateJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter ...@@ -2132,6 +2135,8 @@ int32_t tscCreateJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter
SQueryInfo *pNewQueryInfo = tscGetQueryInfo(&pNew->cmd); SQueryInfo *pNewQueryInfo = tscGetQueryInfo(&pNew->cmd);
assert(pNewQueryInfo != NULL); assert(pNewQueryInfo != NULL);
pNewQueryInfo->clauseLimit = -1;
pSupporter->colList = pNewQueryInfo->colList; pSupporter->colList = pNewQueryInfo->colList;
pNewQueryInfo->colList = NULL; pNewQueryInfo->colList = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册