From c4bd887e63b956873895b9023598e79ab6df948d Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 28 Dec 2021 20:03:41 +0800 Subject: [PATCH] [td-11818]support create child table. --- include/common/taosdef.h | 12 +- include/common/tmsg.h | 20 - include/common/ttokendef.h | 388 ++--- include/libs/parser/parsenodes.h | 1 + include/util/tdef.h | 6 +- source/client/src/clientImpl.c | 58 +- source/common/src/tvariant.c | 1 - source/libs/parser/inc/sql.y | 2 +- source/libs/parser/inc/ttokendef.h | 231 --- source/libs/parser/src/astGenerator.c | 2 +- source/libs/parser/src/dCDAstProcess.c | 90 +- source/libs/parser/src/queryInfoUtil.c | 2 +- source/libs/parser/src/sql.c | 2212 ++++++++++++------------ source/libs/parser/src/ttokenizer.c | 12 +- 14 files changed, 1388 insertions(+), 1649 deletions(-) delete mode 100644 source/libs/parser/inc/ttokendef.h diff --git a/include/common/taosdef.h b/include/common/taosdef.h index da58f98e4c..46c0c98ff0 100644 --- a/include/common/taosdef.h +++ b/include/common/taosdef.h @@ -38,12 +38,12 @@ typedef enum { } EQType; typedef enum { - TSDB_SUPER_TABLE = 1, // super table - TSDB_CHILD_TABLE = 2, // table created from super table - TSDB_NORMAL_TABLE = 3, // ordinary table - TSDB_STREAM_TABLE = 4, // table created from stream computing - TSDB_TEMP_TABLE = 5, // temp table created by nest query - TSDB_TABLE_MAX = 6 + TSDB_SUPER_TABLE = 1, // super table + TSDB_CHILD_TABLE = 2, // table created from super table + TSDB_NORMAL_TABLE = 3, // ordinary table + TSDB_STREAM_TABLE = 4, // table created from stream computing + TSDB_TEMP_TABLE = 5, // temp table created by nest query + TSDB_TABLE_MAX = 6 } ETableType; typedef enum { diff --git a/include/common/tmsg.h b/include/common/tmsg.h index c644bfda9e..8a05ba9d02 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -218,26 +218,6 @@ typedef struct { char data[]; } SMDCreateTableMsg; -// typedef struct { -// int32_t len; // one create table message -// char tableName[TSDB_TABLE_FNAME_LEN]; -// int16_t numOfColumns; -// int16_t sqlLen; // the length of SQL, it starts after schema , sql is a null-terminated string -// int8_t igExists; -// int8_t rspMeta; -// int8_t reserved[16]; -// char schema[]; -//} SCreateTableMsg; - -typedef struct { - char tableName[TSDB_TABLE_FNAME_LEN]; - int16_t numOfColumns; - int16_t numOfTags; - int8_t igExists; - int8_t rspMeta; - char schema[]; -} SCreateCTableMsg; - typedef struct { char name[TSDB_TABLE_FNAME_LEN]; int8_t igExists; diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 5f9fe5134b..90926da120 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -13,205 +13,199 @@ * along with this program. If not, see . */ -#ifndef _TD_COMMON_TOKEN_DEF_H_ -#define _TD_COMMON_TOKEN_DEF_H_ +#ifndef TDENGINE_TTOKENDEF_H +#define TDENGINE_TTOKENDEF_H #define TK_ID 1 #define TK_BOOL 2 -#define TK_TINYINT 3 -#define TK_SMALLINT 4 -#define TK_INTEGER 5 -#define TK_BIGINT 6 -#define TK_FLOAT 7 -#define TK_DOUBLE 8 -#define TK_STRING 9 -#define TK_TIMESTAMP 10 -#define TK_BINARY 11 -#define TK_NCHAR 12 -#define TK_OR 13 -#define TK_AND 14 -#define TK_NOT 15 -#define TK_EQ 16 -#define TK_NE 17 -#define TK_ISNULL 18 -#define TK_NOTNULL 19 -#define TK_IS 20 -#define TK_LIKE 21 -#define TK_MATCH 22 -#define TK_NMATCH 23 -#define TK_GLOB 24 -#define TK_BETWEEN 25 -#define TK_IN 26 -#define TK_GT 27 -#define TK_GE 28 -#define TK_LT 29 -#define TK_LE 30 -#define TK_BITAND 31 -#define TK_BITOR 32 -#define TK_LSHIFT 33 -#define TK_RSHIFT 34 -#define TK_PLUS 35 -#define TK_MINUS 36 -#define TK_DIVIDE 37 -#define TK_TIMES 38 -#define TK_STAR 39 -#define TK_SLASH 40 -#define TK_REM 41 -#define TK_CONCAT 42 -#define TK_UMINUS 43 -#define TK_UPLUS 44 -#define TK_BITNOT 45 -#define TK_SHOW 46 -#define TK_DATABASES 47 -#define TK_TOPICS 48 -#define TK_FUNCTIONS 49 -#define TK_MNODES 50 -#define TK_DNODES 51 -#define TK_ACCOUNTS 52 -#define TK_USERS 53 -#define TK_MODULES 54 -#define TK_QUERIES 55 -#define TK_CONNECTIONS 56 -#define TK_STREAMS 57 -#define TK_VARIABLES 58 -#define TK_SCORES 59 -#define TK_GRANTS 60 -#define TK_VNODES 61 -#define TK_DOT 62 -#define TK_CREATE 63 -#define TK_TABLE 64 -#define TK_STABLE 65 -#define TK_DATABASE 66 -#define TK_TABLES 67 -#define TK_STABLES 68 -#define TK_VGROUPS 69 -#define TK_DROP 70 -#define TK_TOPIC 71 -#define TK_FUNCTION 72 -#define TK_DNODE 73 -#define TK_USER 74 -#define TK_ACCOUNT 75 -#define TK_USE 76 -#define TK_DESCRIBE 77 -#define TK_DESC 78 -#define TK_ALTER 79 -#define TK_PASS 80 -#define TK_PRIVILEGE 81 -#define TK_LOCAL 82 -#define TK_COMPACT 83 -#define TK_LP 84 -#define TK_RP 85 -#define TK_IF 86 -#define TK_EXISTS 87 -#define TK_AS 88 -#define TK_OUTPUTTYPE 89 -#define TK_AGGREGATE 90 -#define TK_BUFSIZE 91 -#define TK_PPS 92 -#define TK_TSERIES 93 -#define TK_DBS 94 -#define TK_STORAGE 95 -#define TK_QTIME 96 -#define TK_CONNS 97 -#define TK_STATE 98 -#define TK_COMMA 99 -#define TK_KEEP 100 -#define TK_CACHE 101 -#define TK_REPLICA 102 -#define TK_QUORUM 103 -#define TK_DAYS 104 -#define TK_MINROWS 105 -#define TK_MAXROWS 106 -#define TK_BLOCKS 107 -#define TK_CTIME 108 -#define TK_WAL 109 -#define TK_FSYNC 110 -#define TK_COMP 111 -#define TK_PRECISION 112 -#define TK_UPDATE 113 -#define TK_CACHELAST 114 -#define TK_PARTITIONS 115 -#define TK_UNSIGNED 116 -#define TK_TAGS 117 -#define TK_USING 118 -#define TK_NULL 119 -#define TK_NOW 120 -#define TK_SELECT 121 -#define TK_UNION 122 -#define TK_ALL 123 -#define TK_DISTINCT 124 -#define TK_FROM 125 -#define TK_VARIABLE 126 -#define TK_INTERVAL 127 -#define TK_EVERY 128 -#define TK_SESSION 129 -#define TK_STATE_WINDOW 130 -#define TK_FILL 131 -#define TK_SLIDING 132 -#define TK_ORDER 133 -#define TK_BY 134 -#define TK_ASC 135 -#define TK_GROUP 136 -#define TK_HAVING 137 -#define TK_LIMIT 138 -#define TK_OFFSET 139 -#define TK_SLIMIT 140 -#define TK_SOFFSET 141 -#define TK_WHERE 142 -#define TK_RESET 143 -#define TK_QUERY 144 -#define TK_SYNCDB 145 -#define TK_ADD 146 -#define TK_COLUMN 147 -#define TK_MODIFY 148 -#define TK_TAG 149 -#define TK_CHANGE 150 -#define TK_SET 151 -#define TK_KILL 152 -#define TK_CONNECTION 153 -#define TK_STREAM 154 -#define TK_COLON 155 -#define TK_ABORT 156 -#define TK_AFTER 157 -#define TK_ATTACH 158 -#define TK_BEFORE 159 -#define TK_BEGIN 160 -#define TK_CASCADE 161 -#define TK_CLUSTER 162 -#define TK_CONFLICT 163 -#define TK_COPY 164 -#define TK_DEFERRED 165 -#define TK_DELIMITERS 166 -#define TK_DETACH 167 -#define TK_EACH 168 -#define TK_END 169 -#define TK_EXPLAIN 170 -#define TK_FAIL 171 -#define TK_FOR 172 -#define TK_IGNORE 173 -#define TK_IMMEDIATE 174 -#define TK_INITIALLY 175 -#define TK_INSTEAD 176 -#define TK_KEY 177 -#define TK_OF 178 -#define TK_RAISE 179 -#define TK_REPLACE 180 -#define TK_RESTRICT 181 -#define TK_ROW 182 -#define TK_STATEMENT 183 -#define TK_TRIGGER 184 -#define TK_VIEW 185 -#define TK_IPTOKEN 186 -#define TK_SEMI 187 -#define TK_NONE 188 -#define TK_PREV 189 -#define TK_LINEAR 190 -#define TK_IMPORT 191 -#define TK_TBNAME 192 -#define TK_JOIN 193 -#define TK_INSERT 194 -#define TK_INTO 195 -#define TK_VALUES 196 +#define TK_INTEGER 3 +#define TK_FLOAT 4 +#define TK_STRING 5 +#define TK_TIMESTAMP 6 +#define TK_OR 7 +#define TK_AND 8 +#define TK_NOT 9 +#define TK_EQ 10 +#define TK_NE 11 +#define TK_ISNULL 12 +#define TK_NOTNULL 13 +#define TK_IS 14 +#define TK_LIKE 15 +#define TK_MATCH 16 +#define TK_NMATCH 17 +#define TK_GLOB 18 +#define TK_BETWEEN 19 +#define TK_IN 20 +#define TK_GT 21 +#define TK_GE 22 +#define TK_LT 23 +#define TK_LE 24 +#define TK_BITAND 25 +#define TK_BITOR 26 +#define TK_LSHIFT 27 +#define TK_RSHIFT 28 +#define TK_PLUS 29 +#define TK_MINUS 30 +#define TK_DIVIDE 31 +#define TK_TIMES 32 +#define TK_STAR 33 +#define TK_SLASH 34 +#define TK_REM 35 +#define TK_CONCAT 36 +#define TK_UMINUS 37 +#define TK_UPLUS 38 +#define TK_BITNOT 39 +#define TK_SHOW 40 +#define TK_DATABASES 41 +#define TK_TOPICS 42 +#define TK_FUNCTIONS 43 +#define TK_MNODES 44 +#define TK_DNODES 45 +#define TK_ACCOUNTS 46 +#define TK_USERS 47 +#define TK_MODULES 48 +#define TK_QUERIES 49 +#define TK_CONNECTIONS 50 +#define TK_STREAMS 51 +#define TK_VARIABLES 52 +#define TK_SCORES 53 +#define TK_GRANTS 54 +#define TK_VNODES 55 +#define TK_DOT 56 +#define TK_CREATE 57 +#define TK_TABLE 58 +#define TK_STABLE 59 +#define TK_DATABASE 60 +#define TK_TABLES 61 +#define TK_STABLES 62 +#define TK_VGROUPS 63 +#define TK_DROP 64 +#define TK_TOPIC 65 +#define TK_FUNCTION 66 +#define TK_DNODE 67 +#define TK_USER 68 +#define TK_ACCOUNT 69 +#define TK_USE 70 +#define TK_DESCRIBE 71 +#define TK_DESC 72 +#define TK_ALTER 73 +#define TK_PASS 74 +#define TK_PRIVILEGE 75 +#define TK_LOCAL 76 +#define TK_COMPACT 77 +#define TK_LP 78 +#define TK_RP 79 +#define TK_IF 80 +#define TK_EXISTS 81 +#define TK_PORT 82 +#define TK_IPTOKEN 83 +#define TK_AS 84 +#define TK_OUTPUTTYPE 85 +#define TK_AGGREGATE 86 +#define TK_BUFSIZE 87 +#define TK_PPS 88 +#define TK_TSERIES 89 +#define TK_DBS 90 +#define TK_STORAGE 91 +#define TK_QTIME 92 +#define TK_CONNS 93 +#define TK_STATE 94 +#define TK_COMMA 95 +#define TK_KEEP 96 +#define TK_CACHE 97 +#define TK_REPLICA 98 +#define TK_QUORUM 99 +#define TK_DAYS 100 +#define TK_MINROWS 101 +#define TK_MAXROWS 102 +#define TK_BLOCKS 103 +#define TK_CTIME 104 +#define TK_WAL 105 +#define TK_FSYNC 106 +#define TK_COMP 107 +#define TK_PRECISION 108 +#define TK_UPDATE 109 +#define TK_CACHELAST 110 +#define TK_UNSIGNED 111 +#define TK_TAGS 112 +#define TK_USING 113 +#define TK_NULL 114 +#define TK_NOW 115 +#define TK_SELECT 116 +#define TK_UNION 117 +#define TK_ALL 118 +#define TK_DISTINCT 119 +#define TK_FROM 120 +#define TK_VARIABLE 121 +#define TK_INTERVAL 122 +#define TK_EVERY 123 +#define TK_SESSION 124 +#define TK_STATE_WINDOW 125 +#define TK_FILL 126 +#define TK_SLIDING 127 +#define TK_ORDER 128 +#define TK_BY 129 +#define TK_ASC 130 +#define TK_GROUP 131 +#define TK_HAVING 132 +#define TK_LIMIT 133 +#define TK_OFFSET 134 +#define TK_SLIMIT 135 +#define TK_SOFFSET 136 +#define TK_WHERE 137 +#define TK_RESET 138 +#define TK_QUERY 139 +#define TK_SYNCDB 140 +#define TK_ADD 141 +#define TK_COLUMN 142 +#define TK_MODIFY 143 +#define TK_TAG 144 +#define TK_CHANGE 145 +#define TK_SET 146 +#define TK_KILL 147 +#define TK_CONNECTION 148 +#define TK_STREAM 149 +#define TK_COLON 150 +#define TK_ABORT 151 +#define TK_AFTER 152 +#define TK_ATTACH 153 +#define TK_BEFORE 154 +#define TK_BEGIN 155 +#define TK_CASCADE 156 +#define TK_CLUSTER 157 +#define TK_CONFLICT 158 +#define TK_COPY 159 +#define TK_DEFERRED 160 +#define TK_DELIMITERS 161 +#define TK_DETACH 162 +#define TK_EACH 163 +#define TK_END 164 +#define TK_EXPLAIN 165 +#define TK_FAIL 166 +#define TK_FOR 167 +#define TK_IGNORE 168 +#define TK_IMMEDIATE 169 +#define TK_INITIALLY 170 +#define TK_INSTEAD 171 +#define TK_KEY 172 +#define TK_OF 173 +#define TK_RAISE 174 +#define TK_REPLACE 175 +#define TK_RESTRICT 176 +#define TK_ROW 177 +#define TK_STATEMENT 178 +#define TK_TRIGGER 179 +#define TK_VIEW 180 +#define TK_SEMI 181 +#define TK_NONE 182 +#define TK_PREV 183 +#define TK_LINEAR 184 +#define TK_IMPORT 185 +#define TK_TBNAME 186 +#define TK_JOIN 187 +#define TK_INSERT 188 +#define TK_INTO 189 +#define TK_VALUES 190 #define TK_SPACE 300 @@ -223,6 +217,6 @@ #define TK_FILE 306 #define TK_QUESTION 307 // denoting the placeholder of "?",when invoking statement bind query -#endif /*_TD_COMMON_TOKEN_DEF_H_*/ +#endif diff --git a/include/libs/parser/parsenodes.h b/include/libs/parser/parsenodes.h index 1a8e8ddd47..980219a4e9 100644 --- a/include/libs/parser/parsenodes.h +++ b/include/libs/parser/parsenodes.h @@ -166,6 +166,7 @@ typedef struct SInsertStmtInfo { typedef struct SDclStmtInfo { int16_t nodeType; int16_t msgType; + SEpSet epSet; char* pMsg; int32_t msgLen; } SDclStmtInfo; diff --git a/include/util/tdef.h b/include/util/tdef.h index 8b810b410c..233e9f0f55 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -317,12 +317,12 @@ do { \ #define TSDB_MAX_FIELD_LEN 16384 #define TSDB_MAX_BINARY_LEN (TSDB_MAX_FIELD_LEN-TSDB_KEYSIZE) // keep 16384 #define TSDB_MAX_NCHAR_LEN (TSDB_MAX_FIELD_LEN-TSDB_KEYSIZE) // keep 16384 -#define PRIMARYKEY_TIMESTAMP_COL_ID 0 +#define PRIMARYKEY_TIMESTAMP_COL_ID 1 #define TSDB_MAX_RPC_THREADS 5 -#define TSDB_QUERY_TYPE_NON_TYPE 0x00u // none type -#define TSDB_QUERY_TYPE_FREE_RESOURCE 0x01u // free qhandle at vnode +#define TSDB_QUERY_TYPE_NON_TYPE 0x00u // none type +#define TSDB_QUERY_TYPE_FREE_RESOURCE 0x01u // free qhandle at vnode #define TSDB_META_COMPACT_RATIO 0 // disable tsdb meta compact by default diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 322a3b9d62..5885d10454 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -182,40 +182,40 @@ int32_t execDdlQuery(SRequestObj* pRequest, SQueryNode* pQuery) { STscObj* pTscObj = pRequest->pTscObj; + SMsgSendInfo* pSendMsg = buildSendMsgInfoImpl(pRequest); SEpSet* pEpSet = &pTscObj->pAppInfo->mgmtEp.epSet; if (pDcl->msgType == TDMT_VND_CREATE_TABLE) { - struct SCatalog* pCatalog = NULL; - - char buf[18] = {0}; - sprintf(buf, "%" PRId64, pRequest->pTscObj->pAppInfo->clusterId); - int32_t code = catalogGetHandle(buf, &pCatalog); - if (code != TSDB_CODE_SUCCESS) { - return code; - } - - SCreateTableMsg* pMsg = pSendMsg->msgInfo.pData; - - SName t = {0}; - tNameFromString(&t, pMsg->name, T_NAME_ACCT|T_NAME_DB|T_NAME_TABLE); - - char db[TSDB_DB_NAME_LEN + TSDB_NAME_DELIMITER_LEN + TSDB_ACCT_ID_LEN] = {0}; - tNameGetFullDbName(&t, db); - - SVgroupInfo info = {0}; - catalogGetTableHashVgroup(pCatalog, pRequest->pTscObj->pTransporter, pEpSet, db, tNameGetTableName(&t), &info); - +// struct SCatalog* pCatalog = NULL; +// +// char buf[18] = {0}; +// sprintf(buf, "%" PRId64, pRequest->pTscObj->pAppInfo->clusterId); +// int32_t code = catalogGetHandle(buf, &pCatalog); +// if (code != TSDB_CODE_SUCCESS) { +// return code; +// } +// +// SCreateTableMsg* pMsg = pSendMsg->msgInfo.pData; +// +// SName t = {0}; +// tNameFromString(&t, pMsg->name, T_NAME_ACCT|T_NAME_DB|T_NAME_TABLE); +// +// char db[TSDB_DB_NAME_LEN + TSDB_NAME_DELIMITER_LEN + TSDB_ACCT_ID_LEN] = {0}; +// tNameGetFullDbName(&t, db); +// +// SVgroupInfo info = {0}; +// catalogGetTableHashVgroup(pCatalog, pRequest->pTscObj->pTransporter, pEpSet, db, tNameGetTableName(&t), &info); +// int64_t transporterId = 0; - SEpSet ep = {0}; - ep.inUse = info.inUse; - ep.numOfEps = info.numOfEps; - for(int32_t i = 0; i < ep.numOfEps; ++i) { - ep.port[i] = info.epAddr[i].port; - tstrncpy(ep.fqdn[i], info.epAddr[i].fqdn, tListLen(ep.fqdn[i])); - } - - asyncSendMsgToServer(pTscObj->pTransporter, &ep, &transporterId, pSendMsg); +// SEpSet ep = {0}; +// ep.inUse = info.inUse; +// ep.numOfEps = info.numOfEps; +// for(int32_t i = 0; i < ep.numOfEps; ++i) { +// ep.port[i] = info.epAddr[i].port; +// tstrncpy(ep.fqdn[i], info.epAddr[i].fqdn, tListLen(ep.fqdn[i])); +// } + asyncSendMsgToServer(pTscObj->pTransporter, &pDcl->epSet, &transporterId, pSendMsg); } else { int64_t transporterId = 0; asyncSendMsgToServer(pTscObj->pTransporter, pEpSet, &transporterId, pSendMsg); diff --git a/source/common/src/tvariant.c b/source/common/src/tvariant.c index 8a5a300fcf..27f1d4947d 100644 --- a/source/common/src/tvariant.c +++ b/source/common/src/tvariant.c @@ -16,7 +16,6 @@ #include "taos.h" #include "taosdef.h" -#include "thash.h" #include "ttime.h" #include "ttokendef.h" #include "ttypes.h" diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 7f23577060..e9f9c862e2 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -6,7 +6,7 @@ %default_type {SToken} %extra_argument {SSqlInfo* pInfo} -%fallback ID BOOL TINYINT SMALLINT INTEGER BIGINT FLOAT DOUBLE STRING TIMESTAMP BINARY NCHAR. +%fallback ID BOOL INTEGER FLOAT STRING TIMESTAMP. %left OR. %left AND. diff --git a/source/libs/parser/inc/ttokendef.h b/source/libs/parser/inc/ttokendef.h deleted file mode 100644 index d6adda5d45..0000000000 --- a/source/libs/parser/inc/ttokendef.h +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 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 . - */ - -#ifndef TDENGINE_TTOKENDEF_H -#define TDENGINE_TTOKENDEF_H - -#define TK_ID 1 -#define TK_BOOL 2 -#define TK_TINYINT 3 -#define TK_SMALLINT 4 -#define TK_INTEGER 5 -#define TK_BIGINT 6 -#define TK_FLOAT 7 -#define TK_DOUBLE 8 -#define TK_STRING 9 -#define TK_TIMESTAMP 10 -#define TK_BINARY 11 -#define TK_NCHAR 12 -#define TK_OR 13 -#define TK_AND 14 -#define TK_NOT 15 -#define TK_EQ 16 -#define TK_NE 17 -#define TK_ISNULL 18 -#define TK_NOTNULL 19 -#define TK_IS 20 -#define TK_LIKE 21 -#define TK_MATCH 22 -#define TK_NMATCH 23 -#define TK_GLOB 24 -#define TK_BETWEEN 25 -#define TK_IN 26 -#define TK_GT 27 -#define TK_GE 28 -#define TK_LT 29 -#define TK_LE 30 -#define TK_BITAND 31 -#define TK_BITOR 32 -#define TK_LSHIFT 33 -#define TK_RSHIFT 34 -#define TK_PLUS 35 -#define TK_MINUS 36 -#define TK_DIVIDE 37 -#define TK_TIMES 38 -#define TK_STAR 39 -#define TK_SLASH 40 -#define TK_REM 41 -#define TK_CONCAT 42 -#define TK_UMINUS 43 -#define TK_UPLUS 44 -#define TK_BITNOT 45 -#define TK_SHOW 46 -#define TK_DATABASES 47 -#define TK_TOPICS 48 -#define TK_FUNCTIONS 49 -#define TK_MNODES 50 -#define TK_DNODES 51 -#define TK_ACCOUNTS 52 -#define TK_USERS 53 -#define TK_MODULES 54 -#define TK_QUERIES 55 -#define TK_CONNECTIONS 56 -#define TK_STREAMS 57 -#define TK_VARIABLES 58 -#define TK_SCORES 59 -#define TK_GRANTS 60 -#define TK_VNODES 61 -#define TK_DOT 62 -#define TK_CREATE 63 -#define TK_TABLE 64 -#define TK_STABLE 65 -#define TK_DATABASE 66 -#define TK_TABLES 67 -#define TK_STABLES 68 -#define TK_VGROUPS 69 -#define TK_DROP 70 -#define TK_TOPIC 71 -#define TK_FUNCTION 72 -#define TK_DNODE 73 -#define TK_USER 74 -#define TK_ACCOUNT 75 -#define TK_USE 76 -#define TK_DESCRIBE 77 -#define TK_DESC 78 -#define TK_ALTER 79 -#define TK_PASS 80 -#define TK_PRIVILEGE 81 -#define TK_LOCAL 82 -#define TK_COMPACT 83 -#define TK_LP 84 -#define TK_RP 85 -#define TK_IF 86 -#define TK_EXISTS 87 -#define TK_PORT 88 -#define TK_IPTOKEN 89 -#define TK_AS 90 -#define TK_OUTPUTTYPE 91 -#define TK_AGGREGATE 92 -#define TK_BUFSIZE 93 -#define TK_PPS 94 -#define TK_TSERIES 95 -#define TK_DBS 96 -#define TK_STORAGE 97 -#define TK_QTIME 98 -#define TK_CONNS 99 -#define TK_STATE 100 -#define TK_COMMA 101 -#define TK_KEEP 102 -#define TK_CACHE 103 -#define TK_REPLICA 104 -#define TK_QUORUM 105 -#define TK_DAYS 106 -#define TK_MINROWS 107 -#define TK_MAXROWS 108 -#define TK_BLOCKS 109 -#define TK_CTIME 110 -#define TK_WAL 111 -#define TK_FSYNC 112 -#define TK_COMP 113 -#define TK_PRECISION 114 -#define TK_UPDATE 115 -#define TK_CACHELAST 116 -#define TK_UNSIGNED 117 -#define TK_TAGS 118 -#define TK_USING 119 -#define TK_NULL 120 -#define TK_NOW 121 -#define TK_SELECT 122 -#define TK_UNION 123 -#define TK_ALL 124 -#define TK_DISTINCT 125 -#define TK_FROM 126 -#define TK_VARIABLE 127 -#define TK_INTERVAL 128 -#define TK_EVERY 129 -#define TK_SESSION 130 -#define TK_STATE_WINDOW 131 -#define TK_FILL 132 -#define TK_SLIDING 133 -#define TK_ORDER 134 -#define TK_BY 135 -#define TK_ASC 136 -#define TK_GROUP 137 -#define TK_HAVING 138 -#define TK_LIMIT 139 -#define TK_OFFSET 140 -#define TK_SLIMIT 141 -#define TK_SOFFSET 142 -#define TK_WHERE 143 -#define TK_RESET 144 -#define TK_QUERY 145 -#define TK_SYNCDB 146 -#define TK_ADD 147 -#define TK_COLUMN 148 -#define TK_MODIFY 149 -#define TK_TAG 150 -#define TK_CHANGE 151 -#define TK_SET 152 -#define TK_KILL 153 -#define TK_CONNECTION 154 -#define TK_STREAM 155 -#define TK_COLON 156 -#define TK_ABORT 157 -#define TK_AFTER 158 -#define TK_ATTACH 159 -#define TK_BEFORE 160 -#define TK_BEGIN 161 -#define TK_CASCADE 162 -#define TK_CLUSTER 163 -#define TK_CONFLICT 164 -#define TK_COPY 165 -#define TK_DEFERRED 166 -#define TK_DELIMITERS 167 -#define TK_DETACH 168 -#define TK_EACH 169 -#define TK_END 170 -#define TK_EXPLAIN 171 -#define TK_FAIL 172 -#define TK_FOR 173 -#define TK_IGNORE 174 -#define TK_IMMEDIATE 175 -#define TK_INITIALLY 176 -#define TK_INSTEAD 177 -#define TK_KEY 178 -#define TK_OF 179 -#define TK_RAISE 180 -#define TK_REPLACE 181 -#define TK_RESTRICT 182 -#define TK_ROW 183 -#define TK_STATEMENT 184 -#define TK_TRIGGER 185 -#define TK_VIEW 186 -#define TK_SEMI 187 -#define TK_NONE 188 -#define TK_PREV 189 -#define TK_LINEAR 190 -#define TK_IMPORT 191 -#define TK_TBNAME 192 -#define TK_JOIN 193 -#define TK_INSERT 194 -#define TK_INTO 195 -#define TK_VALUES 196 - - - - - -#define TK_SPACE 300 -#define TK_COMMENT 301 -#define TK_ILLEGAL 302 -#define TK_HEX 303 // hex number 0x123 -#define TK_OCT 304 // oct number -#define TK_BIN 305 // bin format data 0b111 -#define TK_FILE 306 -#define TK_QUESTION 307 // denoting the placeholder of "?",when invoking statement bind query - -#endif - - diff --git a/source/libs/parser/src/astGenerator.c b/source/libs/parser/src/astGenerator.c index b6a6b73ccc..84253395c5 100644 --- a/source/libs/parser/src/astGenerator.c +++ b/source/libs/parser/src/astGenerator.c @@ -276,7 +276,7 @@ bool tSqlExprIsLeaf(tSqlExpr *pExpr) { return (pExpr->pRight == NULL && pExpr->pLeft == NULL) && (pExpr->tokenId == 0 || (pExpr->tokenId == TK_ID) || - (pExpr->tokenId >= TK_BOOL && pExpr->tokenId <= TK_NCHAR) || + (pExpr->tokenId == TK_BOOL || pExpr->tokenId == TK_STRING || pExpr->tokenId == TK_FLOAT) || (pExpr->tokenId == TK_NULL) || (pExpr->tokenId == TK_SET)); } diff --git a/source/libs/parser/src/dCDAstProcess.c b/source/libs/parser/src/dCDAstProcess.c index 7d733bbeca..f01338e051 100644 --- a/source/libs/parser/src/dCDAstProcess.c +++ b/source/libs/parser/src/dCDAstProcess.c @@ -1,3 +1,4 @@ +#include #include #include "astToMsg.h" #include "parserInt.h" @@ -283,7 +284,7 @@ int32_t doCheckForCreateTable(SSqlInfo* pInfo, SMsgBuf* pMsgBuf) { return TSDB_CODE_SUCCESS; } -int32_t doCheckForCreateCTable(SSqlInfo* pInfo, SParseBasicCtx *pCtx, SMsgBuf* pMsgBuf) { +int32_t doCheckForCreateCTable(SSqlInfo* pInfo, SParseBasicCtx *pCtx, SMsgBuf* pMsgBuf, char** pOutput, int32_t* len, SEpSet* pEpSet) { const char* msg1 = "invalid table name"; const char* msg2 = "tags number not matched"; const char* msg3 = "tag value too long"; @@ -316,13 +317,14 @@ int32_t doCheckForCreateCTable(SSqlInfo* pInfo, SParseBasicCtx *pCtx, SMsgBuf* p const char* pStableName = tNameGetTableName(&name); SArray* pValList = pCreateTableInfo->pTagVals; - size_t valSize = taosArrayGetSize(pValList); + size_t numOfInputTag = taosArrayGetSize(pValList); STableMeta* pSuperTableMeta = NULL; char dbName[TSDB_DB_FNAME_LEN] = {0}; tNameGetFullDbName(&name, dbName); catalogGetTableMeta(pCtx->pCatalog, pCtx->pTransporter, &pCtx->mgmtEpSet, dbName, pStableName, &pSuperTableMeta); + assert(pSuperTableMeta != NULL); // too long tag values will return invalid sql, not be truncated automatically SSchema *pTagSchema = getTableTagSchema(pSuperTableMeta); @@ -342,7 +344,7 @@ int32_t doCheckForCreateCTable(SSqlInfo* pInfo, SParseBasicCtx *pCtx, SMsgBuf* p pNameList = pCreateTableInfo->pTagNames; nameSize = taosArrayGetSize(pNameList); - if (valSize != nameSize || schemaSize < valSize) { + if (numOfInputTag != nameSize || schemaSize < numOfInputTag) { tdDestroyKVRowBuilder(&kvRowBuilder); return buildInvalidOperationMsg(pMsgBuf, msg2); } @@ -418,33 +420,36 @@ int32_t doCheckForCreateCTable(SSqlInfo* pInfo, SParseBasicCtx *pCtx, SMsgBuf* p } } } else { - if (schemaSize != valSize) { + if (schemaSize != numOfInputTag) { tdDestroyKVRowBuilder(&kvRowBuilder); return buildInvalidOperationMsg(pMsgBuf, msg2); } - for (int32_t i = 0; i < valSize; ++i) { + for (int32_t i = 0; i < numOfInputTag; ++i) { SSchema *pSchema = &pTagSchema[i]; - SListItem *pItem = taosArrayGet(pValList, i); + SToken* pItem = taosArrayGet(pValList, i); char tagVal[TSDB_MAX_TAGS_LEN]; if (pSchema->type == TSDB_DATA_TYPE_BINARY || pSchema->type == TSDB_DATA_TYPE_NCHAR) { - if (pItem->pVar.nLen > pSchema->bytes) { + if (pItem->n > pSchema->bytes) { tdDestroyKVRowBuilder(&kvRowBuilder); return buildInvalidOperationMsg(pMsgBuf, msg3); } } else if (pSchema->type == TSDB_DATA_TYPE_TIMESTAMP) { - if (pItem->pVar.nType == TSDB_DATA_TYPE_BINARY) { -// code = convertTimestampStrToInt64(&(pItem->pVar), tinfo.precision); - if (code != TSDB_CODE_SUCCESS) { - return buildInvalidOperationMsg(pMsgBuf, msg4); - } - } else if (pItem->pVar.nType == TSDB_DATA_TYPE_TIMESTAMP) { - pItem->pVar.i = convertTimePrecision(pItem->pVar.i, TSDB_TIME_PRECISION_NANO, tinfo.precision); - } +// if (pItem->pVar.nType == TSDB_DATA_TYPE_BINARY) { +//// code = convertTimestampStrToInt64(&(pItem->pVar), tinfo.precision); +// if (code != TSDB_CODE_SUCCESS) { +// return buildInvalidOperationMsg(pMsgBuf, msg4); +// } +// } else if (pItem->pVar.nType == TSDB_DATA_TYPE_TIMESTAMP) { +// pItem->pVar.i = convertTimePrecision(pItem->pVar.i, TSDB_TIME_PRECISION_NANO, tinfo.precision); +// } } - code = taosVariantDump(&(pItem->pVar), tagVal, pSchema->type, true); + char* endPtr = NULL; + int64_t v = strtoll(pItem->z, &endPtr, 10); + *(int32_t*) tagVal = v; +// code = taosVariantDump(&(pItem->pVar), tagVal, pSchema->type, true); // check again after the convert since it may be converted from binary to nchar. if (pSchema->type == TSDB_DATA_TYPE_BINARY || pSchema->type == TSDB_DATA_TYPE_NCHAR) { @@ -469,33 +474,37 @@ int32_t doCheckForCreateCTable(SSqlInfo* pInfo, SParseBasicCtx *pCtx, SMsgBuf* p if (row == NULL) { return TSDB_CODE_TSC_OUT_OF_MEMORY; } + tdSortKVRowByColIdx(row); - pTag->dataLen = kvRowLen(row); - if (pTag->data == NULL) { - pTag->data = malloc(pTag->dataLen); + SName tableName = {0}; + code = createSName(&tableName, &pCreateTableInfo->name, pCtx, pMsgBuf); + if (code != TSDB_CODE_SUCCESS) { + return code; } - kvRowCpy(pTag->data, row); - free(row); - - bool dbIncluded2 = false; - // table name -// if (tscValidateName(&(pCreateTableInfo->name), true, &dbIncluded2) != TSDB_CODE_SUCCESS) { -// return buildInvalidOperationMsg(pMsgBuf, msg1); -// } - -// STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, TABLE_INDEX); -// code = tscSetTableFullName(&pTableMetaInfo->name, &pCreateTableInfo->name, pSql, dbIncluded2); -// if (code != TSDB_CODE_SUCCESS) { -// return code; -// } - -// pCreateTableInfo->fullname = calloc(1, tNameLen(&pTableMetaInfo->name) + 1); -// code = tNameExtractFullName(&pTableMetaInfo->name, pCreateTableInfo->fullname); -// if (code != TSDB_CODE_SUCCESS) { -// return buildInvalidOperationMsg(pMsgBuf, msg1); -// } + struct SVCreateTbReq req = {0}; + req.type = TD_CHILD_TABLE; + req.name = strdup(tNameGetTableName(&tableName)); + req.ctbCfg.suid = pSuperTableMeta->suid; + req.ctbCfg.pTag = row; + + int32_t serLen = tSerializeSVCreateTbReq(NULL, &req); + char* buf1 = calloc(1, serLen); + char* p = buf1; + tSerializeSVCreateTbReq((void*) &buf1, &req); + *pOutput = p; + *len = serLen; + + SVgroupInfo info = {0}; + catalogGetTableHashVgroup(pCtx->pCatalog, pCtx->pTransporter, &pCtx->mgmtEpSet, dbName, req.name, &info); + + pEpSet->inUse = info.inUse; + pEpSet->numOfEps = info.numOfEps; + for(int32_t i = 0; i < pEpSet->numOfEps; ++i) { + pEpSet->port[i] = info.epAddr[i].port; + tstrncpy(pEpSet->fqdn[i], info.epAddr[i].fqdn, tListLen(pEpSet->fqdn[i])); + } } return TSDB_CODE_SUCCESS; @@ -692,10 +701,11 @@ int32_t qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseBasicCtx* pCtx, SDclStm pDcl->pMsg = (char*)buildCreateTableMsg(pCreateTable, &pDcl->msgLen, pCtx, pMsgBuf); pDcl->msgType = (pCreateTable->type == TSQL_CREATE_TABLE)? TDMT_VND_CREATE_TABLE:TDMT_MND_CREATE_STB; } else if (pCreateTable->type == TSQL_CREATE_CTABLE) { - if ((code = doCheckForCreateCTable(pInfo, pCtx, pMsgBuf)) != TSDB_CODE_SUCCESS) { + if ((code = doCheckForCreateCTable(pInfo, pCtx, pMsgBuf, &pDcl->pMsg, &pDcl->msgLen, &pDcl->epSet)) != TSDB_CODE_SUCCESS) { return code; } + pDcl->msgType = TDMT_VND_CREATE_TABLE; } else if (pCreateTable->type == TSQL_CREATE_STREAM) { // if ((code = doCheckForStream(pSql, pInfo)) != TSDB_CODE_SUCCESS) { // return code; diff --git a/source/libs/parser/src/queryInfoUtil.c b/source/libs/parser/src/queryInfoUtil.c index 1ae0d9211a..d7aa758576 100644 --- a/source/libs/parser/src/queryInfoUtil.c +++ b/source/libs/parser/src/queryInfoUtil.c @@ -26,7 +26,7 @@ size_t getNumOfExprs(SQueryStmtInfo* pQueryInfo) { } SSchema* getOneColumnSchema(const STableMeta* pTableMeta, int32_t colIndex) { - assert(pTableMeta != NULL && pTableMeta->schema != NULL && colIndex >= 0 && colIndex < getNumOfColumns(pTableMeta)); + assert(pTableMeta != NULL && pTableMeta->schema != NULL && colIndex >= 0 && colIndex < (getNumOfColumns(pTableMeta) + getNumOfTags(pTableMeta))); SSchema* pSchema = (SSchema*) pTableMeta->schema; return &pSchema[colIndex]; diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index ac90b3b34a..d091751a56 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -97,30 +97,30 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 279 +#define YYNOCODE 273 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SRelationInfo* yy8; - SWindowStateVal yy40; - SSqlNode* yy56; - SVariant yy69; - SCreateDbInfo yy90; - int yy96; - SField yy100; - int32_t yy104; - SSessionWindowVal yy147; - SSubclause* yy149; - SCreatedTableInfo yy152; + SSqlNode* yy24; + int yy60; + SSubclause* yy129; + SIntervalVal yy136; + int64_t yy157; SCreateAcctInfo yy171; - SLimit yy231; - int64_t yy325; - SIntervalVal yy400; - SArray* yy421; + SSessionWindowVal yy251; + SCreateDbInfo yy254; + SWindowStateVal yy256; + SField yy280; + SRelationInfo* yy292; + tSqlExpr* yy370; + SArray* yy413; SCreateTableSql* yy438; - tSqlExpr* yy439; + SVariant yy461; + SLimit yy503; + int32_t yy516; + SCreatedTableInfo yy544; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -132,7 +132,7 @@ typedef union { #define YYFALLBACK 1 #define YYNSTATE 365 #define YYNRULE 301 -#define YYNTOKEN 197 +#define YYNTOKEN 191 #define YY_MAX_SHIFT 364 #define YY_MIN_SHIFTREDUCE 584 #define YY_MAX_SHIFTREDUCE 884 @@ -206,255 +206,253 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (783) +#define YY_ACTTAB_COUNT (779) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 96, 635, 249, 21, 635, 203, 248, 714, 206, 636, - /* 10 */ 363, 230, 636, 55, 56, 1073, 59, 60, 1024, 1164, - /* 20 */ 252, 49, 48, 47, 671, 58, 322, 63, 61, 64, - /* 30 */ 62, 1021, 1022, 33, 1025, 54, 53, 342, 341, 52, - /* 40 */ 51, 50, 55, 56, 261, 59, 60, 236, 1050, 252, - /* 50 */ 49, 48, 47, 176, 58, 322, 63, 61, 64, 62, - /* 60 */ 155, 827, 206, 830, 54, 53, 206, 204, 52, 51, - /* 70 */ 50, 55, 56, 1165, 59, 60, 99, 1165, 252, 49, - /* 80 */ 48, 47, 1070, 58, 322, 63, 61, 64, 62, 162, - /* 90 */ 81, 36, 635, 54, 53, 318, 162, 52, 51, 50, - /* 100 */ 636, 54, 53, 162, 318, 52, 51, 50, 55, 57, - /* 110 */ 1026, 59, 60, 253, 821, 252, 49, 48, 47, 635, - /* 120 */ 58, 322, 63, 61, 64, 62, 936, 636, 280, 279, - /* 130 */ 54, 53, 188, 232, 52, 51, 50, 1035, 585, 586, + /* 0 */ 1073, 635, 155, 363, 230, 636, 671, 55, 56, 635, + /* 10 */ 59, 60, 1032, 636, 252, 49, 48, 47, 162, 58, + /* 20 */ 322, 63, 61, 64, 62, 236, 1050, 242, 206, 54, + /* 30 */ 53, 1038, 635, 52, 51, 50, 636, 55, 56, 1164, + /* 40 */ 59, 60, 936, 1063, 252, 49, 48, 47, 188, 58, + /* 50 */ 322, 63, 61, 64, 62, 1010, 243, 1008, 1009, 54, + /* 60 */ 53, 233, 1011, 52, 51, 50, 1012, 1070, 1013, 1014, + /* 70 */ 280, 279, 947, 55, 56, 246, 59, 60, 188, 1038, + /* 80 */ 252, 49, 48, 47, 81, 58, 322, 63, 61, 64, + /* 90 */ 62, 320, 1112, 99, 292, 54, 53, 352, 635, 52, + /* 100 */ 51, 50, 636, 55, 57, 261, 59, 60, 318, 821, + /* 110 */ 252, 49, 48, 47, 176, 58, 322, 63, 61, 64, + /* 120 */ 62, 42, 249, 358, 357, 54, 53, 1026, 356, 52, + /* 130 */ 51, 50, 355, 87, 354, 353, 886, 364, 585, 586, /* 140 */ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, - /* 150 */ 597, 598, 153, 56, 231, 59, 60, 162, 74, 252, - /* 160 */ 49, 48, 47, 1111, 58, 322, 63, 61, 64, 62, - /* 170 */ 1112, 1063, 292, 206, 54, 53, 255, 93, 52, 51, - /* 180 */ 50, 59, 60, 834, 1165, 252, 49, 48, 47, 233, - /* 190 */ 58, 322, 63, 61, 64, 62, 42, 75, 358, 357, - /* 200 */ 54, 53, 27, 356, 52, 51, 50, 355, 250, 354, - /* 210 */ 353, 42, 316, 358, 357, 315, 314, 313, 356, 312, - /* 220 */ 311, 310, 355, 309, 354, 353, 886, 364, 352, 294, - /* 230 */ 4, 92, 1004, 992, 993, 994, 995, 996, 997, 998, - /* 240 */ 999, 1000, 1001, 1002, 1003, 1005, 1006, 22, 251, 836, - /* 250 */ 87, 260, 825, 256, 828, 254, 831, 330, 329, 947, - /* 260 */ 635, 52, 51, 50, 215, 188, 251, 836, 636, 36, - /* 270 */ 825, 216, 828, 1063, 831, 786, 787, 137, 136, 135, - /* 280 */ 217, 209, 228, 229, 327, 87, 323, 1063, 43, 210, - /* 290 */ 86, 274, 36, 36, 63, 61, 64, 62, 36, 87, - /* 300 */ 228, 229, 54, 53, 211, 234, 52, 51, 50, 750, - /* 310 */ 36, 240, 747, 36, 748, 1035, 749, 742, 1159, 826, - /* 320 */ 739, 829, 740, 43, 741, 362, 361, 146, 262, 1032, - /* 330 */ 259, 65, 337, 336, 241, 331, 36, 43, 1035, 1035, - /* 340 */ 332, 36, 257, 258, 1035, 273, 1158, 79, 320, 65, - /* 350 */ 244, 245, 333, 36, 224, 334, 1035, 1049, 12, 1035, - /* 360 */ 1184, 3, 39, 178, 95, 1157, 266, 837, 832, 105, - /* 370 */ 77, 101, 108, 243, 833, 270, 269, 1010, 338, 1008, - /* 380 */ 1009, 767, 1035, 339, 1011, 837, 832, 1035, 1012, 305, - /* 390 */ 1013, 1014, 833, 98, 803, 340, 197, 195, 193, 1035, - /* 400 */ 36, 226, 36, 192, 141, 140, 139, 138, 122, 116, - /* 410 */ 126, 242, 152, 150, 149, 1038, 246, 131, 134, 125, - /* 420 */ 1038, 80, 171, 261, 261, 124, 128, 751, 752, 94, - /* 430 */ 764, 937, 177, 1036, 84, 743, 744, 188, 275, 352, - /* 440 */ 282, 835, 344, 82, 85, 783, 1035, 793, 1034, 794, - /* 450 */ 359, 974, 802, 1023, 37, 7, 71, 724, 297, 726, - /* 460 */ 299, 157, 737, 66, 738, 24, 735, 771, 736, 725, - /* 470 */ 32, 823, 70, 37, 37, 67, 97, 859, 838, 324, - /* 480 */ 634, 14, 70, 13, 115, 67, 114, 16, 755, 15, - /* 490 */ 756, 78, 1037, 23, 23, 227, 23, 72, 18, 753, - /* 500 */ 17, 754, 133, 132, 300, 121, 207, 120, 208, 824, - /* 510 */ 212, 20, 205, 19, 213, 214, 219, 220, 221, 218, - /* 520 */ 202, 1176, 1065, 1122, 713, 1121, 238, 1118, 1117, 239, - /* 530 */ 321, 343, 1064, 44, 271, 154, 1104, 1072, 1083, 1103, - /* 540 */ 1080, 1081, 151, 277, 172, 1033, 1085, 156, 281, 235, - /* 550 */ 283, 161, 288, 285, 173, 165, 1031, 1061, 174, 164, - /* 560 */ 782, 175, 163, 166, 168, 951, 302, 303, 304, 307, - /* 570 */ 308, 200, 295, 291, 293, 76, 40, 319, 946, 945, - /* 580 */ 328, 1183, 112, 1182, 840, 1179, 73, 179, 335, 1175, - /* 590 */ 118, 1174, 46, 289, 1171, 287, 180, 971, 41, 38, - /* 600 */ 201, 934, 127, 932, 129, 130, 930, 284, 929, 263, - /* 610 */ 190, 191, 926, 925, 924, 923, 922, 921, 920, 194, - /* 620 */ 196, 917, 45, 915, 913, 911, 198, 908, 199, 904, - /* 630 */ 306, 123, 276, 83, 88, 345, 286, 1105, 346, 347, - /* 640 */ 348, 349, 350, 351, 360, 884, 225, 264, 247, 301, - /* 650 */ 265, 883, 267, 222, 223, 268, 882, 106, 950, 949, - /* 660 */ 865, 272, 864, 70, 296, 8, 278, 758, 89, 183, - /* 670 */ 928, 927, 972, 181, 186, 182, 184, 185, 187, 142, - /* 680 */ 143, 144, 28, 919, 918, 784, 158, 145, 973, 910, - /* 690 */ 909, 795, 159, 1, 31, 169, 167, 170, 789, 2, + /* 150 */ 597, 598, 153, 56, 231, 59, 60, 767, 1063, 252, + /* 160 */ 49, 48, 47, 171, 58, 322, 63, 61, 64, 62, + /* 170 */ 162, 43, 1024, 86, 54, 53, 234, 21, 52, 51, + /* 180 */ 50, 282, 206, 1063, 635, 59, 60, 203, 636, 252, + /* 190 */ 49, 48, 47, 1165, 58, 322, 63, 61, 64, 62, + /* 200 */ 162, 274, 827, 830, 54, 53, 786, 787, 52, 51, + /* 210 */ 50, 36, 42, 316, 358, 357, 315, 314, 313, 356, + /* 220 */ 312, 311, 310, 355, 309, 354, 353, 1004, 992, 993, + /* 230 */ 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, + /* 240 */ 1005, 1006, 294, 771, 92, 22, 63, 61, 64, 62, + /* 250 */ 826, 829, 318, 232, 54, 53, 204, 1035, 52, 51, + /* 260 */ 50, 27, 215, 36, 251, 836, 825, 828, 831, 216, + /* 270 */ 750, 747, 748, 749, 1111, 137, 136, 135, 217, 162, + /* 280 */ 266, 255, 327, 87, 251, 836, 825, 828, 831, 270, + /* 290 */ 269, 96, 228, 229, 261, 261, 323, 257, 258, 742, + /* 300 */ 739, 740, 741, 177, 1036, 240, 3, 39, 178, 1035, + /* 310 */ 260, 209, 228, 229, 105, 77, 101, 108, 250, 248, + /* 320 */ 834, 43, 1021, 1022, 33, 1025, 244, 245, 197, 195, + /* 330 */ 193, 52, 51, 50, 305, 192, 141, 140, 139, 138, + /* 340 */ 4, 65, 253, 273, 80, 79, 122, 116, 126, 152, + /* 350 */ 150, 149, 224, 93, 36, 131, 134, 125, 256, 36, + /* 360 */ 254, 65, 330, 329, 128, 54, 53, 714, 835, 52, + /* 370 */ 51, 50, 87, 36, 36, 36, 1023, 837, 832, 206, + /* 380 */ 36, 36, 751, 752, 833, 36, 36, 262, 36, 259, + /* 390 */ 1165, 337, 336, 342, 341, 803, 241, 837, 832, 764, + /* 400 */ 1035, 331, 206, 12, 833, 1035, 84, 85, 937, 95, + /* 410 */ 43, 743, 744, 1165, 188, 332, 333, 334, 324, 1035, + /* 420 */ 1035, 1035, 338, 339, 7, 124, 1035, 1035, 340, 94, + /* 430 */ 344, 1034, 1035, 275, 1035, 362, 361, 146, 98, 352, + /* 440 */ 359, 974, 783, 82, 70, 70, 793, 794, 71, 37, + /* 450 */ 724, 74, 297, 802, 726, 299, 737, 738, 157, 735, + /* 460 */ 736, 725, 66, 24, 32, 823, 37, 859, 37, 838, + /* 470 */ 67, 97, 634, 14, 115, 13, 114, 67, 78, 16, + /* 480 */ 18, 15, 17, 23, 121, 23, 120, 210, 23, 72, + /* 490 */ 75, 211, 755, 756, 753, 754, 1159, 824, 300, 20, + /* 500 */ 1158, 19, 133, 132, 1157, 226, 1037, 1049, 1065, 227, + /* 510 */ 207, 713, 208, 212, 205, 213, 214, 219, 220, 221, + /* 520 */ 218, 202, 1184, 840, 1176, 44, 1122, 1121, 321, 271, + /* 530 */ 238, 1118, 1117, 239, 343, 154, 1104, 1072, 1083, 1080, + /* 540 */ 1081, 1085, 156, 161, 1064, 277, 288, 1103, 1033, 173, + /* 550 */ 151, 281, 172, 1031, 174, 175, 951, 782, 306, 302, + /* 560 */ 303, 170, 164, 304, 307, 163, 308, 1061, 295, 291, + /* 570 */ 165, 200, 40, 319, 946, 945, 235, 328, 1183, 112, + /* 580 */ 283, 1182, 285, 1179, 76, 179, 335, 73, 1175, 118, + /* 590 */ 1174, 1171, 180, 971, 46, 41, 38, 201, 934, 127, + /* 600 */ 932, 129, 130, 293, 930, 929, 263, 190, 191, 926, + /* 610 */ 925, 924, 923, 922, 921, 920, 194, 196, 917, 915, + /* 620 */ 913, 911, 289, 198, 908, 199, 904, 287, 284, 276, + /* 630 */ 83, 88, 45, 286, 1105, 123, 345, 346, 347, 348, + /* 640 */ 349, 225, 350, 247, 301, 351, 360, 884, 264, 265, + /* 650 */ 883, 222, 267, 950, 949, 106, 223, 268, 882, 865, + /* 660 */ 864, 272, 70, 8, 928, 296, 927, 758, 183, 182, + /* 670 */ 972, 181, 142, 184, 185, 187, 186, 143, 919, 918, + /* 680 */ 973, 144, 145, 910, 909, 28, 278, 89, 31, 784, + /* 690 */ 2, 166, 167, 158, 168, 169, 795, 159, 1, 789, /* 700 */ 160, 90, 237, 791, 91, 290, 29, 9, 30, 10, - /* 710 */ 11, 25, 298, 26, 98, 100, 34, 649, 102, 103, + /* 710 */ 11, 25, 298, 26, 98, 100, 34, 103, 102, 649, /* 720 */ 684, 35, 104, 682, 681, 680, 678, 677, 676, 673, - /* 730 */ 639, 317, 107, 325, 841, 326, 109, 110, 5, 111, - /* 740 */ 839, 6, 68, 113, 69, 37, 117, 119, 716, 715, + /* 730 */ 639, 107, 109, 325, 110, 839, 317, 5, 6, 841, + /* 740 */ 326, 68, 111, 113, 69, 716, 117, 119, 37, 715, /* 750 */ 712, 665, 663, 655, 661, 657, 659, 653, 651, 686, - /* 760 */ 685, 683, 679, 675, 674, 189, 637, 602, 888, 887, - /* 770 */ 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, - /* 780 */ 887, 147, 148, + /* 760 */ 685, 683, 679, 675, 674, 189, 602, 637, 888, 887, + /* 770 */ 887, 887, 887, 887, 887, 887, 887, 147, 148, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 207, 1, 206, 266, 1, 266, 206, 5, 266, 9, - /* 10 */ 200, 201, 9, 13, 14, 200, 16, 17, 0, 277, - /* 20 */ 20, 21, 22, 23, 5, 25, 26, 27, 28, 29, - /* 30 */ 30, 238, 239, 240, 241, 35, 36, 35, 36, 39, - /* 40 */ 40, 41, 13, 14, 200, 16, 17, 248, 249, 20, - /* 50 */ 21, 22, 23, 209, 25, 26, 27, 28, 29, 30, - /* 60 */ 200, 5, 266, 7, 35, 36, 266, 266, 39, 40, - /* 70 */ 41, 13, 14, 277, 16, 17, 207, 277, 20, 21, - /* 80 */ 22, 23, 267, 25, 26, 27, 28, 29, 30, 200, - /* 90 */ 90, 200, 1, 35, 36, 86, 200, 39, 40, 41, - /* 100 */ 9, 35, 36, 200, 86, 39, 40, 41, 13, 14, - /* 110 */ 241, 16, 17, 206, 85, 20, 21, 22, 23, 1, - /* 120 */ 25, 26, 27, 28, 29, 30, 205, 9, 268, 269, - /* 130 */ 35, 36, 211, 242, 39, 40, 41, 246, 47, 48, - /* 140 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - /* 150 */ 59, 60, 61, 14, 63, 16, 17, 200, 101, 20, - /* 160 */ 21, 22, 23, 274, 25, 26, 27, 28, 29, 30, - /* 170 */ 274, 245, 276, 266, 35, 36, 70, 274, 39, 40, - /* 180 */ 41, 16, 17, 127, 277, 20, 21, 22, 23, 263, - /* 190 */ 25, 26, 27, 28, 29, 30, 102, 140, 104, 105, - /* 200 */ 35, 36, 84, 109, 39, 40, 41, 113, 62, 115, - /* 210 */ 116, 102, 103, 104, 105, 106, 107, 108, 109, 110, - /* 220 */ 111, 112, 113, 114, 115, 116, 198, 199, 94, 272, - /* 230 */ 84, 274, 222, 223, 224, 225, 226, 227, 228, 229, - /* 240 */ 230, 231, 232, 233, 234, 235, 236, 46, 1, 2, - /* 250 */ 84, 70, 5, 147, 7, 149, 9, 151, 152, 205, - /* 260 */ 1, 39, 40, 41, 63, 211, 1, 2, 9, 200, - /* 270 */ 5, 70, 7, 245, 9, 128, 129, 76, 77, 78, - /* 280 */ 79, 266, 35, 36, 83, 84, 39, 245, 122, 266, - /* 290 */ 124, 263, 200, 200, 27, 28, 29, 30, 200, 84, - /* 300 */ 35, 36, 35, 36, 266, 263, 39, 40, 41, 2, - /* 310 */ 200, 242, 5, 200, 7, 246, 9, 2, 266, 5, - /* 320 */ 5, 7, 7, 122, 9, 67, 68, 69, 147, 200, - /* 330 */ 149, 84, 151, 152, 242, 242, 200, 122, 246, 246, - /* 340 */ 242, 200, 35, 36, 246, 144, 266, 146, 89, 84, - /* 350 */ 35, 36, 242, 200, 153, 242, 246, 249, 84, 246, - /* 360 */ 249, 64, 65, 66, 90, 266, 145, 120, 121, 72, - /* 370 */ 73, 74, 75, 244, 127, 154, 155, 222, 242, 224, - /* 380 */ 225, 39, 246, 242, 229, 120, 121, 246, 233, 92, - /* 390 */ 235, 236, 127, 119, 78, 242, 64, 65, 66, 246, - /* 400 */ 200, 266, 200, 71, 72, 73, 74, 75, 64, 65, - /* 410 */ 66, 243, 64, 65, 66, 247, 243, 73, 74, 75, - /* 420 */ 247, 207, 253, 200, 200, 80, 82, 120, 121, 250, - /* 430 */ 101, 205, 209, 209, 85, 120, 121, 211, 85, 94, - /* 440 */ 271, 127, 242, 264, 85, 85, 246, 85, 246, 85, - /* 450 */ 220, 221, 136, 239, 101, 126, 101, 85, 85, 85, - /* 460 */ 85, 101, 5, 101, 7, 101, 5, 125, 7, 85, - /* 470 */ 84, 1, 123, 101, 101, 101, 101, 85, 85, 15, - /* 480 */ 85, 148, 123, 150, 148, 101, 150, 148, 5, 150, - /* 490 */ 7, 84, 247, 101, 101, 266, 101, 142, 148, 5, - /* 500 */ 150, 7, 80, 81, 118, 148, 266, 150, 266, 39, - /* 510 */ 266, 148, 266, 150, 266, 266, 266, 266, 266, 266, - /* 520 */ 266, 249, 245, 237, 117, 237, 237, 237, 237, 237, - /* 530 */ 200, 237, 245, 265, 200, 200, 275, 200, 200, 275, - /* 540 */ 200, 200, 62, 245, 251, 245, 200, 200, 270, 270, - /* 550 */ 270, 200, 200, 270, 200, 259, 200, 262, 200, 260, - /* 560 */ 127, 200, 261, 258, 256, 200, 200, 200, 200, 200, - /* 570 */ 200, 200, 134, 132, 137, 139, 200, 200, 200, 200, - /* 580 */ 200, 200, 200, 200, 120, 200, 141, 200, 200, 200, - /* 590 */ 200, 200, 138, 131, 200, 130, 200, 200, 200, 200, - /* 600 */ 200, 200, 200, 200, 200, 200, 200, 133, 200, 200, - /* 610 */ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - /* 620 */ 200, 200, 143, 200, 200, 200, 200, 200, 200, 200, - /* 630 */ 93, 100, 202, 202, 202, 99, 202, 202, 53, 96, - /* 640 */ 98, 57, 97, 95, 86, 5, 202, 156, 202, 202, - /* 650 */ 5, 5, 156, 202, 202, 5, 5, 207, 210, 210, - /* 660 */ 104, 145, 103, 123, 118, 84, 101, 85, 101, 213, - /* 670 */ 202, 202, 219, 218, 215, 217, 216, 214, 212, 203, - /* 680 */ 203, 203, 84, 202, 202, 85, 84, 203, 221, 202, - /* 690 */ 202, 85, 84, 208, 252, 255, 257, 254, 85, 204, - /* 700 */ 101, 84, 1, 85, 84, 84, 101, 135, 101, 135, - /* 710 */ 84, 84, 118, 84, 119, 80, 91, 5, 90, 72, - /* 720 */ 9, 91, 90, 5, 5, 5, 5, 5, 5, 5, - /* 730 */ 87, 15, 80, 26, 120, 61, 88, 88, 84, 150, - /* 740 */ 85, 84, 16, 150, 16, 101, 150, 150, 5, 5, - /* 750 */ 85, 5, 5, 5, 5, 5, 5, 5, 5, 5, - /* 760 */ 5, 5, 5, 5, 5, 101, 87, 62, 0, 278, - /* 770 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 780 */ 278, 21, 21, 278, 278, 278, 278, 278, 278, 278, - /* 790 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 800 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 810 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 820 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 830 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 840 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 850 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 860 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 870 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 880 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 890 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 900 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 910 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 920 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 930 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 940 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 950 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 960 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 970 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 0 */ 194, 1, 194, 194, 195, 5, 3, 7, 8, 1, + /* 10 */ 10, 11, 194, 5, 14, 15, 16, 17, 194, 19, + /* 20 */ 20, 21, 22, 23, 24, 242, 243, 237, 260, 29, + /* 30 */ 30, 241, 1, 33, 34, 35, 5, 7, 8, 271, + /* 40 */ 10, 11, 199, 239, 14, 15, 16, 17, 205, 19, + /* 50 */ 20, 21, 22, 23, 24, 216, 238, 218, 219, 29, + /* 60 */ 30, 257, 223, 33, 34, 35, 227, 261, 229, 230, + /* 70 */ 262, 263, 199, 7, 8, 237, 10, 11, 205, 241, + /* 80 */ 14, 15, 16, 17, 84, 19, 20, 21, 22, 23, + /* 90 */ 24, 83, 268, 201, 270, 29, 30, 88, 1, 33, + /* 100 */ 34, 35, 5, 7, 8, 194, 10, 11, 80, 79, + /* 110 */ 14, 15, 16, 17, 203, 19, 20, 21, 22, 23, + /* 120 */ 24, 96, 200, 98, 99, 29, 30, 235, 103, 33, + /* 130 */ 34, 35, 107, 78, 109, 110, 192, 193, 41, 42, + /* 140 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + /* 150 */ 53, 54, 55, 8, 57, 10, 11, 33, 239, 14, + /* 160 */ 15, 16, 17, 247, 19, 20, 21, 22, 23, 24, + /* 170 */ 194, 116, 0, 118, 29, 30, 257, 260, 33, 34, + /* 180 */ 35, 265, 260, 239, 1, 10, 11, 260, 5, 14, + /* 190 */ 15, 16, 17, 271, 19, 20, 21, 22, 23, 24, + /* 200 */ 194, 257, 3, 4, 29, 30, 122, 123, 33, 34, + /* 210 */ 35, 194, 96, 97, 98, 99, 100, 101, 102, 103, + /* 220 */ 104, 105, 106, 107, 108, 109, 110, 216, 217, 218, + /* 230 */ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + /* 240 */ 229, 230, 266, 119, 268, 40, 21, 22, 23, 24, + /* 250 */ 3, 4, 80, 236, 29, 30, 260, 240, 33, 34, + /* 260 */ 35, 78, 57, 194, 1, 2, 3, 4, 5, 64, + /* 270 */ 2, 3, 4, 5, 268, 70, 71, 72, 73, 194, + /* 280 */ 139, 64, 77, 78, 1, 2, 3, 4, 5, 148, + /* 290 */ 149, 201, 29, 30, 194, 194, 33, 29, 30, 2, + /* 300 */ 3, 4, 5, 203, 203, 236, 58, 59, 60, 240, + /* 310 */ 64, 260, 29, 30, 66, 67, 68, 69, 56, 200, + /* 320 */ 121, 116, 232, 233, 234, 235, 29, 30, 58, 59, + /* 330 */ 60, 33, 34, 35, 86, 65, 66, 67, 68, 69, + /* 340 */ 78, 78, 200, 138, 201, 140, 58, 59, 60, 58, + /* 350 */ 59, 60, 147, 268, 194, 67, 68, 69, 141, 194, + /* 360 */ 143, 78, 145, 146, 76, 29, 30, 3, 121, 33, + /* 370 */ 34, 35, 78, 194, 194, 194, 233, 114, 115, 260, + /* 380 */ 194, 194, 114, 115, 121, 194, 194, 141, 194, 143, + /* 390 */ 271, 145, 146, 29, 30, 72, 236, 114, 115, 95, + /* 400 */ 240, 236, 260, 78, 121, 240, 79, 79, 199, 84, + /* 410 */ 116, 114, 115, 271, 205, 236, 236, 236, 9, 240, + /* 420 */ 240, 240, 236, 236, 120, 74, 240, 240, 236, 244, + /* 430 */ 236, 240, 240, 79, 240, 61, 62, 63, 113, 88, + /* 440 */ 214, 215, 79, 258, 117, 117, 79, 79, 95, 95, + /* 450 */ 79, 95, 79, 130, 79, 79, 3, 4, 95, 3, + /* 460 */ 4, 79, 95, 95, 78, 1, 95, 79, 95, 79, + /* 470 */ 95, 95, 79, 142, 142, 144, 144, 95, 78, 142, + /* 480 */ 142, 144, 144, 95, 142, 95, 144, 260, 95, 136, + /* 490 */ 134, 260, 3, 4, 3, 4, 260, 33, 112, 142, + /* 500 */ 260, 144, 74, 75, 260, 260, 241, 243, 239, 260, + /* 510 */ 260, 111, 260, 260, 260, 260, 260, 260, 260, 260, + /* 520 */ 260, 260, 243, 114, 243, 259, 231, 231, 194, 194, + /* 530 */ 231, 231, 231, 231, 231, 194, 269, 194, 194, 194, + /* 540 */ 194, 194, 194, 194, 239, 239, 194, 269, 239, 194, + /* 550 */ 56, 264, 245, 194, 194, 194, 194, 121, 87, 194, + /* 560 */ 194, 248, 254, 194, 194, 255, 194, 256, 128, 126, + /* 570 */ 253, 194, 194, 194, 194, 194, 264, 194, 194, 194, + /* 580 */ 264, 194, 264, 194, 133, 194, 194, 135, 194, 194, + /* 590 */ 194, 194, 194, 194, 132, 194, 194, 194, 194, 194, + /* 600 */ 194, 194, 194, 131, 194, 194, 194, 194, 194, 194, + /* 610 */ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + /* 620 */ 194, 194, 125, 194, 194, 194, 194, 124, 127, 196, + /* 630 */ 196, 196, 137, 196, 196, 94, 93, 47, 90, 92, + /* 640 */ 51, 196, 91, 196, 196, 89, 80, 3, 150, 3, + /* 650 */ 3, 196, 150, 204, 204, 201, 196, 3, 3, 98, + /* 660 */ 97, 139, 117, 78, 196, 112, 196, 79, 207, 211, + /* 670 */ 213, 212, 197, 210, 208, 206, 209, 197, 196, 196, + /* 680 */ 215, 197, 197, 196, 196, 78, 95, 95, 246, 79, + /* 690 */ 198, 252, 251, 78, 250, 249, 79, 78, 202, 79, + /* 700 */ 95, 78, 1, 79, 78, 78, 95, 129, 95, 129, + /* 710 */ 78, 78, 112, 78, 113, 74, 85, 66, 84, 3, + /* 720 */ 5, 85, 84, 3, 3, 3, 3, 3, 3, 3, + /* 730 */ 81, 74, 82, 20, 82, 79, 9, 78, 78, 114, + /* 740 */ 55, 10, 144, 144, 10, 3, 144, 144, 95, 3, + /* 750 */ 79, 3, 3, 3, 3, 3, 3, 3, 3, 3, + /* 760 */ 3, 3, 3, 3, 3, 95, 56, 81, 0, 272, + /* 770 */ 272, 272, 272, 272, 272, 272, 272, 15, 15, 272, + /* 780 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 790 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 800 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 810 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 820 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 830 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 840 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 850 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 860 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 870 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 880 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 890 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 900 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 910 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 920 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 930 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 940 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 950 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + /* 960 */ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, }; #define YY_SHIFT_COUNT (364) #define YY_SHIFT_MIN (0) #define YY_SHIFT_MAX (768) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 201, 109, 94, 9, 247, 265, 265, 118, 3, 3, - /* 10 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 20 */ 3, 0, 91, 265, 307, 315, 315, 215, 215, 3, - /* 30 */ 3, 147, 3, 18, 3, 3, 3, 3, 345, 9, - /* 40 */ 134, 134, 19, 783, 265, 265, 265, 265, 265, 265, - /* 50 */ 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, - /* 60 */ 265, 265, 265, 265, 265, 265, 307, 315, 307, 307, - /* 70 */ 166, 2, 2, 2, 2, 2, 2, 259, 2, 3, - /* 80 */ 3, 3, 342, 3, 3, 3, 215, 215, 3, 3, - /* 90 */ 3, 3, 316, 316, 329, 215, 3, 3, 3, 3, - /* 100 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 110 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 120 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 130 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 140 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 150 */ 3, 3, 3, 3, 480, 480, 480, 433, 433, 433, - /* 160 */ 433, 480, 480, 436, 445, 438, 454, 437, 441, 462, - /* 170 */ 465, 474, 479, 480, 480, 480, 537, 537, 9, 480, - /* 180 */ 480, 531, 536, 585, 543, 542, 584, 545, 548, 19, - /* 190 */ 480, 480, 558, 558, 480, 558, 480, 558, 480, 480, - /* 200 */ 783, 783, 29, 58, 58, 95, 58, 139, 165, 267, - /* 210 */ 267, 267, 267, 267, 267, 297, 332, 344, 66, 66, - /* 220 */ 66, 66, 106, 181, 221, 274, 222, 222, 56, 314, - /* 230 */ 258, 348, 353, 349, 359, 360, 362, 364, 355, 57, - /* 240 */ 372, 373, 374, 375, 457, 461, 384, 386, 392, 393, - /* 250 */ 470, 146, 464, 395, 333, 336, 339, 483, 494, 350, - /* 260 */ 357, 407, 363, 422, 640, 491, 645, 646, 496, 650, - /* 270 */ 651, 556, 559, 516, 540, 546, 581, 582, 598, 565, - /* 280 */ 567, 600, 602, 606, 608, 613, 599, 617, 618, 620, - /* 290 */ 701, 621, 605, 572, 607, 574, 626, 546, 627, 594, - /* 300 */ 629, 595, 635, 625, 628, 647, 712, 630, 632, 711, - /* 310 */ 718, 719, 720, 721, 722, 723, 724, 643, 716, 652, - /* 320 */ 648, 649, 654, 655, 614, 657, 707, 674, 726, 589, - /* 330 */ 593, 644, 644, 644, 644, 728, 596, 597, 644, 644, - /* 340 */ 644, 743, 744, 665, 644, 746, 747, 748, 749, 750, - /* 350 */ 751, 752, 753, 754, 755, 756, 757, 758, 759, 664, - /* 360 */ 679, 760, 761, 705, 768, + /* 0 */ 205, 116, 25, 28, 263, 283, 283, 183, 31, 31, + /* 10 */ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + /* 20 */ 31, 0, 97, 283, 268, 297, 297, 294, 294, 31, + /* 30 */ 31, 84, 31, 172, 31, 31, 31, 31, 351, 28, + /* 40 */ 9, 9, 3, 779, 283, 283, 283, 283, 283, 283, + /* 50 */ 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + /* 60 */ 283, 283, 283, 283, 283, 283, 268, 297, 268, 268, + /* 70 */ 55, 364, 364, 364, 364, 364, 364, 8, 364, 31, + /* 80 */ 31, 31, 124, 31, 31, 31, 294, 294, 31, 31, + /* 90 */ 31, 31, 323, 323, 304, 294, 31, 31, 31, 31, + /* 100 */ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + /* 110 */ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + /* 120 */ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + /* 130 */ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + /* 140 */ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + /* 150 */ 31, 31, 31, 31, 494, 494, 494, 436, 436, 436, + /* 160 */ 436, 494, 494, 451, 452, 440, 462, 472, 443, 497, + /* 170 */ 503, 501, 495, 494, 494, 494, 471, 471, 28, 494, + /* 180 */ 494, 541, 543, 590, 548, 547, 589, 551, 556, 3, + /* 190 */ 494, 494, 566, 566, 494, 566, 494, 566, 494, 494, + /* 200 */ 779, 779, 30, 66, 66, 96, 66, 145, 175, 225, + /* 210 */ 225, 225, 225, 225, 225, 248, 270, 288, 336, 336, + /* 220 */ 336, 336, 217, 246, 141, 325, 298, 298, 199, 247, + /* 230 */ 374, 291, 354, 327, 328, 363, 367, 368, 353, 356, + /* 240 */ 371, 373, 375, 376, 453, 456, 382, 386, 388, 390, + /* 250 */ 464, 262, 409, 393, 331, 332, 337, 489, 491, 338, + /* 260 */ 342, 400, 357, 428, 644, 498, 646, 647, 502, 654, + /* 270 */ 655, 561, 563, 522, 545, 553, 585, 588, 607, 591, + /* 280 */ 592, 610, 615, 617, 619, 620, 605, 623, 624, 626, + /* 290 */ 701, 627, 611, 578, 613, 580, 632, 553, 633, 600, + /* 300 */ 635, 601, 641, 631, 634, 651, 716, 636, 638, 715, + /* 310 */ 720, 721, 722, 723, 724, 725, 726, 649, 727, 657, + /* 320 */ 650, 652, 659, 656, 625, 660, 713, 685, 731, 598, + /* 330 */ 599, 653, 653, 653, 653, 734, 602, 603, 653, 653, + /* 340 */ 653, 742, 746, 671, 653, 748, 749, 750, 751, 752, + /* 350 */ 753, 754, 755, 756, 757, 758, 759, 760, 761, 670, + /* 360 */ 686, 762, 763, 710, 768, }; #define YY_REDUCE_COUNT (201) -#define YY_REDUCE_MIN (-263) -#define YY_REDUCE_MAX (495) +#define YY_REDUCE_MIN (-232) +#define YY_REDUCE_MAX (496) static const short yy_reduce_ofst[] = { - /* 0 */ 28, 10, 155, -207, -204, -200, -93, -140, -109, -104, - /* 10 */ -43, 69, 92, 93, 98, 110, 113, 136, 141, 153, - /* 20 */ 200, -185, -190, -258, -201, 168, 173, -74, 42, -111, - /* 30 */ -97, 169, 129, -131, -156, 223, 224, 202, -79, 214, - /* 40 */ 54, 226, 230, 179, -263, -261, -199, 15, 23, 38, - /* 50 */ 52, 80, 99, 135, 229, 240, 242, 244, 246, 248, - /* 60 */ 249, 250, 251, 252, 253, 254, 108, 245, 111, 272, - /* 70 */ 277, 286, 288, 289, 290, 291, 292, 330, 294, 334, - /* 80 */ 335, 337, 268, 338, 340, 341, 287, 298, 346, 347, - /* 90 */ 351, 352, 261, 264, 293, 300, 354, 356, 358, 361, - /* 100 */ 365, 366, 367, 368, 369, 370, 371, 376, 377, 378, - /* 110 */ 379, 380, 381, 382, 383, 385, 387, 388, 389, 390, - /* 120 */ 391, 394, 396, 397, 398, 399, 400, 401, 402, 403, - /* 130 */ 404, 405, 406, 408, 409, 410, 411, 412, 413, 414, - /* 140 */ 415, 416, 417, 418, 419, 420, 421, 423, 424, 425, - /* 150 */ 426, 427, 428, 429, 430, 431, 432, 278, 279, 280, - /* 160 */ 283, 434, 435, 295, 301, 299, 296, 305, 439, 308, - /* 170 */ 440, 443, 442, 444, 446, 447, 448, 449, 450, 451, - /* 180 */ 452, 453, 455, 458, 456, 460, 463, 459, 466, 467, - /* 190 */ 468, 469, 476, 477, 481, 478, 482, 484, 487, 488, - /* 200 */ 485, 495, + /* 0 */ -56, 11, -161, 90, -78, 119, 142, -192, 17, -176, + /* 10 */ -24, 69, 160, 165, 179, 180, 181, 186, 187, 192, + /* 20 */ 194, -194, -191, -232, -217, -210, -162, -196, -81, 6, + /* 30 */ 85, -84, -182, -108, -89, 100, 101, 191, -157, 143, + /* 40 */ -127, 209, 226, 185, -83, -73, -4, 51, 227, 231, + /* 50 */ 236, 240, 244, 245, 249, 250, 252, 253, 254, 255, + /* 60 */ 256, 257, 258, 259, 260, 261, 264, 265, 279, 281, + /* 70 */ 269, 295, 296, 299, 300, 301, 302, 334, 303, 335, + /* 80 */ 341, 343, 266, 344, 345, 346, 305, 306, 347, 348, + /* 90 */ 349, 352, 267, 278, 307, 309, 355, 359, 360, 361, + /* 100 */ 362, 365, 366, 369, 370, 372, 377, 378, 379, 380, + /* 110 */ 381, 383, 384, 385, 387, 389, 391, 392, 394, 395, + /* 120 */ 396, 397, 398, 399, 401, 402, 403, 404, 405, 406, + /* 130 */ 407, 408, 410, 411, 412, 413, 414, 415, 416, 417, + /* 140 */ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, + /* 150 */ 429, 430, 431, 432, 433, 434, 435, 287, 312, 316, + /* 160 */ 318, 437, 438, 311, 310, 308, 317, 439, 441, 444, + /* 170 */ 446, 313, 442, 445, 447, 448, 449, 450, 454, 455, + /* 180 */ 460, 457, 459, 458, 461, 463, 466, 467, 469, 465, + /* 190 */ 468, 470, 475, 480, 482, 484, 483, 485, 487, 488, + /* 200 */ 496, 492, }; static const YYACTIONTYPE yy_default[] = { /* 0 */ 885, 948, 935, 944, 1167, 1167, 1167, 885, 885, 885, @@ -516,16 +514,10 @@ static const YYCODETYPE yyFallback[] = { 0, /* $ => nothing */ 0, /* ID => nothing */ 1, /* BOOL => ID */ - 1, /* TINYINT => ID */ - 1, /* SMALLINT => ID */ 1, /* INTEGER => ID */ - 1, /* BIGINT => ID */ 1, /* FLOAT => ID */ - 1, /* DOUBLE => ID */ 1, /* STRING => ID */ 1, /* TIMESTAMP => ID */ - 1, /* BINARY => ID */ - 1, /* NCHAR => ID */ 0, /* OR => nothing */ 0, /* AND => nothing */ 0, /* NOT => nothing */ @@ -799,281 +791,275 @@ static const char *const yyTokenName[] = { /* 0 */ "$", /* 1 */ "ID", /* 2 */ "BOOL", - /* 3 */ "TINYINT", - /* 4 */ "SMALLINT", - /* 5 */ "INTEGER", - /* 6 */ "BIGINT", - /* 7 */ "FLOAT", - /* 8 */ "DOUBLE", - /* 9 */ "STRING", - /* 10 */ "TIMESTAMP", - /* 11 */ "BINARY", - /* 12 */ "NCHAR", - /* 13 */ "OR", - /* 14 */ "AND", - /* 15 */ "NOT", - /* 16 */ "EQ", - /* 17 */ "NE", - /* 18 */ "ISNULL", - /* 19 */ "NOTNULL", - /* 20 */ "IS", - /* 21 */ "LIKE", - /* 22 */ "MATCH", - /* 23 */ "NMATCH", - /* 24 */ "GLOB", - /* 25 */ "BETWEEN", - /* 26 */ "IN", - /* 27 */ "GT", - /* 28 */ "GE", - /* 29 */ "LT", - /* 30 */ "LE", - /* 31 */ "BITAND", - /* 32 */ "BITOR", - /* 33 */ "LSHIFT", - /* 34 */ "RSHIFT", - /* 35 */ "PLUS", - /* 36 */ "MINUS", - /* 37 */ "DIVIDE", - /* 38 */ "TIMES", - /* 39 */ "STAR", - /* 40 */ "SLASH", - /* 41 */ "REM", - /* 42 */ "CONCAT", - /* 43 */ "UMINUS", - /* 44 */ "UPLUS", - /* 45 */ "BITNOT", - /* 46 */ "SHOW", - /* 47 */ "DATABASES", - /* 48 */ "TOPICS", - /* 49 */ "FUNCTIONS", - /* 50 */ "MNODES", - /* 51 */ "DNODES", - /* 52 */ "ACCOUNTS", - /* 53 */ "USERS", - /* 54 */ "MODULES", - /* 55 */ "QUERIES", - /* 56 */ "CONNECTIONS", - /* 57 */ "STREAMS", - /* 58 */ "VARIABLES", - /* 59 */ "SCORES", - /* 60 */ "GRANTS", - /* 61 */ "VNODES", - /* 62 */ "DOT", - /* 63 */ "CREATE", - /* 64 */ "TABLE", - /* 65 */ "STABLE", - /* 66 */ "DATABASE", - /* 67 */ "TABLES", - /* 68 */ "STABLES", - /* 69 */ "VGROUPS", - /* 70 */ "DROP", - /* 71 */ "TOPIC", - /* 72 */ "FUNCTION", - /* 73 */ "DNODE", - /* 74 */ "USER", - /* 75 */ "ACCOUNT", - /* 76 */ "USE", - /* 77 */ "DESCRIBE", - /* 78 */ "DESC", - /* 79 */ "ALTER", - /* 80 */ "PASS", - /* 81 */ "PRIVILEGE", - /* 82 */ "LOCAL", - /* 83 */ "COMPACT", - /* 84 */ "LP", - /* 85 */ "RP", - /* 86 */ "IF", - /* 87 */ "EXISTS", - /* 88 */ "PORT", - /* 89 */ "IPTOKEN", - /* 90 */ "AS", - /* 91 */ "OUTPUTTYPE", - /* 92 */ "AGGREGATE", - /* 93 */ "BUFSIZE", - /* 94 */ "PPS", - /* 95 */ "TSERIES", - /* 96 */ "DBS", - /* 97 */ "STORAGE", - /* 98 */ "QTIME", - /* 99 */ "CONNS", - /* 100 */ "STATE", - /* 101 */ "COMMA", - /* 102 */ "KEEP", - /* 103 */ "CACHE", - /* 104 */ "REPLICA", - /* 105 */ "QUORUM", - /* 106 */ "DAYS", - /* 107 */ "MINROWS", - /* 108 */ "MAXROWS", - /* 109 */ "BLOCKS", - /* 110 */ "CTIME", - /* 111 */ "WAL", - /* 112 */ "FSYNC", - /* 113 */ "COMP", - /* 114 */ "PRECISION", - /* 115 */ "UPDATE", - /* 116 */ "CACHELAST", - /* 117 */ "UNSIGNED", - /* 118 */ "TAGS", - /* 119 */ "USING", - /* 120 */ "NULL", - /* 121 */ "NOW", - /* 122 */ "SELECT", - /* 123 */ "UNION", - /* 124 */ "ALL", - /* 125 */ "DISTINCT", - /* 126 */ "FROM", - /* 127 */ "VARIABLE", - /* 128 */ "INTERVAL", - /* 129 */ "EVERY", - /* 130 */ "SESSION", - /* 131 */ "STATE_WINDOW", - /* 132 */ "FILL", - /* 133 */ "SLIDING", - /* 134 */ "ORDER", - /* 135 */ "BY", - /* 136 */ "ASC", - /* 137 */ "GROUP", - /* 138 */ "HAVING", - /* 139 */ "LIMIT", - /* 140 */ "OFFSET", - /* 141 */ "SLIMIT", - /* 142 */ "SOFFSET", - /* 143 */ "WHERE", - /* 144 */ "RESET", - /* 145 */ "QUERY", - /* 146 */ "SYNCDB", - /* 147 */ "ADD", - /* 148 */ "COLUMN", - /* 149 */ "MODIFY", - /* 150 */ "TAG", - /* 151 */ "CHANGE", - /* 152 */ "SET", - /* 153 */ "KILL", - /* 154 */ "CONNECTION", - /* 155 */ "STREAM", - /* 156 */ "COLON", - /* 157 */ "ABORT", - /* 158 */ "AFTER", - /* 159 */ "ATTACH", - /* 160 */ "BEFORE", - /* 161 */ "BEGIN", - /* 162 */ "CASCADE", - /* 163 */ "CLUSTER", - /* 164 */ "CONFLICT", - /* 165 */ "COPY", - /* 166 */ "DEFERRED", - /* 167 */ "DELIMITERS", - /* 168 */ "DETACH", - /* 169 */ "EACH", - /* 170 */ "END", - /* 171 */ "EXPLAIN", - /* 172 */ "FAIL", - /* 173 */ "FOR", - /* 174 */ "IGNORE", - /* 175 */ "IMMEDIATE", - /* 176 */ "INITIALLY", - /* 177 */ "INSTEAD", - /* 178 */ "KEY", - /* 179 */ "OF", - /* 180 */ "RAISE", - /* 181 */ "REPLACE", - /* 182 */ "RESTRICT", - /* 183 */ "ROW", - /* 184 */ "STATEMENT", - /* 185 */ "TRIGGER", - /* 186 */ "VIEW", - /* 187 */ "SEMI", - /* 188 */ "NONE", - /* 189 */ "PREV", - /* 190 */ "LINEAR", - /* 191 */ "IMPORT", - /* 192 */ "TBNAME", - /* 193 */ "JOIN", - /* 194 */ "INSERT", - /* 195 */ "INTO", - /* 196 */ "VALUES", - /* 197 */ "error", - /* 198 */ "program", - /* 199 */ "cmd", - /* 200 */ "ids", - /* 201 */ "dbPrefix", - /* 202 */ "cpxName", - /* 203 */ "ifexists", - /* 204 */ "alter_db_optr", - /* 205 */ "acct_optr", - /* 206 */ "exprlist", - /* 207 */ "ifnotexists", - /* 208 */ "db_optr", - /* 209 */ "typename", - /* 210 */ "bufsize", - /* 211 */ "pps", - /* 212 */ "tseries", - /* 213 */ "dbs", - /* 214 */ "streams", - /* 215 */ "storage", - /* 216 */ "qtime", - /* 217 */ "users", - /* 218 */ "conns", - /* 219 */ "state", - /* 220 */ "intitemlist", - /* 221 */ "intitem", - /* 222 */ "keep", - /* 223 */ "cache", - /* 224 */ "replica", - /* 225 */ "quorum", - /* 226 */ "days", - /* 227 */ "minrows", - /* 228 */ "maxrows", - /* 229 */ "blocks", - /* 230 */ "ctime", - /* 231 */ "wal", - /* 232 */ "fsync", - /* 233 */ "comp", - /* 234 */ "prec", - /* 235 */ "update", - /* 236 */ "cachelast", - /* 237 */ "signed", - /* 238 */ "create_table_args", - /* 239 */ "create_stable_args", - /* 240 */ "create_table_list", - /* 241 */ "create_from_stable", - /* 242 */ "columnlist", - /* 243 */ "tagitemlist1", - /* 244 */ "tagNamelist", - /* 245 */ "select", - /* 246 */ "column", - /* 247 */ "tagitem1", - /* 248 */ "tagitemlist", - /* 249 */ "tagitem", - /* 250 */ "selcollist", - /* 251 */ "from", - /* 252 */ "where_opt", - /* 253 */ "interval_option", - /* 254 */ "sliding_opt", - /* 255 */ "session_option", - /* 256 */ "windowstate_option", - /* 257 */ "fill_opt", - /* 258 */ "groupby_opt", - /* 259 */ "having_opt", - /* 260 */ "orderby_opt", - /* 261 */ "slimit_opt", - /* 262 */ "limit_opt", - /* 263 */ "union", - /* 264 */ "sclp", - /* 265 */ "distinct", - /* 266 */ "expr", - /* 267 */ "as", - /* 268 */ "tablelist", - /* 269 */ "sub", - /* 270 */ "tmvar", - /* 271 */ "intervalKey", - /* 272 */ "sortlist", - /* 273 */ "sortitem", - /* 274 */ "item", - /* 275 */ "sortorder", - /* 276 */ "grouplist", - /* 277 */ "expritem", + /* 3 */ "INTEGER", + /* 4 */ "FLOAT", + /* 5 */ "STRING", + /* 6 */ "TIMESTAMP", + /* 7 */ "OR", + /* 8 */ "AND", + /* 9 */ "NOT", + /* 10 */ "EQ", + /* 11 */ "NE", + /* 12 */ "ISNULL", + /* 13 */ "NOTNULL", + /* 14 */ "IS", + /* 15 */ "LIKE", + /* 16 */ "MATCH", + /* 17 */ "NMATCH", + /* 18 */ "GLOB", + /* 19 */ "BETWEEN", + /* 20 */ "IN", + /* 21 */ "GT", + /* 22 */ "GE", + /* 23 */ "LT", + /* 24 */ "LE", + /* 25 */ "BITAND", + /* 26 */ "BITOR", + /* 27 */ "LSHIFT", + /* 28 */ "RSHIFT", + /* 29 */ "PLUS", + /* 30 */ "MINUS", + /* 31 */ "DIVIDE", + /* 32 */ "TIMES", + /* 33 */ "STAR", + /* 34 */ "SLASH", + /* 35 */ "REM", + /* 36 */ "CONCAT", + /* 37 */ "UMINUS", + /* 38 */ "UPLUS", + /* 39 */ "BITNOT", + /* 40 */ "SHOW", + /* 41 */ "DATABASES", + /* 42 */ "TOPICS", + /* 43 */ "FUNCTIONS", + /* 44 */ "MNODES", + /* 45 */ "DNODES", + /* 46 */ "ACCOUNTS", + /* 47 */ "USERS", + /* 48 */ "MODULES", + /* 49 */ "QUERIES", + /* 50 */ "CONNECTIONS", + /* 51 */ "STREAMS", + /* 52 */ "VARIABLES", + /* 53 */ "SCORES", + /* 54 */ "GRANTS", + /* 55 */ "VNODES", + /* 56 */ "DOT", + /* 57 */ "CREATE", + /* 58 */ "TABLE", + /* 59 */ "STABLE", + /* 60 */ "DATABASE", + /* 61 */ "TABLES", + /* 62 */ "STABLES", + /* 63 */ "VGROUPS", + /* 64 */ "DROP", + /* 65 */ "TOPIC", + /* 66 */ "FUNCTION", + /* 67 */ "DNODE", + /* 68 */ "USER", + /* 69 */ "ACCOUNT", + /* 70 */ "USE", + /* 71 */ "DESCRIBE", + /* 72 */ "DESC", + /* 73 */ "ALTER", + /* 74 */ "PASS", + /* 75 */ "PRIVILEGE", + /* 76 */ "LOCAL", + /* 77 */ "COMPACT", + /* 78 */ "LP", + /* 79 */ "RP", + /* 80 */ "IF", + /* 81 */ "EXISTS", + /* 82 */ "PORT", + /* 83 */ "IPTOKEN", + /* 84 */ "AS", + /* 85 */ "OUTPUTTYPE", + /* 86 */ "AGGREGATE", + /* 87 */ "BUFSIZE", + /* 88 */ "PPS", + /* 89 */ "TSERIES", + /* 90 */ "DBS", + /* 91 */ "STORAGE", + /* 92 */ "QTIME", + /* 93 */ "CONNS", + /* 94 */ "STATE", + /* 95 */ "COMMA", + /* 96 */ "KEEP", + /* 97 */ "CACHE", + /* 98 */ "REPLICA", + /* 99 */ "QUORUM", + /* 100 */ "DAYS", + /* 101 */ "MINROWS", + /* 102 */ "MAXROWS", + /* 103 */ "BLOCKS", + /* 104 */ "CTIME", + /* 105 */ "WAL", + /* 106 */ "FSYNC", + /* 107 */ "COMP", + /* 108 */ "PRECISION", + /* 109 */ "UPDATE", + /* 110 */ "CACHELAST", + /* 111 */ "UNSIGNED", + /* 112 */ "TAGS", + /* 113 */ "USING", + /* 114 */ "NULL", + /* 115 */ "NOW", + /* 116 */ "SELECT", + /* 117 */ "UNION", + /* 118 */ "ALL", + /* 119 */ "DISTINCT", + /* 120 */ "FROM", + /* 121 */ "VARIABLE", + /* 122 */ "INTERVAL", + /* 123 */ "EVERY", + /* 124 */ "SESSION", + /* 125 */ "STATE_WINDOW", + /* 126 */ "FILL", + /* 127 */ "SLIDING", + /* 128 */ "ORDER", + /* 129 */ "BY", + /* 130 */ "ASC", + /* 131 */ "GROUP", + /* 132 */ "HAVING", + /* 133 */ "LIMIT", + /* 134 */ "OFFSET", + /* 135 */ "SLIMIT", + /* 136 */ "SOFFSET", + /* 137 */ "WHERE", + /* 138 */ "RESET", + /* 139 */ "QUERY", + /* 140 */ "SYNCDB", + /* 141 */ "ADD", + /* 142 */ "COLUMN", + /* 143 */ "MODIFY", + /* 144 */ "TAG", + /* 145 */ "CHANGE", + /* 146 */ "SET", + /* 147 */ "KILL", + /* 148 */ "CONNECTION", + /* 149 */ "STREAM", + /* 150 */ "COLON", + /* 151 */ "ABORT", + /* 152 */ "AFTER", + /* 153 */ "ATTACH", + /* 154 */ "BEFORE", + /* 155 */ "BEGIN", + /* 156 */ "CASCADE", + /* 157 */ "CLUSTER", + /* 158 */ "CONFLICT", + /* 159 */ "COPY", + /* 160 */ "DEFERRED", + /* 161 */ "DELIMITERS", + /* 162 */ "DETACH", + /* 163 */ "EACH", + /* 164 */ "END", + /* 165 */ "EXPLAIN", + /* 166 */ "FAIL", + /* 167 */ "FOR", + /* 168 */ "IGNORE", + /* 169 */ "IMMEDIATE", + /* 170 */ "INITIALLY", + /* 171 */ "INSTEAD", + /* 172 */ "KEY", + /* 173 */ "OF", + /* 174 */ "RAISE", + /* 175 */ "REPLACE", + /* 176 */ "RESTRICT", + /* 177 */ "ROW", + /* 178 */ "STATEMENT", + /* 179 */ "TRIGGER", + /* 180 */ "VIEW", + /* 181 */ "SEMI", + /* 182 */ "NONE", + /* 183 */ "PREV", + /* 184 */ "LINEAR", + /* 185 */ "IMPORT", + /* 186 */ "TBNAME", + /* 187 */ "JOIN", + /* 188 */ "INSERT", + /* 189 */ "INTO", + /* 190 */ "VALUES", + /* 191 */ "error", + /* 192 */ "program", + /* 193 */ "cmd", + /* 194 */ "ids", + /* 195 */ "dbPrefix", + /* 196 */ "cpxName", + /* 197 */ "ifexists", + /* 198 */ "alter_db_optr", + /* 199 */ "acct_optr", + /* 200 */ "exprlist", + /* 201 */ "ifnotexists", + /* 202 */ "db_optr", + /* 203 */ "typename", + /* 204 */ "bufsize", + /* 205 */ "pps", + /* 206 */ "tseries", + /* 207 */ "dbs", + /* 208 */ "streams", + /* 209 */ "storage", + /* 210 */ "qtime", + /* 211 */ "users", + /* 212 */ "conns", + /* 213 */ "state", + /* 214 */ "intitemlist", + /* 215 */ "intitem", + /* 216 */ "keep", + /* 217 */ "cache", + /* 218 */ "replica", + /* 219 */ "quorum", + /* 220 */ "days", + /* 221 */ "minrows", + /* 222 */ "maxrows", + /* 223 */ "blocks", + /* 224 */ "ctime", + /* 225 */ "wal", + /* 226 */ "fsync", + /* 227 */ "comp", + /* 228 */ "prec", + /* 229 */ "update", + /* 230 */ "cachelast", + /* 231 */ "signed", + /* 232 */ "create_table_args", + /* 233 */ "create_stable_args", + /* 234 */ "create_table_list", + /* 235 */ "create_from_stable", + /* 236 */ "columnlist", + /* 237 */ "tagitemlist1", + /* 238 */ "tagNamelist", + /* 239 */ "select", + /* 240 */ "column", + /* 241 */ "tagitem1", + /* 242 */ "tagitemlist", + /* 243 */ "tagitem", + /* 244 */ "selcollist", + /* 245 */ "from", + /* 246 */ "where_opt", + /* 247 */ "interval_option", + /* 248 */ "sliding_opt", + /* 249 */ "session_option", + /* 250 */ "windowstate_option", + /* 251 */ "fill_opt", + /* 252 */ "groupby_opt", + /* 253 */ "having_opt", + /* 254 */ "orderby_opt", + /* 255 */ "slimit_opt", + /* 256 */ "limit_opt", + /* 257 */ "union", + /* 258 */ "sclp", + /* 259 */ "distinct", + /* 260 */ "expr", + /* 261 */ "as", + /* 262 */ "tablelist", + /* 263 */ "sub", + /* 264 */ "tmvar", + /* 265 */ "intervalKey", + /* 266 */ "sortlist", + /* 267 */ "sortitem", + /* 268 */ "item", + /* 269 */ "sortorder", + /* 270 */ "grouplist", + /* 271 */ "expritem", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1502,61 +1488,61 @@ static void yy_destructor( ** inside the C code. */ /********* Begin destructor definitions ***************************************/ - case 206: /* exprlist */ - case 250: /* selcollist */ - case 264: /* sclp */ + case 200: /* exprlist */ + case 244: /* selcollist */ + case 258: /* sclp */ { -tSqlExprListDestroy((yypminor->yy421)); +tSqlExprListDestroy((yypminor->yy413)); } break; - case 220: /* intitemlist */ - case 222: /* keep */ - case 242: /* columnlist */ - case 243: /* tagitemlist1 */ - case 244: /* tagNamelist */ - case 248: /* tagitemlist */ - case 257: /* fill_opt */ - case 258: /* groupby_opt */ - case 260: /* orderby_opt */ - case 272: /* sortlist */ - case 276: /* grouplist */ -{ -taosArrayDestroy((yypminor->yy421)); + case 214: /* intitemlist */ + case 216: /* keep */ + case 236: /* columnlist */ + case 237: /* tagitemlist1 */ + case 238: /* tagNamelist */ + case 242: /* tagitemlist */ + case 251: /* fill_opt */ + case 252: /* groupby_opt */ + case 254: /* orderby_opt */ + case 266: /* sortlist */ + case 270: /* grouplist */ +{ +taosArrayDestroy((yypminor->yy413)); } break; - case 240: /* create_table_list */ + case 234: /* create_table_list */ { destroyCreateTableSql((yypminor->yy438)); } break; - case 245: /* select */ + case 239: /* select */ { -destroySqlNode((yypminor->yy56)); +destroySqlNode((yypminor->yy24)); } break; - case 251: /* from */ - case 268: /* tablelist */ - case 269: /* sub */ + case 245: /* from */ + case 262: /* tablelist */ + case 263: /* sub */ { -destroyRelationInfo((yypminor->yy8)); +destroyRelationInfo((yypminor->yy292)); } break; - case 252: /* where_opt */ - case 259: /* having_opt */ - case 266: /* expr */ - case 277: /* expritem */ + case 246: /* where_opt */ + case 253: /* having_opt */ + case 260: /* expr */ + case 271: /* expritem */ { -tSqlExprDestroy((yypminor->yy439)); +tSqlExprDestroy((yypminor->yy370)); } break; - case 263: /* union */ + case 257: /* union */ { -destroyAllSqlNode((yypminor->yy149)); +destroyAllSqlNode((yypminor->yy129)); } break; - case 273: /* sortitem */ + case 267: /* sortitem */ { -taosVariantDestroy(&(yypminor->yy69)); +taosVariantDestroy(&(yypminor->yy461)); } break; /********* End destructor definitions *****************************************/ @@ -1850,307 +1836,307 @@ 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[] = { - { 198, -1 }, /* (0) program ::= cmd */ - { 199, -2 }, /* (1) cmd ::= SHOW DATABASES */ - { 199, -2 }, /* (2) cmd ::= SHOW TOPICS */ - { 199, -2 }, /* (3) cmd ::= SHOW FUNCTIONS */ - { 199, -2 }, /* (4) cmd ::= SHOW MNODES */ - { 199, -2 }, /* (5) cmd ::= SHOW DNODES */ - { 199, -2 }, /* (6) cmd ::= SHOW ACCOUNTS */ - { 199, -2 }, /* (7) cmd ::= SHOW USERS */ - { 199, -2 }, /* (8) cmd ::= SHOW MODULES */ - { 199, -2 }, /* (9) cmd ::= SHOW QUERIES */ - { 199, -2 }, /* (10) cmd ::= SHOW CONNECTIONS */ - { 199, -2 }, /* (11) cmd ::= SHOW STREAMS */ - { 199, -2 }, /* (12) cmd ::= SHOW VARIABLES */ - { 199, -2 }, /* (13) cmd ::= SHOW SCORES */ - { 199, -2 }, /* (14) cmd ::= SHOW GRANTS */ - { 199, -2 }, /* (15) cmd ::= SHOW VNODES */ - { 199, -3 }, /* (16) cmd ::= SHOW VNODES ids */ - { 201, 0 }, /* (17) dbPrefix ::= */ - { 201, -2 }, /* (18) dbPrefix ::= ids DOT */ - { 202, 0 }, /* (19) cpxName ::= */ - { 202, -2 }, /* (20) cpxName ::= DOT ids */ - { 199, -5 }, /* (21) cmd ::= SHOW CREATE TABLE ids cpxName */ - { 199, -5 }, /* (22) cmd ::= SHOW CREATE STABLE ids cpxName */ - { 199, -4 }, /* (23) cmd ::= SHOW CREATE DATABASE ids */ - { 199, -3 }, /* (24) cmd ::= SHOW dbPrefix TABLES */ - { 199, -5 }, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */ - { 199, -3 }, /* (26) cmd ::= SHOW dbPrefix STABLES */ - { 199, -5 }, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */ - { 199, -3 }, /* (28) cmd ::= SHOW dbPrefix VGROUPS */ - { 199, -4 }, /* (29) cmd ::= SHOW dbPrefix VGROUPS ids */ - { 199, -5 }, /* (30) cmd ::= DROP TABLE ifexists ids cpxName */ - { 199, -5 }, /* (31) cmd ::= DROP STABLE ifexists ids cpxName */ - { 199, -4 }, /* (32) cmd ::= DROP DATABASE ifexists ids */ - { 199, -4 }, /* (33) cmd ::= DROP TOPIC ifexists ids */ - { 199, -3 }, /* (34) cmd ::= DROP FUNCTION ids */ - { 199, -3 }, /* (35) cmd ::= DROP DNODE ids */ - { 199, -3 }, /* (36) cmd ::= DROP USER ids */ - { 199, -3 }, /* (37) cmd ::= DROP ACCOUNT ids */ - { 199, -2 }, /* (38) cmd ::= USE ids */ - { 199, -3 }, /* (39) cmd ::= DESCRIBE ids cpxName */ - { 199, -3 }, /* (40) cmd ::= DESC ids cpxName */ - { 199, -5 }, /* (41) cmd ::= ALTER USER ids PASS ids */ - { 199, -5 }, /* (42) cmd ::= ALTER USER ids PRIVILEGE ids */ - { 199, -4 }, /* (43) cmd ::= ALTER DNODE ids ids */ - { 199, -5 }, /* (44) cmd ::= ALTER DNODE ids ids ids */ - { 199, -3 }, /* (45) cmd ::= ALTER LOCAL ids */ - { 199, -4 }, /* (46) cmd ::= ALTER LOCAL ids ids */ - { 199, -4 }, /* (47) cmd ::= ALTER DATABASE ids alter_db_optr */ - { 199, -4 }, /* (48) cmd ::= ALTER ACCOUNT ids acct_optr */ - { 199, -6 }, /* (49) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ - { 199, -6 }, /* (50) cmd ::= COMPACT VNODES IN LP exprlist RP */ - { 200, -1 }, /* (51) ids ::= ID */ - { 200, -1 }, /* (52) ids ::= STRING */ - { 203, -2 }, /* (53) ifexists ::= IF EXISTS */ - { 203, 0 }, /* (54) ifexists ::= */ - { 207, -3 }, /* (55) ifnotexists ::= IF NOT EXISTS */ - { 207, 0 }, /* (56) ifnotexists ::= */ - { 199, -5 }, /* (57) cmd ::= CREATE DNODE ids PORT ids */ - { 199, -5 }, /* (58) cmd ::= CREATE DNODE IPTOKEN PORT ids */ - { 199, -6 }, /* (59) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ - { 199, -5 }, /* (60) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - { 199, -8 }, /* (61) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - { 199, -9 }, /* (62) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - { 199, -5 }, /* (63) cmd ::= CREATE USER ids PASS ids */ - { 210, 0 }, /* (64) bufsize ::= */ - { 210, -2 }, /* (65) bufsize ::= BUFSIZE INTEGER */ - { 211, 0 }, /* (66) pps ::= */ - { 211, -2 }, /* (67) pps ::= PPS INTEGER */ - { 212, 0 }, /* (68) tseries ::= */ - { 212, -2 }, /* (69) tseries ::= TSERIES INTEGER */ - { 213, 0 }, /* (70) dbs ::= */ - { 213, -2 }, /* (71) dbs ::= DBS INTEGER */ - { 214, 0 }, /* (72) streams ::= */ - { 214, -2 }, /* (73) streams ::= STREAMS INTEGER */ - { 215, 0 }, /* (74) storage ::= */ - { 215, -2 }, /* (75) storage ::= STORAGE INTEGER */ - { 216, 0 }, /* (76) qtime ::= */ - { 216, -2 }, /* (77) qtime ::= QTIME INTEGER */ - { 217, 0 }, /* (78) users ::= */ - { 217, -2 }, /* (79) users ::= USERS INTEGER */ - { 218, 0 }, /* (80) conns ::= */ - { 218, -2 }, /* (81) conns ::= CONNS INTEGER */ - { 219, 0 }, /* (82) state ::= */ - { 219, -2 }, /* (83) state ::= STATE ids */ - { 205, -9 }, /* (84) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ - { 220, -3 }, /* (85) intitemlist ::= intitemlist COMMA intitem */ - { 220, -1 }, /* (86) intitemlist ::= intitem */ - { 221, -1 }, /* (87) intitem ::= INTEGER */ - { 222, -2 }, /* (88) keep ::= KEEP intitemlist */ - { 223, -2 }, /* (89) cache ::= CACHE INTEGER */ - { 224, -2 }, /* (90) replica ::= REPLICA INTEGER */ - { 225, -2 }, /* (91) quorum ::= QUORUM INTEGER */ - { 226, -2 }, /* (92) days ::= DAYS INTEGER */ - { 227, -2 }, /* (93) minrows ::= MINROWS INTEGER */ - { 228, -2 }, /* (94) maxrows ::= MAXROWS INTEGER */ - { 229, -2 }, /* (95) blocks ::= BLOCKS INTEGER */ - { 230, -2 }, /* (96) ctime ::= CTIME INTEGER */ - { 231, -2 }, /* (97) wal ::= WAL INTEGER */ - { 232, -2 }, /* (98) fsync ::= FSYNC INTEGER */ - { 233, -2 }, /* (99) comp ::= COMP INTEGER */ - { 234, -2 }, /* (100) prec ::= PRECISION STRING */ - { 235, -2 }, /* (101) update ::= UPDATE INTEGER */ - { 236, -2 }, /* (102) cachelast ::= CACHELAST INTEGER */ - { 208, 0 }, /* (103) db_optr ::= */ - { 208, -2 }, /* (104) db_optr ::= db_optr cache */ - { 208, -2 }, /* (105) db_optr ::= db_optr replica */ - { 208, -2 }, /* (106) db_optr ::= db_optr quorum */ - { 208, -2 }, /* (107) db_optr ::= db_optr days */ - { 208, -2 }, /* (108) db_optr ::= db_optr minrows */ - { 208, -2 }, /* (109) db_optr ::= db_optr maxrows */ - { 208, -2 }, /* (110) db_optr ::= db_optr blocks */ - { 208, -2 }, /* (111) db_optr ::= db_optr ctime */ - { 208, -2 }, /* (112) db_optr ::= db_optr wal */ - { 208, -2 }, /* (113) db_optr ::= db_optr fsync */ - { 208, -2 }, /* (114) db_optr ::= db_optr comp */ - { 208, -2 }, /* (115) db_optr ::= db_optr prec */ - { 208, -2 }, /* (116) db_optr ::= db_optr keep */ - { 208, -2 }, /* (117) db_optr ::= db_optr update */ - { 208, -2 }, /* (118) db_optr ::= db_optr cachelast */ - { 204, 0 }, /* (119) alter_db_optr ::= */ - { 204, -2 }, /* (120) alter_db_optr ::= alter_db_optr replica */ - { 204, -2 }, /* (121) alter_db_optr ::= alter_db_optr quorum */ - { 204, -2 }, /* (122) alter_db_optr ::= alter_db_optr keep */ - { 204, -2 }, /* (123) alter_db_optr ::= alter_db_optr blocks */ - { 204, -2 }, /* (124) alter_db_optr ::= alter_db_optr comp */ - { 204, -2 }, /* (125) alter_db_optr ::= alter_db_optr update */ - { 204, -2 }, /* (126) alter_db_optr ::= alter_db_optr cachelast */ - { 209, -1 }, /* (127) typename ::= ids */ - { 209, -4 }, /* (128) typename ::= ids LP signed RP */ - { 209, -2 }, /* (129) typename ::= ids UNSIGNED */ - { 237, -1 }, /* (130) signed ::= INTEGER */ - { 237, -2 }, /* (131) signed ::= PLUS INTEGER */ - { 237, -2 }, /* (132) signed ::= MINUS INTEGER */ - { 199, -3 }, /* (133) cmd ::= CREATE TABLE create_table_args */ - { 199, -3 }, /* (134) cmd ::= CREATE TABLE create_stable_args */ - { 199, -3 }, /* (135) cmd ::= CREATE STABLE create_stable_args */ - { 199, -3 }, /* (136) cmd ::= CREATE TABLE create_table_list */ - { 240, -1 }, /* (137) create_table_list ::= create_from_stable */ - { 240, -2 }, /* (138) create_table_list ::= create_table_list create_from_stable */ - { 238, -6 }, /* (139) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ - { 239, -10 }, /* (140) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ - { 241, -10 }, /* (141) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist1 RP */ - { 241, -13 }, /* (142) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist1 RP */ - { 244, -3 }, /* (143) tagNamelist ::= tagNamelist COMMA ids */ - { 244, -1 }, /* (144) tagNamelist ::= ids */ - { 238, -5 }, /* (145) create_table_args ::= ifnotexists ids cpxName AS select */ - { 242, -3 }, /* (146) columnlist ::= columnlist COMMA column */ - { 242, -1 }, /* (147) columnlist ::= column */ - { 246, -2 }, /* (148) column ::= ids typename */ - { 243, -3 }, /* (149) tagitemlist1 ::= tagitemlist1 COMMA tagitem1 */ - { 243, -1 }, /* (150) tagitemlist1 ::= tagitem1 */ - { 247, -2 }, /* (151) tagitem1 ::= MINUS INTEGER */ - { 247, -2 }, /* (152) tagitem1 ::= MINUS FLOAT */ - { 247, -2 }, /* (153) tagitem1 ::= PLUS INTEGER */ - { 247, -2 }, /* (154) tagitem1 ::= PLUS FLOAT */ - { 247, -1 }, /* (155) tagitem1 ::= INTEGER */ - { 247, -1 }, /* (156) tagitem1 ::= FLOAT */ - { 247, -1 }, /* (157) tagitem1 ::= STRING */ - { 247, -1 }, /* (158) tagitem1 ::= BOOL */ - { 247, -1 }, /* (159) tagitem1 ::= NULL */ - { 247, -1 }, /* (160) tagitem1 ::= NOW */ - { 248, -3 }, /* (161) tagitemlist ::= tagitemlist COMMA tagitem */ - { 248, -1 }, /* (162) tagitemlist ::= tagitem */ - { 249, -1 }, /* (163) tagitem ::= INTEGER */ - { 249, -1 }, /* (164) tagitem ::= FLOAT */ - { 249, -1 }, /* (165) tagitem ::= STRING */ - { 249, -1 }, /* (166) tagitem ::= BOOL */ - { 249, -1 }, /* (167) tagitem ::= NULL */ - { 249, -1 }, /* (168) tagitem ::= NOW */ - { 249, -2 }, /* (169) tagitem ::= MINUS INTEGER */ - { 249, -2 }, /* (170) tagitem ::= MINUS FLOAT */ - { 249, -2 }, /* (171) tagitem ::= PLUS INTEGER */ - { 249, -2 }, /* (172) tagitem ::= PLUS FLOAT */ - { 245, -14 }, /* (173) select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ - { 245, -3 }, /* (174) select ::= LP select RP */ - { 263, -1 }, /* (175) union ::= select */ - { 263, -4 }, /* (176) union ::= union UNION ALL select */ - { 263, -3 }, /* (177) union ::= union UNION select */ - { 199, -1 }, /* (178) cmd ::= union */ - { 245, -2 }, /* (179) select ::= SELECT selcollist */ - { 264, -2 }, /* (180) sclp ::= selcollist COMMA */ - { 264, 0 }, /* (181) sclp ::= */ - { 250, -4 }, /* (182) selcollist ::= sclp distinct expr as */ - { 250, -2 }, /* (183) selcollist ::= sclp STAR */ - { 267, -2 }, /* (184) as ::= AS ids */ - { 267, -1 }, /* (185) as ::= ids */ - { 267, 0 }, /* (186) as ::= */ - { 265, -1 }, /* (187) distinct ::= DISTINCT */ - { 265, 0 }, /* (188) distinct ::= */ - { 251, -2 }, /* (189) from ::= FROM tablelist */ - { 251, -2 }, /* (190) from ::= FROM sub */ - { 269, -3 }, /* (191) sub ::= LP union RP */ - { 269, -4 }, /* (192) sub ::= LP union RP ids */ - { 269, -6 }, /* (193) sub ::= sub COMMA LP union RP ids */ - { 268, -2 }, /* (194) tablelist ::= ids cpxName */ - { 268, -3 }, /* (195) tablelist ::= ids cpxName ids */ - { 268, -4 }, /* (196) tablelist ::= tablelist COMMA ids cpxName */ - { 268, -5 }, /* (197) tablelist ::= tablelist COMMA ids cpxName ids */ - { 270, -1 }, /* (198) tmvar ::= VARIABLE */ - { 253, -4 }, /* (199) interval_option ::= intervalKey LP tmvar RP */ - { 253, -6 }, /* (200) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ - { 253, 0 }, /* (201) interval_option ::= */ - { 271, -1 }, /* (202) intervalKey ::= INTERVAL */ - { 271, -1 }, /* (203) intervalKey ::= EVERY */ - { 255, 0 }, /* (204) session_option ::= */ - { 255, -7 }, /* (205) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ - { 256, 0 }, /* (206) windowstate_option ::= */ - { 256, -4 }, /* (207) windowstate_option ::= STATE_WINDOW LP ids RP */ - { 257, 0 }, /* (208) fill_opt ::= */ - { 257, -6 }, /* (209) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - { 257, -4 }, /* (210) fill_opt ::= FILL LP ID RP */ - { 254, -4 }, /* (211) sliding_opt ::= SLIDING LP tmvar RP */ - { 254, 0 }, /* (212) sliding_opt ::= */ - { 260, 0 }, /* (213) orderby_opt ::= */ - { 260, -3 }, /* (214) orderby_opt ::= ORDER BY sortlist */ - { 272, -4 }, /* (215) sortlist ::= sortlist COMMA item sortorder */ - { 272, -2 }, /* (216) sortlist ::= item sortorder */ - { 274, -2 }, /* (217) item ::= ids cpxName */ - { 275, -1 }, /* (218) sortorder ::= ASC */ - { 275, -1 }, /* (219) sortorder ::= DESC */ - { 275, 0 }, /* (220) sortorder ::= */ - { 258, 0 }, /* (221) groupby_opt ::= */ - { 258, -3 }, /* (222) groupby_opt ::= GROUP BY grouplist */ - { 276, -3 }, /* (223) grouplist ::= grouplist COMMA item */ - { 276, -1 }, /* (224) grouplist ::= item */ - { 259, 0 }, /* (225) having_opt ::= */ - { 259, -2 }, /* (226) having_opt ::= HAVING expr */ - { 262, 0 }, /* (227) limit_opt ::= */ - { 262, -2 }, /* (228) limit_opt ::= LIMIT signed */ - { 262, -4 }, /* (229) limit_opt ::= LIMIT signed OFFSET signed */ - { 262, -4 }, /* (230) limit_opt ::= LIMIT signed COMMA signed */ - { 261, 0 }, /* (231) slimit_opt ::= */ - { 261, -2 }, /* (232) slimit_opt ::= SLIMIT signed */ - { 261, -4 }, /* (233) slimit_opt ::= SLIMIT signed SOFFSET signed */ - { 261, -4 }, /* (234) slimit_opt ::= SLIMIT signed COMMA signed */ - { 252, 0 }, /* (235) where_opt ::= */ - { 252, -2 }, /* (236) where_opt ::= WHERE expr */ - { 266, -3 }, /* (237) expr ::= LP expr RP */ - { 266, -1 }, /* (238) expr ::= ID */ - { 266, -3 }, /* (239) expr ::= ID DOT ID */ - { 266, -3 }, /* (240) expr ::= ID DOT STAR */ - { 266, -1 }, /* (241) expr ::= INTEGER */ - { 266, -2 }, /* (242) expr ::= MINUS INTEGER */ - { 266, -2 }, /* (243) expr ::= PLUS INTEGER */ - { 266, -1 }, /* (244) expr ::= FLOAT */ - { 266, -2 }, /* (245) expr ::= MINUS FLOAT */ - { 266, -2 }, /* (246) expr ::= PLUS FLOAT */ - { 266, -1 }, /* (247) expr ::= STRING */ - { 266, -1 }, /* (248) expr ::= NOW */ - { 266, -1 }, /* (249) expr ::= VARIABLE */ - { 266, -2 }, /* (250) expr ::= PLUS VARIABLE */ - { 266, -2 }, /* (251) expr ::= MINUS VARIABLE */ - { 266, -1 }, /* (252) expr ::= BOOL */ - { 266, -1 }, /* (253) expr ::= NULL */ - { 266, -4 }, /* (254) expr ::= ID LP exprlist RP */ - { 266, -4 }, /* (255) expr ::= ID LP STAR RP */ - { 266, -3 }, /* (256) expr ::= expr IS NULL */ - { 266, -4 }, /* (257) expr ::= expr IS NOT NULL */ - { 266, -3 }, /* (258) expr ::= expr LT expr */ - { 266, -3 }, /* (259) expr ::= expr GT expr */ - { 266, -3 }, /* (260) expr ::= expr LE expr */ - { 266, -3 }, /* (261) expr ::= expr GE expr */ - { 266, -3 }, /* (262) expr ::= expr NE expr */ - { 266, -3 }, /* (263) expr ::= expr EQ expr */ - { 266, -5 }, /* (264) expr ::= expr BETWEEN expr AND expr */ - { 266, -3 }, /* (265) expr ::= expr AND expr */ - { 266, -3 }, /* (266) expr ::= expr OR expr */ - { 266, -3 }, /* (267) expr ::= expr PLUS expr */ - { 266, -3 }, /* (268) expr ::= expr MINUS expr */ - { 266, -3 }, /* (269) expr ::= expr STAR expr */ - { 266, -3 }, /* (270) expr ::= expr SLASH expr */ - { 266, -3 }, /* (271) expr ::= expr REM expr */ - { 266, -3 }, /* (272) expr ::= expr LIKE expr */ - { 266, -3 }, /* (273) expr ::= expr MATCH expr */ - { 266, -3 }, /* (274) expr ::= expr NMATCH expr */ - { 266, -5 }, /* (275) expr ::= expr IN LP exprlist RP */ - { 206, -3 }, /* (276) exprlist ::= exprlist COMMA expritem */ - { 206, -1 }, /* (277) exprlist ::= expritem */ - { 277, -1 }, /* (278) expritem ::= expr */ - { 277, 0 }, /* (279) expritem ::= */ - { 199, -3 }, /* (280) cmd ::= RESET QUERY CACHE */ - { 199, -3 }, /* (281) cmd ::= SYNCDB ids REPLICA */ - { 199, -7 }, /* (282) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - { 199, -7 }, /* (283) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - { 199, -7 }, /* (284) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - { 199, -7 }, /* (285) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - { 199, -7 }, /* (286) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - { 199, -8 }, /* (287) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - { 199, -9 }, /* (288) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - { 199, -7 }, /* (289) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - { 199, -7 }, /* (290) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - { 199, -7 }, /* (291) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - { 199, -7 }, /* (292) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - { 199, -7 }, /* (293) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - { 199, -7 }, /* (294) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - { 199, -8 }, /* (295) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - { 199, -9 }, /* (296) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - { 199, -7 }, /* (297) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - { 199, -3 }, /* (298) cmd ::= KILL CONNECTION INTEGER */ - { 199, -5 }, /* (299) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - { 199, -5 }, /* (300) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + { 192, -1 }, /* (0) program ::= cmd */ + { 193, -2 }, /* (1) cmd ::= SHOW DATABASES */ + { 193, -2 }, /* (2) cmd ::= SHOW TOPICS */ + { 193, -2 }, /* (3) cmd ::= SHOW FUNCTIONS */ + { 193, -2 }, /* (4) cmd ::= SHOW MNODES */ + { 193, -2 }, /* (5) cmd ::= SHOW DNODES */ + { 193, -2 }, /* (6) cmd ::= SHOW ACCOUNTS */ + { 193, -2 }, /* (7) cmd ::= SHOW USERS */ + { 193, -2 }, /* (8) cmd ::= SHOW MODULES */ + { 193, -2 }, /* (9) cmd ::= SHOW QUERIES */ + { 193, -2 }, /* (10) cmd ::= SHOW CONNECTIONS */ + { 193, -2 }, /* (11) cmd ::= SHOW STREAMS */ + { 193, -2 }, /* (12) cmd ::= SHOW VARIABLES */ + { 193, -2 }, /* (13) cmd ::= SHOW SCORES */ + { 193, -2 }, /* (14) cmd ::= SHOW GRANTS */ + { 193, -2 }, /* (15) cmd ::= SHOW VNODES */ + { 193, -3 }, /* (16) cmd ::= SHOW VNODES ids */ + { 195, 0 }, /* (17) dbPrefix ::= */ + { 195, -2 }, /* (18) dbPrefix ::= ids DOT */ + { 196, 0 }, /* (19) cpxName ::= */ + { 196, -2 }, /* (20) cpxName ::= DOT ids */ + { 193, -5 }, /* (21) cmd ::= SHOW CREATE TABLE ids cpxName */ + { 193, -5 }, /* (22) cmd ::= SHOW CREATE STABLE ids cpxName */ + { 193, -4 }, /* (23) cmd ::= SHOW CREATE DATABASE ids */ + { 193, -3 }, /* (24) cmd ::= SHOW dbPrefix TABLES */ + { 193, -5 }, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */ + { 193, -3 }, /* (26) cmd ::= SHOW dbPrefix STABLES */ + { 193, -5 }, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */ + { 193, -3 }, /* (28) cmd ::= SHOW dbPrefix VGROUPS */ + { 193, -4 }, /* (29) cmd ::= SHOW dbPrefix VGROUPS ids */ + { 193, -5 }, /* (30) cmd ::= DROP TABLE ifexists ids cpxName */ + { 193, -5 }, /* (31) cmd ::= DROP STABLE ifexists ids cpxName */ + { 193, -4 }, /* (32) cmd ::= DROP DATABASE ifexists ids */ + { 193, -4 }, /* (33) cmd ::= DROP TOPIC ifexists ids */ + { 193, -3 }, /* (34) cmd ::= DROP FUNCTION ids */ + { 193, -3 }, /* (35) cmd ::= DROP DNODE ids */ + { 193, -3 }, /* (36) cmd ::= DROP USER ids */ + { 193, -3 }, /* (37) cmd ::= DROP ACCOUNT ids */ + { 193, -2 }, /* (38) cmd ::= USE ids */ + { 193, -3 }, /* (39) cmd ::= DESCRIBE ids cpxName */ + { 193, -3 }, /* (40) cmd ::= DESC ids cpxName */ + { 193, -5 }, /* (41) cmd ::= ALTER USER ids PASS ids */ + { 193, -5 }, /* (42) cmd ::= ALTER USER ids PRIVILEGE ids */ + { 193, -4 }, /* (43) cmd ::= ALTER DNODE ids ids */ + { 193, -5 }, /* (44) cmd ::= ALTER DNODE ids ids ids */ + { 193, -3 }, /* (45) cmd ::= ALTER LOCAL ids */ + { 193, -4 }, /* (46) cmd ::= ALTER LOCAL ids ids */ + { 193, -4 }, /* (47) cmd ::= ALTER DATABASE ids alter_db_optr */ + { 193, -4 }, /* (48) cmd ::= ALTER ACCOUNT ids acct_optr */ + { 193, -6 }, /* (49) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ + { 193, -6 }, /* (50) cmd ::= COMPACT VNODES IN LP exprlist RP */ + { 194, -1 }, /* (51) ids ::= ID */ + { 194, -1 }, /* (52) ids ::= STRING */ + { 197, -2 }, /* (53) ifexists ::= IF EXISTS */ + { 197, 0 }, /* (54) ifexists ::= */ + { 201, -3 }, /* (55) ifnotexists ::= IF NOT EXISTS */ + { 201, 0 }, /* (56) ifnotexists ::= */ + { 193, -5 }, /* (57) cmd ::= CREATE DNODE ids PORT ids */ + { 193, -5 }, /* (58) cmd ::= CREATE DNODE IPTOKEN PORT ids */ + { 193, -6 }, /* (59) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ + { 193, -5 }, /* (60) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + { 193, -8 }, /* (61) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + { 193, -9 }, /* (62) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + { 193, -5 }, /* (63) cmd ::= CREATE USER ids PASS ids */ + { 204, 0 }, /* (64) bufsize ::= */ + { 204, -2 }, /* (65) bufsize ::= BUFSIZE INTEGER */ + { 205, 0 }, /* (66) pps ::= */ + { 205, -2 }, /* (67) pps ::= PPS INTEGER */ + { 206, 0 }, /* (68) tseries ::= */ + { 206, -2 }, /* (69) tseries ::= TSERIES INTEGER */ + { 207, 0 }, /* (70) dbs ::= */ + { 207, -2 }, /* (71) dbs ::= DBS INTEGER */ + { 208, 0 }, /* (72) streams ::= */ + { 208, -2 }, /* (73) streams ::= STREAMS INTEGER */ + { 209, 0 }, /* (74) storage ::= */ + { 209, -2 }, /* (75) storage ::= STORAGE INTEGER */ + { 210, 0 }, /* (76) qtime ::= */ + { 210, -2 }, /* (77) qtime ::= QTIME INTEGER */ + { 211, 0 }, /* (78) users ::= */ + { 211, -2 }, /* (79) users ::= USERS INTEGER */ + { 212, 0 }, /* (80) conns ::= */ + { 212, -2 }, /* (81) conns ::= CONNS INTEGER */ + { 213, 0 }, /* (82) state ::= */ + { 213, -2 }, /* (83) state ::= STATE ids */ + { 199, -9 }, /* (84) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ + { 214, -3 }, /* (85) intitemlist ::= intitemlist COMMA intitem */ + { 214, -1 }, /* (86) intitemlist ::= intitem */ + { 215, -1 }, /* (87) intitem ::= INTEGER */ + { 216, -2 }, /* (88) keep ::= KEEP intitemlist */ + { 217, -2 }, /* (89) cache ::= CACHE INTEGER */ + { 218, -2 }, /* (90) replica ::= REPLICA INTEGER */ + { 219, -2 }, /* (91) quorum ::= QUORUM INTEGER */ + { 220, -2 }, /* (92) days ::= DAYS INTEGER */ + { 221, -2 }, /* (93) minrows ::= MINROWS INTEGER */ + { 222, -2 }, /* (94) maxrows ::= MAXROWS INTEGER */ + { 223, -2 }, /* (95) blocks ::= BLOCKS INTEGER */ + { 224, -2 }, /* (96) ctime ::= CTIME INTEGER */ + { 225, -2 }, /* (97) wal ::= WAL INTEGER */ + { 226, -2 }, /* (98) fsync ::= FSYNC INTEGER */ + { 227, -2 }, /* (99) comp ::= COMP INTEGER */ + { 228, -2 }, /* (100) prec ::= PRECISION STRING */ + { 229, -2 }, /* (101) update ::= UPDATE INTEGER */ + { 230, -2 }, /* (102) cachelast ::= CACHELAST INTEGER */ + { 202, 0 }, /* (103) db_optr ::= */ + { 202, -2 }, /* (104) db_optr ::= db_optr cache */ + { 202, -2 }, /* (105) db_optr ::= db_optr replica */ + { 202, -2 }, /* (106) db_optr ::= db_optr quorum */ + { 202, -2 }, /* (107) db_optr ::= db_optr days */ + { 202, -2 }, /* (108) db_optr ::= db_optr minrows */ + { 202, -2 }, /* (109) db_optr ::= db_optr maxrows */ + { 202, -2 }, /* (110) db_optr ::= db_optr blocks */ + { 202, -2 }, /* (111) db_optr ::= db_optr ctime */ + { 202, -2 }, /* (112) db_optr ::= db_optr wal */ + { 202, -2 }, /* (113) db_optr ::= db_optr fsync */ + { 202, -2 }, /* (114) db_optr ::= db_optr comp */ + { 202, -2 }, /* (115) db_optr ::= db_optr prec */ + { 202, -2 }, /* (116) db_optr ::= db_optr keep */ + { 202, -2 }, /* (117) db_optr ::= db_optr update */ + { 202, -2 }, /* (118) db_optr ::= db_optr cachelast */ + { 198, 0 }, /* (119) alter_db_optr ::= */ + { 198, -2 }, /* (120) alter_db_optr ::= alter_db_optr replica */ + { 198, -2 }, /* (121) alter_db_optr ::= alter_db_optr quorum */ + { 198, -2 }, /* (122) alter_db_optr ::= alter_db_optr keep */ + { 198, -2 }, /* (123) alter_db_optr ::= alter_db_optr blocks */ + { 198, -2 }, /* (124) alter_db_optr ::= alter_db_optr comp */ + { 198, -2 }, /* (125) alter_db_optr ::= alter_db_optr update */ + { 198, -2 }, /* (126) alter_db_optr ::= alter_db_optr cachelast */ + { 203, -1 }, /* (127) typename ::= ids */ + { 203, -4 }, /* (128) typename ::= ids LP signed RP */ + { 203, -2 }, /* (129) typename ::= ids UNSIGNED */ + { 231, -1 }, /* (130) signed ::= INTEGER */ + { 231, -2 }, /* (131) signed ::= PLUS INTEGER */ + { 231, -2 }, /* (132) signed ::= MINUS INTEGER */ + { 193, -3 }, /* (133) cmd ::= CREATE TABLE create_table_args */ + { 193, -3 }, /* (134) cmd ::= CREATE TABLE create_stable_args */ + { 193, -3 }, /* (135) cmd ::= CREATE STABLE create_stable_args */ + { 193, -3 }, /* (136) cmd ::= CREATE TABLE create_table_list */ + { 234, -1 }, /* (137) create_table_list ::= create_from_stable */ + { 234, -2 }, /* (138) create_table_list ::= create_table_list create_from_stable */ + { 232, -6 }, /* (139) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ + { 233, -10 }, /* (140) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ + { 235, -10 }, /* (141) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist1 RP */ + { 235, -13 }, /* (142) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist1 RP */ + { 238, -3 }, /* (143) tagNamelist ::= tagNamelist COMMA ids */ + { 238, -1 }, /* (144) tagNamelist ::= ids */ + { 232, -5 }, /* (145) create_table_args ::= ifnotexists ids cpxName AS select */ + { 236, -3 }, /* (146) columnlist ::= columnlist COMMA column */ + { 236, -1 }, /* (147) columnlist ::= column */ + { 240, -2 }, /* (148) column ::= ids typename */ + { 237, -3 }, /* (149) tagitemlist1 ::= tagitemlist1 COMMA tagitem1 */ + { 237, -1 }, /* (150) tagitemlist1 ::= tagitem1 */ + { 241, -2 }, /* (151) tagitem1 ::= MINUS INTEGER */ + { 241, -2 }, /* (152) tagitem1 ::= MINUS FLOAT */ + { 241, -2 }, /* (153) tagitem1 ::= PLUS INTEGER */ + { 241, -2 }, /* (154) tagitem1 ::= PLUS FLOAT */ + { 241, -1 }, /* (155) tagitem1 ::= INTEGER */ + { 241, -1 }, /* (156) tagitem1 ::= FLOAT */ + { 241, -1 }, /* (157) tagitem1 ::= STRING */ + { 241, -1 }, /* (158) tagitem1 ::= BOOL */ + { 241, -1 }, /* (159) tagitem1 ::= NULL */ + { 241, -1 }, /* (160) tagitem1 ::= NOW */ + { 242, -3 }, /* (161) tagitemlist ::= tagitemlist COMMA tagitem */ + { 242, -1 }, /* (162) tagitemlist ::= tagitem */ + { 243, -1 }, /* (163) tagitem ::= INTEGER */ + { 243, -1 }, /* (164) tagitem ::= FLOAT */ + { 243, -1 }, /* (165) tagitem ::= STRING */ + { 243, -1 }, /* (166) tagitem ::= BOOL */ + { 243, -1 }, /* (167) tagitem ::= NULL */ + { 243, -1 }, /* (168) tagitem ::= NOW */ + { 243, -2 }, /* (169) tagitem ::= MINUS INTEGER */ + { 243, -2 }, /* (170) tagitem ::= MINUS FLOAT */ + { 243, -2 }, /* (171) tagitem ::= PLUS INTEGER */ + { 243, -2 }, /* (172) tagitem ::= PLUS FLOAT */ + { 239, -14 }, /* (173) select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ + { 239, -3 }, /* (174) select ::= LP select RP */ + { 257, -1 }, /* (175) union ::= select */ + { 257, -4 }, /* (176) union ::= union UNION ALL select */ + { 257, -3 }, /* (177) union ::= union UNION select */ + { 193, -1 }, /* (178) cmd ::= union */ + { 239, -2 }, /* (179) select ::= SELECT selcollist */ + { 258, -2 }, /* (180) sclp ::= selcollist COMMA */ + { 258, 0 }, /* (181) sclp ::= */ + { 244, -4 }, /* (182) selcollist ::= sclp distinct expr as */ + { 244, -2 }, /* (183) selcollist ::= sclp STAR */ + { 261, -2 }, /* (184) as ::= AS ids */ + { 261, -1 }, /* (185) as ::= ids */ + { 261, 0 }, /* (186) as ::= */ + { 259, -1 }, /* (187) distinct ::= DISTINCT */ + { 259, 0 }, /* (188) distinct ::= */ + { 245, -2 }, /* (189) from ::= FROM tablelist */ + { 245, -2 }, /* (190) from ::= FROM sub */ + { 263, -3 }, /* (191) sub ::= LP union RP */ + { 263, -4 }, /* (192) sub ::= LP union RP ids */ + { 263, -6 }, /* (193) sub ::= sub COMMA LP union RP ids */ + { 262, -2 }, /* (194) tablelist ::= ids cpxName */ + { 262, -3 }, /* (195) tablelist ::= ids cpxName ids */ + { 262, -4 }, /* (196) tablelist ::= tablelist COMMA ids cpxName */ + { 262, -5 }, /* (197) tablelist ::= tablelist COMMA ids cpxName ids */ + { 264, -1 }, /* (198) tmvar ::= VARIABLE */ + { 247, -4 }, /* (199) interval_option ::= intervalKey LP tmvar RP */ + { 247, -6 }, /* (200) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + { 247, 0 }, /* (201) interval_option ::= */ + { 265, -1 }, /* (202) intervalKey ::= INTERVAL */ + { 265, -1 }, /* (203) intervalKey ::= EVERY */ + { 249, 0 }, /* (204) session_option ::= */ + { 249, -7 }, /* (205) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + { 250, 0 }, /* (206) windowstate_option ::= */ + { 250, -4 }, /* (207) windowstate_option ::= STATE_WINDOW LP ids RP */ + { 251, 0 }, /* (208) fill_opt ::= */ + { 251, -6 }, /* (209) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + { 251, -4 }, /* (210) fill_opt ::= FILL LP ID RP */ + { 248, -4 }, /* (211) sliding_opt ::= SLIDING LP tmvar RP */ + { 248, 0 }, /* (212) sliding_opt ::= */ + { 254, 0 }, /* (213) orderby_opt ::= */ + { 254, -3 }, /* (214) orderby_opt ::= ORDER BY sortlist */ + { 266, -4 }, /* (215) sortlist ::= sortlist COMMA item sortorder */ + { 266, -2 }, /* (216) sortlist ::= item sortorder */ + { 268, -2 }, /* (217) item ::= ids cpxName */ + { 269, -1 }, /* (218) sortorder ::= ASC */ + { 269, -1 }, /* (219) sortorder ::= DESC */ + { 269, 0 }, /* (220) sortorder ::= */ + { 252, 0 }, /* (221) groupby_opt ::= */ + { 252, -3 }, /* (222) groupby_opt ::= GROUP BY grouplist */ + { 270, -3 }, /* (223) grouplist ::= grouplist COMMA item */ + { 270, -1 }, /* (224) grouplist ::= item */ + { 253, 0 }, /* (225) having_opt ::= */ + { 253, -2 }, /* (226) having_opt ::= HAVING expr */ + { 256, 0 }, /* (227) limit_opt ::= */ + { 256, -2 }, /* (228) limit_opt ::= LIMIT signed */ + { 256, -4 }, /* (229) limit_opt ::= LIMIT signed OFFSET signed */ + { 256, -4 }, /* (230) limit_opt ::= LIMIT signed COMMA signed */ + { 255, 0 }, /* (231) slimit_opt ::= */ + { 255, -2 }, /* (232) slimit_opt ::= SLIMIT signed */ + { 255, -4 }, /* (233) slimit_opt ::= SLIMIT signed SOFFSET signed */ + { 255, -4 }, /* (234) slimit_opt ::= SLIMIT signed COMMA signed */ + { 246, 0 }, /* (235) where_opt ::= */ + { 246, -2 }, /* (236) where_opt ::= WHERE expr */ + { 260, -3 }, /* (237) expr ::= LP expr RP */ + { 260, -1 }, /* (238) expr ::= ID */ + { 260, -3 }, /* (239) expr ::= ID DOT ID */ + { 260, -3 }, /* (240) expr ::= ID DOT STAR */ + { 260, -1 }, /* (241) expr ::= INTEGER */ + { 260, -2 }, /* (242) expr ::= MINUS INTEGER */ + { 260, -2 }, /* (243) expr ::= PLUS INTEGER */ + { 260, -1 }, /* (244) expr ::= FLOAT */ + { 260, -2 }, /* (245) expr ::= MINUS FLOAT */ + { 260, -2 }, /* (246) expr ::= PLUS FLOAT */ + { 260, -1 }, /* (247) expr ::= STRING */ + { 260, -1 }, /* (248) expr ::= NOW */ + { 260, -1 }, /* (249) expr ::= VARIABLE */ + { 260, -2 }, /* (250) expr ::= PLUS VARIABLE */ + { 260, -2 }, /* (251) expr ::= MINUS VARIABLE */ + { 260, -1 }, /* (252) expr ::= BOOL */ + { 260, -1 }, /* (253) expr ::= NULL */ + { 260, -4 }, /* (254) expr ::= ID LP exprlist RP */ + { 260, -4 }, /* (255) expr ::= ID LP STAR RP */ + { 260, -3 }, /* (256) expr ::= expr IS NULL */ + { 260, -4 }, /* (257) expr ::= expr IS NOT NULL */ + { 260, -3 }, /* (258) expr ::= expr LT expr */ + { 260, -3 }, /* (259) expr ::= expr GT expr */ + { 260, -3 }, /* (260) expr ::= expr LE expr */ + { 260, -3 }, /* (261) expr ::= expr GE expr */ + { 260, -3 }, /* (262) expr ::= expr NE expr */ + { 260, -3 }, /* (263) expr ::= expr EQ expr */ + { 260, -5 }, /* (264) expr ::= expr BETWEEN expr AND expr */ + { 260, -3 }, /* (265) expr ::= expr AND expr */ + { 260, -3 }, /* (266) expr ::= expr OR expr */ + { 260, -3 }, /* (267) expr ::= expr PLUS expr */ + { 260, -3 }, /* (268) expr ::= expr MINUS expr */ + { 260, -3 }, /* (269) expr ::= expr STAR expr */ + { 260, -3 }, /* (270) expr ::= expr SLASH expr */ + { 260, -3 }, /* (271) expr ::= expr REM expr */ + { 260, -3 }, /* (272) expr ::= expr LIKE expr */ + { 260, -3 }, /* (273) expr ::= expr MATCH expr */ + { 260, -3 }, /* (274) expr ::= expr NMATCH expr */ + { 260, -5 }, /* (275) expr ::= expr IN LP exprlist RP */ + { 200, -3 }, /* (276) exprlist ::= exprlist COMMA expritem */ + { 200, -1 }, /* (277) exprlist ::= expritem */ + { 271, -1 }, /* (278) expritem ::= expr */ + { 271, 0 }, /* (279) expritem ::= */ + { 193, -3 }, /* (280) cmd ::= RESET QUERY CACHE */ + { 193, -3 }, /* (281) cmd ::= SYNCDB ids REPLICA */ + { 193, -7 }, /* (282) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + { 193, -7 }, /* (283) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + { 193, -7 }, /* (284) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + { 193, -7 }, /* (285) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + { 193, -7 }, /* (286) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + { 193, -8 }, /* (287) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + { 193, -9 }, /* (288) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + { 193, -7 }, /* (289) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + { 193, -7 }, /* (290) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + { 193, -7 }, /* (291) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + { 193, -7 }, /* (292) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + { 193, -7 }, /* (293) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + { 193, -7 }, /* (294) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + { 193, -8 }, /* (295) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + { 193, -9 }, /* (296) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + { 193, -7 }, /* (297) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + { 193, -3 }, /* (298) cmd ::= KILL CONNECTION INTEGER */ + { 193, -5 }, /* (299) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + { 193, -5 }, /* (300) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2409,7 +2395,7 @@ static void yy_reduce( { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 47: /* cmd ::= ALTER DATABASE ids alter_db_optr */ -{ SToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy90, &t);} +{ SToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy254, &t);} break; case 48: /* cmd ::= ALTER ACCOUNT ids acct_optr */ { setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy171);} @@ -2418,7 +2404,7 @@ static void yy_reduce( { setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy171);} break; case 50: /* cmd ::= COMPACT VNODES IN LP exprlist RP */ -{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy421);} +{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy413);} break; case 51: /* ids ::= ID */ case 52: /* ids ::= STRING */ yytestcase(yyruleno==52); @@ -2444,13 +2430,13 @@ static void yy_reduce( { setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy171);} break; case 60: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ -{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy90, &yymsp[-2].minor.yy0);} +{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy254, &yymsp[-2].minor.yy0);} break; case 61: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ -{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy100, &yymsp[0].minor.yy0, 1);} +{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy280, &yymsp[0].minor.yy0, 1);} break; case 62: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ -{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy100, &yymsp[0].minor.yy0, 2);} +{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy280, &yymsp[0].minor.yy0, 2);} break; case 63: /* cmd ::= CREATE USER ids PASS ids */ { setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);} @@ -2495,24 +2481,24 @@ static void yy_reduce( break; case 85: /* intitemlist ::= intitemlist COMMA intitem */ case 161: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==161); -{ yylhsminor.yy421 = tListItemAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy69, -1); } - yymsp[-2].minor.yy421 = yylhsminor.yy421; +{ yylhsminor.yy413 = tListItemAppend(yymsp[-2].minor.yy413, &yymsp[0].minor.yy461, -1); } + yymsp[-2].minor.yy413 = yylhsminor.yy413; break; case 86: /* intitemlist ::= intitem */ case 162: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==162); -{ yylhsminor.yy421 = tListItemAppend(NULL, &yymsp[0].minor.yy69, -1); } - yymsp[0].minor.yy421 = yylhsminor.yy421; +{ yylhsminor.yy413 = tListItemAppend(NULL, &yymsp[0].minor.yy461, -1); } + yymsp[0].minor.yy413 = yylhsminor.yy413; break; case 87: /* intitem ::= INTEGER */ case 163: /* tagitem ::= INTEGER */ yytestcase(yyruleno==163); case 164: /* tagitem ::= FLOAT */ yytestcase(yyruleno==164); case 165: /* tagitem ::= STRING */ yytestcase(yyruleno==165); case 166: /* tagitem ::= BOOL */ yytestcase(yyruleno==166); -{ toTSDBType(yymsp[0].minor.yy0.type); taosVariantCreate(&yylhsminor.yy69, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.type); } - yymsp[0].minor.yy69 = yylhsminor.yy69; +{ toTSDBType(yymsp[0].minor.yy0.type); taosVariantCreate(&yylhsminor.yy461, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.type); } + yymsp[0].minor.yy461 = yylhsminor.yy461; break; case 88: /* keep ::= KEEP intitemlist */ -{ yymsp[-1].minor.yy421 = yymsp[0].minor.yy421; } +{ yymsp[-1].minor.yy413 = yymsp[0].minor.yy413; } break; case 89: /* cache ::= CACHE INTEGER */ case 90: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==90); @@ -2531,114 +2517,114 @@ static void yy_reduce( { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; case 103: /* db_optr ::= */ -{setDefaultCreateDbOption(&yymsp[1].minor.yy90);} +{setDefaultCreateDbOption(&yymsp[1].minor.yy254);} break; case 104: /* db_optr ::= db_optr cache */ -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 105: /* db_optr ::= db_optr replica */ case 120: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==120); -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 106: /* db_optr ::= db_optr quorum */ case 121: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==121); -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 107: /* db_optr ::= db_optr days */ -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 108: /* db_optr ::= db_optr minrows */ -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 109: /* db_optr ::= db_optr maxrows */ -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 110: /* db_optr ::= db_optr blocks */ case 123: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==123); -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 111: /* db_optr ::= db_optr ctime */ -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 112: /* db_optr ::= db_optr wal */ -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 113: /* db_optr ::= db_optr fsync */ -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 114: /* db_optr ::= db_optr comp */ case 124: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==124); -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 115: /* db_optr ::= db_optr prec */ -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.precision = yymsp[0].minor.yy0; } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.precision = yymsp[0].minor.yy0; } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 116: /* db_optr ::= db_optr keep */ case 122: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==122); -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.keep = yymsp[0].minor.yy421; } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.keep = yymsp[0].minor.yy413; } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 117: /* db_optr ::= db_optr update */ case 125: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==125); -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 118: /* db_optr ::= db_optr cachelast */ case 126: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==126); -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy90 = yylhsminor.yy90; +{ yylhsminor.yy254 = yymsp[-1].minor.yy254; yylhsminor.yy254.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy254 = yylhsminor.yy254; break; case 119: /* alter_db_optr ::= */ -{ setDefaultCreateDbOption(&yymsp[1].minor.yy90);} +{ setDefaultCreateDbOption(&yymsp[1].minor.yy254);} break; case 127: /* typename ::= ids */ { yymsp[0].minor.yy0.type = 0; - tSetColumnType (&yylhsminor.yy100, &yymsp[0].minor.yy0); + tSetColumnType (&yylhsminor.yy280, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy100 = yylhsminor.yy100; + yymsp[0].minor.yy280 = yylhsminor.yy280; break; case 128: /* typename ::= ids LP signed RP */ { - if (yymsp[-1].minor.yy325 <= 0) { + if (yymsp[-1].minor.yy157 <= 0) { yymsp[-3].minor.yy0.type = 0; - tSetColumnType(&yylhsminor.yy100, &yymsp[-3].minor.yy0); + tSetColumnType(&yylhsminor.yy280, &yymsp[-3].minor.yy0); } else { - yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy325; // negative value of name length - tSetColumnType(&yylhsminor.yy100, &yymsp[-3].minor.yy0); + yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy157; // negative value of name length + tSetColumnType(&yylhsminor.yy280, &yymsp[-3].minor.yy0); } } - yymsp[-3].minor.yy100 = yylhsminor.yy100; + yymsp[-3].minor.yy280 = yylhsminor.yy280; break; case 129: /* typename ::= ids UNSIGNED */ { yymsp[-1].minor.yy0.type = 0; yymsp[-1].minor.yy0.n = ((yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z); - tSetColumnType (&yylhsminor.yy100, &yymsp[-1].minor.yy0); + tSetColumnType (&yylhsminor.yy280, &yymsp[-1].minor.yy0); } - yymsp[-1].minor.yy100 = yylhsminor.yy100; + yymsp[-1].minor.yy280 = yylhsminor.yy280; break; case 130: /* signed ::= INTEGER */ -{ yylhsminor.yy325 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[0].minor.yy325 = yylhsminor.yy325; +{ yylhsminor.yy157 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[0].minor.yy157 = yylhsminor.yy157; break; case 131: /* signed ::= PLUS INTEGER */ -{ yymsp[-1].minor.yy325 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy157 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } break; case 132: /* signed ::= MINUS INTEGER */ -{ yymsp[-1].minor.yy325 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} +{ yymsp[-1].minor.yy157 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} break; case 136: /* cmd ::= CREATE TABLE create_table_list */ { pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy438;} @@ -2648,7 +2634,7 @@ static void yy_reduce( SCreateTableSql* pCreateTable = calloc(1, sizeof(SCreateTableSql)); pCreateTable->childTableInfo = taosArrayInit(4, sizeof(SCreatedTableInfo)); - taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy152); + taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy544); pCreateTable->type = TSQL_CREATE_CTABLE; yylhsminor.yy438 = pCreateTable; } @@ -2656,14 +2642,14 @@ static void yy_reduce( break; case 138: /* create_table_list ::= create_table_list create_from_stable */ { - taosArrayPush(yymsp[-1].minor.yy438->childTableInfo, &yymsp[0].minor.yy152); + taosArrayPush(yymsp[-1].minor.yy438->childTableInfo, &yymsp[0].minor.yy544); yylhsminor.yy438 = yymsp[-1].minor.yy438; } yymsp[-1].minor.yy438 = yylhsminor.yy438; break; case 139: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ { - yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-1].minor.yy421, NULL, NULL, TSQL_CREATE_TABLE); + yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-1].minor.yy413, NULL, NULL, TSQL_CREATE_TABLE); setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -2673,7 +2659,7 @@ static void yy_reduce( break; case 140: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ { - yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-5].minor.yy421, yymsp[-1].minor.yy421, NULL, TSQL_CREATE_STABLE); + yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-5].minor.yy413, yymsp[-1].minor.yy413, NULL, TSQL_CREATE_STABLE); setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; @@ -2685,29 +2671,29 @@ static void yy_reduce( { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; - yylhsminor.yy152 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy421, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); + yylhsminor.yy544 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy413, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); } - yymsp[-9].minor.yy152 = yylhsminor.yy152; + yymsp[-9].minor.yy544 = yylhsminor.yy544; break; case 142: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist1 RP */ { yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; yymsp[-11].minor.yy0.n += yymsp[-10].minor.yy0.n; - yylhsminor.yy152 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy421, yymsp[-1].minor.yy421, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0); + yylhsminor.yy544 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy413, yymsp[-1].minor.yy413, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0); } - yymsp[-12].minor.yy152 = yylhsminor.yy152; + yymsp[-12].minor.yy544 = yylhsminor.yy544; break; case 143: /* tagNamelist ::= tagNamelist COMMA ids */ -{taosArrayPush(yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); yylhsminor.yy421 = yymsp[-2].minor.yy421; } - yymsp[-2].minor.yy421 = yylhsminor.yy421; +{taosArrayPush(yymsp[-2].minor.yy413, &yymsp[0].minor.yy0); yylhsminor.yy413 = yymsp[-2].minor.yy413; } + yymsp[-2].minor.yy413 = yylhsminor.yy413; break; case 144: /* tagNamelist ::= ids */ -{yylhsminor.yy421 = taosArrayInit(4, sizeof(SToken)); taosArrayPush(yylhsminor.yy421, &yymsp[0].minor.yy0);} - yymsp[0].minor.yy421 = yylhsminor.yy421; +{yylhsminor.yy413 = taosArrayInit(4, sizeof(SToken)); taosArrayPush(yylhsminor.yy413, &yymsp[0].minor.yy0);} + yymsp[0].minor.yy413 = yylhsminor.yy413; break; case 145: /* create_table_args ::= ifnotexists ids cpxName AS select */ { - yylhsminor.yy438 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy56, TSQL_CREATE_STREAM); + yylhsminor.yy438 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy24, TSQL_CREATE_STREAM); setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); yymsp[-3].minor.yy0.n += yymsp[-2].minor.yy0.n; @@ -2716,26 +2702,26 @@ static void yy_reduce( yymsp[-4].minor.yy438 = yylhsminor.yy438; break; case 146: /* columnlist ::= columnlist COMMA column */ -{taosArrayPush(yymsp[-2].minor.yy421, &yymsp[0].minor.yy100); yylhsminor.yy421 = yymsp[-2].minor.yy421; } - yymsp[-2].minor.yy421 = yylhsminor.yy421; +{taosArrayPush(yymsp[-2].minor.yy413, &yymsp[0].minor.yy280); yylhsminor.yy413 = yymsp[-2].minor.yy413; } + yymsp[-2].minor.yy413 = yylhsminor.yy413; break; case 147: /* columnlist ::= column */ -{yylhsminor.yy421 = taosArrayInit(4, sizeof(SField)); taosArrayPush(yylhsminor.yy421, &yymsp[0].minor.yy100);} - yymsp[0].minor.yy421 = yylhsminor.yy421; +{yylhsminor.yy413 = taosArrayInit(4, sizeof(SField)); taosArrayPush(yylhsminor.yy413, &yymsp[0].minor.yy280);} + yymsp[0].minor.yy413 = yylhsminor.yy413; break; case 148: /* column ::= ids typename */ { - tSetColumnInfo(&yylhsminor.yy100, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy100); + tSetColumnInfo(&yylhsminor.yy280, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy280); } - yymsp[-1].minor.yy100 = yylhsminor.yy100; + yymsp[-1].minor.yy280 = yylhsminor.yy280; break; case 149: /* tagitemlist1 ::= tagitemlist1 COMMA tagitem1 */ -{ taosArrayPush(yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); yylhsminor.yy421 = yymsp[-2].minor.yy421;} - yymsp[-2].minor.yy421 = yylhsminor.yy421; +{ taosArrayPush(yymsp[-2].minor.yy413, &yymsp[0].minor.yy0); yylhsminor.yy413 = yymsp[-2].minor.yy413;} + yymsp[-2].minor.yy413 = yylhsminor.yy413; break; case 150: /* tagitemlist1 ::= tagitem1 */ -{ yylhsminor.yy421 = taosArrayInit(4, sizeof(SToken)); taosArrayPush(yylhsminor.yy421, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy421 = yylhsminor.yy421; +{ yylhsminor.yy413 = taosArrayInit(4, sizeof(SToken)); taosArrayPush(yylhsminor.yy413, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy413 = yylhsminor.yy413; break; case 151: /* tagitem1 ::= MINUS INTEGER */ case 152: /* tagitem1 ::= MINUS FLOAT */ yytestcase(yyruleno==152); @@ -2754,12 +2740,12 @@ static void yy_reduce( yymsp[0].minor.yy0 = yylhsminor.yy0; break; case 167: /* tagitem ::= NULL */ -{ yymsp[0].minor.yy0.type = 0; taosVariantCreate(&yylhsminor.yy69, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.type); } - yymsp[0].minor.yy69 = yylhsminor.yy69; +{ yymsp[0].minor.yy0.type = 0; taosVariantCreate(&yylhsminor.yy461, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.type); } + yymsp[0].minor.yy461 = yylhsminor.yy461; break; case 168: /* tagitem ::= NOW */ -{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; taosVariantCreate(&yylhsminor.yy69, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.type);} - yymsp[0].minor.yy69 = yylhsminor.yy69; +{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; taosVariantCreate(&yylhsminor.yy461, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.type);} + yymsp[0].minor.yy461 = yylhsminor.yy461; break; case 169: /* tagitem ::= MINUS INTEGER */ case 170: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==170); @@ -2769,60 +2755,60 @@ static void yy_reduce( yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = yymsp[0].minor.yy0.type; toTSDBType(yymsp[-1].minor.yy0.type); - taosVariantCreate(&yylhsminor.yy69, yymsp[-1].minor.yy0.z, yymsp[-1].minor.yy0.n, yymsp[-1].minor.yy0.type); + taosVariantCreate(&yylhsminor.yy461, yymsp[-1].minor.yy0.z, yymsp[-1].minor.yy0.n, yymsp[-1].minor.yy0.type); } - yymsp[-1].minor.yy69 = yylhsminor.yy69; + yymsp[-1].minor.yy461 = yylhsminor.yy461; break; case 173: /* select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ { - yylhsminor.yy56 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy421, yymsp[-11].minor.yy8, yymsp[-10].minor.yy439, yymsp[-4].minor.yy421, yymsp[-2].minor.yy421, &yymsp[-9].minor.yy400, &yymsp[-7].minor.yy147, &yymsp[-6].minor.yy40, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy421, &yymsp[0].minor.yy231, &yymsp[-1].minor.yy231, yymsp[-3].minor.yy439); + yylhsminor.yy24 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy413, yymsp[-11].minor.yy292, yymsp[-10].minor.yy370, yymsp[-4].minor.yy413, yymsp[-2].minor.yy413, &yymsp[-9].minor.yy136, &yymsp[-7].minor.yy251, &yymsp[-6].minor.yy256, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy413, &yymsp[0].minor.yy503, &yymsp[-1].minor.yy503, yymsp[-3].minor.yy370); } - yymsp[-13].minor.yy56 = yylhsminor.yy56; + yymsp[-13].minor.yy24 = yylhsminor.yy24; break; case 174: /* select ::= LP select RP */ -{yymsp[-2].minor.yy56 = yymsp[-1].minor.yy56;} +{yymsp[-2].minor.yy24 = yymsp[-1].minor.yy24;} break; case 175: /* union ::= select */ -{ yylhsminor.yy149 = setSubclause(NULL, yymsp[0].minor.yy56); } - yymsp[0].minor.yy149 = yylhsminor.yy149; +{ yylhsminor.yy129 = setSubclause(NULL, yymsp[0].minor.yy24); } + yymsp[0].minor.yy129 = yylhsminor.yy129; break; case 176: /* union ::= union UNION ALL select */ -{ yylhsminor.yy149 = appendSelectClause(yymsp[-3].minor.yy149, SQL_TYPE_UNIONALL, yymsp[0].minor.yy56); } - yymsp[-3].minor.yy149 = yylhsminor.yy149; +{ yylhsminor.yy129 = appendSelectClause(yymsp[-3].minor.yy129, SQL_TYPE_UNIONALL, yymsp[0].minor.yy24); } + yymsp[-3].minor.yy129 = yylhsminor.yy129; break; case 177: /* union ::= union UNION select */ -{ yylhsminor.yy149 = appendSelectClause(yymsp[-2].minor.yy149, SQL_TYPE_UNION, yymsp[0].minor.yy56); } - yymsp[-2].minor.yy149 = yylhsminor.yy149; +{ yylhsminor.yy129 = appendSelectClause(yymsp[-2].minor.yy129, SQL_TYPE_UNION, yymsp[0].minor.yy24); } + yymsp[-2].minor.yy129 = yylhsminor.yy129; break; case 178: /* cmd ::= union */ -{ setSqlInfo(pInfo, yymsp[0].minor.yy149, NULL, TSDB_SQL_SELECT); } +{ setSqlInfo(pInfo, yymsp[0].minor.yy129, NULL, TSDB_SQL_SELECT); } break; case 179: /* select ::= SELECT selcollist */ { - yylhsminor.yy56 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy421, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + yylhsminor.yy24 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy413, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } - yymsp[-1].minor.yy56 = yylhsminor.yy56; + yymsp[-1].minor.yy24 = yylhsminor.yy24; break; case 180: /* sclp ::= selcollist COMMA */ -{yylhsminor.yy421 = yymsp[-1].minor.yy421;} - yymsp[-1].minor.yy421 = yylhsminor.yy421; +{yylhsminor.yy413 = yymsp[-1].minor.yy413;} + yymsp[-1].minor.yy413 = yylhsminor.yy413; break; case 181: /* sclp ::= */ case 213: /* orderby_opt ::= */ yytestcase(yyruleno==213); -{yymsp[1].minor.yy421 = 0;} +{yymsp[1].minor.yy413 = 0;} break; case 182: /* selcollist ::= sclp distinct expr as */ { - yylhsminor.yy421 = tSqlExprListAppend(yymsp[-3].minor.yy421, yymsp[-1].minor.yy439, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); + yylhsminor.yy413 = tSqlExprListAppend(yymsp[-3].minor.yy413, yymsp[-1].minor.yy370, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); } - yymsp[-3].minor.yy421 = yylhsminor.yy421; + yymsp[-3].minor.yy413 = yylhsminor.yy413; break; case 183: /* selcollist ::= sclp STAR */ { tSqlExpr *pNode = tSqlExprCreateIdValue(NULL, TK_ALL); - yylhsminor.yy421 = tSqlExprListAppend(yymsp[-1].minor.yy421, pNode, 0, 0); + yylhsminor.yy413 = tSqlExprListAppend(yymsp[-1].minor.yy413, pNode, 0, 0); } - yymsp[-1].minor.yy421 = yylhsminor.yy421; + yymsp[-1].minor.yy413 = yylhsminor.yy413; break; case 184: /* as ::= AS ids */ { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } @@ -2840,85 +2826,85 @@ static void yy_reduce( break; case 189: /* from ::= FROM tablelist */ case 190: /* from ::= FROM sub */ yytestcase(yyruleno==190); -{yymsp[-1].minor.yy8 = yymsp[0].minor.yy8;} +{yymsp[-1].minor.yy292 = yymsp[0].minor.yy292;} break; case 191: /* sub ::= LP union RP */ -{yymsp[-2].minor.yy8 = addSubquery(NULL, yymsp[-1].minor.yy149, NULL);} +{yymsp[-2].minor.yy292 = addSubquery(NULL, yymsp[-1].minor.yy129, NULL);} break; case 192: /* sub ::= LP union RP ids */ -{yymsp[-3].minor.yy8 = addSubquery(NULL, yymsp[-2].minor.yy149, &yymsp[0].minor.yy0);} +{yymsp[-3].minor.yy292 = addSubquery(NULL, yymsp[-2].minor.yy129, &yymsp[0].minor.yy0);} break; case 193: /* sub ::= sub COMMA LP union RP ids */ -{yylhsminor.yy8 = addSubquery(yymsp[-5].minor.yy8, yymsp[-2].minor.yy149, &yymsp[0].minor.yy0);} - yymsp[-5].minor.yy8 = yylhsminor.yy8; +{yylhsminor.yy292 = addSubquery(yymsp[-5].minor.yy292, yymsp[-2].minor.yy129, &yymsp[0].minor.yy0);} + yymsp[-5].minor.yy292 = yylhsminor.yy292; break; case 194: /* tablelist ::= ids cpxName */ { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); + yylhsminor.yy292 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); } - yymsp[-1].minor.yy8 = yylhsminor.yy8; + yymsp[-1].minor.yy292 = yylhsminor.yy292; break; case 195: /* tablelist ::= ids cpxName ids */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; - yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); + yylhsminor.yy292 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy8 = yylhsminor.yy8; + yymsp[-2].minor.yy292 = yylhsminor.yy292; break; case 196: /* tablelist ::= tablelist COMMA ids cpxName */ { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - yylhsminor.yy8 = setTableNameList(yymsp[-3].minor.yy8, &yymsp[-1].minor.yy0, NULL); + yylhsminor.yy292 = setTableNameList(yymsp[-3].minor.yy292, &yymsp[-1].minor.yy0, NULL); } - yymsp[-3].minor.yy8 = yylhsminor.yy8; + yymsp[-3].minor.yy292 = yylhsminor.yy292; break; case 197: /* tablelist ::= tablelist COMMA ids cpxName ids */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; - yylhsminor.yy8 = setTableNameList(yymsp[-4].minor.yy8, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); + yylhsminor.yy292 = setTableNameList(yymsp[-4].minor.yy292, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } - yymsp[-4].minor.yy8 = yylhsminor.yy8; + yymsp[-4].minor.yy292 = yylhsminor.yy292; break; case 198: /* tmvar ::= VARIABLE */ {yylhsminor.yy0 = yymsp[0].minor.yy0;} yymsp[0].minor.yy0 = yylhsminor.yy0; break; case 199: /* interval_option ::= intervalKey LP tmvar RP */ -{yylhsminor.yy400.interval = yymsp[-1].minor.yy0; yylhsminor.yy400.offset.n = 0; yylhsminor.yy400.token = yymsp[-3].minor.yy104;} - yymsp[-3].minor.yy400 = yylhsminor.yy400; +{yylhsminor.yy136.interval = yymsp[-1].minor.yy0; yylhsminor.yy136.offset.n = 0; yylhsminor.yy136.token = yymsp[-3].minor.yy516;} + yymsp[-3].minor.yy136 = yylhsminor.yy136; break; case 200: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ -{yylhsminor.yy400.interval = yymsp[-3].minor.yy0; yylhsminor.yy400.offset = yymsp[-1].minor.yy0; yylhsminor.yy400.token = yymsp[-5].minor.yy104;} - yymsp[-5].minor.yy400 = yylhsminor.yy400; +{yylhsminor.yy136.interval = yymsp[-3].minor.yy0; yylhsminor.yy136.offset = yymsp[-1].minor.yy0; yylhsminor.yy136.token = yymsp[-5].minor.yy516;} + yymsp[-5].minor.yy136 = yylhsminor.yy136; break; case 201: /* interval_option ::= */ -{memset(&yymsp[1].minor.yy400, 0, sizeof(yymsp[1].minor.yy400));} +{memset(&yymsp[1].minor.yy136, 0, sizeof(yymsp[1].minor.yy136));} break; case 202: /* intervalKey ::= INTERVAL */ -{yymsp[0].minor.yy104 = TK_INTERVAL;} +{yymsp[0].minor.yy516 = TK_INTERVAL;} break; case 203: /* intervalKey ::= EVERY */ -{yymsp[0].minor.yy104 = TK_EVERY; } +{yymsp[0].minor.yy516 = TK_EVERY; } break; case 204: /* session_option ::= */ -{yymsp[1].minor.yy147.col.n = 0; yymsp[1].minor.yy147.gap.n = 0;} +{yymsp[1].minor.yy251.col.n = 0; yymsp[1].minor.yy251.gap.n = 0;} break; case 205: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - yymsp[-6].minor.yy147.col = yymsp[-4].minor.yy0; - yymsp[-6].minor.yy147.gap = yymsp[-1].minor.yy0; + yymsp[-6].minor.yy251.col = yymsp[-4].minor.yy0; + yymsp[-6].minor.yy251.gap = yymsp[-1].minor.yy0; } break; case 206: /* windowstate_option ::= */ -{ yymsp[1].minor.yy40.col.n = 0; yymsp[1].minor.yy40.col.z = NULL;} +{ yymsp[1].minor.yy256.col.n = 0; yymsp[1].minor.yy256.col.z = NULL;} break; case 207: /* windowstate_option ::= STATE_WINDOW LP ids RP */ -{ yymsp[-3].minor.yy40.col = yymsp[-1].minor.yy0; } +{ yymsp[-3].minor.yy256.col = yymsp[-1].minor.yy0; } break; case 208: /* fill_opt ::= */ -{ yymsp[1].minor.yy421 = 0; } +{ yymsp[1].minor.yy413 = 0; } break; case 209: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ { @@ -2926,14 +2912,14 @@ static void yy_reduce( toTSDBType(yymsp[-3].minor.yy0.type); taosVariantCreate(&A, yymsp[-3].minor.yy0.z, yymsp[-3].minor.yy0.n, yymsp[-3].minor.yy0.type); - tListItemInsert(yymsp[-1].minor.yy421, &A, -1, 0); - yymsp[-5].minor.yy421 = yymsp[-1].minor.yy421; + tListItemInsert(yymsp[-1].minor.yy413, &A, -1, 0); + yymsp[-5].minor.yy413 = yymsp[-1].minor.yy413; } break; case 210: /* fill_opt ::= FILL LP ID RP */ { toTSDBType(yymsp[-1].minor.yy0.type); - yymsp[-3].minor.yy421 = tListItemAppendToken(NULL, &yymsp[-1].minor.yy0, -1); + yymsp[-3].minor.yy413 = tListItemAppendToken(NULL, &yymsp[-1].minor.yy0, -1); } break; case 211: /* sliding_opt ::= SLIDING LP tmvar RP */ @@ -2943,243 +2929,243 @@ static void yy_reduce( {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; } break; case 214: /* orderby_opt ::= ORDER BY sortlist */ -{yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} +{yymsp[-2].minor.yy413 = yymsp[0].minor.yy413;} break; case 215: /* sortlist ::= sortlist COMMA item sortorder */ { - yylhsminor.yy421 = tListItemAppend(yymsp[-3].minor.yy421, &yymsp[-1].minor.yy69, yymsp[0].minor.yy96); + yylhsminor.yy413 = tListItemAppend(yymsp[-3].minor.yy413, &yymsp[-1].minor.yy461, yymsp[0].minor.yy60); } - yymsp[-3].minor.yy421 = yylhsminor.yy421; + yymsp[-3].minor.yy413 = yylhsminor.yy413; break; case 216: /* sortlist ::= item sortorder */ { - yylhsminor.yy421 = tListItemAppend(NULL, &yymsp[-1].minor.yy69, yymsp[0].minor.yy96); + yylhsminor.yy413 = tListItemAppend(NULL, &yymsp[-1].minor.yy461, yymsp[0].minor.yy60); } - yymsp[-1].minor.yy421 = yylhsminor.yy421; + yymsp[-1].minor.yy413 = yylhsminor.yy413; break; case 217: /* item ::= ids cpxName */ { toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - taosVariantCreate(&yylhsminor.yy69, yymsp[-1].minor.yy0.z, yymsp[-1].minor.yy0.n, yymsp[-1].minor.yy0.type); + taosVariantCreate(&yylhsminor.yy461, yymsp[-1].minor.yy0.z, yymsp[-1].minor.yy0.n, yymsp[-1].minor.yy0.type); } - yymsp[-1].minor.yy69 = yylhsminor.yy69; + yymsp[-1].minor.yy461 = yylhsminor.yy461; break; case 218: /* sortorder ::= ASC */ -{ yymsp[0].minor.yy96 = TSDB_ORDER_ASC; } +{ yymsp[0].minor.yy60 = TSDB_ORDER_ASC; } break; case 219: /* sortorder ::= DESC */ -{ yymsp[0].minor.yy96 = TSDB_ORDER_DESC;} +{ yymsp[0].minor.yy60 = TSDB_ORDER_DESC;} break; case 220: /* sortorder ::= */ -{ yymsp[1].minor.yy96 = TSDB_ORDER_ASC; } +{ yymsp[1].minor.yy60 = TSDB_ORDER_ASC; } break; case 221: /* groupby_opt ::= */ -{ yymsp[1].minor.yy421 = 0;} +{ yymsp[1].minor.yy413 = 0;} break; case 222: /* groupby_opt ::= GROUP BY grouplist */ -{ yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} +{ yymsp[-2].minor.yy413 = yymsp[0].minor.yy413;} break; case 223: /* grouplist ::= grouplist COMMA item */ { - yylhsminor.yy421 = tListItemAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy69, -1); + yylhsminor.yy413 = tListItemAppend(yymsp[-2].minor.yy413, &yymsp[0].minor.yy461, -1); } - yymsp[-2].minor.yy421 = yylhsminor.yy421; + yymsp[-2].minor.yy413 = yylhsminor.yy413; break; case 224: /* grouplist ::= item */ { - yylhsminor.yy421 = tListItemAppend(NULL, &yymsp[0].minor.yy69, -1); + yylhsminor.yy413 = tListItemAppend(NULL, &yymsp[0].minor.yy461, -1); } - yymsp[0].minor.yy421 = yylhsminor.yy421; + yymsp[0].minor.yy413 = yylhsminor.yy413; break; case 225: /* having_opt ::= */ case 235: /* where_opt ::= */ yytestcase(yyruleno==235); case 279: /* expritem ::= */ yytestcase(yyruleno==279); -{yymsp[1].minor.yy439 = 0;} +{yymsp[1].minor.yy370 = 0;} break; case 226: /* having_opt ::= HAVING expr */ case 236: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==236); -{yymsp[-1].minor.yy439 = yymsp[0].minor.yy439;} +{yymsp[-1].minor.yy370 = yymsp[0].minor.yy370;} break; case 227: /* limit_opt ::= */ case 231: /* slimit_opt ::= */ yytestcase(yyruleno==231); -{yymsp[1].minor.yy231.limit = -1; yymsp[1].minor.yy231.offset = 0;} +{yymsp[1].minor.yy503.limit = -1; yymsp[1].minor.yy503.offset = 0;} break; case 228: /* limit_opt ::= LIMIT signed */ case 232: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==232); -{yymsp[-1].minor.yy231.limit = yymsp[0].minor.yy325; yymsp[-1].minor.yy231.offset = 0;} +{yymsp[-1].minor.yy503.limit = yymsp[0].minor.yy157; yymsp[-1].minor.yy503.offset = 0;} break; case 229: /* limit_opt ::= LIMIT signed OFFSET signed */ -{ yymsp[-3].minor.yy231.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy231.offset = yymsp[0].minor.yy325;} +{ yymsp[-3].minor.yy503.limit = yymsp[-2].minor.yy157; yymsp[-3].minor.yy503.offset = yymsp[0].minor.yy157;} break; case 230: /* limit_opt ::= LIMIT signed COMMA signed */ -{ yymsp[-3].minor.yy231.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy231.offset = yymsp[-2].minor.yy325;} +{ yymsp[-3].minor.yy503.limit = yymsp[0].minor.yy157; yymsp[-3].minor.yy503.offset = yymsp[-2].minor.yy157;} break; case 233: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ -{yymsp[-3].minor.yy231.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy231.offset = yymsp[0].minor.yy325;} +{yymsp[-3].minor.yy503.limit = yymsp[-2].minor.yy157; yymsp[-3].minor.yy503.offset = yymsp[0].minor.yy157;} break; case 234: /* slimit_opt ::= SLIMIT signed COMMA signed */ -{yymsp[-3].minor.yy231.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy231.offset = yymsp[-2].minor.yy325;} +{yymsp[-3].minor.yy503.limit = yymsp[0].minor.yy157; yymsp[-3].minor.yy503.offset = yymsp[-2].minor.yy157;} break; case 237: /* expr ::= LP expr RP */ -{yylhsminor.yy439 = yymsp[-1].minor.yy439; yylhsminor.yy439->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy439->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = yymsp[-1].minor.yy370; yylhsminor.yy370->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy370->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 238: /* expr ::= ID */ -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} - yymsp[0].minor.yy439 = yylhsminor.yy439; +{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} + yymsp[0].minor.yy370 = yylhsminor.yy370; break; case 239: /* expr ::= ID DOT ID */ -{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 240: /* expr ::= ID DOT STAR */ -{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 241: /* expr ::= INTEGER */ -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} - yymsp[0].minor.yy439 = yylhsminor.yy439; +{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} + yymsp[0].minor.yy370 = yylhsminor.yy370; break; case 242: /* expr ::= MINUS INTEGER */ case 243: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==243); -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);} - yymsp[-1].minor.yy439 = yylhsminor.yy439; +{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);} + yymsp[-1].minor.yy370 = yylhsminor.yy370; break; case 244: /* expr ::= FLOAT */ -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} - yymsp[0].minor.yy439 = yylhsminor.yy439; +{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} + yymsp[0].minor.yy370 = yylhsminor.yy370; break; case 245: /* expr ::= MINUS FLOAT */ case 246: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==246); -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);} - yymsp[-1].minor.yy439 = yylhsminor.yy439; +{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);} + yymsp[-1].minor.yy370 = yylhsminor.yy370; break; case 247: /* expr ::= STRING */ -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} - yymsp[0].minor.yy439 = yylhsminor.yy439; +{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} + yymsp[0].minor.yy370 = yylhsminor.yy370; break; case 248: /* expr ::= NOW */ -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } - yymsp[0].minor.yy439 = yylhsminor.yy439; +{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } + yymsp[0].minor.yy370 = yylhsminor.yy370; break; case 249: /* expr ::= VARIABLE */ -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} - yymsp[0].minor.yy439 = yylhsminor.yy439; +{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} + yymsp[0].minor.yy370 = yylhsminor.yy370; break; case 250: /* expr ::= PLUS VARIABLE */ case 251: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==251); -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);} - yymsp[-1].minor.yy439 = yylhsminor.yy439; +{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);} + yymsp[-1].minor.yy370 = yylhsminor.yy370; break; case 252: /* expr ::= BOOL */ -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} - yymsp[0].minor.yy439 = yylhsminor.yy439; +{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} + yymsp[0].minor.yy370 = yylhsminor.yy370; break; case 253: /* expr ::= NULL */ -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} - yymsp[0].minor.yy439 = yylhsminor.yy439; +{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} + yymsp[0].minor.yy370 = yylhsminor.yy370; break; case 254: /* expr ::= ID LP exprlist RP */ -{ tRecordFuncName(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy439 = tSqlExprCreateFunction(yymsp[-1].minor.yy421, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } - yymsp[-3].minor.yy439 = yylhsminor.yy439; +{ tRecordFuncName(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy370 = tSqlExprCreateFunction(yymsp[-1].minor.yy413, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } + yymsp[-3].minor.yy370 = yylhsminor.yy370; break; case 255: /* expr ::= ID LP STAR RP */ -{ tRecordFuncName(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy439 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } - yymsp[-3].minor.yy439 = yylhsminor.yy439; +{ tRecordFuncName(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy370 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } + yymsp[-3].minor.yy370 = yylhsminor.yy370; break; case 256: /* expr ::= expr IS NULL */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, NULL, TK_ISNULL);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, NULL, TK_ISNULL);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 257: /* expr ::= expr IS NOT NULL */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-3].minor.yy439, NULL, TK_NOTNULL);} - yymsp[-3].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-3].minor.yy370, NULL, TK_NOTNULL);} + yymsp[-3].minor.yy370 = yylhsminor.yy370; break; case 258: /* expr ::= expr LT expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LT);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_LT);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 259: /* expr ::= expr GT expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_GT);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_GT);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 260: /* expr ::= expr LE expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LE);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_LE);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 261: /* expr ::= expr GE expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_GE);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_GE);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 262: /* expr ::= expr NE expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_NE);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_NE);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 263: /* expr ::= expr EQ expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_EQ);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_EQ);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 264: /* expr ::= expr BETWEEN expr AND expr */ -{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy439); yylhsminor.yy439 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy439, yymsp[-2].minor.yy439, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy439, TK_LE), TK_AND);} - yymsp[-4].minor.yy439 = yylhsminor.yy439; +{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy370); yylhsminor.yy370 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy370, yymsp[-2].minor.yy370, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy370, TK_LE), TK_AND);} + yymsp[-4].minor.yy370 = yylhsminor.yy370; break; case 265: /* expr ::= expr AND expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_AND);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_AND);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 266: /* expr ::= expr OR expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_OR); } - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_OR); } + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 267: /* expr ::= expr PLUS expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_PLUS); } - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_PLUS); } + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 268: /* expr ::= expr MINUS expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_MINUS); } - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_MINUS); } + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 269: /* expr ::= expr STAR expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_STAR); } - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_STAR); } + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 270: /* expr ::= expr SLASH expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_DIVIDE);} - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_DIVIDE);} + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 271: /* expr ::= expr REM expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_REM); } - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_REM); } + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 272: /* expr ::= expr LIKE expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LIKE); } - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_LIKE); } + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 273: /* expr ::= expr MATCH expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_MATCH); } - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_MATCH); } + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 274: /* expr ::= expr NMATCH expr */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_NMATCH); } - yymsp[-2].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_NMATCH); } + yymsp[-2].minor.yy370 = yylhsminor.yy370; break; case 275: /* expr ::= expr IN LP exprlist RP */ -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-4].minor.yy439, (tSqlExpr*)yymsp[-1].minor.yy421, TK_IN); } - yymsp[-4].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = tSqlExprCreate(yymsp[-4].minor.yy370, (tSqlExpr*)yymsp[-1].minor.yy413, TK_IN); } + yymsp[-4].minor.yy370 = yylhsminor.yy370; break; case 276: /* exprlist ::= exprlist COMMA expritem */ -{yylhsminor.yy421 = tSqlExprListAppend(yymsp[-2].minor.yy421,yymsp[0].minor.yy439,0, 0);} - yymsp[-2].minor.yy421 = yylhsminor.yy421; +{yylhsminor.yy413 = tSqlExprListAppend(yymsp[-2].minor.yy413,yymsp[0].minor.yy370,0, 0);} + yymsp[-2].minor.yy413 = yylhsminor.yy413; break; case 277: /* exprlist ::= expritem */ -{yylhsminor.yy421 = tSqlExprListAppend(0,yymsp[0].minor.yy439,0, 0);} - yymsp[0].minor.yy421 = yylhsminor.yy421; +{yylhsminor.yy413 = tSqlExprListAppend(0,yymsp[0].minor.yy370,0, 0);} + yymsp[0].minor.yy413 = yylhsminor.yy413; break; case 278: /* expritem ::= expr */ -{yylhsminor.yy439 = yymsp[0].minor.yy439;} - yymsp[0].minor.yy439 = yylhsminor.yy439; +{yylhsminor.yy370 = yymsp[0].minor.yy370;} + yymsp[0].minor.yy370 = yylhsminor.yy370; break; case 280: /* cmd ::= RESET QUERY CACHE */ { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} @@ -3190,7 +3176,7 @@ static void yy_reduce( case 282: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy413, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; @@ -3206,14 +3192,14 @@ static void yy_reduce( case 284: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy413, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; case 285: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy413, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; @@ -3248,7 +3234,7 @@ static void yy_reduce( toTSDBType(yymsp[-2].minor.yy0.type); SArray* A = tListItemAppendToken(NULL, &yymsp[-2].minor.yy0, -1); - A = tListItemAppend(A, &yymsp[0].minor.yy69, -1); + A = tListItemAppend(A, &yymsp[0].minor.yy461, -1); SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); @@ -3257,14 +3243,14 @@ static void yy_reduce( case 289: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy413, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; case 290: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy413, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; @@ -3282,14 +3268,14 @@ static void yy_reduce( case 292: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy413, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; case 293: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy413, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; @@ -3324,7 +3310,7 @@ static void yy_reduce( toTSDBType(yymsp[-2].minor.yy0.type); SArray* A = tListItemAppendToken(NULL, &yymsp[-2].minor.yy0, -1); - A = tListItemAppend(A, &yymsp[0].minor.yy69, -1); + A = tListItemAppend(A, &yymsp[0].minor.yy461, -1); SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); @@ -3333,7 +3319,7 @@ static void yy_reduce( case 297: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy413, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; diff --git a/source/libs/parser/src/ttokenizer.c b/source/libs/parser/src/ttokenizer.c index 7800e53f1c..8e5b22aaa3 100644 --- a/source/libs/parser/src/ttokenizer.c +++ b/source/libs/parser/src/ttokenizer.c @@ -31,17 +31,17 @@ typedef struct SKeyword { static SKeyword keywordTable[] = { {"ID", TK_ID}, {"BOOL", TK_BOOL}, - {"TINYINT", TK_TINYINT}, - {"SMALLINT", TK_SMALLINT}, +// {"TINYINT", TK_TINYINT}, +// {"SMALLINT", TK_SMALLINT}, {"INTEGER", TK_INTEGER}, {"INT", TK_INTEGER}, - {"BIGINT", TK_BIGINT}, +// {"BIGINT", TK_BIGINT}, {"FLOAT", TK_FLOAT}, - {"DOUBLE", TK_DOUBLE}, +// {"DOUBLE", TK_DOUBLE}, {"STRING", TK_STRING}, {"TIMESTAMP", TK_TIMESTAMP}, - {"BINARY", TK_BINARY}, - {"NCHAR", TK_NCHAR}, +// {"BINARY", TK_BINARY}, +// {"NCHAR", TK_NCHAR}, {"OR", TK_OR}, {"AND", TK_AND}, {"NOT", TK_NOT}, -- GitLab