Merge pull request #15129 from taosdata/szhou/fix/td-17429

fix: filter shall not be executed when the input block is empty
This commit is contained in:
shenglian-zhou 2022-07-19 18:44:09 +08:00 committed by GitHub
commit b9490b2cac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -2093,8 +2093,9 @@ TAOS_RES* taosQueryImpl(TAOS* taos, const char* sql, bool validateOnly) {
taosAsyncQueryImpl(*(int64_t*)taos, sql, syncQueryFn, param, validateOnly);
tsem_wait(&param->sem);
param->pRequest->syncQuery = true;
if (param->pRequest != NULL) {
param->pRequest->syncQuery = true;
}
return param->pRequest;
#else
size_t sqlLen = strlen(sql);

View File

@ -1337,7 +1337,9 @@ void doFilter(const SNode* pFilterNode, SSDataBlock* pBlock) {
if (pFilterNode == NULL) {
return;
}
if (pBlock->info.rows == 0) {
return;
}
SFilterInfo* filter = NULL;
// todo move to the initialization function