fix: fix statecount result error
This commit is contained in:
parent
febe603191
commit
582f44c2fd
|
@ -4711,7 +4711,7 @@ int32_t stateCountFunction(SqlFunctionCtx* pCtx) {
|
||||||
colDataAppendNULL(pOutput, i);
|
colDataAppendNULL(pOutput, i);
|
||||||
// handle selectivity
|
// handle selectivity
|
||||||
if (pCtx->subsidiaries.num > 0) {
|
if (pCtx->subsidiaries.num > 0) {
|
||||||
appendSelectivityValue(pCtx, i, i);
|
appendSelectivityValue(pCtx, i, pCtx->offset + numOfElems - 1);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -4724,11 +4724,11 @@ int32_t stateCountFunction(SqlFunctionCtx* pCtx) {
|
||||||
} else {
|
} else {
|
||||||
pInfo->count = 0;
|
pInfo->count = 0;
|
||||||
}
|
}
|
||||||
colDataAppend(pOutput, i, (char*)&output, false);
|
colDataAppend(pOutput, pCtx->offset + numOfElems - 1, (char*)&output, false);
|
||||||
|
|
||||||
// handle selectivity
|
// handle selectivity
|
||||||
if (pCtx->subsidiaries.num > 0) {
|
if (pCtx->subsidiaries.num > 0) {
|
||||||
appendSelectivityValue(pCtx, i, i);
|
appendSelectivityValue(pCtx, i, pCtx->offset + numOfElems - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue