From a09cfdfa8bb35313851b90e65d609381adbd9465 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Wed, 8 Sep 2021 17:50:37 +0800 Subject: [PATCH] support nmatch relation between binary/nchar tbname/tag/col and posix regular expression --- src/client/src/tscSQLParser.c | 30 +- src/common/inc/texpr.h | 2 + src/common/src/texpr.c | 11 +- src/inc/taosdef.h | 1 + src/inc/ttokendef.h | 347 +-- src/query/inc/sql.y | 5 +- src/query/src/qFilter.c | 10 +- src/query/src/sql.c | 2982 +++++++++++++------------ src/tsdb/src/tsdbRead.c | 12 +- src/util/inc/tcompare.h | 2 + src/util/src/tcompare.c | 16 +- src/util/src/ttokenizer.c | 1 + tests/script/general/parser/regex.sim | 26 +- 13 files changed, 1768 insertions(+), 1677 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 87b6b07652..e9eee4ad49 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -281,6 +281,8 @@ static uint8_t convertRelationalOperator(SStrToken *pToken) { return TSDB_RELATION_LIKE; case TK_MATCH: return TSDB_RELATION_MATCH; + case TK_NMATCH: + return TSDB_RELATION_NMATCH; case TK_ISNULL: return TSDB_RELATION_ISNULL; case TK_NOTNULL: @@ -3782,6 +3784,9 @@ static int32_t doExtractColumnFilterInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, case TK_MATCH: pColumnFilter->lowerRelOptr = TSDB_RELATION_MATCH; break; + case TK_NMATCH: + pColumnFilter->lowerRelOptr = TSDB_RELATION_NMATCH; + break; case TK_ISNULL: pColumnFilter->lowerRelOptr = TSDB_RELATION_ISNULL; break; @@ -3846,15 +3851,17 @@ static int32_t tablenameListToString(tSqlExpr* pExpr, SStringBuilder* sb) { } static int32_t tablenameCondToString(tSqlExpr* pExpr, uint32_t opToken, SStringBuilder* sb) { - assert(opToken == TK_LIKE || opToken == TK_MATCH); + assert(opToken == TK_LIKE || opToken == TK_MATCH || opToken == TK_NMATCH); if (opToken == TK_LIKE) { taosStringBuilderAppendStringLen(sb, QUERY_COND_REL_PREFIX_LIKE, QUERY_COND_REL_PREFIX_LIKE_LEN); taosStringBuilderAppendString(sb, pExpr->value.pz); } else if (opToken == TK_MATCH) { taosStringBuilderAppendStringLen(sb, QUERY_COND_REL_PREFIX_MATCH, QUERY_COND_REL_PREFIX_MATCH_LEN); taosStringBuilderAppendString(sb, pExpr->value.pz); + } else if (opToken == TK_NMATCH) { + taosStringBuilderAppendStringLen(sb, QUERY_COND_REL_PREFIX_NMATCH, QUERY_COND_REL_PREFIX_NMATCH_LEN); + taosStringBuilderAppendString(sb, pExpr->value.pz); } - return TSDB_CODE_SUCCESS; } @@ -3903,12 +3910,13 @@ static int32_t checkColumnFilterInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SCol && pExpr->tokenId != TK_NOTNULL && pExpr->tokenId != TK_LIKE && pExpr->tokenId != TK_MATCH + && pExpr->tokenId != TK_NMATCH && pExpr->tokenId != TK_IN) { ret = invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2); goto _err_ret; } } else { - if (pExpr->tokenId == TK_LIKE || pExpr->tokenId == TK_MATCH) { + if (pExpr->tokenId == TK_LIKE || pExpr->tokenId == TK_MATCH || pExpr->tokenId == TK_NMATCH) { ret = invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); goto _err_ret; } @@ -3956,7 +3964,7 @@ static int32_t getTablenameCond(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSqlExpr* if (pTableCond->tokenId == TK_IN) { ret = tablenameListToString(pRight, sb); - } else if (pTableCond->tokenId == TK_LIKE || pTableCond->tokenId == TK_MATCH) { + } else if (pTableCond->tokenId == TK_LIKE || pTableCond->tokenId == TK_MATCH || pTableCond->tokenId == TK_NMATCH) { if (pRight->tokenId != TK_STRING) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -4410,7 +4418,7 @@ static bool validateJoinExprNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSqlExpr } static bool validTableNameOptr(tSqlExpr* pExpr) { - const char nameFilterOptr[] = {TK_IN, TK_LIKE, TK_MATCH}; + const char nameFilterOptr[] = {TK_IN, TK_LIKE, TK_MATCH, TK_NMATCH}; for (int32_t i = 0; i < tListLen(nameFilterOptr); ++i) { if (pExpr->tokenId == nameFilterOptr[i]) { @@ -4511,7 +4519,7 @@ static int32_t validateMatchExpr(tSqlExpr* pExpr, STableMeta* pTableMeta, int32_ tSqlExpr* pLeft = pExpr->pLeft; tSqlExpr* pRight = pExpr->pRight; - if (pExpr->tokenId == TK_MATCH) { + if (pExpr->tokenId == TK_MATCH || pExpr->tokenId == TK_NMATCH) { if (pRight->value.nLen > tsMaxRegexStringLen) { char tmp[64] = {0}; sprintf(tmp, msg1, tsMaxRegexStringLen); @@ -4925,9 +4933,12 @@ static int32_t setTableCondForSTableQuery(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, STagCond* pTagCond = &pQueryInfo->tagCond; pTagCond->tbnameCond.uid = pTableMetaInfo->pTableMeta->id.uid; - assert(pExpr->tokenId == TK_LIKE || pExpr->tokenId == TK_MATCH || pExpr->tokenId == TK_IN); + assert(pExpr->tokenId == TK_LIKE + || pExpr->tokenId == TK_MATCH + || pExpr->tokenId == TK_NMATCH + || pExpr->tokenId == TK_IN); - if (pExpr->tokenId == TK_LIKE || pExpr->tokenId == TK_MATCH) { + if (pExpr->tokenId == TK_LIKE || pExpr->tokenId == TK_MATCH || pExpr->tokenId == TK_NMATCH) { char* str = taosStringBuilderGetResult(sb, NULL); pQueryInfo->tagCond.tbnameCond.cond = strdup(str); pQueryInfo->tagCond.tbnameCond.len = (int32_t) strlen(str); @@ -8224,11 +8235,12 @@ static int32_t handleExprInHavingClause(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, S && pExpr->tokenId != TK_NOTNULL && pExpr->tokenId != TK_LIKE && pExpr->tokenId != TK_MATCH + && pExpr->tokenId != TK_NMATCH ) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2); } } else { - if (pExpr->tokenId == TK_LIKE || pExpr->tokenId == TK_MATCH) { + if (pExpr->tokenId == TK_LIKE || pExpr->tokenId == TK_MATCH || pExpr->tokenId == TK_NMATCH) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } diff --git a/src/common/inc/texpr.h b/src/common/inc/texpr.h index db71559df6..0ede2e1e6f 100644 --- a/src/common/inc/texpr.h +++ b/src/common/inc/texpr.h @@ -34,10 +34,12 @@ struct SSchema; #define QUERY_COND_REL_PREFIX_IN "IN|" #define QUERY_COND_REL_PREFIX_LIKE "LIKE|" #define QUERY_COND_REL_PREFIX_MATCH "MATCH|" +#define QUERY_COND_REL_PREFIX_NMATCH "NMATCH|" #define QUERY_COND_REL_PREFIX_IN_LEN 3 #define QUERY_COND_REL_PREFIX_LIKE_LEN 5 #define QUERY_COND_REL_PREFIX_MATCH_LEN 6 +#define QUERY_COND_REL_PREFIX_NMATCH_LEN 7 typedef bool (*__result_filter_fn_t)(const void *, void *); typedef void (*__do_filter_suppl_fn_t)(void *, void *); diff --git a/src/common/src/texpr.c b/src/common/src/texpr.c index 2c72b7bd59..6823de631f 100644 --- a/src/common/src/texpr.c +++ b/src/common/src/texpr.c @@ -440,7 +440,16 @@ tExprNode* exprTreeFromTableName(const char* tbnameCond) { memcpy(pVal->pz, tbnameCond + QUERY_COND_REL_PREFIX_MATCH_LEN, len); pVal->nType = TSDB_DATA_TYPE_BINARY; pVal->nLen = (int32_t)len; - + } else if (strncmp(tbnameCond, QUERY_COND_REL_PREFIX_NMATCH, QUERY_COND_REL_PREFIX_NMATCH_LEN) == 0) { + right->nodeType = TSQL_NODE_VALUE; + expr->_node.optr = TSDB_RELATION_NMATCH; + tVariant* pVal = exception_calloc(1, sizeof(tVariant)); + right->pVal = pVal; + size_t len = strlen(tbnameCond + QUERY_COND_REL_PREFIX_NMATCH_LEN) + 1; + pVal->pz = exception_malloc(len); + memcpy(pVal->pz, tbnameCond + QUERY_COND_REL_PREFIX_NMATCH_LEN, len); + pVal->nType = TSDB_DATA_TYPE_BINARY; + pVal->nLen = (int32_t)len; } else if (strncmp(tbnameCond, QUERY_COND_REL_PREFIX_IN, QUERY_COND_REL_PREFIX_IN_LEN) == 0) { right->nodeType = TSQL_NODE_VALUE; expr->_node.optr = TSDB_RELATION_IN; diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index b4d60aeba5..89de733ba1 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -165,6 +165,7 @@ do { \ #define TSDB_RELATION_NOT 13 #define TSDB_RELATION_MATCH 14 +#define TSDB_RELATION_NMATCH 15 #define TSDB_BINARY_OP_ADD 30 #define TSDB_BINARY_OP_SUBTRACT 31 diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index 501c7a4c69..9b0ad2cf13 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -38,179 +38,180 @@ #define TK_IS 20 #define TK_LIKE 21 #define TK_MATCH 22 -#define TK_GLOB 23 -#define TK_BETWEEN 24 -#define TK_IN 25 -#define TK_GT 26 -#define TK_GE 27 -#define TK_LT 28 -#define TK_LE 29 -#define TK_BITAND 30 -#define TK_BITOR 31 -#define TK_LSHIFT 32 -#define TK_RSHIFT 33 -#define TK_PLUS 34 -#define TK_MINUS 35 -#define TK_DIVIDE 36 -#define TK_TIMES 37 -#define TK_STAR 38 -#define TK_SLASH 39 -#define TK_REM 40 -#define TK_CONCAT 41 -#define TK_UMINUS 42 -#define TK_UPLUS 43 -#define TK_BITNOT 44 -#define TK_SHOW 45 -#define TK_DATABASES 46 -#define TK_TOPICS 47 -#define TK_FUNCTIONS 48 -#define TK_MNODES 49 -#define TK_DNODES 50 -#define TK_ACCOUNTS 51 -#define TK_USERS 52 -#define TK_MODULES 53 -#define TK_QUERIES 54 -#define TK_CONNECTIONS 55 -#define TK_STREAMS 56 -#define TK_VARIABLES 57 -#define TK_SCORES 58 -#define TK_GRANTS 59 -#define TK_VNODES 60 -#define TK_DOT 61 -#define TK_CREATE 62 -#define TK_TABLE 63 -#define TK_STABLE 64 -#define TK_DATABASE 65 -#define TK_TABLES 66 -#define TK_STABLES 67 -#define TK_VGROUPS 68 -#define TK_DROP 69 -#define TK_TOPIC 70 -#define TK_FUNCTION 71 -#define TK_DNODE 72 -#define TK_USER 73 -#define TK_ACCOUNT 74 -#define TK_USE 75 -#define TK_DESCRIBE 76 -#define TK_DESC 77 -#define TK_ALTER 78 -#define TK_PASS 79 -#define TK_PRIVILEGE 80 -#define TK_LOCAL 81 -#define TK_COMPACT 82 -#define TK_LP 83 -#define TK_RP 84 -#define TK_IF 85 -#define TK_EXISTS 86 -#define TK_AS 87 -#define TK_OUTPUTTYPE 88 -#define TK_AGGREGATE 89 -#define TK_BUFSIZE 90 -#define TK_PPS 91 -#define TK_TSERIES 92 -#define TK_DBS 93 -#define TK_STORAGE 94 -#define TK_QTIME 95 -#define TK_CONNS 96 -#define TK_STATE 97 -#define TK_COMMA 98 -#define TK_KEEP 99 -#define TK_CACHE 100 -#define TK_REPLICA 101 -#define TK_QUORUM 102 -#define TK_DAYS 103 -#define TK_MINROWS 104 -#define TK_MAXROWS 105 -#define TK_BLOCKS 106 -#define TK_CTIME 107 -#define TK_WAL 108 -#define TK_FSYNC 109 -#define TK_COMP 110 -#define TK_PRECISION 111 -#define TK_UPDATE 112 -#define TK_CACHELAST 113 -#define TK_PARTITIONS 114 -#define TK_UNSIGNED 115 -#define TK_TAGS 116 -#define TK_USING 117 -#define TK_NULL 118 -#define TK_NOW 119 -#define TK_SELECT 120 -#define TK_UNION 121 -#define TK_ALL 122 -#define TK_DISTINCT 123 -#define TK_FROM 124 -#define TK_VARIABLE 125 -#define TK_INTERVAL 126 -#define TK_EVERY 127 -#define TK_SESSION 128 -#define TK_STATE_WINDOW 129 -#define TK_FILL 130 -#define TK_SLIDING 131 -#define TK_ORDER 132 -#define TK_BY 133 -#define TK_ASC 134 -#define TK_GROUP 135 -#define TK_HAVING 136 -#define TK_LIMIT 137 -#define TK_OFFSET 138 -#define TK_SLIMIT 139 -#define TK_SOFFSET 140 -#define TK_WHERE 141 -#define TK_RESET 142 -#define TK_QUERY 143 -#define TK_SYNCDB 144 -#define TK_ADD 145 -#define TK_COLUMN 146 -#define TK_MODIFY 147 -#define TK_TAG 148 -#define TK_CHANGE 149 -#define TK_SET 150 -#define TK_KILL 151 -#define TK_CONNECTION 152 -#define TK_STREAM 153 -#define TK_COLON 154 -#define TK_ABORT 155 -#define TK_AFTER 156 -#define TK_ATTACH 157 -#define TK_BEFORE 158 -#define TK_BEGIN 159 -#define TK_CASCADE 160 -#define TK_CLUSTER 161 -#define TK_CONFLICT 162 -#define TK_COPY 163 -#define TK_DEFERRED 164 -#define TK_DELIMITERS 165 -#define TK_DETACH 166 -#define TK_EACH 167 -#define TK_END 168 -#define TK_EXPLAIN 169 -#define TK_FAIL 170 -#define TK_FOR 171 -#define TK_IGNORE 172 -#define TK_IMMEDIATE 173 -#define TK_INITIALLY 174 -#define TK_INSTEAD 175 -#define TK_KEY 176 -#define TK_OF 177 -#define TK_RAISE 178 -#define TK_REPLACE 179 -#define TK_RESTRICT 180 -#define TK_ROW 181 -#define TK_STATEMENT 182 -#define TK_TRIGGER 183 -#define TK_VIEW 184 -#define TK_IPTOKEN 185 -#define TK_SEMI 186 -#define TK_NONE 187 -#define TK_PREV 188 -#define TK_LINEAR 189 -#define TK_IMPORT 190 -#define TK_TBNAME 191 -#define TK_JOIN 192 -#define TK_INSERT 193 -#define TK_INTO 194 -#define TK_VALUES 195 +#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_SPACE 300 diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index d72bcacddc..336e8620f2 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -11,7 +11,7 @@ %left OR. %left AND. %right NOT. -%left EQ NE ISNULL NOTNULL IS LIKE MATCH GLOB BETWEEN IN. +%left EQ NE ISNULL NOTNULL IS LIKE MATCH NMATCH GLOB BETWEEN IN. %left GT GE LT LE. %left BITAND BITOR LSHIFT RSHIFT. %left PLUS MINUS. @@ -753,6 +753,7 @@ expr(A) ::= expr(X) LIKE expr(Y). {A = tSqlExprCreate(X, Y, TK_LIKE); } // match expression expr(A) ::= expr(X) MATCH expr(Y). {A = tSqlExprCreate(X, Y, TK_MATCH); } +expr(A) ::= expr(X) NMATCH expr(Y). {A = tSqlExprCreate(X, Y, TK_NMATCH); } //in expression expr(A) ::= expr(X) IN LP exprlist(Y) RP. {A = tSqlExprCreate(X, (tSqlExpr*)Y, TK_IN); } @@ -919,5 +920,5 @@ cmd ::= KILL QUERY INTEGER(X) COLON(Z) INTEGER(Y). {X.n += (Z.n + Y.n); s %fallback ID ABORT AFTER ASC ATTACH BEFORE BEGIN CASCADE CLUSTER CONFLICT COPY DATABASE DEFERRED DELIMITERS DESC DETACH EACH END EXPLAIN FAIL FOR GLOB IGNORE IMMEDIATE INITIALLY INSTEAD - LIKE MATCH KEY OF OFFSET RAISE REPLACE RESTRICT ROW STATEMENT TRIGGER VIEW ALL + LIKE MATCH NMATCH KEY OF OFFSET RAISE REPLACE RESTRICT ROW STATEMENT TRIGGER VIEW ALL NOW IPTOKEN SEMI NONE PREV LINEAR IMPORT TBNAME JOIN STABLE NULL INSERT INTO VALUES. diff --git a/src/query/src/qFilter.c b/src/query/src/qFilter.c index a6988d7adc..5e8ff126d1 100644 --- a/src/query/src/qFilter.c +++ b/src/query/src/qFilter.c @@ -29,6 +29,7 @@ OptrStr gOptrStr[] = { {TSDB_RELATION_NOT_EQUAL, "!="}, {TSDB_RELATION_LIKE, "like"}, {TSDB_RELATION_MATCH, "match"}, + {TSDB_RELATION_MATCH, "nmatch"}, {TSDB_RELATION_ISNULL, "is null"}, {TSDB_RELATION_NOTNULL, "not null"}, {TSDB_RELATION_IN, "in"}, @@ -157,7 +158,7 @@ int8_t filterGetRangeCompFuncFromOptrs(uint8_t optr, uint8_t optr2) { __compar_fn_t gDataCompare[] = {compareInt32Val, compareInt8Val, compareInt16Val, compareInt64Val, compareFloatVal, compareDoubleVal, compareLenPrefixedStr, compareStrPatternComp, compareFindItemInSet, compareWStrPatternComp, compareLenPrefixedWStr, compareUint8Val, compareUint16Val, compareUint32Val, compareUint64Val, - setCompareBytes1, setCompareBytes2, setCompareBytes4, setCompareBytes8, compareStrRegexComp, + setCompareBytes1, setCompareBytes2, setCompareBytes4, setCompareBytes8, compareStrRegexCompMatch, compareStrRegexCompNMatch }; int8_t filterGetCompFuncIdx(int32_t type, int32_t optr) { @@ -198,6 +199,8 @@ int8_t filterGetCompFuncIdx(int32_t type, int32_t optr) { case TSDB_DATA_TYPE_BINARY: { if (optr == TSDB_RELATION_MATCH) { comparFn = 19; + } else if (optr == TSDB_RELATION_NMATCH) { + comparFn = 20; } else if (optr == TSDB_RELATION_LIKE) { /* wildcard query using like operator */ comparFn = 7; } else if (optr == TSDB_RELATION_IN) { @@ -212,6 +215,8 @@ int8_t filterGetCompFuncIdx(int32_t type, int32_t optr) { case TSDB_DATA_TYPE_NCHAR: { if (optr == TSDB_RELATION_MATCH) { comparFn = 19; + } else if (optr == TSDB_RELATION_NMATCH) { + comparFn = 20; } else if (optr == TSDB_RELATION_LIKE) { comparFn = 9; } else if (optr == TSDB_RELATION_IN) { @@ -1879,6 +1884,9 @@ bool filterDoCompare(__compar_fn_t func, uint8_t optr, void *left, void *right) case TSDB_RELATION_MATCH: { return ret == 0; } + case TSDB_RELATION_NMATCH: { + return ret == 0; + } case TSDB_RELATION_IN: { return ret == 1; } diff --git a/src/query/src/sql.c b/src/query/src/sql.c index f66c2968a6..e89b6232f7 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -102,29 +102,29 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 277 +#define YYNOCODE 278 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SStrToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SCreateTableSql* yy56; - int yy70; - SCreatedTableInfo yy84; - SRelationInfo* yy114; - int32_t yy202; - SIntervalVal yy222; - SSqlNode* yy224; - SCreateDbInfo yy246; - tSqlExpr* yy260; - TAOS_FIELD yy363; - SSessionWindowVal yy365; - SCreateAcctInfo yy377; - int64_t yy387; - SArray* yy403; - SLimitVal yy404; - tVariant yy488; - SWindowStateVal yy544; + SRelationInfo* yy8; + SWindowStateVal yy40; + SSqlNode* yy56; + SCreateDbInfo yy90; + int yy96; + int32_t yy104; + SSessionWindowVal yy147; + SCreatedTableInfo yy152; + SLimitVal yy166; + SCreateAcctInfo yy171; + TAOS_FIELD yy183; + int64_t yy325; + SIntervalVal yy400; + SArray* yy421; + tVariant yy430; + SCreateTableSql* yy438; + tSqlExpr* yy439; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -140,18 +140,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 366 -#define YYNRULE 293 -#define YYNRULE_WITH_ACTION 293 -#define YYNTOKEN 196 -#define YY_MAX_SHIFT 365 -#define YY_MIN_SHIFTREDUCE 574 -#define YY_MAX_SHIFTREDUCE 866 -#define YY_ERROR_ACTION 867 -#define YY_ACCEPT_ACTION 868 -#define YY_NO_ACTION 869 -#define YY_MIN_REDUCE 870 -#define YY_MAX_REDUCE 1162 +#define YYNSTATE 368 +#define YYNRULE 294 +#define YYNRULE_WITH_ACTION 294 +#define YYNTOKEN 197 +#define YY_MAX_SHIFT 367 +#define YY_MIN_SHIFTREDUCE 576 +#define YY_MAX_SHIFTREDUCE 869 +#define YY_ERROR_ACTION 870 +#define YY_ACCEPT_ACTION 871 +#define YY_NO_ACTION 872 +#define YY_MIN_REDUCE 873 +#define YY_MAX_REDUCE 1166 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -218,291 +218,292 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (766) +#define YY_ACTTAB_COUNT (773) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1020, 626, 239, 626, 364, 233, 1026, 1039, 210, 627, - /* 10 */ 662, 627, 38, 58, 59, 38, 62, 63, 1048, 1138, - /* 20 */ 253, 52, 51, 236, 61, 322, 66, 64, 67, 65, - /* 30 */ 1039, 810, 245, 813, 57, 56, 1026, 23, 55, 54, - /* 40 */ 53, 58, 59, 626, 62, 63, 237, 246, 253, 52, - /* 50 */ 51, 627, 61, 322, 66, 64, 67, 65, 868, 365, - /* 60 */ 235, 1022, 57, 56, 1023, 250, 55, 54, 53, 988, - /* 70 */ 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, - /* 80 */ 986, 987, 989, 990, 156, 29, 1045, 81, 575, 576, - /* 90 */ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, - /* 100 */ 587, 588, 154, 163, 234, 172, 58, 59, 1039, 62, - /* 110 */ 63, 1012, 804, 253, 52, 51, 72, 61, 322, 66, - /* 120 */ 64, 67, 65, 284, 275, 210, 352, 57, 56, 262, - /* 130 */ 163, 55, 54, 53, 58, 60, 1139, 62, 63, 75, - /* 140 */ 177, 253, 52, 51, 626, 61, 322, 66, 64, 67, - /* 150 */ 65, 817, 627, 282, 281, 57, 56, 267, 73, 55, - /* 160 */ 54, 53, 59, 163, 62, 63, 271, 270, 253, 52, - /* 170 */ 51, 320, 61, 322, 66, 64, 67, 65, 1087, 76, - /* 180 */ 294, 247, 57, 56, 207, 1026, 55, 54, 53, 62, - /* 190 */ 63, 38, 249, 253, 52, 51, 320, 61, 322, 66, - /* 200 */ 64, 67, 65, 296, 710, 92, 87, 57, 56, 769, - /* 210 */ 770, 55, 54, 53, 44, 318, 359, 358, 317, 316, - /* 220 */ 315, 357, 314, 313, 312, 356, 311, 355, 354, 24, - /* 230 */ 163, 252, 819, 342, 341, 808, 243, 811, 1086, 814, - /* 240 */ 1023, 252, 819, 45, 208, 808, 213, 811, 254, 814, - /* 250 */ 57, 56, 210, 220, 55, 54, 53, 96, 262, 138, - /* 260 */ 137, 136, 219, 1139, 231, 232, 327, 87, 323, 178, - /* 270 */ 99, 5, 41, 181, 231, 232, 360, 957, 180, 105, - /* 280 */ 110, 101, 109, 363, 362, 147, 66, 64, 67, 65, - /* 290 */ 1009, 1010, 35, 1013, 57, 56, 919, 307, 55, 54, - /* 300 */ 53, 256, 929, 191, 45, 93, 1014, 734, 210, 191, - /* 310 */ 731, 38, 732, 68, 733, 261, 262, 214, 44, 1139, - /* 320 */ 359, 358, 124, 68, 215, 357, 274, 1024, 79, 356, - /* 330 */ 1134, 355, 354, 1133, 352, 227, 122, 116, 127, 258, - /* 340 */ 259, 750, 809, 126, 812, 132, 135, 125, 820, 815, - /* 350 */ 920, 1025, 38, 38, 129, 816, 244, 191, 820, 815, - /* 360 */ 1023, 201, 199, 197, 38, 816, 80, 38, 196, 142, - /* 370 */ 141, 140, 139, 996, 14, 994, 995, 257, 95, 255, - /* 380 */ 997, 330, 329, 786, 998, 38, 999, 1000, 38, 324, - /* 390 */ 38, 263, 84, 260, 85, 337, 336, 331, 332, 38, - /* 400 */ 1011, 1023, 1023, 55, 54, 53, 94, 1132, 98, 333, - /* 410 */ 1, 179, 334, 1023, 3, 192, 1023, 153, 151, 150, - /* 420 */ 82, 747, 276, 735, 736, 34, 754, 766, 776, 278, - /* 430 */ 338, 278, 777, 339, 1023, 340, 39, 1023, 806, 1023, - /* 440 */ 785, 158, 69, 720, 344, 299, 26, 9, 1023, 251, - /* 450 */ 722, 301, 721, 841, 821, 625, 78, 39, 302, 39, - /* 460 */ 229, 16, 818, 15, 69, 97, 69, 25, 25, 25, - /* 470 */ 115, 6, 114, 1158, 18, 807, 17, 739, 737, 740, - /* 480 */ 738, 20, 121, 19, 120, 22, 230, 21, 709, 134, - /* 490 */ 133, 211, 823, 212, 216, 1150, 209, 1097, 217, 218, - /* 500 */ 222, 223, 224, 221, 206, 1096, 241, 1093, 1092, 242, - /* 510 */ 343, 272, 155, 48, 1047, 1058, 1055, 1056, 1060, 157, - /* 520 */ 1040, 279, 1079, 162, 290, 1078, 173, 1021, 174, 1019, - /* 530 */ 175, 176, 934, 283, 238, 152, 167, 165, 304, 305, - /* 540 */ 765, 1037, 164, 306, 309, 310, 285, 46, 204, 42, - /* 550 */ 321, 928, 287, 328, 1157, 112, 1156, 77, 1153, 297, - /* 560 */ 182, 335, 1149, 74, 50, 166, 295, 168, 293, 291, - /* 570 */ 118, 289, 286, 1148, 1145, 183, 954, 43, 40, 47, - /* 580 */ 205, 916, 128, 914, 130, 131, 49, 912, 911, 264, - /* 590 */ 194, 195, 908, 907, 906, 905, 904, 903, 902, 198, - /* 600 */ 200, 899, 897, 895, 893, 202, 890, 203, 308, 886, - /* 610 */ 353, 123, 277, 83, 88, 345, 288, 1080, 346, 347, - /* 620 */ 348, 349, 228, 350, 351, 248, 303, 361, 866, 265, - /* 630 */ 266, 865, 269, 225, 226, 268, 864, 847, 846, 933, - /* 640 */ 932, 106, 107, 273, 278, 10, 298, 742, 280, 86, - /* 650 */ 30, 910, 909, 89, 767, 143, 159, 144, 955, 186, - /* 660 */ 184, 185, 188, 187, 189, 190, 901, 2, 145, 992, - /* 670 */ 900, 892, 171, 169, 33, 170, 956, 146, 891, 4, - /* 680 */ 778, 160, 161, 772, 90, 240, 774, 1002, 91, 292, - /* 690 */ 31, 11, 32, 12, 13, 27, 300, 28, 98, 100, - /* 700 */ 103, 36, 102, 640, 37, 104, 675, 673, 672, 671, - /* 710 */ 669, 668, 667, 664, 630, 319, 108, 7, 824, 822, - /* 720 */ 325, 8, 326, 111, 113, 70, 71, 117, 39, 712, - /* 730 */ 119, 711, 708, 656, 654, 646, 652, 648, 650, 644, - /* 740 */ 642, 678, 677, 676, 674, 670, 666, 665, 193, 628, - /* 750 */ 592, 870, 869, 869, 869, 869, 869, 869, 869, 869, - /* 760 */ 869, 869, 869, 869, 148, 149, + /* 0 */ 23, 628, 366, 235, 1051, 208, 241, 712, 211, 629, + /* 10 */ 1029, 871, 367, 59, 60, 173, 63, 64, 1042, 1142, + /* 20 */ 255, 53, 52, 51, 628, 62, 324, 67, 65, 68, + /* 30 */ 66, 157, 629, 286, 238, 58, 57, 344, 343, 56, + /* 40 */ 55, 54, 59, 60, 247, 63, 64, 252, 1029, 255, + /* 50 */ 53, 52, 51, 209, 62, 324, 67, 65, 68, 66, + /* 60 */ 999, 1042, 997, 998, 58, 57, 664, 1000, 56, 55, + /* 70 */ 54, 1001, 1048, 1002, 1003, 58, 57, 277, 1015, 56, + /* 80 */ 55, 54, 59, 60, 164, 63, 64, 38, 82, 255, + /* 90 */ 53, 52, 51, 88, 62, 324, 67, 65, 68, 66, + /* 100 */ 284, 283, 249, 752, 58, 57, 1029, 211, 56, 55, + /* 110 */ 54, 38, 59, 61, 806, 63, 64, 1042, 1143, 255, + /* 120 */ 53, 52, 51, 628, 62, 324, 67, 65, 68, 66, + /* 130 */ 45, 629, 237, 239, 58, 57, 1026, 164, 56, 55, + /* 140 */ 54, 60, 1023, 63, 64, 771, 772, 255, 53, 52, + /* 150 */ 51, 95, 62, 324, 67, 65, 68, 66, 38, 1090, + /* 160 */ 1025, 296, 58, 57, 322, 83, 56, 55, 54, 577, + /* 170 */ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, + /* 180 */ 588, 589, 590, 155, 322, 236, 63, 64, 756, 248, + /* 190 */ 255, 53, 52, 51, 628, 62, 324, 67, 65, 68, + /* 200 */ 66, 251, 629, 245, 354, 58, 57, 1026, 215, 56, + /* 210 */ 55, 54, 1089, 44, 320, 361, 360, 319, 318, 317, + /* 220 */ 359, 316, 315, 314, 358, 313, 357, 356, 808, 38, + /* 230 */ 1, 180, 24, 991, 979, 980, 981, 982, 983, 984, + /* 240 */ 985, 986, 987, 988, 989, 990, 992, 993, 256, 214, + /* 250 */ 38, 254, 821, 922, 100, 810, 222, 813, 164, 816, + /* 260 */ 192, 211, 139, 138, 137, 221, 809, 254, 821, 329, + /* 270 */ 88, 810, 1143, 813, 246, 816, 1028, 29, 1026, 67, + /* 280 */ 65, 68, 66, 38, 1162, 233, 234, 58, 57, 325, + /* 290 */ 1017, 56, 55, 54, 38, 333, 56, 55, 54, 1026, + /* 300 */ 269, 233, 234, 258, 5, 41, 182, 45, 211, 273, + /* 310 */ 272, 181, 106, 111, 102, 110, 164, 73, 736, 1143, + /* 320 */ 932, 733, 812, 734, 815, 735, 263, 192, 334, 276, + /* 330 */ 309, 80, 1026, 94, 69, 123, 117, 128, 229, 335, + /* 340 */ 362, 960, 127, 1026, 133, 136, 126, 202, 200, 198, + /* 350 */ 69, 260, 261, 130, 197, 143, 142, 141, 140, 74, + /* 360 */ 44, 97, 361, 360, 788, 923, 38, 359, 38, 822, + /* 370 */ 817, 358, 192, 357, 356, 38, 818, 38, 38, 259, + /* 380 */ 811, 257, 814, 332, 331, 822, 817, 264, 125, 298, + /* 390 */ 264, 93, 818, 326, 1012, 1013, 35, 1016, 178, 14, + /* 400 */ 354, 179, 265, 96, 262, 264, 339, 338, 154, 152, + /* 410 */ 151, 336, 749, 340, 81, 1026, 1027, 1026, 3, 193, + /* 420 */ 341, 787, 342, 346, 1026, 278, 1026, 1026, 365, 364, + /* 430 */ 148, 85, 86, 99, 76, 737, 738, 768, 9, 39, + /* 440 */ 778, 779, 722, 819, 301, 724, 216, 303, 1014, 723, + /* 450 */ 34, 159, 844, 823, 70, 26, 39, 253, 39, 70, + /* 460 */ 79, 98, 627, 70, 135, 134, 25, 25, 280, 280, + /* 470 */ 16, 116, 15, 115, 77, 18, 25, 17, 741, 6, + /* 480 */ 742, 274, 739, 304, 740, 20, 122, 19, 121, 22, + /* 490 */ 217, 21, 711, 1100, 1137, 1136, 1135, 825, 231, 156, + /* 500 */ 232, 820, 212, 213, 218, 210, 1099, 219, 220, 224, + /* 510 */ 225, 226, 223, 207, 1154, 243, 1096, 1095, 244, 345, + /* 520 */ 1050, 1061, 1043, 48, 1058, 1059, 1063, 153, 281, 158, + /* 530 */ 163, 292, 1024, 175, 1082, 174, 1081, 279, 84, 285, + /* 540 */ 1022, 310, 176, 240, 177, 171, 167, 937, 306, 307, + /* 550 */ 308, 767, 311, 312, 1040, 165, 166, 46, 287, 289, + /* 560 */ 297, 299, 205, 168, 42, 78, 75, 50, 323, 931, + /* 570 */ 330, 1161, 113, 1160, 295, 169, 293, 291, 1157, 183, + /* 580 */ 337, 1153, 119, 288, 1152, 1149, 184, 957, 43, 40, + /* 590 */ 47, 206, 919, 129, 49, 917, 131, 132, 915, 914, + /* 600 */ 266, 195, 196, 911, 910, 909, 908, 907, 906, 905, + /* 610 */ 199, 201, 902, 900, 898, 896, 203, 893, 204, 889, + /* 620 */ 355, 124, 89, 290, 1083, 347, 348, 349, 350, 351, + /* 630 */ 352, 353, 363, 869, 230, 250, 305, 267, 268, 868, + /* 640 */ 270, 227, 228, 271, 867, 850, 107, 936, 935, 108, + /* 650 */ 849, 275, 280, 300, 10, 282, 744, 87, 30, 90, + /* 660 */ 913, 912, 904, 186, 958, 190, 185, 187, 144, 191, + /* 670 */ 189, 188, 145, 146, 147, 903, 995, 895, 4, 894, + /* 680 */ 959, 769, 160, 33, 780, 170, 172, 2, 161, 162, + /* 690 */ 774, 91, 242, 776, 92, 1005, 294, 11, 12, 31, + /* 700 */ 32, 13, 27, 302, 28, 99, 101, 104, 36, 103, + /* 710 */ 642, 37, 105, 677, 675, 674, 673, 671, 670, 669, + /* 720 */ 666, 321, 109, 632, 7, 826, 824, 8, 327, 328, + /* 730 */ 112, 114, 71, 72, 118, 714, 39, 120, 713, 710, + /* 740 */ 658, 656, 648, 654, 650, 652, 646, 644, 680, 679, + /* 750 */ 678, 676, 672, 668, 667, 194, 630, 594, 873, 872, + /* 760 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, + /* 770 */ 872, 149, 150, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 198, 1, 244, 1, 198, 199, 248, 246, 265, 9, - /* 10 */ 5, 9, 198, 13, 14, 198, 16, 17, 198, 276, - /* 20 */ 20, 21, 22, 262, 24, 25, 26, 27, 28, 29, - /* 30 */ 246, 5, 244, 7, 34, 35, 248, 265, 38, 39, - /* 40 */ 40, 13, 14, 1, 16, 17, 262, 245, 20, 21, - /* 50 */ 22, 9, 24, 25, 26, 27, 28, 29, 196, 197, - /* 60 */ 243, 247, 34, 35, 247, 205, 38, 39, 40, 222, - /* 70 */ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - /* 80 */ 233, 234, 235, 236, 198, 83, 266, 87, 46, 47, - /* 90 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - /* 100 */ 58, 59, 60, 198, 62, 252, 13, 14, 246, 16, - /* 110 */ 17, 0, 84, 20, 21, 22, 98, 24, 25, 26, - /* 120 */ 27, 28, 29, 270, 262, 265, 91, 34, 35, 198, - /* 130 */ 198, 38, 39, 40, 13, 14, 276, 16, 17, 98, - /* 140 */ 209, 20, 21, 22, 1, 24, 25, 26, 27, 28, - /* 150 */ 29, 125, 9, 267, 268, 34, 35, 143, 140, 38, - /* 160 */ 39, 40, 14, 198, 16, 17, 152, 153, 20, 21, - /* 170 */ 22, 85, 24, 25, 26, 27, 28, 29, 273, 138, - /* 180 */ 275, 244, 34, 35, 265, 248, 38, 39, 40, 16, - /* 190 */ 17, 198, 205, 20, 21, 22, 85, 24, 25, 26, - /* 200 */ 27, 28, 29, 271, 5, 273, 83, 34, 35, 126, - /* 210 */ 127, 38, 39, 40, 99, 100, 101, 102, 103, 104, - /* 220 */ 105, 106, 107, 108, 109, 110, 111, 112, 113, 45, - /* 230 */ 198, 1, 2, 34, 35, 5, 243, 7, 273, 9, - /* 240 */ 247, 1, 2, 120, 265, 5, 62, 7, 205, 9, - /* 250 */ 34, 35, 265, 69, 38, 39, 40, 206, 198, 75, - /* 260 */ 76, 77, 78, 276, 34, 35, 82, 83, 38, 209, - /* 270 */ 206, 63, 64, 65, 34, 35, 220, 221, 70, 71, - /* 280 */ 72, 73, 74, 66, 67, 68, 26, 27, 28, 29, - /* 290 */ 239, 240, 241, 242, 34, 35, 204, 89, 38, 39, - /* 300 */ 40, 69, 204, 211, 120, 273, 242, 2, 265, 211, - /* 310 */ 5, 198, 7, 83, 9, 69, 198, 265, 99, 276, - /* 320 */ 101, 102, 79, 83, 265, 106, 142, 209, 144, 110, - /* 330 */ 265, 112, 113, 265, 91, 151, 63, 64, 65, 34, - /* 340 */ 35, 38, 5, 70, 7, 72, 73, 74, 118, 119, - /* 350 */ 204, 248, 198, 198, 81, 125, 243, 211, 118, 119, - /* 360 */ 247, 63, 64, 65, 198, 125, 206, 198, 70, 71, - /* 370 */ 72, 73, 74, 222, 83, 224, 225, 145, 87, 147, - /* 380 */ 229, 149, 150, 77, 233, 198, 235, 236, 198, 15, - /* 390 */ 198, 145, 84, 147, 84, 149, 150, 243, 243, 198, - /* 400 */ 240, 247, 247, 38, 39, 40, 249, 265, 117, 243, - /* 410 */ 207, 208, 243, 247, 202, 203, 247, 63, 64, 65, - /* 420 */ 263, 98, 84, 118, 119, 83, 123, 84, 84, 121, - /* 430 */ 243, 121, 84, 243, 247, 243, 98, 247, 1, 247, - /* 440 */ 134, 98, 98, 84, 243, 84, 98, 124, 247, 61, - /* 450 */ 84, 84, 84, 84, 84, 84, 83, 98, 116, 98, - /* 460 */ 265, 146, 125, 148, 98, 98, 98, 98, 98, 98, - /* 470 */ 146, 83, 148, 248, 146, 38, 148, 5, 5, 7, - /* 480 */ 7, 146, 146, 148, 148, 146, 265, 148, 115, 79, - /* 490 */ 80, 265, 118, 265, 265, 248, 265, 238, 265, 265, - /* 500 */ 265, 265, 265, 265, 265, 238, 238, 238, 238, 238, - /* 510 */ 238, 198, 198, 264, 198, 198, 198, 198, 198, 198, - /* 520 */ 246, 246, 274, 198, 198, 274, 250, 246, 198, 198, - /* 530 */ 198, 198, 198, 269, 269, 61, 257, 259, 198, 198, - /* 540 */ 125, 261, 260, 198, 198, 198, 269, 198, 198, 198, - /* 550 */ 198, 198, 269, 198, 198, 198, 198, 137, 198, 132, - /* 560 */ 198, 198, 198, 139, 136, 258, 135, 256, 130, 129, - /* 570 */ 198, 128, 131, 198, 198, 198, 198, 198, 198, 198, - /* 580 */ 198, 198, 198, 198, 198, 198, 141, 198, 198, 198, - /* 590 */ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - /* 600 */ 198, 198, 198, 198, 198, 198, 198, 198, 90, 198, - /* 610 */ 114, 97, 200, 200, 200, 96, 200, 200, 52, 93, - /* 620 */ 95, 56, 200, 94, 92, 200, 200, 85, 5, 154, - /* 630 */ 5, 5, 5, 200, 200, 154, 5, 101, 100, 210, - /* 640 */ 210, 206, 206, 143, 121, 83, 116, 84, 98, 122, - /* 650 */ 83, 200, 200, 98, 84, 201, 83, 201, 219, 213, - /* 660 */ 218, 217, 214, 216, 215, 212, 200, 207, 201, 237, - /* 670 */ 200, 200, 253, 255, 251, 254, 221, 201, 200, 202, - /* 680 */ 84, 83, 98, 84, 83, 1, 84, 237, 83, 83, - /* 690 */ 98, 133, 98, 133, 83, 83, 116, 83, 117, 79, - /* 700 */ 71, 88, 87, 5, 88, 87, 9, 5, 5, 5, - /* 710 */ 5, 5, 5, 5, 86, 15, 79, 83, 118, 84, - /* 720 */ 25, 83, 60, 148, 148, 16, 16, 148, 98, 5, - /* 730 */ 148, 5, 84, 5, 5, 5, 5, 5, 5, 5, - /* 740 */ 5, 5, 5, 5, 5, 5, 5, 5, 98, 86, - /* 750 */ 61, 0, 277, 277, 277, 277, 277, 277, 277, 277, - /* 760 */ 277, 277, 277, 277, 21, 21, 277, 277, 277, 277, - /* 770 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 780 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 790 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 800 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 810 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 820 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 830 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 840 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 850 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 860 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 870 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 880 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 890 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 900 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 910 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 920 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 930 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 940 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 950 */ 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - /* 960 */ 277, 277, + /* 0 */ 266, 1, 199, 200, 199, 266, 245, 5, 266, 9, + /* 10 */ 249, 197, 198, 13, 14, 253, 16, 17, 247, 277, + /* 20 */ 20, 21, 22, 23, 1, 25, 26, 27, 28, 29, + /* 30 */ 30, 199, 9, 271, 263, 35, 36, 35, 36, 39, + /* 40 */ 40, 41, 13, 14, 245, 16, 17, 206, 249, 20, + /* 50 */ 21, 22, 23, 266, 25, 26, 27, 28, 29, 30, + /* 60 */ 223, 247, 225, 226, 35, 36, 5, 230, 39, 40, + /* 70 */ 41, 234, 267, 236, 237, 35, 36, 263, 0, 39, + /* 80 */ 40, 41, 13, 14, 199, 16, 17, 199, 88, 20, + /* 90 */ 21, 22, 23, 84, 25, 26, 27, 28, 29, 30, + /* 100 */ 268, 269, 245, 39, 35, 36, 249, 266, 39, 40, + /* 110 */ 41, 199, 13, 14, 85, 16, 17, 247, 277, 20, + /* 120 */ 21, 22, 23, 1, 25, 26, 27, 28, 29, 30, + /* 130 */ 121, 9, 244, 263, 35, 36, 248, 199, 39, 40, + /* 140 */ 41, 14, 199, 16, 17, 127, 128, 20, 21, 22, + /* 150 */ 23, 250, 25, 26, 27, 28, 29, 30, 199, 274, + /* 160 */ 248, 276, 35, 36, 86, 264, 39, 40, 41, 47, + /* 170 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + /* 180 */ 58, 59, 60, 61, 86, 63, 16, 17, 124, 246, + /* 190 */ 20, 21, 22, 23, 1, 25, 26, 27, 28, 29, + /* 200 */ 30, 206, 9, 244, 92, 35, 36, 248, 266, 39, + /* 210 */ 40, 41, 274, 100, 101, 102, 103, 104, 105, 106, + /* 220 */ 107, 108, 109, 110, 111, 112, 113, 114, 1, 199, + /* 230 */ 208, 209, 46, 223, 224, 225, 226, 227, 228, 229, + /* 240 */ 230, 231, 232, 233, 234, 235, 236, 237, 206, 63, + /* 250 */ 199, 1, 2, 205, 207, 5, 70, 7, 199, 9, + /* 260 */ 212, 266, 76, 77, 78, 79, 39, 1, 2, 83, + /* 270 */ 84, 5, 277, 7, 244, 9, 249, 84, 248, 27, + /* 280 */ 28, 29, 30, 199, 249, 35, 36, 35, 36, 39, + /* 290 */ 243, 39, 40, 41, 199, 244, 39, 40, 41, 248, + /* 300 */ 144, 35, 36, 70, 64, 65, 66, 121, 266, 153, + /* 310 */ 154, 71, 72, 73, 74, 75, 199, 99, 2, 277, + /* 320 */ 205, 5, 5, 7, 7, 9, 70, 212, 244, 143, + /* 330 */ 90, 145, 248, 274, 84, 64, 65, 66, 152, 244, + /* 340 */ 221, 222, 71, 248, 73, 74, 75, 64, 65, 66, + /* 350 */ 84, 35, 36, 82, 71, 72, 73, 74, 75, 141, + /* 360 */ 100, 207, 102, 103, 78, 205, 199, 107, 199, 119, + /* 370 */ 120, 111, 212, 113, 114, 199, 126, 199, 199, 146, + /* 380 */ 5, 148, 7, 150, 151, 119, 120, 199, 80, 272, + /* 390 */ 199, 274, 126, 15, 240, 241, 242, 243, 210, 84, + /* 400 */ 92, 210, 146, 88, 148, 199, 150, 151, 64, 65, + /* 410 */ 66, 244, 99, 244, 207, 248, 210, 248, 203, 204, + /* 420 */ 244, 135, 244, 244, 248, 85, 248, 248, 67, 68, + /* 430 */ 69, 85, 85, 118, 99, 119, 120, 85, 125, 99, + /* 440 */ 85, 85, 85, 126, 85, 85, 266, 85, 241, 85, + /* 450 */ 84, 99, 85, 85, 99, 99, 99, 62, 99, 99, + /* 460 */ 84, 99, 85, 99, 80, 81, 99, 99, 122, 122, + /* 470 */ 147, 147, 149, 149, 139, 147, 99, 149, 5, 84, + /* 480 */ 7, 199, 5, 117, 7, 147, 147, 149, 149, 147, + /* 490 */ 266, 149, 116, 239, 266, 266, 266, 119, 266, 199, + /* 500 */ 266, 126, 266, 266, 266, 266, 239, 266, 266, 266, + /* 510 */ 266, 266, 266, 266, 249, 239, 239, 239, 239, 239, + /* 520 */ 199, 199, 247, 265, 199, 199, 199, 62, 247, 199, + /* 530 */ 199, 199, 247, 199, 275, 251, 275, 201, 201, 270, + /* 540 */ 199, 91, 199, 270, 199, 255, 259, 199, 199, 199, + /* 550 */ 199, 126, 199, 199, 262, 261, 260, 199, 270, 270, + /* 560 */ 136, 133, 199, 258, 199, 138, 140, 137, 199, 199, + /* 570 */ 199, 199, 199, 199, 131, 257, 130, 129, 199, 199, + /* 580 */ 199, 199, 199, 132, 199, 199, 199, 199, 199, 199, + /* 590 */ 199, 199, 199, 199, 142, 199, 199, 199, 199, 199, + /* 600 */ 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, + /* 610 */ 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, + /* 620 */ 115, 98, 201, 201, 201, 97, 53, 94, 96, 57, + /* 630 */ 95, 93, 86, 5, 201, 201, 201, 155, 5, 5, + /* 640 */ 155, 201, 201, 5, 5, 102, 207, 211, 211, 207, + /* 650 */ 101, 144, 122, 117, 84, 99, 85, 123, 84, 99, + /* 660 */ 201, 201, 201, 218, 220, 216, 219, 214, 202, 213, + /* 670 */ 215, 217, 202, 202, 202, 201, 238, 201, 203, 201, + /* 680 */ 222, 85, 84, 252, 85, 256, 254, 208, 84, 99, + /* 690 */ 85, 84, 1, 85, 84, 238, 84, 134, 134, 99, + /* 700 */ 99, 84, 84, 117, 84, 118, 80, 72, 89, 88, + /* 710 */ 5, 89, 88, 9, 5, 5, 5, 5, 5, 5, + /* 720 */ 5, 15, 80, 87, 84, 119, 85, 84, 26, 61, + /* 730 */ 149, 149, 16, 16, 149, 5, 99, 149, 5, 85, + /* 740 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + /* 750 */ 5, 5, 5, 5, 5, 99, 87, 62, 0, 278, + /* 760 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 770 */ 278, 21, 21, 278, 278, 278, 278, 278, 278, 278, + /* 780 */ 278, 278, 278, 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, }; -#define YY_SHIFT_COUNT (365) +#define YY_SHIFT_COUNT (367) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (751) +#define YY_SHIFT_MAX (758) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 184, 115, 115, 219, 219, 86, 230, 240, 240, 2, - /* 10 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 20 */ 143, 143, 143, 0, 42, 240, 305, 305, 305, 123, - /* 30 */ 123, 143, 143, 83, 143, 111, 143, 143, 143, 143, - /* 40 */ 243, 86, 35, 35, 5, 766, 766, 766, 240, 240, - /* 50 */ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - /* 60 */ 240, 240, 240, 240, 240, 240, 240, 240, 240, 305, - /* 70 */ 305, 305, 199, 199, 199, 199, 199, 199, 199, 143, - /* 80 */ 143, 143, 303, 143, 143, 143, 123, 123, 143, 143, - /* 90 */ 143, 143, 306, 306, 323, 123, 143, 143, 143, 143, - /* 100 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 110 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 120 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 130 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 140 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 150 */ 143, 143, 143, 143, 143, 474, 474, 474, 415, 415, - /* 160 */ 415, 415, 474, 474, 420, 424, 427, 428, 431, 438, - /* 170 */ 440, 443, 441, 445, 474, 474, 474, 518, 518, 496, - /* 180 */ 86, 86, 474, 474, 514, 519, 566, 526, 525, 565, - /* 190 */ 529, 532, 496, 5, 474, 474, 542, 542, 474, 542, - /* 200 */ 474, 542, 474, 474, 766, 766, 28, 93, 93, 121, - /* 210 */ 93, 148, 173, 208, 260, 260, 260, 260, 260, 273, - /* 220 */ 298, 216, 216, 216, 216, 232, 246, 14, 291, 365, - /* 230 */ 365, 26, 337, 217, 354, 338, 308, 310, 343, 344, - /* 240 */ 348, 18, 41, 359, 361, 366, 367, 368, 342, 369, - /* 250 */ 370, 437, 388, 374, 371, 315, 324, 328, 472, 473, - /* 260 */ 335, 336, 373, 339, 410, 623, 475, 625, 626, 481, - /* 270 */ 627, 631, 536, 538, 500, 523, 530, 562, 527, 563, - /* 280 */ 567, 550, 555, 570, 573, 596, 598, 599, 584, 601, - /* 290 */ 602, 605, 684, 606, 592, 558, 594, 560, 611, 530, - /* 300 */ 612, 580, 614, 581, 620, 613, 615, 629, 698, 616, - /* 310 */ 618, 697, 702, 703, 704, 705, 706, 707, 708, 628, - /* 320 */ 700, 637, 634, 635, 600, 638, 695, 662, 709, 575, - /* 330 */ 576, 630, 630, 630, 630, 710, 579, 582, 630, 630, - /* 340 */ 630, 724, 726, 648, 630, 728, 729, 730, 731, 732, - /* 350 */ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, - /* 360 */ 650, 663, 743, 744, 689, 751, + /* 0 */ 186, 113, 113, 260, 260, 98, 250, 266, 266, 193, + /* 10 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + /* 20 */ 23, 23, 23, 0, 122, 266, 316, 316, 316, 9, + /* 30 */ 9, 23, 23, 18, 23, 78, 23, 23, 23, 23, + /* 40 */ 308, 98, 112, 112, 61, 773, 773, 773, 266, 266, + /* 50 */ 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, + /* 60 */ 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, + /* 70 */ 316, 316, 316, 2, 2, 2, 2, 2, 2, 2, + /* 80 */ 23, 23, 23, 64, 23, 23, 23, 9, 9, 23, + /* 90 */ 23, 23, 23, 286, 286, 313, 9, 23, 23, 23, + /* 100 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + /* 110 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + /* 120 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + /* 130 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + /* 140 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + /* 150 */ 23, 23, 23, 23, 23, 23, 465, 465, 465, 425, + /* 160 */ 425, 425, 425, 465, 465, 427, 426, 428, 430, 424, + /* 170 */ 443, 446, 448, 451, 452, 465, 465, 465, 450, 450, + /* 180 */ 505, 98, 98, 465, 465, 523, 528, 573, 533, 532, + /* 190 */ 572, 535, 538, 505, 61, 465, 465, 546, 546, 465, + /* 200 */ 546, 465, 546, 465, 465, 773, 773, 29, 69, 69, + /* 210 */ 99, 69, 127, 170, 240, 252, 252, 252, 252, 252, + /* 220 */ 252, 271, 283, 40, 40, 40, 40, 233, 256, 156, + /* 230 */ 315, 257, 257, 317, 375, 361, 344, 340, 346, 347, + /* 240 */ 352, 355, 356, 218, 335, 357, 359, 360, 362, 364, + /* 250 */ 366, 367, 368, 227, 395, 378, 377, 323, 324, 328, + /* 260 */ 473, 477, 338, 339, 376, 342, 384, 628, 482, 633, + /* 270 */ 634, 485, 638, 639, 543, 549, 507, 530, 536, 570, + /* 280 */ 534, 571, 574, 556, 560, 596, 598, 599, 604, 605, + /* 290 */ 590, 607, 608, 610, 691, 612, 600, 563, 601, 564, + /* 300 */ 617, 536, 618, 586, 620, 587, 626, 619, 621, 635, + /* 310 */ 705, 622, 624, 704, 709, 710, 711, 712, 713, 714, + /* 320 */ 715, 636, 706, 642, 640, 641, 606, 643, 702, 668, + /* 330 */ 716, 581, 582, 637, 637, 637, 637, 717, 585, 588, + /* 340 */ 637, 637, 637, 730, 733, 654, 637, 735, 736, 737, + /* 350 */ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, + /* 360 */ 748, 749, 656, 669, 750, 751, 695, 758, }; -#define YY_REDUCE_COUNT (205) -#define YY_REDUCE_MIN (-257) -#define YY_REDUCE_MAX (478) +#define YY_REDUCE_COUNT (206) +#define YY_REDUCE_MIN (-266) +#define YY_REDUCE_MAX (479) static const short yy_reduce_ofst[] = { - /* 0 */ -138, -153, -153, 151, 151, 51, -140, -13, 43, -114, - /* 10 */ -183, -95, -68, -7, 113, 154, 155, 166, 169, 187, - /* 20 */ 190, 192, 201, -180, -194, -257, -242, -212, -63, -239, - /* 30 */ -216, -35, 32, -147, -198, 64, -69, 60, 118, -186, - /* 40 */ 92, 160, 98, 146, 56, 157, 203, 212, -228, -81, - /* 50 */ -21, 52, 59, 65, 68, 142, 195, 221, 226, 228, - /* 60 */ 229, 231, 233, 234, 235, 236, 237, 238, 239, 103, - /* 70 */ 225, 247, 259, 267, 268, 269, 270, 271, 272, 313, - /* 80 */ 314, 316, 249, 317, 318, 319, 274, 275, 320, 321, - /* 90 */ 325, 326, 248, 251, 276, 281, 330, 331, 332, 333, - /* 100 */ 334, 340, 341, 345, 346, 347, 349, 350, 351, 352, - /* 110 */ 353, 355, 356, 357, 358, 360, 362, 363, 364, 372, - /* 120 */ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - /* 130 */ 385, 386, 387, 389, 390, 391, 392, 393, 394, 395, - /* 140 */ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, - /* 150 */ 406, 407, 408, 409, 411, 412, 413, 414, 264, 265, - /* 160 */ 277, 283, 416, 417, 280, 282, 278, 307, 279, 311, - /* 170 */ 418, 421, 419, 423, 422, 425, 426, 429, 430, 432, - /* 180 */ 435, 436, 433, 434, 439, 442, 444, 446, 447, 448, - /* 190 */ 449, 453, 450, 455, 451, 452, 454, 456, 466, 467, - /* 200 */ 470, 476, 471, 478, 460, 477, + /* 0 */ -186, 10, 10, -163, -163, 154, -159, -5, 42, -168, + /* 10 */ -112, -115, 117, -41, 30, 51, 84, 95, 167, 169, + /* 20 */ 176, 178, 179, -195, -197, -258, -239, -201, -143, -229, + /* 30 */ -130, -62, 59, -238, -57, 47, 188, 191, 206, -88, + /* 40 */ 48, 207, 115, 160, 119, -99, 22, 215, -266, -261, + /* 50 */ -213, -58, 180, 224, 228, 229, 230, 232, 234, 236, + /* 60 */ 237, 238, 239, 241, 242, 243, 244, 245, 246, 247, + /* 70 */ 27, 35, 265, 254, 267, 276, 277, 278, 279, 280, + /* 80 */ 282, 300, 321, 258, 322, 325, 326, 275, 281, 327, + /* 90 */ 330, 331, 332, 259, 261, 284, 285, 334, 341, 343, + /* 100 */ 345, 348, 349, 350, 351, 353, 354, 358, 363, 365, + /* 110 */ 369, 370, 371, 372, 373, 374, 379, 380, 381, 382, + /* 120 */ 383, 385, 386, 387, 388, 389, 390, 391, 392, 393, + /* 130 */ 394, 396, 397, 398, 399, 400, 401, 402, 403, 404, + /* 140 */ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + /* 150 */ 415, 416, 417, 418, 419, 420, 336, 337, 421, 269, + /* 160 */ 273, 288, 289, 422, 423, 292, 294, 296, 287, 305, + /* 170 */ 318, 429, 290, 432, 431, 433, 434, 435, 436, 437, + /* 180 */ 438, 439, 442, 440, 441, 444, 447, 445, 453, 454, + /* 190 */ 455, 449, 456, 457, 458, 459, 460, 466, 470, 461, + /* 200 */ 471, 474, 472, 476, 478, 479, 475, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 867, 991, 930, 1001, 917, 927, 1141, 1141, 1141, 867, - /* 10 */ 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 20 */ 867, 867, 867, 1049, 887, 1141, 867, 867, 867, 867, - /* 30 */ 867, 867, 867, 1064, 867, 927, 867, 867, 867, 867, - /* 40 */ 937, 927, 937, 937, 867, 1044, 975, 993, 867, 867, - /* 50 */ 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 60 */ 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 70 */ 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 80 */ 867, 867, 1051, 1057, 1054, 867, 867, 867, 1059, 867, - /* 90 */ 867, 867, 1083, 1083, 1042, 867, 867, 867, 867, 867, - /* 100 */ 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 110 */ 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 120 */ 867, 867, 867, 867, 867, 867, 867, 867, 915, 867, - /* 130 */ 913, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 140 */ 867, 867, 867, 867, 867, 867, 867, 898, 867, 867, - /* 150 */ 867, 867, 867, 867, 885, 889, 889, 889, 867, 867, - /* 160 */ 867, 867, 889, 889, 1090, 1094, 1076, 1088, 1084, 1071, - /* 170 */ 1069, 1067, 1075, 1098, 889, 889, 889, 935, 935, 931, - /* 180 */ 927, 927, 889, 889, 953, 951, 949, 941, 947, 943, - /* 190 */ 945, 939, 918, 867, 889, 889, 925, 925, 889, 925, - /* 200 */ 889, 925, 889, 889, 975, 993, 867, 1099, 1089, 867, - /* 210 */ 1140, 1129, 1128, 867, 1136, 1135, 1127, 1126, 1125, 867, - /* 220 */ 867, 1121, 1124, 1123, 1122, 867, 867, 867, 867, 1131, - /* 230 */ 1130, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 240 */ 867, 1095, 1091, 867, 867, 867, 867, 867, 867, 867, - /* 250 */ 867, 867, 1101, 867, 867, 867, 867, 867, 867, 867, - /* 260 */ 867, 867, 1003, 867, 867, 867, 867, 867, 867, 867, - /* 270 */ 867, 867, 867, 867, 867, 1041, 867, 867, 867, 867, - /* 280 */ 867, 1053, 1052, 867, 867, 867, 867, 867, 867, 867, - /* 290 */ 867, 867, 867, 867, 1085, 867, 1077, 867, 867, 1015, - /* 300 */ 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 310 */ 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 320 */ 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 330 */ 867, 1159, 1154, 1155, 1152, 867, 867, 867, 1151, 1146, - /* 340 */ 1147, 867, 867, 867, 1144, 867, 867, 867, 867, 867, - /* 350 */ 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - /* 360 */ 959, 867, 896, 894, 867, 867, + /* 0 */ 870, 994, 933, 1004, 920, 930, 1145, 1145, 1145, 870, + /* 10 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, + /* 20 */ 870, 870, 870, 1052, 890, 1145, 870, 870, 870, 870, + /* 30 */ 870, 870, 870, 1067, 870, 930, 870, 870, 870, 870, + /* 40 */ 940, 930, 940, 940, 870, 1047, 978, 996, 870, 870, + /* 50 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, + /* 60 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, + /* 70 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, + /* 80 */ 870, 870, 870, 1054, 1060, 1057, 870, 870, 870, 1062, + /* 90 */ 870, 870, 870, 1086, 1086, 1045, 870, 870, 870, 870, + /* 100 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, + /* 110 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, + /* 120 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 918, + /* 130 */ 870, 916, 870, 870, 870, 870, 870, 870, 870, 870, + /* 140 */ 870, 870, 870, 870, 870, 870, 870, 870, 901, 870, + /* 150 */ 870, 870, 870, 870, 870, 888, 892, 892, 892, 870, + /* 160 */ 870, 870, 870, 892, 892, 1093, 1097, 1079, 1091, 1087, + /* 170 */ 1074, 1072, 1070, 1078, 1101, 892, 892, 892, 938, 938, + /* 180 */ 934, 930, 930, 892, 892, 956, 954, 952, 944, 950, + /* 190 */ 946, 948, 942, 921, 870, 892, 892, 928, 928, 892, + /* 200 */ 928, 892, 928, 892, 892, 978, 996, 870, 1102, 1092, + /* 210 */ 870, 1144, 1132, 1131, 870, 1140, 1139, 1138, 1130, 1129, + /* 220 */ 1128, 870, 870, 1124, 1127, 1126, 1125, 870, 870, 870, + /* 230 */ 870, 1134, 1133, 870, 870, 870, 870, 870, 870, 870, + /* 240 */ 870, 870, 870, 1098, 1094, 870, 870, 870, 870, 870, + /* 250 */ 870, 870, 870, 870, 1104, 870, 870, 870, 870, 870, + /* 260 */ 870, 870, 870, 870, 1006, 870, 870, 870, 870, 870, + /* 270 */ 870, 870, 870, 870, 870, 870, 870, 1044, 870, 870, + /* 280 */ 870, 870, 870, 1056, 1055, 870, 870, 870, 870, 870, + /* 290 */ 870, 870, 870, 870, 870, 870, 1088, 870, 1080, 870, + /* 300 */ 870, 1018, 870, 870, 870, 870, 870, 870, 870, 870, + /* 310 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, + /* 320 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, + /* 330 */ 870, 870, 870, 1163, 1158, 1159, 1156, 870, 870, 870, + /* 340 */ 1155, 1150, 1151, 870, 870, 870, 1148, 870, 870, 870, + /* 350 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, + /* 360 */ 870, 870, 962, 870, 899, 897, 870, 870, }; /********** End of lemon-generated parsing tables *****************************/ @@ -545,6 +546,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* IS => nothing */ 1, /* LIKE => ID */ 1, /* MATCH => ID */ + 1, /* NMATCH => ID */ 1, /* GLOB => ID */ 0, /* BETWEEN => nothing */ 0, /* IN => nothing */ @@ -828,260 +830,261 @@ static const char *const yyTokenName[] = { /* 20 */ "IS", /* 21 */ "LIKE", /* 22 */ "MATCH", - /* 23 */ "GLOB", - /* 24 */ "BETWEEN", - /* 25 */ "IN", - /* 26 */ "GT", - /* 27 */ "GE", - /* 28 */ "LT", - /* 29 */ "LE", - /* 30 */ "BITAND", - /* 31 */ "BITOR", - /* 32 */ "LSHIFT", - /* 33 */ "RSHIFT", - /* 34 */ "PLUS", - /* 35 */ "MINUS", - /* 36 */ "DIVIDE", - /* 37 */ "TIMES", - /* 38 */ "STAR", - /* 39 */ "SLASH", - /* 40 */ "REM", - /* 41 */ "CONCAT", - /* 42 */ "UMINUS", - /* 43 */ "UPLUS", - /* 44 */ "BITNOT", - /* 45 */ "SHOW", - /* 46 */ "DATABASES", - /* 47 */ "TOPICS", - /* 48 */ "FUNCTIONS", - /* 49 */ "MNODES", - /* 50 */ "DNODES", - /* 51 */ "ACCOUNTS", - /* 52 */ "USERS", - /* 53 */ "MODULES", - /* 54 */ "QUERIES", - /* 55 */ "CONNECTIONS", - /* 56 */ "STREAMS", - /* 57 */ "VARIABLES", - /* 58 */ "SCORES", - /* 59 */ "GRANTS", - /* 60 */ "VNODES", - /* 61 */ "DOT", - /* 62 */ "CREATE", - /* 63 */ "TABLE", - /* 64 */ "STABLE", - /* 65 */ "DATABASE", - /* 66 */ "TABLES", - /* 67 */ "STABLES", - /* 68 */ "VGROUPS", - /* 69 */ "DROP", - /* 70 */ "TOPIC", - /* 71 */ "FUNCTION", - /* 72 */ "DNODE", - /* 73 */ "USER", - /* 74 */ "ACCOUNT", - /* 75 */ "USE", - /* 76 */ "DESCRIBE", - /* 77 */ "DESC", - /* 78 */ "ALTER", - /* 79 */ "PASS", - /* 80 */ "PRIVILEGE", - /* 81 */ "LOCAL", - /* 82 */ "COMPACT", - /* 83 */ "LP", - /* 84 */ "RP", - /* 85 */ "IF", - /* 86 */ "EXISTS", - /* 87 */ "AS", - /* 88 */ "OUTPUTTYPE", - /* 89 */ "AGGREGATE", - /* 90 */ "BUFSIZE", - /* 91 */ "PPS", - /* 92 */ "TSERIES", - /* 93 */ "DBS", - /* 94 */ "STORAGE", - /* 95 */ "QTIME", - /* 96 */ "CONNS", - /* 97 */ "STATE", - /* 98 */ "COMMA", - /* 99 */ "KEEP", - /* 100 */ "CACHE", - /* 101 */ "REPLICA", - /* 102 */ "QUORUM", - /* 103 */ "DAYS", - /* 104 */ "MINROWS", - /* 105 */ "MAXROWS", - /* 106 */ "BLOCKS", - /* 107 */ "CTIME", - /* 108 */ "WAL", - /* 109 */ "FSYNC", - /* 110 */ "COMP", - /* 111 */ "PRECISION", - /* 112 */ "UPDATE", - /* 113 */ "CACHELAST", - /* 114 */ "PARTITIONS", - /* 115 */ "UNSIGNED", - /* 116 */ "TAGS", - /* 117 */ "USING", - /* 118 */ "NULL", - /* 119 */ "NOW", - /* 120 */ "SELECT", - /* 121 */ "UNION", - /* 122 */ "ALL", - /* 123 */ "DISTINCT", - /* 124 */ "FROM", - /* 125 */ "VARIABLE", - /* 126 */ "INTERVAL", - /* 127 */ "EVERY", - /* 128 */ "SESSION", - /* 129 */ "STATE_WINDOW", - /* 130 */ "FILL", - /* 131 */ "SLIDING", - /* 132 */ "ORDER", - /* 133 */ "BY", - /* 134 */ "ASC", - /* 135 */ "GROUP", - /* 136 */ "HAVING", - /* 137 */ "LIMIT", - /* 138 */ "OFFSET", - /* 139 */ "SLIMIT", - /* 140 */ "SOFFSET", - /* 141 */ "WHERE", - /* 142 */ "RESET", - /* 143 */ "QUERY", - /* 144 */ "SYNCDB", - /* 145 */ "ADD", - /* 146 */ "COLUMN", - /* 147 */ "MODIFY", - /* 148 */ "TAG", - /* 149 */ "CHANGE", - /* 150 */ "SET", - /* 151 */ "KILL", - /* 152 */ "CONNECTION", - /* 153 */ "STREAM", - /* 154 */ "COLON", - /* 155 */ "ABORT", - /* 156 */ "AFTER", - /* 157 */ "ATTACH", - /* 158 */ "BEFORE", - /* 159 */ "BEGIN", - /* 160 */ "CASCADE", - /* 161 */ "CLUSTER", - /* 162 */ "CONFLICT", - /* 163 */ "COPY", - /* 164 */ "DEFERRED", - /* 165 */ "DELIMITERS", - /* 166 */ "DETACH", - /* 167 */ "EACH", - /* 168 */ "END", - /* 169 */ "EXPLAIN", - /* 170 */ "FAIL", - /* 171 */ "FOR", - /* 172 */ "IGNORE", - /* 173 */ "IMMEDIATE", - /* 174 */ "INITIALLY", - /* 175 */ "INSTEAD", - /* 176 */ "KEY", - /* 177 */ "OF", - /* 178 */ "RAISE", - /* 179 */ "REPLACE", - /* 180 */ "RESTRICT", - /* 181 */ "ROW", - /* 182 */ "STATEMENT", - /* 183 */ "TRIGGER", - /* 184 */ "VIEW", - /* 185 */ "IPTOKEN", - /* 186 */ "SEMI", - /* 187 */ "NONE", - /* 188 */ "PREV", - /* 189 */ "LINEAR", - /* 190 */ "IMPORT", - /* 191 */ "TBNAME", - /* 192 */ "JOIN", - /* 193 */ "INSERT", - /* 194 */ "INTO", - /* 195 */ "VALUES", - /* 196 */ "program", - /* 197 */ "cmd", - /* 198 */ "ids", - /* 199 */ "dbPrefix", - /* 200 */ "cpxName", - /* 201 */ "ifexists", - /* 202 */ "alter_db_optr", - /* 203 */ "alter_topic_optr", - /* 204 */ "acct_optr", - /* 205 */ "exprlist", - /* 206 */ "ifnotexists", - /* 207 */ "db_optr", - /* 208 */ "topic_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 */ "partitions", - /* 238 */ "signed", - /* 239 */ "create_table_args", - /* 240 */ "create_stable_args", - /* 241 */ "create_table_list", - /* 242 */ "create_from_stable", - /* 243 */ "columnlist", - /* 244 */ "tagitemlist", - /* 245 */ "tagNamelist", - /* 246 */ "select", - /* 247 */ "column", - /* 248 */ "tagitem", - /* 249 */ "selcollist", - /* 250 */ "from", - /* 251 */ "where_opt", - /* 252 */ "interval_option", - /* 253 */ "sliding_opt", - /* 254 */ "session_option", - /* 255 */ "windowstate_option", - /* 256 */ "fill_opt", - /* 257 */ "groupby_opt", - /* 258 */ "having_opt", - /* 259 */ "orderby_opt", - /* 260 */ "slimit_opt", - /* 261 */ "limit_opt", - /* 262 */ "union", - /* 263 */ "sclp", - /* 264 */ "distinct", - /* 265 */ "expr", - /* 266 */ "as", - /* 267 */ "tablelist", - /* 268 */ "sub", - /* 269 */ "tmvar", - /* 270 */ "intervalKey", - /* 271 */ "sortlist", - /* 272 */ "sortitem", - /* 273 */ "item", - /* 274 */ "sortorder", - /* 275 */ "grouplist", - /* 276 */ "expritem", + /* 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 */ "AS", + /* 89 */ "OUTPUTTYPE", + /* 90 */ "AGGREGATE", + /* 91 */ "BUFSIZE", + /* 92 */ "PPS", + /* 93 */ "TSERIES", + /* 94 */ "DBS", + /* 95 */ "STORAGE", + /* 96 */ "QTIME", + /* 97 */ "CONNS", + /* 98 */ "STATE", + /* 99 */ "COMMA", + /* 100 */ "KEEP", + /* 101 */ "CACHE", + /* 102 */ "REPLICA", + /* 103 */ "QUORUM", + /* 104 */ "DAYS", + /* 105 */ "MINROWS", + /* 106 */ "MAXROWS", + /* 107 */ "BLOCKS", + /* 108 */ "CTIME", + /* 109 */ "WAL", + /* 110 */ "FSYNC", + /* 111 */ "COMP", + /* 112 */ "PRECISION", + /* 113 */ "UPDATE", + /* 114 */ "CACHELAST", + /* 115 */ "PARTITIONS", + /* 116 */ "UNSIGNED", + /* 117 */ "TAGS", + /* 118 */ "USING", + /* 119 */ "NULL", + /* 120 */ "NOW", + /* 121 */ "SELECT", + /* 122 */ "UNION", + /* 123 */ "ALL", + /* 124 */ "DISTINCT", + /* 125 */ "FROM", + /* 126 */ "VARIABLE", + /* 127 */ "INTERVAL", + /* 128 */ "EVERY", + /* 129 */ "SESSION", + /* 130 */ "STATE_WINDOW", + /* 131 */ "FILL", + /* 132 */ "SLIDING", + /* 133 */ "ORDER", + /* 134 */ "BY", + /* 135 */ "ASC", + /* 136 */ "GROUP", + /* 137 */ "HAVING", + /* 138 */ "LIMIT", + /* 139 */ "OFFSET", + /* 140 */ "SLIMIT", + /* 141 */ "SOFFSET", + /* 142 */ "WHERE", + /* 143 */ "RESET", + /* 144 */ "QUERY", + /* 145 */ "SYNCDB", + /* 146 */ "ADD", + /* 147 */ "COLUMN", + /* 148 */ "MODIFY", + /* 149 */ "TAG", + /* 150 */ "CHANGE", + /* 151 */ "SET", + /* 152 */ "KILL", + /* 153 */ "CONNECTION", + /* 154 */ "STREAM", + /* 155 */ "COLON", + /* 156 */ "ABORT", + /* 157 */ "AFTER", + /* 158 */ "ATTACH", + /* 159 */ "BEFORE", + /* 160 */ "BEGIN", + /* 161 */ "CASCADE", + /* 162 */ "CLUSTER", + /* 163 */ "CONFLICT", + /* 164 */ "COPY", + /* 165 */ "DEFERRED", + /* 166 */ "DELIMITERS", + /* 167 */ "DETACH", + /* 168 */ "EACH", + /* 169 */ "END", + /* 170 */ "EXPLAIN", + /* 171 */ "FAIL", + /* 172 */ "FOR", + /* 173 */ "IGNORE", + /* 174 */ "IMMEDIATE", + /* 175 */ "INITIALLY", + /* 176 */ "INSTEAD", + /* 177 */ "KEY", + /* 178 */ "OF", + /* 179 */ "RAISE", + /* 180 */ "REPLACE", + /* 181 */ "RESTRICT", + /* 182 */ "ROW", + /* 183 */ "STATEMENT", + /* 184 */ "TRIGGER", + /* 185 */ "VIEW", + /* 186 */ "IPTOKEN", + /* 187 */ "SEMI", + /* 188 */ "NONE", + /* 189 */ "PREV", + /* 190 */ "LINEAR", + /* 191 */ "IMPORT", + /* 192 */ "TBNAME", + /* 193 */ "JOIN", + /* 194 */ "INSERT", + /* 195 */ "INTO", + /* 196 */ "VALUES", + /* 197 */ "program", + /* 198 */ "cmd", + /* 199 */ "ids", + /* 200 */ "dbPrefix", + /* 201 */ "cpxName", + /* 202 */ "ifexists", + /* 203 */ "alter_db_optr", + /* 204 */ "alter_topic_optr", + /* 205 */ "acct_optr", + /* 206 */ "exprlist", + /* 207 */ "ifnotexists", + /* 208 */ "db_optr", + /* 209 */ "topic_optr", + /* 210 */ "typename", + /* 211 */ "bufsize", + /* 212 */ "pps", + /* 213 */ "tseries", + /* 214 */ "dbs", + /* 215 */ "streams", + /* 216 */ "storage", + /* 217 */ "qtime", + /* 218 */ "users", + /* 219 */ "conns", + /* 220 */ "state", + /* 221 */ "intitemlist", + /* 222 */ "intitem", + /* 223 */ "keep", + /* 224 */ "cache", + /* 225 */ "replica", + /* 226 */ "quorum", + /* 227 */ "days", + /* 228 */ "minrows", + /* 229 */ "maxrows", + /* 230 */ "blocks", + /* 231 */ "ctime", + /* 232 */ "wal", + /* 233 */ "fsync", + /* 234 */ "comp", + /* 235 */ "prec", + /* 236 */ "update", + /* 237 */ "cachelast", + /* 238 */ "partitions", + /* 239 */ "signed", + /* 240 */ "create_table_args", + /* 241 */ "create_stable_args", + /* 242 */ "create_table_list", + /* 243 */ "create_from_stable", + /* 244 */ "columnlist", + /* 245 */ "tagitemlist", + /* 246 */ "tagNamelist", + /* 247 */ "select", + /* 248 */ "column", + /* 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", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1356,32 +1359,33 @@ static const char *const yyRuleName[] = { /* 264 */ "expr ::= expr REM expr", /* 265 */ "expr ::= expr LIKE expr", /* 266 */ "expr ::= expr MATCH expr", - /* 267 */ "expr ::= expr IN LP exprlist RP", - /* 268 */ "exprlist ::= exprlist COMMA expritem", - /* 269 */ "exprlist ::= expritem", - /* 270 */ "expritem ::= expr", - /* 271 */ "expritem ::=", - /* 272 */ "cmd ::= RESET QUERY CACHE", - /* 273 */ "cmd ::= SYNCDB ids REPLICA", - /* 274 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", - /* 275 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", - /* 276 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", - /* 277 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", - /* 278 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", - /* 279 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", - /* 280 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", - /* 281 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", - /* 282 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", - /* 283 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", - /* 284 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", - /* 285 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", - /* 286 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", - /* 287 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", - /* 288 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", - /* 289 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", - /* 290 */ "cmd ::= KILL CONNECTION INTEGER", - /* 291 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", - /* 292 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", + /* 267 */ "expr ::= expr NMATCH expr", + /* 268 */ "expr ::= expr IN LP exprlist RP", + /* 269 */ "exprlist ::= exprlist COMMA expritem", + /* 270 */ "exprlist ::= expritem", + /* 271 */ "expritem ::= expr", + /* 272 */ "expritem ::=", + /* 273 */ "cmd ::= RESET QUERY CACHE", + /* 274 */ "cmd ::= SYNCDB ids REPLICA", + /* 275 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", + /* 276 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", + /* 277 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", + /* 278 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", + /* 279 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", + /* 280 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", + /* 281 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", + /* 282 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", + /* 283 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", + /* 284 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", + /* 285 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", + /* 286 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", + /* 287 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", + /* 288 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", + /* 289 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", + /* 290 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", + /* 291 */ "cmd ::= KILL CONNECTION INTEGER", + /* 292 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", + /* 293 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", }; #endif /* NDEBUG */ @@ -1507,76 +1511,76 @@ static void yy_destructor( ** inside the C code. */ /********* Begin destructor definitions ***************************************/ - case 205: /* exprlist */ - case 249: /* selcollist */ - case 263: /* sclp */ + case 206: /* exprlist */ + case 250: /* selcollist */ + case 264: /* sclp */ { -#line 761 "sql.y" -tSqlExprListDestroy((yypminor->yy403)); -#line 1517 "sql.c" +#line 762 "sql.y" +tSqlExprListDestroy((yypminor->yy421)); +#line 1521 "sql.c" } break; - case 220: /* intitemlist */ - case 222: /* keep */ - case 243: /* columnlist */ - case 244: /* tagitemlist */ - case 245: /* tagNamelist */ - case 256: /* fill_opt */ - case 257: /* groupby_opt */ - case 259: /* orderby_opt */ - case 271: /* sortlist */ - case 275: /* grouplist */ + case 221: /* intitemlist */ + case 223: /* keep */ + case 244: /* columnlist */ + case 245: /* tagitemlist */ + case 246: /* tagNamelist */ + case 257: /* fill_opt */ + case 258: /* groupby_opt */ + case 260: /* orderby_opt */ + case 272: /* sortlist */ + case 276: /* grouplist */ { #line 256 "sql.y" -taosArrayDestroy((yypminor->yy403)); -#line 1533 "sql.c" +taosArrayDestroy((yypminor->yy421)); +#line 1537 "sql.c" } break; - case 241: /* create_table_list */ + case 242: /* create_table_list */ { #line 364 "sql.y" -destroyCreateTableSql((yypminor->yy56)); -#line 1540 "sql.c" +destroyCreateTableSql((yypminor->yy438)); +#line 1544 "sql.c" } break; - case 246: /* select */ + case 247: /* select */ { #line 484 "sql.y" -destroySqlNode((yypminor->yy224)); -#line 1547 "sql.c" +destroySqlNode((yypminor->yy56)); +#line 1551 "sql.c" } break; - case 250: /* from */ - case 267: /* tablelist */ - case 268: /* sub */ + case 251: /* from */ + case 268: /* tablelist */ + case 269: /* sub */ { #line 539 "sql.y" -destroyRelationInfo((yypminor->yy114)); -#line 1556 "sql.c" +destroyRelationInfo((yypminor->yy8)); +#line 1560 "sql.c" } break; - case 251: /* where_opt */ - case 258: /* having_opt */ - case 265: /* expr */ - case 276: /* expritem */ + case 252: /* where_opt */ + case 259: /* having_opt */ + case 266: /* expr */ + case 277: /* expritem */ { #line 691 "sql.y" -tSqlExprDestroy((yypminor->yy260)); -#line 1566 "sql.c" +tSqlExprDestroy((yypminor->yy439)); +#line 1570 "sql.c" } break; - case 262: /* union */ + case 263: /* union */ { #line 492 "sql.y" -destroyAllSqlNode((yypminor->yy403)); -#line 1573 "sql.c" +destroyAllSqlNode((yypminor->yy421)); +#line 1577 "sql.c" } break; - case 272: /* sortitem */ + case 273: /* sortitem */ { #line 624 "sql.y" -tVariantDestroy(&(yypminor->yy488)); -#line 1580 "sql.c" +tVariantDestroy(&(yypminor->yy430)); +#line 1584 "sql.c" } break; /********* End destructor definitions *****************************************/ @@ -1865,299 +1869,300 @@ static void yy_shift( /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { - 196, /* (0) program ::= cmd */ - 197, /* (1) cmd ::= SHOW DATABASES */ - 197, /* (2) cmd ::= SHOW TOPICS */ - 197, /* (3) cmd ::= SHOW FUNCTIONS */ - 197, /* (4) cmd ::= SHOW MNODES */ - 197, /* (5) cmd ::= SHOW DNODES */ - 197, /* (6) cmd ::= SHOW ACCOUNTS */ - 197, /* (7) cmd ::= SHOW USERS */ - 197, /* (8) cmd ::= SHOW MODULES */ - 197, /* (9) cmd ::= SHOW QUERIES */ - 197, /* (10) cmd ::= SHOW CONNECTIONS */ - 197, /* (11) cmd ::= SHOW STREAMS */ - 197, /* (12) cmd ::= SHOW VARIABLES */ - 197, /* (13) cmd ::= SHOW SCORES */ - 197, /* (14) cmd ::= SHOW GRANTS */ - 197, /* (15) cmd ::= SHOW VNODES */ - 197, /* (16) cmd ::= SHOW VNODES ids */ - 199, /* (17) dbPrefix ::= */ - 199, /* (18) dbPrefix ::= ids DOT */ - 200, /* (19) cpxName ::= */ - 200, /* (20) cpxName ::= DOT ids */ - 197, /* (21) cmd ::= SHOW CREATE TABLE ids cpxName */ - 197, /* (22) cmd ::= SHOW CREATE STABLE ids cpxName */ - 197, /* (23) cmd ::= SHOW CREATE DATABASE ids */ - 197, /* (24) cmd ::= SHOW dbPrefix TABLES */ - 197, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */ - 197, /* (26) cmd ::= SHOW dbPrefix STABLES */ - 197, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */ - 197, /* (28) cmd ::= SHOW dbPrefix VGROUPS */ - 197, /* (29) cmd ::= SHOW dbPrefix VGROUPS ids */ - 197, /* (30) cmd ::= DROP TABLE ifexists ids cpxName */ - 197, /* (31) cmd ::= DROP STABLE ifexists ids cpxName */ - 197, /* (32) cmd ::= DROP DATABASE ifexists ids */ - 197, /* (33) cmd ::= DROP TOPIC ifexists ids */ - 197, /* (34) cmd ::= DROP FUNCTION ids */ - 197, /* (35) cmd ::= DROP DNODE ids */ - 197, /* (36) cmd ::= DROP USER ids */ - 197, /* (37) cmd ::= DROP ACCOUNT ids */ - 197, /* (38) cmd ::= USE ids */ - 197, /* (39) cmd ::= DESCRIBE ids cpxName */ - 197, /* (40) cmd ::= DESC ids cpxName */ - 197, /* (41) cmd ::= ALTER USER ids PASS ids */ - 197, /* (42) cmd ::= ALTER USER ids PRIVILEGE ids */ - 197, /* (43) cmd ::= ALTER DNODE ids ids */ - 197, /* (44) cmd ::= ALTER DNODE ids ids ids */ - 197, /* (45) cmd ::= ALTER LOCAL ids */ - 197, /* (46) cmd ::= ALTER LOCAL ids ids */ - 197, /* (47) cmd ::= ALTER DATABASE ids alter_db_optr */ - 197, /* (48) cmd ::= ALTER TOPIC ids alter_topic_optr */ - 197, /* (49) cmd ::= ALTER ACCOUNT ids acct_optr */ - 197, /* (50) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ - 197, /* (51) cmd ::= COMPACT VNODES IN LP exprlist RP */ - 198, /* (52) ids ::= ID */ - 198, /* (53) ids ::= STRING */ - 201, /* (54) ifexists ::= IF EXISTS */ - 201, /* (55) ifexists ::= */ - 206, /* (56) ifnotexists ::= IF NOT EXISTS */ - 206, /* (57) ifnotexists ::= */ - 197, /* (58) cmd ::= CREATE DNODE ids */ - 197, /* (59) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ - 197, /* (60) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - 197, /* (61) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ - 197, /* (62) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - 197, /* (63) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - 197, /* (64) cmd ::= CREATE USER ids PASS ids */ - 210, /* (65) bufsize ::= */ - 210, /* (66) bufsize ::= BUFSIZE INTEGER */ - 211, /* (67) pps ::= */ - 211, /* (68) pps ::= PPS INTEGER */ - 212, /* (69) tseries ::= */ - 212, /* (70) tseries ::= TSERIES INTEGER */ - 213, /* (71) dbs ::= */ - 213, /* (72) dbs ::= DBS INTEGER */ - 214, /* (73) streams ::= */ - 214, /* (74) streams ::= STREAMS INTEGER */ - 215, /* (75) storage ::= */ - 215, /* (76) storage ::= STORAGE INTEGER */ - 216, /* (77) qtime ::= */ - 216, /* (78) qtime ::= QTIME INTEGER */ - 217, /* (79) users ::= */ - 217, /* (80) users ::= USERS INTEGER */ - 218, /* (81) conns ::= */ - 218, /* (82) conns ::= CONNS INTEGER */ - 219, /* (83) state ::= */ - 219, /* (84) state ::= STATE ids */ - 204, /* (85) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ - 220, /* (86) intitemlist ::= intitemlist COMMA intitem */ - 220, /* (87) intitemlist ::= intitem */ - 221, /* (88) intitem ::= INTEGER */ - 222, /* (89) keep ::= KEEP intitemlist */ - 223, /* (90) cache ::= CACHE INTEGER */ - 224, /* (91) replica ::= REPLICA INTEGER */ - 225, /* (92) quorum ::= QUORUM INTEGER */ - 226, /* (93) days ::= DAYS INTEGER */ - 227, /* (94) minrows ::= MINROWS INTEGER */ - 228, /* (95) maxrows ::= MAXROWS INTEGER */ - 229, /* (96) blocks ::= BLOCKS INTEGER */ - 230, /* (97) ctime ::= CTIME INTEGER */ - 231, /* (98) wal ::= WAL INTEGER */ - 232, /* (99) fsync ::= FSYNC INTEGER */ - 233, /* (100) comp ::= COMP INTEGER */ - 234, /* (101) prec ::= PRECISION STRING */ - 235, /* (102) update ::= UPDATE INTEGER */ - 236, /* (103) cachelast ::= CACHELAST INTEGER */ - 237, /* (104) partitions ::= PARTITIONS INTEGER */ - 207, /* (105) db_optr ::= */ - 207, /* (106) db_optr ::= db_optr cache */ - 207, /* (107) db_optr ::= db_optr replica */ - 207, /* (108) db_optr ::= db_optr quorum */ - 207, /* (109) db_optr ::= db_optr days */ - 207, /* (110) db_optr ::= db_optr minrows */ - 207, /* (111) db_optr ::= db_optr maxrows */ - 207, /* (112) db_optr ::= db_optr blocks */ - 207, /* (113) db_optr ::= db_optr ctime */ - 207, /* (114) db_optr ::= db_optr wal */ - 207, /* (115) db_optr ::= db_optr fsync */ - 207, /* (116) db_optr ::= db_optr comp */ - 207, /* (117) db_optr ::= db_optr prec */ - 207, /* (118) db_optr ::= db_optr keep */ - 207, /* (119) db_optr ::= db_optr update */ - 207, /* (120) db_optr ::= db_optr cachelast */ - 208, /* (121) topic_optr ::= db_optr */ - 208, /* (122) topic_optr ::= topic_optr partitions */ - 202, /* (123) alter_db_optr ::= */ - 202, /* (124) alter_db_optr ::= alter_db_optr replica */ - 202, /* (125) alter_db_optr ::= alter_db_optr quorum */ - 202, /* (126) alter_db_optr ::= alter_db_optr keep */ - 202, /* (127) alter_db_optr ::= alter_db_optr blocks */ - 202, /* (128) alter_db_optr ::= alter_db_optr comp */ - 202, /* (129) alter_db_optr ::= alter_db_optr update */ - 202, /* (130) alter_db_optr ::= alter_db_optr cachelast */ - 203, /* (131) alter_topic_optr ::= alter_db_optr */ - 203, /* (132) alter_topic_optr ::= alter_topic_optr partitions */ - 209, /* (133) typename ::= ids */ - 209, /* (134) typename ::= ids LP signed RP */ - 209, /* (135) typename ::= ids UNSIGNED */ - 238, /* (136) signed ::= INTEGER */ - 238, /* (137) signed ::= PLUS INTEGER */ - 238, /* (138) signed ::= MINUS INTEGER */ - 197, /* (139) cmd ::= CREATE TABLE create_table_args */ - 197, /* (140) cmd ::= CREATE TABLE create_stable_args */ - 197, /* (141) cmd ::= CREATE STABLE create_stable_args */ - 197, /* (142) cmd ::= CREATE TABLE create_table_list */ - 241, /* (143) create_table_list ::= create_from_stable */ - 241, /* (144) create_table_list ::= create_table_list create_from_stable */ - 239, /* (145) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ - 240, /* (146) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ - 242, /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ - 242, /* (148) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ - 245, /* (149) tagNamelist ::= tagNamelist COMMA ids */ - 245, /* (150) tagNamelist ::= ids */ - 239, /* (151) create_table_args ::= ifnotexists ids cpxName AS select */ - 243, /* (152) columnlist ::= columnlist COMMA column */ - 243, /* (153) columnlist ::= column */ - 247, /* (154) column ::= ids typename */ - 244, /* (155) tagitemlist ::= tagitemlist COMMA tagitem */ - 244, /* (156) tagitemlist ::= tagitem */ - 248, /* (157) tagitem ::= INTEGER */ - 248, /* (158) tagitem ::= FLOAT */ - 248, /* (159) tagitem ::= STRING */ - 248, /* (160) tagitem ::= BOOL */ - 248, /* (161) tagitem ::= NULL */ - 248, /* (162) tagitem ::= NOW */ - 248, /* (163) tagitem ::= MINUS INTEGER */ - 248, /* (164) tagitem ::= MINUS FLOAT */ - 248, /* (165) tagitem ::= PLUS INTEGER */ - 248, /* (166) tagitem ::= PLUS FLOAT */ - 246, /* (167) 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 */ - 246, /* (168) select ::= LP select RP */ - 262, /* (169) union ::= select */ - 262, /* (170) union ::= union UNION ALL select */ - 197, /* (171) cmd ::= union */ - 246, /* (172) select ::= SELECT selcollist */ - 263, /* (173) sclp ::= selcollist COMMA */ - 263, /* (174) sclp ::= */ - 249, /* (175) selcollist ::= sclp distinct expr as */ - 249, /* (176) selcollist ::= sclp STAR */ - 266, /* (177) as ::= AS ids */ - 266, /* (178) as ::= ids */ - 266, /* (179) as ::= */ - 264, /* (180) distinct ::= DISTINCT */ - 264, /* (181) distinct ::= */ - 250, /* (182) from ::= FROM tablelist */ - 250, /* (183) from ::= FROM sub */ - 268, /* (184) sub ::= LP union RP */ - 268, /* (185) sub ::= LP union RP ids */ - 268, /* (186) sub ::= sub COMMA LP union RP ids */ - 267, /* (187) tablelist ::= ids cpxName */ - 267, /* (188) tablelist ::= ids cpxName ids */ - 267, /* (189) tablelist ::= tablelist COMMA ids cpxName */ - 267, /* (190) tablelist ::= tablelist COMMA ids cpxName ids */ - 269, /* (191) tmvar ::= VARIABLE */ - 252, /* (192) interval_option ::= intervalKey LP tmvar RP */ - 252, /* (193) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ - 252, /* (194) interval_option ::= */ - 270, /* (195) intervalKey ::= INTERVAL */ - 270, /* (196) intervalKey ::= EVERY */ - 254, /* (197) session_option ::= */ - 254, /* (198) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ - 255, /* (199) windowstate_option ::= */ - 255, /* (200) windowstate_option ::= STATE_WINDOW LP ids RP */ - 256, /* (201) fill_opt ::= */ - 256, /* (202) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - 256, /* (203) fill_opt ::= FILL LP ID RP */ - 253, /* (204) sliding_opt ::= SLIDING LP tmvar RP */ - 253, /* (205) sliding_opt ::= */ - 259, /* (206) orderby_opt ::= */ - 259, /* (207) orderby_opt ::= ORDER BY sortlist */ - 271, /* (208) sortlist ::= sortlist COMMA item sortorder */ - 271, /* (209) sortlist ::= item sortorder */ - 273, /* (210) item ::= ids cpxName */ - 274, /* (211) sortorder ::= ASC */ - 274, /* (212) sortorder ::= DESC */ - 274, /* (213) sortorder ::= */ - 257, /* (214) groupby_opt ::= */ - 257, /* (215) groupby_opt ::= GROUP BY grouplist */ - 275, /* (216) grouplist ::= grouplist COMMA item */ - 275, /* (217) grouplist ::= item */ - 258, /* (218) having_opt ::= */ - 258, /* (219) having_opt ::= HAVING expr */ - 261, /* (220) limit_opt ::= */ - 261, /* (221) limit_opt ::= LIMIT signed */ - 261, /* (222) limit_opt ::= LIMIT signed OFFSET signed */ - 261, /* (223) limit_opt ::= LIMIT signed COMMA signed */ - 260, /* (224) slimit_opt ::= */ - 260, /* (225) slimit_opt ::= SLIMIT signed */ - 260, /* (226) slimit_opt ::= SLIMIT signed SOFFSET signed */ - 260, /* (227) slimit_opt ::= SLIMIT signed COMMA signed */ - 251, /* (228) where_opt ::= */ - 251, /* (229) where_opt ::= WHERE expr */ - 265, /* (230) expr ::= LP expr RP */ - 265, /* (231) expr ::= ID */ - 265, /* (232) expr ::= ID DOT ID */ - 265, /* (233) expr ::= ID DOT STAR */ - 265, /* (234) expr ::= INTEGER */ - 265, /* (235) expr ::= MINUS INTEGER */ - 265, /* (236) expr ::= PLUS INTEGER */ - 265, /* (237) expr ::= FLOAT */ - 265, /* (238) expr ::= MINUS FLOAT */ - 265, /* (239) expr ::= PLUS FLOAT */ - 265, /* (240) expr ::= STRING */ - 265, /* (241) expr ::= NOW */ - 265, /* (242) expr ::= VARIABLE */ - 265, /* (243) expr ::= PLUS VARIABLE */ - 265, /* (244) expr ::= MINUS VARIABLE */ - 265, /* (245) expr ::= BOOL */ - 265, /* (246) expr ::= NULL */ - 265, /* (247) expr ::= ID LP exprlist RP */ - 265, /* (248) expr ::= ID LP STAR RP */ - 265, /* (249) expr ::= expr IS NULL */ - 265, /* (250) expr ::= expr IS NOT NULL */ - 265, /* (251) expr ::= expr LT expr */ - 265, /* (252) expr ::= expr GT expr */ - 265, /* (253) expr ::= expr LE expr */ - 265, /* (254) expr ::= expr GE expr */ - 265, /* (255) expr ::= expr NE expr */ - 265, /* (256) expr ::= expr EQ expr */ - 265, /* (257) expr ::= expr BETWEEN expr AND expr */ - 265, /* (258) expr ::= expr AND expr */ - 265, /* (259) expr ::= expr OR expr */ - 265, /* (260) expr ::= expr PLUS expr */ - 265, /* (261) expr ::= expr MINUS expr */ - 265, /* (262) expr ::= expr STAR expr */ - 265, /* (263) expr ::= expr SLASH expr */ - 265, /* (264) expr ::= expr REM expr */ - 265, /* (265) expr ::= expr LIKE expr */ - 265, /* (266) expr ::= expr MATCH expr */ - 265, /* (267) expr ::= expr IN LP exprlist RP */ - 205, /* (268) exprlist ::= exprlist COMMA expritem */ - 205, /* (269) exprlist ::= expritem */ - 276, /* (270) expritem ::= expr */ - 276, /* (271) expritem ::= */ - 197, /* (272) cmd ::= RESET QUERY CACHE */ - 197, /* (273) cmd ::= SYNCDB ids REPLICA */ - 197, /* (274) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - 197, /* (275) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - 197, /* (276) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - 197, /* (277) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - 197, /* (278) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - 197, /* (279) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - 197, /* (280) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - 197, /* (281) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - 197, /* (282) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - 197, /* (283) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - 197, /* (284) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - 197, /* (285) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - 197, /* (286) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - 197, /* (287) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - 197, /* (288) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - 197, /* (289) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - 197, /* (290) cmd ::= KILL CONNECTION INTEGER */ - 197, /* (291) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - 197, /* (292) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + 197, /* (0) program ::= cmd */ + 198, /* (1) cmd ::= SHOW DATABASES */ + 198, /* (2) cmd ::= SHOW TOPICS */ + 198, /* (3) cmd ::= SHOW FUNCTIONS */ + 198, /* (4) cmd ::= SHOW MNODES */ + 198, /* (5) cmd ::= SHOW DNODES */ + 198, /* (6) cmd ::= SHOW ACCOUNTS */ + 198, /* (7) cmd ::= SHOW USERS */ + 198, /* (8) cmd ::= SHOW MODULES */ + 198, /* (9) cmd ::= SHOW QUERIES */ + 198, /* (10) cmd ::= SHOW CONNECTIONS */ + 198, /* (11) cmd ::= SHOW STREAMS */ + 198, /* (12) cmd ::= SHOW VARIABLES */ + 198, /* (13) cmd ::= SHOW SCORES */ + 198, /* (14) cmd ::= SHOW GRANTS */ + 198, /* (15) cmd ::= SHOW VNODES */ + 198, /* (16) cmd ::= SHOW VNODES ids */ + 200, /* (17) dbPrefix ::= */ + 200, /* (18) dbPrefix ::= ids DOT */ + 201, /* (19) cpxName ::= */ + 201, /* (20) cpxName ::= DOT ids */ + 198, /* (21) cmd ::= SHOW CREATE TABLE ids cpxName */ + 198, /* (22) cmd ::= SHOW CREATE STABLE ids cpxName */ + 198, /* (23) cmd ::= SHOW CREATE DATABASE ids */ + 198, /* (24) cmd ::= SHOW dbPrefix TABLES */ + 198, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */ + 198, /* (26) cmd ::= SHOW dbPrefix STABLES */ + 198, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */ + 198, /* (28) cmd ::= SHOW dbPrefix VGROUPS */ + 198, /* (29) cmd ::= SHOW dbPrefix VGROUPS ids */ + 198, /* (30) cmd ::= DROP TABLE ifexists ids cpxName */ + 198, /* (31) cmd ::= DROP STABLE ifexists ids cpxName */ + 198, /* (32) cmd ::= DROP DATABASE ifexists ids */ + 198, /* (33) cmd ::= DROP TOPIC ifexists ids */ + 198, /* (34) cmd ::= DROP FUNCTION ids */ + 198, /* (35) cmd ::= DROP DNODE ids */ + 198, /* (36) cmd ::= DROP USER ids */ + 198, /* (37) cmd ::= DROP ACCOUNT ids */ + 198, /* (38) cmd ::= USE ids */ + 198, /* (39) cmd ::= DESCRIBE ids cpxName */ + 198, /* (40) cmd ::= DESC ids cpxName */ + 198, /* (41) cmd ::= ALTER USER ids PASS ids */ + 198, /* (42) cmd ::= ALTER USER ids PRIVILEGE ids */ + 198, /* (43) cmd ::= ALTER DNODE ids ids */ + 198, /* (44) cmd ::= ALTER DNODE ids ids ids */ + 198, /* (45) cmd ::= ALTER LOCAL ids */ + 198, /* (46) cmd ::= ALTER LOCAL ids ids */ + 198, /* (47) cmd ::= ALTER DATABASE ids alter_db_optr */ + 198, /* (48) cmd ::= ALTER TOPIC ids alter_topic_optr */ + 198, /* (49) cmd ::= ALTER ACCOUNT ids acct_optr */ + 198, /* (50) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ + 198, /* (51) cmd ::= COMPACT VNODES IN LP exprlist RP */ + 199, /* (52) ids ::= ID */ + 199, /* (53) ids ::= STRING */ + 202, /* (54) ifexists ::= IF EXISTS */ + 202, /* (55) ifexists ::= */ + 207, /* (56) ifnotexists ::= IF NOT EXISTS */ + 207, /* (57) ifnotexists ::= */ + 198, /* (58) cmd ::= CREATE DNODE ids */ + 198, /* (59) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ + 198, /* (60) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + 198, /* (61) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ + 198, /* (62) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + 198, /* (63) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + 198, /* (64) cmd ::= CREATE USER ids PASS ids */ + 211, /* (65) bufsize ::= */ + 211, /* (66) bufsize ::= BUFSIZE INTEGER */ + 212, /* (67) pps ::= */ + 212, /* (68) pps ::= PPS INTEGER */ + 213, /* (69) tseries ::= */ + 213, /* (70) tseries ::= TSERIES INTEGER */ + 214, /* (71) dbs ::= */ + 214, /* (72) dbs ::= DBS INTEGER */ + 215, /* (73) streams ::= */ + 215, /* (74) streams ::= STREAMS INTEGER */ + 216, /* (75) storage ::= */ + 216, /* (76) storage ::= STORAGE INTEGER */ + 217, /* (77) qtime ::= */ + 217, /* (78) qtime ::= QTIME INTEGER */ + 218, /* (79) users ::= */ + 218, /* (80) users ::= USERS INTEGER */ + 219, /* (81) conns ::= */ + 219, /* (82) conns ::= CONNS INTEGER */ + 220, /* (83) state ::= */ + 220, /* (84) state ::= STATE ids */ + 205, /* (85) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ + 221, /* (86) intitemlist ::= intitemlist COMMA intitem */ + 221, /* (87) intitemlist ::= intitem */ + 222, /* (88) intitem ::= INTEGER */ + 223, /* (89) keep ::= KEEP intitemlist */ + 224, /* (90) cache ::= CACHE INTEGER */ + 225, /* (91) replica ::= REPLICA INTEGER */ + 226, /* (92) quorum ::= QUORUM INTEGER */ + 227, /* (93) days ::= DAYS INTEGER */ + 228, /* (94) minrows ::= MINROWS INTEGER */ + 229, /* (95) maxrows ::= MAXROWS INTEGER */ + 230, /* (96) blocks ::= BLOCKS INTEGER */ + 231, /* (97) ctime ::= CTIME INTEGER */ + 232, /* (98) wal ::= WAL INTEGER */ + 233, /* (99) fsync ::= FSYNC INTEGER */ + 234, /* (100) comp ::= COMP INTEGER */ + 235, /* (101) prec ::= PRECISION STRING */ + 236, /* (102) update ::= UPDATE INTEGER */ + 237, /* (103) cachelast ::= CACHELAST INTEGER */ + 238, /* (104) partitions ::= PARTITIONS INTEGER */ + 208, /* (105) db_optr ::= */ + 208, /* (106) db_optr ::= db_optr cache */ + 208, /* (107) db_optr ::= db_optr replica */ + 208, /* (108) db_optr ::= db_optr quorum */ + 208, /* (109) db_optr ::= db_optr days */ + 208, /* (110) db_optr ::= db_optr minrows */ + 208, /* (111) db_optr ::= db_optr maxrows */ + 208, /* (112) db_optr ::= db_optr blocks */ + 208, /* (113) db_optr ::= db_optr ctime */ + 208, /* (114) db_optr ::= db_optr wal */ + 208, /* (115) db_optr ::= db_optr fsync */ + 208, /* (116) db_optr ::= db_optr comp */ + 208, /* (117) db_optr ::= db_optr prec */ + 208, /* (118) db_optr ::= db_optr keep */ + 208, /* (119) db_optr ::= db_optr update */ + 208, /* (120) db_optr ::= db_optr cachelast */ + 209, /* (121) topic_optr ::= db_optr */ + 209, /* (122) topic_optr ::= topic_optr partitions */ + 203, /* (123) alter_db_optr ::= */ + 203, /* (124) alter_db_optr ::= alter_db_optr replica */ + 203, /* (125) alter_db_optr ::= alter_db_optr quorum */ + 203, /* (126) alter_db_optr ::= alter_db_optr keep */ + 203, /* (127) alter_db_optr ::= alter_db_optr blocks */ + 203, /* (128) alter_db_optr ::= alter_db_optr comp */ + 203, /* (129) alter_db_optr ::= alter_db_optr update */ + 203, /* (130) alter_db_optr ::= alter_db_optr cachelast */ + 204, /* (131) alter_topic_optr ::= alter_db_optr */ + 204, /* (132) alter_topic_optr ::= alter_topic_optr partitions */ + 210, /* (133) typename ::= ids */ + 210, /* (134) typename ::= ids LP signed RP */ + 210, /* (135) typename ::= ids UNSIGNED */ + 239, /* (136) signed ::= INTEGER */ + 239, /* (137) signed ::= PLUS INTEGER */ + 239, /* (138) signed ::= MINUS INTEGER */ + 198, /* (139) cmd ::= CREATE TABLE create_table_args */ + 198, /* (140) cmd ::= CREATE TABLE create_stable_args */ + 198, /* (141) cmd ::= CREATE STABLE create_stable_args */ + 198, /* (142) cmd ::= CREATE TABLE create_table_list */ + 242, /* (143) create_table_list ::= create_from_stable */ + 242, /* (144) create_table_list ::= create_table_list create_from_stable */ + 240, /* (145) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ + 241, /* (146) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ + 243, /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ + 243, /* (148) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ + 246, /* (149) tagNamelist ::= tagNamelist COMMA ids */ + 246, /* (150) tagNamelist ::= ids */ + 240, /* (151) create_table_args ::= ifnotexists ids cpxName AS select */ + 244, /* (152) columnlist ::= columnlist COMMA column */ + 244, /* (153) columnlist ::= column */ + 248, /* (154) column ::= ids typename */ + 245, /* (155) tagitemlist ::= tagitemlist COMMA tagitem */ + 245, /* (156) tagitemlist ::= tagitem */ + 249, /* (157) tagitem ::= INTEGER */ + 249, /* (158) tagitem ::= FLOAT */ + 249, /* (159) tagitem ::= STRING */ + 249, /* (160) tagitem ::= BOOL */ + 249, /* (161) tagitem ::= NULL */ + 249, /* (162) tagitem ::= NOW */ + 249, /* (163) tagitem ::= MINUS INTEGER */ + 249, /* (164) tagitem ::= MINUS FLOAT */ + 249, /* (165) tagitem ::= PLUS INTEGER */ + 249, /* (166) tagitem ::= PLUS FLOAT */ + 247, /* (167) 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 */ + 247, /* (168) select ::= LP select RP */ + 263, /* (169) union ::= select */ + 263, /* (170) union ::= union UNION ALL select */ + 198, /* (171) cmd ::= union */ + 247, /* (172) select ::= SELECT selcollist */ + 264, /* (173) sclp ::= selcollist COMMA */ + 264, /* (174) sclp ::= */ + 250, /* (175) selcollist ::= sclp distinct expr as */ + 250, /* (176) selcollist ::= sclp STAR */ + 267, /* (177) as ::= AS ids */ + 267, /* (178) as ::= ids */ + 267, /* (179) as ::= */ + 265, /* (180) distinct ::= DISTINCT */ + 265, /* (181) distinct ::= */ + 251, /* (182) from ::= FROM tablelist */ + 251, /* (183) from ::= FROM sub */ + 269, /* (184) sub ::= LP union RP */ + 269, /* (185) sub ::= LP union RP ids */ + 269, /* (186) sub ::= sub COMMA LP union RP ids */ + 268, /* (187) tablelist ::= ids cpxName */ + 268, /* (188) tablelist ::= ids cpxName ids */ + 268, /* (189) tablelist ::= tablelist COMMA ids cpxName */ + 268, /* (190) tablelist ::= tablelist COMMA ids cpxName ids */ + 270, /* (191) tmvar ::= VARIABLE */ + 253, /* (192) interval_option ::= intervalKey LP tmvar RP */ + 253, /* (193) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + 253, /* (194) interval_option ::= */ + 271, /* (195) intervalKey ::= INTERVAL */ + 271, /* (196) intervalKey ::= EVERY */ + 255, /* (197) session_option ::= */ + 255, /* (198) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + 256, /* (199) windowstate_option ::= */ + 256, /* (200) windowstate_option ::= STATE_WINDOW LP ids RP */ + 257, /* (201) fill_opt ::= */ + 257, /* (202) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + 257, /* (203) fill_opt ::= FILL LP ID RP */ + 254, /* (204) sliding_opt ::= SLIDING LP tmvar RP */ + 254, /* (205) sliding_opt ::= */ + 260, /* (206) orderby_opt ::= */ + 260, /* (207) orderby_opt ::= ORDER BY sortlist */ + 272, /* (208) sortlist ::= sortlist COMMA item sortorder */ + 272, /* (209) sortlist ::= item sortorder */ + 274, /* (210) item ::= ids cpxName */ + 275, /* (211) sortorder ::= ASC */ + 275, /* (212) sortorder ::= DESC */ + 275, /* (213) sortorder ::= */ + 258, /* (214) groupby_opt ::= */ + 258, /* (215) groupby_opt ::= GROUP BY grouplist */ + 276, /* (216) grouplist ::= grouplist COMMA item */ + 276, /* (217) grouplist ::= item */ + 259, /* (218) having_opt ::= */ + 259, /* (219) having_opt ::= HAVING expr */ + 262, /* (220) limit_opt ::= */ + 262, /* (221) limit_opt ::= LIMIT signed */ + 262, /* (222) limit_opt ::= LIMIT signed OFFSET signed */ + 262, /* (223) limit_opt ::= LIMIT signed COMMA signed */ + 261, /* (224) slimit_opt ::= */ + 261, /* (225) slimit_opt ::= SLIMIT signed */ + 261, /* (226) slimit_opt ::= SLIMIT signed SOFFSET signed */ + 261, /* (227) slimit_opt ::= SLIMIT signed COMMA signed */ + 252, /* (228) where_opt ::= */ + 252, /* (229) where_opt ::= WHERE expr */ + 266, /* (230) expr ::= LP expr RP */ + 266, /* (231) expr ::= ID */ + 266, /* (232) expr ::= ID DOT ID */ + 266, /* (233) expr ::= ID DOT STAR */ + 266, /* (234) expr ::= INTEGER */ + 266, /* (235) expr ::= MINUS INTEGER */ + 266, /* (236) expr ::= PLUS INTEGER */ + 266, /* (237) expr ::= FLOAT */ + 266, /* (238) expr ::= MINUS FLOAT */ + 266, /* (239) expr ::= PLUS FLOAT */ + 266, /* (240) expr ::= STRING */ + 266, /* (241) expr ::= NOW */ + 266, /* (242) expr ::= VARIABLE */ + 266, /* (243) expr ::= PLUS VARIABLE */ + 266, /* (244) expr ::= MINUS VARIABLE */ + 266, /* (245) expr ::= BOOL */ + 266, /* (246) expr ::= NULL */ + 266, /* (247) expr ::= ID LP exprlist RP */ + 266, /* (248) expr ::= ID LP STAR RP */ + 266, /* (249) expr ::= expr IS NULL */ + 266, /* (250) expr ::= expr IS NOT NULL */ + 266, /* (251) expr ::= expr LT expr */ + 266, /* (252) expr ::= expr GT expr */ + 266, /* (253) expr ::= expr LE expr */ + 266, /* (254) expr ::= expr GE expr */ + 266, /* (255) expr ::= expr NE expr */ + 266, /* (256) expr ::= expr EQ expr */ + 266, /* (257) expr ::= expr BETWEEN expr AND expr */ + 266, /* (258) expr ::= expr AND expr */ + 266, /* (259) expr ::= expr OR expr */ + 266, /* (260) expr ::= expr PLUS expr */ + 266, /* (261) expr ::= expr MINUS expr */ + 266, /* (262) expr ::= expr STAR expr */ + 266, /* (263) expr ::= expr SLASH expr */ + 266, /* (264) expr ::= expr REM expr */ + 266, /* (265) expr ::= expr LIKE expr */ + 266, /* (266) expr ::= expr MATCH expr */ + 266, /* (267) expr ::= expr NMATCH expr */ + 266, /* (268) expr ::= expr IN LP exprlist RP */ + 206, /* (269) exprlist ::= exprlist COMMA expritem */ + 206, /* (270) exprlist ::= expritem */ + 277, /* (271) expritem ::= expr */ + 277, /* (272) expritem ::= */ + 198, /* (273) cmd ::= RESET QUERY CACHE */ + 198, /* (274) cmd ::= SYNCDB ids REPLICA */ + 198, /* (275) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + 198, /* (276) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + 198, /* (277) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + 198, /* (278) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + 198, /* (279) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + 198, /* (280) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + 198, /* (281) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + 198, /* (282) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + 198, /* (283) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + 198, /* (284) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + 198, /* (285) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + 198, /* (286) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + 198, /* (287) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + 198, /* (288) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + 198, /* (289) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + 198, /* (290) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + 198, /* (291) cmd ::= KILL CONNECTION INTEGER */ + 198, /* (292) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + 198, /* (293) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -2430,32 +2435,33 @@ static const signed char yyRuleInfoNRhs[] = { -3, /* (264) expr ::= expr REM expr */ -3, /* (265) expr ::= expr LIKE expr */ -3, /* (266) expr ::= expr MATCH expr */ - -5, /* (267) expr ::= expr IN LP exprlist RP */ - -3, /* (268) exprlist ::= exprlist COMMA expritem */ - -1, /* (269) exprlist ::= expritem */ - -1, /* (270) expritem ::= expr */ - 0, /* (271) expritem ::= */ - -3, /* (272) cmd ::= RESET QUERY CACHE */ - -3, /* (273) cmd ::= SYNCDB ids REPLICA */ - -7, /* (274) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (275) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - -7, /* (276) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - -7, /* (277) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - -7, /* (278) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - -8, /* (279) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (280) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (281) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - -7, /* (282) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (283) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - -7, /* (284) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - -7, /* (285) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - -7, /* (286) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - -8, /* (287) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (288) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (289) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - -3, /* (290) cmd ::= KILL CONNECTION INTEGER */ - -5, /* (291) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - -5, /* (292) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + -3, /* (267) expr ::= expr NMATCH expr */ + -5, /* (268) expr ::= expr IN LP exprlist RP */ + -3, /* (269) exprlist ::= exprlist COMMA expritem */ + -1, /* (270) exprlist ::= expritem */ + -1, /* (271) expritem ::= expr */ + 0, /* (272) expritem ::= */ + -3, /* (273) cmd ::= RESET QUERY CACHE */ + -3, /* (274) cmd ::= SYNCDB ids REPLICA */ + -7, /* (275) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + -7, /* (276) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + -7, /* (277) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + -7, /* (278) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + -7, /* (279) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + -8, /* (280) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + -9, /* (281) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + -7, /* (282) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + -7, /* (283) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + -7, /* (284) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + -7, /* (285) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + -7, /* (286) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + -7, /* (287) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + -8, /* (288) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + -9, /* (289) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + -7, /* (290) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + -3, /* (291) cmd ::= KILL CONNECTION INTEGER */ + -5, /* (292) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + -5, /* (293) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2551,108 +2557,108 @@ static YYACTIONTYPE yy_reduce( case 141: /* cmd ::= CREATE STABLE create_stable_args */ yytestcase(yyruleno==141); #line 63 "sql.y" {} -#line 2555 "sql.c" +#line 2561 "sql.c" break; case 1: /* cmd ::= SHOW DATABASES */ #line 66 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_DB, 0, 0);} -#line 2560 "sql.c" +#line 2566 "sql.c" break; case 2: /* cmd ::= SHOW TOPICS */ #line 67 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_TP, 0, 0);} -#line 2565 "sql.c" +#line 2571 "sql.c" break; case 3: /* cmd ::= SHOW FUNCTIONS */ #line 68 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_FUNCTION, 0, 0);} -#line 2570 "sql.c" +#line 2576 "sql.c" break; case 4: /* cmd ::= SHOW MNODES */ #line 69 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_MNODE, 0, 0);} -#line 2575 "sql.c" +#line 2581 "sql.c" break; case 5: /* cmd ::= SHOW DNODES */ #line 70 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_DNODE, 0, 0);} -#line 2580 "sql.c" +#line 2586 "sql.c" break; case 6: /* cmd ::= SHOW ACCOUNTS */ #line 71 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_ACCT, 0, 0);} -#line 2585 "sql.c" +#line 2591 "sql.c" break; case 7: /* cmd ::= SHOW USERS */ #line 72 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_USER, 0, 0);} -#line 2590 "sql.c" +#line 2596 "sql.c" break; case 8: /* cmd ::= SHOW MODULES */ #line 74 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_MODULE, 0, 0); } -#line 2595 "sql.c" +#line 2601 "sql.c" break; case 9: /* cmd ::= SHOW QUERIES */ #line 75 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_QUERIES, 0, 0); } -#line 2600 "sql.c" +#line 2606 "sql.c" break; case 10: /* cmd ::= SHOW CONNECTIONS */ #line 76 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_CONNS, 0, 0);} -#line 2605 "sql.c" +#line 2611 "sql.c" break; case 11: /* cmd ::= SHOW STREAMS */ #line 77 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_STREAMS, 0, 0); } -#line 2610 "sql.c" +#line 2616 "sql.c" break; case 12: /* cmd ::= SHOW VARIABLES */ #line 78 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_VARIABLES, 0, 0); } -#line 2615 "sql.c" +#line 2621 "sql.c" break; case 13: /* cmd ::= SHOW SCORES */ #line 79 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_SCORES, 0, 0); } -#line 2620 "sql.c" +#line 2626 "sql.c" break; case 14: /* cmd ::= SHOW GRANTS */ #line 80 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_GRANTS, 0, 0); } -#line 2625 "sql.c" +#line 2631 "sql.c" break; case 15: /* cmd ::= SHOW VNODES */ #line 82 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, 0, 0); } -#line 2630 "sql.c" +#line 2636 "sql.c" break; case 16: /* cmd ::= SHOW VNODES ids */ #line 83 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, &yymsp[0].minor.yy0, 0); } -#line 2635 "sql.c" +#line 2641 "sql.c" break; case 17: /* dbPrefix ::= */ #line 87 "sql.y" {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.type = 0;} -#line 2640 "sql.c" +#line 2646 "sql.c" break; case 18: /* dbPrefix ::= ids DOT */ #line 88 "sql.y" {yylhsminor.yy0 = yymsp[-1].minor.yy0; } -#line 2645 "sql.c" +#line 2651 "sql.c" yymsp[-1].minor.yy0 = yylhsminor.yy0; break; case 19: /* cpxName ::= */ #line 91 "sql.y" {yymsp[1].minor.yy0.n = 0; } -#line 2651 "sql.c" +#line 2657 "sql.c" break; case 20: /* cpxName ::= DOT ids */ #line 92 "sql.y" {yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n += 1; } -#line 2656 "sql.c" +#line 2662 "sql.c" break; case 21: /* cmd ::= SHOW CREATE TABLE ids cpxName */ #line 94 "sql.y" @@ -2660,7 +2666,7 @@ static YYACTIONTYPE yy_reduce( yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &yymsp[-1].minor.yy0); } -#line 2664 "sql.c" +#line 2670 "sql.c" break; case 22: /* cmd ::= SHOW CREATE STABLE ids cpxName */ #line 98 "sql.y" @@ -2668,35 +2674,35 @@ static YYACTIONTYPE yy_reduce( yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_STABLE, 1, &yymsp[-1].minor.yy0); } -#line 2672 "sql.c" +#line 2678 "sql.c" break; case 23: /* cmd ::= SHOW CREATE DATABASE ids */ #line 103 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_DATABASE, 1, &yymsp[0].minor.yy0); } -#line 2679 "sql.c" +#line 2685 "sql.c" break; case 24: /* cmd ::= SHOW dbPrefix TABLES */ #line 107 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-1].minor.yy0, 0); } -#line 2686 "sql.c" +#line 2692 "sql.c" break; case 25: /* cmd ::= SHOW dbPrefix TABLES LIKE ids */ #line 111 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0); } -#line 2693 "sql.c" +#line 2699 "sql.c" break; case 26: /* cmd ::= SHOW dbPrefix STABLES */ #line 115 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &yymsp[-1].minor.yy0, 0); } -#line 2700 "sql.c" +#line 2706 "sql.c" break; case 27: /* cmd ::= SHOW dbPrefix STABLES LIKE ids */ #line 119 "sql.y" @@ -2705,7 +2711,7 @@ static YYACTIONTYPE yy_reduce( tSetDbName(&token, &yymsp[-3].minor.yy0); setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &token, &yymsp[0].minor.yy0); } -#line 2709 "sql.c" +#line 2715 "sql.c" break; case 28: /* cmd ::= SHOW dbPrefix VGROUPS */ #line 125 "sql.y" @@ -2714,7 +2720,7 @@ static YYACTIONTYPE yy_reduce( tSetDbName(&token, &yymsp[-1].minor.yy0); setShowOptions(pInfo, TSDB_MGMT_TABLE_VGROUP, &token, 0); } -#line 2718 "sql.c" +#line 2724 "sql.c" break; case 29: /* cmd ::= SHOW dbPrefix VGROUPS ids */ #line 131 "sql.y" @@ -2723,7 +2729,7 @@ static YYACTIONTYPE yy_reduce( tSetDbName(&token, &yymsp[-2].minor.yy0); setShowOptions(pInfo, TSDB_MGMT_TABLE_VGROUP, &token, &yymsp[0].minor.yy0); } -#line 2727 "sql.c" +#line 2733 "sql.c" break; case 30: /* cmd ::= DROP TABLE ifexists ids cpxName */ #line 138 "sql.y" @@ -2731,7 +2737,7 @@ static YYACTIONTYPE yy_reduce( yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[-1].minor.yy0, &yymsp[-2].minor.yy0, -1, -1); } -#line 2735 "sql.c" +#line 2741 "sql.c" break; case 31: /* cmd ::= DROP STABLE ifexists ids cpxName */ #line 144 "sql.y" @@ -2739,42 +2745,42 @@ static YYACTIONTYPE yy_reduce( yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[-1].minor.yy0, &yymsp[-2].minor.yy0, -1, TSDB_SUPER_TABLE); } -#line 2743 "sql.c" +#line 2749 "sql.c" break; case 32: /* cmd ::= DROP DATABASE ifexists ids */ #line 149 "sql.y" { setDropDbTableInfo(pInfo, TSDB_SQL_DROP_DB, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, TSDB_DB_TYPE_DEFAULT, -1); } -#line 2748 "sql.c" +#line 2754 "sql.c" break; case 33: /* cmd ::= DROP TOPIC ifexists ids */ #line 150 "sql.y" { setDropDbTableInfo(pInfo, TSDB_SQL_DROP_DB, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, TSDB_DB_TYPE_TOPIC, -1); } -#line 2753 "sql.c" +#line 2759 "sql.c" break; case 34: /* cmd ::= DROP FUNCTION ids */ #line 151 "sql.y" { setDropFuncInfo(pInfo, TSDB_SQL_DROP_FUNCTION, &yymsp[0].minor.yy0); } -#line 2758 "sql.c" +#line 2764 "sql.c" break; case 35: /* cmd ::= DROP DNODE ids */ #line 153 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_DROP_DNODE, 1, &yymsp[0].minor.yy0); } -#line 2763 "sql.c" +#line 2769 "sql.c" break; case 36: /* cmd ::= DROP USER ids */ #line 154 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_DROP_USER, 1, &yymsp[0].minor.yy0); } -#line 2768 "sql.c" +#line 2774 "sql.c" break; case 37: /* cmd ::= DROP ACCOUNT ids */ #line 155 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_DROP_ACCT, 1, &yymsp[0].minor.yy0); } -#line 2773 "sql.c" +#line 2779 "sql.c" break; case 38: /* cmd ::= USE ids */ #line 158 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_USE_DB, 1, &yymsp[0].minor.yy0);} -#line 2778 "sql.c" +#line 2784 "sql.c" break; case 39: /* cmd ::= DESCRIBE ids cpxName */ case 40: /* cmd ::= DESC ids cpxName */ yytestcase(yyruleno==40); @@ -2783,113 +2789,113 @@ static YYACTIONTYPE yy_reduce( yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &yymsp[-1].minor.yy0); } -#line 2787 "sql.c" +#line 2793 "sql.c" break; case 41: /* cmd ::= ALTER USER ids PASS ids */ #line 170 "sql.y" { setAlterUserSql(pInfo, TSDB_ALTER_USER_PASSWD, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, NULL); } -#line 2792 "sql.c" +#line 2798 "sql.c" break; case 42: /* cmd ::= ALTER USER ids PRIVILEGE ids */ #line 171 "sql.y" { setAlterUserSql(pInfo, TSDB_ALTER_USER_PRIVILEGES, &yymsp[-2].minor.yy0, NULL, &yymsp[0].minor.yy0);} -#line 2797 "sql.c" +#line 2803 "sql.c" break; case 43: /* cmd ::= ALTER DNODE ids ids */ #line 172 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 2802 "sql.c" +#line 2808 "sql.c" break; case 44: /* cmd ::= ALTER DNODE ids ids ids */ #line 173 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 3, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 2807 "sql.c" +#line 2813 "sql.c" break; case 45: /* cmd ::= ALTER LOCAL ids */ #line 174 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 1, &yymsp[0].minor.yy0); } -#line 2812 "sql.c" +#line 2818 "sql.c" break; case 46: /* cmd ::= ALTER LOCAL ids ids */ #line 175 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 2817 "sql.c" +#line 2823 "sql.c" break; case 47: /* cmd ::= ALTER DATABASE ids alter_db_optr */ case 48: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==48); #line 176 "sql.y" -{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy246, &t);} -#line 2823 "sql.c" +{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy90, &t);} +#line 2829 "sql.c" break; case 49: /* cmd ::= ALTER ACCOUNT ids acct_optr */ #line 179 "sql.y" -{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy377);} -#line 2828 "sql.c" +{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy171);} +#line 2834 "sql.c" break; case 50: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ #line 180 "sql.y" -{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy377);} -#line 2833 "sql.c" +{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy171);} +#line 2839 "sql.c" break; case 51: /* cmd ::= COMPACT VNODES IN LP exprlist RP */ #line 184 "sql.y" -{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy403);} -#line 2838 "sql.c" +{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy421);} +#line 2844 "sql.c" break; case 52: /* ids ::= ID */ case 53: /* ids ::= STRING */ yytestcase(yyruleno==53); #line 190 "sql.y" {yylhsminor.yy0 = yymsp[0].minor.yy0; } -#line 2844 "sql.c" +#line 2850 "sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; case 54: /* ifexists ::= IF EXISTS */ #line 194 "sql.y" { yymsp[-1].minor.yy0.n = 1;} -#line 2850 "sql.c" +#line 2856 "sql.c" break; case 55: /* ifexists ::= */ case 57: /* ifnotexists ::= */ yytestcase(yyruleno==57); case 181: /* distinct ::= */ yytestcase(yyruleno==181); #line 195 "sql.y" { yymsp[1].minor.yy0.n = 0;} -#line 2857 "sql.c" +#line 2863 "sql.c" break; case 56: /* ifnotexists ::= IF NOT EXISTS */ #line 198 "sql.y" { yymsp[-2].minor.yy0.n = 1;} -#line 2862 "sql.c" +#line 2868 "sql.c" break; case 58: /* cmd ::= CREATE DNODE ids */ #line 203 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &yymsp[0].minor.yy0);} -#line 2867 "sql.c" +#line 2873 "sql.c" break; case 59: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ #line 205 "sql.y" -{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy377);} -#line 2872 "sql.c" +{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy171);} +#line 2878 "sql.c" break; case 60: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ case 61: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==61); #line 206 "sql.y" -{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy246, &yymsp[-2].minor.yy0);} -#line 2878 "sql.c" +{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy90, &yymsp[-2].minor.yy0);} +#line 2884 "sql.c" break; case 62: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ #line 208 "sql.y" -{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy363, &yymsp[0].minor.yy0, 1);} -#line 2883 "sql.c" +{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy183, &yymsp[0].minor.yy0, 1);} +#line 2889 "sql.c" break; case 63: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ #line 209 "sql.y" -{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy363, &yymsp[0].minor.yy0, 2);} -#line 2888 "sql.c" +{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy183, &yymsp[0].minor.yy0, 2);} +#line 2894 "sql.c" break; case 64: /* cmd ::= CREATE USER ids PASS ids */ #line 210 "sql.y" { setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);} -#line 2893 "sql.c" +#line 2899 "sql.c" break; case 65: /* bufsize ::= */ case 67: /* pps ::= */ yytestcase(yyruleno==67); @@ -2903,7 +2909,7 @@ static YYACTIONTYPE yy_reduce( case 83: /* state ::= */ yytestcase(yyruleno==83); #line 212 "sql.y" { yymsp[1].minor.yy0.n = 0; } -#line 2907 "sql.c" +#line 2913 "sql.c" break; case 66: /* bufsize ::= BUFSIZE INTEGER */ case 68: /* pps ::= PPS INTEGER */ yytestcase(yyruleno==68); @@ -2917,37 +2923,37 @@ static YYACTIONTYPE yy_reduce( case 84: /* state ::= STATE ids */ yytestcase(yyruleno==84); #line 213 "sql.y" { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } -#line 2921 "sql.c" +#line 2927 "sql.c" break; case 85: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */ #line 243 "sql.y" { - yylhsminor.yy377.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1; - yylhsminor.yy377.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1; - yylhsminor.yy377.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1; - yylhsminor.yy377.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1; - yylhsminor.yy377.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1; - yylhsminor.yy377.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1; - yylhsminor.yy377.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1; - yylhsminor.yy377.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1; - yylhsminor.yy377.stat = yymsp[0].minor.yy0; + yylhsminor.yy171.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1; + yylhsminor.yy171.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1; + yylhsminor.yy171.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1; + yylhsminor.yy171.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1; + yylhsminor.yy171.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1; + yylhsminor.yy171.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1; + yylhsminor.yy171.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1; + yylhsminor.yy171.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1; + yylhsminor.yy171.stat = yymsp[0].minor.yy0; } -#line 2936 "sql.c" - yymsp[-8].minor.yy377 = yylhsminor.yy377; +#line 2942 "sql.c" + yymsp[-8].minor.yy171 = yylhsminor.yy171; break; case 86: /* intitemlist ::= intitemlist COMMA intitem */ case 155: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==155); #line 259 "sql.y" -{ yylhsminor.yy403 = tVariantListAppend(yymsp[-2].minor.yy403, &yymsp[0].minor.yy488, -1); } -#line 2943 "sql.c" - yymsp[-2].minor.yy403 = yylhsminor.yy403; +{ yylhsminor.yy421 = tVariantListAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy430, -1); } +#line 2949 "sql.c" + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; case 87: /* intitemlist ::= intitem */ case 156: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==156); #line 260 "sql.y" -{ yylhsminor.yy403 = tVariantListAppend(NULL, &yymsp[0].minor.yy488, -1); } -#line 2950 "sql.c" - yymsp[0].minor.yy403 = yylhsminor.yy403; +{ yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[0].minor.yy430, -1); } +#line 2956 "sql.c" + yymsp[0].minor.yy421 = yylhsminor.yy421; break; case 88: /* intitem ::= INTEGER */ case 157: /* tagitem ::= INTEGER */ yytestcase(yyruleno==157); @@ -2955,14 +2961,14 @@ static YYACTIONTYPE yy_reduce( case 159: /* tagitem ::= STRING */ yytestcase(yyruleno==159); case 160: /* tagitem ::= BOOL */ yytestcase(yyruleno==160); #line 262 "sql.y" -{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy488, &yymsp[0].minor.yy0); } -#line 2960 "sql.c" - yymsp[0].minor.yy488 = yylhsminor.yy488; +{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0); } +#line 2966 "sql.c" + yymsp[0].minor.yy430 = yylhsminor.yy430; break; case 89: /* keep ::= KEEP intitemlist */ #line 266 "sql.y" -{ yymsp[-1].minor.yy403 = yymsp[0].minor.yy403; } -#line 2966 "sql.c" +{ yymsp[-1].minor.yy421 = yymsp[0].minor.yy421; } +#line 2972 "sql.c" break; case 90: /* cache ::= CACHE INTEGER */ case 91: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==91); @@ -2981,182 +2987,182 @@ static YYACTIONTYPE yy_reduce( case 104: /* partitions ::= PARTITIONS INTEGER */ yytestcase(yyruleno==104); #line 268 "sql.y" { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } -#line 2985 "sql.c" +#line 2991 "sql.c" break; case 105: /* db_optr ::= */ #line 285 "sql.y" -{setDefaultCreateDbOption(&yymsp[1].minor.yy246); yymsp[1].minor.yy246.dbType = TSDB_DB_TYPE_DEFAULT;} -#line 2990 "sql.c" +{setDefaultCreateDbOption(&yymsp[1].minor.yy90); yymsp[1].minor.yy90.dbType = TSDB_DB_TYPE_DEFAULT;} +#line 2996 "sql.c" break; case 106: /* db_optr ::= db_optr cache */ #line 287 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 2995 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3001 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 107: /* db_optr ::= db_optr replica */ case 124: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==124); #line 288 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3002 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3008 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 108: /* db_optr ::= db_optr quorum */ case 125: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==125); #line 289 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3009 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3015 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 109: /* db_optr ::= db_optr days */ #line 290 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3015 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3021 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 110: /* db_optr ::= db_optr minrows */ #line 291 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } -#line 3021 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } +#line 3027 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 111: /* db_optr ::= db_optr maxrows */ #line 292 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } -#line 3027 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } +#line 3033 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 112: /* db_optr ::= db_optr blocks */ case 127: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==127); #line 293 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3034 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3040 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 113: /* db_optr ::= db_optr ctime */ #line 294 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3040 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3046 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 114: /* db_optr ::= db_optr wal */ #line 295 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3046 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3052 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 115: /* db_optr ::= db_optr fsync */ #line 296 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3052 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3058 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 116: /* db_optr ::= db_optr comp */ case 128: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==128); #line 297 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3059 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3065 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 117: /* db_optr ::= db_optr prec */ #line 298 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.precision = yymsp[0].minor.yy0; } -#line 3065 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.precision = yymsp[0].minor.yy0; } +#line 3071 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 118: /* db_optr ::= db_optr keep */ case 126: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==126); #line 299 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.keep = yymsp[0].minor.yy403; } -#line 3072 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.keep = yymsp[0].minor.yy421; } +#line 3078 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 119: /* db_optr ::= db_optr update */ case 129: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==129); #line 300 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3079 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3085 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 120: /* db_optr ::= db_optr cachelast */ case 130: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==130); #line 301 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3086 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3092 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 121: /* topic_optr ::= db_optr */ case 131: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==131); #line 305 "sql.y" -{ yylhsminor.yy246 = yymsp[0].minor.yy246; yylhsminor.yy246.dbType = TSDB_DB_TYPE_TOPIC; } -#line 3093 "sql.c" - yymsp[0].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[0].minor.yy90; yylhsminor.yy90.dbType = TSDB_DB_TYPE_TOPIC; } +#line 3099 "sql.c" + yymsp[0].minor.yy90 = yylhsminor.yy90; break; case 122: /* topic_optr ::= topic_optr partitions */ case 132: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==132); #line 306 "sql.y" -{ yylhsminor.yy246 = yymsp[-1].minor.yy246; yylhsminor.yy246.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3100 "sql.c" - yymsp[-1].minor.yy246 = yylhsminor.yy246; +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3106 "sql.c" + yymsp[-1].minor.yy90 = yylhsminor.yy90; break; case 123: /* alter_db_optr ::= */ #line 309 "sql.y" -{ setDefaultCreateDbOption(&yymsp[1].minor.yy246); yymsp[1].minor.yy246.dbType = TSDB_DB_TYPE_DEFAULT;} -#line 3106 "sql.c" +{ setDefaultCreateDbOption(&yymsp[1].minor.yy90); yymsp[1].minor.yy90.dbType = TSDB_DB_TYPE_DEFAULT;} +#line 3112 "sql.c" break; case 133: /* typename ::= ids */ #line 329 "sql.y" { yymsp[0].minor.yy0.type = 0; - tSetColumnType (&yylhsminor.yy363, &yymsp[0].minor.yy0); + tSetColumnType (&yylhsminor.yy183, &yymsp[0].minor.yy0); } -#line 3114 "sql.c" - yymsp[0].minor.yy363 = yylhsminor.yy363; +#line 3120 "sql.c" + yymsp[0].minor.yy183 = yylhsminor.yy183; break; case 134: /* typename ::= ids LP signed RP */ #line 335 "sql.y" { - if (yymsp[-1].minor.yy387 <= 0) { + if (yymsp[-1].minor.yy325 <= 0) { yymsp[-3].minor.yy0.type = 0; - tSetColumnType(&yylhsminor.yy363, &yymsp[-3].minor.yy0); + tSetColumnType(&yylhsminor.yy183, &yymsp[-3].minor.yy0); } else { - yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy387; // negative value of name length - tSetColumnType(&yylhsminor.yy363, &yymsp[-3].minor.yy0); + yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy325; // negative value of name length + tSetColumnType(&yylhsminor.yy183, &yymsp[-3].minor.yy0); } } -#line 3128 "sql.c" - yymsp[-3].minor.yy363 = yylhsminor.yy363; +#line 3134 "sql.c" + yymsp[-3].minor.yy183 = yylhsminor.yy183; break; case 135: /* typename ::= ids UNSIGNED */ #line 346 "sql.y" { 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.yy363, &yymsp[-1].minor.yy0); + tSetColumnType (&yylhsminor.yy183, &yymsp[-1].minor.yy0); } -#line 3138 "sql.c" - yymsp[-1].minor.yy363 = yylhsminor.yy363; +#line 3144 "sql.c" + yymsp[-1].minor.yy183 = yylhsminor.yy183; break; case 136: /* signed ::= INTEGER */ #line 353 "sql.y" -{ yylhsminor.yy387 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3144 "sql.c" - yymsp[0].minor.yy387 = yylhsminor.yy387; +{ yylhsminor.yy325 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3150 "sql.c" + yymsp[0].minor.yy325 = yylhsminor.yy325; break; case 137: /* signed ::= PLUS INTEGER */ #line 354 "sql.y" -{ yymsp[-1].minor.yy387 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3150 "sql.c" +{ yymsp[-1].minor.yy325 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +#line 3156 "sql.c" break; case 138: /* signed ::= MINUS INTEGER */ #line 355 "sql.y" -{ yymsp[-1].minor.yy387 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} -#line 3155 "sql.c" +{ yymsp[-1].minor.yy325 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} +#line 3161 "sql.c" break; case 142: /* cmd ::= CREATE TABLE create_table_list */ #line 361 "sql.y" -{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy56;} -#line 3160 "sql.c" +{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy438;} +#line 3166 "sql.c" break; case 143: /* create_table_list ::= create_from_stable */ #line 365 "sql.y" @@ -3164,121 +3170,121 @@ static YYACTIONTYPE yy_reduce( SCreateTableSql* pCreateTable = calloc(1, sizeof(SCreateTableSql)); pCreateTable->childTableInfo = taosArrayInit(4, sizeof(SCreatedTableInfo)); - taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy84); + taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy152); pCreateTable->type = TSQL_CREATE_TABLE_FROM_STABLE; - yylhsminor.yy56 = pCreateTable; + yylhsminor.yy438 = pCreateTable; } -#line 3172 "sql.c" - yymsp[0].minor.yy56 = yylhsminor.yy56; +#line 3178 "sql.c" + yymsp[0].minor.yy438 = yylhsminor.yy438; break; case 144: /* create_table_list ::= create_table_list create_from_stable */ #line 374 "sql.y" { - taosArrayPush(yymsp[-1].minor.yy56->childTableInfo, &yymsp[0].minor.yy84); - yylhsminor.yy56 = yymsp[-1].minor.yy56; + taosArrayPush(yymsp[-1].minor.yy438->childTableInfo, &yymsp[0].minor.yy152); + yylhsminor.yy438 = yymsp[-1].minor.yy438; } -#line 3181 "sql.c" - yymsp[-1].minor.yy56 = yylhsminor.yy56; +#line 3187 "sql.c" + yymsp[-1].minor.yy438 = yylhsminor.yy438; break; case 145: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ #line 380 "sql.y" { - yylhsminor.yy56 = tSetCreateTableInfo(yymsp[-1].minor.yy403, NULL, NULL, TSQL_CREATE_TABLE); - setSqlInfo(pInfo, yylhsminor.yy56, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-1].minor.yy421, NULL, NULL, TSQL_CREATE_TABLE); + setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; setCreatedTableName(pInfo, &yymsp[-4].minor.yy0, &yymsp[-5].minor.yy0); } -#line 3193 "sql.c" - yymsp[-5].minor.yy56 = yylhsminor.yy56; +#line 3199 "sql.c" + yymsp[-5].minor.yy438 = yylhsminor.yy438; break; case 146: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ #line 390 "sql.y" { - yylhsminor.yy56 = tSetCreateTableInfo(yymsp[-5].minor.yy403, yymsp[-1].minor.yy403, NULL, TSQL_CREATE_STABLE); - setSqlInfo(pInfo, yylhsminor.yy56, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-5].minor.yy421, yymsp[-1].minor.yy421, NULL, TSQL_CREATE_STABLE); + setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; setCreatedTableName(pInfo, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); } -#line 3205 "sql.c" - yymsp[-9].minor.yy56 = yylhsminor.yy56; +#line 3211 "sql.c" + yymsp[-9].minor.yy438 = yylhsminor.yy438; break; case 147: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ #line 401 "sql.y" { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; - yylhsminor.yy84 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy403, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); + yylhsminor.yy152 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy421, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); } -#line 3215 "sql.c" - yymsp[-9].minor.yy84 = yylhsminor.yy84; +#line 3221 "sql.c" + yymsp[-9].minor.yy152 = yylhsminor.yy152; break; case 148: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ #line 407 "sql.y" { yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; yymsp[-11].minor.yy0.n += yymsp[-10].minor.yy0.n; - yylhsminor.yy84 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy403, yymsp[-1].minor.yy403, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0); + yylhsminor.yy152 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy421, yymsp[-1].minor.yy421, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0); } -#line 3225 "sql.c" - yymsp[-12].minor.yy84 = yylhsminor.yy84; +#line 3231 "sql.c" + yymsp[-12].minor.yy152 = yylhsminor.yy152; break; case 149: /* tagNamelist ::= tagNamelist COMMA ids */ #line 415 "sql.y" -{taosArrayPush(yymsp[-2].minor.yy403, &yymsp[0].minor.yy0); yylhsminor.yy403 = yymsp[-2].minor.yy403; } -#line 3231 "sql.c" - yymsp[-2].minor.yy403 = yylhsminor.yy403; +{taosArrayPush(yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); yylhsminor.yy421 = yymsp[-2].minor.yy421; } +#line 3237 "sql.c" + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; case 150: /* tagNamelist ::= ids */ #line 416 "sql.y" -{yylhsminor.yy403 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy403, &yymsp[0].minor.yy0);} -#line 3237 "sql.c" - yymsp[0].minor.yy403 = yylhsminor.yy403; +{yylhsminor.yy421 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy421, &yymsp[0].minor.yy0);} +#line 3243 "sql.c" + yymsp[0].minor.yy421 = yylhsminor.yy421; break; case 151: /* create_table_args ::= ifnotexists ids cpxName AS select */ #line 420 "sql.y" { - yylhsminor.yy56 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy224, TSQL_CREATE_STREAM); - setSqlInfo(pInfo, yylhsminor.yy56, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy438 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy56, TSQL_CREATE_STREAM); + setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); yymsp[-3].minor.yy0.n += yymsp[-2].minor.yy0.n; setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0); } -#line 3249 "sql.c" - yymsp[-4].minor.yy56 = yylhsminor.yy56; +#line 3255 "sql.c" + yymsp[-4].minor.yy438 = yylhsminor.yy438; break; case 152: /* columnlist ::= columnlist COMMA column */ #line 431 "sql.y" -{taosArrayPush(yymsp[-2].minor.yy403, &yymsp[0].minor.yy363); yylhsminor.yy403 = yymsp[-2].minor.yy403; } -#line 3255 "sql.c" - yymsp[-2].minor.yy403 = yylhsminor.yy403; +{taosArrayPush(yymsp[-2].minor.yy421, &yymsp[0].minor.yy183); yylhsminor.yy421 = yymsp[-2].minor.yy421; } +#line 3261 "sql.c" + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; case 153: /* columnlist ::= column */ #line 432 "sql.y" -{yylhsminor.yy403 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy403, &yymsp[0].minor.yy363);} -#line 3261 "sql.c" - yymsp[0].minor.yy403 = yylhsminor.yy403; +{yylhsminor.yy421 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy421, &yymsp[0].minor.yy183);} +#line 3267 "sql.c" + yymsp[0].minor.yy421 = yylhsminor.yy421; break; case 154: /* column ::= ids typename */ #line 436 "sql.y" { - tSetColumnInfo(&yylhsminor.yy363, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy363); + tSetColumnInfo(&yylhsminor.yy183, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy183); } -#line 3269 "sql.c" - yymsp[-1].minor.yy363 = yylhsminor.yy363; +#line 3275 "sql.c" + yymsp[-1].minor.yy183 = yylhsminor.yy183; break; case 161: /* tagitem ::= NULL */ #line 451 "sql.y" -{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy488, &yymsp[0].minor.yy0); } -#line 3275 "sql.c" - yymsp[0].minor.yy488 = yylhsminor.yy488; +{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0); } +#line 3281 "sql.c" + yymsp[0].minor.yy430 = yylhsminor.yy430; break; case 162: /* tagitem ::= NOW */ #line 452 "sql.y" -{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&yylhsminor.yy488, &yymsp[0].minor.yy0);} -#line 3281 "sql.c" - yymsp[0].minor.yy488 = yylhsminor.yy488; +{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0);} +#line 3287 "sql.c" + yymsp[0].minor.yy430 = yylhsminor.yy430; break; case 163: /* tagitem ::= MINUS INTEGER */ case 164: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==164); @@ -3289,219 +3295,219 @@ static YYACTIONTYPE 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); - tVariantCreate(&yylhsminor.yy488, &yymsp[-1].minor.yy0); + tVariantCreate(&yylhsminor.yy430, &yymsp[-1].minor.yy0); } -#line 3295 "sql.c" - yymsp[-1].minor.yy488 = yylhsminor.yy488; +#line 3301 "sql.c" + yymsp[-1].minor.yy430 = yylhsminor.yy430; break; case 167: /* 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 */ #line 485 "sql.y" { - yylhsminor.yy224 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy403, yymsp[-11].minor.yy114, yymsp[-10].minor.yy260, yymsp[-4].minor.yy403, yymsp[-2].minor.yy403, &yymsp[-9].minor.yy222, &yymsp[-7].minor.yy365, &yymsp[-6].minor.yy544, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy403, &yymsp[0].minor.yy404, &yymsp[-1].minor.yy404, yymsp[-3].minor.yy260); + 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.yy166, &yymsp[-1].minor.yy166, yymsp[-3].minor.yy439); } -#line 3303 "sql.c" - yymsp[-13].minor.yy224 = yylhsminor.yy224; +#line 3309 "sql.c" + yymsp[-13].minor.yy56 = yylhsminor.yy56; break; case 168: /* select ::= LP select RP */ #line 489 "sql.y" -{yymsp[-2].minor.yy224 = yymsp[-1].minor.yy224;} -#line 3309 "sql.c" +{yymsp[-2].minor.yy56 = yymsp[-1].minor.yy56;} +#line 3315 "sql.c" break; case 169: /* union ::= select */ #line 493 "sql.y" -{ yylhsminor.yy403 = setSubclause(NULL, yymsp[0].minor.yy224); } -#line 3314 "sql.c" - yymsp[0].minor.yy403 = yylhsminor.yy403; +{ yylhsminor.yy421 = setSubclause(NULL, yymsp[0].minor.yy56); } +#line 3320 "sql.c" + yymsp[0].minor.yy421 = yylhsminor.yy421; break; case 170: /* union ::= union UNION ALL select */ #line 494 "sql.y" -{ yylhsminor.yy403 = appendSelectClause(yymsp[-3].minor.yy403, yymsp[0].minor.yy224); } -#line 3320 "sql.c" - yymsp[-3].minor.yy403 = yylhsminor.yy403; +{ yylhsminor.yy421 = appendSelectClause(yymsp[-3].minor.yy421, yymsp[0].minor.yy56); } +#line 3326 "sql.c" + yymsp[-3].minor.yy421 = yylhsminor.yy421; break; case 171: /* cmd ::= union */ #line 496 "sql.y" -{ setSqlInfo(pInfo, yymsp[0].minor.yy403, NULL, TSDB_SQL_SELECT); } -#line 3326 "sql.c" +{ setSqlInfo(pInfo, yymsp[0].minor.yy421, NULL, TSDB_SQL_SELECT); } +#line 3332 "sql.c" break; case 172: /* select ::= SELECT selcollist */ #line 503 "sql.y" { - yylhsminor.yy224 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy403, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + yylhsminor.yy56 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy421, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } -#line 3333 "sql.c" - yymsp[-1].minor.yy224 = yylhsminor.yy224; +#line 3339 "sql.c" + yymsp[-1].minor.yy56 = yylhsminor.yy56; break; case 173: /* sclp ::= selcollist COMMA */ #line 515 "sql.y" -{yylhsminor.yy403 = yymsp[-1].minor.yy403;} -#line 3339 "sql.c" - yymsp[-1].minor.yy403 = yylhsminor.yy403; +{yylhsminor.yy421 = yymsp[-1].minor.yy421;} +#line 3345 "sql.c" + yymsp[-1].minor.yy421 = yylhsminor.yy421; break; case 174: /* sclp ::= */ case 206: /* orderby_opt ::= */ yytestcase(yyruleno==206); #line 516 "sql.y" -{yymsp[1].minor.yy403 = 0;} -#line 3346 "sql.c" +{yymsp[1].minor.yy421 = 0;} +#line 3352 "sql.c" break; case 175: /* selcollist ::= sclp distinct expr as */ #line 517 "sql.y" { - yylhsminor.yy403 = tSqlExprListAppend(yymsp[-3].minor.yy403, yymsp[-1].minor.yy260, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); + 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); } -#line 3353 "sql.c" - yymsp[-3].minor.yy403 = yylhsminor.yy403; +#line 3359 "sql.c" + yymsp[-3].minor.yy421 = yylhsminor.yy421; break; case 176: /* selcollist ::= sclp STAR */ #line 521 "sql.y" { tSqlExpr *pNode = tSqlExprCreateIdValue(NULL, TK_ALL); - yylhsminor.yy403 = tSqlExprListAppend(yymsp[-1].minor.yy403, pNode, 0, 0); + yylhsminor.yy421 = tSqlExprListAppend(yymsp[-1].minor.yy421, pNode, 0, 0); } -#line 3362 "sql.c" - yymsp[-1].minor.yy403 = yylhsminor.yy403; +#line 3368 "sql.c" + yymsp[-1].minor.yy421 = yylhsminor.yy421; break; case 177: /* as ::= AS ids */ #line 529 "sql.y" { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } -#line 3368 "sql.c" +#line 3374 "sql.c" break; case 178: /* as ::= ids */ #line 530 "sql.y" { yylhsminor.yy0 = yymsp[0].minor.yy0; } -#line 3373 "sql.c" +#line 3379 "sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; case 179: /* as ::= */ #line 531 "sql.y" { yymsp[1].minor.yy0.n = 0; } -#line 3379 "sql.c" +#line 3385 "sql.c" break; case 180: /* distinct ::= DISTINCT */ #line 534 "sql.y" { yylhsminor.yy0 = yymsp[0].minor.yy0; } -#line 3384 "sql.c" +#line 3390 "sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; case 182: /* from ::= FROM tablelist */ case 183: /* from ::= FROM sub */ yytestcase(yyruleno==183); #line 540 "sql.y" -{yymsp[-1].minor.yy114 = yymsp[0].minor.yy114;} -#line 3391 "sql.c" +{yymsp[-1].minor.yy8 = yymsp[0].minor.yy8;} +#line 3397 "sql.c" break; case 184: /* sub ::= LP union RP */ #line 545 "sql.y" -{yymsp[-2].minor.yy114 = addSubqueryElem(NULL, yymsp[-1].minor.yy403, NULL);} -#line 3396 "sql.c" +{yymsp[-2].minor.yy8 = addSubqueryElem(NULL, yymsp[-1].minor.yy421, NULL);} +#line 3402 "sql.c" break; case 185: /* sub ::= LP union RP ids */ #line 546 "sql.y" -{yymsp[-3].minor.yy114 = addSubqueryElem(NULL, yymsp[-2].minor.yy403, &yymsp[0].minor.yy0);} -#line 3401 "sql.c" +{yymsp[-3].minor.yy8 = addSubqueryElem(NULL, yymsp[-2].minor.yy421, &yymsp[0].minor.yy0);} +#line 3407 "sql.c" break; case 186: /* sub ::= sub COMMA LP union RP ids */ #line 547 "sql.y" -{yylhsminor.yy114 = addSubqueryElem(yymsp[-5].minor.yy114, yymsp[-2].minor.yy403, &yymsp[0].minor.yy0);} -#line 3406 "sql.c" - yymsp[-5].minor.yy114 = yylhsminor.yy114; +{yylhsminor.yy8 = addSubqueryElem(yymsp[-5].minor.yy8, yymsp[-2].minor.yy421, &yymsp[0].minor.yy0);} +#line 3412 "sql.c" + yymsp[-5].minor.yy8 = yylhsminor.yy8; break; case 187: /* tablelist ::= ids cpxName */ #line 551 "sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - yylhsminor.yy114 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); + yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); } -#line 3415 "sql.c" - yymsp[-1].minor.yy114 = yylhsminor.yy114; +#line 3421 "sql.c" + yymsp[-1].minor.yy8 = yylhsminor.yy8; break; case 188: /* tablelist ::= ids cpxName ids */ #line 556 "sql.y" { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; - yylhsminor.yy114 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); + yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } -#line 3424 "sql.c" - yymsp[-2].minor.yy114 = yylhsminor.yy114; +#line 3430 "sql.c" + yymsp[-2].minor.yy8 = yylhsminor.yy8; break; case 189: /* tablelist ::= tablelist COMMA ids cpxName */ #line 561 "sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - yylhsminor.yy114 = setTableNameList(yymsp[-3].minor.yy114, &yymsp[-1].minor.yy0, NULL); + yylhsminor.yy8 = setTableNameList(yymsp[-3].minor.yy8, &yymsp[-1].minor.yy0, NULL); } -#line 3433 "sql.c" - yymsp[-3].minor.yy114 = yylhsminor.yy114; +#line 3439 "sql.c" + yymsp[-3].minor.yy8 = yylhsminor.yy8; break; case 190: /* tablelist ::= tablelist COMMA ids cpxName ids */ #line 566 "sql.y" { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; - yylhsminor.yy114 = setTableNameList(yymsp[-4].minor.yy114, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); + yylhsminor.yy8 = setTableNameList(yymsp[-4].minor.yy8, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } -#line 3442 "sql.c" - yymsp[-4].minor.yy114 = yylhsminor.yy114; +#line 3448 "sql.c" + yymsp[-4].minor.yy8 = yylhsminor.yy8; break; case 191: /* tmvar ::= VARIABLE */ #line 573 "sql.y" {yylhsminor.yy0 = yymsp[0].minor.yy0;} -#line 3448 "sql.c" +#line 3454 "sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; case 192: /* interval_option ::= intervalKey LP tmvar RP */ #line 576 "sql.y" -{yylhsminor.yy222.interval = yymsp[-1].minor.yy0; yylhsminor.yy222.offset.n = 0; yylhsminor.yy222.token = yymsp[-3].minor.yy202;} -#line 3454 "sql.c" - yymsp[-3].minor.yy222 = yylhsminor.yy222; +{yylhsminor.yy400.interval = yymsp[-1].minor.yy0; yylhsminor.yy400.offset.n = 0; yylhsminor.yy400.token = yymsp[-3].minor.yy104;} +#line 3460 "sql.c" + yymsp[-3].minor.yy400 = yylhsminor.yy400; break; case 193: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ #line 577 "sql.y" -{yylhsminor.yy222.interval = yymsp[-3].minor.yy0; yylhsminor.yy222.offset = yymsp[-1].minor.yy0; yylhsminor.yy222.token = yymsp[-5].minor.yy202;} -#line 3460 "sql.c" - yymsp[-5].minor.yy222 = yylhsminor.yy222; +{yylhsminor.yy400.interval = yymsp[-3].minor.yy0; yylhsminor.yy400.offset = yymsp[-1].minor.yy0; yylhsminor.yy400.token = yymsp[-5].minor.yy104;} +#line 3466 "sql.c" + yymsp[-5].minor.yy400 = yylhsminor.yy400; break; case 194: /* interval_option ::= */ #line 578 "sql.y" -{memset(&yymsp[1].minor.yy222, 0, sizeof(yymsp[1].minor.yy222));} -#line 3466 "sql.c" +{memset(&yymsp[1].minor.yy400, 0, sizeof(yymsp[1].minor.yy400));} +#line 3472 "sql.c" break; case 195: /* intervalKey ::= INTERVAL */ #line 581 "sql.y" -{yymsp[0].minor.yy202 = TK_INTERVAL;} -#line 3471 "sql.c" +{yymsp[0].minor.yy104 = TK_INTERVAL;} +#line 3477 "sql.c" break; case 196: /* intervalKey ::= EVERY */ #line 582 "sql.y" -{yymsp[0].minor.yy202 = TK_EVERY; } -#line 3476 "sql.c" +{yymsp[0].minor.yy104 = TK_EVERY; } +#line 3482 "sql.c" break; case 197: /* session_option ::= */ #line 585 "sql.y" -{yymsp[1].minor.yy365.col.n = 0; yymsp[1].minor.yy365.gap.n = 0;} -#line 3481 "sql.c" +{yymsp[1].minor.yy147.col.n = 0; yymsp[1].minor.yy147.gap.n = 0;} +#line 3487 "sql.c" break; case 198: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ #line 586 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - yymsp[-6].minor.yy365.col = yymsp[-4].minor.yy0; - yymsp[-6].minor.yy365.gap = yymsp[-1].minor.yy0; + yymsp[-6].minor.yy147.col = yymsp[-4].minor.yy0; + yymsp[-6].minor.yy147.gap = yymsp[-1].minor.yy0; } -#line 3490 "sql.c" +#line 3496 "sql.c" break; case 199: /* windowstate_option ::= */ #line 593 "sql.y" -{ yymsp[1].minor.yy544.col.n = 0; yymsp[1].minor.yy544.col.z = NULL;} -#line 3495 "sql.c" +{ yymsp[1].minor.yy40.col.n = 0; yymsp[1].minor.yy40.col.z = NULL;} +#line 3501 "sql.c" break; case 200: /* windowstate_option ::= STATE_WINDOW LP ids RP */ #line 594 "sql.y" -{ yymsp[-3].minor.yy544.col = yymsp[-1].minor.yy0; } -#line 3500 "sql.c" +{ yymsp[-3].minor.yy40.col = yymsp[-1].minor.yy0; } +#line 3506 "sql.c" break; case 201: /* fill_opt ::= */ #line 598 "sql.y" -{ yymsp[1].minor.yy403 = 0; } -#line 3505 "sql.c" +{ yymsp[1].minor.yy421 = 0; } +#line 3511 "sql.c" break; case 202: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ #line 599 "sql.y" @@ -3510,49 +3516,49 @@ static YYACTIONTYPE yy_reduce( toTSDBType(yymsp[-3].minor.yy0.type); tVariantCreate(&A, &yymsp[-3].minor.yy0); - tVariantListInsert(yymsp[-1].minor.yy403, &A, -1, 0); - yymsp[-5].minor.yy403 = yymsp[-1].minor.yy403; + tVariantListInsert(yymsp[-1].minor.yy421, &A, -1, 0); + yymsp[-5].minor.yy421 = yymsp[-1].minor.yy421; } -#line 3517 "sql.c" +#line 3523 "sql.c" break; case 203: /* fill_opt ::= FILL LP ID RP */ #line 608 "sql.y" { toTSDBType(yymsp[-1].minor.yy0.type); - yymsp[-3].minor.yy403 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); + yymsp[-3].minor.yy421 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); } -#line 3525 "sql.c" +#line 3531 "sql.c" break; case 204: /* sliding_opt ::= SLIDING LP tmvar RP */ #line 614 "sql.y" {yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; } -#line 3530 "sql.c" +#line 3536 "sql.c" break; case 205: /* sliding_opt ::= */ #line 615 "sql.y" {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; } -#line 3535 "sql.c" +#line 3541 "sql.c" break; case 207: /* orderby_opt ::= ORDER BY sortlist */ #line 627 "sql.y" -{yymsp[-2].minor.yy403 = yymsp[0].minor.yy403;} -#line 3540 "sql.c" +{yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} +#line 3546 "sql.c" break; case 208: /* sortlist ::= sortlist COMMA item sortorder */ #line 629 "sql.y" { - yylhsminor.yy403 = tVariantListAppend(yymsp[-3].minor.yy403, &yymsp[-1].minor.yy488, yymsp[0].minor.yy70); + yylhsminor.yy421 = tVariantListAppend(yymsp[-3].minor.yy421, &yymsp[-1].minor.yy430, yymsp[0].minor.yy96); } -#line 3547 "sql.c" - yymsp[-3].minor.yy403 = yylhsminor.yy403; +#line 3553 "sql.c" + yymsp[-3].minor.yy421 = yylhsminor.yy421; break; case 209: /* sortlist ::= item sortorder */ #line 633 "sql.y" { - yylhsminor.yy403 = tVariantListAppend(NULL, &yymsp[-1].minor.yy488, yymsp[0].minor.yy70); + yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[-1].minor.yy430, yymsp[0].minor.yy96); } -#line 3555 "sql.c" - yymsp[-1].minor.yy403 = yylhsminor.yy403; +#line 3561 "sql.c" + yymsp[-1].minor.yy421 = yylhsminor.yy421; break; case 210: /* item ::= ids cpxName */ #line 638 "sql.y" @@ -3560,349 +3566,355 @@ static YYACTIONTYPE yy_reduce( toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - tVariantCreate(&yylhsminor.yy488, &yymsp[-1].minor.yy0); + tVariantCreate(&yylhsminor.yy430, &yymsp[-1].minor.yy0); } -#line 3566 "sql.c" - yymsp[-1].minor.yy488 = yylhsminor.yy488; +#line 3572 "sql.c" + yymsp[-1].minor.yy430 = yylhsminor.yy430; break; case 211: /* sortorder ::= ASC */ #line 646 "sql.y" -{ yymsp[0].minor.yy70 = TSDB_ORDER_ASC; } -#line 3572 "sql.c" +{ yymsp[0].minor.yy96 = TSDB_ORDER_ASC; } +#line 3578 "sql.c" break; case 212: /* sortorder ::= DESC */ #line 647 "sql.y" -{ yymsp[0].minor.yy70 = TSDB_ORDER_DESC;} -#line 3577 "sql.c" +{ yymsp[0].minor.yy96 = TSDB_ORDER_DESC;} +#line 3583 "sql.c" break; case 213: /* sortorder ::= */ #line 648 "sql.y" -{ yymsp[1].minor.yy70 = TSDB_ORDER_ASC; } -#line 3582 "sql.c" +{ yymsp[1].minor.yy96 = TSDB_ORDER_ASC; } +#line 3588 "sql.c" break; case 214: /* groupby_opt ::= */ #line 656 "sql.y" -{ yymsp[1].minor.yy403 = 0;} -#line 3587 "sql.c" +{ yymsp[1].minor.yy421 = 0;} +#line 3593 "sql.c" break; case 215: /* groupby_opt ::= GROUP BY grouplist */ #line 657 "sql.y" -{ yymsp[-2].minor.yy403 = yymsp[0].minor.yy403;} -#line 3592 "sql.c" +{ yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} +#line 3598 "sql.c" break; case 216: /* grouplist ::= grouplist COMMA item */ #line 659 "sql.y" { - yylhsminor.yy403 = tVariantListAppend(yymsp[-2].minor.yy403, &yymsp[0].minor.yy488, -1); + yylhsminor.yy421 = tVariantListAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy430, -1); } -#line 3599 "sql.c" - yymsp[-2].minor.yy403 = yylhsminor.yy403; +#line 3605 "sql.c" + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; case 217: /* grouplist ::= item */ #line 663 "sql.y" { - yylhsminor.yy403 = tVariantListAppend(NULL, &yymsp[0].minor.yy488, -1); + yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[0].minor.yy430, -1); } -#line 3607 "sql.c" - yymsp[0].minor.yy403 = yylhsminor.yy403; +#line 3613 "sql.c" + yymsp[0].minor.yy421 = yylhsminor.yy421; break; case 218: /* having_opt ::= */ case 228: /* where_opt ::= */ yytestcase(yyruleno==228); - case 271: /* expritem ::= */ yytestcase(yyruleno==271); + case 272: /* expritem ::= */ yytestcase(yyruleno==272); #line 670 "sql.y" -{yymsp[1].minor.yy260 = 0;} -#line 3615 "sql.c" +{yymsp[1].minor.yy439 = 0;} +#line 3621 "sql.c" break; case 219: /* having_opt ::= HAVING expr */ case 229: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==229); #line 671 "sql.y" -{yymsp[-1].minor.yy260 = yymsp[0].minor.yy260;} -#line 3621 "sql.c" +{yymsp[-1].minor.yy439 = yymsp[0].minor.yy439;} +#line 3627 "sql.c" break; case 220: /* limit_opt ::= */ case 224: /* slimit_opt ::= */ yytestcase(yyruleno==224); #line 675 "sql.y" -{yymsp[1].minor.yy404.limit = -1; yymsp[1].minor.yy404.offset = 0;} -#line 3627 "sql.c" +{yymsp[1].minor.yy166.limit = -1; yymsp[1].minor.yy166.offset = 0;} +#line 3633 "sql.c" break; case 221: /* limit_opt ::= LIMIT signed */ case 225: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==225); #line 676 "sql.y" -{yymsp[-1].minor.yy404.limit = yymsp[0].minor.yy387; yymsp[-1].minor.yy404.offset = 0;} -#line 3633 "sql.c" +{yymsp[-1].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-1].minor.yy166.offset = 0;} +#line 3639 "sql.c" break; case 222: /* limit_opt ::= LIMIT signed OFFSET signed */ #line 678 "sql.y" -{ yymsp[-3].minor.yy404.limit = yymsp[-2].minor.yy387; yymsp[-3].minor.yy404.offset = yymsp[0].minor.yy387;} -#line 3638 "sql.c" +{ yymsp[-3].minor.yy166.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[0].minor.yy325;} +#line 3644 "sql.c" break; case 223: /* limit_opt ::= LIMIT signed COMMA signed */ #line 680 "sql.y" -{ yymsp[-3].minor.yy404.limit = yymsp[0].minor.yy387; yymsp[-3].minor.yy404.offset = yymsp[-2].minor.yy387;} -#line 3643 "sql.c" +{ yymsp[-3].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[-2].minor.yy325;} +#line 3649 "sql.c" break; case 226: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ #line 686 "sql.y" -{yymsp[-3].minor.yy404.limit = yymsp[-2].minor.yy387; yymsp[-3].minor.yy404.offset = yymsp[0].minor.yy387;} -#line 3648 "sql.c" +{yymsp[-3].minor.yy166.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[0].minor.yy325;} +#line 3654 "sql.c" break; case 227: /* slimit_opt ::= SLIMIT signed COMMA signed */ #line 688 "sql.y" -{yymsp[-3].minor.yy404.limit = yymsp[0].minor.yy387; yymsp[-3].minor.yy404.offset = yymsp[-2].minor.yy387;} -#line 3653 "sql.c" +{yymsp[-3].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[-2].minor.yy325;} +#line 3659 "sql.c" break; case 230: /* expr ::= LP expr RP */ #line 701 "sql.y" -{yylhsminor.yy260 = yymsp[-1].minor.yy260; yylhsminor.yy260->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy260->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);} -#line 3658 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{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);} +#line 3664 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 231: /* expr ::= ID */ #line 703 "sql.y" -{ yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} -#line 3664 "sql.c" - yymsp[0].minor.yy260 = yylhsminor.yy260; +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} +#line 3670 "sql.c" + yymsp[0].minor.yy439 = yylhsminor.yy439; break; case 232: /* expr ::= ID DOT ID */ #line 704 "sql.y" -{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);} -#line 3670 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);} +#line 3676 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 233: /* expr ::= ID DOT STAR */ #line 705 "sql.y" -{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);} -#line 3676 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);} +#line 3682 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 234: /* expr ::= INTEGER */ #line 707 "sql.y" -{ yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} -#line 3682 "sql.c" - yymsp[0].minor.yy260 = yylhsminor.yy260; +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} +#line 3688 "sql.c" + yymsp[0].minor.yy439 = yylhsminor.yy439; break; case 235: /* expr ::= MINUS INTEGER */ case 236: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==236); #line 708 "sql.y" -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);} -#line 3689 "sql.c" - yymsp[-1].minor.yy260 = yylhsminor.yy260; +{ 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);} +#line 3695 "sql.c" + yymsp[-1].minor.yy439 = yylhsminor.yy439; break; case 237: /* expr ::= FLOAT */ #line 710 "sql.y" -{ yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} -#line 3695 "sql.c" - yymsp[0].minor.yy260 = yylhsminor.yy260; +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} +#line 3701 "sql.c" + yymsp[0].minor.yy439 = yylhsminor.yy439; break; case 238: /* expr ::= MINUS FLOAT */ case 239: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==239); #line 711 "sql.y" -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);} -#line 3702 "sql.c" - yymsp[-1].minor.yy260 = yylhsminor.yy260; +{ 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);} +#line 3708 "sql.c" + yymsp[-1].minor.yy439 = yylhsminor.yy439; break; case 240: /* expr ::= STRING */ #line 713 "sql.y" -{ yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} -#line 3708 "sql.c" - yymsp[0].minor.yy260 = yylhsminor.yy260; +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} +#line 3714 "sql.c" + yymsp[0].minor.yy439 = yylhsminor.yy439; break; case 241: /* expr ::= NOW */ #line 714 "sql.y" -{ yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } -#line 3714 "sql.c" - yymsp[0].minor.yy260 = yylhsminor.yy260; +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } +#line 3720 "sql.c" + yymsp[0].minor.yy439 = yylhsminor.yy439; break; case 242: /* expr ::= VARIABLE */ #line 715 "sql.y" -{ yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} -#line 3720 "sql.c" - yymsp[0].minor.yy260 = yylhsminor.yy260; +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} +#line 3726 "sql.c" + yymsp[0].minor.yy439 = yylhsminor.yy439; break; case 243: /* expr ::= PLUS VARIABLE */ case 244: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==244); #line 716 "sql.y" -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);} -#line 3727 "sql.c" - yymsp[-1].minor.yy260 = yylhsminor.yy260; +{ 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);} +#line 3733 "sql.c" + yymsp[-1].minor.yy439 = yylhsminor.yy439; break; case 245: /* expr ::= BOOL */ #line 718 "sql.y" -{ yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} -#line 3733 "sql.c" - yymsp[0].minor.yy260 = yylhsminor.yy260; +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} +#line 3739 "sql.c" + yymsp[0].minor.yy439 = yylhsminor.yy439; break; case 246: /* expr ::= NULL */ #line 719 "sql.y" -{ yylhsminor.yy260 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} -#line 3739 "sql.c" - yymsp[0].minor.yy260 = yylhsminor.yy260; +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} +#line 3745 "sql.c" + yymsp[0].minor.yy439 = yylhsminor.yy439; break; case 247: /* expr ::= ID LP exprlist RP */ #line 722 "sql.y" -{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy260 = tSqlExprCreateFunction(yymsp[-1].minor.yy403, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } -#line 3745 "sql.c" - yymsp[-3].minor.yy260 = yylhsminor.yy260; +{ tStrTokenAppend(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); } +#line 3751 "sql.c" + yymsp[-3].minor.yy439 = yylhsminor.yy439; break; case 248: /* expr ::= ID LP STAR RP */ #line 725 "sql.y" -{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy260 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } -#line 3751 "sql.c" - yymsp[-3].minor.yy260 = yylhsminor.yy260; +{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy439 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } +#line 3757 "sql.c" + yymsp[-3].minor.yy439 = yylhsminor.yy439; break; case 249: /* expr ::= expr IS NULL */ #line 728 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, NULL, TK_ISNULL);} -#line 3757 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, NULL, TK_ISNULL);} +#line 3763 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 250: /* expr ::= expr IS NOT NULL */ #line 729 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-3].minor.yy260, NULL, TK_NOTNULL);} -#line 3763 "sql.c" - yymsp[-3].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-3].minor.yy439, NULL, TK_NOTNULL);} +#line 3769 "sql.c" + yymsp[-3].minor.yy439 = yylhsminor.yy439; break; case 251: /* expr ::= expr LT expr */ #line 732 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_LT);} -#line 3769 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LT);} +#line 3775 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 252: /* expr ::= expr GT expr */ #line 733 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_GT);} -#line 3775 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_GT);} +#line 3781 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 253: /* expr ::= expr LE expr */ #line 734 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_LE);} -#line 3781 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LE);} +#line 3787 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 254: /* expr ::= expr GE expr */ #line 735 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_GE);} -#line 3787 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_GE);} +#line 3793 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 255: /* expr ::= expr NE expr */ #line 736 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_NE);} -#line 3793 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_NE);} +#line 3799 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 256: /* expr ::= expr EQ expr */ #line 737 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_EQ);} -#line 3799 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_EQ);} +#line 3805 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 257: /* expr ::= expr BETWEEN expr AND expr */ #line 739 "sql.y" -{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy260); yylhsminor.yy260 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy260, yymsp[-2].minor.yy260, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy260, TK_LE), TK_AND);} -#line 3805 "sql.c" - yymsp[-4].minor.yy260 = yylhsminor.yy260; +{ 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);} +#line 3811 "sql.c" + yymsp[-4].minor.yy439 = yylhsminor.yy439; break; case 258: /* expr ::= expr AND expr */ #line 741 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_AND);} -#line 3811 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_AND);} +#line 3817 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 259: /* expr ::= expr OR expr */ #line 742 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_OR); } -#line 3817 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_OR); } +#line 3823 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 260: /* expr ::= expr PLUS expr */ #line 745 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_PLUS); } -#line 3823 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_PLUS); } +#line 3829 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 261: /* expr ::= expr MINUS expr */ #line 746 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_MINUS); } -#line 3829 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_MINUS); } +#line 3835 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 262: /* expr ::= expr STAR expr */ #line 747 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_STAR); } -#line 3835 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_STAR); } +#line 3841 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 263: /* expr ::= expr SLASH expr */ #line 748 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_DIVIDE);} -#line 3841 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_DIVIDE);} +#line 3847 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 264: /* expr ::= expr REM expr */ #line 749 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_REM); } -#line 3847 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_REM); } +#line 3853 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 265: /* expr ::= expr LIKE expr */ #line 752 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_LIKE); } -#line 3853 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LIKE); } +#line 3859 "sql.c" + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; case 266: /* expr ::= expr MATCH expr */ #line 755 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-2].minor.yy260, yymsp[0].minor.yy260, TK_MATCH); } -#line 3859 "sql.c" - yymsp[-2].minor.yy260 = yylhsminor.yy260; - break; - case 267: /* expr ::= expr IN LP exprlist RP */ -#line 758 "sql.y" -{yylhsminor.yy260 = tSqlExprCreate(yymsp[-4].minor.yy260, (tSqlExpr*)yymsp[-1].minor.yy403, TK_IN); } +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_MATCH); } #line 3865 "sql.c" - yymsp[-4].minor.yy260 = yylhsminor.yy260; + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 268: /* exprlist ::= exprlist COMMA expritem */ -#line 766 "sql.y" -{yylhsminor.yy403 = tSqlExprListAppend(yymsp[-2].minor.yy403,yymsp[0].minor.yy260,0, 0);} + case 267: /* expr ::= expr NMATCH expr */ +#line 756 "sql.y" +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_NMATCH); } #line 3871 "sql.c" - yymsp[-2].minor.yy403 = yylhsminor.yy403; + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 269: /* exprlist ::= expritem */ -#line 767 "sql.y" -{yylhsminor.yy403 = tSqlExprListAppend(0,yymsp[0].minor.yy260,0, 0);} + case 268: /* expr ::= expr IN LP exprlist RP */ +#line 759 "sql.y" +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-4].minor.yy439, (tSqlExpr*)yymsp[-1].minor.yy421, TK_IN); } #line 3877 "sql.c" - yymsp[0].minor.yy403 = yylhsminor.yy403; + yymsp[-4].minor.yy439 = yylhsminor.yy439; break; - case 270: /* expritem ::= expr */ -#line 768 "sql.y" -{yylhsminor.yy260 = yymsp[0].minor.yy260;} + case 269: /* exprlist ::= exprlist COMMA expritem */ +#line 767 "sql.y" +{yylhsminor.yy421 = tSqlExprListAppend(yymsp[-2].minor.yy421,yymsp[0].minor.yy439,0, 0);} #line 3883 "sql.c" - yymsp[0].minor.yy260 = yylhsminor.yy260; + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; - case 272: /* cmd ::= RESET QUERY CACHE */ -#line 772 "sql.y" -{ setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} + case 270: /* exprlist ::= expritem */ +#line 768 "sql.y" +{yylhsminor.yy421 = tSqlExprListAppend(0,yymsp[0].minor.yy439,0, 0);} #line 3889 "sql.c" + yymsp[0].minor.yy421 = yylhsminor.yy421; + break; + case 271: /* expritem ::= expr */ +#line 769 "sql.y" +{yylhsminor.yy439 = yymsp[0].minor.yy439;} +#line 3895 "sql.c" + yymsp[0].minor.yy439 = yylhsminor.yy439; + break; + case 273: /* cmd ::= RESET QUERY CACHE */ +#line 773 "sql.y" +{ setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} +#line 3901 "sql.c" break; - case 273: /* cmd ::= SYNCDB ids REPLICA */ -#line 775 "sql.y" + case 274: /* cmd ::= SYNCDB ids REPLICA */ +#line 776 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);} -#line 3894 "sql.c" +#line 3906 "sql.c" break; - case 274: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ -#line 778 "sql.y" + case 275: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ +#line 779 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy403, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3903 "sql.c" +#line 3915 "sql.c" break; - case 275: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ -#line 784 "sql.y" + case 276: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ +#line 785 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3912,28 +3924,28 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3916 "sql.c" +#line 3928 "sql.c" break; - case 276: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ -#line 794 "sql.y" + case 277: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ +#line 795 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy403, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3925 "sql.c" +#line 3937 "sql.c" break; - case 277: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ -#line 801 "sql.y" + case 278: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ +#line 802 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy403, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3934 "sql.c" +#line 3946 "sql.c" break; - case 278: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ -#line 806 "sql.y" + case 279: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ +#line 807 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3943,10 +3955,10 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3947 "sql.c" +#line 3959 "sql.c" break; - case 279: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ -#line 816 "sql.y" + case 280: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ +#line 817 "sql.y" { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3959,42 +3971,42 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3963 "sql.c" +#line 3975 "sql.c" break; - case 280: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ -#line 829 "sql.y" + case 281: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ +#line 830 "sql.y" { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; toTSDBType(yymsp[-2].minor.yy0.type); SArray* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1); - A = tVariantListAppend(A, &yymsp[0].minor.yy488, -1); + A = tVariantListAppend(A, &yymsp[0].minor.yy430, -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); } -#line 3977 "sql.c" +#line 3989 "sql.c" break; - case 281: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ -#line 840 "sql.y" + case 282: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ +#line 841 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy403, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3986 "sql.c" +#line 3998 "sql.c" break; - case 282: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ -#line 847 "sql.y" + case 283: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ +#line 848 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy403, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3995 "sql.c" +#line 4007 "sql.c" break; - case 283: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ -#line 853 "sql.y" + case 284: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ +#line 854 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -4004,28 +4016,28 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4008 "sql.c" +#line 4020 "sql.c" break; - case 284: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ -#line 863 "sql.y" + case 285: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ +#line 864 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy403, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4017 "sql.c" +#line 4029 "sql.c" break; - case 285: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ -#line 870 "sql.y" + case 286: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ +#line 871 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy403, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4026 "sql.c" +#line 4038 "sql.c" break; - case 286: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ -#line 875 "sql.y" + case 287: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ +#line 876 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -4035,10 +4047,10 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4039 "sql.c" +#line 4051 "sql.c" break; - case 287: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ -#line 885 "sql.y" + case 288: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ +#line 886 "sql.y" { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -4051,45 +4063,45 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4055 "sql.c" +#line 4067 "sql.c" break; - case 288: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ -#line 898 "sql.y" + case 289: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ +#line 899 "sql.y" { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; toTSDBType(yymsp[-2].minor.yy0.type); SArray* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1); - A = tVariantListAppend(A, &yymsp[0].minor.yy488, -1); + A = tVariantListAppend(A, &yymsp[0].minor.yy430, -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); } -#line 4069 "sql.c" +#line 4081 "sql.c" break; - case 289: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ -#line 909 "sql.y" + case 290: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ +#line 910 "sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy403, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4078 "sql.c" +#line 4090 "sql.c" break; - case 290: /* cmd ::= KILL CONNECTION INTEGER */ -#line 916 "sql.y" + case 291: /* cmd ::= KILL CONNECTION INTEGER */ +#line 917 "sql.y" {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} -#line 4083 "sql.c" +#line 4095 "sql.c" break; - case 291: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ -#line 917 "sql.y" + case 292: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ +#line 918 "sql.y" {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_STREAM, &yymsp[-2].minor.yy0);} -#line 4088 "sql.c" +#line 4100 "sql.c" break; - case 292: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ -#line 918 "sql.y" + case 293: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ +#line 919 "sql.y" {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-2].minor.yy0);} -#line 4093 "sql.c" +#line 4105 "sql.c" break; default: break; @@ -4174,7 +4186,7 @@ static void yy_syntax_error( } assert(len <= outputBufLen); -#line 4178 "sql.c" +#line 4190 "sql.c" /************ End %syntax_error code ******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE @@ -4201,7 +4213,7 @@ static void yy_accept( ** parser accepts */ /*********** Begin %parse_accept code *****************************************/ #line 61 "sql.y" -#line 4205 "sql.c" +#line 4217 "sql.c" /*********** End %parse_accept code *******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE diff --git a/src/tsdb/src/tsdbRead.c b/src/tsdb/src/tsdbRead.c index c1b935e0ee..c703510a99 100644 --- a/src/tsdb/src/tsdbRead.c +++ b/src/tsdb/src/tsdbRead.c @@ -3712,6 +3712,9 @@ static bool tableFilterFp(const void* pNode, void* param) { case TSDB_RELATION_MATCH: { return ret == 0; } + case TSDB_RELATION_NMATCH: { + return ret == 0; + } case TSDB_RELATION_IN: { return ret == 1; } @@ -4047,6 +4050,8 @@ static int32_t setQueryCond(tQueryInfo *queryColInfo, SQueryCond* pCond) { assert(0); } else if (optr == TSDB_RELATION_MATCH) { assert(0); + } else if (optr == TSDB_RELATION_NMATCH) { + assert(0); } return TSDB_CODE_SUCCESS; @@ -4204,7 +4209,9 @@ static void queryIndexlessColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, S if (pQueryInfo->sch.colId == TSDB_TBNAME_COLUMN_INDEX) { if (pQueryInfo->optr == TSDB_RELATION_IN) { addToResult = pQueryInfo->compare(name, pQueryInfo->q); - } else if (pQueryInfo->optr == TSDB_RELATION_LIKE || pQueryInfo->optr == TSDB_RELATION_MATCH) { + } else if (pQueryInfo->optr == TSDB_RELATION_LIKE || + pQueryInfo->optr == TSDB_RELATION_MATCH || + pQueryInfo->optr == TSDB_RELATION_NMATCH) { addToResult = !pQueryInfo->compare(name, pQueryInfo->q); } } else { @@ -4236,7 +4243,8 @@ void getTableListfromSkipList(tExprNode *pExpr, SSkipList *pSkipList, SArray *re param->setupInfoFn(pExpr, param->pExtInfo); tQueryInfo *pQueryInfo = pExpr->_node.info; - if (pQueryInfo->indexed && (pQueryInfo->optr != TSDB_RELATION_LIKE && pQueryInfo->optr != TSDB_RELATION_MATCH + if (pQueryInfo->indexed && (pQueryInfo->optr != TSDB_RELATION_LIKE + && pQueryInfo->optr != TSDB_RELATION_MATCH && pQueryInfo->optr != TSDB_RELATION_NMATCH && pQueryInfo->optr != TSDB_RELATION_IN)) { queryIndexedColumn(pSkipList, pQueryInfo, result); } else { diff --git a/src/util/inc/tcompare.h b/src/util/inc/tcompare.h index ef4c109602..1125516d34 100644 --- a/src/util/inc/tcompare.h +++ b/src/util/inc/tcompare.h @@ -84,6 +84,8 @@ int32_t compareLenPrefixedStr(const void *pLeft, const void *pRight); int32_t compareLenPrefixedWStr(const void *pLeft, const void *pRight); int32_t compareStrPatternComp(const void* pLeft, const void* pRight); int32_t compareStrRegexComp(const void* pLeft, const void* pRight); +int32_t compareStrRegexCompMatch(const void* pLeft, const void* pRight); +int32_t compareStrRegexCompNMatch(const void* pLeft, const void* pRight); int32_t compareFindItemInSet(const void *pLeft, const void* pRight); int32_t compareWStrPatternComp(const void* pLeft, const void* pRight); diff --git a/src/util/src/tcompare.c b/src/util/src/tcompare.c index 4c76724921..482dd8a6a1 100644 --- a/src/util/src/tcompare.c +++ b/src/util/src/tcompare.c @@ -350,6 +350,14 @@ int32_t compareStrPatternComp(const void* pLeft, const void* pRight) { return (ret == TSDB_PATTERN_MATCH) ? 0 : 1; } +int32_t compareStrRegexCompMatch(const void* pLeft, const void* pRight) { + return compareStrRegexComp(pLeft, pRight); +} + +int32_t compareStrRegexCompNMatch(const void* pLeft, const void* pRight) { + return compareStrRegexComp(pLeft, pRight) ? 0 : 1; +} + int32_t compareStrRegexComp(const void* pLeft, const void* pRight) { size_t sz = varDataLen(pRight); char *pattern = malloc(sz + 1); @@ -449,7 +457,9 @@ __compar_fn_t getComparFunc(int32_t type, int32_t optr) { case TSDB_DATA_TYPE_DOUBLE: comparFn = compareDoubleVal; break; case TSDB_DATA_TYPE_BINARY: { if (optr == TSDB_RELATION_MATCH) { - comparFn = compareStrRegexComp; + comparFn = compareStrRegexCompMatch; + } else if (optr == TSDB_RELATION_NMATCH) { + comparFn = compareStrRegexCompNMatch; } else if (optr == TSDB_RELATION_LIKE) { /* wildcard query using like operator */ comparFn = compareStrPatternComp; } else if (optr == TSDB_RELATION_IN) { @@ -463,7 +473,9 @@ __compar_fn_t getComparFunc(int32_t type, int32_t optr) { case TSDB_DATA_TYPE_NCHAR: { if (optr == TSDB_RELATION_MATCH) { - comparFn = compareStrRegexComp; + comparFn = compareStrRegexCompMatch; + } else if (optr == TSDB_RELATION_NMATCH) { + comparFn = compareStrRegexCompNMatch; } else if (optr == TSDB_RELATION_LIKE) { comparFn = compareWStrPatternComp; } else if (optr == TSDB_RELATION_IN) { diff --git a/src/util/src/ttokenizer.c b/src/util/src/ttokenizer.c index 04f2d7fc04..289c4a6ef5 100644 --- a/src/util/src/ttokenizer.c +++ b/src/util/src/ttokenizer.c @@ -195,6 +195,7 @@ static SKeyword keywordTable[] = { {"INITIALLY", TK_INITIALLY}, {"INSTEAD", TK_INSTEAD}, {"MATCH", TK_MATCH}, + {"NMATCH", TK_NMATCH}, {"KEY", TK_KEY}, {"OF", TK_OF}, {"RAISE", TK_RAISE}, diff --git a/tests/script/general/parser/regex.sim b/tests/script/general/parser/regex.sim index 5351d914f3..2c79a2ab0d 100644 --- a/tests/script/general/parser/regex.sim +++ b/tests/script/general/parser/regex.sim @@ -29,13 +29,22 @@ endi sql select tbname from $st_name where tbname match '^ct[[:digit:]]' - if $rows != 2 then return -1 endi +sql select tbname from $st_name where tbname nmatch '^ct[[:digit:]]' +if $rows != 1 then + return -1 +endi + sql select tbname from $st_name where tbname match '.*' -if $rows !=3 then +if $rows != 3 then + return -1 +endi + +sql select tbname from $st_name where tbname nmatch '.*' +if $rows != 0 then return -1 endi @@ -44,6 +53,11 @@ if $rows != 2 then return -1 endi +sql select tbname from $st_name where t1b nmatch '[[:lower:]]+' +if $rows != 1 then + return -1 +endi + sql insert into $ct1_name values(now, 'this is engine') sql insert into $ct2_name values(now, 'this is app egnine') @@ -56,6 +70,14 @@ if $rows != 1 then return -1 endi +sql select c1b from $st_name where c1b nmatch 'engine' +if $data00 != @this is app egnine@ then + return -1 +endi + +if $rows != 1 then + return -1 +endi system sh/exec.sh -n dnode1 -s stop -x SIGINT -- GitLab