enh(query): first/last function adoption for MIA operator
TD-17254
This commit is contained in:
parent
7f875b5120
commit
ba7d72c752
|
@ -2882,12 +2882,16 @@ static int32_t firstLastFunctionMergeImpl(SqlFunctionCtx* pCtx, bool isFirstQuer
|
||||||
SFirstLastRes* pInfo = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx));
|
SFirstLastRes* pInfo = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx));
|
||||||
|
|
||||||
int32_t start = pInput->startRowIndex;
|
int32_t start = pInput->startRowIndex;
|
||||||
char* data = colDataGetData(pCol, start);
|
int32_t numOfElems = 0;
|
||||||
|
|
||||||
|
for(int32_t i = start; i < start + pInput->numOfRows; ++i) {
|
||||||
|
char* data = colDataGetData(pCol, i);
|
||||||
SFirstLastRes* pInputInfo = (SFirstLastRes*)varDataVal(data);
|
SFirstLastRes* pInputInfo = (SFirstLastRes*)varDataVal(data);
|
||||||
|
|
||||||
firstLastTransferInfo(pCtx, pInputInfo, pInfo, isFirstQuery);
|
firstLastTransferInfo(pCtx, pInputInfo, pInfo, isFirstQuery);
|
||||||
|
if (!numOfElems) {
|
||||||
int32_t numOfElems = pInputInfo->hasResult ? 1 : 0;
|
numOfElems = pInputInfo->hasResult ? 1 : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SET_VAL(GET_RES_INFO(pCtx), numOfElems, 1);
|
SET_VAL(GET_RES_INFO(pCtx), numOfElems, 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue