From ba80c7478fa67d010c7271b99850aa0ae7e10119 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 31 Mar 2022 02:19:11 -0400 Subject: [PATCH] TD-14405 TD-14404 desc and reset query cache statement implement --- include/common/ttokendef.h | 109 +- include/libs/command/command.h | 19 + include/libs/nodes/cmdnodes.h | 13 + include/libs/nodes/nodes.h | 2 + include/libs/parser/parser.h | 1 + source/client/CMakeLists.txt | 2 +- source/client/src/clientImpl.c | 21 +- source/libs/CMakeLists.txt | 1 + source/libs/command/CMakeLists.txt | 16 + source/libs/command/src/command.c | 115 + source/libs/command/test/CMakeLists.txt | 18 + source/libs/command/test/commandTest.cpp | 21 + source/libs/nodes/src/nodesUtilFuncs.c | 4 + source/libs/parser/inc/parAst.h | 2 + source/libs/parser/inc/parInt.h | 1 + source/libs/parser/inc/sql.y | 9 +- source/libs/parser/src/parAstCreater.c | 15 + source/libs/parser/src/parTokenizer.c | 6 +- source/libs/parser/src/parTranslater.c | 127 +- source/libs/parser/src/parser.c | 4 + source/libs/parser/src/sql.c | 3564 ++++++++++---------- source/libs/planner/src/planPhysiCreater.c | 3 + 22 files changed, 2210 insertions(+), 1863 deletions(-) create mode 100644 include/libs/command/command.h create mode 100644 source/libs/command/CMakeLists.txt create mode 100644 source/libs/command/src/command.c create mode 100644 source/libs/command/test/CMakeLists.txt create mode 100644 source/libs/command/test/commandTest.cpp diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 73c15d508c..47a97071aa 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -138,59 +138,62 @@ #define TK_INTERVAL 120 #define TK_TOPIC 121 #define TK_AS 122 -#define TK_EXPLAIN 123 -#define TK_ANALYZE 124 -#define TK_VERBOSE 125 -#define TK_NK_BOOL 126 -#define TK_RATIO 127 -#define TK_NULL 128 -#define TK_NK_VARIABLE 129 -#define TK_NK_UNDERLINE 130 -#define TK_ROWTS 131 -#define TK_TBNAME 132 -#define TK_QSTARTTS 133 -#define TK_QENDTS 134 -#define TK_WSTARTTS 135 -#define TK_WENDTS 136 -#define TK_WDURATION 137 -#define TK_BETWEEN 138 -#define TK_IS 139 -#define TK_NK_LT 140 -#define TK_NK_GT 141 -#define TK_NK_LE 142 -#define TK_NK_GE 143 -#define TK_NK_NE 144 -#define TK_MATCH 145 -#define TK_NMATCH 146 -#define TK_IN 147 -#define TK_JOIN 148 -#define TK_INNER 149 -#define TK_SELECT 150 -#define TK_DISTINCT 151 -#define TK_WHERE 152 -#define TK_PARTITION 153 -#define TK_BY 154 -#define TK_SESSION 155 -#define TK_STATE_WINDOW 156 -#define TK_SLIDING 157 -#define TK_FILL 158 -#define TK_VALUE 159 -#define TK_NONE 160 -#define TK_PREV 161 -#define TK_LINEAR 162 -#define TK_NEXT 163 -#define TK_GROUP 164 -#define TK_HAVING 165 -#define TK_ORDER 166 -#define TK_SLIMIT 167 -#define TK_SOFFSET 168 -#define TK_LIMIT 169 -#define TK_OFFSET 170 -#define TK_ASC 171 -#define TK_DESC 172 -#define TK_NULLS 173 -#define TK_FIRST 174 -#define TK_LAST 175 +#define TK_DESC 123 +#define TK_DESCRIBE 124 +#define TK_RESET 125 +#define TK_QUERY 126 +#define TK_EXPLAIN 127 +#define TK_ANALYZE 128 +#define TK_VERBOSE 129 +#define TK_NK_BOOL 130 +#define TK_RATIO 131 +#define TK_NULL 132 +#define TK_NK_VARIABLE 133 +#define TK_NK_UNDERLINE 134 +#define TK_ROWTS 135 +#define TK_TBNAME 136 +#define TK_QSTARTTS 137 +#define TK_QENDTS 138 +#define TK_WSTARTTS 139 +#define TK_WENDTS 140 +#define TK_WDURATION 141 +#define TK_BETWEEN 142 +#define TK_IS 143 +#define TK_NK_LT 144 +#define TK_NK_GT 145 +#define TK_NK_LE 146 +#define TK_NK_GE 147 +#define TK_NK_NE 148 +#define TK_MATCH 149 +#define TK_NMATCH 150 +#define TK_IN 151 +#define TK_JOIN 152 +#define TK_INNER 153 +#define TK_SELECT 154 +#define TK_DISTINCT 155 +#define TK_WHERE 156 +#define TK_PARTITION 157 +#define TK_BY 158 +#define TK_SESSION 159 +#define TK_STATE_WINDOW 160 +#define TK_SLIDING 161 +#define TK_FILL 162 +#define TK_VALUE 163 +#define TK_NONE 164 +#define TK_PREV 165 +#define TK_LINEAR 166 +#define TK_NEXT 167 +#define TK_GROUP 168 +#define TK_HAVING 169 +#define TK_ORDER 170 +#define TK_SLIMIT 171 +#define TK_SOFFSET 172 +#define TK_LIMIT 173 +#define TK_OFFSET 174 +#define TK_ASC 175 +#define TK_NULLS 176 +#define TK_FIRST 177 +#define TK_LAST 178 #define TK_NK_SPACE 300 #define TK_NK_COMMENT 301 diff --git a/include/libs/command/command.h b/include/libs/command/command.h new file mode 100644 index 0000000000..699c2f9792 --- /dev/null +++ b/include/libs/command/command.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include "cmdnodes.h" +#include "tmsg.h" + +int32_t qExecCommand(SNode* pStmt, SRetrieveTableRsp** pRsp); diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index a03c496b4f..1c812d40ca 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -20,8 +20,14 @@ extern "C" { #endif +#include "query.h" #include "querynodes.h" +#define DESCRIBE_RESULT_COLS 4 +#define DESCRIBE_RESULT_FIELD_LEN (TSDB_COL_NAME_LEN - 1 + VARSTR_HEADER_SIZE) +#define DESCRIBE_RESULT_TYPE_LEN (20 + VARSTR_HEADER_SIZE) +#define DESCRIBE_RESULT_NOTE_LEN (8 + VARSTR_HEADER_SIZE) + typedef struct SDatabaseOptions { ENodeType type; int32_t numOfBlocks; @@ -247,6 +253,13 @@ typedef struct SAlterLocalStmt { char value[TSDB_DNODE_VALUE_LEN]; } SAlterLocalStmt; +typedef struct SDescribeStmt { + ENodeType type; + char dbName[TSDB_DB_NAME_LEN]; + char tableName[TSDB_TABLE_NAME_LEN]; + STableMeta* pMeta; +} SDescribeStmt; + #ifdef __cplusplus } #endif diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index 83c0bccaaf..5f86c75787 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -101,6 +101,8 @@ typedef enum ENodeType { QUERY_NODE_DROP_TOPIC_STMT, QUERY_NODE_ALTER_LOCAL_STMT, QUERY_NODE_EXPLAIN_STMT, + QUERY_NODE_DESCRIBE_STMT, + QUERY_NODE_RESET_QUERY_CACHE_STMT, QUERY_NODE_SHOW_DATABASES_STMT, QUERY_NODE_SHOW_TABLES_STMT, QUERY_NODE_SHOW_STABLES_STMT, diff --git a/include/libs/parser/parser.h b/include/libs/parser/parser.h index 0747534721..f10185c44f 100644 --- a/include/libs/parser/parser.h +++ b/include/libs/parser/parser.h @@ -55,6 +55,7 @@ typedef struct SQuery { SArray* pDbList; SArray* pTableList; bool showRewrite; + bool localCmd; } SQuery; int32_t qParseQuerySql(SParseContext* pCxt, SQuery** pQuery); diff --git a/source/client/CMakeLists.txt b/source/client/CMakeLists.txt index a632337d4a..8ee6c31ba1 100644 --- a/source/client/CMakeLists.txt +++ b/source/client/CMakeLists.txt @@ -8,7 +8,7 @@ target_include_directories( target_link_libraries( taos INTERFACE api - PRIVATE os util common transport nodes parser planner catalog scheduler function qcom + PRIVATE os util common transport nodes parser command planner catalog scheduler function qcom ) if(${BUILD_TEST}) diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index d8017a8727..f0d5941141 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -1,6 +1,7 @@ #include "clientInt.h" #include "clientLog.h" +#include "command.h" #include "scheduler.h" #include "tdatablock.h" #include "tdef.h" @@ -170,6 +171,15 @@ int32_t parseSql(SRequestObj* pRequest, bool topicQuery, SQuery** pQuery) { return code; } +int32_t execLocalCmd(SRequestObj* pRequest, SQuery* pQuery) { + SRetrieveTableRsp* pRsp = NULL; + int32_t code = qExecCommand(pQuery->pRoot, &pRsp); + if (TSDB_CODE_SUCCESS == code && NULL != pRsp) { + code = setQueryResultFromRsp(&pRequest->body.resInfo, pRsp); + } + return code; +} + int32_t execDdlQuery(SRequestObj* pRequest, SQuery* pQuery) { SCmdMsgInfo* pMsgInfo = pQuery->pCmdMsg; pRequest->type = pMsgInfo->msgType; @@ -259,7 +269,9 @@ SRequestObj* execQueryImpl(STscObj* pTscObj, const char* sql, int sqlLen) { CHECK_CODE_GOTO(buildRequest(pTscObj, sql, sqlLen, &pRequest), _return); CHECK_CODE_GOTO(parseSql(pRequest, false, &pQuery), _return); - if (pQuery->directRpc) { + if (pQuery->localCmd) { + CHECK_CODE_GOTO(execLocalCmd(pRequest, pQuery), _return); + } else if (pQuery->directRpc) { CHECK_CODE_GOTO(execDdlQuery(pRequest, pQuery), _return); } else { CHECK_CODE_GOTO(getPlan(pRequest, pQuery, &pRequest->body.pDag, pNodeList), _return); @@ -464,9 +476,11 @@ static void destroySendMsgInfo(SMsgSendInfo* pMsgBody) { taosMemoryFreeClear(pMsgBody->msgInfo.pData); taosMemoryFreeClear(pMsgBody); } + bool persistConnForSpecificMsg(void* parenct, tmsg_t msgType) { return msgType == TDMT_VND_QUERY_RSP || msgType == TDMT_VND_FETCH_RSP || msgType == TDMT_VND_RES_READY_RSP || msgType == TDMT_VND_QUERY_HEARTBEAT_RSP; } + void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) { SMsgSendInfo* pSendInfo = (SMsgSendInfo*)pMsg->ahandle; assert(pMsg->ahandle != NULL); @@ -647,6 +661,11 @@ void* doFetchRow(SRequestObj* pRequest, bool setupOneRowPtr) { } } + if (pResultInfo->completed) { + pResultInfo->numOfRows = 0; + return NULL; + } + SMsgSendInfo* body = buildMsgInfoImpl(pRequest); int64_t transporterId = 0; diff --git a/source/libs/CMakeLists.txt b/source/libs/CMakeLists.txt index a1b9337fa8..b1e8be6528 100644 --- a/source/libs/CMakeLists.txt +++ b/source/libs/CMakeLists.txt @@ -17,3 +17,4 @@ add_subdirectory(tfs) add_subdirectory(monitor) add_subdirectory(nodes) add_subdirectory(scalar) +add_subdirectory(command) diff --git a/source/libs/command/CMakeLists.txt b/source/libs/command/CMakeLists.txt new file mode 100644 index 0000000000..db3766d145 --- /dev/null +++ b/source/libs/command/CMakeLists.txt @@ -0,0 +1,16 @@ +aux_source_directory(src COMMAND_SRC) +add_library(command STATIC ${COMMAND_SRC}) +target_include_directories( + command + PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/command" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" +) + +target_link_libraries( + command + PRIVATE os util nodes catalog function transport qcom +) + +if(${BUILD_TEST}) + ADD_SUBDIRECTORY(test) +endif(${BUILD_TEST}) \ No newline at end of file diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c new file mode 100644 index 0000000000..7ffbd4f80a --- /dev/null +++ b/source/libs/command/src/command.c @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include "command.h" +#include "tdatablock.h" + +// #define SET_VARSTR(pData, val, pOffset) + +static void buildRspData(const STableMeta* pMeta, char* pData) { + int32_t* pColSizes = (int32_t*)pData; + pData += DESCRIBE_RESULT_COLS * sizeof(int32_t); + int32_t numOfRows = TABLE_TOTAL_COL_NUM(pMeta); + + // Field + int32_t* pOffset = (int32_t*)pData; + pData += numOfRows * sizeof(int32_t); + for (int32_t i = 0; i < numOfRows; ++i) { + STR_TO_VARSTR(pData, pMeta->schema[i].name); + int16_t len = varDataTLen(pData); + pData += len; + *pOffset = pColSizes[0]; + pOffset += 1; + pColSizes[0] += len; + } + + // Type + pOffset = (int32_t*)pData; + pData += numOfRows * sizeof(int32_t); + for (int32_t i = 0; i < numOfRows; ++i) { + STR_TO_VARSTR(pData, tDataTypes[pMeta->schema[i].type].name); + int16_t len = varDataTLen(pData); + pData += len; + *pOffset = pColSizes[1]; + pOffset += 1; + pColSizes[1] += len; + } + + // Length + pData += BitmapLen(numOfRows); + for (int32_t i = 0; i < numOfRows; ++i) { + *(int32_t*)pData = pMeta->schema[i].bytes; + pData += sizeof(int32_t); + } + pColSizes[2] = sizeof(int32_t) * numOfRows; + + // Note + pOffset = (int32_t*)pData; + pData += numOfRows * sizeof(int32_t); + for (int32_t i = 0; i < numOfRows; ++i) { + STR_TO_VARSTR(pData, i >= pMeta->tableInfo.numOfColumns ? "TAG" : ""); + int16_t len = varDataTLen(pData); + pData += len; + *pOffset = pColSizes[3]; + pOffset += 1; + pColSizes[3] += len; + } + + for (int32_t i = 0; i < DESCRIBE_RESULT_COLS; ++i) { + pColSizes[i] = htonl(pColSizes[i]); + } +} + +static int32_t calcRspSize(const STableMeta* pMeta) { + int32_t numOfRows = TABLE_TOTAL_COL_NUM(pMeta); + return sizeof(SRetrieveTableRsp) + + (numOfRows * sizeof(int32_t) + numOfRows * DESCRIBE_RESULT_FIELD_LEN) + + (numOfRows * sizeof(int32_t) + numOfRows * DESCRIBE_RESULT_TYPE_LEN) + + (BitmapLen(numOfRows) + numOfRows * sizeof(int32_t)) + + (numOfRows * sizeof(int32_t) + numOfRows * DESCRIBE_RESULT_NOTE_LEN); +} + +static int32_t execDescribe(SNode* pStmt, SRetrieveTableRsp** pRsp) { + SDescribeStmt* pDesc = (SDescribeStmt*)pStmt; + *pRsp = taosMemoryCalloc(1, calcRspSize(pDesc->pMeta)); + if (NULL == *pRsp) { + return TSDB_CODE_OUT_OF_MEMORY; + } + (*pRsp)->useconds = 0; + (*pRsp)->completed = 1; + (*pRsp)->precision = 0; + (*pRsp)->compressed = 0; + (*pRsp)->compLen = 0; + (*pRsp)->numOfRows = htonl(TABLE_TOTAL_COL_NUM(pDesc->pMeta)); + buildRspData(pDesc->pMeta, (*pRsp)->data); + return TSDB_CODE_SUCCESS; +} + +static int32_t execResetQueryCache() { + // todo + return TSDB_CODE_SUCCESS; +} + +int32_t qExecCommand(SNode* pStmt, SRetrieveTableRsp** pRsp) { + switch (nodeType(pStmt)) { + case QUERY_NODE_DESCRIBE_STMT: + return execDescribe(pStmt, pRsp); + case QUERY_NODE_RESET_QUERY_CACHE_STMT: + return execResetQueryCache(); + default: + break; + } + return TSDB_CODE_FAILED; +} diff --git a/source/libs/command/test/CMakeLists.txt b/source/libs/command/test/CMakeLists.txt new file mode 100644 index 0000000000..6d2335d2e3 --- /dev/null +++ b/source/libs/command/test/CMakeLists.txt @@ -0,0 +1,18 @@ +MESSAGE(STATUS "build command unit test") + +# GoogleTest requires at least C++11 +SET(CMAKE_CXX_STANDARD 11) +AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST) + +ADD_EXECUTABLE(commandTest ${SOURCE_LIST}) + +TARGET_INCLUDE_DIRECTORIES( + commandTest + PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/command/" + PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/command/inc" +) + +TARGET_LINK_LIBRARIES( + commandTest + PUBLIC os util common nodes parser catalog transport gtest function qcom +) \ No newline at end of file diff --git a/source/libs/command/test/commandTest.cpp b/source/libs/command/test/commandTest.cpp new file mode 100644 index 0000000000..59118c501a --- /dev/null +++ b/source/libs/command/test/commandTest.cpp @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include + +int main(int argc, char* argv[]) { + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 89b4476899..799d07e5d9 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -136,6 +136,10 @@ SNodeptr nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SDropTopicStmt)); case QUERY_NODE_EXPLAIN_STMT: return makeNode(type, sizeof(SExplainStmt)); + case QUERY_NODE_DESCRIBE_STMT: + return makeNode(type, sizeof(SDescribeStmt)); + case QUERY_NODE_RESET_QUERY_CACHE_STMT: + return makeNode(type, sizeof(SNode)); case QUERY_NODE_SHOW_DATABASES_STMT: case QUERY_NODE_SHOW_TABLES_STMT: case QUERY_NODE_SHOW_STABLES_STMT: diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 029ae7e91f..9ad089f38e 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -163,6 +163,8 @@ SNode* createDefaultExplainOptions(SAstCreateContext* pCxt); SNode* setExplainVerbose(SAstCreateContext* pCxt, SNode* pOptions, const SToken* pVal); SNode* setExplainRatio(SAstCreateContext* pCxt, SNode* pOptions, const SToken* pVal); SNode* createExplainStmt(SAstCreateContext* pCxt, bool analyze, SNode* pOptions, SNode* pQuery); +SNode* createDescribeStmt(SAstCreateContext* pCxt, SNode* pRealTable); +SNode* createResetQueryCacheStmt(SAstCreateContext* pCxt); #ifdef __cplusplus } diff --git a/source/libs/parser/inc/parInt.h b/source/libs/parser/inc/parInt.h index af0d78717e..9bad3e9eb9 100644 --- a/source/libs/parser/inc/parInt.h +++ b/source/libs/parser/inc/parInt.h @@ -25,6 +25,7 @@ extern "C" { int32_t parseInsertSql(SParseContext* pContext, SQuery** pQuery); int32_t doParse(SParseContext* pParseCxt, SQuery** pQuery); int32_t doTranslate(SParseContext* pParseCxt, SQuery* pQuery); +int32_t extractResultSchema(const SNode* pRoot, int32_t* numOfCols, SSchema** pSchema); #ifdef __cplusplus } diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 5e2f8e4241..60c3e29913 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -339,7 +339,14 @@ cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) AS query_expression(C). cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) AS db_name(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, NULL, &C); } cmd ::= DROP TOPIC exists_opt(A) topic_name(B). { pCxt->pRootNode = createDropTopicStmt(pCxt, A, &B); } -/************************************************ select **************************************************************/ +/************************************************ desc/describe *******************************************************/ +cmd ::= DESC full_table_name(A). { pCxt->pRootNode = createDescribeStmt(pCxt, A); } +cmd ::= DESCRIBE full_table_name(A). { pCxt->pRootNode = createDescribeStmt(pCxt, A); } + +/************************************************ reset query cache ***************************************************/ +cmd ::= RESET QUERY CACHE. { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } + +/************************************************ explain *************************************************************/ cmd ::= EXPLAIN analyze_opt(A) explain_options(B) query_expression(C). { pCxt->pRootNode = createExplainStmt(pCxt, A, B, C); } %type analyze_opt { bool } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 8783872ad8..9206898383 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1343,3 +1343,18 @@ SNode* createExplainStmt(SAstCreateContext* pCxt, bool analyze, SNode* pOptions, pStmt->pQuery = pQuery; return (SNode*)pStmt; } + +SNode* createDescribeStmt(SAstCreateContext* pCxt, SNode* pRealTable) { + SDescribeStmt* pStmt = nodesMakeNode(QUERY_NODE_DESCRIBE_STMT); + CHECK_OUT_OF_MEM(pStmt); + strcpy(pStmt->dbName, ((SRealTableNode*)pRealTable)->table.dbName); + strcpy(pStmt->tableName, ((SRealTableNode*)pRealTable)->table.tableName); + nodesDestroyNode(pRealTable); + return (SNode*)pStmt; +} + +SNode* createResetQueryCacheStmt(SAstCreateContext* pCxt) { + SNode* pStmt = nodesMakeNode(QUERY_NODE_RESET_QUERY_CACHE_STMT); + CHECK_OUT_OF_MEM(pStmt); + return pStmt; +} diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 213b14ae5d..817db3592d 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -51,6 +51,7 @@ static SKeyword keywordTable[] = { {"DAYS", TK_DAYS}, {"DELAY", TK_DELAY}, {"DESC", TK_DESC}, + {"DESCRIBE", TK_DESCRIBE}, {"DISTINCT", TK_DISTINCT}, {"DNODE", TK_DNODE}, {"DNODES", TK_DNODES}, @@ -111,9 +112,11 @@ static SKeyword keywordTable[] = { {"QNODE", TK_QNODE}, {"QNODES", TK_QNODES}, {"QSTARTTS", TK_QSTARTTS}, + {"QUERY", TK_QUERY}, {"QUORUM", TK_QUORUM}, {"RATIO", TK_RATIO}, {"REPLICA", TK_REPLICA}, + {"RESET", TK_RESET}, {"RETENTIONS", TK_RETENTIONS}, {"ROLLUP", TK_ROLLUP}, {"ROWTS", TK_ROWTS}, @@ -186,7 +189,6 @@ static SKeyword keywordTable[] = { // {"SCORES", TK_SCORES}, // {"GRANTS", TK_GRANTS}, // {"DOT", TK_DOT}, - // {"DESCRIBE", TK_DESCRIBE}, // {"SYNCDB", TK_SYNCDB}, // {"LOCAL", TK_LOCAL}, // {"PPS", TK_PPS}, @@ -203,8 +205,6 @@ static SKeyword keywordTable[] = { // {"EVERY", TK_EVERY}, // {"VARIABLE", TK_VARIABLE}, // {"UPDATE", TK_UPDATE}, - // {"RESET", TK_RESET}, - // {"QUERY", TK_QUERY}, // {"ADD", TK_ADD}, // {"COLUMN", TK_COLUMN}, // {"TAG", TK_TAG}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index d453193d0f..65e248a2bc 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -1812,6 +1812,10 @@ static int32_t translateExplain(STranslateContext* pCxt, SExplainStmt* pStmt) { return translateQuery(pCxt, pStmt->pQuery); } +static int32_t translateDescribe(STranslateContext* pCxt, SDescribeStmt* pStmt) { + return getTableMeta(pCxt, pStmt->dbName, pStmt->tableName, &pStmt->pMeta); +} + static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) { int32_t code = TSDB_CODE_SUCCESS; switch (nodeType(pNode)) { @@ -1896,6 +1900,9 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) { case QUERY_NODE_EXPLAIN_STMT: code = translateExplain(pCxt, (SExplainStmt*)pNode); break; + case QUERY_NODE_DESCRIBE_STMT: + code = translateDescribe(pCxt, (SDescribeStmt*)pNode); + break; default: break; } @@ -1913,42 +1920,83 @@ static int32_t translateSubquery(STranslateContext* pCxt, SNode* pNode) { return code; } -int32_t qExtractResultSchema(const SNode* pRoot, int32_t* numOfCols, SSchema** pSchema) { - if (NULL == pRoot) { - return TSDB_CODE_SUCCESS; +static int32_t extractSelectResultSchema(const SSelectStmt* pSelect, int32_t* numOfCols, SSchema** pSchema) { + *numOfCols = LIST_LENGTH(pSelect->pProjectionList); + *pSchema = taosMemoryCalloc((*numOfCols), sizeof(SSchema)); + if (NULL == (*pSchema)) { + return TSDB_CODE_OUT_OF_MEMORY; } - if (QUERY_NODE_SELECT_STMT == nodeType(pRoot)) { - SSelectStmt* pSelect = (SSelectStmt*) pRoot; - *numOfCols = LIST_LENGTH(pSelect->pProjectionList); - *pSchema = taosMemoryCalloc((*numOfCols), sizeof(SSchema)); - if (NULL == (*pSchema)) { - return TSDB_CODE_OUT_OF_MEMORY; - } + SNode* pNode; + int32_t index = 0; + FOREACH(pNode, pSelect->pProjectionList) { + SExprNode* pExpr = (SExprNode*)pNode; + (*pSchema)[index].type = pExpr->resType.type; + (*pSchema)[index].bytes = pExpr->resType.bytes; + (*pSchema)[index].colId = index + 1; + strcpy((*pSchema)[index].name, pExpr->aliasName); + index +=1; + } - SNode* pNode; - int32_t index = 0; - FOREACH(pNode, pSelect->pProjectionList) { - SExprNode* pExpr = (SExprNode*)pNode; - (*pSchema)[index].type = pExpr->resType.type; - (*pSchema)[index].bytes = pExpr->resType.bytes; - (*pSchema)[index].colId = index + 1; - strcpy((*pSchema)[index].name, pExpr->aliasName); - index +=1; - } - } else if (QUERY_NODE_EXPLAIN_STMT == nodeType(pRoot)) { - *numOfCols = 1; - *pSchema = taosMemoryCalloc((*numOfCols), sizeof(SSchema)); - if (NULL == (*pSchema)) { - return TSDB_CODE_OUT_OF_MEMORY; - } - (*pSchema)[0].type = TSDB_DATA_TYPE_BINARY; - (*pSchema)[0].bytes = TSDB_EXPLAIN_RESULT_ROW_SIZE; + return TSDB_CODE_SUCCESS; +} + +static int32_t extractExplainResultSchema(int32_t* numOfCols, SSchema** pSchema) { + *numOfCols = 1; + *pSchema = taosMemoryCalloc((*numOfCols), sizeof(SSchema)); + if (NULL == (*pSchema)) { + return TSDB_CODE_OUT_OF_MEMORY; } + (*pSchema)[0].type = TSDB_DATA_TYPE_BINARY; + (*pSchema)[0].bytes = TSDB_EXPLAIN_RESULT_ROW_SIZE; + return TSDB_CODE_SUCCESS; +} + +static int32_t extractDescribeResultSchema(int32_t* numOfCols, SSchema** pSchema) { + *numOfCols = DESCRIBE_RESULT_COLS; + *pSchema = taosMemoryCalloc((*numOfCols), sizeof(SSchema)); + if (NULL == (*pSchema)) { + return TSDB_CODE_OUT_OF_MEMORY; + } + + (*pSchema)[0].type = TSDB_DATA_TYPE_BINARY; + (*pSchema)[0].bytes = DESCRIBE_RESULT_FIELD_LEN; + strcpy((*pSchema)[0].name, "Field"); + + (*pSchema)[1].type = TSDB_DATA_TYPE_BINARY; + (*pSchema)[1].bytes = DESCRIBE_RESULT_TYPE_LEN; + strcpy((*pSchema)[1].name, "Type"); + + (*pSchema)[2].type = TSDB_DATA_TYPE_INT; + (*pSchema)[2].bytes = tDataTypes[TSDB_DATA_TYPE_INT].bytes; + strcpy((*pSchema)[2].name, "Length"); + + (*pSchema)[3].type = TSDB_DATA_TYPE_BINARY; + (*pSchema)[3].bytes = DESCRIBE_RESULT_NOTE_LEN; + strcpy((*pSchema)[3].name, "Note"); return TSDB_CODE_SUCCESS; } +int32_t extractResultSchema(const SNode* pRoot, int32_t* numOfCols, SSchema** pSchema) { + if (NULL == pRoot) { + return TSDB_CODE_SUCCESS; + } + + switch (nodeType(pRoot)) { + case QUERY_NODE_SELECT_STMT: + return extractSelectResultSchema((SSelectStmt*)pRoot, numOfCols, pSchema); + case QUERY_NODE_EXPLAIN_STMT: + return extractExplainResultSchema(numOfCols, pSchema); + case QUERY_NODE_DESCRIBE_STMT: + return extractDescribeResultSchema(numOfCols, pSchema); + default: + break; + } + + return TSDB_CODE_FAILED; +} + static void destroyTranslateContext(STranslateContext* pCxt) { if (NULL != pCxt->pNsLevel) { size_t size = taosArrayGetSize(pCxt->pNsLevel); @@ -2530,25 +2578,30 @@ static int32_t setQuery(STranslateContext* pCxt, SQuery* pQuery) { case QUERY_NODE_SELECT_STMT: case QUERY_NODE_EXPLAIN_STMT: pQuery->haveResultSet = true; - pQuery->directRpc = false; pQuery->msgType = TDMT_VND_QUERY; - if (TSDB_CODE_SUCCESS != qExtractResultSchema(pQuery->pRoot, &pQuery->numOfResCols, &pQuery->pResSchema)) { - return TSDB_CODE_OUT_OF_MEMORY; - } break; case QUERY_NODE_VNODE_MODIF_STMT: - pQuery->haveResultSet = false; - pQuery->directRpc = false; pQuery->msgType = TDMT_VND_CREATE_TABLE; break; + case QUERY_NODE_DESCRIBE_STMT: + pQuery->localCmd = true; + pQuery->haveResultSet = true; + break; + case QUERY_NODE_RESET_QUERY_CACHE_STMT: + pQuery->localCmd = true; + break; default: - pQuery->haveResultSet = false; pQuery->directRpc = true; - pQuery->pCmdMsg = pCxt->pCmdMsg; - pCxt->pCmdMsg = NULL; + TSWAP(pQuery->pCmdMsg, pCxt->pCmdMsg, SCmdMsgInfo*); pQuery->msgType = pQuery->pCmdMsg->msgType; break; } + + if (pQuery->haveResultSet) { + if (TSDB_CODE_SUCCESS != extractResultSchema(pQuery->pRoot, &pQuery->numOfResCols, &pQuery->pResSchema)) { + return TSDB_CODE_OUT_OF_MEMORY; + } + } if (NULL != pCxt->pDbs) { pQuery->pDbList = taosArrayInit(taosHashGetSize(pCxt->pDbs), TSDB_DB_FNAME_LEN); diff --git a/source/libs/parser/src/parser.c b/source/libs/parser/src/parser.c index d9bff4b9ef..d410aa2e17 100644 --- a/source/libs/parser/src/parser.c +++ b/source/libs/parser/src/parser.c @@ -62,3 +62,7 @@ void qDestroyQuery(SQuery* pQueryNode) { taosArrayDestroy(pQueryNode->pTableList); taosMemoryFreeClear(pQueryNode); } + +int32_t qExtractResultSchema(const SNode* pRoot, int32_t* numOfCols, SSchema** pSchema) { + return extractResultSchema(pRoot, numOfCols, pSchema); +} \ No newline at end of file diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 154b87ba4b..fc6a582da5 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -100,24 +100,24 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 274 +#define YYNOCODE 277 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SAlterOption yy29; - SNodeList* yy40; - ENullOrder yy177; - EOrder yy210; - EOperatorType yy328; - SNode* yy364; - EJoinType yy392; - SDataType yy420; - SToken yy437; - int32_t yy460; - EFillMode yy478; - bool yy493; + EFillMode yy6; + EJoinType yy10; + SNode* yy46; + SToken yy95; + SAlterOption yy145; + bool yy151; + SNodeList* yy194; + int32_t yy202; + ENullOrder yy273; + EOperatorType yy292; + SDataType yy400; + EOrder yy456; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -132,17 +132,17 @@ typedef union { #define ParseCTX_PARAM #define ParseCTX_FETCH #define ParseCTX_STORE -#define YYNSTATE 438 -#define YYNRULE 354 -#define YYNTOKEN 176 -#define YY_MAX_SHIFT 437 -#define YY_MIN_SHIFTREDUCE 684 -#define YY_MAX_SHIFTREDUCE 1037 -#define YY_ERROR_ACTION 1038 -#define YY_ACCEPT_ACTION 1039 -#define YY_NO_ACTION 1040 -#define YY_MIN_REDUCE 1041 -#define YY_MAX_REDUCE 1394 +#define YYNSTATE 445 +#define YYNRULE 357 +#define YYNTOKEN 179 +#define YY_MAX_SHIFT 444 +#define YY_MIN_SHIFTREDUCE 691 +#define YY_MAX_SHIFTREDUCE 1047 +#define YY_ERROR_ACTION 1048 +#define YY_ACCEPT_ACTION 1049 +#define YY_NO_ACTION 1050 +#define YY_MIN_REDUCE 1051 +#define YY_MAX_REDUCE 1407 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -209,408 +209,422 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (1305) +#define YY_ACTTAB_COUNT (1352) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1251, 337, 24, 172, 356, 356, 256, 241, 1247, 1254, - /* 10 */ 1220, 1221, 31, 29, 27, 26, 25, 1264, 369, 369, - /* 20 */ 9, 8, 93, 67, 67, 31, 29, 27, 26, 25, - /* 30 */ 286, 292, 337, 1373, 106, 60, 1053, 1280, 369, 1144, - /* 40 */ 1144, 341, 1135, 276, 353, 94, 118, 215, 1084, 249, - /* 50 */ 1371, 91, 1136, 93, 355, 979, 1211, 1213, 1238, 1144, - /* 60 */ 215, 165, 1319, 336, 110, 335, 1087, 44, 1373, 913, - /* 70 */ 63, 1265, 1266, 1269, 1312, 1184, 90, 943, 231, 1308, - /* 80 */ 1385, 118, 91, 1238, 1139, 1371, 107, 1111, 956, 1346, - /* 90 */ 943, 339, 114, 1319, 1320, 257, 1324, 422, 421, 420, - /* 100 */ 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, - /* 110 */ 409, 408, 407, 406, 405, 298, 944, 293, 105, 242, - /* 120 */ 297, 213, 898, 296, 368, 294, 1147, 105, 295, 944, - /* 130 */ 31, 29, 27, 26, 25, 1146, 368, 1122, 23, 236, - /* 140 */ 938, 939, 940, 941, 942, 946, 947, 948, 27, 26, - /* 150 */ 25, 23, 236, 938, 939, 940, 941, 942, 946, 947, - /* 160 */ 948, 793, 392, 391, 390, 797, 389, 799, 800, 388, - /* 170 */ 802, 385, 1264, 808, 382, 810, 811, 379, 376, 229, - /* 180 */ 30, 28, 337, 277, 12, 30, 28, 980, 238, 277, - /* 190 */ 878, 246, 1280, 238, 1264, 878, 1251, 310, 255, 353, - /* 200 */ 254, 1191, 978, 93, 1247, 1253, 876, 228, 1251, 355, - /* 210 */ 308, 876, 1189, 1238, 1280, 11, 1247, 1253, 341, 369, - /* 220 */ 11, 340, 248, 119, 1141, 62, 1265, 1266, 1269, 1312, - /* 230 */ 105, 355, 91, 214, 1308, 1238, 1, 265, 1146, 1120, - /* 240 */ 1144, 1, 115, 1319, 1320, 1373, 1324, 63, 1265, 1266, - /* 250 */ 1269, 1312, 119, 1191, 720, 231, 1308, 113, 118, 243, - /* 260 */ 434, 6, 1371, 902, 1189, 434, 119, 430, 429, 168, - /* 270 */ 284, 312, 877, 1280, 1280, 319, 1339, 877, 30, 28, - /* 280 */ 353, 353, 124, 123, 222, 404, 238, 1264, 878, 1033, - /* 290 */ 1034, 326, 1331, 975, 879, 53, 882, 883, 204, 879, - /* 300 */ 926, 882, 883, 204, 876, 926, 290, 1280, 327, 330, - /* 310 */ 289, 313, 1137, 11, 340, 721, 1373, 720, 119, 1264, - /* 320 */ 223, 1191, 221, 220, 355, 288, 332, 328, 1238, 1372, - /* 330 */ 1064, 291, 1212, 1371, 1, 722, 119, 368, 1373, 1280, - /* 340 */ 63, 1265, 1266, 1269, 1312, 404, 353, 369, 231, 1308, - /* 350 */ 113, 118, 366, 30, 28, 1371, 355, 369, 434, 900, - /* 360 */ 1238, 238, 367, 878, 395, 167, 1264, 975, 1144, 1340, - /* 370 */ 877, 1238, 63, 1265, 1266, 1269, 1312, 1191, 1144, 876, - /* 380 */ 231, 1308, 1385, 250, 1063, 12, 1280, 192, 1189, 331, - /* 390 */ 1174, 1369, 879, 353, 882, 883, 204, 337, 926, 139, - /* 400 */ 251, 1062, 137, 355, 30, 28, 354, 1238, 105, 7, - /* 410 */ 369, 303, 238, 348, 878, 186, 1146, 44, 93, 63, - /* 420 */ 1265, 1266, 1269, 1312, 1061, 1238, 311, 231, 1308, 1385, - /* 430 */ 876, 1144, 945, 434, 1140, 987, 30, 28, 1330, 345, - /* 440 */ 147, 900, 1238, 306, 238, 877, 878, 91, 300, 1060, - /* 450 */ 1326, 146, 1264, 1059, 21, 1191, 901, 116, 1319, 1320, - /* 460 */ 7, 1324, 876, 949, 899, 1238, 1190, 879, 1323, 882, - /* 470 */ 883, 204, 1280, 926, 41, 30, 28, 40, 1004, 353, - /* 480 */ 1121, 1326, 369, 238, 434, 878, 1058, 252, 1208, 355, - /* 490 */ 1238, 119, 7, 1238, 1238, 122, 877, 1039, 341, 1322, - /* 500 */ 344, 876, 349, 1144, 1057, 205, 1265, 1266, 1269, 323, - /* 510 */ 1002, 1003, 1005, 1006, 1326, 290, 434, 1056, 879, 289, - /* 520 */ 882, 883, 204, 1055, 926, 1373, 346, 1238, 877, 898, - /* 530 */ 1052, 1, 1321, 9, 8, 903, 258, 401, 118, 270, - /* 540 */ 291, 400, 1371, 1264, 141, 1238, 253, 140, 271, 1133, - /* 550 */ 879, 352, 882, 883, 204, 434, 926, 143, 1238, 886, - /* 560 */ 142, 1051, 402, 1280, 1238, 20, 1050, 877, 1049, 1112, - /* 570 */ 353, 1238, 1129, 1373, 1264, 31, 29, 27, 26, 25, - /* 580 */ 355, 399, 398, 397, 1238, 396, 118, 1036, 1037, 879, - /* 590 */ 1371, 882, 883, 204, 1280, 926, 64, 1265, 1266, 1269, - /* 600 */ 1312, 353, 1238, 145, 1311, 1308, 144, 1238, 1131, 1238, - /* 610 */ 1048, 355, 1047, 1264, 315, 1238, 269, 1046, 1264, 264, - /* 620 */ 263, 262, 261, 260, 1045, 889, 99, 64, 1265, 1266, - /* 630 */ 1269, 1312, 935, 1280, 1001, 351, 1308, 153, 1280, 298, - /* 640 */ 353, 293, 1080, 1127, 297, 353, 42, 296, 1075, 294, - /* 650 */ 355, 1238, 295, 1238, 1238, 355, 1264, 1119, 1238, 1238, - /* 660 */ 1042, 885, 1044, 343, 299, 1238, 108, 1265, 1266, 1269, - /* 670 */ 301, 64, 1265, 1266, 1269, 1312, 1280, 169, 394, 1054, - /* 680 */ 1309, 78, 158, 353, 77, 76, 75, 74, 73, 72, - /* 690 */ 71, 70, 69, 355, 156, 324, 1264, 1238, 1073, 878, - /* 700 */ 237, 1264, 1185, 1238, 342, 1386, 162, 950, 283, 209, - /* 710 */ 1265, 1266, 1269, 1258, 401, 876, 1280, 1342, 400, 32, - /* 720 */ 304, 1280, 910, 353, 865, 1256, 338, 888, 353, 1281, - /* 730 */ 171, 871, 177, 355, 32, 361, 32, 1238, 355, 402, - /* 740 */ 320, 183, 1238, 1264, 175, 2, 190, 96, 898, 209, - /* 750 */ 1265, 1266, 1269, 97, 208, 1265, 1266, 1269, 399, 398, - /* 760 */ 397, 1210, 396, 1280, 121, 22, 259, 267, 266, 434, - /* 770 */ 353, 786, 268, 1264, 272, 31, 29, 27, 26, 25, - /* 780 */ 355, 877, 781, 99, 1238, 906, 333, 126, 31, 29, - /* 790 */ 27, 26, 25, 1280, 42, 1264, 108, 1265, 1266, 1269, - /* 800 */ 353, 273, 274, 879, 814, 882, 883, 818, 905, 824, - /* 810 */ 355, 823, 100, 129, 1238, 1280, 374, 235, 275, 97, - /* 820 */ 437, 98, 353, 99, 97, 278, 209, 1265, 1266, 1269, - /* 830 */ 43, 132, 355, 904, 189, 1387, 1238, 89, 287, 239, - /* 840 */ 285, 314, 227, 426, 317, 188, 59, 88, 209, 1265, - /* 850 */ 1266, 1269, 1041, 1134, 78, 136, 55, 77, 76, 75, - /* 860 */ 74, 73, 72, 71, 70, 69, 1130, 138, 61, 101, - /* 870 */ 1264, 184, 102, 1132, 1128, 103, 87, 86, 85, 84, - /* 880 */ 83, 82, 81, 80, 79, 104, 316, 148, 151, 925, - /* 890 */ 1280, 927, 928, 929, 930, 931, 903, 353, 1353, 325, - /* 900 */ 197, 1264, 365, 359, 154, 199, 883, 355, 322, 1343, - /* 910 */ 157, 1238, 1352, 230, 329, 5, 161, 198, 334, 318, - /* 920 */ 321, 1280, 149, 207, 1265, 1266, 1269, 125, 353, 975, - /* 930 */ 1333, 1264, 31, 29, 27, 26, 25, 111, 355, 4, - /* 940 */ 163, 902, 1238, 92, 1327, 33, 232, 17, 164, 347, - /* 950 */ 350, 1280, 1388, 1264, 210, 1265, 1266, 1269, 353, 1294, - /* 960 */ 1370, 362, 170, 179, 191, 1219, 1218, 357, 355, 358, - /* 970 */ 364, 240, 1238, 1280, 363, 1264, 181, 52, 1145, 54, - /* 980 */ 353, 372, 193, 187, 202, 1265, 1266, 1269, 65, 913, - /* 990 */ 355, 433, 195, 39, 1238, 1280, 200, 1264, 201, 196, - /* 1000 */ 1232, 874, 353, 873, 1226, 120, 211, 1265, 1266, 1269, - /* 1010 */ 848, 1203, 355, 1202, 95, 1201, 1238, 1280, 1200, 1264, - /* 1020 */ 1199, 1198, 1197, 1196, 353, 850, 1195, 1194, 203, 1265, - /* 1030 */ 1266, 1269, 119, 1193, 355, 1192, 1086, 1225, 1238, 1280, - /* 1040 */ 1216, 1264, 128, 1123, 733, 1085, 353, 1083, 279, 281, - /* 1050 */ 212, 1265, 1266, 1269, 1072, 280, 355, 1071, 1068, 1125, - /* 1060 */ 1238, 1280, 68, 1264, 135, 1124, 831, 830, 353, 761, - /* 1070 */ 829, 1081, 1277, 1265, 1266, 1269, 760, 759, 355, 758, - /* 1080 */ 757, 1076, 1238, 1280, 756, 224, 225, 1264, 302, 1074, - /* 1090 */ 353, 226, 1067, 305, 1276, 1265, 1266, 1269, 307, 1066, - /* 1100 */ 355, 309, 66, 1224, 1238, 1223, 36, 1280, 152, 150, - /* 1110 */ 14, 1264, 1215, 3, 353, 32, 1275, 1265, 1266, 1269, - /* 1120 */ 245, 244, 155, 15, 355, 37, 34, 10, 1238, 46, - /* 1130 */ 891, 1280, 160, 1264, 49, 1022, 1000, 994, 353, 993, - /* 1140 */ 218, 1265, 1266, 1269, 972, 109, 884, 1021, 355, 233, - /* 1150 */ 8, 159, 1238, 1280, 47, 1264, 48, 1026, 1256, 971, - /* 1160 */ 353, 19, 1025, 1027, 217, 1265, 1266, 1269, 35, 234, - /* 1170 */ 355, 166, 13, 117, 1238, 1280, 16, 1264, 936, 911, - /* 1180 */ 173, 18, 353, 174, 998, 176, 219, 1265, 1266, 1269, - /* 1190 */ 178, 50, 355, 360, 1214, 180, 1238, 1280, 55, 893, - /* 1200 */ 370, 182, 51, 38, 353, 1255, 185, 371, 216, 1265, - /* 1210 */ 1266, 1269, 887, 815, 355, 375, 134, 373, 1238, 112, - /* 1220 */ 247, 807, 812, 377, 378, 282, 809, 133, 380, 381, - /* 1230 */ 206, 1265, 1266, 1269, 892, 803, 895, 883, 383, 384, - /* 1240 */ 386, 801, 387, 806, 805, 804, 792, 393, 56, 826, - /* 1250 */ 45, 822, 57, 131, 58, 821, 820, 731, 825, 403, - /* 1260 */ 753, 752, 745, 751, 750, 749, 748, 747, 746, 744, - /* 1270 */ 743, 742, 1082, 741, 740, 739, 1070, 738, 1069, 737, - /* 1280 */ 736, 423, 424, 427, 428, 1065, 431, 425, 432, 1040, - /* 1290 */ 880, 194, 435, 436, 1040, 1040, 1040, 1040, 1040, 1040, - /* 1300 */ 130, 1040, 1040, 1040, 127, + /* 0 */ 1264, 344, 24, 174, 363, 363, 258, 243, 1260, 1267, + /* 10 */ 1230, 1231, 31, 29, 27, 26, 25, 1277, 376, 376, + /* 20 */ 9, 8, 95, 69, 69, 31, 29, 27, 26, 25, + /* 30 */ 293, 299, 344, 1386, 108, 62, 1063, 1293, 376, 1154, + /* 40 */ 1154, 348, 1145, 262, 360, 96, 120, 217, 1094, 251, + /* 50 */ 1384, 93, 1146, 95, 362, 375, 1221, 1223, 1251, 1154, + /* 60 */ 217, 167, 1332, 343, 112, 342, 1097, 46, 1386, 923, + /* 70 */ 65, 1278, 1279, 1282, 1325, 1194, 92, 953, 233, 1321, + /* 80 */ 1398, 120, 93, 1251, 1149, 1384, 109, 1121, 966, 1359, + /* 90 */ 953, 346, 116, 1332, 1333, 272, 1337, 429, 428, 427, + /* 100 */ 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, + /* 110 */ 416, 415, 414, 413, 412, 305, 954, 300, 375, 1293, + /* 120 */ 304, 1132, 908, 303, 1049, 301, 360, 80, 302, 954, + /* 130 */ 79, 78, 77, 76, 75, 74, 73, 72, 71, 317, + /* 140 */ 126, 125, 23, 238, 948, 949, 950, 951, 952, 956, + /* 150 */ 957, 958, 315, 375, 334, 23, 238, 948, 949, 950, + /* 160 */ 951, 952, 956, 957, 958, 1277, 12, 284, 31, 29, + /* 170 */ 27, 26, 25, 255, 800, 399, 398, 397, 804, 396, + /* 180 */ 806, 807, 395, 809, 392, 1293, 815, 389, 817, 818, + /* 190 */ 386, 383, 360, 31, 29, 27, 26, 25, 231, 1201, + /* 200 */ 1386, 12, 362, 1074, 30, 28, 1251, 257, 1277, 256, + /* 210 */ 1222, 348, 240, 120, 888, 1264, 1386, 1384, 64, 1278, + /* 220 */ 1279, 1282, 1325, 1260, 1266, 923, 216, 1321, 1293, 1385, + /* 230 */ 886, 46, 121, 1384, 912, 347, 333, 376, 1386, 11, + /* 240 */ 247, 246, 263, 297, 1251, 362, 1218, 296, 1150, 1251, + /* 250 */ 901, 120, 121, 124, 1277, 1384, 121, 1073, 1154, 284, + /* 260 */ 1, 65, 1278, 1279, 1282, 1325, 894, 376, 298, 233, + /* 270 */ 1321, 115, 283, 264, 1293, 339, 335, 30, 28, 990, + /* 280 */ 248, 360, 910, 170, 441, 240, 6, 888, 1154, 326, + /* 290 */ 1352, 362, 30, 28, 1293, 1251, 887, 1264, 1251, 215, + /* 300 */ 240, 360, 888, 886, 1044, 1260, 1266, 66, 1278, 1279, + /* 310 */ 1282, 1325, 11, 1052, 1072, 1324, 1321, 1339, 886, 1014, + /* 320 */ 377, 913, 889, 319, 892, 893, 206, 11, 936, 337, + /* 330 */ 437, 436, 897, 1, 80, 1336, 169, 79, 78, 77, + /* 340 */ 76, 75, 74, 73, 72, 71, 121, 1130, 1, 1051, + /* 350 */ 330, 1012, 1013, 1015, 1016, 1251, 1043, 441, 902, 1071, + /* 360 */ 905, 893, 376, 320, 1070, 1277, 376, 1151, 989, 887, + /* 370 */ 1271, 373, 441, 89, 88, 87, 86, 85, 84, 83, + /* 380 */ 82, 81, 1269, 1154, 887, 1293, 107, 1154, 1277, 338, + /* 390 */ 1386, 1069, 347, 411, 1157, 889, 985, 892, 893, 206, + /* 400 */ 1251, 936, 362, 120, 351, 1251, 1251, 1384, 1293, 121, + /* 410 */ 889, 1277, 892, 893, 206, 360, 936, 727, 65, 1278, + /* 420 */ 1279, 1282, 1325, 155, 1201, 362, 233, 1321, 115, 1251, + /* 430 */ 230, 1293, 1251, 291, 344, 1199, 1339, 728, 360, 727, + /* 440 */ 1068, 65, 1278, 1279, 1282, 1325, 55, 1353, 362, 233, + /* 450 */ 1321, 1398, 1251, 355, 1335, 95, 955, 729, 1067, 1339, + /* 460 */ 1382, 30, 28, 1147, 65, 1278, 1279, 1282, 1325, 240, + /* 470 */ 1277, 888, 233, 1321, 1398, 1131, 911, 1334, 30, 28, + /* 480 */ 361, 1251, 21, 1343, 93, 411, 240, 886, 888, 909, + /* 490 */ 1293, 959, 30, 28, 117, 1332, 1333, 360, 1337, 1251, + /* 500 */ 240, 1066, 888, 194, 886, 244, 1184, 362, 1065, 376, + /* 510 */ 1062, 1251, 141, 107, 374, 139, 348, 7, 886, 988, + /* 520 */ 1061, 1156, 402, 207, 1278, 1279, 1282, 322, 224, 1201, + /* 530 */ 1154, 1064, 408, 1060, 7, 245, 407, 30, 28, 101, + /* 540 */ 1199, 441, 1251, 1386, 1201, 240, 356, 888, 7, 1251, + /* 550 */ 297, 1251, 61, 887, 296, 1200, 120, 409, 441, 997, + /* 560 */ 1384, 1251, 57, 886, 225, 910, 223, 222, 1277, 295, + /* 570 */ 887, 350, 441, 1143, 1251, 298, 406, 405, 404, 889, + /* 580 */ 403, 892, 893, 206, 887, 936, 1139, 376, 1293, 1344, + /* 590 */ 985, 1277, 188, 1, 359, 360, 889, 1141, 892, 893, + /* 600 */ 206, 143, 936, 121, 142, 362, 9, 8, 1154, 1251, + /* 610 */ 889, 1293, 892, 893, 206, 376, 936, 441, 360, 250, + /* 620 */ 254, 66, 1278, 1279, 1282, 1325, 1137, 107, 362, 887, + /* 630 */ 1322, 1201, 1251, 199, 1059, 1156, 1154, 252, 201, 27, + /* 640 */ 26, 25, 1199, 1277, 66, 1278, 1279, 1282, 1325, 1277, + /* 650 */ 200, 344, 358, 1321, 1277, 889, 896, 892, 893, 206, + /* 660 */ 127, 936, 935, 1293, 937, 938, 939, 940, 941, 1293, + /* 670 */ 360, 1011, 95, 1058, 1293, 1251, 360, 1057, 1056, 945, + /* 680 */ 362, 360, 1055, 42, 1251, 145, 362, 1054, 144, 147, + /* 690 */ 1251, 362, 146, 239, 1122, 1251, 110, 1278, 1279, 1282, + /* 700 */ 1277, 93, 211, 1278, 1279, 1282, 1277, 110, 1278, 1279, + /* 710 */ 1282, 118, 1332, 1333, 1251, 1337, 253, 352, 1251, 1251, + /* 720 */ 1293, 67, 899, 1251, 107, 171, 1293, 360, 1251, 1090, + /* 730 */ 1277, 401, 1156, 360, 349, 1399, 888, 362, 44, 43, + /* 740 */ 261, 1251, 122, 362, 327, 331, 1400, 1251, 1046, 1047, + /* 750 */ 1293, 306, 886, 211, 1278, 1279, 1282, 360, 1085, 210, + /* 760 */ 1278, 1279, 1282, 908, 1195, 160, 960, 362, 1277, 121, + /* 770 */ 265, 1251, 1083, 277, 237, 895, 164, 158, 32, 444, + /* 780 */ 308, 290, 278, 211, 1278, 1279, 1282, 20, 1293, 1355, + /* 790 */ 345, 340, 1294, 191, 311, 360, 91, 31, 29, 27, + /* 800 */ 26, 25, 433, 22, 190, 362, 441, 920, 353, 1251, + /* 810 */ 173, 1277, 241, 31, 29, 27, 26, 25, 887, 32, + /* 820 */ 872, 211, 1278, 1279, 1282, 179, 2, 63, 368, 881, + /* 830 */ 186, 1293, 32, 185, 908, 192, 1220, 177, 360, 793, + /* 840 */ 98, 898, 1277, 123, 889, 99, 892, 893, 362, 266, + /* 850 */ 276, 101, 1251, 271, 270, 269, 268, 267, 788, 273, + /* 860 */ 274, 372, 1293, 821, 209, 1278, 1279, 1282, 825, 360, + /* 870 */ 42, 275, 831, 1277, 279, 381, 916, 280, 325, 362, + /* 880 */ 99, 151, 1277, 1251, 100, 128, 31, 29, 27, 26, + /* 890 */ 25, 830, 281, 1293, 102, 212, 1278, 1279, 1282, 915, + /* 900 */ 360, 282, 1293, 101, 1277, 131, 99, 45, 285, 360, + /* 910 */ 362, 134, 914, 1277, 1251, 294, 292, 229, 1144, 362, + /* 920 */ 138, 1140, 90, 1251, 1293, 140, 204, 1278, 1279, 1282, + /* 930 */ 321, 360, 103, 1293, 1129, 213, 1278, 1279, 1282, 150, + /* 940 */ 360, 362, 104, 1277, 1142, 1251, 324, 1138, 105, 106, + /* 950 */ 362, 1277, 153, 913, 1251, 332, 366, 205, 1278, 1279, + /* 960 */ 1282, 1356, 323, 1293, 1366, 156, 214, 1278, 1279, 1282, + /* 970 */ 360, 1293, 329, 893, 1277, 1365, 5, 305, 360, 300, + /* 980 */ 362, 159, 304, 341, 1251, 303, 232, 301, 362, 336, + /* 990 */ 302, 408, 1251, 328, 1293, 407, 1290, 1278, 1279, 1282, + /* 1000 */ 163, 360, 4, 985, 1289, 1278, 1279, 1282, 912, 113, + /* 1010 */ 1346, 362, 165, 1277, 94, 1251, 409, 1340, 33, 166, + /* 1020 */ 234, 1277, 357, 354, 17, 1307, 1229, 1288, 1278, 1279, + /* 1030 */ 1282, 1401, 172, 1293, 364, 406, 405, 404, 1383, 403, + /* 1040 */ 360, 1293, 365, 242, 1277, 1228, 369, 370, 360, 371, + /* 1050 */ 362, 181, 1277, 183, 1251, 310, 193, 1155, 362, 54, + /* 1060 */ 56, 195, 1251, 189, 1293, 379, 220, 1278, 1279, 1282, + /* 1070 */ 318, 360, 1293, 440, 219, 1278, 1279, 1282, 202, 360, + /* 1080 */ 203, 362, 197, 1277, 149, 1251, 198, 313, 1245, 362, + /* 1090 */ 884, 39, 307, 1251, 883, 148, 1239, 221, 1278, 1279, + /* 1100 */ 1282, 1238, 259, 1293, 260, 218, 1278, 1279, 1282, 1237, + /* 1110 */ 360, 1236, 855, 1213, 1212, 97, 1211, 1210, 41, 136, + /* 1120 */ 362, 40, 114, 1209, 1251, 1208, 1207, 1206, 289, 857, + /* 1130 */ 135, 1205, 1204, 1203, 1202, 1096, 208, 1278, 1279, 1282, + /* 1140 */ 1235, 1226, 130, 1133, 1095, 740, 1093, 288, 286, 1082, + /* 1150 */ 1081, 287, 1078, 47, 1135, 70, 133, 137, 838, 837, + /* 1160 */ 836, 1134, 768, 1091, 226, 1086, 767, 766, 765, 227, + /* 1170 */ 1084, 1077, 1076, 228, 764, 763, 68, 314, 309, 316, + /* 1180 */ 1234, 1233, 36, 312, 1225, 154, 48, 3, 14, 32, + /* 1190 */ 111, 152, 15, 37, 34, 10, 51, 8, 946, 367, + /* 1200 */ 162, 184, 832, 132, 1224, 1050, 1050, 129, 1050, 1050, + /* 1210 */ 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1032, 1050, 1050, + /* 1220 */ 1031, 235, 157, 1036, 1035, 236, 1050, 1010, 161, 1050, + /* 1230 */ 903, 1004, 49, 182, 1050, 1003, 50, 1050, 982, 1269, + /* 1240 */ 1050, 829, 981, 1050, 1050, 1037, 1050, 1050, 19, 1050, + /* 1250 */ 1050, 1050, 1050, 1050, 168, 1050, 35, 119, 921, 16, + /* 1260 */ 176, 13, 18, 380, 249, 1008, 178, 180, 175, 52, + /* 1270 */ 53, 384, 387, 1050, 1050, 57, 1092, 390, 1050, 1050, + /* 1280 */ 1268, 393, 799, 1050, 1050, 187, 38, 1050, 827, 760, + /* 1290 */ 738, 822, 382, 752, 438, 1050, 1050, 819, 816, 385, + /* 1300 */ 378, 810, 833, 828, 388, 391, 759, 758, 757, 808, + /* 1310 */ 410, 756, 1080, 1079, 394, 430, 755, 814, 1075, 754, + /* 1320 */ 753, 751, 439, 442, 750, 749, 435, 58, 748, 59, + /* 1330 */ 60, 747, 746, 890, 432, 443, 745, 744, 743, 431, + /* 1340 */ 400, 196, 434, 813, 1050, 1050, 1050, 1050, 1050, 812, + /* 1350 */ 1050, 811, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 220, 185, 237, 238, 216, 216, 225, 219, 228, 229, - /* 10 */ 222, 222, 12, 13, 14, 15, 16, 179, 185, 185, - /* 20 */ 1, 2, 206, 190, 190, 12, 13, 14, 15, 16, - /* 30 */ 197, 197, 185, 252, 178, 184, 180, 199, 185, 206, - /* 40 */ 206, 225, 179, 190, 206, 194, 265, 47, 0, 208, - /* 50 */ 269, 235, 201, 206, 216, 4, 215, 216, 220, 206, - /* 60 */ 47, 245, 246, 247, 198, 249, 0, 187, 252, 69, - /* 70 */ 232, 233, 234, 235, 236, 209, 196, 77, 240, 241, - /* 80 */ 242, 265, 235, 220, 204, 269, 188, 189, 69, 251, - /* 90 */ 77, 244, 245, 246, 247, 185, 249, 49, 50, 51, + /* 0 */ 223, 188, 240, 241, 219, 219, 228, 222, 231, 232, + /* 10 */ 225, 225, 12, 13, 14, 15, 16, 182, 188, 188, + /* 20 */ 1, 2, 209, 193, 193, 12, 13, 14, 15, 16, + /* 30 */ 200, 200, 188, 255, 181, 187, 183, 202, 188, 209, + /* 40 */ 209, 228, 182, 193, 209, 197, 268, 47, 0, 211, + /* 50 */ 272, 238, 204, 209, 219, 20, 218, 219, 223, 209, + /* 60 */ 47, 248, 249, 250, 201, 252, 0, 190, 255, 69, + /* 70 */ 235, 236, 237, 238, 239, 212, 199, 77, 243, 244, + /* 80 */ 245, 268, 238, 223, 207, 272, 191, 192, 69, 254, + /* 90 */ 77, 247, 248, 249, 250, 63, 252, 49, 50, 51, /* 100 */ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - /* 110 */ 62, 63, 64, 65, 66, 49, 116, 51, 199, 191, - /* 120 */ 54, 211, 20, 57, 20, 59, 207, 199, 62, 116, - /* 130 */ 12, 13, 14, 15, 16, 207, 20, 0, 138, 139, - /* 140 */ 140, 141, 142, 143, 144, 145, 146, 147, 14, 15, - /* 150 */ 16, 138, 139, 140, 141, 142, 143, 144, 145, 146, - /* 160 */ 147, 83, 84, 85, 86, 87, 88, 89, 90, 91, - /* 170 */ 92, 93, 179, 95, 96, 97, 98, 99, 100, 203, - /* 180 */ 12, 13, 185, 46, 68, 12, 13, 14, 20, 46, - /* 190 */ 22, 203, 199, 20, 179, 22, 220, 21, 125, 206, - /* 200 */ 127, 199, 151, 206, 228, 229, 38, 205, 220, 216, - /* 210 */ 34, 38, 210, 220, 199, 47, 228, 229, 225, 185, - /* 220 */ 47, 206, 191, 150, 190, 232, 233, 234, 235, 236, - /* 230 */ 199, 216, 235, 240, 241, 220, 68, 63, 207, 0, - /* 240 */ 206, 68, 245, 246, 247, 252, 249, 232, 233, 234, - /* 250 */ 235, 236, 150, 199, 22, 240, 241, 242, 265, 205, - /* 260 */ 92, 43, 269, 20, 210, 92, 150, 182, 183, 254, - /* 270 */ 38, 185, 104, 199, 199, 260, 261, 104, 12, 13, - /* 280 */ 206, 206, 108, 109, 35, 46, 20, 179, 22, 171, - /* 290 */ 172, 120, 148, 149, 126, 184, 128, 129, 130, 126, - /* 300 */ 132, 128, 129, 130, 38, 132, 57, 199, 234, 234, - /* 310 */ 61, 225, 201, 47, 206, 20, 252, 22, 150, 179, - /* 320 */ 71, 199, 73, 74, 216, 76, 155, 156, 220, 265, - /* 330 */ 179, 82, 210, 269, 68, 40, 150, 20, 252, 199, - /* 340 */ 232, 233, 234, 235, 236, 46, 206, 185, 240, 241, - /* 350 */ 242, 265, 190, 12, 13, 269, 216, 185, 92, 20, - /* 360 */ 220, 20, 190, 22, 79, 122, 179, 149, 206, 261, - /* 370 */ 104, 220, 232, 233, 234, 235, 236, 199, 206, 38, - /* 380 */ 240, 241, 242, 205, 179, 68, 199, 192, 210, 20, - /* 390 */ 195, 251, 126, 206, 128, 129, 130, 185, 132, 72, - /* 400 */ 191, 179, 75, 216, 12, 13, 14, 220, 199, 68, - /* 410 */ 185, 4, 20, 81, 22, 190, 207, 187, 206, 232, - /* 420 */ 233, 234, 235, 236, 179, 220, 19, 240, 241, 242, - /* 430 */ 38, 206, 116, 92, 204, 14, 12, 13, 251, 81, - /* 440 */ 33, 20, 220, 36, 20, 104, 22, 235, 41, 179, - /* 450 */ 230, 44, 179, 179, 138, 199, 20, 245, 246, 247, - /* 460 */ 68, 249, 38, 147, 20, 220, 210, 126, 248, 128, - /* 470 */ 129, 130, 199, 132, 67, 12, 13, 70, 128, 206, - /* 480 */ 0, 230, 185, 20, 92, 22, 179, 190, 206, 216, - /* 490 */ 220, 150, 68, 220, 220, 213, 104, 176, 225, 248, - /* 500 */ 3, 38, 170, 206, 179, 232, 233, 234, 235, 159, - /* 510 */ 160, 161, 162, 163, 230, 57, 92, 179, 126, 61, - /* 520 */ 128, 129, 130, 179, 132, 252, 168, 220, 104, 20, - /* 530 */ 179, 68, 248, 1, 2, 20, 27, 57, 265, 30, - /* 540 */ 82, 61, 269, 179, 72, 220, 225, 75, 39, 200, - /* 550 */ 126, 47, 128, 129, 130, 92, 132, 72, 220, 38, - /* 560 */ 75, 179, 82, 199, 220, 2, 179, 104, 179, 189, - /* 570 */ 206, 220, 200, 252, 179, 12, 13, 14, 15, 16, - /* 580 */ 216, 101, 102, 103, 220, 105, 265, 174, 175, 126, - /* 590 */ 269, 128, 129, 130, 199, 132, 232, 233, 234, 235, - /* 600 */ 236, 206, 220, 72, 240, 241, 75, 220, 200, 220, - /* 610 */ 179, 216, 179, 179, 69, 220, 107, 179, 179, 110, - /* 620 */ 111, 112, 113, 114, 179, 104, 81, 232, 233, 234, - /* 630 */ 235, 236, 128, 199, 69, 240, 241, 122, 199, 49, - /* 640 */ 206, 51, 0, 200, 54, 206, 81, 57, 0, 59, - /* 650 */ 216, 220, 62, 220, 220, 216, 179, 0, 220, 220, - /* 660 */ 0, 38, 179, 166, 22, 220, 232, 233, 234, 235, - /* 670 */ 22, 232, 233, 234, 235, 236, 199, 272, 200, 180, - /* 680 */ 241, 21, 69, 206, 24, 25, 26, 27, 28, 29, - /* 690 */ 30, 31, 32, 216, 81, 263, 179, 220, 0, 22, - /* 700 */ 223, 179, 209, 220, 270, 271, 257, 69, 182, 232, - /* 710 */ 233, 234, 235, 68, 57, 38, 199, 231, 61, 81, - /* 720 */ 22, 199, 69, 206, 69, 80, 250, 104, 206, 199, - /* 730 */ 266, 124, 69, 216, 81, 69, 81, 220, 216, 82, - /* 740 */ 223, 69, 220, 179, 81, 253, 226, 81, 20, 232, - /* 750 */ 233, 234, 235, 81, 232, 233, 234, 235, 101, 102, - /* 760 */ 103, 185, 105, 199, 115, 2, 214, 116, 212, 92, - /* 770 */ 206, 69, 212, 179, 185, 12, 13, 14, 15, 16, - /* 780 */ 216, 104, 69, 81, 220, 20, 264, 187, 12, 13, - /* 790 */ 14, 15, 16, 199, 81, 179, 232, 233, 234, 235, - /* 800 */ 206, 224, 206, 126, 69, 128, 129, 69, 20, 69, - /* 810 */ 216, 69, 69, 187, 220, 199, 81, 223, 217, 81, - /* 820 */ 19, 81, 206, 81, 81, 185, 232, 233, 234, 235, - /* 830 */ 187, 187, 216, 20, 33, 271, 220, 36, 199, 223, - /* 840 */ 181, 224, 181, 42, 217, 44, 68, 185, 232, 233, - /* 850 */ 234, 235, 0, 199, 21, 199, 78, 24, 25, 26, - /* 860 */ 27, 28, 29, 30, 31, 32, 199, 199, 67, 199, - /* 870 */ 179, 70, 199, 199, 199, 199, 24, 25, 26, 27, - /* 880 */ 28, 29, 30, 31, 32, 199, 206, 184, 184, 131, - /* 890 */ 199, 133, 134, 135, 136, 137, 20, 206, 262, 158, - /* 900 */ 18, 179, 101, 157, 221, 23, 129, 216, 220, 231, - /* 910 */ 221, 220, 262, 220, 220, 165, 258, 35, 164, 118, - /* 920 */ 153, 199, 121, 232, 233, 234, 235, 45, 206, 149, - /* 930 */ 259, 179, 12, 13, 14, 15, 16, 256, 216, 152, - /* 940 */ 255, 20, 220, 206, 230, 115, 173, 68, 243, 167, - /* 950 */ 169, 199, 273, 179, 232, 233, 234, 235, 206, 239, - /* 960 */ 268, 119, 267, 206, 195, 221, 221, 220, 216, 220, - /* 970 */ 217, 220, 220, 199, 218, 179, 184, 184, 206, 68, - /* 980 */ 206, 202, 185, 184, 232, 233, 234, 235, 106, 69, - /* 990 */ 216, 181, 186, 227, 220, 199, 193, 179, 193, 177, - /* 1000 */ 0, 104, 206, 126, 0, 123, 232, 233, 234, 235, - /* 1010 */ 80, 0, 216, 0, 115, 0, 220, 199, 0, 179, - /* 1020 */ 0, 0, 0, 0, 206, 22, 0, 0, 232, 233, - /* 1030 */ 234, 235, 150, 0, 216, 0, 0, 0, 220, 199, - /* 1040 */ 0, 179, 43, 0, 48, 0, 206, 0, 38, 43, - /* 1050 */ 232, 233, 234, 235, 0, 36, 216, 0, 0, 0, - /* 1060 */ 220, 199, 77, 179, 75, 0, 38, 38, 206, 38, - /* 1070 */ 22, 0, 232, 233, 234, 235, 38, 38, 216, 38, - /* 1080 */ 38, 0, 220, 199, 38, 22, 22, 179, 39, 0, - /* 1090 */ 206, 22, 0, 38, 232, 233, 234, 235, 22, 0, - /* 1100 */ 216, 22, 20, 0, 220, 0, 122, 199, 117, 43, - /* 1110 */ 154, 179, 0, 81, 206, 81, 232, 233, 234, 235, - /* 1120 */ 12, 13, 69, 154, 216, 81, 148, 154, 220, 68, - /* 1130 */ 22, 199, 81, 179, 4, 38, 69, 69, 206, 69, - /* 1140 */ 232, 233, 234, 235, 69, 68, 38, 38, 216, 38, - /* 1150 */ 2, 68, 220, 199, 68, 179, 68, 38, 80, 69, - /* 1160 */ 206, 81, 38, 69, 232, 233, 234, 235, 81, 38, - /* 1170 */ 216, 80, 68, 80, 220, 199, 81, 179, 128, 69, - /* 1180 */ 80, 68, 206, 69, 69, 68, 232, 233, 234, 235, - /* 1190 */ 68, 68, 216, 120, 0, 43, 220, 199, 78, 22, - /* 1200 */ 92, 117, 68, 68, 206, 80, 80, 79, 232, 233, - /* 1210 */ 234, 235, 104, 69, 216, 68, 33, 38, 220, 36, - /* 1220 */ 38, 94, 69, 38, 68, 42, 69, 44, 38, 68, - /* 1230 */ 232, 233, 234, 235, 126, 69, 128, 129, 38, 68, - /* 1240 */ 38, 69, 68, 94, 94, 94, 22, 82, 68, 38, - /* 1250 */ 67, 38, 68, 70, 68, 38, 22, 48, 104, 47, - /* 1260 */ 22, 38, 22, 38, 38, 38, 38, 38, 38, 38, - /* 1270 */ 38, 38, 0, 38, 38, 38, 0, 38, 0, 38, - /* 1280 */ 38, 38, 36, 38, 37, 0, 22, 43, 21, 274, - /* 1290 */ 22, 22, 21, 20, 274, 274, 274, 274, 274, 274, - /* 1300 */ 117, 274, 274, 274, 121, 274, 274, 274, 274, 274, - /* 1310 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1320 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1330 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1340 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1350 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1360 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1370 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1380 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1390 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1400 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1410 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1420 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1430 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1440 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1450 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - /* 1460 */ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + /* 110 */ 62, 63, 64, 65, 66, 49, 116, 51, 20, 202, + /* 120 */ 54, 0, 20, 57, 179, 59, 209, 21, 62, 116, + /* 130 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 21, + /* 140 */ 108, 109, 142, 143, 144, 145, 146, 147, 148, 149, + /* 150 */ 150, 151, 34, 20, 237, 142, 143, 144, 145, 146, + /* 160 */ 147, 148, 149, 150, 151, 182, 68, 46, 12, 13, + /* 170 */ 14, 15, 16, 228, 83, 84, 85, 86, 87, 88, + /* 180 */ 89, 90, 91, 92, 93, 202, 95, 96, 97, 98, + /* 190 */ 99, 100, 209, 12, 13, 14, 15, 16, 206, 202, + /* 200 */ 255, 68, 219, 182, 12, 13, 223, 129, 182, 131, + /* 210 */ 213, 228, 20, 268, 22, 223, 255, 272, 235, 236, + /* 220 */ 237, 238, 239, 231, 232, 69, 243, 244, 202, 268, + /* 230 */ 38, 190, 154, 272, 20, 209, 120, 188, 255, 47, + /* 240 */ 12, 13, 193, 57, 223, 219, 209, 61, 207, 223, + /* 250 */ 22, 268, 154, 216, 182, 272, 154, 182, 209, 46, + /* 260 */ 68, 235, 236, 237, 238, 239, 38, 188, 82, 243, + /* 270 */ 244, 245, 193, 188, 202, 159, 160, 12, 13, 14, + /* 280 */ 206, 209, 20, 257, 92, 20, 43, 22, 209, 263, + /* 290 */ 264, 219, 12, 13, 202, 223, 104, 223, 223, 214, + /* 300 */ 20, 209, 22, 38, 123, 231, 232, 235, 236, 237, + /* 310 */ 238, 239, 47, 0, 182, 243, 244, 233, 38, 132, + /* 320 */ 92, 20, 130, 188, 132, 133, 134, 47, 136, 237, + /* 330 */ 185, 186, 104, 68, 21, 251, 122, 24, 25, 26, + /* 340 */ 27, 28, 29, 30, 31, 32, 154, 0, 68, 0, + /* 350 */ 163, 164, 165, 166, 167, 223, 175, 92, 130, 182, + /* 360 */ 132, 133, 188, 228, 182, 182, 188, 193, 4, 104, + /* 370 */ 68, 193, 92, 24, 25, 26, 27, 28, 29, 30, + /* 380 */ 31, 32, 80, 209, 104, 202, 202, 209, 182, 20, + /* 390 */ 255, 182, 209, 46, 210, 130, 153, 132, 133, 134, + /* 400 */ 223, 136, 219, 268, 3, 223, 223, 272, 202, 154, + /* 410 */ 130, 182, 132, 133, 134, 209, 136, 22, 235, 236, + /* 420 */ 237, 238, 239, 122, 202, 219, 243, 244, 245, 223, + /* 430 */ 208, 202, 223, 38, 188, 213, 233, 20, 209, 22, + /* 440 */ 182, 235, 236, 237, 238, 239, 187, 264, 219, 243, + /* 450 */ 244, 245, 223, 81, 251, 209, 116, 40, 182, 233, + /* 460 */ 254, 12, 13, 204, 235, 236, 237, 238, 239, 20, + /* 470 */ 182, 22, 243, 244, 245, 0, 20, 251, 12, 13, + /* 480 */ 14, 223, 142, 254, 238, 46, 20, 38, 22, 20, + /* 490 */ 202, 151, 12, 13, 248, 249, 250, 209, 252, 223, + /* 500 */ 20, 182, 22, 195, 38, 194, 198, 219, 182, 188, + /* 510 */ 182, 223, 72, 202, 193, 75, 228, 68, 38, 155, + /* 520 */ 182, 210, 79, 235, 236, 237, 238, 69, 35, 202, + /* 530 */ 209, 183, 57, 182, 68, 208, 61, 12, 13, 81, + /* 540 */ 213, 92, 223, 255, 202, 20, 174, 22, 68, 223, + /* 550 */ 57, 223, 68, 104, 61, 213, 268, 82, 92, 14, + /* 560 */ 272, 223, 78, 38, 71, 20, 73, 74, 182, 76, + /* 570 */ 104, 170, 92, 203, 223, 82, 101, 102, 103, 130, + /* 580 */ 105, 132, 133, 134, 104, 136, 203, 188, 202, 152, + /* 590 */ 153, 182, 193, 68, 47, 209, 130, 203, 132, 133, + /* 600 */ 134, 72, 136, 154, 75, 219, 1, 2, 209, 223, + /* 610 */ 130, 202, 132, 133, 134, 188, 136, 92, 209, 194, + /* 620 */ 193, 235, 236, 237, 238, 239, 203, 202, 219, 104, + /* 630 */ 244, 202, 223, 18, 182, 210, 209, 208, 23, 14, + /* 640 */ 15, 16, 213, 182, 235, 236, 237, 238, 239, 182, + /* 650 */ 35, 188, 243, 244, 182, 130, 38, 132, 133, 134, + /* 660 */ 45, 136, 135, 202, 137, 138, 139, 140, 141, 202, + /* 670 */ 209, 69, 209, 182, 202, 223, 209, 182, 182, 132, + /* 680 */ 219, 209, 182, 81, 223, 72, 219, 182, 75, 72, + /* 690 */ 223, 219, 75, 226, 192, 223, 235, 236, 237, 238, + /* 700 */ 182, 238, 235, 236, 237, 238, 182, 235, 236, 237, + /* 710 */ 238, 248, 249, 250, 223, 252, 194, 81, 223, 223, + /* 720 */ 202, 106, 104, 223, 202, 275, 202, 209, 223, 0, + /* 730 */ 182, 203, 210, 209, 273, 274, 22, 219, 123, 124, + /* 740 */ 125, 223, 127, 219, 226, 266, 274, 223, 177, 178, + /* 750 */ 202, 22, 38, 235, 236, 237, 238, 209, 0, 235, + /* 760 */ 236, 237, 238, 20, 212, 69, 69, 219, 182, 154, + /* 770 */ 27, 223, 0, 30, 226, 38, 260, 81, 81, 19, + /* 780 */ 22, 185, 39, 235, 236, 237, 238, 2, 202, 234, + /* 790 */ 253, 267, 202, 33, 22, 209, 36, 12, 13, 14, + /* 800 */ 15, 16, 42, 2, 44, 219, 92, 69, 172, 223, + /* 810 */ 269, 182, 226, 12, 13, 14, 15, 16, 104, 81, + /* 820 */ 69, 235, 236, 237, 238, 69, 256, 67, 69, 128, + /* 830 */ 70, 202, 81, 69, 20, 229, 188, 81, 209, 69, + /* 840 */ 81, 104, 182, 115, 130, 81, 132, 133, 219, 217, + /* 850 */ 107, 81, 223, 110, 111, 112, 113, 114, 69, 215, + /* 860 */ 116, 101, 202, 69, 235, 236, 237, 238, 69, 209, + /* 870 */ 81, 215, 69, 182, 188, 81, 20, 227, 118, 219, + /* 880 */ 81, 121, 182, 223, 81, 190, 12, 13, 14, 15, + /* 890 */ 16, 69, 209, 202, 69, 235, 236, 237, 238, 20, + /* 900 */ 209, 220, 202, 81, 182, 190, 81, 190, 188, 209, + /* 910 */ 219, 190, 20, 182, 223, 202, 184, 184, 202, 219, + /* 920 */ 202, 202, 188, 223, 202, 202, 235, 236, 237, 238, + /* 930 */ 227, 209, 202, 202, 0, 235, 236, 237, 238, 187, + /* 940 */ 209, 219, 202, 182, 202, 223, 220, 202, 202, 202, + /* 950 */ 219, 182, 187, 20, 223, 162, 161, 235, 236, 237, + /* 960 */ 238, 234, 209, 202, 265, 224, 235, 236, 237, 238, + /* 970 */ 209, 202, 223, 133, 182, 265, 169, 49, 209, 51, + /* 980 */ 219, 224, 54, 168, 223, 57, 223, 59, 219, 223, + /* 990 */ 62, 57, 223, 157, 202, 61, 235, 236, 237, 238, + /* 1000 */ 261, 209, 156, 153, 235, 236, 237, 238, 20, 259, + /* 1010 */ 262, 219, 258, 182, 209, 223, 82, 233, 115, 246, + /* 1020 */ 176, 182, 173, 171, 68, 242, 224, 235, 236, 237, + /* 1030 */ 238, 276, 270, 202, 223, 101, 102, 103, 271, 105, + /* 1040 */ 209, 202, 223, 223, 182, 224, 119, 221, 209, 220, + /* 1050 */ 219, 209, 182, 187, 223, 4, 198, 209, 219, 187, + /* 1060 */ 68, 188, 223, 187, 202, 205, 235, 236, 237, 238, + /* 1070 */ 19, 209, 202, 184, 235, 236, 237, 238, 196, 209, + /* 1080 */ 196, 219, 189, 182, 33, 223, 180, 36, 0, 219, + /* 1090 */ 104, 230, 41, 223, 130, 44, 0, 235, 236, 237, + /* 1100 */ 238, 0, 50, 202, 126, 235, 236, 237, 238, 0, + /* 1110 */ 209, 0, 80, 0, 0, 115, 0, 0, 67, 33, + /* 1120 */ 219, 70, 36, 0, 223, 0, 0, 0, 42, 22, + /* 1130 */ 44, 0, 0, 0, 0, 0, 235, 236, 237, 238, + /* 1140 */ 0, 0, 43, 0, 0, 48, 0, 43, 38, 0, + /* 1150 */ 0, 36, 0, 67, 0, 77, 70, 75, 38, 38, + /* 1160 */ 22, 0, 38, 0, 22, 0, 38, 38, 38, 22, + /* 1170 */ 0, 0, 0, 22, 38, 38, 20, 22, 39, 22, + /* 1180 */ 0, 0, 122, 38, 0, 117, 68, 81, 158, 81, + /* 1190 */ 68, 43, 158, 81, 152, 158, 4, 2, 132, 120, + /* 1200 */ 81, 117, 104, 117, 0, 277, 277, 121, 277, 277, + /* 1210 */ 277, 277, 277, 277, 277, 277, 277, 38, 277, 277, + /* 1220 */ 38, 38, 69, 38, 38, 38, 277, 69, 68, 277, + /* 1230 */ 22, 69, 68, 43, 277, 69, 68, 277, 69, 80, + /* 1240 */ 277, 38, 69, 277, 277, 69, 277, 277, 81, 277, + /* 1250 */ 277, 277, 277, 277, 80, 277, 81, 80, 69, 81, + /* 1260 */ 69, 68, 68, 38, 38, 69, 68, 68, 80, 68, + /* 1270 */ 68, 38, 38, 277, 277, 78, 0, 38, 277, 277, + /* 1280 */ 80, 38, 22, 277, 277, 80, 68, 277, 22, 22, + /* 1290 */ 48, 69, 68, 22, 22, 277, 277, 69, 69, 68, + /* 1300 */ 79, 69, 38, 38, 68, 68, 38, 38, 38, 69, + /* 1310 */ 47, 38, 0, 0, 68, 38, 38, 94, 0, 38, + /* 1320 */ 38, 38, 21, 21, 38, 38, 37, 68, 38, 68, + /* 1330 */ 68, 38, 38, 22, 43, 20, 38, 38, 38, 36, + /* 1340 */ 82, 22, 38, 94, 277, 277, 277, 277, 277, 94, + /* 1350 */ 277, 94, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1360 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1370 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1380 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1390 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1400 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1410 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1420 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1430 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1440 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1450 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1460 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1470 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1480 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1490 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1500 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1510 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1520 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + /* 1530 */ 277, }; -#define YY_SHIFT_COUNT (437) +#define YY_SHIFT_COUNT (444) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (1285) +#define YY_SHIFT_MAX (1319) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 882, 168, 173, 266, 266, 266, 266, 341, 266, 266, - /* 10 */ 424, 463, 116, 392, 424, 424, 424, 424, 424, 424, - /* 20 */ 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - /* 30 */ 424, 424, 424, 317, 317, 317, 102, 1108, 1108, 73, - /* 40 */ 104, 104, 1108, 104, 104, 143, 339, 369, 369, 186, - /* 50 */ 436, 339, 104, 104, 339, 104, 339, 436, 339, 339, - /* 60 */ 104, 299, 0, 13, 13, 509, 833, 249, 677, 677, - /* 70 */ 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, - /* 80 */ 677, 677, 677, 677, 677, 677, 677, 677, 590, 295, - /* 90 */ 137, 243, 243, 243, 239, 444, 436, 339, 339, 339, - /* 100 */ 285, 78, 78, 78, 78, 78, 660, 66, 118, 350, - /* 110 */ 458, 171, 232, 515, 144, 218, 144, 421, 497, 51, - /* 120 */ 607, 728, 649, 651, 651, 728, 765, 143, 444, 788, - /* 130 */ 143, 143, 728, 143, 813, 339, 339, 339, 339, 339, - /* 140 */ 339, 339, 339, 339, 339, 339, 728, 813, 765, 299, - /* 150 */ 444, 788, 299, 876, 741, 746, 777, 741, 746, 777, - /* 160 */ 777, 750, 754, 767, 787, 780, 444, 921, 830, 773, - /* 170 */ 781, 782, 879, 339, 746, 777, 777, 746, 777, 842, - /* 180 */ 444, 788, 299, 285, 299, 444, 911, 728, 299, 813, - /* 190 */ 1305, 1305, 1305, 1305, 1305, 48, 852, 801, 1183, 407, - /* 200 */ 480, 657, 563, 763, 758, 920, 776, 776, 776, 776, - /* 210 */ 776, 776, 776, 174, 19, 316, 134, 134, 134, 134, - /* 220 */ 327, 472, 485, 531, 642, 648, 698, 176, 545, 565, - /* 230 */ 613, 532, 413, 358, 332, 638, 504, 653, 645, 655, - /* 240 */ 663, 666, 672, 702, 521, 623, 713, 735, 738, 740, - /* 250 */ 742, 743, 778, 1000, 897, 877, 1004, 930, 1011, 1013, - /* 260 */ 899, 1015, 1018, 1020, 1021, 1022, 1023, 1003, 1026, 1027, - /* 270 */ 1033, 1035, 1036, 1037, 1040, 999, 1043, 996, 1045, 1047, - /* 280 */ 1010, 1019, 1006, 1054, 1057, 1058, 1059, 985, 989, 1028, - /* 290 */ 1029, 1048, 1065, 1031, 1038, 1039, 1041, 1042, 1046, 1071, - /* 300 */ 1063, 1081, 1064, 1049, 1089, 1069, 1055, 1092, 1076, 1099, - /* 310 */ 1079, 1082, 1103, 1105, 984, 1112, 1061, 1066, 991, 1032, - /* 320 */ 1034, 956, 1053, 1044, 1067, 1077, 1083, 1068, 1086, 1070, - /* 330 */ 1051, 1078, 1088, 1080, 969, 1075, 1090, 1091, 978, 1087, - /* 340 */ 1093, 1094, 1095, 973, 1130, 1097, 1109, 1111, 1119, 1124, - /* 350 */ 1131, 1148, 1050, 1100, 1110, 1104, 1113, 1114, 1115, 1117, - /* 360 */ 1122, 1073, 1123, 1194, 1152, 1084, 1134, 1120, 1125, 1126, - /* 370 */ 1177, 1135, 1128, 1144, 1179, 1182, 1147, 1153, 1185, 1156, - /* 380 */ 1157, 1190, 1161, 1166, 1200, 1171, 1172, 1202, 1174, 1127, - /* 390 */ 1149, 1150, 1151, 1224, 1165, 1180, 1211, 1154, 1184, 1186, - /* 400 */ 1213, 1217, 1234, 1209, 1212, 1238, 1223, 1225, 1226, 1227, - /* 410 */ 1228, 1229, 1230, 1240, 1231, 1232, 1233, 1235, 1236, 1237, - /* 420 */ 1239, 1241, 1242, 1272, 1243, 1246, 1244, 1276, 1245, 1247, - /* 430 */ 1278, 1285, 1264, 1267, 1268, 1269, 1271, 1273, + /* 0 */ 615, 192, 265, 280, 280, 280, 280, 449, 280, 280, + /* 10 */ 480, 525, 98, 466, 480, 480, 480, 480, 480, 480, + /* 20 */ 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + /* 30 */ 480, 480, 480, 133, 133, 133, 102, 228, 228, 78, + /* 40 */ 35, 35, 228, 35, 35, 35, 35, 213, 262, 369, + /* 50 */ 369, 255, 456, 262, 35, 35, 262, 35, 262, 456, + /* 60 */ 262, 262, 35, 439, 0, 13, 13, 743, 106, 493, + /* 70 */ 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, + /* 80 */ 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, + /* 90 */ 928, 417, 121, 214, 214, 214, 347, 469, 456, 262, + /* 100 */ 262, 262, 443, 91, 91, 91, 91, 91, 313, 66, + /* 110 */ 181, 187, 186, 116, 395, 301, 437, 243, 437, 545, + /* 120 */ 401, 364, 701, 814, 728, 744, 744, 814, 856, 213, + /* 130 */ 469, 879, 213, 213, 814, 213, 892, 262, 262, 262, + /* 140 */ 262, 262, 262, 262, 262, 262, 262, 262, 814, 892, + /* 150 */ 856, 439, 469, 879, 439, 933, 793, 795, 840, 793, + /* 160 */ 795, 840, 840, 807, 815, 836, 846, 850, 469, 988, + /* 170 */ 903, 844, 849, 852, 956, 262, 795, 840, 840, 795, + /* 180 */ 840, 927, 469, 879, 439, 443, 439, 469, 992, 814, + /* 190 */ 439, 892, 1352, 1352, 1352, 1352, 1352, 48, 349, 760, + /* 200 */ 1086, 1051, 475, 934, 785, 801, 527, 156, 874, 874, + /* 210 */ 874, 874, 874, 874, 874, 32, 19, 340, 625, 625, + /* 220 */ 625, 625, 440, 529, 613, 617, 729, 758, 772, 118, + /* 230 */ 458, 602, 696, 605, 571, 636, 372, 697, 547, 738, + /* 240 */ 302, 751, 756, 759, 764, 770, 618, 737, 789, 794, + /* 250 */ 799, 803, 822, 825, 484, 1088, 986, 964, 1096, 1101, + /* 260 */ 1052, 978, 1109, 1111, 1032, 1113, 1114, 1000, 1116, 1117, + /* 270 */ 1123, 1125, 1126, 1127, 1107, 1131, 1132, 1133, 1134, 1135, + /* 280 */ 1140, 1141, 1099, 1143, 1097, 1144, 1146, 1110, 1115, 1104, + /* 290 */ 1149, 1150, 1152, 1154, 1078, 1082, 1120, 1121, 1138, 1161, + /* 300 */ 1124, 1128, 1129, 1130, 1136, 1137, 1163, 1142, 1165, 1147, + /* 310 */ 1139, 1170, 1151, 1145, 1171, 1155, 1172, 1157, 1156, 1180, + /* 320 */ 1181, 1060, 1184, 1118, 1148, 1068, 1106, 1108, 1030, 1153, + /* 330 */ 1112, 1158, 1122, 1160, 1162, 1164, 1166, 1119, 1159, 1168, + /* 340 */ 1167, 1034, 1169, 1173, 1174, 1042, 1175, 1177, 1176, 1178, + /* 350 */ 1037, 1192, 1179, 1182, 1183, 1185, 1186, 1187, 1195, 1066, + /* 360 */ 1188, 1189, 1193, 1194, 1191, 1196, 1198, 1199, 1079, 1201, + /* 370 */ 1204, 1190, 1084, 1202, 1197, 1200, 1205, 1208, 1218, 1221, + /* 380 */ 1222, 1225, 1226, 1224, 1228, 1233, 1231, 1229, 1234, 1236, + /* 390 */ 1232, 1239, 1237, 1240, 1243, 1246, 1223, 1249, 1255, 1257, + /* 400 */ 1260, 1258, 1259, 1264, 1098, 1261, 1262, 1203, 1265, 1266, + /* 410 */ 1242, 1263, 1267, 1268, 1269, 1270, 1273, 1278, 1281, 1282, + /* 420 */ 1271, 1283, 1286, 1287, 1290, 1293, 1294, 1298, 1299, 1300, + /* 430 */ 1276, 1277, 1303, 1291, 1312, 1304, 1289, 1313, 1318, 1272, + /* 440 */ 1301, 1311, 1319, 1302, 1315, }; -#define YY_REDUCE_COUNT (194) -#define YY_REDUCE_MIN (-235) -#define YY_REDUCE_MAX (998) +#define YY_REDUCE_COUNT (196) +#define YY_REDUCE_MIN (-238) +#define YY_REDUCE_MAX (906) static const short yy_reduce_ofst[] = { - /* 0 */ 321, -7, 15, 108, -162, 140, 187, 273, 364, 395, - /* 10 */ 434, 439, -184, 477, 517, 522, 564, 594, 616, 691, - /* 20 */ 722, 752, 774, 796, 818, 840, 862, 884, 908, 932, - /* 30 */ 954, 976, 998, -153, -3, 212, 86, -24, -12, -219, - /* 40 */ -167, -166, -220, -147, 34, -120, 2, 74, 75, 64, - /* 50 */ -212, -72, 162, 172, 54, 225, 31, -159, 178, 209, - /* 60 */ 297, -149, -235, -235, -235, -90, -144, -134, -137, 151, - /* 70 */ 205, 222, 245, 270, 274, 307, 325, 338, 344, 351, - /* 80 */ 382, 387, 389, 431, 433, 438, 445, 483, -102, 85, - /* 90 */ 230, 220, 251, 284, 111, 282, -211, -81, 122, 256, - /* 100 */ 195, 349, 372, 408, 443, 478, 499, 380, 405, 432, - /* 110 */ 493, 449, 526, 486, 476, 476, 476, 530, 464, 492, - /* 120 */ 520, 576, 552, 556, 560, 589, 577, 600, 596, 601, - /* 130 */ 626, 643, 640, 644, 659, 639, 654, 656, 667, 668, - /* 140 */ 670, 673, 674, 675, 676, 686, 662, 661, 617, 703, - /* 150 */ 680, 627, 704, 678, 636, 683, 688, 650, 689, 693, - /* 160 */ 694, 671, 658, 681, 685, 476, 737, 714, 705, 679, - /* 170 */ 692, 695, 720, 530, 744, 747, 749, 745, 751, 756, - /* 180 */ 757, 753, 792, 769, 793, 772, 779, 797, 799, 810, - /* 190 */ 766, 803, 805, 806, 822, + /* 0 */ -55, -17, 26, 183, -165, 206, 229, 288, 72, 409, + /* 10 */ 461, 386, -187, 467, 518, 524, 472, 548, 586, 629, + /* 20 */ 660, 691, 700, 722, 731, 761, 769, 792, 831, 839, + /* 30 */ 862, 870, 901, -156, 246, 463, 135, -8, 74, -222, + /* 40 */ -170, -169, -223, -150, 49, 79, 174, -123, 222, -83, + /* 50 */ 92, -39, -215, 311, 178, 321, 327, 399, 425, -162, + /* 60 */ 429, 522, 427, -152, -238, -238, -238, 85, -147, -137, + /* 70 */ -140, 21, 75, 132, 177, 182, 209, 258, 276, 319, + /* 80 */ 326, 328, 338, 351, 452, 491, 495, 496, 500, 505, + /* 90 */ -105, 145, 41, 84, 203, 226, 259, 37, -214, 184, + /* 100 */ -3, 342, 308, 370, 383, 394, 423, 528, 348, 502, + /* 110 */ 450, 479, 552, 516, 596, 555, 537, 537, 537, 590, + /* 120 */ 541, 570, 606, 648, 632, 644, 656, 686, 650, 695, + /* 130 */ 683, 681, 715, 717, 720, 721, 732, 713, 716, 718, + /* 140 */ 719, 723, 730, 740, 742, 745, 746, 747, 734, 733, + /* 150 */ 703, 752, 753, 726, 765, 727, 699, 741, 749, 710, + /* 160 */ 757, 763, 766, 748, 739, 750, 754, 537, 805, 784, + /* 170 */ 773, 755, 767, 762, 783, 590, 802, 811, 819, 821, + /* 180 */ 820, 826, 842, 829, 866, 858, 872, 848, 860, 873, + /* 190 */ 876, 889, 861, 882, 884, 893, 906, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 10 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 20 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 30 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 40 */ 1038, 1038, 1038, 1038, 1038, 1091, 1038, 1038, 1038, 1038, - /* 50 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 60 */ 1038, 1089, 1038, 1314, 1038, 1204, 1038, 1038, 1038, 1038, - /* 70 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 80 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 90 */ 1091, 1325, 1325, 1325, 1089, 1038, 1038, 1038, 1038, 1038, - /* 100 */ 1173, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1389, 1038, - /* 110 */ 1126, 1349, 1038, 1341, 1317, 1331, 1318, 1038, 1374, 1334, - /* 120 */ 1227, 1038, 1209, 1206, 1206, 1038, 1038, 1091, 1038, 1038, - /* 130 */ 1091, 1091, 1038, 1091, 1038, 1038, 1038, 1038, 1038, 1038, - /* 140 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1089, - /* 150 */ 1038, 1038, 1089, 1038, 1356, 1354, 1038, 1356, 1354, 1038, - /* 160 */ 1038, 1368, 1364, 1347, 1345, 1331, 1038, 1038, 1038, 1392, - /* 170 */ 1380, 1376, 1038, 1038, 1354, 1038, 1038, 1354, 1038, 1217, - /* 180 */ 1038, 1038, 1089, 1038, 1089, 1038, 1142, 1038, 1089, 1038, - /* 190 */ 1229, 1176, 1176, 1092, 1043, 1038, 1038, 1038, 1038, 1038, - /* 200 */ 1038, 1038, 1038, 1038, 1038, 1038, 1279, 1367, 1366, 1278, - /* 210 */ 1291, 1290, 1289, 1038, 1038, 1038, 1273, 1274, 1272, 1271, - /* 220 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 230 */ 1038, 1315, 1038, 1377, 1381, 1038, 1038, 1038, 1257, 1038, - /* 240 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 250 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 260 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 270 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 280 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 290 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 300 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 310 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1338, - /* 320 */ 1348, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 330 */ 1038, 1257, 1038, 1365, 1038, 1324, 1320, 1038, 1038, 1316, - /* 340 */ 1038, 1038, 1375, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 350 */ 1038, 1310, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 360 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1256, 1038, - /* 370 */ 1038, 1038, 1038, 1038, 1038, 1038, 1170, 1038, 1038, 1038, - /* 380 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1155, - /* 390 */ 1153, 1152, 1151, 1038, 1148, 1038, 1038, 1038, 1038, 1038, - /* 400 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 410 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 420 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 430 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + /* 0 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 10 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 20 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 30 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 40 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1101, 1048, 1048, + /* 50 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 60 */ 1048, 1048, 1048, 1099, 1048, 1327, 1048, 1214, 1048, 1048, + /* 70 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 80 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 90 */ 1048, 1048, 1101, 1338, 1338, 1338, 1099, 1048, 1048, 1048, + /* 100 */ 1048, 1048, 1183, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 110 */ 1402, 1048, 1136, 1362, 1048, 1354, 1330, 1344, 1331, 1048, + /* 120 */ 1387, 1347, 1240, 1048, 1219, 1216, 1216, 1048, 1048, 1101, + /* 130 */ 1048, 1048, 1101, 1101, 1048, 1101, 1048, 1048, 1048, 1048, + /* 140 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 150 */ 1048, 1099, 1048, 1048, 1099, 1048, 1369, 1367, 1048, 1369, + /* 160 */ 1367, 1048, 1048, 1381, 1377, 1360, 1358, 1344, 1048, 1048, + /* 170 */ 1048, 1405, 1393, 1389, 1048, 1048, 1367, 1048, 1048, 1367, + /* 180 */ 1048, 1227, 1048, 1048, 1099, 1048, 1099, 1048, 1152, 1048, + /* 190 */ 1099, 1048, 1242, 1186, 1186, 1102, 1053, 1048, 1048, 1048, + /* 200 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1292, 1380, + /* 210 */ 1379, 1291, 1304, 1303, 1302, 1048, 1048, 1048, 1286, 1287, + /* 220 */ 1285, 1284, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 230 */ 1048, 1048, 1048, 1328, 1048, 1390, 1394, 1048, 1048, 1048, + /* 240 */ 1270, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 250 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 260 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 270 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 280 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 290 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 300 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 310 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 320 */ 1048, 1048, 1048, 1048, 1048, 1048, 1351, 1361, 1048, 1048, + /* 330 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1270, 1048, + /* 340 */ 1378, 1048, 1337, 1333, 1048, 1048, 1329, 1048, 1048, 1388, + /* 350 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1323, 1048, + /* 360 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 370 */ 1048, 1048, 1048, 1048, 1048, 1269, 1048, 1048, 1048, 1048, + /* 380 */ 1048, 1048, 1048, 1180, 1048, 1048, 1048, 1048, 1048, 1048, + /* 390 */ 1048, 1048, 1048, 1048, 1048, 1048, 1165, 1163, 1162, 1161, + /* 400 */ 1048, 1158, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 410 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 420 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 430 */ 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + /* 440 */ 1048, 1048, 1048, 1048, 1048, }; /********** End of lemon-generated parsing tables *****************************/ @@ -840,157 +854,160 @@ static const char *const yyTokenName[] = { /* 120 */ "INTERVAL", /* 121 */ "TOPIC", /* 122 */ "AS", - /* 123 */ "EXPLAIN", - /* 124 */ "ANALYZE", - /* 125 */ "VERBOSE", - /* 126 */ "NK_BOOL", - /* 127 */ "RATIO", - /* 128 */ "NULL", - /* 129 */ "NK_VARIABLE", - /* 130 */ "NK_UNDERLINE", - /* 131 */ "ROWTS", - /* 132 */ "TBNAME", - /* 133 */ "QSTARTTS", - /* 134 */ "QENDTS", - /* 135 */ "WSTARTTS", - /* 136 */ "WENDTS", - /* 137 */ "WDURATION", - /* 138 */ "BETWEEN", - /* 139 */ "IS", - /* 140 */ "NK_LT", - /* 141 */ "NK_GT", - /* 142 */ "NK_LE", - /* 143 */ "NK_GE", - /* 144 */ "NK_NE", - /* 145 */ "MATCH", - /* 146 */ "NMATCH", - /* 147 */ "IN", - /* 148 */ "JOIN", - /* 149 */ "INNER", - /* 150 */ "SELECT", - /* 151 */ "DISTINCT", - /* 152 */ "WHERE", - /* 153 */ "PARTITION", - /* 154 */ "BY", - /* 155 */ "SESSION", - /* 156 */ "STATE_WINDOW", - /* 157 */ "SLIDING", - /* 158 */ "FILL", - /* 159 */ "VALUE", - /* 160 */ "NONE", - /* 161 */ "PREV", - /* 162 */ "LINEAR", - /* 163 */ "NEXT", - /* 164 */ "GROUP", - /* 165 */ "HAVING", - /* 166 */ "ORDER", - /* 167 */ "SLIMIT", - /* 168 */ "SOFFSET", - /* 169 */ "LIMIT", - /* 170 */ "OFFSET", - /* 171 */ "ASC", - /* 172 */ "DESC", - /* 173 */ "NULLS", - /* 174 */ "FIRST", - /* 175 */ "LAST", - /* 176 */ "cmd", - /* 177 */ "account_options", - /* 178 */ "alter_account_options", - /* 179 */ "literal", - /* 180 */ "alter_account_option", - /* 181 */ "user_name", - /* 182 */ "dnode_endpoint", - /* 183 */ "dnode_host_name", - /* 184 */ "not_exists_opt", - /* 185 */ "db_name", - /* 186 */ "db_options", - /* 187 */ "exists_opt", - /* 188 */ "alter_db_options", - /* 189 */ "alter_db_option", - /* 190 */ "full_table_name", - /* 191 */ "column_def_list", - /* 192 */ "tags_def_opt", - /* 193 */ "table_options", - /* 194 */ "multi_create_clause", - /* 195 */ "tags_def", - /* 196 */ "multi_drop_clause", - /* 197 */ "alter_table_clause", - /* 198 */ "alter_table_options", - /* 199 */ "column_name", - /* 200 */ "type_name", - /* 201 */ "create_subtable_clause", - /* 202 */ "specific_tags_opt", - /* 203 */ "literal_list", - /* 204 */ "drop_table_clause", - /* 205 */ "col_name_list", - /* 206 */ "table_name", - /* 207 */ "column_def", - /* 208 */ "func_name_list", - /* 209 */ "alter_table_option", - /* 210 */ "col_name", - /* 211 */ "db_name_cond_opt", - /* 212 */ "like_pattern_opt", - /* 213 */ "table_name_cond", - /* 214 */ "from_db_opt", - /* 215 */ "func_name", - /* 216 */ "function_name", - /* 217 */ "index_name", - /* 218 */ "index_options", - /* 219 */ "func_list", - /* 220 */ "duration_literal", - /* 221 */ "sliding_opt", - /* 222 */ "func", - /* 223 */ "expression_list", - /* 224 */ "topic_name", - /* 225 */ "query_expression", - /* 226 */ "analyze_opt", - /* 227 */ "explain_options", - /* 228 */ "signed", - /* 229 */ "signed_literal", - /* 230 */ "table_alias", - /* 231 */ "column_alias", - /* 232 */ "expression", - /* 233 */ "pseudo_column", - /* 234 */ "column_reference", - /* 235 */ "subquery", - /* 236 */ "predicate", - /* 237 */ "compare_op", - /* 238 */ "in_op", - /* 239 */ "in_predicate_value", - /* 240 */ "boolean_value_expression", - /* 241 */ "boolean_primary", - /* 242 */ "common_expression", - /* 243 */ "from_clause", - /* 244 */ "table_reference_list", - /* 245 */ "table_reference", - /* 246 */ "table_primary", - /* 247 */ "joined_table", - /* 248 */ "alias_opt", - /* 249 */ "parenthesized_joined_table", - /* 250 */ "join_type", - /* 251 */ "search_condition", - /* 252 */ "query_specification", - /* 253 */ "set_quantifier_opt", - /* 254 */ "select_list", - /* 255 */ "where_clause_opt", - /* 256 */ "partition_by_clause_opt", - /* 257 */ "twindow_clause_opt", - /* 258 */ "group_by_clause_opt", - /* 259 */ "having_clause_opt", - /* 260 */ "select_sublist", - /* 261 */ "select_item", - /* 262 */ "fill_opt", - /* 263 */ "fill_mode", - /* 264 */ "group_by_list", - /* 265 */ "query_expression_body", - /* 266 */ "order_by_clause_opt", - /* 267 */ "slimit_clause_opt", - /* 268 */ "limit_clause_opt", - /* 269 */ "query_primary", - /* 270 */ "sort_specification_list", - /* 271 */ "sort_specification", - /* 272 */ "ordering_specification_opt", - /* 273 */ "null_ordering_opt", + /* 123 */ "DESC", + /* 124 */ "DESCRIBE", + /* 125 */ "RESET", + /* 126 */ "QUERY", + /* 127 */ "EXPLAIN", + /* 128 */ "ANALYZE", + /* 129 */ "VERBOSE", + /* 130 */ "NK_BOOL", + /* 131 */ "RATIO", + /* 132 */ "NULL", + /* 133 */ "NK_VARIABLE", + /* 134 */ "NK_UNDERLINE", + /* 135 */ "ROWTS", + /* 136 */ "TBNAME", + /* 137 */ "QSTARTTS", + /* 138 */ "QENDTS", + /* 139 */ "WSTARTTS", + /* 140 */ "WENDTS", + /* 141 */ "WDURATION", + /* 142 */ "BETWEEN", + /* 143 */ "IS", + /* 144 */ "NK_LT", + /* 145 */ "NK_GT", + /* 146 */ "NK_LE", + /* 147 */ "NK_GE", + /* 148 */ "NK_NE", + /* 149 */ "MATCH", + /* 150 */ "NMATCH", + /* 151 */ "IN", + /* 152 */ "JOIN", + /* 153 */ "INNER", + /* 154 */ "SELECT", + /* 155 */ "DISTINCT", + /* 156 */ "WHERE", + /* 157 */ "PARTITION", + /* 158 */ "BY", + /* 159 */ "SESSION", + /* 160 */ "STATE_WINDOW", + /* 161 */ "SLIDING", + /* 162 */ "FILL", + /* 163 */ "VALUE", + /* 164 */ "NONE", + /* 165 */ "PREV", + /* 166 */ "LINEAR", + /* 167 */ "NEXT", + /* 168 */ "GROUP", + /* 169 */ "HAVING", + /* 170 */ "ORDER", + /* 171 */ "SLIMIT", + /* 172 */ "SOFFSET", + /* 173 */ "LIMIT", + /* 174 */ "OFFSET", + /* 175 */ "ASC", + /* 176 */ "NULLS", + /* 177 */ "FIRST", + /* 178 */ "LAST", + /* 179 */ "cmd", + /* 180 */ "account_options", + /* 181 */ "alter_account_options", + /* 182 */ "literal", + /* 183 */ "alter_account_option", + /* 184 */ "user_name", + /* 185 */ "dnode_endpoint", + /* 186 */ "dnode_host_name", + /* 187 */ "not_exists_opt", + /* 188 */ "db_name", + /* 189 */ "db_options", + /* 190 */ "exists_opt", + /* 191 */ "alter_db_options", + /* 192 */ "alter_db_option", + /* 193 */ "full_table_name", + /* 194 */ "column_def_list", + /* 195 */ "tags_def_opt", + /* 196 */ "table_options", + /* 197 */ "multi_create_clause", + /* 198 */ "tags_def", + /* 199 */ "multi_drop_clause", + /* 200 */ "alter_table_clause", + /* 201 */ "alter_table_options", + /* 202 */ "column_name", + /* 203 */ "type_name", + /* 204 */ "create_subtable_clause", + /* 205 */ "specific_tags_opt", + /* 206 */ "literal_list", + /* 207 */ "drop_table_clause", + /* 208 */ "col_name_list", + /* 209 */ "table_name", + /* 210 */ "column_def", + /* 211 */ "func_name_list", + /* 212 */ "alter_table_option", + /* 213 */ "col_name", + /* 214 */ "db_name_cond_opt", + /* 215 */ "like_pattern_opt", + /* 216 */ "table_name_cond", + /* 217 */ "from_db_opt", + /* 218 */ "func_name", + /* 219 */ "function_name", + /* 220 */ "index_name", + /* 221 */ "index_options", + /* 222 */ "func_list", + /* 223 */ "duration_literal", + /* 224 */ "sliding_opt", + /* 225 */ "func", + /* 226 */ "expression_list", + /* 227 */ "topic_name", + /* 228 */ "query_expression", + /* 229 */ "analyze_opt", + /* 230 */ "explain_options", + /* 231 */ "signed", + /* 232 */ "signed_literal", + /* 233 */ "table_alias", + /* 234 */ "column_alias", + /* 235 */ "expression", + /* 236 */ "pseudo_column", + /* 237 */ "column_reference", + /* 238 */ "subquery", + /* 239 */ "predicate", + /* 240 */ "compare_op", + /* 241 */ "in_op", + /* 242 */ "in_predicate_value", + /* 243 */ "boolean_value_expression", + /* 244 */ "boolean_primary", + /* 245 */ "common_expression", + /* 246 */ "from_clause", + /* 247 */ "table_reference_list", + /* 248 */ "table_reference", + /* 249 */ "table_primary", + /* 250 */ "joined_table", + /* 251 */ "alias_opt", + /* 252 */ "parenthesized_joined_table", + /* 253 */ "join_type", + /* 254 */ "search_condition", + /* 255 */ "query_specification", + /* 256 */ "set_quantifier_opt", + /* 257 */ "select_list", + /* 258 */ "where_clause_opt", + /* 259 */ "partition_by_clause_opt", + /* 260 */ "twindow_clause_opt", + /* 261 */ "group_by_clause_opt", + /* 262 */ "having_clause_opt", + /* 263 */ "select_sublist", + /* 264 */ "select_item", + /* 265 */ "fill_opt", + /* 266 */ "fill_mode", + /* 267 */ "group_by_list", + /* 268 */ "query_expression_body", + /* 269 */ "order_by_clause_opt", + /* 270 */ "slimit_clause_opt", + /* 271 */ "limit_clause_opt", + /* 272 */ "query_primary", + /* 273 */ "sort_specification_list", + /* 274 */ "sort_specification", + /* 275 */ "ordering_specification_opt", + /* 276 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1183,175 +1200,178 @@ static const char *const yyRuleName[] = { /* 182 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression", /* 183 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS db_name", /* 184 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 185 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", - /* 186 */ "analyze_opt ::=", - /* 187 */ "analyze_opt ::= ANALYZE", - /* 188 */ "explain_options ::=", - /* 189 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 190 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 191 */ "cmd ::= query_expression", - /* 192 */ "literal ::= NK_INTEGER", - /* 193 */ "literal ::= NK_FLOAT", - /* 194 */ "literal ::= NK_STRING", - /* 195 */ "literal ::= NK_BOOL", - /* 196 */ "literal ::= TIMESTAMP NK_STRING", - /* 197 */ "literal ::= duration_literal", - /* 198 */ "literal ::= NULL", - /* 199 */ "duration_literal ::= NK_VARIABLE", - /* 200 */ "signed ::= NK_INTEGER", - /* 201 */ "signed ::= NK_PLUS NK_INTEGER", - /* 202 */ "signed ::= NK_MINUS NK_INTEGER", - /* 203 */ "signed ::= NK_FLOAT", - /* 204 */ "signed ::= NK_PLUS NK_FLOAT", - /* 205 */ "signed ::= NK_MINUS NK_FLOAT", - /* 206 */ "signed_literal ::= signed", - /* 207 */ "signed_literal ::= NK_STRING", - /* 208 */ "signed_literal ::= NK_BOOL", - /* 209 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 210 */ "signed_literal ::= duration_literal", - /* 211 */ "signed_literal ::= NULL", - /* 212 */ "literal_list ::= signed_literal", - /* 213 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 214 */ "db_name ::= NK_ID", - /* 215 */ "table_name ::= NK_ID", - /* 216 */ "column_name ::= NK_ID", - /* 217 */ "function_name ::= NK_ID", - /* 218 */ "table_alias ::= NK_ID", - /* 219 */ "column_alias ::= NK_ID", - /* 220 */ "user_name ::= NK_ID", - /* 221 */ "index_name ::= NK_ID", - /* 222 */ "topic_name ::= NK_ID", - /* 223 */ "expression ::= literal", - /* 224 */ "expression ::= pseudo_column", - /* 225 */ "expression ::= column_reference", - /* 226 */ "expression ::= function_name NK_LP expression_list NK_RP", - /* 227 */ "expression ::= function_name NK_LP NK_STAR NK_RP", - /* 228 */ "expression ::= subquery", - /* 229 */ "expression ::= NK_LP expression NK_RP", - /* 230 */ "expression ::= NK_PLUS expression", - /* 231 */ "expression ::= NK_MINUS expression", - /* 232 */ "expression ::= expression NK_PLUS expression", - /* 233 */ "expression ::= expression NK_MINUS expression", - /* 234 */ "expression ::= expression NK_STAR expression", - /* 235 */ "expression ::= expression NK_SLASH expression", - /* 236 */ "expression ::= expression NK_REM expression", - /* 237 */ "expression_list ::= expression", - /* 238 */ "expression_list ::= expression_list NK_COMMA expression", - /* 239 */ "column_reference ::= column_name", - /* 240 */ "column_reference ::= table_name NK_DOT column_name", - /* 241 */ "pseudo_column ::= NK_UNDERLINE ROWTS", - /* 242 */ "pseudo_column ::= TBNAME", - /* 243 */ "pseudo_column ::= NK_UNDERLINE QSTARTTS", - /* 244 */ "pseudo_column ::= NK_UNDERLINE QENDTS", - /* 245 */ "pseudo_column ::= NK_UNDERLINE WSTARTTS", - /* 246 */ "pseudo_column ::= NK_UNDERLINE WENDTS", - /* 247 */ "pseudo_column ::= NK_UNDERLINE WDURATION", - /* 248 */ "predicate ::= expression compare_op expression", - /* 249 */ "predicate ::= expression BETWEEN expression AND expression", - /* 250 */ "predicate ::= expression NOT BETWEEN expression AND expression", - /* 251 */ "predicate ::= expression IS NULL", - /* 252 */ "predicate ::= expression IS NOT NULL", - /* 253 */ "predicate ::= expression in_op in_predicate_value", - /* 254 */ "compare_op ::= NK_LT", - /* 255 */ "compare_op ::= NK_GT", - /* 256 */ "compare_op ::= NK_LE", - /* 257 */ "compare_op ::= NK_GE", - /* 258 */ "compare_op ::= NK_NE", - /* 259 */ "compare_op ::= NK_EQ", - /* 260 */ "compare_op ::= LIKE", - /* 261 */ "compare_op ::= NOT LIKE", - /* 262 */ "compare_op ::= MATCH", - /* 263 */ "compare_op ::= NMATCH", - /* 264 */ "in_op ::= IN", - /* 265 */ "in_op ::= NOT IN", - /* 266 */ "in_predicate_value ::= NK_LP expression_list NK_RP", - /* 267 */ "boolean_value_expression ::= boolean_primary", - /* 268 */ "boolean_value_expression ::= NOT boolean_primary", - /* 269 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 270 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 271 */ "boolean_primary ::= predicate", - /* 272 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 273 */ "common_expression ::= expression", - /* 274 */ "common_expression ::= boolean_value_expression", - /* 275 */ "from_clause ::= FROM table_reference_list", - /* 276 */ "table_reference_list ::= table_reference", - /* 277 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 278 */ "table_reference ::= table_primary", - /* 279 */ "table_reference ::= joined_table", - /* 280 */ "table_primary ::= table_name alias_opt", - /* 281 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 282 */ "table_primary ::= subquery alias_opt", - /* 283 */ "table_primary ::= parenthesized_joined_table", - /* 284 */ "alias_opt ::=", - /* 285 */ "alias_opt ::= table_alias", - /* 286 */ "alias_opt ::= AS table_alias", - /* 287 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 288 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 289 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 290 */ "join_type ::=", - /* 291 */ "join_type ::= INNER", - /* 292 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 293 */ "set_quantifier_opt ::=", - /* 294 */ "set_quantifier_opt ::= DISTINCT", - /* 295 */ "set_quantifier_opt ::= ALL", - /* 296 */ "select_list ::= NK_STAR", - /* 297 */ "select_list ::= select_sublist", - /* 298 */ "select_sublist ::= select_item", - /* 299 */ "select_sublist ::= select_sublist NK_COMMA select_item", - /* 300 */ "select_item ::= common_expression", - /* 301 */ "select_item ::= common_expression column_alias", - /* 302 */ "select_item ::= common_expression AS column_alias", - /* 303 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 304 */ "where_clause_opt ::=", - /* 305 */ "where_clause_opt ::= WHERE search_condition", - /* 306 */ "partition_by_clause_opt ::=", - /* 307 */ "partition_by_clause_opt ::= PARTITION BY expression_list", - /* 308 */ "twindow_clause_opt ::=", - /* 309 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 310 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP", - /* 311 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 312 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 313 */ "sliding_opt ::=", - /* 314 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 315 */ "fill_opt ::=", - /* 316 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 317 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 318 */ "fill_mode ::= NONE", - /* 319 */ "fill_mode ::= PREV", - /* 320 */ "fill_mode ::= NULL", - /* 321 */ "fill_mode ::= LINEAR", - /* 322 */ "fill_mode ::= NEXT", - /* 323 */ "group_by_clause_opt ::=", - /* 324 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 325 */ "group_by_list ::= expression", - /* 326 */ "group_by_list ::= group_by_list NK_COMMA expression", - /* 327 */ "having_clause_opt ::=", - /* 328 */ "having_clause_opt ::= HAVING search_condition", - /* 329 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 330 */ "query_expression_body ::= query_primary", - /* 331 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", - /* 332 */ "query_primary ::= query_specification", - /* 333 */ "order_by_clause_opt ::=", - /* 334 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 335 */ "slimit_clause_opt ::=", - /* 336 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 337 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 338 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 339 */ "limit_clause_opt ::=", - /* 340 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 341 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 342 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 343 */ "subquery ::= NK_LP query_expression NK_RP", - /* 344 */ "search_condition ::= common_expression", - /* 345 */ "sort_specification_list ::= sort_specification", - /* 346 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 347 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", - /* 348 */ "ordering_specification_opt ::=", - /* 349 */ "ordering_specification_opt ::= ASC", - /* 350 */ "ordering_specification_opt ::= DESC", - /* 351 */ "null_ordering_opt ::=", - /* 352 */ "null_ordering_opt ::= NULLS FIRST", - /* 353 */ "null_ordering_opt ::= NULLS LAST", + /* 185 */ "cmd ::= DESC full_table_name", + /* 186 */ "cmd ::= DESCRIBE full_table_name", + /* 187 */ "cmd ::= RESET QUERY CACHE", + /* 188 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", + /* 189 */ "analyze_opt ::=", + /* 190 */ "analyze_opt ::= ANALYZE", + /* 191 */ "explain_options ::=", + /* 192 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 193 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 194 */ "cmd ::= query_expression", + /* 195 */ "literal ::= NK_INTEGER", + /* 196 */ "literal ::= NK_FLOAT", + /* 197 */ "literal ::= NK_STRING", + /* 198 */ "literal ::= NK_BOOL", + /* 199 */ "literal ::= TIMESTAMP NK_STRING", + /* 200 */ "literal ::= duration_literal", + /* 201 */ "literal ::= NULL", + /* 202 */ "duration_literal ::= NK_VARIABLE", + /* 203 */ "signed ::= NK_INTEGER", + /* 204 */ "signed ::= NK_PLUS NK_INTEGER", + /* 205 */ "signed ::= NK_MINUS NK_INTEGER", + /* 206 */ "signed ::= NK_FLOAT", + /* 207 */ "signed ::= NK_PLUS NK_FLOAT", + /* 208 */ "signed ::= NK_MINUS NK_FLOAT", + /* 209 */ "signed_literal ::= signed", + /* 210 */ "signed_literal ::= NK_STRING", + /* 211 */ "signed_literal ::= NK_BOOL", + /* 212 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 213 */ "signed_literal ::= duration_literal", + /* 214 */ "signed_literal ::= NULL", + /* 215 */ "literal_list ::= signed_literal", + /* 216 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 217 */ "db_name ::= NK_ID", + /* 218 */ "table_name ::= NK_ID", + /* 219 */ "column_name ::= NK_ID", + /* 220 */ "function_name ::= NK_ID", + /* 221 */ "table_alias ::= NK_ID", + /* 222 */ "column_alias ::= NK_ID", + /* 223 */ "user_name ::= NK_ID", + /* 224 */ "index_name ::= NK_ID", + /* 225 */ "topic_name ::= NK_ID", + /* 226 */ "expression ::= literal", + /* 227 */ "expression ::= pseudo_column", + /* 228 */ "expression ::= column_reference", + /* 229 */ "expression ::= function_name NK_LP expression_list NK_RP", + /* 230 */ "expression ::= function_name NK_LP NK_STAR NK_RP", + /* 231 */ "expression ::= subquery", + /* 232 */ "expression ::= NK_LP expression NK_RP", + /* 233 */ "expression ::= NK_PLUS expression", + /* 234 */ "expression ::= NK_MINUS expression", + /* 235 */ "expression ::= expression NK_PLUS expression", + /* 236 */ "expression ::= expression NK_MINUS expression", + /* 237 */ "expression ::= expression NK_STAR expression", + /* 238 */ "expression ::= expression NK_SLASH expression", + /* 239 */ "expression ::= expression NK_REM expression", + /* 240 */ "expression_list ::= expression", + /* 241 */ "expression_list ::= expression_list NK_COMMA expression", + /* 242 */ "column_reference ::= column_name", + /* 243 */ "column_reference ::= table_name NK_DOT column_name", + /* 244 */ "pseudo_column ::= NK_UNDERLINE ROWTS", + /* 245 */ "pseudo_column ::= TBNAME", + /* 246 */ "pseudo_column ::= NK_UNDERLINE QSTARTTS", + /* 247 */ "pseudo_column ::= NK_UNDERLINE QENDTS", + /* 248 */ "pseudo_column ::= NK_UNDERLINE WSTARTTS", + /* 249 */ "pseudo_column ::= NK_UNDERLINE WENDTS", + /* 250 */ "pseudo_column ::= NK_UNDERLINE WDURATION", + /* 251 */ "predicate ::= expression compare_op expression", + /* 252 */ "predicate ::= expression BETWEEN expression AND expression", + /* 253 */ "predicate ::= expression NOT BETWEEN expression AND expression", + /* 254 */ "predicate ::= expression IS NULL", + /* 255 */ "predicate ::= expression IS NOT NULL", + /* 256 */ "predicate ::= expression in_op in_predicate_value", + /* 257 */ "compare_op ::= NK_LT", + /* 258 */ "compare_op ::= NK_GT", + /* 259 */ "compare_op ::= NK_LE", + /* 260 */ "compare_op ::= NK_GE", + /* 261 */ "compare_op ::= NK_NE", + /* 262 */ "compare_op ::= NK_EQ", + /* 263 */ "compare_op ::= LIKE", + /* 264 */ "compare_op ::= NOT LIKE", + /* 265 */ "compare_op ::= MATCH", + /* 266 */ "compare_op ::= NMATCH", + /* 267 */ "in_op ::= IN", + /* 268 */ "in_op ::= NOT IN", + /* 269 */ "in_predicate_value ::= NK_LP expression_list NK_RP", + /* 270 */ "boolean_value_expression ::= boolean_primary", + /* 271 */ "boolean_value_expression ::= NOT boolean_primary", + /* 272 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 273 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 274 */ "boolean_primary ::= predicate", + /* 275 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 276 */ "common_expression ::= expression", + /* 277 */ "common_expression ::= boolean_value_expression", + /* 278 */ "from_clause ::= FROM table_reference_list", + /* 279 */ "table_reference_list ::= table_reference", + /* 280 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 281 */ "table_reference ::= table_primary", + /* 282 */ "table_reference ::= joined_table", + /* 283 */ "table_primary ::= table_name alias_opt", + /* 284 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 285 */ "table_primary ::= subquery alias_opt", + /* 286 */ "table_primary ::= parenthesized_joined_table", + /* 287 */ "alias_opt ::=", + /* 288 */ "alias_opt ::= table_alias", + /* 289 */ "alias_opt ::= AS table_alias", + /* 290 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 291 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 292 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 293 */ "join_type ::=", + /* 294 */ "join_type ::= INNER", + /* 295 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 296 */ "set_quantifier_opt ::=", + /* 297 */ "set_quantifier_opt ::= DISTINCT", + /* 298 */ "set_quantifier_opt ::= ALL", + /* 299 */ "select_list ::= NK_STAR", + /* 300 */ "select_list ::= select_sublist", + /* 301 */ "select_sublist ::= select_item", + /* 302 */ "select_sublist ::= select_sublist NK_COMMA select_item", + /* 303 */ "select_item ::= common_expression", + /* 304 */ "select_item ::= common_expression column_alias", + /* 305 */ "select_item ::= common_expression AS column_alias", + /* 306 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 307 */ "where_clause_opt ::=", + /* 308 */ "where_clause_opt ::= WHERE search_condition", + /* 309 */ "partition_by_clause_opt ::=", + /* 310 */ "partition_by_clause_opt ::= PARTITION BY expression_list", + /* 311 */ "twindow_clause_opt ::=", + /* 312 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 313 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP", + /* 314 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 315 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 316 */ "sliding_opt ::=", + /* 317 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 318 */ "fill_opt ::=", + /* 319 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 320 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 321 */ "fill_mode ::= NONE", + /* 322 */ "fill_mode ::= PREV", + /* 323 */ "fill_mode ::= NULL", + /* 324 */ "fill_mode ::= LINEAR", + /* 325 */ "fill_mode ::= NEXT", + /* 326 */ "group_by_clause_opt ::=", + /* 327 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 328 */ "group_by_list ::= expression", + /* 329 */ "group_by_list ::= group_by_list NK_COMMA expression", + /* 330 */ "having_clause_opt ::=", + /* 331 */ "having_clause_opt ::= HAVING search_condition", + /* 332 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 333 */ "query_expression_body ::= query_primary", + /* 334 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", + /* 335 */ "query_primary ::= query_specification", + /* 336 */ "order_by_clause_opt ::=", + /* 337 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 338 */ "slimit_clause_opt ::=", + /* 339 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 340 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 341 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 342 */ "limit_clause_opt ::=", + /* 343 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 344 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 345 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 346 */ "subquery ::= NK_LP query_expression NK_RP", + /* 347 */ "search_condition ::= common_expression", + /* 348 */ "sort_specification_list ::= sort_specification", + /* 349 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 350 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", + /* 351 */ "ordering_specification_opt ::=", + /* 352 */ "ordering_specification_opt ::= ASC", + /* 353 */ "ordering_specification_opt ::= DESC", + /* 354 */ "null_ordering_opt ::=", + /* 355 */ "null_ordering_opt ::= NULLS FIRST", + /* 356 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -1478,148 +1498,148 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 176: /* cmd */ - case 179: /* literal */ - case 186: /* db_options */ - case 188: /* alter_db_options */ - case 190: /* full_table_name */ - case 193: /* table_options */ - case 197: /* alter_table_clause */ - case 198: /* alter_table_options */ - case 201: /* create_subtable_clause */ - case 204: /* drop_table_clause */ - case 207: /* column_def */ - case 210: /* col_name */ - case 211: /* db_name_cond_opt */ - case 212: /* like_pattern_opt */ - case 213: /* table_name_cond */ - case 214: /* from_db_opt */ - case 215: /* func_name */ - case 218: /* index_options */ - case 220: /* duration_literal */ - case 221: /* sliding_opt */ - case 222: /* func */ - case 225: /* query_expression */ - case 227: /* explain_options */ - case 228: /* signed */ - case 229: /* signed_literal */ - case 232: /* expression */ - case 233: /* pseudo_column */ - case 234: /* column_reference */ - case 235: /* subquery */ - case 236: /* predicate */ - case 239: /* in_predicate_value */ - case 240: /* boolean_value_expression */ - case 241: /* boolean_primary */ - case 242: /* common_expression */ - case 243: /* from_clause */ - case 244: /* table_reference_list */ - case 245: /* table_reference */ - case 246: /* table_primary */ - case 247: /* joined_table */ - case 249: /* parenthesized_joined_table */ - case 251: /* search_condition */ - case 252: /* query_specification */ - case 255: /* where_clause_opt */ - case 257: /* twindow_clause_opt */ - case 259: /* having_clause_opt */ - case 261: /* select_item */ - case 262: /* fill_opt */ - case 265: /* query_expression_body */ - case 267: /* slimit_clause_opt */ - case 268: /* limit_clause_opt */ - case 269: /* query_primary */ - case 271: /* sort_specification */ + case 179: /* cmd */ + case 182: /* literal */ + case 189: /* db_options */ + case 191: /* alter_db_options */ + case 193: /* full_table_name */ + case 196: /* table_options */ + case 200: /* alter_table_clause */ + case 201: /* alter_table_options */ + case 204: /* create_subtable_clause */ + case 207: /* drop_table_clause */ + case 210: /* column_def */ + case 213: /* col_name */ + case 214: /* db_name_cond_opt */ + case 215: /* like_pattern_opt */ + case 216: /* table_name_cond */ + case 217: /* from_db_opt */ + case 218: /* func_name */ + case 221: /* index_options */ + case 223: /* duration_literal */ + case 224: /* sliding_opt */ + case 225: /* func */ + case 228: /* query_expression */ + case 230: /* explain_options */ + case 231: /* signed */ + case 232: /* signed_literal */ + case 235: /* expression */ + case 236: /* pseudo_column */ + case 237: /* column_reference */ + case 238: /* subquery */ + case 239: /* predicate */ + case 242: /* in_predicate_value */ + case 243: /* boolean_value_expression */ + case 244: /* boolean_primary */ + case 245: /* common_expression */ + case 246: /* from_clause */ + case 247: /* table_reference_list */ + case 248: /* table_reference */ + case 249: /* table_primary */ + case 250: /* joined_table */ + case 252: /* parenthesized_joined_table */ + case 254: /* search_condition */ + case 255: /* query_specification */ + case 258: /* where_clause_opt */ + case 260: /* twindow_clause_opt */ + case 262: /* having_clause_opt */ + case 264: /* select_item */ + case 265: /* fill_opt */ + case 268: /* query_expression_body */ + case 270: /* slimit_clause_opt */ + case 271: /* limit_clause_opt */ + case 272: /* query_primary */ + case 274: /* sort_specification */ { - nodesDestroyNode((yypminor->yy364)); + nodesDestroyNode((yypminor->yy46)); } break; - case 177: /* account_options */ - case 178: /* alter_account_options */ - case 180: /* alter_account_option */ + case 180: /* account_options */ + case 181: /* alter_account_options */ + case 183: /* alter_account_option */ { } break; - case 181: /* user_name */ - case 182: /* dnode_endpoint */ - case 183: /* dnode_host_name */ - case 185: /* db_name */ - case 199: /* column_name */ - case 206: /* table_name */ - case 216: /* function_name */ - case 217: /* index_name */ - case 224: /* topic_name */ - case 230: /* table_alias */ - case 231: /* column_alias */ - case 248: /* alias_opt */ + case 184: /* user_name */ + case 185: /* dnode_endpoint */ + case 186: /* dnode_host_name */ + case 188: /* db_name */ + case 202: /* column_name */ + case 209: /* table_name */ + case 219: /* function_name */ + case 220: /* index_name */ + case 227: /* topic_name */ + case 233: /* table_alias */ + case 234: /* column_alias */ + case 251: /* alias_opt */ { } break; - case 184: /* not_exists_opt */ - case 187: /* exists_opt */ - case 226: /* analyze_opt */ - case 253: /* set_quantifier_opt */ + case 187: /* not_exists_opt */ + case 190: /* exists_opt */ + case 229: /* analyze_opt */ + case 256: /* set_quantifier_opt */ { } break; - case 189: /* alter_db_option */ - case 209: /* alter_table_option */ + case 192: /* alter_db_option */ + case 212: /* alter_table_option */ { } break; - case 191: /* column_def_list */ - case 192: /* tags_def_opt */ - case 194: /* multi_create_clause */ - case 195: /* tags_def */ - case 196: /* multi_drop_clause */ - case 202: /* specific_tags_opt */ - case 203: /* literal_list */ - case 205: /* col_name_list */ - case 208: /* func_name_list */ - case 219: /* func_list */ - case 223: /* expression_list */ - case 254: /* select_list */ - case 256: /* partition_by_clause_opt */ - case 258: /* group_by_clause_opt */ - case 260: /* select_sublist */ - case 264: /* group_by_list */ - case 266: /* order_by_clause_opt */ - case 270: /* sort_specification_list */ + case 194: /* column_def_list */ + case 195: /* tags_def_opt */ + case 197: /* multi_create_clause */ + case 198: /* tags_def */ + case 199: /* multi_drop_clause */ + case 205: /* specific_tags_opt */ + case 206: /* literal_list */ + case 208: /* col_name_list */ + case 211: /* func_name_list */ + case 222: /* func_list */ + case 226: /* expression_list */ + case 257: /* select_list */ + case 259: /* partition_by_clause_opt */ + case 261: /* group_by_clause_opt */ + case 263: /* select_sublist */ + case 267: /* group_by_list */ + case 269: /* order_by_clause_opt */ + case 273: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy40)); + nodesDestroyList((yypminor->yy194)); } break; - case 200: /* type_name */ + case 203: /* type_name */ { } break; - case 237: /* compare_op */ - case 238: /* in_op */ + case 240: /* compare_op */ + case 241: /* in_op */ { } break; - case 250: /* join_type */ + case 253: /* join_type */ { } break; - case 263: /* fill_mode */ + case 266: /* fill_mode */ { } break; - case 272: /* ordering_specification_opt */ + case 275: /* ordering_specification_opt */ { } break; - case 273: /* null_ordering_opt */ + case 276: /* null_ordering_opt */ { } @@ -1918,360 +1938,363 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { - { 176, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 176, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 177, 0 }, /* (2) account_options ::= */ - { 177, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 177, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 177, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 177, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 177, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 177, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 177, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 177, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 177, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 178, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 178, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 180, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 180, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 180, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 180, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 180, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 180, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 180, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 180, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 180, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 180, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 176, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ - { 176, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 176, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ - { 176, -3 }, /* (27) cmd ::= DROP USER user_name */ - { 176, -3 }, /* (28) cmd ::= CREATE DNODE dnode_endpoint */ - { 176, -5 }, /* (29) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ - { 176, -3 }, /* (30) cmd ::= DROP DNODE NK_INTEGER */ - { 176, -3 }, /* (31) cmd ::= DROP DNODE dnode_endpoint */ - { 176, -4 }, /* (32) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 176, -5 }, /* (33) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 176, -4 }, /* (34) cmd ::= ALTER ALL DNODES NK_STRING */ - { 176, -5 }, /* (35) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 182, -1 }, /* (36) dnode_endpoint ::= NK_STRING */ - { 183, -1 }, /* (37) dnode_host_name ::= NK_ID */ - { 183, -1 }, /* (38) dnode_host_name ::= NK_IPTOKEN */ - { 176, -3 }, /* (39) cmd ::= ALTER LOCAL NK_STRING */ - { 176, -4 }, /* (40) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 176, -5 }, /* (41) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 176, -5 }, /* (42) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 176, -5 }, /* (43) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 176, -4 }, /* (44) cmd ::= DROP DATABASE exists_opt db_name */ - { 176, -2 }, /* (45) cmd ::= USE db_name */ - { 176, -4 }, /* (46) cmd ::= ALTER DATABASE db_name alter_db_options */ - { 184, -3 }, /* (47) not_exists_opt ::= IF NOT EXISTS */ - { 184, 0 }, /* (48) not_exists_opt ::= */ - { 187, -2 }, /* (49) exists_opt ::= IF EXISTS */ - { 187, 0 }, /* (50) exists_opt ::= */ - { 186, 0 }, /* (51) db_options ::= */ - { 186, -3 }, /* (52) db_options ::= db_options BLOCKS NK_INTEGER */ - { 186, -3 }, /* (53) db_options ::= db_options CACHE NK_INTEGER */ - { 186, -3 }, /* (54) db_options ::= db_options CACHELAST NK_INTEGER */ - { 186, -3 }, /* (55) db_options ::= db_options COMP NK_INTEGER */ - { 186, -3 }, /* (56) db_options ::= db_options DAYS NK_INTEGER */ - { 186, -3 }, /* (57) db_options ::= db_options FSYNC NK_INTEGER */ - { 186, -3 }, /* (58) db_options ::= db_options MAXROWS NK_INTEGER */ - { 186, -3 }, /* (59) db_options ::= db_options MINROWS NK_INTEGER */ - { 186, -3 }, /* (60) db_options ::= db_options KEEP NK_INTEGER */ - { 186, -3 }, /* (61) db_options ::= db_options PRECISION NK_STRING */ - { 186, -3 }, /* (62) db_options ::= db_options QUORUM NK_INTEGER */ - { 186, -3 }, /* (63) db_options ::= db_options REPLICA NK_INTEGER */ - { 186, -3 }, /* (64) db_options ::= db_options TTL NK_INTEGER */ - { 186, -3 }, /* (65) db_options ::= db_options WAL NK_INTEGER */ - { 186, -3 }, /* (66) db_options ::= db_options VGROUPS NK_INTEGER */ - { 186, -3 }, /* (67) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - { 186, -3 }, /* (68) db_options ::= db_options STREAM_MODE NK_INTEGER */ - { 186, -3 }, /* (69) db_options ::= db_options RETENTIONS NK_STRING */ - { 188, -1 }, /* (70) alter_db_options ::= alter_db_option */ - { 188, -2 }, /* (71) alter_db_options ::= alter_db_options alter_db_option */ - { 189, -2 }, /* (72) alter_db_option ::= BLOCKS NK_INTEGER */ - { 189, -2 }, /* (73) alter_db_option ::= FSYNC NK_INTEGER */ - { 189, -2 }, /* (74) alter_db_option ::= KEEP NK_INTEGER */ - { 189, -2 }, /* (75) alter_db_option ::= WAL NK_INTEGER */ - { 189, -2 }, /* (76) alter_db_option ::= QUORUM NK_INTEGER */ - { 189, -2 }, /* (77) alter_db_option ::= CACHELAST NK_INTEGER */ - { 176, -9 }, /* (78) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 176, -3 }, /* (79) cmd ::= CREATE TABLE multi_create_clause */ - { 176, -9 }, /* (80) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 176, -3 }, /* (81) cmd ::= DROP TABLE multi_drop_clause */ - { 176, -4 }, /* (82) cmd ::= DROP STABLE exists_opt full_table_name */ - { 176, -3 }, /* (83) cmd ::= ALTER TABLE alter_table_clause */ - { 176, -3 }, /* (84) cmd ::= ALTER STABLE alter_table_clause */ - { 197, -2 }, /* (85) alter_table_clause ::= full_table_name alter_table_options */ - { 197, -5 }, /* (86) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 197, -4 }, /* (87) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 197, -5 }, /* (88) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 197, -5 }, /* (89) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 197, -5 }, /* (90) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 197, -4 }, /* (91) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 197, -5 }, /* (92) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 197, -5 }, /* (93) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 197, -6 }, /* (94) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ literal */ - { 194, -1 }, /* (95) multi_create_clause ::= create_subtable_clause */ - { 194, -2 }, /* (96) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 201, -9 }, /* (97) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */ - { 196, -1 }, /* (98) multi_drop_clause ::= drop_table_clause */ - { 196, -2 }, /* (99) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 204, -2 }, /* (100) drop_table_clause ::= exists_opt full_table_name */ - { 202, 0 }, /* (101) specific_tags_opt ::= */ - { 202, -3 }, /* (102) specific_tags_opt ::= NK_LP col_name_list NK_RP */ - { 190, -1 }, /* (103) full_table_name ::= table_name */ - { 190, -3 }, /* (104) full_table_name ::= db_name NK_DOT table_name */ - { 191, -1 }, /* (105) column_def_list ::= column_def */ - { 191, -3 }, /* (106) column_def_list ::= column_def_list NK_COMMA column_def */ - { 207, -2 }, /* (107) column_def ::= column_name type_name */ - { 207, -4 }, /* (108) column_def ::= column_name type_name COMMENT NK_STRING */ - { 200, -1 }, /* (109) type_name ::= BOOL */ - { 200, -1 }, /* (110) type_name ::= TINYINT */ - { 200, -1 }, /* (111) type_name ::= SMALLINT */ - { 200, -1 }, /* (112) type_name ::= INT */ - { 200, -1 }, /* (113) type_name ::= INTEGER */ - { 200, -1 }, /* (114) type_name ::= BIGINT */ - { 200, -1 }, /* (115) type_name ::= FLOAT */ - { 200, -1 }, /* (116) type_name ::= DOUBLE */ - { 200, -4 }, /* (117) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 200, -1 }, /* (118) type_name ::= TIMESTAMP */ - { 200, -4 }, /* (119) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 200, -2 }, /* (120) type_name ::= TINYINT UNSIGNED */ - { 200, -2 }, /* (121) type_name ::= SMALLINT UNSIGNED */ - { 200, -2 }, /* (122) type_name ::= INT UNSIGNED */ - { 200, -2 }, /* (123) type_name ::= BIGINT UNSIGNED */ - { 200, -1 }, /* (124) type_name ::= JSON */ - { 200, -4 }, /* (125) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 200, -1 }, /* (126) type_name ::= MEDIUMBLOB */ - { 200, -1 }, /* (127) type_name ::= BLOB */ - { 200, -4 }, /* (128) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 200, -1 }, /* (129) type_name ::= DECIMAL */ - { 200, -4 }, /* (130) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 200, -6 }, /* (131) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 192, 0 }, /* (132) tags_def_opt ::= */ - { 192, -1 }, /* (133) tags_def_opt ::= tags_def */ - { 195, -4 }, /* (134) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 193, 0 }, /* (135) table_options ::= */ - { 193, -3 }, /* (136) table_options ::= table_options COMMENT NK_STRING */ - { 193, -3 }, /* (137) table_options ::= table_options KEEP NK_INTEGER */ - { 193, -3 }, /* (138) table_options ::= table_options TTL NK_INTEGER */ - { 193, -5 }, /* (139) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 193, -5 }, /* (140) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ - { 193, -3 }, /* (141) table_options ::= table_options FILE_FACTOR NK_FLOAT */ - { 193, -3 }, /* (142) table_options ::= table_options DELAY NK_INTEGER */ - { 198, -1 }, /* (143) alter_table_options ::= alter_table_option */ - { 198, -2 }, /* (144) alter_table_options ::= alter_table_options alter_table_option */ - { 209, -2 }, /* (145) alter_table_option ::= COMMENT NK_STRING */ - { 209, -2 }, /* (146) alter_table_option ::= KEEP NK_INTEGER */ - { 209, -2 }, /* (147) alter_table_option ::= TTL NK_INTEGER */ - { 205, -1 }, /* (148) col_name_list ::= col_name */ - { 205, -3 }, /* (149) col_name_list ::= col_name_list NK_COMMA col_name */ - { 210, -1 }, /* (150) col_name ::= column_name */ - { 176, -2 }, /* (151) cmd ::= SHOW DNODES */ - { 176, -2 }, /* (152) cmd ::= SHOW USERS */ - { 176, -2 }, /* (153) cmd ::= SHOW DATABASES */ - { 176, -4 }, /* (154) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 176, -4 }, /* (155) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 176, -3 }, /* (156) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 176, -2 }, /* (157) cmd ::= SHOW MNODES */ - { 176, -2 }, /* (158) cmd ::= SHOW MODULES */ - { 176, -2 }, /* (159) cmd ::= SHOW QNODES */ - { 176, -2 }, /* (160) cmd ::= SHOW FUNCTIONS */ - { 176, -5 }, /* (161) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 176, -2 }, /* (162) cmd ::= SHOW STREAMS */ - { 211, 0 }, /* (163) db_name_cond_opt ::= */ - { 211, -2 }, /* (164) db_name_cond_opt ::= db_name NK_DOT */ - { 212, 0 }, /* (165) like_pattern_opt ::= */ - { 212, -2 }, /* (166) like_pattern_opt ::= LIKE NK_STRING */ - { 213, -1 }, /* (167) table_name_cond ::= table_name */ - { 214, 0 }, /* (168) from_db_opt ::= */ - { 214, -2 }, /* (169) from_db_opt ::= FROM db_name */ - { 208, -1 }, /* (170) func_name_list ::= func_name */ - { 208, -3 }, /* (171) func_name_list ::= func_name_list NK_COMMA col_name */ - { 215, -1 }, /* (172) func_name ::= function_name */ - { 176, -8 }, /* (173) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ - { 176, -10 }, /* (174) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ - { 176, -6 }, /* (175) cmd ::= DROP INDEX exists_opt index_name ON table_name */ - { 218, 0 }, /* (176) index_options ::= */ - { 218, -9 }, /* (177) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ - { 218, -11 }, /* (178) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ - { 219, -1 }, /* (179) func_list ::= func */ - { 219, -3 }, /* (180) func_list ::= func_list NK_COMMA func */ - { 222, -4 }, /* (181) func ::= function_name NK_LP expression_list NK_RP */ - { 176, -6 }, /* (182) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ - { 176, -6 }, /* (183) cmd ::= CREATE TOPIC not_exists_opt topic_name AS db_name */ - { 176, -4 }, /* (184) cmd ::= DROP TOPIC exists_opt topic_name */ - { 176, -4 }, /* (185) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ - { 226, 0 }, /* (186) analyze_opt ::= */ - { 226, -1 }, /* (187) analyze_opt ::= ANALYZE */ - { 227, 0 }, /* (188) explain_options ::= */ - { 227, -3 }, /* (189) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 227, -3 }, /* (190) explain_options ::= explain_options RATIO NK_FLOAT */ - { 176, -1 }, /* (191) cmd ::= query_expression */ - { 179, -1 }, /* (192) literal ::= NK_INTEGER */ - { 179, -1 }, /* (193) literal ::= NK_FLOAT */ - { 179, -1 }, /* (194) literal ::= NK_STRING */ - { 179, -1 }, /* (195) literal ::= NK_BOOL */ - { 179, -2 }, /* (196) literal ::= TIMESTAMP NK_STRING */ - { 179, -1 }, /* (197) literal ::= duration_literal */ - { 179, -1 }, /* (198) literal ::= NULL */ - { 220, -1 }, /* (199) duration_literal ::= NK_VARIABLE */ - { 228, -1 }, /* (200) signed ::= NK_INTEGER */ - { 228, -2 }, /* (201) signed ::= NK_PLUS NK_INTEGER */ - { 228, -2 }, /* (202) signed ::= NK_MINUS NK_INTEGER */ - { 228, -1 }, /* (203) signed ::= NK_FLOAT */ - { 228, -2 }, /* (204) signed ::= NK_PLUS NK_FLOAT */ - { 228, -2 }, /* (205) signed ::= NK_MINUS NK_FLOAT */ - { 229, -1 }, /* (206) signed_literal ::= signed */ - { 229, -1 }, /* (207) signed_literal ::= NK_STRING */ - { 229, -1 }, /* (208) signed_literal ::= NK_BOOL */ - { 229, -2 }, /* (209) signed_literal ::= TIMESTAMP NK_STRING */ - { 229, -1 }, /* (210) signed_literal ::= duration_literal */ - { 229, -1 }, /* (211) signed_literal ::= NULL */ - { 203, -1 }, /* (212) literal_list ::= signed_literal */ - { 203, -3 }, /* (213) literal_list ::= literal_list NK_COMMA signed_literal */ - { 185, -1 }, /* (214) db_name ::= NK_ID */ - { 206, -1 }, /* (215) table_name ::= NK_ID */ - { 199, -1 }, /* (216) column_name ::= NK_ID */ - { 216, -1 }, /* (217) function_name ::= NK_ID */ - { 230, -1 }, /* (218) table_alias ::= NK_ID */ - { 231, -1 }, /* (219) column_alias ::= NK_ID */ - { 181, -1 }, /* (220) user_name ::= NK_ID */ - { 217, -1 }, /* (221) index_name ::= NK_ID */ - { 224, -1 }, /* (222) topic_name ::= NK_ID */ - { 232, -1 }, /* (223) expression ::= literal */ - { 232, -1 }, /* (224) expression ::= pseudo_column */ - { 232, -1 }, /* (225) expression ::= column_reference */ - { 232, -4 }, /* (226) expression ::= function_name NK_LP expression_list NK_RP */ - { 232, -4 }, /* (227) expression ::= function_name NK_LP NK_STAR NK_RP */ - { 232, -1 }, /* (228) expression ::= subquery */ - { 232, -3 }, /* (229) expression ::= NK_LP expression NK_RP */ - { 232, -2 }, /* (230) expression ::= NK_PLUS expression */ - { 232, -2 }, /* (231) expression ::= NK_MINUS expression */ - { 232, -3 }, /* (232) expression ::= expression NK_PLUS expression */ - { 232, -3 }, /* (233) expression ::= expression NK_MINUS expression */ - { 232, -3 }, /* (234) expression ::= expression NK_STAR expression */ - { 232, -3 }, /* (235) expression ::= expression NK_SLASH expression */ - { 232, -3 }, /* (236) expression ::= expression NK_REM expression */ - { 223, -1 }, /* (237) expression_list ::= expression */ - { 223, -3 }, /* (238) expression_list ::= expression_list NK_COMMA expression */ - { 234, -1 }, /* (239) column_reference ::= column_name */ - { 234, -3 }, /* (240) column_reference ::= table_name NK_DOT column_name */ - { 233, -2 }, /* (241) pseudo_column ::= NK_UNDERLINE ROWTS */ - { 233, -1 }, /* (242) pseudo_column ::= TBNAME */ - { 233, -2 }, /* (243) pseudo_column ::= NK_UNDERLINE QSTARTTS */ - { 233, -2 }, /* (244) pseudo_column ::= NK_UNDERLINE QENDTS */ - { 233, -2 }, /* (245) pseudo_column ::= NK_UNDERLINE WSTARTTS */ - { 233, -2 }, /* (246) pseudo_column ::= NK_UNDERLINE WENDTS */ - { 233, -2 }, /* (247) pseudo_column ::= NK_UNDERLINE WDURATION */ - { 236, -3 }, /* (248) predicate ::= expression compare_op expression */ - { 236, -5 }, /* (249) predicate ::= expression BETWEEN expression AND expression */ - { 236, -6 }, /* (250) predicate ::= expression NOT BETWEEN expression AND expression */ - { 236, -3 }, /* (251) predicate ::= expression IS NULL */ - { 236, -4 }, /* (252) predicate ::= expression IS NOT NULL */ - { 236, -3 }, /* (253) predicate ::= expression in_op in_predicate_value */ - { 237, -1 }, /* (254) compare_op ::= NK_LT */ - { 237, -1 }, /* (255) compare_op ::= NK_GT */ - { 237, -1 }, /* (256) compare_op ::= NK_LE */ - { 237, -1 }, /* (257) compare_op ::= NK_GE */ - { 237, -1 }, /* (258) compare_op ::= NK_NE */ - { 237, -1 }, /* (259) compare_op ::= NK_EQ */ - { 237, -1 }, /* (260) compare_op ::= LIKE */ - { 237, -2 }, /* (261) compare_op ::= NOT LIKE */ - { 237, -1 }, /* (262) compare_op ::= MATCH */ - { 237, -1 }, /* (263) compare_op ::= NMATCH */ - { 238, -1 }, /* (264) in_op ::= IN */ - { 238, -2 }, /* (265) in_op ::= NOT IN */ - { 239, -3 }, /* (266) in_predicate_value ::= NK_LP expression_list NK_RP */ - { 240, -1 }, /* (267) boolean_value_expression ::= boolean_primary */ - { 240, -2 }, /* (268) boolean_value_expression ::= NOT boolean_primary */ - { 240, -3 }, /* (269) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 240, -3 }, /* (270) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 241, -1 }, /* (271) boolean_primary ::= predicate */ - { 241, -3 }, /* (272) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 242, -1 }, /* (273) common_expression ::= expression */ - { 242, -1 }, /* (274) common_expression ::= boolean_value_expression */ - { 243, -2 }, /* (275) from_clause ::= FROM table_reference_list */ - { 244, -1 }, /* (276) table_reference_list ::= table_reference */ - { 244, -3 }, /* (277) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 245, -1 }, /* (278) table_reference ::= table_primary */ - { 245, -1 }, /* (279) table_reference ::= joined_table */ - { 246, -2 }, /* (280) table_primary ::= table_name alias_opt */ - { 246, -4 }, /* (281) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 246, -2 }, /* (282) table_primary ::= subquery alias_opt */ - { 246, -1 }, /* (283) table_primary ::= parenthesized_joined_table */ - { 248, 0 }, /* (284) alias_opt ::= */ - { 248, -1 }, /* (285) alias_opt ::= table_alias */ - { 248, -2 }, /* (286) alias_opt ::= AS table_alias */ - { 249, -3 }, /* (287) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 249, -3 }, /* (288) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 247, -6 }, /* (289) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 250, 0 }, /* (290) join_type ::= */ - { 250, -1 }, /* (291) join_type ::= INNER */ - { 252, -9 }, /* (292) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - { 253, 0 }, /* (293) set_quantifier_opt ::= */ - { 253, -1 }, /* (294) set_quantifier_opt ::= DISTINCT */ - { 253, -1 }, /* (295) set_quantifier_opt ::= ALL */ - { 254, -1 }, /* (296) select_list ::= NK_STAR */ - { 254, -1 }, /* (297) select_list ::= select_sublist */ - { 260, -1 }, /* (298) select_sublist ::= select_item */ - { 260, -3 }, /* (299) select_sublist ::= select_sublist NK_COMMA select_item */ - { 261, -1 }, /* (300) select_item ::= common_expression */ - { 261, -2 }, /* (301) select_item ::= common_expression column_alias */ - { 261, -3 }, /* (302) select_item ::= common_expression AS column_alias */ - { 261, -3 }, /* (303) select_item ::= table_name NK_DOT NK_STAR */ - { 255, 0 }, /* (304) where_clause_opt ::= */ - { 255, -2 }, /* (305) where_clause_opt ::= WHERE search_condition */ - { 256, 0 }, /* (306) partition_by_clause_opt ::= */ - { 256, -3 }, /* (307) partition_by_clause_opt ::= PARTITION BY expression_list */ - { 257, 0 }, /* (308) twindow_clause_opt ::= */ - { 257, -6 }, /* (309) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 257, -4 }, /* (310) twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */ - { 257, -6 }, /* (311) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 257, -8 }, /* (312) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 221, 0 }, /* (313) sliding_opt ::= */ - { 221, -4 }, /* (314) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 262, 0 }, /* (315) fill_opt ::= */ - { 262, -4 }, /* (316) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 262, -6 }, /* (317) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 263, -1 }, /* (318) fill_mode ::= NONE */ - { 263, -1 }, /* (319) fill_mode ::= PREV */ - { 263, -1 }, /* (320) fill_mode ::= NULL */ - { 263, -1 }, /* (321) fill_mode ::= LINEAR */ - { 263, -1 }, /* (322) fill_mode ::= NEXT */ - { 258, 0 }, /* (323) group_by_clause_opt ::= */ - { 258, -3 }, /* (324) group_by_clause_opt ::= GROUP BY group_by_list */ - { 264, -1 }, /* (325) group_by_list ::= expression */ - { 264, -3 }, /* (326) group_by_list ::= group_by_list NK_COMMA expression */ - { 259, 0 }, /* (327) having_clause_opt ::= */ - { 259, -2 }, /* (328) having_clause_opt ::= HAVING search_condition */ - { 225, -4 }, /* (329) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 265, -1 }, /* (330) query_expression_body ::= query_primary */ - { 265, -4 }, /* (331) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ - { 269, -1 }, /* (332) query_primary ::= query_specification */ - { 266, 0 }, /* (333) order_by_clause_opt ::= */ - { 266, -3 }, /* (334) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 267, 0 }, /* (335) slimit_clause_opt ::= */ - { 267, -2 }, /* (336) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 267, -4 }, /* (337) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 267, -4 }, /* (338) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 268, 0 }, /* (339) limit_clause_opt ::= */ - { 268, -2 }, /* (340) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 268, -4 }, /* (341) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 268, -4 }, /* (342) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 235, -3 }, /* (343) subquery ::= NK_LP query_expression NK_RP */ - { 251, -1 }, /* (344) search_condition ::= common_expression */ - { 270, -1 }, /* (345) sort_specification_list ::= sort_specification */ - { 270, -3 }, /* (346) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 271, -3 }, /* (347) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ - { 272, 0 }, /* (348) ordering_specification_opt ::= */ - { 272, -1 }, /* (349) ordering_specification_opt ::= ASC */ - { 272, -1 }, /* (350) ordering_specification_opt ::= DESC */ - { 273, 0 }, /* (351) null_ordering_opt ::= */ - { 273, -2 }, /* (352) null_ordering_opt ::= NULLS FIRST */ - { 273, -2 }, /* (353) null_ordering_opt ::= NULLS LAST */ + { 179, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + { 179, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + { 180, 0 }, /* (2) account_options ::= */ + { 180, -3 }, /* (3) account_options ::= account_options PPS literal */ + { 180, -3 }, /* (4) account_options ::= account_options TSERIES literal */ + { 180, -3 }, /* (5) account_options ::= account_options STORAGE literal */ + { 180, -3 }, /* (6) account_options ::= account_options STREAMS literal */ + { 180, -3 }, /* (7) account_options ::= account_options QTIME literal */ + { 180, -3 }, /* (8) account_options ::= account_options DBS literal */ + { 180, -3 }, /* (9) account_options ::= account_options USERS literal */ + { 180, -3 }, /* (10) account_options ::= account_options CONNS literal */ + { 180, -3 }, /* (11) account_options ::= account_options STATE literal */ + { 181, -1 }, /* (12) alter_account_options ::= alter_account_option */ + { 181, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + { 183, -2 }, /* (14) alter_account_option ::= PASS literal */ + { 183, -2 }, /* (15) alter_account_option ::= PPS literal */ + { 183, -2 }, /* (16) alter_account_option ::= TSERIES literal */ + { 183, -2 }, /* (17) alter_account_option ::= STORAGE literal */ + { 183, -2 }, /* (18) alter_account_option ::= STREAMS literal */ + { 183, -2 }, /* (19) alter_account_option ::= QTIME literal */ + { 183, -2 }, /* (20) alter_account_option ::= DBS literal */ + { 183, -2 }, /* (21) alter_account_option ::= USERS literal */ + { 183, -2 }, /* (22) alter_account_option ::= CONNS literal */ + { 183, -2 }, /* (23) alter_account_option ::= STATE literal */ + { 179, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ + { 179, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + { 179, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ + { 179, -3 }, /* (27) cmd ::= DROP USER user_name */ + { 179, -3 }, /* (28) cmd ::= CREATE DNODE dnode_endpoint */ + { 179, -5 }, /* (29) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ + { 179, -3 }, /* (30) cmd ::= DROP DNODE NK_INTEGER */ + { 179, -3 }, /* (31) cmd ::= DROP DNODE dnode_endpoint */ + { 179, -4 }, /* (32) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + { 179, -5 }, /* (33) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + { 179, -4 }, /* (34) cmd ::= ALTER ALL DNODES NK_STRING */ + { 179, -5 }, /* (35) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + { 185, -1 }, /* (36) dnode_endpoint ::= NK_STRING */ + { 186, -1 }, /* (37) dnode_host_name ::= NK_ID */ + { 186, -1 }, /* (38) dnode_host_name ::= NK_IPTOKEN */ + { 179, -3 }, /* (39) cmd ::= ALTER LOCAL NK_STRING */ + { 179, -4 }, /* (40) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + { 179, -5 }, /* (41) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + { 179, -5 }, /* (42) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + { 179, -5 }, /* (43) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + { 179, -4 }, /* (44) cmd ::= DROP DATABASE exists_opt db_name */ + { 179, -2 }, /* (45) cmd ::= USE db_name */ + { 179, -4 }, /* (46) cmd ::= ALTER DATABASE db_name alter_db_options */ + { 187, -3 }, /* (47) not_exists_opt ::= IF NOT EXISTS */ + { 187, 0 }, /* (48) not_exists_opt ::= */ + { 190, -2 }, /* (49) exists_opt ::= IF EXISTS */ + { 190, 0 }, /* (50) exists_opt ::= */ + { 189, 0 }, /* (51) db_options ::= */ + { 189, -3 }, /* (52) db_options ::= db_options BLOCKS NK_INTEGER */ + { 189, -3 }, /* (53) db_options ::= db_options CACHE NK_INTEGER */ + { 189, -3 }, /* (54) db_options ::= db_options CACHELAST NK_INTEGER */ + { 189, -3 }, /* (55) db_options ::= db_options COMP NK_INTEGER */ + { 189, -3 }, /* (56) db_options ::= db_options DAYS NK_INTEGER */ + { 189, -3 }, /* (57) db_options ::= db_options FSYNC NK_INTEGER */ + { 189, -3 }, /* (58) db_options ::= db_options MAXROWS NK_INTEGER */ + { 189, -3 }, /* (59) db_options ::= db_options MINROWS NK_INTEGER */ + { 189, -3 }, /* (60) db_options ::= db_options KEEP NK_INTEGER */ + { 189, -3 }, /* (61) db_options ::= db_options PRECISION NK_STRING */ + { 189, -3 }, /* (62) db_options ::= db_options QUORUM NK_INTEGER */ + { 189, -3 }, /* (63) db_options ::= db_options REPLICA NK_INTEGER */ + { 189, -3 }, /* (64) db_options ::= db_options TTL NK_INTEGER */ + { 189, -3 }, /* (65) db_options ::= db_options WAL NK_INTEGER */ + { 189, -3 }, /* (66) db_options ::= db_options VGROUPS NK_INTEGER */ + { 189, -3 }, /* (67) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 189, -3 }, /* (68) db_options ::= db_options STREAM_MODE NK_INTEGER */ + { 189, -3 }, /* (69) db_options ::= db_options RETENTIONS NK_STRING */ + { 191, -1 }, /* (70) alter_db_options ::= alter_db_option */ + { 191, -2 }, /* (71) alter_db_options ::= alter_db_options alter_db_option */ + { 192, -2 }, /* (72) alter_db_option ::= BLOCKS NK_INTEGER */ + { 192, -2 }, /* (73) alter_db_option ::= FSYNC NK_INTEGER */ + { 192, -2 }, /* (74) alter_db_option ::= KEEP NK_INTEGER */ + { 192, -2 }, /* (75) alter_db_option ::= WAL NK_INTEGER */ + { 192, -2 }, /* (76) alter_db_option ::= QUORUM NK_INTEGER */ + { 192, -2 }, /* (77) alter_db_option ::= CACHELAST NK_INTEGER */ + { 179, -9 }, /* (78) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 179, -3 }, /* (79) cmd ::= CREATE TABLE multi_create_clause */ + { 179, -9 }, /* (80) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 179, -3 }, /* (81) cmd ::= DROP TABLE multi_drop_clause */ + { 179, -4 }, /* (82) cmd ::= DROP STABLE exists_opt full_table_name */ + { 179, -3 }, /* (83) cmd ::= ALTER TABLE alter_table_clause */ + { 179, -3 }, /* (84) cmd ::= ALTER STABLE alter_table_clause */ + { 200, -2 }, /* (85) alter_table_clause ::= full_table_name alter_table_options */ + { 200, -5 }, /* (86) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 200, -4 }, /* (87) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 200, -5 }, /* (88) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 200, -5 }, /* (89) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 200, -5 }, /* (90) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 200, -4 }, /* (91) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 200, -5 }, /* (92) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 200, -5 }, /* (93) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 200, -6 }, /* (94) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ literal */ + { 197, -1 }, /* (95) multi_create_clause ::= create_subtable_clause */ + { 197, -2 }, /* (96) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 204, -9 }, /* (97) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */ + { 199, -1 }, /* (98) multi_drop_clause ::= drop_table_clause */ + { 199, -2 }, /* (99) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 207, -2 }, /* (100) drop_table_clause ::= exists_opt full_table_name */ + { 205, 0 }, /* (101) specific_tags_opt ::= */ + { 205, -3 }, /* (102) specific_tags_opt ::= NK_LP col_name_list NK_RP */ + { 193, -1 }, /* (103) full_table_name ::= table_name */ + { 193, -3 }, /* (104) full_table_name ::= db_name NK_DOT table_name */ + { 194, -1 }, /* (105) column_def_list ::= column_def */ + { 194, -3 }, /* (106) column_def_list ::= column_def_list NK_COMMA column_def */ + { 210, -2 }, /* (107) column_def ::= column_name type_name */ + { 210, -4 }, /* (108) column_def ::= column_name type_name COMMENT NK_STRING */ + { 203, -1 }, /* (109) type_name ::= BOOL */ + { 203, -1 }, /* (110) type_name ::= TINYINT */ + { 203, -1 }, /* (111) type_name ::= SMALLINT */ + { 203, -1 }, /* (112) type_name ::= INT */ + { 203, -1 }, /* (113) type_name ::= INTEGER */ + { 203, -1 }, /* (114) type_name ::= BIGINT */ + { 203, -1 }, /* (115) type_name ::= FLOAT */ + { 203, -1 }, /* (116) type_name ::= DOUBLE */ + { 203, -4 }, /* (117) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 203, -1 }, /* (118) type_name ::= TIMESTAMP */ + { 203, -4 }, /* (119) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 203, -2 }, /* (120) type_name ::= TINYINT UNSIGNED */ + { 203, -2 }, /* (121) type_name ::= SMALLINT UNSIGNED */ + { 203, -2 }, /* (122) type_name ::= INT UNSIGNED */ + { 203, -2 }, /* (123) type_name ::= BIGINT UNSIGNED */ + { 203, -1 }, /* (124) type_name ::= JSON */ + { 203, -4 }, /* (125) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 203, -1 }, /* (126) type_name ::= MEDIUMBLOB */ + { 203, -1 }, /* (127) type_name ::= BLOB */ + { 203, -4 }, /* (128) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 203, -1 }, /* (129) type_name ::= DECIMAL */ + { 203, -4 }, /* (130) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 203, -6 }, /* (131) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 195, 0 }, /* (132) tags_def_opt ::= */ + { 195, -1 }, /* (133) tags_def_opt ::= tags_def */ + { 198, -4 }, /* (134) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 196, 0 }, /* (135) table_options ::= */ + { 196, -3 }, /* (136) table_options ::= table_options COMMENT NK_STRING */ + { 196, -3 }, /* (137) table_options ::= table_options KEEP NK_INTEGER */ + { 196, -3 }, /* (138) table_options ::= table_options TTL NK_INTEGER */ + { 196, -5 }, /* (139) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 196, -5 }, /* (140) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ + { 196, -3 }, /* (141) table_options ::= table_options FILE_FACTOR NK_FLOAT */ + { 196, -3 }, /* (142) table_options ::= table_options DELAY NK_INTEGER */ + { 201, -1 }, /* (143) alter_table_options ::= alter_table_option */ + { 201, -2 }, /* (144) alter_table_options ::= alter_table_options alter_table_option */ + { 212, -2 }, /* (145) alter_table_option ::= COMMENT NK_STRING */ + { 212, -2 }, /* (146) alter_table_option ::= KEEP NK_INTEGER */ + { 212, -2 }, /* (147) alter_table_option ::= TTL NK_INTEGER */ + { 208, -1 }, /* (148) col_name_list ::= col_name */ + { 208, -3 }, /* (149) col_name_list ::= col_name_list NK_COMMA col_name */ + { 213, -1 }, /* (150) col_name ::= column_name */ + { 179, -2 }, /* (151) cmd ::= SHOW DNODES */ + { 179, -2 }, /* (152) cmd ::= SHOW USERS */ + { 179, -2 }, /* (153) cmd ::= SHOW DATABASES */ + { 179, -4 }, /* (154) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 179, -4 }, /* (155) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 179, -3 }, /* (156) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 179, -2 }, /* (157) cmd ::= SHOW MNODES */ + { 179, -2 }, /* (158) cmd ::= SHOW MODULES */ + { 179, -2 }, /* (159) cmd ::= SHOW QNODES */ + { 179, -2 }, /* (160) cmd ::= SHOW FUNCTIONS */ + { 179, -5 }, /* (161) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 179, -2 }, /* (162) cmd ::= SHOW STREAMS */ + { 214, 0 }, /* (163) db_name_cond_opt ::= */ + { 214, -2 }, /* (164) db_name_cond_opt ::= db_name NK_DOT */ + { 215, 0 }, /* (165) like_pattern_opt ::= */ + { 215, -2 }, /* (166) like_pattern_opt ::= LIKE NK_STRING */ + { 216, -1 }, /* (167) table_name_cond ::= table_name */ + { 217, 0 }, /* (168) from_db_opt ::= */ + { 217, -2 }, /* (169) from_db_opt ::= FROM db_name */ + { 211, -1 }, /* (170) func_name_list ::= func_name */ + { 211, -3 }, /* (171) func_name_list ::= func_name_list NK_COMMA col_name */ + { 218, -1 }, /* (172) func_name ::= function_name */ + { 179, -8 }, /* (173) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ + { 179, -10 }, /* (174) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ + { 179, -6 }, /* (175) cmd ::= DROP INDEX exists_opt index_name ON table_name */ + { 221, 0 }, /* (176) index_options ::= */ + { 221, -9 }, /* (177) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ + { 221, -11 }, /* (178) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ + { 222, -1 }, /* (179) func_list ::= func */ + { 222, -3 }, /* (180) func_list ::= func_list NK_COMMA func */ + { 225, -4 }, /* (181) func ::= function_name NK_LP expression_list NK_RP */ + { 179, -6 }, /* (182) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ + { 179, -6 }, /* (183) cmd ::= CREATE TOPIC not_exists_opt topic_name AS db_name */ + { 179, -4 }, /* (184) cmd ::= DROP TOPIC exists_opt topic_name */ + { 179, -2 }, /* (185) cmd ::= DESC full_table_name */ + { 179, -2 }, /* (186) cmd ::= DESCRIBE full_table_name */ + { 179, -3 }, /* (187) cmd ::= RESET QUERY CACHE */ + { 179, -4 }, /* (188) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ + { 229, 0 }, /* (189) analyze_opt ::= */ + { 229, -1 }, /* (190) analyze_opt ::= ANALYZE */ + { 230, 0 }, /* (191) explain_options ::= */ + { 230, -3 }, /* (192) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 230, -3 }, /* (193) explain_options ::= explain_options RATIO NK_FLOAT */ + { 179, -1 }, /* (194) cmd ::= query_expression */ + { 182, -1 }, /* (195) literal ::= NK_INTEGER */ + { 182, -1 }, /* (196) literal ::= NK_FLOAT */ + { 182, -1 }, /* (197) literal ::= NK_STRING */ + { 182, -1 }, /* (198) literal ::= NK_BOOL */ + { 182, -2 }, /* (199) literal ::= TIMESTAMP NK_STRING */ + { 182, -1 }, /* (200) literal ::= duration_literal */ + { 182, -1 }, /* (201) literal ::= NULL */ + { 223, -1 }, /* (202) duration_literal ::= NK_VARIABLE */ + { 231, -1 }, /* (203) signed ::= NK_INTEGER */ + { 231, -2 }, /* (204) signed ::= NK_PLUS NK_INTEGER */ + { 231, -2 }, /* (205) signed ::= NK_MINUS NK_INTEGER */ + { 231, -1 }, /* (206) signed ::= NK_FLOAT */ + { 231, -2 }, /* (207) signed ::= NK_PLUS NK_FLOAT */ + { 231, -2 }, /* (208) signed ::= NK_MINUS NK_FLOAT */ + { 232, -1 }, /* (209) signed_literal ::= signed */ + { 232, -1 }, /* (210) signed_literal ::= NK_STRING */ + { 232, -1 }, /* (211) signed_literal ::= NK_BOOL */ + { 232, -2 }, /* (212) signed_literal ::= TIMESTAMP NK_STRING */ + { 232, -1 }, /* (213) signed_literal ::= duration_literal */ + { 232, -1 }, /* (214) signed_literal ::= NULL */ + { 206, -1 }, /* (215) literal_list ::= signed_literal */ + { 206, -3 }, /* (216) literal_list ::= literal_list NK_COMMA signed_literal */ + { 188, -1 }, /* (217) db_name ::= NK_ID */ + { 209, -1 }, /* (218) table_name ::= NK_ID */ + { 202, -1 }, /* (219) column_name ::= NK_ID */ + { 219, -1 }, /* (220) function_name ::= NK_ID */ + { 233, -1 }, /* (221) table_alias ::= NK_ID */ + { 234, -1 }, /* (222) column_alias ::= NK_ID */ + { 184, -1 }, /* (223) user_name ::= NK_ID */ + { 220, -1 }, /* (224) index_name ::= NK_ID */ + { 227, -1 }, /* (225) topic_name ::= NK_ID */ + { 235, -1 }, /* (226) expression ::= literal */ + { 235, -1 }, /* (227) expression ::= pseudo_column */ + { 235, -1 }, /* (228) expression ::= column_reference */ + { 235, -4 }, /* (229) expression ::= function_name NK_LP expression_list NK_RP */ + { 235, -4 }, /* (230) expression ::= function_name NK_LP NK_STAR NK_RP */ + { 235, -1 }, /* (231) expression ::= subquery */ + { 235, -3 }, /* (232) expression ::= NK_LP expression NK_RP */ + { 235, -2 }, /* (233) expression ::= NK_PLUS expression */ + { 235, -2 }, /* (234) expression ::= NK_MINUS expression */ + { 235, -3 }, /* (235) expression ::= expression NK_PLUS expression */ + { 235, -3 }, /* (236) expression ::= expression NK_MINUS expression */ + { 235, -3 }, /* (237) expression ::= expression NK_STAR expression */ + { 235, -3 }, /* (238) expression ::= expression NK_SLASH expression */ + { 235, -3 }, /* (239) expression ::= expression NK_REM expression */ + { 226, -1 }, /* (240) expression_list ::= expression */ + { 226, -3 }, /* (241) expression_list ::= expression_list NK_COMMA expression */ + { 237, -1 }, /* (242) column_reference ::= column_name */ + { 237, -3 }, /* (243) column_reference ::= table_name NK_DOT column_name */ + { 236, -2 }, /* (244) pseudo_column ::= NK_UNDERLINE ROWTS */ + { 236, -1 }, /* (245) pseudo_column ::= TBNAME */ + { 236, -2 }, /* (246) pseudo_column ::= NK_UNDERLINE QSTARTTS */ + { 236, -2 }, /* (247) pseudo_column ::= NK_UNDERLINE QENDTS */ + { 236, -2 }, /* (248) pseudo_column ::= NK_UNDERLINE WSTARTTS */ + { 236, -2 }, /* (249) pseudo_column ::= NK_UNDERLINE WENDTS */ + { 236, -2 }, /* (250) pseudo_column ::= NK_UNDERLINE WDURATION */ + { 239, -3 }, /* (251) predicate ::= expression compare_op expression */ + { 239, -5 }, /* (252) predicate ::= expression BETWEEN expression AND expression */ + { 239, -6 }, /* (253) predicate ::= expression NOT BETWEEN expression AND expression */ + { 239, -3 }, /* (254) predicate ::= expression IS NULL */ + { 239, -4 }, /* (255) predicate ::= expression IS NOT NULL */ + { 239, -3 }, /* (256) predicate ::= expression in_op in_predicate_value */ + { 240, -1 }, /* (257) compare_op ::= NK_LT */ + { 240, -1 }, /* (258) compare_op ::= NK_GT */ + { 240, -1 }, /* (259) compare_op ::= NK_LE */ + { 240, -1 }, /* (260) compare_op ::= NK_GE */ + { 240, -1 }, /* (261) compare_op ::= NK_NE */ + { 240, -1 }, /* (262) compare_op ::= NK_EQ */ + { 240, -1 }, /* (263) compare_op ::= LIKE */ + { 240, -2 }, /* (264) compare_op ::= NOT LIKE */ + { 240, -1 }, /* (265) compare_op ::= MATCH */ + { 240, -1 }, /* (266) compare_op ::= NMATCH */ + { 241, -1 }, /* (267) in_op ::= IN */ + { 241, -2 }, /* (268) in_op ::= NOT IN */ + { 242, -3 }, /* (269) in_predicate_value ::= NK_LP expression_list NK_RP */ + { 243, -1 }, /* (270) boolean_value_expression ::= boolean_primary */ + { 243, -2 }, /* (271) boolean_value_expression ::= NOT boolean_primary */ + { 243, -3 }, /* (272) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 243, -3 }, /* (273) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 244, -1 }, /* (274) boolean_primary ::= predicate */ + { 244, -3 }, /* (275) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 245, -1 }, /* (276) common_expression ::= expression */ + { 245, -1 }, /* (277) common_expression ::= boolean_value_expression */ + { 246, -2 }, /* (278) from_clause ::= FROM table_reference_list */ + { 247, -1 }, /* (279) table_reference_list ::= table_reference */ + { 247, -3 }, /* (280) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 248, -1 }, /* (281) table_reference ::= table_primary */ + { 248, -1 }, /* (282) table_reference ::= joined_table */ + { 249, -2 }, /* (283) table_primary ::= table_name alias_opt */ + { 249, -4 }, /* (284) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 249, -2 }, /* (285) table_primary ::= subquery alias_opt */ + { 249, -1 }, /* (286) table_primary ::= parenthesized_joined_table */ + { 251, 0 }, /* (287) alias_opt ::= */ + { 251, -1 }, /* (288) alias_opt ::= table_alias */ + { 251, -2 }, /* (289) alias_opt ::= AS table_alias */ + { 252, -3 }, /* (290) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 252, -3 }, /* (291) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 250, -6 }, /* (292) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 253, 0 }, /* (293) join_type ::= */ + { 253, -1 }, /* (294) join_type ::= INNER */ + { 255, -9 }, /* (295) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + { 256, 0 }, /* (296) set_quantifier_opt ::= */ + { 256, -1 }, /* (297) set_quantifier_opt ::= DISTINCT */ + { 256, -1 }, /* (298) set_quantifier_opt ::= ALL */ + { 257, -1 }, /* (299) select_list ::= NK_STAR */ + { 257, -1 }, /* (300) select_list ::= select_sublist */ + { 263, -1 }, /* (301) select_sublist ::= select_item */ + { 263, -3 }, /* (302) select_sublist ::= select_sublist NK_COMMA select_item */ + { 264, -1 }, /* (303) select_item ::= common_expression */ + { 264, -2 }, /* (304) select_item ::= common_expression column_alias */ + { 264, -3 }, /* (305) select_item ::= common_expression AS column_alias */ + { 264, -3 }, /* (306) select_item ::= table_name NK_DOT NK_STAR */ + { 258, 0 }, /* (307) where_clause_opt ::= */ + { 258, -2 }, /* (308) where_clause_opt ::= WHERE search_condition */ + { 259, 0 }, /* (309) partition_by_clause_opt ::= */ + { 259, -3 }, /* (310) partition_by_clause_opt ::= PARTITION BY expression_list */ + { 260, 0 }, /* (311) twindow_clause_opt ::= */ + { 260, -6 }, /* (312) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 260, -4 }, /* (313) twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */ + { 260, -6 }, /* (314) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 260, -8 }, /* (315) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 224, 0 }, /* (316) sliding_opt ::= */ + { 224, -4 }, /* (317) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 265, 0 }, /* (318) fill_opt ::= */ + { 265, -4 }, /* (319) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 265, -6 }, /* (320) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 266, -1 }, /* (321) fill_mode ::= NONE */ + { 266, -1 }, /* (322) fill_mode ::= PREV */ + { 266, -1 }, /* (323) fill_mode ::= NULL */ + { 266, -1 }, /* (324) fill_mode ::= LINEAR */ + { 266, -1 }, /* (325) fill_mode ::= NEXT */ + { 261, 0 }, /* (326) group_by_clause_opt ::= */ + { 261, -3 }, /* (327) group_by_clause_opt ::= GROUP BY group_by_list */ + { 267, -1 }, /* (328) group_by_list ::= expression */ + { 267, -3 }, /* (329) group_by_list ::= group_by_list NK_COMMA expression */ + { 262, 0 }, /* (330) having_clause_opt ::= */ + { 262, -2 }, /* (331) having_clause_opt ::= HAVING search_condition */ + { 228, -4 }, /* (332) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 268, -1 }, /* (333) query_expression_body ::= query_primary */ + { 268, -4 }, /* (334) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ + { 272, -1 }, /* (335) query_primary ::= query_specification */ + { 269, 0 }, /* (336) order_by_clause_opt ::= */ + { 269, -3 }, /* (337) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 270, 0 }, /* (338) slimit_clause_opt ::= */ + { 270, -2 }, /* (339) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 270, -4 }, /* (340) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 270, -4 }, /* (341) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 271, 0 }, /* (342) limit_clause_opt ::= */ + { 271, -2 }, /* (343) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 271, -4 }, /* (344) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 271, -4 }, /* (345) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 238, -3 }, /* (346) subquery ::= NK_LP query_expression NK_RP */ + { 254, -1 }, /* (347) search_condition ::= common_expression */ + { 273, -1 }, /* (348) sort_specification_list ::= sort_specification */ + { 273, -3 }, /* (349) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 274, -3 }, /* (350) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ + { 275, 0 }, /* (351) ordering_specification_opt ::= */ + { 275, -1 }, /* (352) ordering_specification_opt ::= ASC */ + { 275, -1 }, /* (353) ordering_specification_opt ::= DESC */ + { 276, 0 }, /* (354) null_ordering_opt ::= */ + { 276, -2 }, /* (355) null_ordering_opt ::= NULLS FIRST */ + { 276, -2 }, /* (356) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2360,11 +2383,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->valid = false; generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,177,&yymsp[0].minor); + yy_destructor(yypParser,180,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->valid = false; generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,178,&yymsp[0].minor); + yy_destructor(yypParser,181,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -2378,20 +2401,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,177,&yymsp[-2].minor); +{ yy_destructor(yypParser,180,&yymsp[-2].minor); { } - yy_destructor(yypParser,179,&yymsp[0].minor); + yy_destructor(yypParser,182,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,180,&yymsp[0].minor); +{ yy_destructor(yypParser,183,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,178,&yymsp[-1].minor); +{ yy_destructor(yypParser,181,&yymsp[-1].minor); { } - yy_destructor(yypParser,180,&yymsp[0].minor); + yy_destructor(yypParser,183,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -2405,31 +2428,31 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,179,&yymsp[0].minor); + yy_destructor(yypParser,182,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy437, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy95, &yymsp[0].minor.yy0); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy437, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy95, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy437, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy95, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy437); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy95); } break; case 28: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy437, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy95, NULL); } break; case 29: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy437, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy95, &yymsp[0].minor.yy0); } break; case 30: /* cmd ::= DROP DNODE NK_INTEGER */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 31: /* cmd ::= DROP DNODE dnode_endpoint */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy437); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy95); } break; case 32: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -2446,17 +2469,17 @@ static YYACTIONTYPE yy_reduce( case 36: /* dnode_endpoint ::= NK_STRING */ case 37: /* dnode_host_name ::= NK_ID */ yytestcase(yyruleno==37); case 38: /* dnode_host_name ::= NK_IPTOKEN */ yytestcase(yyruleno==38); - case 214: /* db_name ::= NK_ID */ yytestcase(yyruleno==214); - case 215: /* table_name ::= NK_ID */ yytestcase(yyruleno==215); - case 216: /* column_name ::= NK_ID */ yytestcase(yyruleno==216); - case 217: /* function_name ::= NK_ID */ yytestcase(yyruleno==217); - case 218: /* table_alias ::= NK_ID */ yytestcase(yyruleno==218); - case 219: /* column_alias ::= NK_ID */ yytestcase(yyruleno==219); - case 220: /* user_name ::= NK_ID */ yytestcase(yyruleno==220); - case 221: /* index_name ::= NK_ID */ yytestcase(yyruleno==221); - case 222: /* topic_name ::= NK_ID */ yytestcase(yyruleno==222); -{ yylhsminor.yy437 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy437 = yylhsminor.yy437; + case 217: /* db_name ::= NK_ID */ yytestcase(yyruleno==217); + case 218: /* table_name ::= NK_ID */ yytestcase(yyruleno==218); + case 219: /* column_name ::= NK_ID */ yytestcase(yyruleno==219); + case 220: /* function_name ::= NK_ID */ yytestcase(yyruleno==220); + case 221: /* table_alias ::= NK_ID */ yytestcase(yyruleno==221); + case 222: /* column_alias ::= NK_ID */ yytestcase(yyruleno==222); + case 223: /* user_name ::= NK_ID */ yytestcase(yyruleno==223); + case 224: /* index_name ::= NK_ID */ yytestcase(yyruleno==224); + case 225: /* topic_name ::= NK_ID */ yytestcase(yyruleno==225); +{ yylhsminor.yy95 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy95 = yylhsminor.yy95; break; case 39: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -2471,187 +2494,187 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropQnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 43: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy493, &yymsp[-1].minor.yy437, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy151, &yymsp[-1].minor.yy95, yymsp[0].minor.yy46); } break; case 44: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy493, &yymsp[0].minor.yy437); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy151, &yymsp[0].minor.yy95); } break; case 45: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy437); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy95); } break; case 46: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy437, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy95, yymsp[0].minor.yy46); } break; case 47: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy493 = true; } +{ yymsp[-2].minor.yy151 = true; } break; case 48: /* not_exists_opt ::= */ case 50: /* exists_opt ::= */ yytestcase(yyruleno==50); - case 186: /* analyze_opt ::= */ yytestcase(yyruleno==186); - case 293: /* set_quantifier_opt ::= */ yytestcase(yyruleno==293); -{ yymsp[1].minor.yy493 = false; } + case 189: /* analyze_opt ::= */ yytestcase(yyruleno==189); + case 296: /* set_quantifier_opt ::= */ yytestcase(yyruleno==296); +{ yymsp[1].minor.yy151 = false; } break; case 49: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy493 = true; } +{ yymsp[-1].minor.yy151 = true; } break; case 51: /* db_options ::= */ -{ yymsp[1].minor.yy364 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy46 = createDefaultDatabaseOptions(pCxt); } break; case 52: /* db_options ::= db_options BLOCKS NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_BLOCKS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_BLOCKS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 53: /* db_options ::= db_options CACHE NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_CACHE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_CACHE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 54: /* db_options ::= db_options CACHELAST NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 55: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 56: /* db_options ::= db_options DAYS NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 57: /* db_options ::= db_options FSYNC NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 58: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 59: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 60: /* db_options ::= db_options KEEP NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_KEEP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_KEEP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 61: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 62: /* db_options ::= db_options QUORUM NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_QUORUM, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_QUORUM, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 63: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 64: /* db_options ::= db_options TTL NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 65: /* db_options ::= db_options WAL NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 66: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 67: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 68: /* db_options ::= db_options STREAM_MODE NK_INTEGER */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_STREAM_MODE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_STREAM_MODE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 69: /* db_options ::= db_options RETENTIONS NK_STRING */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-2].minor.yy364, DB_OPTION_RETENTIONS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-2].minor.yy46, DB_OPTION_RETENTIONS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 70: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy364 = createDefaultAlterDatabaseOptions(pCxt); yylhsminor.yy364 = setDatabaseOption(pCxt, yylhsminor.yy364, yymsp[0].minor.yy29.type, &yymsp[0].minor.yy29.val); } - yymsp[0].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createDefaultAlterDatabaseOptions(pCxt); yylhsminor.yy46 = setDatabaseOption(pCxt, yylhsminor.yy46, yymsp[0].minor.yy145.type, &yymsp[0].minor.yy145.val); } + yymsp[0].minor.yy46 = yylhsminor.yy46; break; case 71: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy364 = setDatabaseOption(pCxt, yymsp[-1].minor.yy364, yymsp[0].minor.yy29.type, &yymsp[0].minor.yy29.val); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setDatabaseOption(pCxt, yymsp[-1].minor.yy46, yymsp[0].minor.yy145.type, &yymsp[0].minor.yy145.val); } + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; case 72: /* alter_db_option ::= BLOCKS NK_INTEGER */ -{ yymsp[-1].minor.yy29.type = DB_OPTION_BLOCKS; yymsp[-1].minor.yy29.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy145.type = DB_OPTION_BLOCKS; yymsp[-1].minor.yy145.val = yymsp[0].minor.yy0; } break; case 73: /* alter_db_option ::= FSYNC NK_INTEGER */ -{ yymsp[-1].minor.yy29.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy29.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy145.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy145.val = yymsp[0].minor.yy0; } break; case 74: /* alter_db_option ::= KEEP NK_INTEGER */ -{ yymsp[-1].minor.yy29.type = DB_OPTION_KEEP; yymsp[-1].minor.yy29.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy145.type = DB_OPTION_KEEP; yymsp[-1].minor.yy145.val = yymsp[0].minor.yy0; } break; case 75: /* alter_db_option ::= WAL NK_INTEGER */ -{ yymsp[-1].minor.yy29.type = DB_OPTION_WAL; yymsp[-1].minor.yy29.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy145.type = DB_OPTION_WAL; yymsp[-1].minor.yy145.val = yymsp[0].minor.yy0; } break; case 76: /* alter_db_option ::= QUORUM NK_INTEGER */ -{ yymsp[-1].minor.yy29.type = DB_OPTION_QUORUM; yymsp[-1].minor.yy29.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy145.type = DB_OPTION_QUORUM; yymsp[-1].minor.yy145.val = yymsp[0].minor.yy0; } break; case 77: /* alter_db_option ::= CACHELAST NK_INTEGER */ -{ yymsp[-1].minor.yy29.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy29.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy145.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy145.val = yymsp[0].minor.yy0; } break; case 78: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 80: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==80); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy493, yymsp[-5].minor.yy364, yymsp[-3].minor.yy40, yymsp[-1].minor.yy40, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy151, yymsp[-5].minor.yy46, yymsp[-3].minor.yy194, yymsp[-1].minor.yy194, yymsp[0].minor.yy46); } break; case 79: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy40); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy194); } break; case 81: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy40); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy194); } break; case 82: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy493, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy151, yymsp[0].minor.yy46); } break; case 83: /* cmd ::= ALTER TABLE alter_table_clause */ case 84: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==84); - case 191: /* cmd ::= query_expression */ yytestcase(yyruleno==191); -{ pCxt->pRootNode = yymsp[0].minor.yy364; } + case 194: /* cmd ::= query_expression */ yytestcase(yyruleno==194); +{ pCxt->pRootNode = yymsp[0].minor.yy46; } break; case 85: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy364 = createAlterTableOption(pCxt, yymsp[-1].minor.yy364, yymsp[0].minor.yy364); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createAlterTableOption(pCxt, yymsp[-1].minor.yy46, yymsp[0].minor.yy46); } + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; case 86: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy364 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy364, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy437, yymsp[0].minor.yy420); } - yymsp[-4].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy46, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy95, yymsp[0].minor.yy400); } + yymsp[-4].minor.yy46 = yylhsminor.yy46; break; case 87: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy364 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy364, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy437); } - yymsp[-3].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy46, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy95); } + yymsp[-3].minor.yy46 = yylhsminor.yy46; break; case 88: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy364 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy364, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy437, yymsp[0].minor.yy420); } - yymsp[-4].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy46, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy95, yymsp[0].minor.yy400); } + yymsp[-4].minor.yy46 = yylhsminor.yy46; break; case 89: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy364 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy364, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy437, &yymsp[0].minor.yy437); } - yymsp[-4].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy46, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy95, &yymsp[0].minor.yy95); } + yymsp[-4].minor.yy46 = yylhsminor.yy46; break; case 90: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy364 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy364, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy437, yymsp[0].minor.yy420); } - yymsp[-4].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy46, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy95, yymsp[0].minor.yy400); } + yymsp[-4].minor.yy46 = yylhsminor.yy46; break; case 91: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy364 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy364, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy437); } - yymsp[-3].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy46, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy95); } + yymsp[-3].minor.yy46 = yylhsminor.yy46; break; case 92: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy364 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy364, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy437, yymsp[0].minor.yy420); } - yymsp[-4].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy46, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy95, yymsp[0].minor.yy400); } + yymsp[-4].minor.yy46 = yylhsminor.yy46; break; case 93: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy364 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy364, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy437, &yymsp[0].minor.yy437); } - yymsp[-4].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy46, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy95, &yymsp[0].minor.yy95); } + yymsp[-4].minor.yy46 = yylhsminor.yy46; break; case 94: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ literal */ -{ yylhsminor.yy364 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy364, &yymsp[-2].minor.yy437, yymsp[0].minor.yy364); } - yymsp[-5].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy46, &yymsp[-2].minor.yy95, yymsp[0].minor.yy46); } + yymsp[-5].minor.yy46 = yylhsminor.yy46; break; case 95: /* multi_create_clause ::= create_subtable_clause */ case 98: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==98); @@ -2659,187 +2682,187 @@ static YYACTIONTYPE yy_reduce( case 148: /* col_name_list ::= col_name */ yytestcase(yyruleno==148); case 170: /* func_name_list ::= func_name */ yytestcase(yyruleno==170); case 179: /* func_list ::= func */ yytestcase(yyruleno==179); - case 212: /* literal_list ::= signed_literal */ yytestcase(yyruleno==212); - case 298: /* select_sublist ::= select_item */ yytestcase(yyruleno==298); - case 345: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==345); -{ yylhsminor.yy40 = createNodeList(pCxt, yymsp[0].minor.yy364); } - yymsp[0].minor.yy40 = yylhsminor.yy40; + case 215: /* literal_list ::= signed_literal */ yytestcase(yyruleno==215); + case 301: /* select_sublist ::= select_item */ yytestcase(yyruleno==301); + case 348: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==348); +{ yylhsminor.yy194 = createNodeList(pCxt, yymsp[0].minor.yy46); } + yymsp[0].minor.yy194 = yylhsminor.yy194; break; case 96: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 99: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==99); -{ yylhsminor.yy40 = addNodeToList(pCxt, yymsp[-1].minor.yy40, yymsp[0].minor.yy364); } - yymsp[-1].minor.yy40 = yylhsminor.yy40; +{ yylhsminor.yy194 = addNodeToList(pCxt, yymsp[-1].minor.yy194, yymsp[0].minor.yy46); } + yymsp[-1].minor.yy194 = yylhsminor.yy194; break; case 97: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */ -{ yylhsminor.yy364 = createCreateSubTableClause(pCxt, yymsp[-8].minor.yy493, yymsp[-7].minor.yy364, yymsp[-5].minor.yy364, yymsp[-4].minor.yy40, yymsp[-1].minor.yy40); } - yymsp[-8].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createCreateSubTableClause(pCxt, yymsp[-8].minor.yy151, yymsp[-7].minor.yy46, yymsp[-5].minor.yy46, yymsp[-4].minor.yy194, yymsp[-1].minor.yy194); } + yymsp[-8].minor.yy46 = yylhsminor.yy46; break; case 100: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy364 = createDropTableClause(pCxt, yymsp[-1].minor.yy493, yymsp[0].minor.yy364); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createDropTableClause(pCxt, yymsp[-1].minor.yy151, yymsp[0].minor.yy46); } + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; case 101: /* specific_tags_opt ::= */ case 132: /* tags_def_opt ::= */ yytestcase(yyruleno==132); - case 306: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==306); - case 323: /* group_by_clause_opt ::= */ yytestcase(yyruleno==323); - case 333: /* order_by_clause_opt ::= */ yytestcase(yyruleno==333); -{ yymsp[1].minor.yy40 = NULL; } + case 309: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==309); + case 326: /* group_by_clause_opt ::= */ yytestcase(yyruleno==326); + case 336: /* order_by_clause_opt ::= */ yytestcase(yyruleno==336); +{ yymsp[1].minor.yy194 = NULL; } break; case 102: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy40 = yymsp[-1].minor.yy40; } +{ yymsp[-2].minor.yy194 = yymsp[-1].minor.yy194; } break; case 103: /* full_table_name ::= table_name */ -{ yylhsminor.yy364 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy437, NULL); } - yymsp[0].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy95, NULL); } + yymsp[0].minor.yy46 = yylhsminor.yy46; break; case 104: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy364 = createRealTableNode(pCxt, &yymsp[-2].minor.yy437, &yymsp[0].minor.yy437, NULL); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createRealTableNode(pCxt, &yymsp[-2].minor.yy95, &yymsp[0].minor.yy95, NULL); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 106: /* column_def_list ::= column_def_list NK_COMMA column_def */ case 149: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==149); case 171: /* func_name_list ::= func_name_list NK_COMMA col_name */ yytestcase(yyruleno==171); case 180: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==180); - case 213: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==213); - case 299: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==299); - case 346: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==346); -{ yylhsminor.yy40 = addNodeToList(pCxt, yymsp[-2].minor.yy40, yymsp[0].minor.yy364); } - yymsp[-2].minor.yy40 = yylhsminor.yy40; + case 216: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==216); + case 302: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==302); + case 349: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==349); +{ yylhsminor.yy194 = addNodeToList(pCxt, yymsp[-2].minor.yy194, yymsp[0].minor.yy46); } + yymsp[-2].minor.yy194 = yylhsminor.yy194; break; case 107: /* column_def ::= column_name type_name */ -{ yylhsminor.yy364 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy437, yymsp[0].minor.yy420, NULL); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy95, yymsp[0].minor.yy400, NULL); } + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; case 108: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy364 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy437, yymsp[-2].minor.yy420, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy95, yymsp[-2].minor.yy400, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy46 = yylhsminor.yy46; break; case 109: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 110: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 111: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 112: /* type_name ::= INT */ case 113: /* type_name ::= INTEGER */ yytestcase(yyruleno==113); -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_INT); } break; case 114: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 115: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 116: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 117: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy420 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 118: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 119: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy420 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 120: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy420 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 121: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy420 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 122: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy420 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 123: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy420 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 124: /* type_name ::= JSON */ -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 125: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy420 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 126: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 127: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 128: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy420 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 129: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy420 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 130: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy420 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 131: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy420 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 133: /* tags_def_opt ::= tags_def */ - case 297: /* select_list ::= select_sublist */ yytestcase(yyruleno==297); -{ yylhsminor.yy40 = yymsp[0].minor.yy40; } - yymsp[0].minor.yy40 = yylhsminor.yy40; + case 300: /* select_list ::= select_sublist */ yytestcase(yyruleno==300); +{ yylhsminor.yy194 = yymsp[0].minor.yy194; } + yymsp[0].minor.yy194 = yylhsminor.yy194; break; case 134: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy40 = yymsp[-1].minor.yy40; } +{ yymsp[-3].minor.yy194 = yymsp[-1].minor.yy194; } break; case 135: /* table_options ::= */ -{ yymsp[1].minor.yy364 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy46 = createDefaultTableOptions(pCxt); } break; case 136: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy364 = setTableOption(pCxt, yymsp[-2].minor.yy364, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setTableOption(pCxt, yymsp[-2].minor.yy46, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 137: /* table_options ::= table_options KEEP NK_INTEGER */ -{ yylhsminor.yy364 = setTableOption(pCxt, yymsp[-2].minor.yy364, TABLE_OPTION_KEEP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setTableOption(pCxt, yymsp[-2].minor.yy46, TABLE_OPTION_KEEP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 138: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy364 = setTableOption(pCxt, yymsp[-2].minor.yy364, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setTableOption(pCxt, yymsp[-2].minor.yy46, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 139: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy364 = setTableSmaOption(pCxt, yymsp[-4].minor.yy364, yymsp[-1].minor.yy40); } - yymsp[-4].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setTableSmaOption(pCxt, yymsp[-4].minor.yy46, yymsp[-1].minor.yy194); } + yymsp[-4].minor.yy46 = yylhsminor.yy46; break; case 140: /* table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ -{ yylhsminor.yy364 = setTableRollupOption(pCxt, yymsp[-4].minor.yy364, yymsp[-1].minor.yy40); } - yymsp[-4].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setTableRollupOption(pCxt, yymsp[-4].minor.yy46, yymsp[-1].minor.yy194); } + yymsp[-4].minor.yy46 = yylhsminor.yy46; break; case 141: /* table_options ::= table_options FILE_FACTOR NK_FLOAT */ -{ yylhsminor.yy364 = setTableOption(pCxt, yymsp[-2].minor.yy364, TABLE_OPTION_FILE_FACTOR, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setTableOption(pCxt, yymsp[-2].minor.yy46, TABLE_OPTION_FILE_FACTOR, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 142: /* table_options ::= table_options DELAY NK_INTEGER */ -{ yylhsminor.yy364 = setTableOption(pCxt, yymsp[-2].minor.yy364, TABLE_OPTION_DELAY, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setTableOption(pCxt, yymsp[-2].minor.yy46, TABLE_OPTION_DELAY, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; case 143: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy364 = createDefaultAlterTableOptions(pCxt); yylhsminor.yy364 = setTableOption(pCxt, yylhsminor.yy364, yymsp[0].minor.yy29.type, &yymsp[0].minor.yy29.val); } - yymsp[0].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createDefaultAlterTableOptions(pCxt); yylhsminor.yy46 = setTableOption(pCxt, yylhsminor.yy46, yymsp[0].minor.yy145.type, &yymsp[0].minor.yy145.val); } + yymsp[0].minor.yy46 = yylhsminor.yy46; break; case 144: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy364 = setTableOption(pCxt, yymsp[-1].minor.yy364, yymsp[0].minor.yy29.type, &yymsp[0].minor.yy29.val); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = setTableOption(pCxt, yymsp[-1].minor.yy46, yymsp[0].minor.yy145.type, &yymsp[0].minor.yy145.val); } + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; case 145: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy29.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy29.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy145.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy145.val = yymsp[0].minor.yy0; } break; case 146: /* alter_table_option ::= KEEP NK_INTEGER */ -{ yymsp[-1].minor.yy29.type = TABLE_OPTION_KEEP; yymsp[-1].minor.yy29.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy145.type = TABLE_OPTION_KEEP; yymsp[-1].minor.yy145.val = yymsp[0].minor.yy0; } break; case 147: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy29.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy29.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy145.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy145.val = yymsp[0].minor.yy0; } break; case 150: /* col_name ::= column_name */ -{ yylhsminor.yy364 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy437); } - yymsp[0].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy95); } + yymsp[0].minor.yy46 = yylhsminor.yy46; break; case 151: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); } @@ -2851,13 +2874,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); } break; case 154: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy364, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy46, yymsp[0].minor.yy46); } break; case 155: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy364, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy46, yymsp[0].minor.yy46); } break; case 156: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy364, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy46, NULL); } break; case 157: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); } @@ -2872,566 +2895,573 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); } break; case 161: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy364, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy46, yymsp[0].minor.yy46); } break; case 162: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); } break; case 163: /* db_name_cond_opt ::= */ case 168: /* from_db_opt ::= */ yytestcase(yyruleno==168); -{ yymsp[1].minor.yy364 = createDefaultDatabaseCondValue(pCxt); } +{ yymsp[1].minor.yy46 = createDefaultDatabaseCondValue(pCxt); } break; case 164: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy437); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy95); } + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; case 165: /* like_pattern_opt ::= */ case 176: /* index_options ::= */ yytestcase(yyruleno==176); - case 304: /* where_clause_opt ::= */ yytestcase(yyruleno==304); - case 308: /* twindow_clause_opt ::= */ yytestcase(yyruleno==308); - case 313: /* sliding_opt ::= */ yytestcase(yyruleno==313); - case 315: /* fill_opt ::= */ yytestcase(yyruleno==315); - case 327: /* having_clause_opt ::= */ yytestcase(yyruleno==327); - case 335: /* slimit_clause_opt ::= */ yytestcase(yyruleno==335); - case 339: /* limit_clause_opt ::= */ yytestcase(yyruleno==339); -{ yymsp[1].minor.yy364 = NULL; } + case 307: /* where_clause_opt ::= */ yytestcase(yyruleno==307); + case 311: /* twindow_clause_opt ::= */ yytestcase(yyruleno==311); + case 316: /* sliding_opt ::= */ yytestcase(yyruleno==316); + case 318: /* fill_opt ::= */ yytestcase(yyruleno==318); + case 330: /* having_clause_opt ::= */ yytestcase(yyruleno==330); + case 338: /* slimit_clause_opt ::= */ yytestcase(yyruleno==338); + case 342: /* limit_clause_opt ::= */ yytestcase(yyruleno==342); +{ yymsp[1].minor.yy46 = NULL; } break; case 166: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 167: /* table_name_cond ::= table_name */ -{ yylhsminor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy437); } - yymsp[0].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy95); } + yymsp[0].minor.yy46 = yylhsminor.yy46; break; case 169: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy437); } +{ yymsp[-1].minor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy95); } break; case 172: /* func_name ::= function_name */ -{ yylhsminor.yy364 = createFunctionNode(pCxt, &yymsp[0].minor.yy437, NULL); } - yymsp[0].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createFunctionNode(pCxt, &yymsp[0].minor.yy95, NULL); } + yymsp[0].minor.yy46 = yylhsminor.yy46; break; case 173: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy493, &yymsp[-3].minor.yy437, &yymsp[-1].minor.yy437, NULL, yymsp[0].minor.yy364); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy151, &yymsp[-3].minor.yy95, &yymsp[-1].minor.yy95, NULL, yymsp[0].minor.yy46); } break; case 174: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy493, &yymsp[-5].minor.yy437, &yymsp[-3].minor.yy437, yymsp[-1].minor.yy40, NULL); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy151, &yymsp[-5].minor.yy95, &yymsp[-3].minor.yy95, yymsp[-1].minor.yy194, NULL); } break; case 175: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy493, &yymsp[-2].minor.yy437, &yymsp[0].minor.yy437); } +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy151, &yymsp[-2].minor.yy95, &yymsp[0].minor.yy95); } break; case 177: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ -{ yymsp[-8].minor.yy364 = createIndexOption(pCxt, yymsp[-6].minor.yy40, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), NULL, yymsp[0].minor.yy364); } +{ yymsp[-8].minor.yy46 = createIndexOption(pCxt, yymsp[-6].minor.yy194, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), NULL, yymsp[0].minor.yy46); } break; case 178: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ -{ yymsp[-10].minor.yy364 = createIndexOption(pCxt, yymsp[-8].minor.yy40, releaseRawExprNode(pCxt, yymsp[-4].minor.yy364), releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), yymsp[0].minor.yy364); } +{ yymsp[-10].minor.yy46 = createIndexOption(pCxt, yymsp[-8].minor.yy194, releaseRawExprNode(pCxt, yymsp[-4].minor.yy46), releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), yymsp[0].minor.yy46); } break; case 181: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy364 = createFunctionNode(pCxt, &yymsp[-3].minor.yy437, yymsp[-1].minor.yy40); } - yymsp[-3].minor.yy364 = yylhsminor.yy364; +{ yylhsminor.yy46 = createFunctionNode(pCxt, &yymsp[-3].minor.yy95, yymsp[-1].minor.yy194); } + yymsp[-3].minor.yy46 = yylhsminor.yy46; break; case 182: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy493, &yymsp[-2].minor.yy437, yymsp[0].minor.yy364, NULL); } +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy151, &yymsp[-2].minor.yy95, yymsp[0].minor.yy46, NULL); } break; case 183: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS db_name */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy493, &yymsp[-2].minor.yy437, NULL, &yymsp[0].minor.yy437); } +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy151, &yymsp[-2].minor.yy95, NULL, &yymsp[0].minor.yy95); } break; case 184: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy493, &yymsp[0].minor.yy437); } - break; - case 185: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy493, yymsp[-1].minor.yy364, yymsp[0].minor.yy364); } - break; - case 187: /* analyze_opt ::= ANALYZE */ - case 294: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==294); -{ yymsp[0].minor.yy493 = true; } - break; - case 188: /* explain_options ::= */ -{ yymsp[1].minor.yy364 = createDefaultExplainOptions(pCxt); } - break; - case 189: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy364 = setExplainVerbose(pCxt, yymsp[-2].minor.yy364, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; - break; - case 190: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy364 = setExplainRatio(pCxt, yymsp[-2].minor.yy364, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; - break; - case 192: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy364 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; - break; - case 193: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy364 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; - break; - case 194: /* literal ::= NK_STRING */ -{ yylhsminor.yy364 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; - break; - case 195: /* literal ::= NK_BOOL */ -{ yylhsminor.yy364 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; - break; - case 196: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy364 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; - break; - case 197: /* literal ::= duration_literal */ - case 206: /* signed_literal ::= signed */ yytestcase(yyruleno==206); - case 223: /* expression ::= literal */ yytestcase(yyruleno==223); - case 224: /* expression ::= pseudo_column */ yytestcase(yyruleno==224); - case 225: /* expression ::= column_reference */ yytestcase(yyruleno==225); - case 228: /* expression ::= subquery */ yytestcase(yyruleno==228); - case 267: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==267); - case 271: /* boolean_primary ::= predicate */ yytestcase(yyruleno==271); - case 273: /* common_expression ::= expression */ yytestcase(yyruleno==273); - case 274: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==274); - case 276: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==276); - case 278: /* table_reference ::= table_primary */ yytestcase(yyruleno==278); - case 279: /* table_reference ::= joined_table */ yytestcase(yyruleno==279); - case 283: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==283); - case 330: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==330); - case 332: /* query_primary ::= query_specification */ yytestcase(yyruleno==332); -{ yylhsminor.yy364 = yymsp[0].minor.yy364; } - yymsp[0].minor.yy364 = yylhsminor.yy364; - break; - case 198: /* literal ::= NULL */ -{ yylhsminor.yy364 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; - break; - case 199: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy364 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; - break; - case 200: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy364 = yylhsminor.yy364; - break; - case 201: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - break; - case 202: /* signed ::= NK_MINUS NK_INTEGER */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy151, &yymsp[0].minor.yy95); } + break; + case 185: /* cmd ::= DESC full_table_name */ + case 186: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==186); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy46); } + break; + case 187: /* cmd ::= RESET QUERY CACHE */ +{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } + break; + case 188: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy151, yymsp[-1].minor.yy46, yymsp[0].minor.yy46); } + break; + case 190: /* analyze_opt ::= ANALYZE */ + case 297: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==297); +{ yymsp[0].minor.yy151 = true; } + break; + case 191: /* explain_options ::= */ +{ yymsp[1].minor.yy46 = createDefaultExplainOptions(pCxt); } + break; + case 192: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy46 = setExplainVerbose(pCxt, yymsp[-2].minor.yy46, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; + break; + case 193: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy46 = setExplainRatio(pCxt, yymsp[-2].minor.yy46, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; + break; + case 195: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy46 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy46 = yylhsminor.yy46; + break; + case 196: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy46 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy46 = yylhsminor.yy46; + break; + case 197: /* literal ::= NK_STRING */ +{ yylhsminor.yy46 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy46 = yylhsminor.yy46; + break; + case 198: /* literal ::= NK_BOOL */ +{ yylhsminor.yy46 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy46 = yylhsminor.yy46; + break; + case 199: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy46 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy46 = yylhsminor.yy46; + break; + case 200: /* literal ::= duration_literal */ + case 209: /* signed_literal ::= signed */ yytestcase(yyruleno==209); + case 226: /* expression ::= literal */ yytestcase(yyruleno==226); + case 227: /* expression ::= pseudo_column */ yytestcase(yyruleno==227); + case 228: /* expression ::= column_reference */ yytestcase(yyruleno==228); + case 231: /* expression ::= subquery */ yytestcase(yyruleno==231); + case 270: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==270); + case 274: /* boolean_primary ::= predicate */ yytestcase(yyruleno==274); + case 276: /* common_expression ::= expression */ yytestcase(yyruleno==276); + case 277: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==277); + case 279: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==279); + case 281: /* table_reference ::= table_primary */ yytestcase(yyruleno==281); + case 282: /* table_reference ::= joined_table */ yytestcase(yyruleno==282); + case 286: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==286); + case 333: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==333); + case 335: /* query_primary ::= query_specification */ yytestcase(yyruleno==335); +{ yylhsminor.yy46 = yymsp[0].minor.yy46; } + yymsp[0].minor.yy46 = yylhsminor.yy46; + break; + case 201: /* literal ::= NULL */ +{ yylhsminor.yy46 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL)); } + yymsp[0].minor.yy46 = yylhsminor.yy46; + break; + case 202: /* duration_literal ::= NK_VARIABLE */ +{ yylhsminor.yy46 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy46 = yylhsminor.yy46; + break; + case 203: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy46 = yylhsminor.yy46; + break; + case 204: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + break; + case 205: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 203: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy364 = yylhsminor.yy364; + case 206: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 204: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 207: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 205: /* signed ::= NK_MINUS NK_FLOAT */ + case 208: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 207: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy364 = yylhsminor.yy364; + case 210: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 208: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy364 = yylhsminor.yy364; + case 211: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 209: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 212: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 210: /* signed_literal ::= duration_literal */ - case 344: /* search_condition ::= common_expression */ yytestcase(yyruleno==344); -{ yylhsminor.yy364 = releaseRawExprNode(pCxt, yymsp[0].minor.yy364); } - yymsp[0].minor.yy364 = yylhsminor.yy364; + case 213: /* signed_literal ::= duration_literal */ + case 347: /* search_condition ::= common_expression */ yytestcase(yyruleno==347); +{ yylhsminor.yy46 = releaseRawExprNode(pCxt, yymsp[0].minor.yy46); } + yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 211: /* signed_literal ::= NULL */ -{ yymsp[0].minor.yy364 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL); } + case 214: /* signed_literal ::= NULL */ +{ yymsp[0].minor.yy46 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL); } break; - case 226: /* expression ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy364 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy437, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy437, yymsp[-1].minor.yy40)); } - yymsp[-3].minor.yy364 = yylhsminor.yy364; + case 229: /* expression ::= function_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy46 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy95, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy95, yymsp[-1].minor.yy194)); } + yymsp[-3].minor.yy46 = yylhsminor.yy46; break; - case 227: /* expression ::= function_name NK_LP NK_STAR NK_RP */ -{ yylhsminor.yy364 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy437, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy437, createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy0)))); } - yymsp[-3].minor.yy364 = yylhsminor.yy364; + case 230: /* expression ::= function_name NK_LP NK_STAR NK_RP */ +{ yylhsminor.yy46 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy95, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy95, createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy0)))); } + yymsp[-3].minor.yy46 = yylhsminor.yy46; break; - case 229: /* expression ::= NK_LP expression NK_RP */ - case 272: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==272); -{ yylhsminor.yy364 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy364)); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + case 232: /* expression ::= NK_LP expression NK_RP */ + case 275: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==275); +{ yylhsminor.yy46 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy46)); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 230: /* expression ::= NK_PLUS expression */ + case 233: /* expression ::= NK_PLUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy364)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy46)); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 231: /* expression ::= NK_MINUS expression */ + case 234: /* expression ::= NK_MINUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[0].minor.yy364), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[0].minor.yy46), NULL)); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 232: /* expression ::= expression NK_PLUS expression */ + case 235: /* expression ::= expression NK_PLUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy364); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy46); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 233: /* expression ::= expression NK_MINUS expression */ + case 236: /* expression ::= expression NK_MINUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy364); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy46); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 234: /* expression ::= expression NK_STAR expression */ + case 237: /* expression ::= expression NK_STAR expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy364); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy46); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 235: /* expression ::= expression NK_SLASH expression */ + case 238: /* expression ::= expression NK_SLASH expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy364); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy46); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 236: /* expression ::= expression NK_REM expression */ + case 239: /* expression ::= expression NK_REM expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy364); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy46); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; - break; - case 237: /* expression_list ::= expression */ -{ yylhsminor.yy40 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy364)); } - yymsp[0].minor.yy40 = yylhsminor.yy40; - break; - case 238: /* expression_list ::= expression_list NK_COMMA expression */ -{ yylhsminor.yy40 = addNodeToList(pCxt, yymsp[-2].minor.yy40, releaseRawExprNode(pCxt, yymsp[0].minor.yy364)); } - yymsp[-2].minor.yy40 = yylhsminor.yy40; - break; - case 239: /* column_reference ::= column_name */ -{ yylhsminor.yy364 = createRawExprNode(pCxt, &yymsp[0].minor.yy437, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy437)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; - break; - case 240: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy364 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy437, &yymsp[0].minor.yy437, createColumnNode(pCxt, &yymsp[-2].minor.yy437, &yymsp[0].minor.yy437)); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; - break; - case 241: /* pseudo_column ::= NK_UNDERLINE ROWTS */ - case 243: /* pseudo_column ::= NK_UNDERLINE QSTARTTS */ yytestcase(yyruleno==243); - case 244: /* pseudo_column ::= NK_UNDERLINE QENDTS */ yytestcase(yyruleno==244); - case 245: /* pseudo_column ::= NK_UNDERLINE WSTARTTS */ yytestcase(yyruleno==245); - case 246: /* pseudo_column ::= NK_UNDERLINE WENDTS */ yytestcase(yyruleno==246); - case 247: /* pseudo_column ::= NK_UNDERLINE WDURATION */ yytestcase(yyruleno==247); + yymsp[-2].minor.yy46 = yylhsminor.yy46; + break; + case 240: /* expression_list ::= expression */ +{ yylhsminor.yy194 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy46)); } + yymsp[0].minor.yy194 = yylhsminor.yy194; + break; + case 241: /* expression_list ::= expression_list NK_COMMA expression */ +{ yylhsminor.yy194 = addNodeToList(pCxt, yymsp[-2].minor.yy194, releaseRawExprNode(pCxt, yymsp[0].minor.yy46)); } + yymsp[-2].minor.yy194 = yylhsminor.yy194; + break; + case 242: /* column_reference ::= column_name */ +{ yylhsminor.yy46 = createRawExprNode(pCxt, &yymsp[0].minor.yy95, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy95)); } + yymsp[0].minor.yy46 = yylhsminor.yy46; + break; + case 243: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy46 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy95, &yymsp[0].minor.yy95, createColumnNode(pCxt, &yymsp[-2].minor.yy95, &yymsp[0].minor.yy95)); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; + break; + case 244: /* pseudo_column ::= NK_UNDERLINE ROWTS */ + case 246: /* pseudo_column ::= NK_UNDERLINE QSTARTTS */ yytestcase(yyruleno==246); + case 247: /* pseudo_column ::= NK_UNDERLINE QENDTS */ yytestcase(yyruleno==247); + case 248: /* pseudo_column ::= NK_UNDERLINE WSTARTTS */ yytestcase(yyruleno==248); + case 249: /* pseudo_column ::= NK_UNDERLINE WENDTS */ yytestcase(yyruleno==249); + case 250: /* pseudo_column ::= NK_UNDERLINE WDURATION */ yytestcase(yyruleno==250); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy364 = createRawExprNode(pCxt, &t, createFunctionNode(pCxt, &t, NULL)); + yylhsminor.yy46 = createRawExprNode(pCxt, &t, createFunctionNode(pCxt, &t, NULL)); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 242: /* pseudo_column ::= TBNAME */ -{ yylhsminor.yy364 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy364 = yylhsminor.yy364; + case 245: /* pseudo_column ::= TBNAME */ +{ yylhsminor.yy46 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 248: /* predicate ::= expression compare_op expression */ - case 253: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==253); + case 251: /* predicate ::= expression compare_op expression */ + case 256: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==256); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy364); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy328, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy46); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy292, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 249: /* predicate ::= expression BETWEEN expression AND expression */ + case 252: /* predicate ::= expression BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy364); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy364), releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy46); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy46), releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } - yymsp[-4].minor.yy364 = yylhsminor.yy364; + yymsp[-4].minor.yy46 = yylhsminor.yy46; break; - case 250: /* predicate ::= expression NOT BETWEEN expression AND expression */ + case 253: /* predicate ::= expression NOT BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy364); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), releaseRawExprNode(pCxt, yymsp[-5].minor.yy364), releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy46); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), releaseRawExprNode(pCxt, yymsp[-5].minor.yy46), releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } - yymsp[-5].minor.yy364 = yylhsminor.yy364; + yymsp[-5].minor.yy46 = yylhsminor.yy46; break; - case 251: /* predicate ::= expression IS NULL */ + case 254: /* predicate ::= expression IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), NULL)); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 252: /* predicate ::= expression IS NOT NULL */ + case 255: /* predicate ::= expression IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy364), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy46), NULL)); } - yymsp[-3].minor.yy364 = yylhsminor.yy364; + yymsp[-3].minor.yy46 = yylhsminor.yy46; break; - case 254: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy328 = OP_TYPE_LOWER_THAN; } + case 257: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy292 = OP_TYPE_LOWER_THAN; } break; - case 255: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy328 = OP_TYPE_GREATER_THAN; } + case 258: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy292 = OP_TYPE_GREATER_THAN; } break; - case 256: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy328 = OP_TYPE_LOWER_EQUAL; } + case 259: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy292 = OP_TYPE_LOWER_EQUAL; } break; - case 257: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy328 = OP_TYPE_GREATER_EQUAL; } + case 260: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy292 = OP_TYPE_GREATER_EQUAL; } break; - case 258: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy328 = OP_TYPE_NOT_EQUAL; } + case 261: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy292 = OP_TYPE_NOT_EQUAL; } break; - case 259: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy328 = OP_TYPE_EQUAL; } + case 262: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy292 = OP_TYPE_EQUAL; } break; - case 260: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy328 = OP_TYPE_LIKE; } + case 263: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy292 = OP_TYPE_LIKE; } break; - case 261: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy328 = OP_TYPE_NOT_LIKE; } + case 264: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy292 = OP_TYPE_NOT_LIKE; } break; - case 262: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy328 = OP_TYPE_MATCH; } + case 265: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy292 = OP_TYPE_MATCH; } break; - case 263: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy328 = OP_TYPE_NMATCH; } + case 266: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy292 = OP_TYPE_NMATCH; } break; - case 264: /* in_op ::= IN */ -{ yymsp[0].minor.yy328 = OP_TYPE_IN; } + case 267: /* in_op ::= IN */ +{ yymsp[0].minor.yy292 = OP_TYPE_IN; } break; - case 265: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy328 = OP_TYPE_NOT_IN; } + case 268: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy292 = OP_TYPE_NOT_IN; } break; - case 266: /* in_predicate_value ::= NK_LP expression_list NK_RP */ -{ yylhsminor.yy364 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy40)); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + case 269: /* in_predicate_value ::= NK_LP expression_list NK_RP */ +{ yylhsminor.yy46 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy194)); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 268: /* boolean_value_expression ::= NOT boolean_primary */ + case 271: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy364), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy46), NULL)); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 269: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 272: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy364); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy46); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 270: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 273: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy364); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy46); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 275: /* from_clause ::= FROM table_reference_list */ - case 305: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==305); - case 328: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==328); -{ yymsp[-1].minor.yy364 = yymsp[0].minor.yy364; } + case 278: /* from_clause ::= FROM table_reference_list */ + case 308: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==308); + case 331: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==331); +{ yymsp[-1].minor.yy46 = yymsp[0].minor.yy46; } break; - case 277: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy364 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy364, yymsp[0].minor.yy364, NULL); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + case 280: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy46 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy46, yymsp[0].minor.yy46, NULL); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 280: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy364 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy437, &yymsp[0].minor.yy437); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; + case 283: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy46 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy95, &yymsp[0].minor.yy95); } + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 281: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy364 = createRealTableNode(pCxt, &yymsp[-3].minor.yy437, &yymsp[-1].minor.yy437, &yymsp[0].minor.yy437); } - yymsp[-3].minor.yy364 = yylhsminor.yy364; + case 284: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy46 = createRealTableNode(pCxt, &yymsp[-3].minor.yy95, &yymsp[-1].minor.yy95, &yymsp[0].minor.yy95); } + yymsp[-3].minor.yy46 = yylhsminor.yy46; break; - case 282: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy364 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy364), &yymsp[0].minor.yy437); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; + case 285: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy46 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy46), &yymsp[0].minor.yy95); } + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 284: /* alias_opt ::= */ -{ yymsp[1].minor.yy437 = nil_token; } + case 287: /* alias_opt ::= */ +{ yymsp[1].minor.yy95 = nil_token; } break; - case 285: /* alias_opt ::= table_alias */ -{ yylhsminor.yy437 = yymsp[0].minor.yy437; } - yymsp[0].minor.yy437 = yylhsminor.yy437; + case 288: /* alias_opt ::= table_alias */ +{ yylhsminor.yy95 = yymsp[0].minor.yy95; } + yymsp[0].minor.yy95 = yylhsminor.yy95; break; - case 286: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy437 = yymsp[0].minor.yy437; } + case 289: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy95 = yymsp[0].minor.yy95; } break; - case 287: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 288: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==288); -{ yymsp[-2].minor.yy364 = yymsp[-1].minor.yy364; } + case 290: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 291: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==291); +{ yymsp[-2].minor.yy46 = yymsp[-1].minor.yy46; } break; - case 289: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy364 = createJoinTableNode(pCxt, yymsp[-4].minor.yy392, yymsp[-5].minor.yy364, yymsp[-2].minor.yy364, yymsp[0].minor.yy364); } - yymsp[-5].minor.yy364 = yylhsminor.yy364; + case 292: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy46 = createJoinTableNode(pCxt, yymsp[-4].minor.yy10, yymsp[-5].minor.yy46, yymsp[-2].minor.yy46, yymsp[0].minor.yy46); } + yymsp[-5].minor.yy46 = yylhsminor.yy46; break; - case 290: /* join_type ::= */ -{ yymsp[1].minor.yy392 = JOIN_TYPE_INNER; } + case 293: /* join_type ::= */ +{ yymsp[1].minor.yy10 = JOIN_TYPE_INNER; } break; - case 291: /* join_type ::= INNER */ -{ yymsp[0].minor.yy392 = JOIN_TYPE_INNER; } + case 294: /* join_type ::= INNER */ +{ yymsp[0].minor.yy10 = JOIN_TYPE_INNER; } break; - case 292: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 295: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-8].minor.yy364 = createSelectStmt(pCxt, yymsp[-7].minor.yy493, yymsp[-6].minor.yy40, yymsp[-5].minor.yy364); - yymsp[-8].minor.yy364 = addWhereClause(pCxt, yymsp[-8].minor.yy364, yymsp[-4].minor.yy364); - yymsp[-8].minor.yy364 = addPartitionByClause(pCxt, yymsp[-8].minor.yy364, yymsp[-3].minor.yy40); - yymsp[-8].minor.yy364 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy364, yymsp[-2].minor.yy364); - yymsp[-8].minor.yy364 = addGroupByClause(pCxt, yymsp[-8].minor.yy364, yymsp[-1].minor.yy40); - yymsp[-8].minor.yy364 = addHavingClause(pCxt, yymsp[-8].minor.yy364, yymsp[0].minor.yy364); + yymsp[-8].minor.yy46 = createSelectStmt(pCxt, yymsp[-7].minor.yy151, yymsp[-6].minor.yy194, yymsp[-5].minor.yy46); + yymsp[-8].minor.yy46 = addWhereClause(pCxt, yymsp[-8].minor.yy46, yymsp[-4].minor.yy46); + yymsp[-8].minor.yy46 = addPartitionByClause(pCxt, yymsp[-8].minor.yy46, yymsp[-3].minor.yy194); + yymsp[-8].minor.yy46 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy46, yymsp[-2].minor.yy46); + yymsp[-8].minor.yy46 = addGroupByClause(pCxt, yymsp[-8].minor.yy46, yymsp[-1].minor.yy194); + yymsp[-8].minor.yy46 = addHavingClause(pCxt, yymsp[-8].minor.yy46, yymsp[0].minor.yy46); } break; - case 295: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy493 = false; } + case 298: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy151 = false; } break; - case 296: /* select_list ::= NK_STAR */ -{ yymsp[0].minor.yy40 = NULL; } + case 299: /* select_list ::= NK_STAR */ +{ yymsp[0].minor.yy194 = NULL; } break; - case 300: /* select_item ::= common_expression */ + case 303: /* select_item ::= common_expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy364); - yylhsminor.yy364 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy364), &t); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy46); + yylhsminor.yy46 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy46), &t); } - yymsp[0].minor.yy364 = yylhsminor.yy364; + yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 301: /* select_item ::= common_expression column_alias */ -{ yylhsminor.yy364 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy364), &yymsp[0].minor.yy437); } - yymsp[-1].minor.yy364 = yylhsminor.yy364; + case 304: /* select_item ::= common_expression column_alias */ +{ yylhsminor.yy46 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy46), &yymsp[0].minor.yy95); } + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 302: /* select_item ::= common_expression AS column_alias */ -{ yylhsminor.yy364 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), &yymsp[0].minor.yy437); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + case 305: /* select_item ::= common_expression AS column_alias */ +{ yylhsminor.yy46 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), &yymsp[0].minor.yy95); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 303: /* select_item ::= table_name NK_DOT NK_STAR */ -{ yylhsminor.yy364 = createColumnNode(pCxt, &yymsp[-2].minor.yy437, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + case 306: /* select_item ::= table_name NK_DOT NK_STAR */ +{ yylhsminor.yy46 = createColumnNode(pCxt, &yymsp[-2].minor.yy95, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 307: /* partition_by_clause_opt ::= PARTITION BY expression_list */ - case 324: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==324); - case 334: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==334); -{ yymsp[-2].minor.yy40 = yymsp[0].minor.yy40; } + case 310: /* partition_by_clause_opt ::= PARTITION BY expression_list */ + case 327: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==327); + case 337: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==337); +{ yymsp[-2].minor.yy194 = yymsp[0].minor.yy194; } break; - case 309: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy364 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy364), releaseRawExprNode(pCxt, yymsp[-1].minor.yy364)); } + case 312: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy46 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy46), releaseRawExprNode(pCxt, yymsp[-1].minor.yy46)); } break; - case 310: /* twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */ -{ yymsp[-3].minor.yy364 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy364)); } + case 313: /* twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */ +{ yymsp[-3].minor.yy46 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy46)); } break; - case 311: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy364 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy364), NULL, yymsp[-1].minor.yy364, yymsp[0].minor.yy364); } + case 314: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy46 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy46), NULL, yymsp[-1].minor.yy46, yymsp[0].minor.yy46); } break; - case 312: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy364 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy364), releaseRawExprNode(pCxt, yymsp[-3].minor.yy364), yymsp[-1].minor.yy364, yymsp[0].minor.yy364); } + case 315: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy46 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy46), releaseRawExprNode(pCxt, yymsp[-3].minor.yy46), yymsp[-1].minor.yy46, yymsp[0].minor.yy46); } break; - case 314: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ -{ yymsp[-3].minor.yy364 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy364); } + case 317: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ +{ yymsp[-3].minor.yy46 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy46); } break; - case 316: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy364 = createFillNode(pCxt, yymsp[-1].minor.yy478, NULL); } + case 319: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy46 = createFillNode(pCxt, yymsp[-1].minor.yy6, NULL); } break; - case 317: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy364 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy40)); } + case 320: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy46 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy194)); } break; - case 318: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy478 = FILL_MODE_NONE; } + case 321: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy6 = FILL_MODE_NONE; } break; - case 319: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy478 = FILL_MODE_PREV; } + case 322: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy6 = FILL_MODE_PREV; } break; - case 320: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy478 = FILL_MODE_NULL; } + case 323: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy6 = FILL_MODE_NULL; } break; - case 321: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy478 = FILL_MODE_LINEAR; } + case 324: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy6 = FILL_MODE_LINEAR; } break; - case 322: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy478 = FILL_MODE_NEXT; } + case 325: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy6 = FILL_MODE_NEXT; } break; - case 325: /* group_by_list ::= expression */ -{ yylhsminor.yy40 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); } - yymsp[0].minor.yy40 = yylhsminor.yy40; + case 328: /* group_by_list ::= expression */ +{ yylhsminor.yy194 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } + yymsp[0].minor.yy194 = yylhsminor.yy194; break; - case 326: /* group_by_list ::= group_by_list NK_COMMA expression */ -{ yylhsminor.yy40 = addNodeToList(pCxt, yymsp[-2].minor.yy40, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy364))); } - yymsp[-2].minor.yy40 = yylhsminor.yy40; + case 329: /* group_by_list ::= group_by_list NK_COMMA expression */ +{ yylhsminor.yy194 = addNodeToList(pCxt, yymsp[-2].minor.yy194, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy46))); } + yymsp[-2].minor.yy194 = yylhsminor.yy194; break; - case 329: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 332: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy364 = addOrderByClause(pCxt, yymsp[-3].minor.yy364, yymsp[-2].minor.yy40); - yylhsminor.yy364 = addSlimitClause(pCxt, yylhsminor.yy364, yymsp[-1].minor.yy364); - yylhsminor.yy364 = addLimitClause(pCxt, yylhsminor.yy364, yymsp[0].minor.yy364); + yylhsminor.yy46 = addOrderByClause(pCxt, yymsp[-3].minor.yy46, yymsp[-2].minor.yy194); + yylhsminor.yy46 = addSlimitClause(pCxt, yylhsminor.yy46, yymsp[-1].minor.yy46); + yylhsminor.yy46 = addLimitClause(pCxt, yylhsminor.yy46, yymsp[0].minor.yy46); } - yymsp[-3].minor.yy364 = yylhsminor.yy364; + yymsp[-3].minor.yy46 = yylhsminor.yy46; break; - case 331: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ -{ yylhsminor.yy364 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy364, yymsp[0].minor.yy364); } - yymsp[-3].minor.yy364 = yylhsminor.yy364; + case 334: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ +{ yylhsminor.yy46 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy46, yymsp[0].minor.yy46); } + yymsp[-3].minor.yy46 = yylhsminor.yy46; break; - case 336: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 340: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==340); -{ yymsp[-1].minor.yy364 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 339: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 343: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==343); +{ yymsp[-1].minor.yy46 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 337: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 341: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==341); -{ yymsp[-3].minor.yy364 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 340: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 344: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==344); +{ yymsp[-3].minor.yy46 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 338: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 342: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==342); -{ yymsp[-3].minor.yy364 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 341: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 345: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==345); +{ yymsp[-3].minor.yy46 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 343: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy364 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy364); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + case 346: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy46 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy46); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 347: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy364 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy364), yymsp[-1].minor.yy210, yymsp[0].minor.yy177); } - yymsp[-2].minor.yy364 = yylhsminor.yy364; + case 350: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy46 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy46), yymsp[-1].minor.yy456, yymsp[0].minor.yy273); } + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 348: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy210 = ORDER_ASC; } + case 351: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy456 = ORDER_ASC; } break; - case 349: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy210 = ORDER_ASC; } + case 352: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy456 = ORDER_ASC; } break; - case 350: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy210 = ORDER_DESC; } + case 353: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy456 = ORDER_DESC; } break; - case 351: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy177 = NULL_ORDER_DEFAULT; } + case 354: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy273 = NULL_ORDER_DEFAULT; } break; - case 352: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy177 = NULL_ORDER_FIRST; } + case 355: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy273 = NULL_ORDER_FIRST; } break; - case 353: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy177 = NULL_ORDER_LAST; } + case 356: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy273 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c index 9ef1c01cd1..c46f98ef55 100644 --- a/source/libs/planner/src/planPhysiCreater.c +++ b/source/libs/planner/src/planPhysiCreater.c @@ -719,6 +719,9 @@ static int32_t createStreamScanPhysiNodeByExchange(SPhysiPlanContext* pCxt, SExc if (NULL == pScan->pScanCols) { code = TSDB_CODE_OUT_OF_MEMORY; } + if (TSDB_CODE_SUCCESS == code) { + code = sortScanCols(pScan->pScanCols); + } if (TSDB_CODE_SUCCESS == code) { code = addDataBlockSlots(pCxt, pScan->pScanCols, pScan->node.pOutputDataBlockDesc); } -- GitLab