From a8f1208dbd46eb6262bd19c52dc6fd0a6c5fa35b Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 20 Aug 2021 22:48:23 +0800 Subject: [PATCH] [td-6229] enable the last_row cache while query condition exists. --- src/client/src/tscSQLParser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index d6af2e2ef1..3926564b50 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -7283,7 +7283,7 @@ int32_t doValidateSqlNode(SSqlObj* pSql, SQuerySqlNode* pQuerySqlNode, int32_t i } pQuerySqlNode->pWhere = NULL; - if (tinfo.precision == TSDB_TIME_PRECISION_MILLI) { + if (tinfo.precision == TSDB_TIME_PRECISION_MILLI && (!TSWINDOW_IS_EQUAL(pQueryInfo->window, TSWINDOW_INITIALIZER))) { pQueryInfo->window.skey = pQueryInfo->window.skey / 1000; pQueryInfo->window.ekey = pQueryInfo->window.ekey / 1000; } -- GitLab