diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 331c8faa5339e02f4d704c791ffb9fd19a703c0d..7df85369ecfef191cc2ac0524d91cc7269011794 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -4769,9 +4769,9 @@ static bool multiTableMultioutputHelper(SQInfo *pQInfo, int32_t index) { if (pRuntimeEnv->pTSBuf != NULL) { if (pRuntimeEnv->cur.vgroupIndex == -1) { - STSElem elem = tsBufGetElemStartPos(pRuntimeEnv->pTSBuf, 0, &pRuntimeEnv->pCtx[0].tag); + STSElem elem = tsBufGetElemStartPos(pRuntimeEnv->pTSBuf, pQInfo->vgId, &pRuntimeEnv->pCtx[0].tag); - // failed to find data with the specified tag value + // failed to find data with the specified tag value and vnodeId if (elem.vnode < 0) { return false; }