From 80621e14eba7e8d6e70793f730c95494524a644d Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 24 Apr 2023 17:15:46 +0800 Subject: [PATCH] refactor --- source/libs/parser/src/parTranslater.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 97fee72bf8..c7552445e3 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -2577,12 +2577,13 @@ static int32_t translateTable(STranslateContext* pCxt, SNode* pTable) { if (TSDB_SUPER_TABLE == pRealTable->pMeta->tableType) { pCxt->stableQuery = true; } - if (TSDB_SYSTEM_TABLE == pRealTable->pMeta->tableType && isSelectStmt(pCxt->pCurrStmt)) { - ((SSelectStmt*)pCxt->pCurrStmt)->isTimeLineResult = false; - } - if (TSDB_SYSTEM_TABLE == pRealTable->pMeta->tableType && isDeleteStmt(pCxt->pCurrStmt)) { - code = TSDB_CODE_TSC_INVALID_OPERATION; - break; + if (TSDB_SYSTEM_TABLE == pRealTable->pMeta->tableType) { + if (isSelectStmt(pCxt->pCurrStmt)) { + ((SSelectStmt*)pCxt->pCurrStmt)->isTimeLineResult = false; + } else if (isDeleteStmt(pCxt->pCurrStmt)) { + code = TSDB_CODE_TSC_INVALID_OPERATION; + break; + } } code = addNamespace(pCxt, pRealTable); } -- GitLab