From 8f00163078f3af245d84c3818a50d46f4e4c27c1 Mon Sep 17 00:00:00 2001 From: slzhou Date: Thu, 8 Sep 2022 10:25:02 +0800 Subject: [PATCH] fix: filter unit is not removed when values and nulls are in the same block --- src/query/src/qFilter.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/query/src/qFilter.c b/src/query/src/qFilter.c index 0d9fdb814a..3387956730 100644 --- a/src/query/src/qFilter.c +++ b/src/query/src/qFilter.c @@ -2787,6 +2787,10 @@ int32_t filterRmUnitByRange(SFilterInfo *info, SDataStatis *pDataStatis, int32_t info->blkUnitRes[k] = -1; rmUnit = 1; continue; + } else { + // when there are values and nulls in this block, no unit can produce all true + // or all false. so no unit can be removed + continue; } } -- GitLab