From e3fa2b775f43b624b2e3de997c1755b6cd4f7a48 Mon Sep 17 00:00:00 2001 From: facetosea <25808407@qq.com> Date: Wed, 4 Dec 2024 09:35:21 +0800 Subject: [PATCH] enh: time range when or const value --- source/libs/parser/src/parTranslater.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 2e167d3053..3c5aeb142e 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -5623,10 +5623,11 @@ static int32_t getTimeRange(SNode** pPrimaryKeyCond, STimeWindow* pTimeRange, bo int32_t code = scalarCalculateConstants(*pPrimaryKeyCond, &pNew); if (TSDB_CODE_SUCCESS == code) { *pPrimaryKeyCond = pNew; - if(nodeType(pNew) == QUERY_NODE_VALUE) { + if (nodeType(pNew) == QUERY_NODE_VALUE) { *pTimeRange = TSWINDOW_INITIALIZER; + } else { + code = filterGetTimeRange(*pPrimaryKeyCond, pTimeRange, pIsStrict); } - code = filterGetTimeRange(*pPrimaryKeyCond, pTimeRange, pIsStrict); } return code; }