Merge pull request #24196 from taosdata/coverage/alex

coverage: remove tfunctionInt.c
This commit is contained in:
Alex Duan 2023-12-23 16:39:49 +08:00 committed by GitHub
commit 659acfd5f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 32 deletions

View File

@ -28,8 +28,6 @@ extern "C" {
#include "tudf.h"
#include "tvariant.h"
bool topbot_datablock_filter(SqlFunctionCtx *pCtx, const char *minval, const char *maxval);
/**
* the numOfRes should be kept, since it may be used later
* and allow the ResultInfo to be re initialized

View File

@ -27,33 +27,3 @@
#include "tpercentile.h"
#include "ttszip.h"
#include "tudf.h"
int32_t getNumOfResult(SqlFunctionCtx* pCtx, int32_t num, SSDataBlock* pResBlock) {
int32_t maxRows = 0;
for (int32_t j = 0; j < num; ++j) {
SResultRowEntryInfo* pResInfo = GET_RES_INFO(&pCtx[j]);
if (pResInfo != NULL && maxRows < pResInfo->numOfRes) {
maxRows = pResInfo->numOfRes;
}
}
blockDataEnsureCapacity(pResBlock, maxRows);
for (int32_t i = 0; i < num; ++i) {
SColumnInfoData* pCol = taosArrayGet(pResBlock->pDataBlock, i);
SResultRowEntryInfo* pResInfo = GET_RES_INFO(&pCtx[i]);
if (pResInfo->numOfRes == 0) {
for (int32_t j = 0; j < pResInfo->numOfRes; ++j) {
colDataSetVal(pCol, j, NULL, true); // TODO add set null data api
}
} else {
for (int32_t j = 0; j < pResInfo->numOfRes; ++j) {
colDataSetVal(pCol, j, GET_ROWCELL_INTERBUF(pResInfo), false);
}
}
}
pResBlock->info.rows = maxRows;
return maxRows;
}