fix(query): check if free is required.
This commit is contained in:
parent
04f087793e
commit
76fe2e8b29
|
@ -1119,14 +1119,15 @@ void doFilter(const SNode* pFilterNode, SSDataBlock* pBlock, const SArray* pColM
|
||||||
}
|
}
|
||||||
|
|
||||||
SFilterInfo* filter = pFilterInfo;
|
SFilterInfo* filter = pFilterInfo;
|
||||||
|
|
||||||
int64_t st = taosGetTimestampUs();
|
int64_t st = taosGetTimestampUs();
|
||||||
|
|
||||||
// pError("start filter");
|
// pError("start filter");
|
||||||
|
|
||||||
// todo move to the initialization function
|
// todo move to the initialization function
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
|
bool needFree = false;
|
||||||
if (filter == NULL) {
|
if (filter == NULL) {
|
||||||
|
needFree = true;
|
||||||
code = filterInitFromNode((SNode*)pFilterNode, &filter, 0);
|
code = filterInitFromNode((SNode*)pFilterNode, &filter, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1138,7 +1139,10 @@ void doFilter(const SNode* pFilterNode, SSDataBlock* pBlock, const SArray* pColM
|
||||||
|
|
||||||
// todo the keep seems never to be True??
|
// todo the keep seems never to be True??
|
||||||
bool keep = filterExecute(filter, pBlock, &p, NULL, param1.numOfCols, &status);
|
bool keep = filterExecute(filter, pBlock, &p, NULL, param1.numOfCols, &status);
|
||||||
filterFreeInfo(filter);
|
|
||||||
|
if (needFree) {
|
||||||
|
filterFreeInfo(filter);
|
||||||
|
}
|
||||||
|
|
||||||
extractQualifiedTupleByFilterResult(pBlock, p, keep, status);
|
extractQualifiedTupleByFilterResult(pBlock, p, keep, status);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue