fix(query): remove the invalid update ops.
This commit is contained in:
parent
7522c2edf3
commit
72bbc27e8c
|
@ -1107,6 +1107,11 @@ int32_t blockDataSort_rv(SSDataBlock* pDataBlock, SArray* pOrderInfo, bool nullF
|
|||
|
||||
void blockDataCleanup(SSDataBlock* pDataBlock) {
|
||||
pDataBlock->info.rows = 0;
|
||||
pDataBlock->info.groupId = 0;
|
||||
|
||||
pDataBlock->info.window.ekey = 0;
|
||||
pDataBlock->info.window.skey = 0;
|
||||
|
||||
size_t numOfCols = taosArrayGetSize(pDataBlock->pDataBlock);
|
||||
for (int32_t i = 0; i < numOfCols; ++i) {
|
||||
SColumnInfoData* p = taosArrayGet(pDataBlock->pDataBlock, i);
|
||||
|
|
|
@ -1336,12 +1336,10 @@ void setResultRowInitCtx(SResultRow* pResult, SqlFunctionCtx* pCtx, int32_t numO
|
|||
static void extractQualifiedTupleByFilterResult(SSDataBlock* pBlock, const int8_t* rowRes, bool keep);
|
||||
|
||||
void doFilter(const SNode* pFilterNode, SSDataBlock* pBlock) {
|
||||
if (pFilterNode == NULL) {
|
||||
return;
|
||||
}
|
||||
if (pBlock->info.rows == 0) {
|
||||
if (pFilterNode == NULL || pBlock->info.rows == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
SFilterInfo* filter = NULL;
|
||||
|
||||
// todo move to the initialization function
|
||||
|
@ -1358,8 +1356,6 @@ void doFilter(const SNode* pFilterNode, SSDataBlock* pBlock) {
|
|||
filterFreeInfo(filter);
|
||||
|
||||
extractQualifiedTupleByFilterResult(pBlock, rowRes, keep);
|
||||
blockDataUpdateTsWindow(pBlock, 0);
|
||||
|
||||
taosMemoryFree(rowRes);
|
||||
}
|
||||
|
||||
|
|
|
@ -2592,6 +2592,7 @@ int32_t apercentileFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
|
|||
SAPercentileInfo* pInfo = (SAPercentileInfo*)GET_ROWCELL_INTERBUF(pResInfo);
|
||||
|
||||
if (pInfo->algo == APERCT_ALGO_TDIGEST) {
|
||||
buildTDigestInfo(pInfo);
|
||||
if (pInfo->pTDigest->size > 0) {
|
||||
pInfo->result = tdigestQuantile(pInfo->pTDigest, pInfo->percent / 100);
|
||||
} else { // no need to free
|
||||
|
@ -2599,6 +2600,7 @@ int32_t apercentileFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
|
|||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
} else {
|
||||
buildHistogramInfo(pInfo);
|
||||
if (pInfo->pHisto->numOfElems > 0) {
|
||||
qDebug("get the final res:%d, elements:%"PRId64", entry:%d", pInfo->pHisto->numOfElems, pInfo->pHisto->numOfEntries);
|
||||
|
||||
|
|
Loading…
Reference in New Issue