fix: hash join row index issue

This commit is contained in:
dapan1121 2023-07-17 14:45:45 +08:00
parent efbb6cb193
commit 2e0b4236e3
2 changed files with 3 additions and 6 deletions

View File

@ -369,9 +369,6 @@ static FORCE_INLINE void appendHJoinResToBlock(struct SOperatorInfo* pOperator,
pRes->info.rows = resNum;
pCtx->rowRemains = pCtx->pBuildRow ? true : false;
if (!pCtx->rowRemains) {
pCtx->probeIdx++;
}
}
@ -423,8 +420,8 @@ static void doHashJoinImpl(struct SOperatorInfo* pOperator) {
}
}
for (int32_t i = pCtx->probeIdx; i < pCtx->pProbeData->info.rows; ++i) {
copyKeyColsDataToBuf(pProbe, i, &bufLen);
for (; pCtx->probeIdx < pCtx->pProbeData->info.rows; ++pCtx->probeIdx) {
copyKeyColsDataToBuf(pProbe, pCtx->probeIdx, &bufLen);
SGroupData* pGroup = tSimpleHashGet(pJoin->pKeyHash, pProbe->keyData, bufLen);
if (pGroup) {
pCtx->pBuildRow = pGroup->rows;

View File

@ -797,7 +797,7 @@ static int32_t createTableListInfoFromParam(SOperatorInfo* pOperator) {
return TSDB_CODE_INVALID_PARA;
}
qDebug("add total %d dynamic tables to scan, exist num:%d", num, taosArrayGetSize(pListInfo->pTableList));
qDebug("add total %d dynamic tables to scan, exist num:%" PRId64, num, (int64_t)taosArrayGetSize(pListInfo->pTableList));
pListInfo->oneTableForEachGroup = true;