From e2635df55df1a795102c2a48ec69a55e1fdb2d58 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 22 Jul 2021 19:25:11 +0800 Subject: [PATCH] [TD-5438] fix bug --- src/client/src/tscSQLParser.c | 3 +-- tests/pytest/query/queryError.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 513a116cf7..c668619eb6 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -5160,7 +5160,6 @@ int32_t validateWhereNode(SQueryInfo* pQueryInfo, tSqlExpr** pExpr, SSqlObj* pSq int32_t ret = TSDB_CODE_SUCCESS; - pQueryInfo->onlyHasTagCond = true; // tags query condition may be larger than 512bytes, therefore, we need to prepare enough large space SStringBuilder sb; memset(&sb, 0, sizeof(sb)); SCondExpr condExpr = {0}; @@ -8571,7 +8570,7 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf if (validateGroupbyNode(pQueryInfo, pSqlNode->pGroupby, pCmd) != TSDB_CODE_SUCCESS) { return TSDB_CODE_TSC_INVALID_OPERATION; } - + pQueryInfo->onlyHasTagCond = true; // set where info if (pSqlNode->pWhere != NULL) { if (validateWhereNode(pQueryInfo, &pSqlNode->pWhere, pSql) != TSDB_CODE_SUCCESS) { diff --git a/tests/pytest/query/queryError.py b/tests/pytest/query/queryError.py index 539ce5141f..ac78c0518f 100644 --- a/tests/pytest/query/queryError.py +++ b/tests/pytest/query/queryError.py @@ -51,7 +51,7 @@ class TDTestCase: tdSql.error("select last_row as latest from st") # query distinct on normal colnum - tdSql.error("select distinct tagtype from st") + #tdSql.error("select distinct tagtype from st") # query .. order by non-time field tdSql.error("select * from st order by name") -- GitLab