提交 b5d01190 编写于 作者: H Haojun Liao

[td-14288] fix bug in first query.

上级 ca9b7c42
...@@ -2208,7 +2208,7 @@ static SqlFunctionCtx* createSqlFunctionCtx_rv(SExprInfo* pExprInfo, int32_t num ...@@ -2208,7 +2208,7 @@ static SqlFunctionCtx* createSqlFunctionCtx_rv(SExprInfo* pExprInfo, int32_t num
} }
for(int32_t i = 1; i < numOfOutput; ++i) { for(int32_t i = 1; i < numOfOutput; ++i) {
(*rowCellInfoOffset)[i] = (int32_t)((*rowCellInfoOffset)[i - 1] + sizeof(SResultRowEntryInfo) + pFuncCtx[i].resDataInfo.interBufSize); (*rowCellInfoOffset)[i] = (int32_t)((*rowCellInfoOffset)[i - 1] + sizeof(SResultRowEntryInfo) + pFuncCtx[i - 1].resDataInfo.interBufSize);
} }
setCtxTagColumnInfo(pFuncCtx, numOfOutput); setCtxTagColumnInfo(pFuncCtx, numOfOutput);
......
...@@ -528,11 +528,10 @@ void firstFunction(SqlFunctionCtx *pCtx) { ...@@ -528,11 +528,10 @@ void firstFunction(SqlFunctionCtx *pCtx) {
char* buf = GET_ROWCELL_INTERBUF(pResInfo); char* buf = GET_ROWCELL_INTERBUF(pResInfo);
SInputColumnInfoData* pInput = &pCtx->input; SInputColumnInfoData* pInput = &pCtx->input;
SColumnInfoData* pInputCol = pInput->pData[0]; SColumnInfoData* pInputCol = pInput->pData[0];
// All null data column, return directly. // All null data column, return directly.
if (pInput->pColumnDataAgg[0]->numOfNull == pInput->totalRows) { if (pInput->colDataAggIsSet && (pInput->pColumnDataAgg[0]->numOfNull == pInput->totalRows)) {
ASSERT(pInputCol->hasNull == true); ASSERT(pInputCol->hasNull == true);
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册