From 4e5733c0acb9f857747cb4b1cca53e6fbdcb9379 Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Tue, 23 Mar 2021 15:48:57 +0800 Subject: [PATCH] support multiple tables join --- src/client/src/tscSubquery.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index 830caad486..76237ebb95 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -954,6 +954,20 @@ static int32_t getIntersectionOfTableTuple(SQueryInfo* pQueryInfo, SSqlObj* pPar SMergeCtx* tctx = &ctxlist[*tableMIdx]; tctx->compared = 1; } + + for (int32_t i = 0; i < tableNum; ++i) { + tableMIdx = taosArrayGet(tagCond, i); + SMergeCtx* tctx = &ctxlist[*tableMIdx]; + if (tctx->p->num <= 0 || tctx->p->pIdTagList == NULL) { + mergeDone = 1; + break; + } + } + + if (mergeDone) { + mergeDone = 0; + continue; + } tableMIdx = taosArrayGet(tagCond, slot); -- GitLab