diff --git a/include/common/tmsg.h b/include/common/tmsg.h index d938646f00..0ed63e08bf 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -695,6 +695,7 @@ typedef struct { int8_t replications; int8_t strict; int8_t cacheLastRow; + int8_t schemaless; int8_t ignoreExist; int32_t numOfRetensions; SArray* pRetensions; // SRetention diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index e8e931daa5..4bbb3a4a48 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -144,6 +144,7 @@ enum { TD_DEF_MSG_TYPE(TDMT_MND_CREATE_TOPIC, "mnode-create-topic", SMCreateTopicReq, SMCreateTopicRsp) TD_DEF_MSG_TYPE(TDMT_MND_ALTER_TOPIC, "mnode-alter-topic", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_DROP_TOPIC, "mnode-drop-topic", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_DROP_CGROUP, "mnode-drop-cgroup", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_SUBSCRIBE, "mnode-subscribe", SCMSubscribeReq, SCMSubscribeRsp) TD_DEF_MSG_TYPE(TDMT_MND_MQ_ASK_EP, "mnode-mq-ask-ep", SMqAskEpReq, SMqAskEpRsp) TD_DEF_MSG_TYPE(TDMT_MND_MQ_TIMER, "mnode-mq-tmr", SMTimerReq, NULL) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 68199fa519..2fc524eeac 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -93,166 +93,168 @@ #define TK_VGROUPS 75 #define TK_SINGLE_STABLE 76 #define TK_RETENTIONS 77 -#define TK_NK_COLON 78 -#define TK_TABLE 79 -#define TK_NK_LP 80 -#define TK_NK_RP 81 -#define TK_STABLE 82 -#define TK_ADD 83 -#define TK_COLUMN 84 -#define TK_MODIFY 85 -#define TK_RENAME 86 -#define TK_TAG 87 -#define TK_SET 88 -#define TK_NK_EQ 89 -#define TK_USING 90 -#define TK_TAGS 91 -#define TK_COMMENT 92 -#define TK_BOOL 93 -#define TK_TINYINT 94 -#define TK_SMALLINT 95 -#define TK_INT 96 -#define TK_INTEGER 97 -#define TK_BIGINT 98 -#define TK_FLOAT 99 -#define TK_DOUBLE 100 -#define TK_BINARY 101 -#define TK_TIMESTAMP 102 -#define TK_NCHAR 103 -#define TK_UNSIGNED 104 -#define TK_JSON 105 -#define TK_VARCHAR 106 -#define TK_MEDIUMBLOB 107 -#define TK_BLOB 108 -#define TK_VARBINARY 109 -#define TK_DECIMAL 110 -#define TK_DELAY 111 -#define TK_FILE_FACTOR 112 -#define TK_NK_FLOAT 113 -#define TK_ROLLUP 114 -#define TK_TTL 115 -#define TK_SMA 116 -#define TK_SHOW 117 -#define TK_DATABASES 118 -#define TK_TABLES 119 -#define TK_STABLES 120 -#define TK_MNODES 121 -#define TK_MODULES 122 -#define TK_QNODES 123 -#define TK_FUNCTIONS 124 -#define TK_INDEXES 125 -#define TK_ACCOUNTS 126 -#define TK_APPS 127 -#define TK_CONNECTIONS 128 -#define TK_LICENCE 129 -#define TK_GRANTS 130 -#define TK_QUERIES 131 -#define TK_SCORES 132 -#define TK_TOPICS 133 -#define TK_VARIABLES 134 -#define TK_BNODES 135 -#define TK_SNODES 136 -#define TK_CLUSTER 137 -#define TK_TRANSACTIONS 138 -#define TK_LIKE 139 -#define TK_INDEX 140 -#define TK_FULLTEXT 141 -#define TK_FUNCTION 142 -#define TK_INTERVAL 143 -#define TK_TOPIC 144 -#define TK_AS 145 -#define TK_WITH 146 -#define TK_SCHEMA 147 -#define TK_DESC 148 -#define TK_DESCRIBE 149 -#define TK_RESET 150 -#define TK_QUERY 151 -#define TK_CACHE 152 -#define TK_EXPLAIN 153 -#define TK_ANALYZE 154 -#define TK_VERBOSE 155 -#define TK_NK_BOOL 156 -#define TK_RATIO 157 -#define TK_COMPACT 158 -#define TK_VNODES 159 -#define TK_IN 160 -#define TK_OUTPUTTYPE 161 -#define TK_AGGREGATE 162 -#define TK_BUFSIZE 163 -#define TK_STREAM 164 -#define TK_INTO 165 -#define TK_TRIGGER 166 -#define TK_AT_ONCE 167 -#define TK_WINDOW_CLOSE 168 -#define TK_WATERMARK 169 -#define TK_KILL 170 -#define TK_CONNECTION 171 -#define TK_TRANSACTION 172 -#define TK_MERGE 173 -#define TK_VGROUP 174 -#define TK_REDISTRIBUTE 175 -#define TK_SPLIT 176 -#define TK_SYNCDB 177 -#define TK_NULL 178 -#define TK_NK_QUESTION 179 -#define TK_NK_ARROW 180 -#define TK_ROWTS 181 -#define TK_TBNAME 182 -#define TK_QSTARTTS 183 -#define TK_QENDTS 184 -#define TK_WSTARTTS 185 -#define TK_WENDTS 186 -#define TK_WDURATION 187 -#define TK_CAST 188 -#define TK_NOW 189 -#define TK_TODAY 190 -#define TK_TIMEZONE 191 -#define TK_COUNT 192 -#define TK_FIRST 193 -#define TK_LAST 194 -#define TK_LAST_ROW 195 -#define TK_BETWEEN 196 -#define TK_IS 197 -#define TK_NK_LT 198 -#define TK_NK_GT 199 -#define TK_NK_LE 200 -#define TK_NK_GE 201 -#define TK_NK_NE 202 -#define TK_MATCH 203 -#define TK_NMATCH 204 -#define TK_CONTAINS 205 -#define TK_JOIN 206 -#define TK_INNER 207 -#define TK_SELECT 208 -#define TK_DISTINCT 209 -#define TK_WHERE 210 -#define TK_PARTITION 211 -#define TK_BY 212 -#define TK_SESSION 213 -#define TK_STATE_WINDOW 214 -#define TK_SLIDING 215 -#define TK_FILL 216 -#define TK_VALUE 217 -#define TK_NONE 218 -#define TK_PREV 219 -#define TK_LINEAR 220 -#define TK_NEXT 221 -#define TK_GROUP 222 -#define TK_HAVING 223 -#define TK_ORDER 224 -#define TK_SLIMIT 225 -#define TK_SOFFSET 226 -#define TK_LIMIT 227 -#define TK_OFFSET 228 -#define TK_ASC 229 -#define TK_NULLS 230 -#define TK_ID 231 -#define TK_NK_BITNOT 232 -#define TK_INSERT 233 -#define TK_VALUES 234 -#define TK_IMPORT 235 -#define TK_NK_SEMI 236 -#define TK_FILE 237 +#define TK_SCHEMALESS 78 +#define TK_NK_COLON 79 +#define TK_TABLE 80 +#define TK_NK_LP 81 +#define TK_NK_RP 82 +#define TK_STABLE 83 +#define TK_ADD 84 +#define TK_COLUMN 85 +#define TK_MODIFY 86 +#define TK_RENAME 87 +#define TK_TAG 88 +#define TK_SET 89 +#define TK_NK_EQ 90 +#define TK_USING 91 +#define TK_TAGS 92 +#define TK_COMMENT 93 +#define TK_BOOL 94 +#define TK_TINYINT 95 +#define TK_SMALLINT 96 +#define TK_INT 97 +#define TK_INTEGER 98 +#define TK_BIGINT 99 +#define TK_FLOAT 100 +#define TK_DOUBLE 101 +#define TK_BINARY 102 +#define TK_TIMESTAMP 103 +#define TK_NCHAR 104 +#define TK_UNSIGNED 105 +#define TK_JSON 106 +#define TK_VARCHAR 107 +#define TK_MEDIUMBLOB 108 +#define TK_BLOB 109 +#define TK_VARBINARY 110 +#define TK_DECIMAL 111 +#define TK_DELAY 112 +#define TK_FILE_FACTOR 113 +#define TK_NK_FLOAT 114 +#define TK_ROLLUP 115 +#define TK_TTL 116 +#define TK_SMA 117 +#define TK_SHOW 118 +#define TK_DATABASES 119 +#define TK_TABLES 120 +#define TK_STABLES 121 +#define TK_MNODES 122 +#define TK_MODULES 123 +#define TK_QNODES 124 +#define TK_FUNCTIONS 125 +#define TK_INDEXES 126 +#define TK_ACCOUNTS 127 +#define TK_APPS 128 +#define TK_CONNECTIONS 129 +#define TK_LICENCE 130 +#define TK_GRANTS 131 +#define TK_QUERIES 132 +#define TK_SCORES 133 +#define TK_TOPICS 134 +#define TK_VARIABLES 135 +#define TK_BNODES 136 +#define TK_SNODES 137 +#define TK_CLUSTER 138 +#define TK_TRANSACTIONS 139 +#define TK_LIKE 140 +#define TK_INDEX 141 +#define TK_FULLTEXT 142 +#define TK_FUNCTION 143 +#define TK_INTERVAL 144 +#define TK_TOPIC 145 +#define TK_AS 146 +#define TK_CGROUP 147 +#define TK_WITH 148 +#define TK_SCHEMA 149 +#define TK_DESC 150 +#define TK_DESCRIBE 151 +#define TK_RESET 152 +#define TK_QUERY 153 +#define TK_CACHE 154 +#define TK_EXPLAIN 155 +#define TK_ANALYZE 156 +#define TK_VERBOSE 157 +#define TK_NK_BOOL 158 +#define TK_RATIO 159 +#define TK_COMPACT 160 +#define TK_VNODES 161 +#define TK_IN 162 +#define TK_OUTPUTTYPE 163 +#define TK_AGGREGATE 164 +#define TK_BUFSIZE 165 +#define TK_STREAM 166 +#define TK_INTO 167 +#define TK_TRIGGER 168 +#define TK_AT_ONCE 169 +#define TK_WINDOW_CLOSE 170 +#define TK_WATERMARK 171 +#define TK_KILL 172 +#define TK_CONNECTION 173 +#define TK_TRANSACTION 174 +#define TK_MERGE 175 +#define TK_VGROUP 176 +#define TK_REDISTRIBUTE 177 +#define TK_SPLIT 178 +#define TK_SYNCDB 179 +#define TK_NULL 180 +#define TK_NK_QUESTION 181 +#define TK_NK_ARROW 182 +#define TK_ROWTS 183 +#define TK_TBNAME 184 +#define TK_QSTARTTS 185 +#define TK_QENDTS 186 +#define TK_WSTARTTS 187 +#define TK_WENDTS 188 +#define TK_WDURATION 189 +#define TK_CAST 190 +#define TK_NOW 191 +#define TK_TODAY 192 +#define TK_TIMEZONE 193 +#define TK_COUNT 194 +#define TK_FIRST 195 +#define TK_LAST 196 +#define TK_LAST_ROW 197 +#define TK_BETWEEN 198 +#define TK_IS 199 +#define TK_NK_LT 200 +#define TK_NK_GT 201 +#define TK_NK_LE 202 +#define TK_NK_GE 203 +#define TK_NK_NE 204 +#define TK_MATCH 205 +#define TK_NMATCH 206 +#define TK_CONTAINS 207 +#define TK_JOIN 208 +#define TK_INNER 209 +#define TK_SELECT 210 +#define TK_DISTINCT 211 +#define TK_WHERE 212 +#define TK_PARTITION 213 +#define TK_BY 214 +#define TK_SESSION 215 +#define TK_STATE_WINDOW 216 +#define TK_SLIDING 217 +#define TK_FILL 218 +#define TK_VALUE 219 +#define TK_NONE 220 +#define TK_PREV 221 +#define TK_LINEAR 222 +#define TK_NEXT 223 +#define TK_GROUP 224 +#define TK_HAVING 225 +#define TK_ORDER 226 +#define TK_SLIMIT 227 +#define TK_SOFFSET 228 +#define TK_LIMIT 229 +#define TK_OFFSET 230 +#define TK_ASC 231 +#define TK_NULLS 232 +#define TK_ID 233 +#define TK_NK_BITNOT 234 +#define TK_INSERT 235 +#define TK_VALUES 236 +#define TK_IMPORT 237 +#define TK_NK_SEMI 238 +#define TK_FILE 239 #define TK_NK_SPACE 300 #define TK_NK_COMMENT 301 diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 82bf4e1f45..7bd3a40c71 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -50,6 +50,7 @@ typedef struct SDatabaseOptions { int32_t numOfVgroups; int8_t singleStable; SNodeList* pRetentions; + int8_t schemaless; } SDatabaseOptions; typedef struct SCreateDatabaseStmt { @@ -260,6 +261,13 @@ typedef struct SDropTopicStmt { bool ignoreNotExists; } SDropTopicStmt; +typedef struct SDropCGroupStmt { + ENodeType type; + char topicName[TSDB_TABLE_NAME_LEN]; + char cgroup[TSDB_CGROUP_LEN]; + bool ignoreNotExists; +} SDropCGroupStmt; + typedef struct SAlterLocalStmt { ENodeType type; char config[TSDB_DNODE_CONFIG_LEN]; diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index 3429d838de..3c5278011a 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -131,6 +131,7 @@ typedef enum ENodeType { QUERY_NODE_DROP_MNODE_STMT, QUERY_NODE_CREATE_TOPIC_STMT, QUERY_NODE_DROP_TOPIC_STMT, + QUERY_NODE_DROP_CGROUP_STMT, QUERY_NODE_ALTER_LOCAL_STMT, QUERY_NODE_EXPLAIN_STMT, QUERY_NODE_DESCRIBE_STMT, @@ -243,7 +244,6 @@ typedef struct SNodeList { #define SNodeptr void* -int32_t nodesNodeSize(ENodeType type); SNodeptr nodesMakeNode(ENodeType type); void nodesDestroyNode(SNodeptr pNode); diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h index d28da1f608..3ae2d18e5d 100644 --- a/include/libs/nodes/plannodes.h +++ b/include/libs/nodes/plannodes.h @@ -31,6 +31,7 @@ typedef struct SLogicNode { SNodeList* pChildren; struct SLogicNode* pParent; int32_t optimizedFlag; + uint8_t precision; } SLogicNode; typedef enum EScanType { SCAN_TYPE_TAG = 1, SCAN_TYPE_TABLE, SCAN_TYPE_SYSTEM_TABLE, SCAN_TYPE_STREAM } EScanType; @@ -61,6 +62,7 @@ typedef struct SJoinLogicNode { SLogicNode node; EJoinType joinType; SNode* pOnConditions; + bool isSingleTableJoin; } SJoinLogicNode; typedef struct SAggLogicNode { diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index f2ce1dd7f5..16014893ca 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -132,6 +132,7 @@ typedef struct STableNode { char tableName[TSDB_TABLE_NAME_LEN]; char tableAlias[TSDB_TABLE_NAME_LEN]; uint8_t precision; + bool singleTable; } STableNode; struct STableMeta; @@ -242,6 +243,7 @@ typedef struct SSelectStmt { bool hasAggFuncs; bool hasRepeatScanFuncs; bool hasIndefiniteRowsFunc; + bool hasSelectFunc; bool hasSelectValFunc; } SSelectStmt; diff --git a/include/util/tdef.h b/include/util/tdef.h index 59b72d8785..cbbf3b8ff5 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -334,9 +334,12 @@ typedef enum ELogicConditionType { #define TSDB_DB_STREAM_MODE_OFF 0 #define TSDB_DB_STREAM_MODE_ON 1 #define TSDB_DEFAULT_DB_STREAM_MODE 0 -#define TSDB_DB_SINGLE_STABLE_ON 0 -#define TSDB_DB_SINGLE_STABLE_OFF 1 -#define TSDB_DEFAULT_DB_SINGLE_STABLE 0 +#define TSDB_DB_SINGLE_STABLE_ON 1 +#define TSDB_DB_SINGLE_STABLE_OFF 0 +#define TSDB_DEFAULT_DB_SINGLE_STABLE TSDB_DB_SINGLE_STABLE_OFF +#define TSDB_DB_SCHEMALESS_ON 1 +#define TSDB_DB_SCHEMALESS_OFF 0 +#define TSDB_DEFAULT_DB_SCHEMALESS TSDB_DB_SCHEMALESS_OFF #define TSDB_MIN_ROLLUP_FILE_FACTOR 0 #define TSDB_MAX_ROLLUP_FILE_FACTOR 1 diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index 733693f584..61ac01e4fa 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -275,8 +275,10 @@ int32_t colDataMergeCol(SColumnInfoData* pColumnInfoData, uint32_t numOfRow1, in doBitmapMerge(pColumnInfoData, numOfRow1, pSource, numOfRow2); - int32_t offset = pColumnInfoData->info.bytes * numOfRow1; - memcpy(pColumnInfoData->pData + offset, pSource->pData, pSource->info.bytes * numOfRow2); + if (pSource->pData) { + int32_t offset = pColumnInfoData->info.bytes * numOfRow1; + memcpy(pColumnInfoData->pData + offset, pSource->pData, pSource->info.bytes * numOfRow2); + } } return numOfRow1 + numOfRow2; @@ -319,14 +321,16 @@ int32_t colDataAssign(SColumnInfoData* pColumnInfoData, const SColumnInfoData* p pColumnInfoData->nullbitmap = tmp; memcpy(pColumnInfoData->nullbitmap, pSource->nullbitmap, BitmapLen(numOfRows)); - int32_t newSize = numOfRows * pColumnInfoData->info.bytes; - tmp = taosMemoryRealloc(pColumnInfoData->pData, newSize); - if (tmp == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; - } + if (pSource->pData) { + int32_t newSize = numOfRows * pColumnInfoData->info.bytes; + tmp = taosMemoryRealloc(pColumnInfoData->pData, newSize); + if (tmp == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } - pColumnInfoData->pData = tmp; - memcpy(pColumnInfoData->pData, pSource->pData, pSource->info.bytes * numOfRows); + pColumnInfoData->pData = tmp; + memcpy(pColumnInfoData->pData, pSource->pData, pSource->info.bytes * numOfRows); + } } pColumnInfoData->hasNull = pSource->hasNull; diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 93a592f120..2f6dbf5389 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -1680,6 +1680,7 @@ int32_t tSerializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) { if (tEncodeI8(&encoder, pReq->replications) < 0) return -1; if (tEncodeI8(&encoder, pReq->strict) < 0) return -1; if (tEncodeI8(&encoder, pReq->cacheLastRow) < 0) return -1; + if (tEncodeI8(&encoder, pReq->schemaless) < 0) return -1; if (tEncodeI8(&encoder, pReq->ignoreExist) < 0) return -1; if (tEncodeI32(&encoder, pReq->numOfRetensions) < 0) return -1; for (int32_t i = 0; i < pReq->numOfRetensions; ++i) { @@ -1720,6 +1721,7 @@ int32_t tDeserializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) if (tDecodeI8(&decoder, &pReq->replications) < 0) return -1; if (tDecodeI8(&decoder, &pReq->strict) < 0) return -1; if (tDecodeI8(&decoder, &pReq->cacheLastRow) < 0) return -1; + if (tDecodeI8(&decoder, &pReq->schemaless) < 0) return -1; if (tDecodeI8(&decoder, &pReq->ignoreExist) < 0) return -1; if (tDecodeI32(&decoder, &pReq->numOfRetensions) < 0) return -1; pReq->pRetensions = taosArrayInit(pReq->numOfRetensions, sizeof(SRetention)); @@ -3352,7 +3354,8 @@ int32_t tDeserializeSExplainRsp(void *buf, int32_t bufLen, SExplainRsp *pRsp) { if (tDecodeDouble(&decoder, &pRsp->subplanInfo[i].totalCost) < 0) return -1; if (tDecodeU64(&decoder, &pRsp->subplanInfo[i].numOfRows) < 0) return -1; if (tDecodeU32(&decoder, &pRsp->subplanInfo[i].verboseLen) < 0) return -1; - if (tDecodeBinary(&decoder, (uint8_t**) &pRsp->subplanInfo[i].verboseInfo, &pRsp->subplanInfo[i].verboseLen) < 0) return -1; + if (tDecodeBinary(&decoder, (uint8_t **)&pRsp->subplanInfo[i].verboseInfo, &pRsp->subplanInfo[i].verboseLen) < 0) + return -1; } tEndDecode(&decoder); diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index b891e9a37a..593df0e97b 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -276,7 +276,7 @@ static int32_t translateElapsed(SFunctionNode* pFunc, char* pErrBuf, int32_t len return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } - //param0 + // param0 SNode* pParaNode0 = nodesListGetNode(pFunc->pParameterList, 0); if (QUERY_NODE_COLUMN != nodeType(pParaNode0)) { return buildFuncErrMsg(pErrBuf, len, TSDB_CODE_FUNC_FUNTION_ERROR, @@ -288,7 +288,7 @@ static int32_t translateElapsed(SFunctionNode* pFunc, char* pErrBuf, int32_t len return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - //param1 + // param1 if (2 == numOfParams) { SNode* pParamNode1 = nodesListGetNode(pFunc->pParameterList, 1); if (QUERY_NODE_VALUE != nodeType(pParamNode1)) { @@ -317,7 +317,7 @@ static int32_t translateLeastSQR(SFunctionNode* pFunc, char* pErrBuf, int32_t le for (int32_t i = 0; i < numOfParams; ++i) { SNode* pParamNode = nodesListGetNode(pFunc->pParameterList, i); - if (i > 0) { //param1 & param2 + if (i > 0) { // param1 & param2 if (QUERY_NODE_VALUE != nodeType(pParamNode)) { return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } @@ -333,7 +333,6 @@ static int32_t translateLeastSQR(SFunctionNode* pFunc, char* pErrBuf, int32_t le } } - pFunc->node.resType = (SDataType){.bytes = 64, .type = TSDB_DATA_TYPE_BINARY}; return TSDB_CODE_SUCCESS; } @@ -344,7 +343,7 @@ static int32_t translateHistogram(SFunctionNode* pFunc, char* pErrBuf, int32_t l return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } - //param0 + // param0 SNode* pParaNode0 = nodesListGetNode(pFunc->pParameterList, 0); if (QUERY_NODE_COLUMN != nodeType(pParaNode0)) { return buildFuncErrMsg(pErrBuf, len, TSDB_CODE_FUNC_FUNTION_ERROR, @@ -356,7 +355,7 @@ static int32_t translateHistogram(SFunctionNode* pFunc, char* pErrBuf, int32_t l return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - //param1 ~ param3 + // param1 ~ param3 for (int32_t i = 1; i < numOfParams; ++i) { SNode* pParamNode = nodesListGetNode(pFunc->pParameterList, i); if (QUERY_NODE_VALUE != nodeType(pParamNode)) { @@ -399,13 +398,13 @@ static int32_t translateStateCount(SFunctionNode* pFunc, char* pErrBuf, int32_t return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } - //param0 + // param0 uint8_t colType = ((SExprNode*)nodesListGetNode(pFunc->pParameterList, 0))->resType.type; if (!IS_NUMERIC_TYPE(colType)) { return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - //param1 & param2 + // param1 & param2 for (int32_t i = 1; i < numOfParams; ++i) { SNode* pParamNode = nodesListGetNode(pFunc->pParameterList, i); if (QUERY_NODE_VALUE != nodeType(pParamNode)) { @@ -423,7 +422,7 @@ static int32_t translateStateCount(SFunctionNode* pFunc, char* pErrBuf, int32_t return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - //set result type + // set result type pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; return TSDB_CODE_SUCCESS; } @@ -434,13 +433,13 @@ static int32_t translateStateDuration(SFunctionNode* pFunc, char* pErrBuf, int32 return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } - //param0 + // param0 uint8_t colType = ((SExprNode*)nodesListGetNode(pFunc->pParameterList, 0))->resType.type; if (!IS_NUMERIC_TYPE(colType)) { return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - //param1, param2 & param3 + // param1, param2 & param3 for (int32_t i = 1; i < numOfParams; ++i) { SNode* pParamNode = nodesListGetNode(pFunc->pParameterList, i); if (QUERY_NODE_VALUE != nodeType(pParamNode)) { @@ -458,11 +457,12 @@ static int32_t translateStateDuration(SFunctionNode* pFunc, char* pErrBuf, int32 return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - if (numOfParams == 4 && ((SExprNode*)nodesListGetNode(pFunc->pParameterList, 3))->resType.type != TSDB_DATA_TYPE_BIGINT) { + if (numOfParams == 4 && + ((SExprNode*)nodesListGetNode(pFunc->pParameterList, 3))->resType.type != TSDB_DATA_TYPE_BIGINT) { return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - //set result type + // set result type pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; return TSDB_CODE_SUCCESS; } @@ -503,7 +503,7 @@ static int32_t translateMavg(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } - //param0 + // param0 SNode* pParaNode0 = nodesListGetNode(pFunc->pParameterList, 0); if (QUERY_NODE_COLUMN != nodeType(pParaNode0)) { return buildFuncErrMsg(pErrBuf, len, TSDB_CODE_FUNC_FUNTION_ERROR, @@ -512,7 +512,7 @@ static int32_t translateMavg(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { uint8_t colType = ((SExprNode*)nodesListGetNode(pFunc->pParameterList, 0))->resType.type; - //param1 + // param1 SNode* pParamNode1 = nodesListGetNode(pFunc->pParameterList, 1); if (QUERY_NODE_VALUE != nodeType(pParamNode1)) { return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); @@ -539,7 +539,7 @@ static int32_t translateSample(SFunctionNode* pFunc, char* pErrBuf, int32_t len) return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } - //param0 + // param0 SNode* pParamNode0 = nodesListGetNode(pFunc->pParameterList, 0); if (QUERY_NODE_COLUMN != nodeType(pParamNode0)) { return buildFuncErrMsg(pErrBuf, len, TSDB_CODE_FUNC_FUNTION_ERROR, @@ -549,7 +549,7 @@ static int32_t translateSample(SFunctionNode* pFunc, char* pErrBuf, int32_t len) SExprNode* pCol = (SExprNode*)nodesListGetNode(pFunc->pParameterList, 0); uint8_t colType = pCol->resType.type; - //param1 + // param1 SNode* pParamNode1 = nodesListGetNode(pFunc->pParameterList, 1); if (QUERY_NODE_VALUE != nodeType(pParamNode1)) { return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); @@ -567,7 +567,7 @@ static int32_t translateSample(SFunctionNode* pFunc, char* pErrBuf, int32_t len) return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - //set result type + // set result type if (IS_VAR_DATA_TYPE(colType)) { pFunc->node.resType = (SDataType){.bytes = pCol->resType.bytes, .type = colType}; } else { @@ -583,7 +583,7 @@ static int32_t translateTail(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } - //param0 + // param0 SNode* pPara = nodesListGetNode(pFunc->pParameterList, 0); if (QUERY_NODE_COLUMN != nodeType(pPara)) { return buildFuncErrMsg(pErrBuf, len, TSDB_CODE_FUNC_FUNTION_ERROR, @@ -592,7 +592,7 @@ static int32_t translateTail(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { SExprNode* pCol = (SExprNode*)nodesListGetNode(pFunc->pParameterList, 0); uint8_t colType = pCol->resType.type; - //param1 & param2 + // param1 & param2 for (int32_t i = 1; i < numOfParams; ++i) { SNode* pParamNode = nodesListGetNode(pFunc->pParameterList, i); if (QUERY_NODE_VALUE != nodeType(pParamNode)) { @@ -613,7 +613,7 @@ static int32_t translateTail(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { } } - //set result type + // set result type if (IS_VAR_DATA_TYPE(colType)) { pFunc->node.resType = (SDataType){.bytes = pCol->resType.bytes, .type = colType}; } else { @@ -978,7 +978,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { { .name = "top", .type = FUNCTION_TYPE_TOP, - .classification = FUNC_MGT_SELECT_FUNC | FUNC_MGT_INDEFINITE_ROWS_FUNC, + .classification = FUNC_MGT_AGG_FUNC | FUNC_MGT_SELECT_FUNC | FUNC_MGT_INDEFINITE_ROWS_FUNC, .translateFunc = translateTop, .getEnvFunc = getTopBotFuncEnv, .initFunc = functionSetup, @@ -988,7 +988,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { { .name = "bottom", .type = FUNCTION_TYPE_BOTTOM, - .classification = FUNC_MGT_SELECT_FUNC | FUNC_MGT_INDEFINITE_ROWS_FUNC, + .classification = FUNC_MGT_AGG_FUNC | FUNC_MGT_SELECT_FUNC | FUNC_MGT_INDEFINITE_ROWS_FUNC, .translateFunc = translateBottom, .getEnvFunc = getTopBotFuncEnv, .initFunc = functionSetup, diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c index 5774dcaa1d..68d3741b48 100644 --- a/source/libs/nodes/src/nodesCloneFuncs.c +++ b/source/libs/nodes/src/nodesCloneFuncs.c @@ -191,6 +191,7 @@ static SNode* tableNodeCopy(const STableNode* pSrc, STableNode* pDst) { COPY_CHAR_ARRAY_FIELD(tableName); COPY_CHAR_ARRAY_FIELD(tableAlias); COPY_SCALAR_FIELD(precision); + COPY_SCALAR_FIELD(singleTable); return (SNode*)pDst; } @@ -326,6 +327,7 @@ static SNode* logicScanCopy(const SScanLogicNode* pSrc, SScanLogicNode* pDst) { COPY_SCALAR_FIELD(sliding); COPY_SCALAR_FIELD(intervalUnit); COPY_SCALAR_FIELD(slidingUnit); + CLONE_NODE_FIELD(pTagCond); return (SNode*)pDst; } @@ -333,6 +335,7 @@ static SNode* logicJoinCopy(const SJoinLogicNode* pSrc, SJoinLogicNode* pDst) { COPY_BASE_OBJECT_FIELD(node, logicNodeCopy); COPY_SCALAR_FIELD(joinType); CLONE_NODE_FIELD(pOnConditions); + COPY_SCALAR_FIELD(isSingleTableJoin); return (SNode*)pDst; } diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index c9c78b3912..e28844f2e1 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -21,149 +21,160 @@ #include "taoserror.h" #include "thash.h" -int32_t nodesNodeSize(ENodeType type) { +static SNode* makeNode(ENodeType type, size_t size) { + SNode* p = taosMemoryCalloc(1, size); + if (NULL == p) { + return NULL; + } + setNodeType(p, type); + return p; +} + +SNodeptr nodesMakeNode(ENodeType type) { switch (type) { case QUERY_NODE_COLUMN: - return sizeof(SColumnNode); + return makeNode(type, sizeof(SColumnNode)); case QUERY_NODE_VALUE: - return sizeof(SValueNode); + return makeNode(type, sizeof(SValueNode)); case QUERY_NODE_OPERATOR: - return sizeof(SOperatorNode); + return makeNode(type, sizeof(SOperatorNode)); case QUERY_NODE_LOGIC_CONDITION: - return sizeof(SLogicConditionNode); + return makeNode(type, sizeof(SLogicConditionNode)); case QUERY_NODE_FUNCTION: - return sizeof(SFunctionNode); + return makeNode(type, sizeof(SFunctionNode)); case QUERY_NODE_REAL_TABLE: - return sizeof(SRealTableNode); + return makeNode(type, sizeof(SRealTableNode)); case QUERY_NODE_TEMP_TABLE: - return sizeof(STempTableNode); + return makeNode(type, sizeof(STempTableNode)); case QUERY_NODE_JOIN_TABLE: - return sizeof(SJoinTableNode); + return makeNode(type, sizeof(SJoinTableNode)); case QUERY_NODE_GROUPING_SET: - return sizeof(SGroupingSetNode); + return makeNode(type, sizeof(SGroupingSetNode)); case QUERY_NODE_ORDER_BY_EXPR: - return sizeof(SOrderByExprNode); + return makeNode(type, sizeof(SOrderByExprNode)); case QUERY_NODE_LIMIT: - return sizeof(SLimitNode); + return makeNode(type, sizeof(SLimitNode)); case QUERY_NODE_STATE_WINDOW: - return sizeof(SStateWindowNode); + return makeNode(type, sizeof(SStateWindowNode)); case QUERY_NODE_SESSION_WINDOW: - return sizeof(SSessionWindowNode); + return makeNode(type, sizeof(SSessionWindowNode)); case QUERY_NODE_INTERVAL_WINDOW: - return sizeof(SIntervalWindowNode); + return makeNode(type, sizeof(SIntervalWindowNode)); case QUERY_NODE_NODE_LIST: - return sizeof(SNodeListNode); + return makeNode(type, sizeof(SNodeListNode)); case QUERY_NODE_FILL: - return sizeof(SFillNode); + return makeNode(type, sizeof(SFillNode)); case QUERY_NODE_RAW_EXPR: - return sizeof(SRawExprNode); + return makeNode(type, sizeof(SRawExprNode)); case QUERY_NODE_TARGET: - return sizeof(STargetNode); + return makeNode(type, sizeof(STargetNode)); case QUERY_NODE_DATABLOCK_DESC: - return sizeof(SDataBlockDescNode); + return makeNode(type, sizeof(SDataBlockDescNode)); case QUERY_NODE_SLOT_DESC: - return sizeof(SSlotDescNode); + return makeNode(type, sizeof(SSlotDescNode)); case QUERY_NODE_COLUMN_DEF: - return sizeof(SColumnDefNode); + return makeNode(type, sizeof(SColumnDefNode)); case QUERY_NODE_DOWNSTREAM_SOURCE: - return sizeof(SDownstreamSourceNode); + return makeNode(type, sizeof(SDownstreamSourceNode)); case QUERY_NODE_DATABASE_OPTIONS: - return sizeof(SDatabaseOptions); + return makeNode(type, sizeof(SDatabaseOptions)); case QUERY_NODE_TABLE_OPTIONS: - return sizeof(STableOptions); + return makeNode(type, sizeof(STableOptions)); case QUERY_NODE_INDEX_OPTIONS: - return sizeof(SIndexOptions); + return makeNode(type, sizeof(SIndexOptions)); case QUERY_NODE_EXPLAIN_OPTIONS: - return sizeof(SExplainOptions); + return makeNode(type, sizeof(SExplainOptions)); case QUERY_NODE_STREAM_OPTIONS: - return sizeof(SStreamOptions); + return makeNode(type, sizeof(SStreamOptions)); case QUERY_NODE_TOPIC_OPTIONS: - return sizeof(STopicOptions); + return makeNode(type, sizeof(STopicOptions)); case QUERY_NODE_LEFT_VALUE: - return sizeof(SLeftValueNode); + return makeNode(type, sizeof(SLeftValueNode)); case QUERY_NODE_SET_OPERATOR: - return sizeof(SSetOperator); + return makeNode(type, sizeof(SSetOperator)); case QUERY_NODE_SELECT_STMT: - return sizeof(SSelectStmt); + return makeNode(type, sizeof(SSelectStmt)); case QUERY_NODE_VNODE_MODIF_STMT: - return sizeof(SVnodeModifOpStmt); + return makeNode(type, sizeof(SVnodeModifOpStmt)); case QUERY_NODE_CREATE_DATABASE_STMT: - return sizeof(SCreateDatabaseStmt); + return makeNode(type, sizeof(SCreateDatabaseStmt)); case QUERY_NODE_DROP_DATABASE_STMT: - return sizeof(SDropDatabaseStmt); + return makeNode(type, sizeof(SDropDatabaseStmt)); case QUERY_NODE_ALTER_DATABASE_STMT: - return sizeof(SAlterDatabaseStmt); + return makeNode(type, sizeof(SAlterDatabaseStmt)); case QUERY_NODE_CREATE_TABLE_STMT: - return sizeof(SCreateTableStmt); + return makeNode(type, sizeof(SCreateTableStmt)); case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: - return sizeof(SCreateSubTableClause); + return makeNode(type, sizeof(SCreateSubTableClause)); case QUERY_NODE_CREATE_MULTI_TABLE_STMT: - return sizeof(SCreateMultiTableStmt); + return makeNode(type, sizeof(SCreateMultiTableStmt)); case QUERY_NODE_DROP_TABLE_CLAUSE: - return sizeof(SDropTableClause); + return makeNode(type, sizeof(SDropTableClause)); case QUERY_NODE_DROP_TABLE_STMT: - return sizeof(SDropTableStmt); + return makeNode(type, sizeof(SDropTableStmt)); case QUERY_NODE_DROP_SUPER_TABLE_STMT: - return sizeof(SDropSuperTableStmt); + return makeNode(type, sizeof(SDropSuperTableStmt)); case QUERY_NODE_ALTER_TABLE_STMT: - return sizeof(SAlterTableStmt); + return makeNode(type, sizeof(SAlterTableStmt)); case QUERY_NODE_CREATE_USER_STMT: - return sizeof(SCreateUserStmt); + return makeNode(type, sizeof(SCreateUserStmt)); case QUERY_NODE_ALTER_USER_STMT: - return sizeof(SAlterUserStmt); + return makeNode(type, sizeof(SAlterUserStmt)); case QUERY_NODE_DROP_USER_STMT: - return sizeof(SDropUserStmt); + return makeNode(type, sizeof(SDropUserStmt)); case QUERY_NODE_USE_DATABASE_STMT: - return sizeof(SUseDatabaseStmt); + return makeNode(type, sizeof(SUseDatabaseStmt)); case QUERY_NODE_CREATE_DNODE_STMT: - return sizeof(SCreateDnodeStmt); + return makeNode(type, sizeof(SCreateDnodeStmt)); case QUERY_NODE_DROP_DNODE_STMT: - return sizeof(SDropDnodeStmt); + return makeNode(type, sizeof(SDropDnodeStmt)); case QUERY_NODE_ALTER_DNODE_STMT: - return sizeof(SAlterDnodeStmt); + return makeNode(type, sizeof(SAlterDnodeStmt)); case QUERY_NODE_CREATE_INDEX_STMT: - return sizeof(SCreateIndexStmt); + return makeNode(type, sizeof(SCreateIndexStmt)); case QUERY_NODE_DROP_INDEX_STMT: - return sizeof(SDropIndexStmt); + return makeNode(type, sizeof(SDropIndexStmt)); case QUERY_NODE_CREATE_QNODE_STMT: case QUERY_NODE_CREATE_BNODE_STMT: case QUERY_NODE_CREATE_SNODE_STMT: case QUERY_NODE_CREATE_MNODE_STMT: - return sizeof(SCreateComponentNodeStmt); + return makeNode(type, sizeof(SCreateComponentNodeStmt)); case QUERY_NODE_DROP_QNODE_STMT: case QUERY_NODE_DROP_BNODE_STMT: case QUERY_NODE_DROP_SNODE_STMT: case QUERY_NODE_DROP_MNODE_STMT: - return sizeof(SDropComponentNodeStmt); + return makeNode(type, sizeof(SDropComponentNodeStmt)); case QUERY_NODE_CREATE_TOPIC_STMT: - return sizeof(SCreateTopicStmt); + return makeNode(type, sizeof(SCreateTopicStmt)); case QUERY_NODE_DROP_TOPIC_STMT: - return sizeof(SDropTopicStmt); + return makeNode(type, sizeof(SDropTopicStmt)); + case QUERY_NODE_DROP_CGROUP_STMT: + return makeNode(type, sizeof(SDropCGroupStmt)); case QUERY_NODE_EXPLAIN_STMT: - return sizeof(SExplainStmt); + return makeNode(type, sizeof(SExplainStmt)); case QUERY_NODE_DESCRIBE_STMT: - return sizeof(SDescribeStmt); + return makeNode(type, sizeof(SDescribeStmt)); case QUERY_NODE_RESET_QUERY_CACHE_STMT: - return sizeof(SNode); + return makeNode(type, sizeof(SNode)); case QUERY_NODE_COMPACT_STMT: break; case QUERY_NODE_CREATE_FUNCTION_STMT: - return sizeof(SCreateFunctionStmt); + return makeNode(type, sizeof(SCreateFunctionStmt)); case QUERY_NODE_DROP_FUNCTION_STMT: - return sizeof(SDropFunctionStmt); + return makeNode(type, sizeof(SDropFunctionStmt)); case QUERY_NODE_CREATE_STREAM_STMT: - return sizeof(SCreateStreamStmt); + return makeNode(type, sizeof(SCreateStreamStmt)); case QUERY_NODE_DROP_STREAM_STMT: - return sizeof(SDropStreamStmt); + return makeNode(type, sizeof(SDropStreamStmt)); case QUERY_NODE_MERGE_VGROUP_STMT: case QUERY_NODE_REDISTRIBUTE_VGROUP_STMT: case QUERY_NODE_SPLIT_VGROUP_STMT: case QUERY_NODE_SYNCDB_STMT: break; case QUERY_NODE_GRANT_STMT: - return sizeof(SGrantStmt); + return makeNode(type, sizeof(SGrantStmt)); case QUERY_NODE_REVOKE_STMT: - return sizeof(SRevokeStmt); + return makeNode(type, sizeof(SRevokeStmt)); case QUERY_NODE_SHOW_DNODES_STMT: case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: @@ -194,91 +205,82 @@ int32_t nodesNodeSize(ENodeType type) { case QUERY_NODE_SHOW_CREATE_TABLE_STMT: case QUERY_NODE_SHOW_CREATE_STABLE_STMT: case QUERY_NODE_SHOW_TRANSACTIONS_STMT: - return sizeof(SShowStmt); + return makeNode(type, sizeof(SShowStmt)); case QUERY_NODE_KILL_CONNECTION_STMT: case QUERY_NODE_KILL_QUERY_STMT: case QUERY_NODE_KILL_TRANSACTION_STMT: - return sizeof(SKillStmt); + return makeNode(type, sizeof(SKillStmt)); case QUERY_NODE_LOGIC_PLAN_SCAN: - return sizeof(SScanLogicNode); + return makeNode(type, sizeof(SScanLogicNode)); case QUERY_NODE_LOGIC_PLAN_JOIN: - return sizeof(SJoinLogicNode); + return makeNode(type, sizeof(SJoinLogicNode)); case QUERY_NODE_LOGIC_PLAN_AGG: - return sizeof(SAggLogicNode); + return makeNode(type, sizeof(SAggLogicNode)); case QUERY_NODE_LOGIC_PLAN_PROJECT: - return sizeof(SProjectLogicNode); + return makeNode(type, sizeof(SProjectLogicNode)); case QUERY_NODE_LOGIC_PLAN_VNODE_MODIF: - return sizeof(SVnodeModifLogicNode); + return makeNode(type, sizeof(SVnodeModifLogicNode)); case QUERY_NODE_LOGIC_PLAN_EXCHANGE: - return sizeof(SExchangeLogicNode); + return makeNode(type, sizeof(SExchangeLogicNode)); case QUERY_NODE_LOGIC_PLAN_WINDOW: - return sizeof(SWindowLogicNode); + return makeNode(type, sizeof(SWindowLogicNode)); case QUERY_NODE_LOGIC_PLAN_FILL: - return sizeof(SFillLogicNode); + return makeNode(type, sizeof(SFillLogicNode)); case QUERY_NODE_LOGIC_PLAN_SORT: - return sizeof(SSortLogicNode); + return makeNode(type, sizeof(SSortLogicNode)); case QUERY_NODE_LOGIC_PLAN_PARTITION: - return sizeof(SPartitionLogicNode); + return makeNode(type, sizeof(SPartitionLogicNode)); case QUERY_NODE_LOGIC_SUBPLAN: - return sizeof(SLogicSubplan); + return makeNode(type, sizeof(SLogicSubplan)); case QUERY_NODE_LOGIC_PLAN: - return sizeof(SQueryLogicPlan); + return makeNode(type, sizeof(SQueryLogicPlan)); case QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN: - return sizeof(STagScanPhysiNode); + return makeNode(type, sizeof(STagScanPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN: - return sizeof(STableScanPhysiNode); + return makeNode(type, sizeof(STableScanPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_TABLE_SEQ_SCAN: - return sizeof(STableSeqScanPhysiNode); + return makeNode(type, sizeof(STableSeqScanPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN: - return sizeof(SStreamScanPhysiNode); + return makeNode(type, sizeof(SStreamScanPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_SYSTABLE_SCAN: - return sizeof(SSystemTableScanPhysiNode); + return makeNode(type, sizeof(SSystemTableScanPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_PROJECT: - return sizeof(SProjectPhysiNode); + return makeNode(type, sizeof(SProjectPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_JOIN: - return sizeof(SJoinPhysiNode); + return makeNode(type, sizeof(SJoinPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_AGG: - return sizeof(SAggPhysiNode); + return makeNode(type, sizeof(SAggPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_EXCHANGE: - return sizeof(SExchangePhysiNode); + return makeNode(type, sizeof(SExchangePhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_SORT: - return sizeof(SSortPhysiNode); + return makeNode(type, sizeof(SSortPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_INTERVAL: - return sizeof(SIntervalPhysiNode); + return makeNode(type, sizeof(SIntervalPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_STREAM_INTERVAL: - return sizeof(SStreamIntervalPhysiNode); + return makeNode(type, sizeof(SStreamIntervalPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_FILL: - return sizeof(SFillPhysiNode); + return makeNode(type, sizeof(SFillPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_SESSION_WINDOW: - return sizeof(SSessionWinodwPhysiNode); + return makeNode(type, sizeof(SSessionWinodwPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_STREAM_SESSION_WINDOW: - return sizeof(SStreamSessionWinodwPhysiNode); + return makeNode(type, sizeof(SStreamSessionWinodwPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_STATE_WINDOW: - return sizeof(SStateWinodwPhysiNode); + return makeNode(type, sizeof(SStateWinodwPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_PARTITION: - return sizeof(SPartitionPhysiNode); + return makeNode(type, sizeof(SPartitionPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_DISPATCH: - return sizeof(SDataDispatcherNode); + return makeNode(type, sizeof(SDataDispatcherNode)); case QUERY_NODE_PHYSICAL_PLAN_INSERT: - return sizeof(SDataInserterNode); + return makeNode(type, sizeof(SDataInserterNode)); case QUERY_NODE_PHYSICAL_SUBPLAN: - return sizeof(SSubplan); + return makeNode(type, sizeof(SSubplan)); case QUERY_NODE_PHYSICAL_PLAN: - return sizeof(SQueryPlan); + return makeNode(type, sizeof(SQueryPlan)); default: break; } nodesError("nodesMakeNode unknown node = %s", nodesNodeName(type)); - return 0; -} - -SNodeptr nodesMakeNode(ENodeType type) { - SNode* p = taosMemoryCalloc(1, nodesNodeSize(type)); - if (NULL == p) { - return NULL; - } - setNodeType(p, type); - return p; + return NULL; } static void destroyVgDataBlockArray(SArray* pArray) { diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 474471d35b..a1c304118b 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -53,7 +53,8 @@ typedef enum EDatabaseOptionType { DB_OPTION_WAL, DB_OPTION_VGROUPS, DB_OPTION_SINGLE_STABLE, - DB_OPTION_RETENTIONS + DB_OPTION_RETENTIONS, + DB_OPTION_SCHEMALESS } EDatabaseOptionType; typedef enum ETableOptionType { @@ -169,6 +170,8 @@ SNode* createTopicOptions(SAstCreateContext* pCxt); SNode* createCreateTopicStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pTopicName, SNode* pQuery, const SToken* pSubscribeDbName, SNode* pOptions); SNode* createDropTopicStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const SToken* pTopicName); +SNode* createDropCGroupStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const SToken* pCGroupId, + const SToken* pTopicName); SNode* createAlterLocalStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue); SNode* createDefaultExplainOptions(SAstCreateContext* pCxt); SNode* setExplainVerbose(SAstCreateContext* pCxt, SNode* pOptions, const SToken* pVal); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 2cba1eb043..1fb60f83a5 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -180,6 +180,7 @@ db_options(A) ::= db_options(B) WAL NK_INTEGER(C). db_options(A) ::= db_options(B) VGROUPS NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_VGROUPS, &C); } db_options(A) ::= db_options(B) SINGLE_STABLE NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_SINGLE_STABLE, &C); } db_options(A) ::= db_options(B) RETENTIONS retention_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_RETENTIONS, C); } +db_options(A) ::= db_options(B) SCHEMALESS NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_SCHEMALESS, &C); } alter_db_options(A) ::= alter_db_option(B). { A = createAlterDatabaseOptions(pCxt); A = setAlterDatabaseOption(pCxt, A, &B); } alter_db_options(A) ::= alter_db_options(B) alter_db_option(C). { A = setAlterDatabaseOption(pCxt, B, &C); } @@ -407,6 +408,7 @@ cmd ::= CREATE TOPIC not_exists_opt(A) cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) topic_options(D) AS db_name(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, NULL, &C, D); } cmd ::= DROP TOPIC exists_opt(A) topic_name(B). { pCxt->pRootNode = createDropTopicStmt(pCxt, A, &B); } +cmd ::= DROP CGROUP exists_opt(A) cgroup_name(B) ON topic_name(C). { pCxt->pRootNode = createDropCGroupStmt(pCxt, A, &B, &C); } topic_options(A) ::= . { A = createTopicOptions(pCxt); } topic_options(A) ::= topic_options(B) WITH TABLE. { ((STopicOptions*)B)->withTable = true; A = B; } @@ -565,6 +567,10 @@ topic_name(A) ::= NK_ID(B). %destructor stream_name { } stream_name(A) ::= NK_ID(B). { A = B; } +%type cgroup_name { SToken } +%destructor cgroup_name { } +cgroup_name(A) ::= NK_ID(B). { A = B; } + /************************************************ expression **********************************************************/ expression(A) ::= literal(B). { A = B; } expression(A) ::= pseudo_column(B). { A = B; } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index eb814b3315..6b4c5f0ce5 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -29,12 +29,11 @@ } \ } while (0) -#define CHECK_RAW_EXPR_NODE(node) \ - do { \ - if (NULL == (node) || QUERY_NODE_RAW_EXPR != nodeType(node)) { \ - pCxt->errCode = TSDB_CODE_PAR_SYNTAX_ERROR; \ - return NULL; \ - } \ +#define CHECK_PARSER_STATUS(pCxt) \ + do { \ + if (TSDB_CODE_SUCCESS != pCxt->errCode) { \ + return NULL; \ + } \ } while (0) SToken nil_token = {.type = TK_NK_NIL, .n = 0, .z = NULL}; @@ -206,6 +205,7 @@ static bool checkComment(SAstCreateContext* pCxt, const SToken* pCommentToken, b } SNode* createRawExprNode(SAstCreateContext* pCxt, const SToken* pToken, SNode* pNode) { + CHECK_PARSER_STATUS(pCxt); SRawExprNode* target = (SRawExprNode*)nodesMakeNode(QUERY_NODE_RAW_EXPR); CHECK_OUT_OF_MEM(target); target->p = pToken->z; @@ -215,6 +215,7 @@ SNode* createRawExprNode(SAstCreateContext* pCxt, const SToken* pToken, SNode* p } SNode* createRawExprNodeExt(SAstCreateContext* pCxt, const SToken* pStart, const SToken* pEnd, SNode* pNode) { + CHECK_PARSER_STATUS(pCxt); SRawExprNode* target = (SRawExprNode*)nodesMakeNode(QUERY_NODE_RAW_EXPR); CHECK_OUT_OF_MEM(target); target->p = pStart->z; @@ -224,7 +225,7 @@ SNode* createRawExprNodeExt(SAstCreateContext* pCxt, const SToken* pStart, const } SNode* releaseRawExprNode(SAstCreateContext* pCxt, SNode* pNode) { - CHECK_RAW_EXPR_NODE(pNode); + CHECK_PARSER_STATUS(pCxt); SRawExprNode* pRawExpr = (SRawExprNode*)pNode; SNode* pExpr = pRawExpr->pNode; if (nodesIsExprNode(pExpr)) { @@ -247,6 +248,7 @@ SToken getTokenFromRawExprNode(SAstCreateContext* pCxt, SNode* pNode) { } SNodeList* createNodeList(SAstCreateContext* pCxt, SNode* pNode) { + CHECK_PARSER_STATUS(pCxt); SNodeList* list = nodesMakeList(); CHECK_OUT_OF_MEM(list); pCxt->errCode = nodesListAppend(list, pNode); @@ -254,11 +256,13 @@ SNodeList* createNodeList(SAstCreateContext* pCxt, SNode* pNode) { } SNodeList* addNodeToList(SAstCreateContext* pCxt, SNodeList* pList, SNode* pNode) { + CHECK_PARSER_STATUS(pCxt); pCxt->errCode = nodesListAppend(pList, pNode); return pList; } SNode* createColumnNode(SAstCreateContext* pCxt, SToken* pTableAlias, SToken* pColumnName) { + CHECK_PARSER_STATUS(pCxt); if (!checkTableName(pCxt, pTableAlias) || !checkColumnName(pCxt, pColumnName)) { return NULL; } @@ -272,6 +276,7 @@ SNode* createColumnNode(SAstCreateContext* pCxt, SToken* pTableAlias, SToken* pC } SNode* createValueNode(SAstCreateContext* pCxt, int32_t dataType, const SToken* pLiteral) { + CHECK_PARSER_STATUS(pCxt); SValueNode* val = (SValueNode*)nodesMakeNode(QUERY_NODE_VALUE); CHECK_OUT_OF_MEM(val); val->literal = strndup(pLiteral->z, pLiteral->n); @@ -291,6 +296,7 @@ SNode* createValueNode(SAstCreateContext* pCxt, int32_t dataType, const SToken* } SNode* createDurationValueNode(SAstCreateContext* pCxt, const SToken* pLiteral) { + CHECK_PARSER_STATUS(pCxt); SValueNode* val = (SValueNode*)nodesMakeNode(QUERY_NODE_VALUE); CHECK_OUT_OF_MEM(val); val->literal = strndup(pLiteral->z, pLiteral->n); @@ -304,6 +310,7 @@ SNode* createDurationValueNode(SAstCreateContext* pCxt, const SToken* pLiteral) } SNode* createDefaultDatabaseCondValue(SAstCreateContext* pCxt) { + CHECK_PARSER_STATUS(pCxt); if (NULL == pCxt->pQueryCxt->db) { return NULL; } @@ -321,6 +328,7 @@ SNode* createDefaultDatabaseCondValue(SAstCreateContext* pCxt) { } SNode* createPlaceholderValueNode(SAstCreateContext* pCxt, const SToken* pLiteral) { + CHECK_PARSER_STATUS(pCxt); SValueNode* val = (SValueNode*)nodesMakeNode(QUERY_NODE_VALUE); CHECK_OUT_OF_MEM(val); val->literal = strndup(pLiteral->z, pLiteral->n); @@ -338,6 +346,7 @@ SNode* createPlaceholderValueNode(SAstCreateContext* pCxt, const SToken* pLitera } SNode* createLogicConditionNode(SAstCreateContext* pCxt, ELogicConditionType type, SNode* pParam1, SNode* pParam2) { + CHECK_PARSER_STATUS(pCxt); SLogicConditionNode* cond = (SLogicConditionNode*)nodesMakeNode(QUERY_NODE_LOGIC_CONDITION); CHECK_OUT_OF_MEM(cond); cond->condType = type; @@ -360,6 +369,7 @@ SNode* createLogicConditionNode(SAstCreateContext* pCxt, ELogicConditionType typ } SNode* createOperatorNode(SAstCreateContext* pCxt, EOperatorType type, SNode* pLeft, SNode* pRight) { + CHECK_PARSER_STATUS(pCxt); SOperatorNode* op = (SOperatorNode*)nodesMakeNode(QUERY_NODE_OPERATOR); CHECK_OUT_OF_MEM(op); op->opType = type; @@ -369,17 +379,20 @@ SNode* createOperatorNode(SAstCreateContext* pCxt, EOperatorType type, SNode* pL } SNode* createBetweenAnd(SAstCreateContext* pCxt, SNode* pExpr, SNode* pLeft, SNode* pRight) { + CHECK_PARSER_STATUS(pCxt); return createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, createOperatorNode(pCxt, OP_TYPE_GREATER_EQUAL, pExpr, pLeft), createOperatorNode(pCxt, OP_TYPE_LOWER_EQUAL, nodesCloneNode(pExpr), pRight)); } SNode* createNotBetweenAnd(SAstCreateContext* pCxt, SNode* pExpr, SNode* pLeft, SNode* pRight) { + CHECK_PARSER_STATUS(pCxt); return createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, createOperatorNode(pCxt, OP_TYPE_LOWER_THAN, pExpr, pLeft), createOperatorNode(pCxt, OP_TYPE_GREATER_THAN, nodesCloneNode(pExpr), pRight)); } static SNode* createPrimaryKeyCol(SAstCreateContext* pCxt) { + CHECK_PARSER_STATUS(pCxt); SColumnNode* pCol = nodesMakeNode(QUERY_NODE_COLUMN); CHECK_OUT_OF_MEM(pCol); pCol->colId = PRIMARYKEY_TIMESTAMP_COL_ID; @@ -388,6 +401,7 @@ static SNode* createPrimaryKeyCol(SAstCreateContext* pCxt) { } SNode* createFunctionNode(SAstCreateContext* pCxt, const SToken* pFuncName, SNodeList* pParameterList) { + CHECK_PARSER_STATUS(pCxt); if (0 == strncasecmp("_rowts", pFuncName->z, pFuncName->n) || 0 == strncasecmp("_c0", pFuncName->z, pFuncName->n)) { return createPrimaryKeyCol(pCxt); } @@ -399,6 +413,7 @@ SNode* createFunctionNode(SAstCreateContext* pCxt, const SToken* pFuncName, SNod } SNode* createCastFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, SDataType dt) { + CHECK_PARSER_STATUS(pCxt); SFunctionNode* func = (SFunctionNode*)nodesMakeNode(QUERY_NODE_FUNCTION); CHECK_OUT_OF_MEM(func); strcpy(func->functionName, "cast"); @@ -413,6 +428,7 @@ SNode* createCastFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, SDataType d } SNode* createNodeListNode(SAstCreateContext* pCxt, SNodeList* pList) { + CHECK_PARSER_STATUS(pCxt); SNodeListNode* list = (SNodeListNode*)nodesMakeNode(QUERY_NODE_NODE_LIST); CHECK_OUT_OF_MEM(list); list->pNodeList = pList; @@ -420,6 +436,7 @@ SNode* createNodeListNode(SAstCreateContext* pCxt, SNodeList* pList) { } SNode* createNodeListNodeEx(SAstCreateContext* pCxt, SNode* p1, SNode* p2) { + CHECK_PARSER_STATUS(pCxt); SNodeListNode* list = (SNodeListNode*)nodesMakeNode(QUERY_NODE_NODE_LIST); CHECK_OUT_OF_MEM(list); list->pNodeList = nodesMakeList(); @@ -430,6 +447,7 @@ SNode* createNodeListNodeEx(SAstCreateContext* pCxt, SNode* p1, SNode* p2) { } SNode* createRealTableNode(SAstCreateContext* pCxt, SToken* pDbName, SToken* pTableName, SToken* pTableAlias) { + CHECK_PARSER_STATUS(pCxt); if (!checkDbName(pCxt, pDbName, true) || !checkTableName(pCxt, pTableName) || !checkTableName(pCxt, pTableAlias)) { return NULL; } @@ -450,6 +468,7 @@ SNode* createRealTableNode(SAstCreateContext* pCxt, SToken* pDbName, SToken* pTa } SNode* createTempTableNode(SAstCreateContext* pCxt, SNode* pSubquery, const SToken* pTableAlias) { + CHECK_PARSER_STATUS(pCxt); STempTableNode* tempTable = (STempTableNode*)nodesMakeNode(QUERY_NODE_TEMP_TABLE); CHECK_OUT_OF_MEM(tempTable); tempTable->pSubquery = pSubquery; @@ -467,6 +486,7 @@ SNode* createTempTableNode(SAstCreateContext* pCxt, SNode* pSubquery, const STok } SNode* createJoinTableNode(SAstCreateContext* pCxt, EJoinType type, SNode* pLeft, SNode* pRight, SNode* pJoinCond) { + CHECK_PARSER_STATUS(pCxt); SJoinTableNode* joinTable = (SJoinTableNode*)nodesMakeNode(QUERY_NODE_JOIN_TABLE); CHECK_OUT_OF_MEM(joinTable); joinTable->joinType = type; @@ -477,6 +497,7 @@ SNode* createJoinTableNode(SAstCreateContext* pCxt, EJoinType type, SNode* pLeft } SNode* createLimitNode(SAstCreateContext* pCxt, const SToken* pLimit, const SToken* pOffset) { + CHECK_PARSER_STATUS(pCxt); SLimitNode* limitNode = (SLimitNode*)nodesMakeNode(QUERY_NODE_LIMIT); CHECK_OUT_OF_MEM(limitNode); limitNode->limit = taosStr2Int64(pLimit->z, NULL, 10); @@ -487,6 +508,7 @@ SNode* createLimitNode(SAstCreateContext* pCxt, const SToken* pLimit, const STok } SNode* createOrderByExprNode(SAstCreateContext* pCxt, SNode* pExpr, EOrder order, ENullOrder nullOrder) { + CHECK_PARSER_STATUS(pCxt); SOrderByExprNode* orderByExpr = (SOrderByExprNode*)nodesMakeNode(QUERY_NODE_ORDER_BY_EXPR); CHECK_OUT_OF_MEM(orderByExpr); orderByExpr->pExpr = pExpr; @@ -499,6 +521,7 @@ SNode* createOrderByExprNode(SAstCreateContext* pCxt, SNode* pExpr, EOrder order } SNode* createSessionWindowNode(SAstCreateContext* pCxt, SNode* pCol, SNode* pGap) { + CHECK_PARSER_STATUS(pCxt); SSessionWindowNode* session = (SSessionWindowNode*)nodesMakeNode(QUERY_NODE_SESSION_WINDOW); CHECK_OUT_OF_MEM(session); session->pCol = (SColumnNode*)pCol; @@ -507,6 +530,7 @@ SNode* createSessionWindowNode(SAstCreateContext* pCxt, SNode* pCol, SNode* pGap } SNode* createStateWindowNode(SAstCreateContext* pCxt, SNode* pExpr) { + CHECK_PARSER_STATUS(pCxt); SStateWindowNode* state = (SStateWindowNode*)nodesMakeNode(QUERY_NODE_STATE_WINDOW); CHECK_OUT_OF_MEM(state); state->pCol = createPrimaryKeyCol(pCxt); @@ -520,6 +544,7 @@ SNode* createStateWindowNode(SAstCreateContext* pCxt, SNode* pExpr) { SNode* createIntervalWindowNode(SAstCreateContext* pCxt, SNode* pInterval, SNode* pOffset, SNode* pSliding, SNode* pFill) { + CHECK_PARSER_STATUS(pCxt); SIntervalWindowNode* interval = (SIntervalWindowNode*)nodesMakeNode(QUERY_NODE_INTERVAL_WINDOW); CHECK_OUT_OF_MEM(interval); interval->pCol = createPrimaryKeyCol(pCxt); @@ -535,6 +560,7 @@ SNode* createIntervalWindowNode(SAstCreateContext* pCxt, SNode* pInterval, SNode } SNode* createFillNode(SAstCreateContext* pCxt, EFillMode mode, SNode* pValues) { + CHECK_PARSER_STATUS(pCxt); SFillNode* fill = (SFillNode*)nodesMakeNode(QUERY_NODE_FILL); CHECK_OUT_OF_MEM(fill); fill->mode = mode; @@ -549,6 +575,7 @@ SNode* createFillNode(SAstCreateContext* pCxt, EFillMode mode, SNode* pValues) { } SNode* createGroupingSetNode(SAstCreateContext* pCxt, SNode* pNode) { + CHECK_PARSER_STATUS(pCxt); SGroupingSetNode* groupingSet = (SGroupingSetNode*)nodesMakeNode(QUERY_NODE_GROUPING_SET); CHECK_OUT_OF_MEM(groupingSet); groupingSet->groupingSetType = GP_TYPE_NORMAL; @@ -558,9 +585,7 @@ SNode* createGroupingSetNode(SAstCreateContext* pCxt, SNode* pNode) { } SNode* setProjectionAlias(SAstCreateContext* pCxt, SNode* pNode, const SToken* pAlias) { - if (NULL == pNode || TSDB_CODE_SUCCESS != pCxt->errCode) { - return pNode; - } + CHECK_PARSER_STATUS(pCxt); int32_t len = TMIN(sizeof(((SExprNode*)pNode)->aliasName) - 1, pAlias->n); strncpy(((SExprNode*)pNode)->aliasName, pAlias->z, len); ((SExprNode*)pNode)->aliasName[len] = '\0'; @@ -570,6 +595,7 @@ SNode* setProjectionAlias(SAstCreateContext* pCxt, SNode* pNode, const SToken* p } SNode* addWhereClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pWhere) { + CHECK_PARSER_STATUS(pCxt); if (QUERY_NODE_SELECT_STMT == nodeType(pStmt)) { ((SSelectStmt*)pStmt)->pWhere = pWhere; } @@ -577,6 +603,7 @@ SNode* addWhereClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pWhere) { } SNode* addPartitionByClause(SAstCreateContext* pCxt, SNode* pStmt, SNodeList* pPartitionByList) { + CHECK_PARSER_STATUS(pCxt); if (QUERY_NODE_SELECT_STMT == nodeType(pStmt)) { ((SSelectStmt*)pStmt)->pPartitionByList = pPartitionByList; } @@ -584,6 +611,7 @@ SNode* addPartitionByClause(SAstCreateContext* pCxt, SNode* pStmt, SNodeList* pP } SNode* addWindowClauseClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pWindow) { + CHECK_PARSER_STATUS(pCxt); if (QUERY_NODE_SELECT_STMT == nodeType(pStmt)) { ((SSelectStmt*)pStmt)->pWindow = pWindow; } @@ -591,6 +619,7 @@ SNode* addWindowClauseClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pWind } SNode* addGroupByClause(SAstCreateContext* pCxt, SNode* pStmt, SNodeList* pGroupByList) { + CHECK_PARSER_STATUS(pCxt); if (QUERY_NODE_SELECT_STMT == nodeType(pStmt)) { ((SSelectStmt*)pStmt)->pGroupByList = pGroupByList; } @@ -598,6 +627,7 @@ SNode* addGroupByClause(SAstCreateContext* pCxt, SNode* pStmt, SNodeList* pGroup } SNode* addHavingClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pHaving) { + CHECK_PARSER_STATUS(pCxt); if (QUERY_NODE_SELECT_STMT == nodeType(pStmt)) { ((SSelectStmt*)pStmt)->pHaving = pHaving; } @@ -605,6 +635,7 @@ SNode* addHavingClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pHaving) { } SNode* addOrderByClause(SAstCreateContext* pCxt, SNode* pStmt, SNodeList* pOrderByList) { + CHECK_PARSER_STATUS(pCxt); if (QUERY_NODE_SELECT_STMT == nodeType(pStmt)) { ((SSelectStmt*)pStmt)->pOrderByList = pOrderByList; } @@ -612,6 +643,7 @@ SNode* addOrderByClause(SAstCreateContext* pCxt, SNode* pStmt, SNodeList* pOrder } SNode* addSlimitClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pSlimit) { + CHECK_PARSER_STATUS(pCxt); if (QUERY_NODE_SELECT_STMT == nodeType(pStmt)) { ((SSelectStmt*)pStmt)->pSlimit = (SLimitNode*)pSlimit; } @@ -619,6 +651,7 @@ SNode* addSlimitClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pSlimit) { } SNode* addLimitClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pLimit) { + CHECK_PARSER_STATUS(pCxt); if (QUERY_NODE_SELECT_STMT == nodeType(pStmt)) { ((SSelectStmt*)pStmt)->pLimit = (SLimitNode*)pLimit; } @@ -626,6 +659,7 @@ SNode* addLimitClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pLimit) { } SNode* createSelectStmt(SAstCreateContext* pCxt, bool isDistinct, SNodeList* pProjectionList, SNode* pTable) { + CHECK_PARSER_STATUS(pCxt); SSelectStmt* select = (SSelectStmt*)nodesMakeNode(QUERY_NODE_SELECT_STMT); CHECK_OUT_OF_MEM(select); select->isDistinct = isDistinct; @@ -637,6 +671,7 @@ SNode* createSelectStmt(SAstCreateContext* pCxt, bool isDistinct, SNodeList* pPr } SNode* createSetOperator(SAstCreateContext* pCxt, ESetOperatorType type, SNode* pLeft, SNode* pRight) { + CHECK_PARSER_STATUS(pCxt); SSetOperator* setOp = (SSetOperator*)nodesMakeNode(QUERY_NODE_SET_OPERATOR); CHECK_OUT_OF_MEM(setOp); setOp->opType = type; @@ -647,6 +682,7 @@ SNode* createSetOperator(SAstCreateContext* pCxt, ESetOperatorType type, SNode* } SNode* createDefaultDatabaseOptions(SAstCreateContext* pCxt) { + CHECK_PARSER_STATUS(pCxt); SDatabaseOptions* pOptions = nodesMakeNode(QUERY_NODE_DATABASE_OPTIONS); CHECK_OUT_OF_MEM(pOptions); pOptions->buffer = TSDB_DEFAULT_BUFFER_PER_VNODE; @@ -667,10 +703,12 @@ SNode* createDefaultDatabaseOptions(SAstCreateContext* pCxt) { pOptions->walLevel = TSDB_DEFAULT_WAL_LEVEL; pOptions->numOfVgroups = TSDB_DEFAULT_VN_PER_DB; pOptions->singleStable = TSDB_DEFAULT_DB_SINGLE_STABLE; + pOptions->schemaless = TSDB_DEFAULT_DB_SCHEMALESS; return (SNode*)pOptions; } SNode* createAlterDatabaseOptions(SAstCreateContext* pCxt) { + CHECK_PARSER_STATUS(pCxt); SDatabaseOptions* pOptions = nodesMakeNode(QUERY_NODE_DATABASE_OPTIONS); CHECK_OUT_OF_MEM(pOptions); pOptions->buffer = -1; @@ -691,10 +729,12 @@ SNode* createAlterDatabaseOptions(SAstCreateContext* pCxt) { pOptions->walLevel = -1; pOptions->numOfVgroups = -1; pOptions->singleStable = -1; + pOptions->schemaless = -1; return (SNode*)pOptions; } SNode* setDatabaseOption(SAstCreateContext* pCxt, SNode* pOptions, EDatabaseOptionType type, void* pVal) { + CHECK_PARSER_STATUS(pCxt); switch (type) { case DB_OPTION_BUFFER: ((SDatabaseOptions*)pOptions)->buffer = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); @@ -754,6 +794,9 @@ SNode* setDatabaseOption(SAstCreateContext* pCxt, SNode* pOptions, EDatabaseOpti case DB_OPTION_RETENTIONS: ((SDatabaseOptions*)pOptions)->pRetentions = pVal; break; + case DB_OPTION_SCHEMALESS: + ((SDatabaseOptions*)pOptions)->schemaless = taosStr2Int8(((SToken*)pVal)->z, NULL, 10); + break; default: break; } @@ -761,6 +804,7 @@ SNode* setDatabaseOption(SAstCreateContext* pCxt, SNode* pOptions, EDatabaseOpti } SNode* setAlterDatabaseOption(SAstCreateContext* pCxt, SNode* pOptions, SAlterOption* pAlterOption) { + CHECK_PARSER_STATUS(pCxt); switch (pAlterOption->type) { case DB_OPTION_KEEP: case DB_OPTION_RETENTIONS: @@ -772,6 +816,7 @@ SNode* setAlterDatabaseOption(SAstCreateContext* pCxt, SNode* pOptions, SAlterOp } SNode* createCreateDatabaseStmt(SAstCreateContext* pCxt, bool ignoreExists, SToken* pDbName, SNode* pOptions) { + CHECK_PARSER_STATUS(pCxt); if (!checkDbName(pCxt, pDbName, false)) { return NULL; } @@ -784,6 +829,7 @@ SNode* createCreateDatabaseStmt(SAstCreateContext* pCxt, bool ignoreExists, STok } SNode* createDropDatabaseStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken* pDbName) { + CHECK_PARSER_STATUS(pCxt); if (!checkDbName(pCxt, pDbName, false)) { return NULL; } @@ -795,6 +841,7 @@ SNode* createDropDatabaseStmt(SAstCreateContext* pCxt, bool ignoreNotExists, STo } SNode* createAlterDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName, SNode* pOptions) { + CHECK_PARSER_STATUS(pCxt); if (!checkDbName(pCxt, pDbName, false)) { return NULL; } @@ -806,6 +853,7 @@ SNode* createAlterDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName, SNode* } SNode* createDefaultTableOptions(SAstCreateContext* pCxt) { + CHECK_PARSER_STATUS(pCxt); STableOptions* pOptions = nodesMakeNode(QUERY_NODE_TABLE_OPTIONS); CHECK_OUT_OF_MEM(pOptions); pOptions->delay = TSDB_DEFAULT_ROLLUP_DELAY; @@ -815,6 +863,7 @@ SNode* createDefaultTableOptions(SAstCreateContext* pCxt) { } SNode* createAlterTableOptions(SAstCreateContext* pCxt) { + CHECK_PARSER_STATUS(pCxt); STableOptions* pOptions = nodesMakeNode(QUERY_NODE_TABLE_OPTIONS); CHECK_OUT_OF_MEM(pOptions); pOptions->delay = -1; @@ -824,6 +873,7 @@ SNode* createAlterTableOptions(SAstCreateContext* pCxt) { } SNode* setTableOption(SAstCreateContext* pCxt, SNode* pOptions, ETableOptionType type, void* pVal) { + CHECK_PARSER_STATUS(pCxt); switch (type) { case TABLE_OPTION_COMMENT: if (checkComment(pCxt, (SToken*)pVal, true)) { @@ -853,6 +903,7 @@ SNode* setTableOption(SAstCreateContext* pCxt, SNode* pOptions, ETableOptionType } SNode* createColumnDefNode(SAstCreateContext* pCxt, SToken* pColName, SDataType dataType, const SToken* pComment) { + CHECK_PARSER_STATUS(pCxt); if (!checkColumnName(pCxt, pColName) || !checkComment(pCxt, pComment, false)) { return NULL; } @@ -879,9 +930,7 @@ SDataType createVarLenDataType(uint8_t type, const SToken* pLen) { SNode* createCreateTableStmt(SAstCreateContext* pCxt, bool ignoreExists, SNode* pRealTable, SNodeList* pCols, SNodeList* pTags, SNode* pOptions) { - if (NULL == pRealTable) { - return NULL; - } + CHECK_PARSER_STATUS(pCxt); SCreateTableStmt* pStmt = (SCreateTableStmt*)nodesMakeNode(QUERY_NODE_CREATE_TABLE_STMT); CHECK_OUT_OF_MEM(pStmt); strcpy(pStmt->dbName, ((SRealTableNode*)pRealTable)->table.dbName); @@ -896,9 +945,7 @@ SNode* createCreateTableStmt(SAstCreateContext* pCxt, bool ignoreExists, SNode* SNode* createCreateSubTableClause(SAstCreateContext* pCxt, bool ignoreExists, SNode* pRealTable, SNode* pUseRealTable, SNodeList* pSpecificTags, SNodeList* pValsOfTags, SNode* pOptions) { - if (NULL == pRealTable) { - return NULL; - } + CHECK_PARSER_STATUS(pCxt); SCreateSubTableClause* pStmt = nodesMakeNode(QUERY_NODE_CREATE_SUBTABLE_CLAUSE); CHECK_OUT_OF_MEM(pStmt); strcpy(pStmt->dbName, ((SRealTableNode*)pRealTable)->table.dbName); @@ -914,6 +961,7 @@ SNode* createCreateSubTableClause(SAstCreateContext* pCxt, bool ignoreExists, SN } SNode* createCreateMultiTableStmt(SAstCreateContext* pCxt, SNodeList* pSubTables) { + CHECK_PARSER_STATUS(pCxt); SCreateMultiTableStmt* pStmt = nodesMakeNode(QUERY_NODE_CREATE_MULTI_TABLE_STMT); CHECK_OUT_OF_MEM(pStmt); pStmt->pSubTables = pSubTables; @@ -921,9 +969,7 @@ SNode* createCreateMultiTableStmt(SAstCreateContext* pCxt, SNodeList* pSubTables } SNode* createDropTableClause(SAstCreateContext* pCxt, bool ignoreNotExists, SNode* pRealTable) { - if (NULL == pRealTable) { - return NULL; - } + CHECK_PARSER_STATUS(pCxt); SDropTableClause* pStmt = nodesMakeNode(QUERY_NODE_DROP_TABLE_CLAUSE); CHECK_OUT_OF_MEM(pStmt); strcpy(pStmt->dbName, ((SRealTableNode*)pRealTable)->table.dbName); @@ -934,6 +980,7 @@ SNode* createDropTableClause(SAstCreateContext* pCxt, bool ignoreNotExists, SNod } SNode* createDropTableStmt(SAstCreateContext* pCxt, SNodeList* pTables) { + CHECK_PARSER_STATUS(pCxt); SDropTableStmt* pStmt = nodesMakeNode(QUERY_NODE_DROP_TABLE_STMT); CHECK_OUT_OF_MEM(pStmt); pStmt->pTables = pTables; @@ -941,6 +988,7 @@ SNode* createDropTableStmt(SAstCreateContext* pCxt, SNodeList* pTables) { } SNode* createDropSuperTableStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SNode* pRealTable) { + CHECK_PARSER_STATUS(pCxt); SDropSuperTableStmt* pStmt = nodesMakeNode(QUERY_NODE_DROP_SUPER_TABLE_STMT); CHECK_OUT_OF_MEM(pStmt); strcpy(pStmt->dbName, ((SRealTableNode*)pRealTable)->table.dbName); @@ -958,9 +1006,7 @@ static SNode* createAlterTableStmtFinalize(SNode* pRealTable, SAlterTableStmt* p } SNode* createAlterTableModifyOptions(SAstCreateContext* pCxt, SNode* pRealTable, SNode* pOptions) { - if (NULL == pRealTable) { - return NULL; - } + CHECK_PARSER_STATUS(pCxt); SAlterTableStmt* pStmt = nodesMakeNode(QUERY_NODE_ALTER_TABLE_STMT); CHECK_OUT_OF_MEM(pStmt); pStmt->alterType = TSDB_ALTER_TABLE_UPDATE_OPTIONS; @@ -970,7 +1016,8 @@ SNode* createAlterTableModifyOptions(SAstCreateContext* pCxt, SNode* pRealTable, SNode* createAlterTableAddModifyCol(SAstCreateContext* pCxt, SNode* pRealTable, int8_t alterType, SToken* pColName, SDataType dataType) { - if (NULL == pRealTable || !checkColumnName(pCxt, pColName)) { + CHECK_PARSER_STATUS(pCxt); + if (!checkColumnName(pCxt, pColName)) { return NULL; } SAlterTableStmt* pStmt = nodesMakeNode(QUERY_NODE_ALTER_TABLE_STMT); @@ -982,7 +1029,8 @@ SNode* createAlterTableAddModifyCol(SAstCreateContext* pCxt, SNode* pRealTable, } SNode* createAlterTableDropCol(SAstCreateContext* pCxt, SNode* pRealTable, int8_t alterType, SToken* pColName) { - if (NULL == pRealTable || !checkColumnName(pCxt, pColName)) { + CHECK_PARSER_STATUS(pCxt); + if (!checkColumnName(pCxt, pColName)) { return NULL; } SAlterTableStmt* pStmt = nodesMakeNode(QUERY_NODE_ALTER_TABLE_STMT); @@ -994,7 +1042,8 @@ SNode* createAlterTableDropCol(SAstCreateContext* pCxt, SNode* pRealTable, int8_ SNode* createAlterTableRenameCol(SAstCreateContext* pCxt, SNode* pRealTable, int8_t alterType, SToken* pOldColName, SToken* pNewColName) { - if (NULL == pRealTable || !checkColumnName(pCxt, pOldColName) || !checkColumnName(pCxt, pNewColName)) { + CHECK_PARSER_STATUS(pCxt); + if (!checkColumnName(pCxt, pOldColName) || !checkColumnName(pCxt, pNewColName)) { return NULL; } SAlterTableStmt* pStmt = nodesMakeNode(QUERY_NODE_ALTER_TABLE_STMT); @@ -1006,7 +1055,8 @@ SNode* createAlterTableRenameCol(SAstCreateContext* pCxt, SNode* pRealTable, int } SNode* createAlterTableSetTag(SAstCreateContext* pCxt, SNode* pRealTable, SToken* pTagName, SNode* pVal) { - if (NULL == pRealTable || !checkColumnName(pCxt, pTagName)) { + CHECK_PARSER_STATUS(pCxt); + if (!checkColumnName(pCxt, pTagName)) { return NULL; } SAlterTableStmt* pStmt = nodesMakeNode(QUERY_NODE_ALTER_TABLE_STMT); @@ -1018,6 +1068,7 @@ SNode* createAlterTableSetTag(SAstCreateContext* pCxt, SNode* pRealTable, SToken } SNode* createUseDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName) { + CHECK_PARSER_STATUS(pCxt); if (!checkDbName(pCxt, pDbName, false)) { return NULL; } @@ -1033,13 +1084,13 @@ static bool needDbShowStmt(ENodeType type) { } SNode* createShowStmt(SAstCreateContext* pCxt, ENodeType type, SNode* pDbName, SNode* pTbNamePattern) { + CHECK_PARSER_STATUS(pCxt); if (needDbShowStmt(type) && NULL == pDbName && NULL == pCxt->pQueryCxt->db) { snprintf(pCxt->pQueryCxt->pMsg, pCxt->pQueryCxt->msgLen, "db not specified"); pCxt->errCode = TSDB_CODE_PAR_SYNTAX_ERROR; return NULL; } SShowStmt* pStmt = nodesMakeNode(type); - ; CHECK_OUT_OF_MEM(pStmt); pStmt->pDbName = pDbName; pStmt->pTbNamePattern = pTbNamePattern; @@ -1047,18 +1098,21 @@ SNode* createShowStmt(SAstCreateContext* pCxt, ENodeType type, SNode* pDbName, S } SNode* createShowCreateDatabaseStmt(SAstCreateContext* pCxt, const SToken* pDbName) { + CHECK_PARSER_STATUS(pCxt); SNode* pStmt = nodesMakeNode(QUERY_NODE_SHOW_CREATE_DATABASE_STMT); CHECK_OUT_OF_MEM(pStmt); return pStmt; } SNode* createShowCreateTableStmt(SAstCreateContext* pCxt, ENodeType type, SNode* pRealTable) { + CHECK_PARSER_STATUS(pCxt); SNode* pStmt = nodesMakeNode(type); CHECK_OUT_OF_MEM(pStmt); return pStmt; } SNode* createCreateUserStmt(SAstCreateContext* pCxt, SToken* pUserName, const SToken* pPassword) { + CHECK_PARSER_STATUS(pCxt); char password[TSDB_USET_PASSWORD_LEN] = {0}; if (!checkUserName(pCxt, pUserName) || !checkPassword(pCxt, pPassword, password)) { return NULL; @@ -1071,6 +1125,7 @@ SNode* createCreateUserStmt(SAstCreateContext* pCxt, SToken* pUserName, const ST } SNode* createAlterUserStmt(SAstCreateContext* pCxt, SToken* pUserName, int8_t alterType, const SToken* pVal) { + CHECK_PARSER_STATUS(pCxt); if (!checkUserName(pCxt, pUserName)) { return NULL; } @@ -1090,6 +1145,7 @@ SNode* createAlterUserStmt(SAstCreateContext* pCxt, SToken* pUserName, int8_t al } SNode* createDropUserStmt(SAstCreateContext* pCxt, SToken* pUserName) { + CHECK_PARSER_STATUS(pCxt); if (!checkUserName(pCxt, pUserName)) { return NULL; } @@ -1100,6 +1156,7 @@ SNode* createDropUserStmt(SAstCreateContext* pCxt, SToken* pUserName) { } SNode* createCreateDnodeStmt(SAstCreateContext* pCxt, const SToken* pFqdn, const SToken* pPort) { + CHECK_PARSER_STATUS(pCxt); int32_t port = 0; char fqdn[TSDB_FQDN_LEN] = {0}; if (NULL == pPort) { @@ -1121,6 +1178,7 @@ SNode* createCreateDnodeStmt(SAstCreateContext* pCxt, const SToken* pFqdn, const } SNode* createDropDnodeStmt(SAstCreateContext* pCxt, const SToken* pDnode) { + CHECK_PARSER_STATUS(pCxt); SDropDnodeStmt* pStmt = (SDropDnodeStmt*)nodesMakeNode(QUERY_NODE_DROP_DNODE_STMT); CHECK_OUT_OF_MEM(pStmt); if (TK_NK_INTEGER == pDnode->type) { @@ -1136,6 +1194,7 @@ SNode* createDropDnodeStmt(SAstCreateContext* pCxt, const SToken* pDnode) { SNode* createAlterDnodeStmt(SAstCreateContext* pCxt, const SToken* pDnode, const SToken* pConfig, const SToken* pValue) { + CHECK_PARSER_STATUS(pCxt); SAlterDnodeStmt* pStmt = nodesMakeNode(QUERY_NODE_ALTER_DNODE_STMT); CHECK_OUT_OF_MEM(pStmt); pStmt->dnodeId = taosStr2Int32(pDnode->z, NULL, 10); @@ -1148,6 +1207,7 @@ SNode* createAlterDnodeStmt(SAstCreateContext* pCxt, const SToken* pDnode, const SNode* createCreateIndexStmt(SAstCreateContext* pCxt, EIndexType type, bool ignoreExists, SToken* pIndexName, SToken* pTableName, SNodeList* pCols, SNode* pOptions) { + CHECK_PARSER_STATUS(pCxt); if (!checkIndexName(pCxt, pIndexName) || !checkTableName(pCxt, pTableName) || !checkDbName(pCxt, NULL, true)) { return NULL; } @@ -1164,6 +1224,7 @@ SNode* createCreateIndexStmt(SAstCreateContext* pCxt, EIndexType type, bool igno SNode* createIndexOption(SAstCreateContext* pCxt, SNodeList* pFuncs, SNode* pInterval, SNode* pOffset, SNode* pSliding) { + CHECK_PARSER_STATUS(pCxt); SIndexOptions* pOptions = nodesMakeNode(QUERY_NODE_INDEX_OPTIONS); CHECK_OUT_OF_MEM(pOptions); pOptions->pFuncs = pFuncs; @@ -1174,6 +1235,7 @@ SNode* createIndexOption(SAstCreateContext* pCxt, SNodeList* pFuncs, SNode* pInt } SNode* createDropIndexStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken* pIndexName, SToken* pTableName) { + CHECK_PARSER_STATUS(pCxt); if (!checkIndexName(pCxt, pIndexName) || !checkTableName(pCxt, pTableName)) { return NULL; } @@ -1186,6 +1248,7 @@ SNode* createDropIndexStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken } SNode* createCreateComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, const SToken* pDnodeId) { + CHECK_PARSER_STATUS(pCxt); SCreateComponentNodeStmt* pStmt = nodesMakeNode(type); CHECK_OUT_OF_MEM(pStmt); pStmt->dnodeId = taosStr2Int32(pDnodeId->z, NULL, 10); @@ -1194,6 +1257,7 @@ SNode* createCreateComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, co } SNode* createDropComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, const SToken* pDnodeId) { + CHECK_PARSER_STATUS(pCxt); SDropComponentNodeStmt* pStmt = nodesMakeNode(type); CHECK_OUT_OF_MEM(pStmt); pStmt->dnodeId = taosStr2Int32(pDnodeId->z, NULL, 10); @@ -1202,6 +1266,7 @@ SNode* createDropComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, cons } SNode* createTopicOptions(SAstCreateContext* pCxt) { + CHECK_PARSER_STATUS(pCxt); STopicOptions* pOptions = nodesMakeNode(QUERY_NODE_TOPIC_OPTIONS); CHECK_OUT_OF_MEM(pOptions); pOptions->withTable = false; @@ -1212,6 +1277,7 @@ SNode* createTopicOptions(SAstCreateContext* pCxt) { SNode* createCreateTopicStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pTopicName, SNode* pQuery, const SToken* pSubscribeDbName, SNode* pOptions) { + CHECK_PARSER_STATUS(pCxt); SCreateTopicStmt* pStmt = nodesMakeNode(QUERY_NODE_CREATE_TOPIC_STMT); CHECK_OUT_OF_MEM(pStmt); strncpy(pStmt->topicName, pTopicName->z, pTopicName->n); @@ -1225,6 +1291,7 @@ SNode* createCreateTopicStmt(SAstCreateContext* pCxt, bool ignoreExists, const S } SNode* createDropTopicStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const SToken* pTopicName) { + CHECK_PARSER_STATUS(pCxt); SDropTopicStmt* pStmt = nodesMakeNode(QUERY_NODE_DROP_TOPIC_STMT); CHECK_OUT_OF_MEM(pStmt); strncpy(pStmt->topicName, pTopicName->z, pTopicName->n); @@ -1232,7 +1299,19 @@ SNode* createDropTopicStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const return (SNode*)pStmt; } +SNode* createDropCGroupStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const SToken* pCGroupId, + const SToken* pTopicName) { + CHECK_PARSER_STATUS(pCxt); + SDropCGroupStmt* pStmt = nodesMakeNode(QUERY_NODE_DROP_CGROUP_STMT); + CHECK_OUT_OF_MEM(pStmt); + pStmt->ignoreNotExists = ignoreNotExists; + strncpy(pStmt->topicName, pTopicName->z, pTopicName->n); + strncpy(pStmt->cgroup, pCGroupId->z, pCGroupId->n); + return (SNode*)pStmt; +} + SNode* createAlterLocalStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue) { + CHECK_PARSER_STATUS(pCxt); SAlterLocalStmt* pStmt = nodesMakeNode(QUERY_NODE_ALTER_LOCAL_STMT); CHECK_OUT_OF_MEM(pStmt); trimString(pConfig->z, pConfig->n, pStmt->config, sizeof(pStmt->config)); @@ -1243,6 +1322,7 @@ SNode* createAlterLocalStmt(SAstCreateContext* pCxt, const SToken* pConfig, cons } SNode* createDefaultExplainOptions(SAstCreateContext* pCxt) { + CHECK_PARSER_STATUS(pCxt); SExplainOptions* pOptions = nodesMakeNode(QUERY_NODE_EXPLAIN_OPTIONS); CHECK_OUT_OF_MEM(pOptions); pOptions->verbose = TSDB_DEFAULT_EXPLAIN_VERBOSE; @@ -1251,16 +1331,19 @@ SNode* createDefaultExplainOptions(SAstCreateContext* pCxt) { } SNode* setExplainVerbose(SAstCreateContext* pCxt, SNode* pOptions, const SToken* pVal) { + CHECK_PARSER_STATUS(pCxt); ((SExplainOptions*)pOptions)->verbose = (0 == strncasecmp(pVal->z, "true", pVal->n)); return pOptions; } SNode* setExplainRatio(SAstCreateContext* pCxt, SNode* pOptions, const SToken* pVal) { + CHECK_PARSER_STATUS(pCxt); ((SExplainOptions*)pOptions)->ratio = taosStr2Double(pVal->z, NULL); return pOptions; } SNode* createExplainStmt(SAstCreateContext* pCxt, bool analyze, SNode* pOptions, SNode* pQuery) { + CHECK_PARSER_STATUS(pCxt); SExplainStmt* pStmt = nodesMakeNode(QUERY_NODE_EXPLAIN_STMT); CHECK_OUT_OF_MEM(pStmt); pStmt->analyze = analyze; @@ -1270,9 +1353,7 @@ SNode* createExplainStmt(SAstCreateContext* pCxt, bool analyze, SNode* pOptions, } SNode* createDescribeStmt(SAstCreateContext* pCxt, SNode* pRealTable) { - if (NULL == pRealTable) { - return NULL; - } + CHECK_PARSER_STATUS(pCxt); SDescribeStmt* pStmt = nodesMakeNode(QUERY_NODE_DESCRIBE_STMT); CHECK_OUT_OF_MEM(pStmt); strcpy(pStmt->dbName, ((SRealTableNode*)pRealTable)->table.dbName); @@ -1282,12 +1363,14 @@ SNode* createDescribeStmt(SAstCreateContext* pCxt, SNode* pRealTable) { } SNode* createResetQueryCacheStmt(SAstCreateContext* pCxt) { + CHECK_PARSER_STATUS(pCxt); SNode* pStmt = nodesMakeNode(QUERY_NODE_RESET_QUERY_CACHE_STMT); CHECK_OUT_OF_MEM(pStmt); return pStmt; } SNode* createCompactStmt(SAstCreateContext* pCxt, SNodeList* pVgroups) { + CHECK_PARSER_STATUS(pCxt); SNode* pStmt = nodesMakeNode(QUERY_NODE_COMPACT_STMT); CHECK_OUT_OF_MEM(pStmt); return pStmt; @@ -1295,6 +1378,7 @@ SNode* createCompactStmt(SAstCreateContext* pCxt, SNodeList* pVgroups) { SNode* createCreateFunctionStmt(SAstCreateContext* pCxt, bool ignoreExists, bool aggFunc, const SToken* pFuncName, const SToken* pLibPath, SDataType dataType, int32_t bufSize) { + CHECK_PARSER_STATUS(pCxt); if (pLibPath->n <= 2) { pCxt->errCode = TSDB_CODE_PAR_SYNTAX_ERROR; return NULL; @@ -1311,6 +1395,7 @@ SNode* createCreateFunctionStmt(SAstCreateContext* pCxt, bool ignoreExists, bool } SNode* createDropFunctionStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const SToken* pFuncName) { + CHECK_PARSER_STATUS(pCxt); SDropFunctionStmt* pStmt = nodesMakeNode(QUERY_NODE_DROP_FUNCTION_STMT); CHECK_OUT_OF_MEM(pStmt); pStmt->ignoreNotExists = ignoreNotExists; @@ -1319,6 +1404,7 @@ SNode* createDropFunctionStmt(SAstCreateContext* pCxt, bool ignoreNotExists, con } SNode* createStreamOptions(SAstCreateContext* pCxt) { + CHECK_PARSER_STATUS(pCxt); SStreamOptions* pOptions = nodesMakeNode(QUERY_NODE_STREAM_OPTIONS); CHECK_OUT_OF_MEM(pOptions); pOptions->triggerType = STREAM_TRIGGER_AT_ONCE; @@ -1327,6 +1413,7 @@ SNode* createStreamOptions(SAstCreateContext* pCxt) { SNode* createCreateStreamStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pStreamName, SNode* pRealTable, SNode* pOptions, SNode* pQuery) { + CHECK_PARSER_STATUS(pCxt); SCreateStreamStmt* pStmt = nodesMakeNode(QUERY_NODE_CREATE_STREAM_STMT); CHECK_OUT_OF_MEM(pStmt); strncpy(pStmt->streamName, pStreamName->z, pStreamName->n); @@ -1342,6 +1429,7 @@ SNode* createCreateStreamStmt(SAstCreateContext* pCxt, bool ignoreExists, const } SNode* createDropStreamStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const SToken* pStreamName) { + CHECK_PARSER_STATUS(pCxt); SDropStreamStmt* pStmt = nodesMakeNode(QUERY_NODE_DROP_STREAM_STMT); CHECK_OUT_OF_MEM(pStmt); strncpy(pStmt->streamName, pStreamName->z, pStreamName->n); @@ -1350,6 +1438,7 @@ SNode* createDropStreamStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const } SNode* createKillStmt(SAstCreateContext* pCxt, ENodeType type, const SToken* pId) { + CHECK_PARSER_STATUS(pCxt); SKillStmt* pStmt = nodesMakeNode(type); CHECK_OUT_OF_MEM(pStmt); pStmt->targetId = taosStr2Int32(pId->z, NULL, 10); @@ -1357,30 +1446,35 @@ SNode* createKillStmt(SAstCreateContext* pCxt, ENodeType type, const SToken* pId } SNode* createMergeVgroupStmt(SAstCreateContext* pCxt, const SToken* pVgId1, const SToken* pVgId2) { + CHECK_PARSER_STATUS(pCxt); SNode* pStmt = nodesMakeNode(QUERY_NODE_MERGE_VGROUP_STMT); CHECK_OUT_OF_MEM(pStmt); return pStmt; } SNode* createRedistributeVgroupStmt(SAstCreateContext* pCxt, const SToken* pVgId, SNodeList* pDnodes) { + CHECK_PARSER_STATUS(pCxt); SNode* pStmt = nodesMakeNode(QUERY_NODE_REDISTRIBUTE_VGROUP_STMT); CHECK_OUT_OF_MEM(pStmt); return pStmt; } SNode* createSplitVgroupStmt(SAstCreateContext* pCxt, const SToken* pVgId) { + CHECK_PARSER_STATUS(pCxt); SNode* pStmt = nodesMakeNode(QUERY_NODE_SPLIT_VGROUP_STMT); CHECK_OUT_OF_MEM(pStmt); return pStmt; } SNode* createSyncdbStmt(SAstCreateContext* pCxt, const SToken* pDbName) { + CHECK_PARSER_STATUS(pCxt); SNode* pStmt = nodesMakeNode(QUERY_NODE_SYNCDB_STMT); CHECK_OUT_OF_MEM(pStmt); return pStmt; } SNode* createGrantStmt(SAstCreateContext* pCxt, int64_t privileges, SToken* pDbName, SToken* pUserName) { + CHECK_PARSER_STATUS(pCxt); if (!checkDbName(pCxt, pDbName, false) || !checkUserName(pCxt, pUserName)) { return NULL; } @@ -1393,6 +1487,7 @@ SNode* createGrantStmt(SAstCreateContext* pCxt, int64_t privileges, SToken* pDbN } SNode* createRevokeStmt(SAstCreateContext* pCxt, int64_t privileges, SToken* pDbName, SToken* pUserName) { + CHECK_PARSER_STATUS(pCxt); if (!checkDbName(pCxt, pDbName, false) || !checkUserName(pCxt, pUserName)) { return NULL; } diff --git a/source/libs/parser/src/parCalcConst.c b/source/libs/parser/src/parCalcConst.c index 7b24d93ad1..42b001c131 100644 --- a/source/libs/parser/src/parCalcConst.c +++ b/source/libs/parser/src/parCalcConst.c @@ -176,11 +176,11 @@ static int32_t calcConstProject(SNode* pProject, SNode** pNew) { } int32_t code = scalarCalculateConstants(pProject, pNew); - if (TSDB_CODE_SUCCESS == code && QUERY_NODE_VALUE == nodeType(pNew) && NULL != pAssociation) { + if (TSDB_CODE_SUCCESS == code && QUERY_NODE_VALUE == nodeType(*pNew) && NULL != pAssociation) { int32_t size = taosArrayGetSize(pAssociation); for (int32_t i = 0; i < size; ++i) { - SNode** pCol = taosArrayGet(pAssociation, i); - *pCol = nodesCloneNode(pNew); + SNode** pCol = taosArrayGetP(pAssociation, i); + *pCol = nodesCloneNode(*pNew); if (NULL == *pCol) { return TSDB_CODE_OUT_OF_MEMORY; } @@ -233,9 +233,9 @@ static int32_t calcConstGroupBy(SCalcConstContext* pCxt, SSelectStmt* pSelect) { } static int32_t calcConstSelect(SCalcConstContext* pCxt, SSelectStmt* pSelect, bool subquery) { - int32_t code = calcConstProjections(pCxt, pSelect, subquery); + int32_t code = calcConstFromTable(pCxt, pSelect); if (TSDB_CODE_SUCCESS == code) { - code = calcConstFromTable(pCxt, pSelect); + code = calcConstProjections(pCxt, pSelect, subquery); } if (TSDB_CODE_SUCCESS == code) { code = calcConstSelectCondition(pCxt, pSelect, &pSelect->pWhere); diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 8fb9780f8a..540de2d639 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -53,6 +53,7 @@ static SKeyword keywordTable[] = { {"CACHE", TK_CACHE}, {"CACHELAST", TK_CACHELAST}, {"CAST", TK_CAST}, + {"CGROUP", TK_CGROUP}, {"CLUSTER", TK_CLUSTER}, {"COLUMN", TK_COLUMN}, {"COMMENT", TK_COMMENT}, @@ -156,6 +157,7 @@ static SKeyword keywordTable[] = { {"REVOKE", TK_REVOKE}, {"ROLLUP", TK_ROLLUP}, {"SCHEMA", TK_SCHEMA}, + {"SCHEMALESS", TK_SCHEMALESS}, {"SCORES", TK_SCORES}, {"SELECT", TK_SELECT}, {"SESSION", TK_SESSION}, @@ -605,12 +607,12 @@ uint32_t tGetToken(const char* z, uint32_t* tokenId) { } return i; } - case '[': { - for (i = 1; z[i] && z[i - 1] != ']'; i++) { - } - *tokenId = TK_NK_ID; - return i; - } + // case '[': { + // for (i = 1; z[i] && z[i - 1] != ']'; i++) { + // } + // *tokenId = TK_NK_ID; + // return i; + // } case 'T': case 't': case 'F': diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 472f74e4e8..196ad6ef7c 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -342,12 +342,14 @@ static void setColumnInfoBySchema(const SRealTableNode* pTable, const SSchema* p } } -static void setColumnInfoByExpr(const STableNode* pTable, SExprNode* pExpr, SColumnNode* pCol) { +static void setColumnInfoByExpr(const STableNode* pTable, SExprNode* pExpr, SColumnNode** pColRef) { + SColumnNode* pCol = *pColRef; + pCol->pProjectRef = (SNode*)pExpr; if (NULL == pExpr->pAssociation) { pExpr->pAssociation = taosArrayInit(TARRAY_MIN_SIZE, POINTER_BYTES); } - taosArrayPush(pExpr->pAssociation, &pCol); + taosArrayPush(pExpr->pAssociation, &pColRef); if (NULL != pTable) { strcpy(pCol->tableAlias, pTable->tableAlias); } else if (QUERY_NODE_COLUMN == nodeType(pExpr)) { @@ -385,7 +387,7 @@ static int32_t createColumnsByTable(STranslateContext* pCxt, const STableNode* p if (NULL == pCol) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_OUT_OF_MEMORY); } - setColumnInfoByExpr(pTable, (SExprNode*)pNode, pCol); + setColumnInfoByExpr(pTable, (SExprNode*)pNode, &pCol); nodesListAppend(pList, (SNode*)pCol); } } @@ -425,8 +427,9 @@ static bool isPrimaryKey(STempTableNode* pTable, SNode* pExpr) { return isPrimaryKeyImpl(pTable, pExpr); } -static bool findAndSetColumn(SColumnNode* pCol, const STableNode* pTable) { - bool found = false; +static bool findAndSetColumn(SColumnNode** pColRef, const STableNode* pTable) { + SColumnNode* pCol = *pColRef; + bool found = false; if (QUERY_NODE_REAL_TABLE == nodeType(pTable)) { const STableMeta* pMeta = ((SRealTableNode*)pTable)->pMeta; if (isInternalPrimaryKey(pCol)) { @@ -448,7 +451,7 @@ static bool findAndSetColumn(SColumnNode* pCol, const STableNode* pTable) { SExprNode* pExpr = (SExprNode*)pNode; if (0 == strcmp(pCol->colName, pExpr->aliasName) || (isPrimaryKey((STempTableNode*)pTable, pNode) && isInternalPrimaryKey(pCol))) { - setColumnInfoByExpr(pTable, pExpr, pCol); + setColumnInfoByExpr(pTable, pExpr, pColRef); found = true; break; } @@ -457,36 +460,36 @@ static bool findAndSetColumn(SColumnNode* pCol, const STableNode* pTable) { return found; } -static EDealRes translateColumnWithPrefix(STranslateContext* pCxt, SColumnNode* pCol) { +static EDealRes translateColumnWithPrefix(STranslateContext* pCxt, SColumnNode** pCol) { SArray* pTables = taosArrayGetP(pCxt->pNsLevel, pCxt->currLevel); size_t nums = taosArrayGetSize(pTables); bool foundTable = false; for (size_t i = 0; i < nums; ++i) { STableNode* pTable = taosArrayGetP(pTables, i); - if (belongTable(pCxt->pParseCxt->db, pCol, pTable)) { + if (belongTable(pCxt->pParseCxt->db, (*pCol), pTable)) { foundTable = true; if (findAndSetColumn(pCol, pTable)) { break; } - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_COLUMN, pCol->colName); + return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_COLUMN, (*pCol)->colName); } } if (!foundTable) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_TABLE_NOT_EXIST, pCol->tableAlias); + return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_TABLE_NOT_EXIST, (*pCol)->tableAlias); } return DEAL_RES_CONTINUE; } -static EDealRes translateColumnWithoutPrefix(STranslateContext* pCxt, SColumnNode* pCol) { +static EDealRes translateColumnWithoutPrefix(STranslateContext* pCxt, SColumnNode** pCol) { SArray* pTables = taosArrayGetP(pCxt->pNsLevel, pCxt->currLevel); size_t nums = taosArrayGetSize(pTables); bool found = false; - bool isInternalPk = isInternalPrimaryKey(pCol); + bool isInternalPk = isInternalPrimaryKey(*pCol); for (size_t i = 0; i < nums; ++i) { STableNode* pTable = taosArrayGetP(pTables, i); if (findAndSetColumn(pCol, pTable)) { if (found) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_AMBIGUOUS_COLUMN, pCol->colName); + return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_AMBIGUOUS_COLUMN, (*pCol)->colName); } found = true; if (isInternalPk) { @@ -501,18 +504,18 @@ static EDealRes translateColumnWithoutPrefix(STranslateContext* pCxt, SColumnNod } return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_INTERNAL_PK); } else { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_COLUMN, pCol->colName); + return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_COLUMN, (*pCol)->colName); } } return DEAL_RES_CONTINUE; } -static bool translateColumnUseAlias(STranslateContext* pCxt, SColumnNode* pCol) { +static bool translateColumnUseAlias(STranslateContext* pCxt, SColumnNode** pCol) { SNodeList* pProjectionList = pCxt->pCurrStmt->pProjectionList; SNode* pNode; FOREACH(pNode, pProjectionList) { SExprNode* pExpr = (SExprNode*)pNode; - if (0 == strcmp(pCol->colName, pExpr->aliasName)) { + if (0 == strcmp((*pCol)->colName, pExpr->aliasName)) { setColumnInfoByExpr(NULL, pExpr, pCol); return true; } @@ -520,14 +523,14 @@ static bool translateColumnUseAlias(STranslateContext* pCxt, SColumnNode* pCol) return false; } -static EDealRes translateColumn(STranslateContext* pCxt, SColumnNode* pCol) { +static EDealRes translateColumn(STranslateContext* pCxt, SColumnNode** pCol) { // count(*)/first(*)/last(*) and so on - if (0 == strcmp(pCol->colName, "*")) { + if (0 == strcmp((*pCol)->colName, "*")) { return DEAL_RES_CONTINUE; } EDealRes res = DEAL_RES_CONTINUE; - if ('\0' != pCol->tableAlias[0]) { + if ('\0' != (*pCol)->tableAlias[0]) { res = translateColumnWithPrefix(pCxt, pCol); } else { bool found = false; @@ -870,6 +873,55 @@ static int32_t getFuncInfo(STranslateContext* pCxt, SFunctionNode* pFunc) { return fmGetFuncInfo(¶m, pFunc); } +static int32_t translateAggFunc(STranslateContext* pCxt, SFunctionNode* pFunc) { + if (beforeHaving(pCxt->currClause)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_ILLEGAL_USE_AGG_FUNCTION); + } + if (hasInvalidFuncNesting(pFunc->pParameterList)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_AGG_FUNC_NESTING); + } + if (pCxt->pCurrStmt->hasIndefiniteRowsFunc) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_NOT_ALLOWED_FUNC); + } + + if (isCountStar(pFunc)) { + return rewriteCountStar(pCxt, pFunc); + } + return TSDB_CODE_SUCCESS; +} + +static int32_t translateScanPseudoColumnFunc(STranslateContext* pCxt, SFunctionNode* pFunc) { + if (0 == LIST_LENGTH(pFunc->pParameterList)) { + if (QUERY_NODE_REAL_TABLE != nodeType(pCxt->pCurrStmt->pFromTable)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TBNAME); + } + } else { + SValueNode* pVal = nodesListGetNode(pFunc->pParameterList, 0); + STableNode* pTable = NULL; + pCxt->errCode = findTable(pCxt, pVal->literal, &pTable); + if (TSDB_CODE_SUCCESS == pCxt->errCode && (NULL == pTable || QUERY_NODE_REAL_TABLE != nodeType(pTable))) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TBNAME); + } + } + return TSDB_CODE_SUCCESS; +} + +static int32_t translateIndefiniteRowsFunc(STranslateContext* pCxt, SFunctionNode* pFunc) { + if (SQL_CLAUSE_SELECT != pCxt->currClause || pCxt->pCurrStmt->hasIndefiniteRowsFunc || pCxt->pCurrStmt->hasAggFuncs) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_NOT_ALLOWED_FUNC); + } + if (hasInvalidFuncNesting(pFunc->pParameterList)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_AGG_FUNC_NESTING); + } + return TSDB_CODE_SUCCESS; +} + +static void setFuncClassification(SSelectStmt* pSelect, SFunctionNode* pFunc) { + pSelect->hasAggFuncs = pSelect->hasAggFuncs ? true : fmIsAggFunc(pFunc->funcId); + pSelect->hasRepeatScanFuncs = pSelect->hasRepeatScanFuncs ? true : fmIsRepeatScanFunc(pFunc->funcId); + pSelect->hasIndefiniteRowsFunc = pSelect->hasIndefiniteRowsFunc ? true : fmIsIndefiniteRowsFunc(pFunc->funcId); +} + static EDealRes translateFunction(STranslateContext* pCxt, SFunctionNode* pFunc) { SNode* pParam = NULL; FOREACH(pParam, pFunc->pParameterList) { @@ -880,48 +932,16 @@ static EDealRes translateFunction(STranslateContext* pCxt, SFunctionNode* pFunc) pCxt->errCode = getFuncInfo(pCxt, pFunc); if (TSDB_CODE_SUCCESS == pCxt->errCode && fmIsAggFunc(pFunc->funcId)) { - if (beforeHaving(pCxt->currClause)) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_ILLEGAL_USE_AGG_FUNCTION); - } - if (hasInvalidFuncNesting(pFunc->pParameterList)) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_AGG_FUNC_NESTING); - } - if (pCxt->pCurrStmt->hasIndefiniteRowsFunc) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_NOT_ALLOWED_FUNC); - } - - pCxt->pCurrStmt->hasAggFuncs = true; - if (isCountStar(pFunc)) { - pCxt->errCode = rewriteCountStar(pCxt, pFunc); - } - - if (fmIsRepeatScanFunc(pFunc->funcId)) { - pCxt->pCurrStmt->hasRepeatScanFuncs = true; - } + pCxt->errCode = translateAggFunc(pCxt, pFunc); } if (TSDB_CODE_SUCCESS == pCxt->errCode && fmIsScanPseudoColumnFunc(pFunc->funcId)) { - if (0 == LIST_LENGTH(pFunc->pParameterList)) { - if (QUERY_NODE_REAL_TABLE != nodeType(pCxt->pCurrStmt->pFromTable)) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_TBNAME); - } - } else { - SValueNode* pVal = nodesListGetNode(pFunc->pParameterList, 0); - STableNode* pTable = NULL; - pCxt->errCode = findTable(pCxt, pVal->literal, &pTable); - if (TSDB_CODE_SUCCESS == pCxt->errCode && (NULL == pTable || QUERY_NODE_REAL_TABLE != nodeType(pTable))) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_TBNAME); - } - } + pCxt->errCode = translateScanPseudoColumnFunc(pCxt, pFunc); } if (TSDB_CODE_SUCCESS == pCxt->errCode && fmIsIndefiniteRowsFunc(pFunc->funcId)) { - if (SQL_CLAUSE_SELECT != pCxt->currClause || pCxt->pCurrStmt->hasIndefiniteRowsFunc || - pCxt->pCurrStmt->hasAggFuncs) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_NOT_ALLOWED_FUNC); - } - if (hasInvalidFuncNesting(pFunc->pParameterList)) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_AGG_FUNC_NESTING); - } - pCxt->pCurrStmt->hasIndefiniteRowsFunc = true; + pCxt->errCode = translateIndefiniteRowsFunc(pCxt, pFunc); + } + if (TSDB_CODE_SUCCESS == pCxt->errCode) { + setFuncClassification(pCxt->pCurrStmt, pFunc); } return TSDB_CODE_SUCCESS == pCxt->errCode ? DEAL_RES_CONTINUE : DEAL_RES_ERROR; } @@ -936,34 +956,34 @@ static EDealRes translateLogicCond(STranslateContext* pCxt, SLogicConditionNode* return DEAL_RES_CONTINUE; } -static EDealRes doTranslateExpr(SNode* pNode, void* pContext) { +static EDealRes doTranslateExpr(SNode** pNode, void* pContext) { STranslateContext* pCxt = (STranslateContext*)pContext; - switch (nodeType(pNode)) { + switch (nodeType(*pNode)) { case QUERY_NODE_COLUMN: - return translateColumn(pCxt, (SColumnNode*)pNode); + return translateColumn(pCxt, (SColumnNode**)pNode); case QUERY_NODE_VALUE: - return translateValue(pCxt, (SValueNode*)pNode); + return translateValue(pCxt, (SValueNode*)*pNode); case QUERY_NODE_OPERATOR: - return translateOperator(pCxt, (SOperatorNode*)pNode); + return translateOperator(pCxt, (SOperatorNode*)*pNode); case QUERY_NODE_FUNCTION: - return translateFunction(pCxt, (SFunctionNode*)pNode); + return translateFunction(pCxt, (SFunctionNode*)*pNode); case QUERY_NODE_LOGIC_CONDITION: - return translateLogicCond(pCxt, (SLogicConditionNode*)pNode); + return translateLogicCond(pCxt, (SLogicConditionNode*)*pNode); case QUERY_NODE_TEMP_TABLE: - return translateExprSubquery(pCxt, ((STempTableNode*)pNode)->pSubquery); + return translateExprSubquery(pCxt, ((STempTableNode*)*pNode)->pSubquery); default: break; } return DEAL_RES_CONTINUE; } -static int32_t translateExpr(STranslateContext* pCxt, SNode* pNode) { - nodesWalkExprPostOrder(pNode, doTranslateExpr, pCxt); +static int32_t translateExpr(STranslateContext* pCxt, SNode** pNode) { + nodesRewriteExprPostOrder(pNode, doTranslateExpr, pCxt); return pCxt->errCode; } static int32_t translateExprList(STranslateContext* pCxt, SNodeList* pList) { - nodesWalkExprsPostOrder(pList, doTranslateExpr, pCxt); + nodesRewriteExprsPostOrder(pList, doTranslateExpr, pCxt); return pCxt->errCode; } @@ -1238,12 +1258,31 @@ static uint8_t getStmtPrecision(SNode* pStmt) { return 0; } +static bool stmtIsSingleTable(SNode* pStmt) { + if (QUERY_NODE_SELECT_STMT == nodeType(pStmt)) { + return ((STableNode*)((SSelectStmt*)pStmt)->pFromTable)->singleTable; + } + return false; +} + static uint8_t getJoinTablePrecision(SJoinTableNode* pJoinTable) { uint8_t lp = ((STableNode*)pJoinTable->pLeft)->precision; uint8_t rp = ((STableNode*)pJoinTable->pRight)->precision; return (lp > rp ? rp : lp); } +static bool joinTableIsSingleTable(SJoinTableNode* pJoinTable) { + return (((STableNode*)pJoinTable->pLeft)->singleTable && ((STableNode*)pJoinTable->pRight)->singleTable); +} + +static bool isSingleTable(SRealTableNode* pRealTable) { + int8_t tableType = pRealTable->pMeta->tableType; + if (TSDB_SYSTEM_TABLE == tableType) { + return 0 != strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_USER_TABLES); + } + return (TSDB_CHILD_TABLE == tableType || TSDB_NORMAL_TABLE == tableType); +} + static int32_t translateTable(STranslateContext* pCxt, SNode* pTable) { int32_t code = TSDB_CODE_SUCCESS; switch (nodeType(pTable)) { @@ -1262,6 +1301,7 @@ static int32_t translateTable(STranslateContext* pCxt, SNode* pTable) { code = setTableVgroupList(pCxt, &name, pRealTable); } pRealTable->table.precision = pRealTable->pMeta->tableInfo.precision; + pRealTable->table.singleTable = isSingleTable(pRealTable); if (TSDB_CODE_SUCCESS == code) { code = addNamespace(pCxt, pRealTable); } @@ -1272,6 +1312,7 @@ static int32_t translateTable(STranslateContext* pCxt, SNode* pTable) { code = translateSubquery(pCxt, pTempTable->pSubquery); if (TSDB_CODE_SUCCESS == code) { pTempTable->table.precision = getStmtPrecision(pTempTable->pSubquery); + pTempTable->table.singleTable = stmtIsSingleTable(pTempTable->pSubquery); code = addNamespace(pCxt, pTempTable); } break; @@ -1284,7 +1325,8 @@ static int32_t translateTable(STranslateContext* pCxt, SNode* pTable) { } if (TSDB_CODE_SUCCESS == code) { pJoinTable->table.precision = getJoinTablePrecision(pJoinTable); - code = translateExpr(pCxt, pJoinTable->pOnCond); + pJoinTable->table.singleTable = joinTableIsSingleTable(pJoinTable); + code = translateExpr(pCxt, &pJoinTable->pOnCond); } break; } @@ -1517,7 +1559,7 @@ static int32_t translateOrderByPosition(STranslateContext* pCxt, SNodeList* pPro if (NULL == pCol) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_OUT_OF_MEMORY); } - setColumnInfoByExpr(NULL, (SExprNode*)nodesListGetNode(pProjectionList, pos - 1), pCol); + setColumnInfoByExpr(NULL, (SExprNode*)nodesListGetNode(pProjectionList, pos - 1), &pCol); ((SOrderByExprNode*)pNode)->pExpr = (SNode*)pCol; nodesDestroyNode(pExpr); } @@ -1563,7 +1605,7 @@ static int32_t translateHaving(STranslateContext* pCxt, SSelectStmt* pSelect) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_GROUPBY_LACK_EXPRESSION); } pCxt->currClause = SQL_CLAUSE_HAVING; - int32_t code = translateExpr(pCxt, pSelect->pHaving); + int32_t code = translateExpr(pCxt, &pSelect->pHaving); if (TSDB_CODE_SUCCESS == code) { code = checkExprForGroupBy(pCxt, &pSelect->pHaving); } @@ -1811,7 +1853,7 @@ static int32_t translateWindow(STranslateContext* pCxt, SSelectStmt* pSelect) { return TSDB_CODE_SUCCESS; } pCxt->currClause = SQL_CLAUSE_WINDOW; - int32_t code = translateExpr(pCxt, pSelect->pWindow); + int32_t code = translateExpr(pCxt, &pSelect->pWindow); if (TSDB_CODE_SUCCESS == code) { code = checkWindow(pCxt, pSelect); } @@ -1825,7 +1867,7 @@ static int32_t translatePartitionBy(STranslateContext* pCxt, SNodeList* pPartiti static int32_t translateWhere(STranslateContext* pCxt, SNode* pWhere) { pCxt->currClause = SQL_CLAUSE_WHERE; - return translateExpr(pCxt, pWhere); + return translateExpr(pCxt, &pWhere); } static int32_t translateFrom(STranslateContext* pCxt, SSelectStmt* pSelect) { @@ -1857,7 +1899,7 @@ static int32_t createPrimaryKeyColByTable(STranslateContext* pCxt, STableNode* p } pCol->colId = PRIMARYKEY_TIMESTAMP_COL_ID; strcpy(pCol->colName, PK_TS_COL_INTERNAL_NAME); - if (!findAndSetColumn(pCol, pTable)) { + if (!findAndSetColumn(&pCol, pTable)) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TIMELINE_FUNC); } *pPrimaryKey = (SNode*)pCol; @@ -2075,6 +2117,7 @@ static int32_t buildCreateDbReq(STranslateContext* pCxt, SCreateDatabaseStmt* pS pReq->replications = pStmt->pOptions->replica; pReq->strict = pStmt->pOptions->strict; pReq->cacheLastRow = pStmt->pOptions->cachelast; + pReq->schemaless = pStmt->pOptions->schemaless; pReq->ignoreExist = pStmt->ignoreExists; return buildCreateDbRetentions(pStmt->pOptions->pRetentions, pReq); } @@ -2274,6 +2317,9 @@ static int32_t checkDatabaseOptions(STranslateContext* pCxt, const char* pDbName if (TSDB_CODE_SUCCESS == code) { code = checkDbRetentionsOption(pCxt, pOptions->pRetentions); } + if (TSDB_CODE_SUCCESS == code) { + code = checkDbEnumOption(pCxt, "schemaless", pOptions->schemaless, TSDB_DB_SCHEMALESS_ON, TSDB_DB_SCHEMALESS_OFF); + } if (TSDB_CODE_SUCCESS == code) { code = checkOptionsDependency(pCxt, pDbName, pOptions); } @@ -3267,6 +3313,18 @@ static int32_t translateDropTopic(STranslateContext* pCxt, SDropTopicStmt* pStmt return buildCmdMsg(pCxt, TDMT_MND_DROP_TOPIC, (FSerializeFunc)tSerializeSMDropTopicReq, &dropReq); } +static int32_t translateDropCGroup(STranslateContext* pCxt, SDropCGroupStmt* pStmt) { + SMDropCgroupReq dropReq = {0}; + + SName name; + tNameSetDbName(&name, pCxt->pParseCxt->acctId, pStmt->topicName, strlen(pStmt->topicName)); + tNameGetFullDbName(&name, dropReq.topic); + dropReq.igNotExists = pStmt->ignoreNotExists; + strcpy(dropReq.cgroup, pStmt->cgroup); + + return buildCmdMsg(pCxt, TDMT_MND_DROP_CGROUP, (FSerializeFunc)tSerializeSMDropCgroupReq, &dropReq); +} + static int32_t translateAlterLocal(STranslateContext* pCxt, SAlterLocalStmt* pStmt) { // todo return TSDB_CODE_SUCCESS; @@ -3326,6 +3384,8 @@ static int32_t buildCreateStreamReq(STranslateContext* pCxt, SCreateStreamStmt* pReq->igExists = pStmt->ignoreExists; SName name; + // tNameSetDbName(&name, pCxt->pParseCxt->acctId, pStmt->streamName, strlen(pStmt->streamName)); + // tNameGetFullDbName(&name, pReq->name); tNameExtractFullName(toName(pCxt->pParseCxt->acctId, pCxt->pParseCxt->db, pStmt->streamName, &name), pReq->name); if ('\0' != pStmt->targetTabName[0]) { @@ -3550,6 +3610,9 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) { case QUERY_NODE_DROP_TOPIC_STMT: code = translateDropTopic(pCxt, (SDropTopicStmt*)pNode); break; + case QUERY_NODE_DROP_CGROUP_STMT: + code = translateDropCGroup(pCxt, (SDropCGroupStmt*)pNode); + break; case QUERY_NODE_ALTER_LOCAL_STMT: code = translateAlterLocal(pCxt, (SAlterLocalStmt*)pNode); break; diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 0854bb83e4..262abac54b 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -100,25 +100,25 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 358 +#define YYNOCODE 361 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EOrder yy14; - ENullOrder yy17; - SNodeList* yy60; - SToken yy105; - int32_t yy140; - SNode* yy172; - EFillMode yy202; - SDataType yy248; - EOperatorType yy572; - int64_t yy593; - SAlterOption yy609; - bool yy617; - EJoinType yy636; + EFillMode yy18; + SAlterOption yy25; + SToken yy53; + EOperatorType yy136; + int32_t yy158; + ENullOrder yy185; + SNodeList* yy236; + EJoinType yy342; + EOrder yy430; + int64_t yy435; + SDataType yy450; + bool yy603; + SNode* yy636; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -134,17 +134,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 605 -#define YYNRULE 452 -#define YYNTOKEN 238 -#define YY_MAX_SHIFT 604 -#define YY_MIN_SHIFTREDUCE 893 -#define YY_MAX_SHIFTREDUCE 1344 -#define YY_ERROR_ACTION 1345 -#define YY_ACCEPT_ACTION 1346 -#define YY_NO_ACTION 1347 -#define YY_MIN_REDUCE 1348 -#define YY_MAX_REDUCE 1799 +#define YYNSTATE 611 +#define YYNRULE 455 +#define YYNTOKEN 240 +#define YY_MAX_SHIFT 610 +#define YY_MIN_SHIFTREDUCE 901 +#define YY_MAX_SHIFTREDUCE 1355 +#define YY_ERROR_ACTION 1356 +#define YY_ACCEPT_ACTION 1357 +#define YY_NO_ACTION 1358 +#define YY_MIN_REDUCE 1359 +#define YY_MAX_REDUCE 1813 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -211,601 +211,604 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2154) +#define YY_ACTTAB_COUNT (2153) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1467, 1777, 1777, 1646, 383, 1634, 384, 1380, 292, 11, - /* 10 */ 10, 343, 35, 33, 1776, 146, 24, 923, 1774, 1774, - /* 20 */ 301, 391, 1159, 384, 1380, 1631, 36, 34, 32, 31, - /* 30 */ 30, 1662, 26, 36, 34, 32, 31, 30, 518, 503, - /* 40 */ 1627, 1633, 36, 34, 32, 31, 30, 1157, 1346, 502, - /* 50 */ 1777, 522, 130, 1617, 1360, 927, 928, 518, 14, 483, - /* 60 */ 35, 33, 1285, 145, 1165, 28, 223, 1774, 301, 1675, - /* 70 */ 1159, 349, 80, 1647, 505, 1649, 1650, 501, 77, 522, - /* 80 */ 1, 62, 1715, 1777, 1181, 519, 273, 1711, 518, 1261, - /* 90 */ 1634, 113, 398, 309, 108, 1157, 1775, 104, 1777, 1470, - /* 100 */ 1774, 1646, 601, 1473, 419, 271, 14, 317, 35, 33, - /* 110 */ 1631, 147, 1165, 1158, 1478, 1774, 301, 38, 1159, 36, - /* 120 */ 34, 32, 31, 30, 388, 1627, 1633, 56, 2, 1662, - /* 130 */ 1181, 36, 34, 32, 31, 30, 522, 503, 36, 34, - /* 140 */ 32, 31, 30, 1157, 55, 1523, 1777, 502, 39, 131, - /* 150 */ 601, 1617, 291, 1435, 14, 1371, 1160, 1521, 1662, 145, - /* 160 */ 1165, 1158, 559, 1774, 1450, 274, 472, 1675, 140, 1341, - /* 170 */ 132, 1647, 505, 1649, 1650, 501, 2, 522, 1163, 1164, - /* 180 */ 1517, 1209, 1210, 1212, 1213, 1214, 1215, 1216, 498, 520, - /* 190 */ 1224, 1225, 1226, 1227, 1228, 1229, 1247, 1410, 601, 519, - /* 200 */ 1299, 471, 1183, 55, 1160, 1617, 1456, 1196, 148, 1158, - /* 210 */ 473, 347, 447, 94, 484, 1791, 93, 92, 91, 90, - /* 220 */ 89, 88, 87, 86, 85, 1729, 1163, 1164, 1478, 1209, - /* 230 */ 1210, 1212, 1213, 1214, 1215, 1216, 498, 520, 1224, 1225, - /* 240 */ 1226, 1227, 1228, 1229, 1454, 148, 1248, 479, 1523, 1726, - /* 250 */ 1340, 1777, 1160, 597, 596, 306, 1309, 433, 432, 55, - /* 260 */ 1521, 1523, 431, 398, 145, 109, 428, 1253, 1774, 427, - /* 270 */ 426, 425, 148, 1522, 1163, 1164, 112, 1209, 1210, 1212, - /* 280 */ 1213, 1214, 1215, 1216, 498, 520, 1224, 1225, 1226, 1227, - /* 290 */ 1228, 1229, 35, 33, 1349, 465, 1307, 1308, 1310, 1311, - /* 300 */ 301, 556, 1159, 27, 299, 1242, 1243, 1244, 1245, 1246, - /* 310 */ 1250, 1251, 1252, 110, 939, 94, 62, 1469, 93, 92, - /* 320 */ 91, 90, 89, 88, 87, 86, 85, 1157, 143, 1722, - /* 330 */ 1723, 148, 1727, 519, 1184, 519, 479, 1631, 1474, 417, - /* 340 */ 35, 33, 1230, 506, 1165, 348, 304, 104, 301, 1568, - /* 350 */ 1159, 55, 1627, 1633, 424, 36, 34, 32, 31, 30, - /* 360 */ 8, 479, 1478, 522, 1478, 112, 36, 34, 32, 31, - /* 370 */ 30, 1556, 433, 432, 1635, 1157, 154, 431, 156, 1646, - /* 380 */ 109, 428, 601, 519, 427, 426, 425, 148, 35, 33, - /* 390 */ 112, 556, 1165, 1158, 1631, 358, 301, 305, 1159, 1523, - /* 400 */ 60, 274, 110, 59, 1182, 128, 312, 1662, 9, 1627, - /* 410 */ 1633, 1521, 1478, 1185, 1480, 503, 481, 142, 1722, 1723, - /* 420 */ 522, 1727, 468, 1157, 1196, 502, 342, 110, 341, 1617, - /* 430 */ 601, 313, 1247, 64, 289, 1397, 1160, 188, 1559, 1561, - /* 440 */ 1165, 1158, 144, 1722, 1723, 1675, 1727, 548, 263, 1647, - /* 450 */ 505, 1649, 1650, 501, 1370, 522, 9, 434, 1163, 1164, - /* 460 */ 334, 1209, 1210, 1212, 1213, 1214, 1215, 1216, 498, 520, - /* 470 */ 1224, 1225, 1226, 1227, 1228, 1229, 283, 311, 601, 148, - /* 480 */ 336, 332, 1248, 1120, 1160, 128, 475, 455, 148, 1158, - /* 490 */ 373, 1122, 474, 469, 1480, 1463, 519, 36, 34, 32, - /* 500 */ 31, 30, 1369, 1253, 1617, 1465, 1163, 1164, 359, 1209, - /* 510 */ 1210, 1212, 1213, 1214, 1215, 1216, 498, 520, 1224, 1225, - /* 520 */ 1226, 1227, 1228, 1229, 284, 1478, 282, 281, 1368, 421, - /* 530 */ 558, 1292, 1160, 423, 158, 157, 456, 1183, 214, 27, - /* 540 */ 299, 1242, 1243, 1244, 1245, 1246, 1250, 1251, 1252, 1646, - /* 550 */ 382, 1121, 1617, 386, 1163, 1164, 422, 1209, 1210, 1212, - /* 560 */ 1213, 1214, 1215, 1216, 498, 520, 1224, 1225, 1226, 1227, - /* 570 */ 1228, 1229, 35, 33, 270, 1777, 1181, 1662, 1617, 519, - /* 580 */ 301, 314, 1159, 366, 1249, 482, 378, 1461, 145, 128, - /* 590 */ 554, 397, 1774, 390, 423, 502, 386, 1235, 1480, 1617, - /* 600 */ 940, 54, 939, 1183, 379, 1254, 70, 1157, 1478, 553, - /* 610 */ 552, 1367, 551, 550, 549, 1675, 1366, 422, 81, 1647, - /* 620 */ 505, 1649, 1650, 501, 1165, 522, 1365, 1471, 1715, 941, - /* 630 */ 127, 1186, 294, 1711, 141, 1407, 32, 31, 30, 191, - /* 640 */ 2, 25, 1029, 545, 544, 543, 1033, 542, 1035, 1036, - /* 650 */ 541, 1038, 538, 1743, 1044, 535, 1046, 1047, 532, 529, - /* 660 */ 497, 1617, 601, 1364, 1363, 1362, 1617, 1359, 1358, 1357, - /* 670 */ 1356, 1355, 1354, 1158, 377, 1353, 1617, 372, 371, 370, - /* 680 */ 369, 368, 365, 364, 363, 362, 361, 357, 356, 355, - /* 690 */ 354, 353, 352, 351, 350, 577, 576, 575, 316, 1211, - /* 700 */ 574, 573, 572, 114, 567, 566, 565, 564, 563, 562, - /* 710 */ 561, 560, 121, 1617, 1617, 1617, 1160, 1617, 1617, 1617, - /* 720 */ 1617, 1617, 1617, 1352, 7, 1617, 128, 1351, 430, 429, - /* 730 */ 1646, 571, 569, 1560, 1561, 1481, 927, 928, 1163, 1164, - /* 740 */ 1729, 1209, 1210, 1212, 1213, 1214, 1215, 1216, 498, 520, - /* 750 */ 1224, 1225, 1226, 1227, 1228, 1229, 199, 129, 1662, 519, - /* 760 */ 1284, 1646, 252, 1729, 1725, 1211, 503, 991, 1159, 519, - /* 770 */ 1183, 1475, 1606, 1617, 250, 53, 502, 1617, 52, 506, - /* 780 */ 1617, 1597, 1734, 1280, 993, 1569, 483, 1724, 1478, 1662, - /* 790 */ 1144, 1145, 487, 1157, 479, 159, 1675, 482, 1478, 80, - /* 800 */ 1647, 505, 1649, 1650, 501, 246, 522, 502, 1508, 1715, - /* 810 */ 1165, 1617, 519, 273, 1711, 570, 454, 324, 179, 55, - /* 820 */ 1168, 177, 485, 112, 516, 1777, 181, 1675, 490, 180, - /* 830 */ 81, 1647, 505, 1649, 1650, 501, 1637, 522, 145, 519, - /* 840 */ 1715, 1478, 1774, 483, 294, 1711, 141, 183, 601, 185, - /* 850 */ 182, 517, 184, 445, 495, 337, 79, 1646, 215, 1158, - /* 860 */ 110, 519, 519, 547, 461, 1742, 443, 964, 1478, 47, - /* 870 */ 272, 118, 1639, 236, 315, 212, 1722, 478, 1392, 477, - /* 880 */ 11, 10, 1777, 1390, 965, 1662, 1171, 58, 57, 346, - /* 890 */ 1478, 1478, 153, 503, 1280, 147, 1361, 340, 46, 1774, - /* 900 */ 436, 1167, 1160, 502, 202, 439, 37, 1617, 1436, 269, - /* 910 */ 37, 457, 330, 37, 326, 322, 150, 225, 1343, 1344, - /* 920 */ 1646, 1455, 116, 1675, 1163, 1164, 81, 1647, 505, 1649, - /* 930 */ 1650, 501, 1211, 522, 218, 117, 1715, 466, 1306, 76, - /* 940 */ 294, 1711, 1790, 448, 204, 118, 1255, 148, 1662, 72, - /* 950 */ 1217, 1749, 1663, 1115, 1381, 46, 503, 227, 527, 209, - /* 960 */ 416, 174, 511, 480, 1518, 1283, 502, 1170, 1745, 217, - /* 970 */ 1617, 117, 1646, 139, 1239, 233, 220, 488, 222, 415, - /* 980 */ 411, 407, 403, 173, 118, 1022, 1675, 119, 117, 81, - /* 990 */ 1647, 505, 1649, 1650, 501, 245, 522, 1453, 1050, 1715, - /* 1000 */ 1662, 3, 1181, 294, 1711, 1790, 319, 63, 503, 323, - /* 1010 */ 171, 1054, 991, 554, 1772, 491, 280, 279, 502, 241, - /* 1020 */ 1128, 155, 1617, 360, 1061, 1558, 367, 1059, 120, 375, - /* 1030 */ 374, 1646, 553, 552, 380, 551, 550, 549, 1675, 1187, - /* 1040 */ 376, 81, 1647, 505, 1649, 1650, 501, 438, 522, 381, - /* 1050 */ 389, 1715, 1190, 162, 392, 294, 1711, 1790, 393, 1662, - /* 1060 */ 1189, 164, 446, 394, 166, 395, 1733, 503, 170, 1188, - /* 1070 */ 165, 396, 167, 399, 169, 61, 187, 502, 418, 172, - /* 1080 */ 1165, 1617, 1646, 420, 1468, 176, 1464, 483, 441, 554, - /* 1090 */ 84, 242, 163, 435, 288, 1601, 178, 1675, 186, 1646, - /* 1100 */ 259, 1647, 505, 1649, 1650, 501, 122, 522, 553, 552, - /* 1110 */ 1662, 551, 550, 549, 123, 1466, 1462, 124, 503, 125, - /* 1120 */ 449, 189, 51, 453, 450, 50, 1777, 1662, 502, 243, - /* 1130 */ 458, 192, 1617, 194, 1186, 503, 197, 459, 483, 147, - /* 1140 */ 1746, 467, 509, 1774, 1756, 502, 6, 200, 1675, 1617, - /* 1150 */ 463, 259, 1647, 505, 1649, 1650, 501, 1646, 522, 464, - /* 1160 */ 476, 5, 1736, 203, 1755, 1675, 293, 210, 82, 1647, - /* 1170 */ 505, 1649, 1650, 501, 1280, 522, 111, 1777, 1715, 470, - /* 1180 */ 208, 1185, 1714, 1711, 1348, 1662, 40, 211, 492, 1646, - /* 1190 */ 145, 1773, 135, 503, 1774, 1730, 295, 489, 18, 1567, - /* 1200 */ 1793, 507, 508, 502, 1566, 512, 303, 1617, 103, 102, - /* 1210 */ 101, 100, 99, 98, 97, 96, 95, 1662, 216, 479, - /* 1220 */ 1696, 513, 229, 1675, 219, 500, 82, 1647, 505, 1649, - /* 1230 */ 1650, 501, 514, 522, 231, 502, 1715, 69, 486, 1617, - /* 1240 */ 494, 1711, 1646, 493, 221, 244, 1479, 71, 112, 525, - /* 1250 */ 1451, 247, 600, 238, 48, 1675, 134, 253, 267, 1647, - /* 1260 */ 505, 1649, 1650, 501, 499, 522, 496, 1687, 483, 290, - /* 1270 */ 1662, 260, 249, 254, 251, 1611, 1610, 318, 503, 1607, - /* 1280 */ 320, 321, 1153, 1154, 151, 110, 325, 1605, 502, 327, - /* 1290 */ 328, 329, 1617, 1604, 331, 1603, 333, 1602, 335, 1646, - /* 1300 */ 212, 1722, 478, 1587, 477, 152, 339, 1777, 1675, 338, - /* 1310 */ 1131, 82, 1647, 505, 1649, 1650, 501, 1581, 522, 1130, - /* 1320 */ 145, 1715, 1580, 344, 1774, 345, 1712, 1662, 604, 1579, - /* 1330 */ 1578, 1551, 1098, 1550, 1549, 503, 1548, 1547, 1546, 1545, - /* 1340 */ 1544, 1543, 240, 1100, 115, 502, 1646, 1542, 1541, 1617, - /* 1350 */ 1540, 1539, 462, 1538, 105, 1537, 1536, 1535, 1534, 1533, - /* 1360 */ 593, 589, 585, 581, 239, 1675, 1532, 1531, 268, 1647, - /* 1370 */ 505, 1649, 1650, 501, 1662, 522, 1530, 1529, 1528, 1527, - /* 1380 */ 1526, 1525, 503, 1524, 1409, 1646, 1377, 138, 78, 160, - /* 1390 */ 1376, 234, 502, 1595, 1589, 1573, 1617, 106, 385, 930, - /* 1400 */ 161, 929, 107, 1564, 1457, 387, 168, 1408, 1406, 401, - /* 1410 */ 400, 958, 1675, 1662, 1404, 132, 1647, 505, 1649, 1650, - /* 1420 */ 501, 503, 522, 1402, 1400, 515, 402, 1389, 406, 404, - /* 1430 */ 1388, 502, 175, 405, 410, 1617, 1646, 414, 298, 408, - /* 1440 */ 1375, 409, 1459, 1458, 413, 412, 1398, 1064, 1065, 990, - /* 1450 */ 460, 1675, 989, 195, 268, 1647, 505, 1649, 1650, 501, - /* 1460 */ 1792, 522, 45, 988, 1662, 1646, 987, 568, 1393, 570, - /* 1470 */ 285, 1136, 500, 190, 286, 1391, 984, 287, 983, 1374, - /* 1480 */ 982, 440, 502, 437, 442, 1373, 1617, 444, 1594, 83, - /* 1490 */ 1588, 1138, 451, 1662, 1572, 1571, 126, 1646, 1563, 4, - /* 1500 */ 65, 503, 1675, 196, 37, 267, 1647, 505, 1649, 1650, - /* 1510 */ 501, 502, 522, 49, 1688, 1617, 452, 193, 300, 15, - /* 1520 */ 201, 43, 1305, 206, 41, 1662, 1298, 133, 207, 205, - /* 1530 */ 22, 1675, 23, 503, 268, 1647, 505, 1649, 1650, 501, - /* 1540 */ 1637, 522, 1277, 502, 66, 213, 198, 1617, 1276, 42, - /* 1550 */ 302, 136, 1334, 1646, 16, 17, 13, 1323, 1329, 10, - /* 1560 */ 1328, 19, 296, 1675, 1333, 1332, 268, 1647, 505, 1649, - /* 1570 */ 1650, 501, 297, 522, 1219, 137, 149, 29, 1204, 510, - /* 1580 */ 1218, 1662, 12, 20, 1646, 21, 226, 1240, 1562, 503, - /* 1590 */ 504, 224, 230, 232, 72, 1636, 235, 1303, 1175, 502, - /* 1600 */ 1221, 228, 67, 1617, 68, 526, 1678, 521, 44, 310, - /* 1610 */ 1051, 1048, 1662, 1646, 524, 528, 530, 531, 533, 1675, - /* 1620 */ 503, 1045, 255, 1647, 505, 1649, 1650, 501, 534, 522, - /* 1630 */ 502, 1039, 536, 537, 1617, 1037, 539, 1043, 1042, 540, - /* 1640 */ 1041, 1662, 1040, 1028, 73, 74, 1060, 75, 1057, 503, - /* 1650 */ 1675, 1056, 546, 262, 1647, 505, 1649, 1650, 501, 502, - /* 1660 */ 522, 956, 1646, 1617, 555, 557, 237, 997, 308, 307, - /* 1670 */ 978, 977, 973, 1646, 1058, 976, 994, 975, 1173, 1675, - /* 1680 */ 974, 972, 264, 1647, 505, 1649, 1650, 501, 971, 522, - /* 1690 */ 1662, 992, 968, 967, 966, 963, 962, 1405, 503, 961, - /* 1700 */ 578, 1662, 579, 1166, 580, 1403, 582, 583, 502, 503, - /* 1710 */ 584, 1401, 1617, 586, 587, 588, 1399, 590, 592, 502, - /* 1720 */ 1165, 591, 1387, 1617, 1646, 1386, 594, 1372, 1675, 595, - /* 1730 */ 598, 256, 1647, 505, 1649, 1650, 501, 1161, 522, 1675, - /* 1740 */ 599, 603, 265, 1647, 505, 1649, 1650, 501, 248, 522, - /* 1750 */ 602, 1347, 1662, 1646, 1347, 1347, 1347, 1347, 523, 1347, - /* 1760 */ 503, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1169, - /* 1770 */ 502, 1347, 1347, 1347, 1617, 1347, 1347, 1347, 1347, 1347, - /* 1780 */ 1347, 1662, 1347, 1347, 1347, 1646, 1347, 1347, 1347, 503, - /* 1790 */ 1675, 1347, 1347, 257, 1647, 505, 1649, 1650, 501, 502, - /* 1800 */ 522, 1347, 1347, 1617, 1347, 1347, 1347, 1347, 1347, 1347, - /* 1810 */ 1347, 1347, 1174, 1662, 1347, 1347, 1347, 1347, 1347, 1675, - /* 1820 */ 1347, 503, 266, 1647, 505, 1649, 1650, 501, 1347, 522, - /* 1830 */ 1347, 502, 1347, 1347, 1177, 1617, 1347, 1347, 1347, 1347, - /* 1840 */ 1347, 1646, 1347, 1347, 1347, 520, 1224, 1225, 1347, 1347, - /* 1850 */ 1347, 1675, 1347, 1347, 258, 1647, 505, 1649, 1650, 501, - /* 1860 */ 1347, 522, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1662, - /* 1870 */ 1347, 1347, 1646, 1347, 1347, 1347, 1347, 503, 1347, 1347, - /* 1880 */ 1347, 1347, 1347, 1347, 1347, 1347, 1347, 502, 1347, 1347, - /* 1890 */ 1347, 1617, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347, - /* 1900 */ 1662, 1646, 1347, 1347, 1347, 1347, 1347, 1675, 503, 1347, - /* 1910 */ 1658, 1647, 505, 1649, 1650, 501, 1347, 522, 502, 1347, - /* 1920 */ 1347, 1347, 1617, 1347, 1347, 1347, 1347, 1347, 1347, 1662, - /* 1930 */ 1347, 1347, 1646, 1347, 1347, 1347, 1347, 503, 1675, 1347, - /* 1940 */ 1347, 1657, 1647, 505, 1649, 1650, 501, 502, 522, 1347, - /* 1950 */ 1347, 1617, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347, - /* 1960 */ 1662, 1646, 1347, 1347, 1347, 1347, 1347, 1675, 503, 1347, - /* 1970 */ 1656, 1647, 505, 1649, 1650, 501, 1347, 522, 502, 1347, - /* 1980 */ 1347, 1347, 1617, 1347, 1347, 1347, 1347, 1347, 1347, 1662, - /* 1990 */ 1347, 1347, 1347, 1347, 1347, 1347, 1347, 503, 1675, 1347, - /* 2000 */ 1347, 277, 1647, 505, 1649, 1650, 501, 502, 522, 1347, - /* 2010 */ 1347, 1617, 1646, 1347, 1347, 1347, 1347, 1347, 1347, 1347, - /* 2020 */ 1347, 1347, 1347, 1646, 1347, 1347, 1347, 1675, 1347, 1347, - /* 2030 */ 276, 1647, 505, 1649, 1650, 501, 1347, 522, 1347, 1347, - /* 2040 */ 1662, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 503, 1347, - /* 2050 */ 1347, 1662, 1347, 1347, 1347, 1347, 1347, 1347, 502, 503, - /* 2060 */ 1347, 1347, 1617, 1347, 1347, 1347, 1347, 1347, 1347, 502, - /* 2070 */ 1347, 1347, 1347, 1617, 1347, 1347, 1347, 1646, 1675, 1347, - /* 2080 */ 1347, 278, 1647, 505, 1649, 1650, 501, 1347, 522, 1675, - /* 2090 */ 1347, 1347, 275, 1647, 505, 1649, 1650, 501, 1347, 522, - /* 2100 */ 1347, 1347, 1347, 1347, 1347, 1662, 1347, 1347, 1347, 1347, - /* 2110 */ 1347, 1347, 1347, 503, 1347, 1347, 1347, 1347, 1347, 1347, - /* 2120 */ 1347, 1347, 1347, 502, 1347, 1347, 1347, 1617, 1347, 1347, - /* 2130 */ 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347, - /* 2140 */ 1347, 1347, 1347, 1675, 1347, 1347, 261, 1647, 505, 1649, - /* 2150 */ 1650, 501, 1347, 522, + /* 0 */ 386, 1647, 387, 1391, 295, 394, 524, 387, 1391, 28, + /* 10 */ 226, 931, 35, 33, 130, 1676, 1371, 1660, 104, 1791, + /* 20 */ 304, 1644, 1169, 477, 523, 424, 36, 34, 32, 31, + /* 30 */ 30, 385, 1790, 62, 389, 1490, 1788, 1640, 1646, 36, + /* 40 */ 34, 32, 31, 30, 1535, 1676, 108, 1167, 527, 935, + /* 50 */ 936, 294, 1000, 508, 524, 1485, 1533, 154, 14, 476, + /* 60 */ 35, 33, 1296, 507, 1175, 24, 350, 1630, 304, 1002, + /* 70 */ 1169, 1418, 277, 488, 523, 36, 34, 32, 31, 30, + /* 80 */ 56, 1, 60, 1490, 1689, 59, 524, 80, 1661, 510, + /* 90 */ 1663, 1664, 506, 1359, 527, 1167, 1207, 1729, 104, 603, + /* 100 */ 602, 276, 1725, 607, 1258, 429, 14, 36, 34, 32, + /* 110 */ 31, 30, 1175, 1791, 1168, 1490, 140, 103, 102, 101, + /* 120 */ 100, 99, 98, 97, 96, 95, 147, 376, 1529, 2, + /* 130 */ 1788, 583, 582, 581, 319, 39, 580, 579, 578, 114, + /* 140 */ 573, 572, 571, 570, 569, 568, 567, 566, 121, 562, + /* 150 */ 511, 607, 1568, 307, 1259, 55, 1580, 55, 1170, 156, + /* 160 */ 94, 1791, 1168, 93, 92, 91, 90, 89, 88, 87, + /* 170 */ 86, 85, 158, 157, 146, 352, 1264, 1352, 1788, 393, + /* 180 */ 1173, 1174, 389, 1220, 1221, 1223, 1224, 1225, 1226, 1227, + /* 190 */ 503, 525, 1235, 1236, 1237, 1238, 1239, 1240, 1468, 36, + /* 200 */ 34, 32, 31, 30, 64, 292, 1170, 131, 191, 274, + /* 210 */ 148, 1447, 27, 302, 1253, 1254, 1255, 1256, 1257, 1261, + /* 220 */ 1262, 1263, 1421, 36, 34, 32, 31, 30, 1173, 1174, + /* 230 */ 484, 1220, 1221, 1223, 1224, 1225, 1226, 1227, 503, 525, + /* 240 */ 1235, 1236, 1237, 1238, 1239, 1240, 35, 33, 1467, 948, + /* 250 */ 70, 947, 438, 437, 304, 403, 1169, 436, 1351, 112, + /* 260 */ 109, 433, 308, 1791, 432, 431, 430, 35, 33, 1310, + /* 270 */ 128, 1483, 1660, 403, 523, 304, 1789, 1169, 949, 1492, + /* 280 */ 1788, 1167, 438, 437, 148, 1193, 148, 436, 62, 972, + /* 290 */ 109, 433, 14, 1207, 432, 431, 430, 110, 1175, 1360, + /* 300 */ 1676, 1303, 1167, 1382, 1660, 524, 973, 1193, 508, 524, + /* 310 */ 1486, 486, 142, 1736, 1737, 2, 1741, 351, 507, 1175, + /* 320 */ 94, 361, 1630, 93, 92, 91, 90, 89, 88, 87, + /* 330 */ 86, 85, 1676, 1381, 1490, 38, 8, 607, 1490, 1689, + /* 340 */ 487, 559, 82, 1661, 510, 1663, 1664, 506, 1168, 527, + /* 350 */ 507, 1191, 1729, 1630, 1630, 1535, 1728, 1725, 607, 128, + /* 360 */ 558, 557, 309, 556, 555, 554, 1380, 1533, 1493, 1168, + /* 370 */ 565, 1689, 1462, 1535, 81, 1661, 510, 1663, 1664, 506, + /* 380 */ 315, 527, 524, 1630, 1729, 1533, 1743, 26, 297, 1725, + /* 390 */ 141, 478, 1170, 54, 362, 435, 434, 36, 34, 32, + /* 400 */ 31, 30, 218, 36, 34, 32, 31, 30, 466, 1756, + /* 410 */ 1740, 1490, 55, 1170, 1173, 1174, 1630, 1220, 1221, 1223, + /* 420 */ 1224, 1225, 1226, 1227, 503, 525, 1235, 1236, 1237, 1238, + /* 430 */ 1239, 1240, 460, 577, 575, 1173, 1174, 1379, 1220, 1221, + /* 440 */ 1223, 1224, 1225, 1226, 1227, 503, 525, 1235, 1236, 1237, + /* 450 */ 1238, 1239, 1240, 35, 33, 1241, 1378, 443, 1195, 610, + /* 460 */ 316, 304, 1377, 1169, 148, 148, 249, 1571, 1573, 1520, + /* 470 */ 1246, 1222, 451, 243, 35, 33, 1193, 1481, 1376, 1660, + /* 480 */ 1647, 461, 304, 312, 1169, 105, 190, 1630, 1167, 524, + /* 490 */ 473, 599, 595, 591, 587, 242, 391, 1644, 446, 1357, + /* 500 */ 1644, 402, 1191, 440, 561, 1175, 1630, 1676, 189, 1167, + /* 510 */ 337, 484, 1630, 1640, 1646, 508, 1640, 1646, 1490, 484, + /* 520 */ 78, 1791, 9, 237, 527, 507, 1175, 527, 1630, 1630, + /* 530 */ 339, 335, 564, 51, 145, 488, 50, 127, 1788, 511, + /* 540 */ 112, 148, 576, 9, 607, 1581, 1689, 1194, 112, 80, + /* 550 */ 1661, 510, 1663, 1664, 506, 1168, 527, 520, 320, 1729, + /* 560 */ 1375, 479, 474, 276, 1725, 607, 36, 34, 32, 31, + /* 570 */ 30, 1648, 1130, 314, 1479, 1791, 1168, 428, 110, 553, + /* 580 */ 1132, 128, 465, 340, 217, 198, 110, 1465, 145, 55, + /* 590 */ 1492, 1644, 1788, 143, 1736, 1737, 77, 1741, 1791, 1170, + /* 600 */ 427, 144, 1736, 1737, 1146, 1741, 193, 1640, 1646, 113, + /* 610 */ 1630, 145, 277, 1572, 1573, 1788, 490, 1482, 527, 1295, + /* 620 */ 1170, 1173, 1174, 1374, 1220, 1221, 1223, 1224, 1225, 1226, + /* 630 */ 1227, 503, 525, 1235, 1236, 1237, 1238, 1239, 1240, 286, + /* 640 */ 1222, 1131, 1173, 1174, 1258, 1220, 1221, 1223, 1224, 1225, + /* 650 */ 1226, 1227, 503, 525, 1235, 1236, 1237, 1238, 1239, 1240, + /* 660 */ 35, 33, 273, 559, 1191, 345, 1320, 344, 304, 524, + /* 670 */ 1169, 369, 524, 1630, 381, 32, 31, 30, 1748, 1291, + /* 680 */ 559, 1487, 558, 557, 1610, 556, 555, 554, 287, 7, + /* 690 */ 285, 284, 382, 426, 1259, 1167, 947, 428, 1490, 558, + /* 700 */ 557, 1490, 556, 555, 554, 470, 1318, 1319, 1321, 1322, + /* 710 */ 1535, 317, 1175, 11, 10, 1373, 1264, 1743, 148, 128, + /* 720 */ 427, 422, 1534, 935, 936, 1743, 1154, 1155, 1492, 2, + /* 730 */ 1038, 550, 549, 548, 1042, 547, 1044, 1045, 546, 1047, + /* 740 */ 543, 1739, 1053, 540, 1055, 1056, 537, 534, 346, 1738, + /* 750 */ 1370, 607, 27, 302, 1253, 1254, 1255, 1256, 1257, 1261, + /* 760 */ 1262, 1263, 1168, 380, 1466, 1630, 375, 374, 373, 372, + /* 770 */ 371, 368, 367, 366, 365, 364, 360, 359, 358, 357, + /* 780 */ 356, 355, 354, 353, 524, 524, 129, 524, 1791, 1196, + /* 790 */ 492, 255, 1192, 1193, 1272, 1260, 521, 522, 1475, 239, + /* 800 */ 1630, 145, 1369, 253, 53, 1788, 1170, 52, 1368, 1367, + /* 810 */ 1366, 452, 1365, 1490, 1490, 1364, 1490, 1265, 524, 1363, + /* 820 */ 1660, 561, 1362, 47, 159, 275, 1294, 1477, 1173, 1174, + /* 830 */ 318, 1220, 1221, 1223, 1224, 1225, 1226, 1227, 503, 525, + /* 840 */ 1235, 1236, 1237, 1238, 1239, 1240, 495, 1490, 1676, 55, + /* 850 */ 1473, 1791, 1630, 25, 1619, 194, 487, 1408, 1630, 1630, + /* 860 */ 1630, 1291, 1630, 1403, 145, 1630, 507, 1401, 1788, 1630, + /* 870 */ 1630, 182, 1630, 184, 180, 186, 183, 188, 185, 439, + /* 880 */ 187, 1660, 500, 450, 502, 441, 79, 1689, 76, 444, + /* 890 */ 81, 1661, 510, 1663, 1664, 506, 448, 527, 72, 327, + /* 900 */ 1729, 11, 10, 552, 297, 1725, 141, 1372, 459, 1676, + /* 910 */ 1354, 1355, 1650, 1448, 1660, 202, 1178, 508, 58, 57, + /* 920 */ 349, 118, 46, 153, 471, 1757, 1177, 507, 343, 205, + /* 930 */ 221, 1630, 37, 37, 37, 453, 212, 1677, 1392, 228, + /* 940 */ 272, 421, 1676, 333, 1530, 329, 325, 150, 1689, 1652, + /* 950 */ 508, 81, 1661, 510, 1663, 1664, 506, 1222, 527, 1759, + /* 960 */ 507, 1729, 462, 1317, 1630, 297, 1725, 1804, 1191, 116, + /* 970 */ 207, 117, 485, 1266, 1228, 1124, 1763, 493, 148, 1660, + /* 980 */ 230, 1689, 220, 1181, 81, 1661, 510, 1663, 1664, 506, + /* 990 */ 223, 527, 118, 1180, 1729, 1660, 46, 532, 297, 1725, + /* 1000 */ 1804, 322, 117, 225, 1250, 3, 118, 1676, 326, 1786, + /* 1010 */ 516, 282, 236, 1000, 283, 508, 119, 117, 244, 155, + /* 1020 */ 1138, 363, 370, 1676, 1570, 507, 378, 1660, 377, 1630, + /* 1030 */ 379, 508, 383, 1031, 1197, 496, 384, 248, 1059, 392, + /* 1040 */ 1200, 507, 395, 1063, 162, 1630, 1689, 1070, 396, 82, + /* 1050 */ 1661, 510, 1663, 1664, 506, 1676, 527, 1068, 120, 1729, + /* 1060 */ 1199, 164, 1689, 508, 1726, 81, 1661, 510, 1663, 1664, + /* 1070 */ 506, 1201, 527, 507, 397, 1729, 398, 1630, 1660, 297, + /* 1080 */ 1725, 1804, 167, 488, 399, 169, 1198, 400, 401, 172, + /* 1090 */ 1747, 61, 404, 1660, 1689, 175, 423, 262, 1661, 510, + /* 1100 */ 1663, 1664, 506, 425, 527, 84, 1676, 1175, 1480, 179, + /* 1110 */ 1476, 291, 181, 1614, 508, 122, 123, 1478, 1474, 124, + /* 1120 */ 125, 1676, 245, 1791, 507, 192, 455, 195, 1630, 508, + /* 1130 */ 246, 197, 454, 464, 488, 463, 147, 200, 1196, 507, + /* 1140 */ 1788, 458, 472, 1630, 1660, 1689, 1770, 203, 262, 1661, + /* 1150 */ 510, 1663, 1664, 506, 514, 527, 6, 1750, 469, 1769, + /* 1160 */ 1689, 211, 481, 82, 1661, 510, 1663, 1664, 506, 206, + /* 1170 */ 527, 1760, 1676, 1729, 1791, 296, 475, 499, 1725, 1195, + /* 1180 */ 505, 468, 5, 1291, 111, 40, 497, 145, 1744, 1807, + /* 1190 */ 507, 1788, 298, 18, 1630, 512, 1660, 513, 494, 306, + /* 1200 */ 311, 310, 1579, 135, 1578, 1660, 214, 517, 518, 519, + /* 1210 */ 1183, 1689, 213, 1787, 270, 1661, 510, 1663, 1664, 506, + /* 1220 */ 504, 527, 501, 1701, 1676, 219, 232, 71, 491, 1710, + /* 1230 */ 234, 247, 508, 1676, 69, 1176, 250, 1491, 241, 222, + /* 1240 */ 606, 508, 507, 1463, 498, 48, 1630, 530, 224, 256, + /* 1250 */ 134, 507, 1175, 1660, 263, 1630, 257, 293, 467, 252, + /* 1260 */ 254, 1624, 1623, 1689, 321, 1620, 132, 1661, 510, 1663, + /* 1270 */ 1664, 506, 1689, 527, 323, 271, 1661, 510, 1663, 1664, + /* 1280 */ 506, 1676, 527, 324, 1163, 1660, 1164, 151, 1618, 508, + /* 1290 */ 328, 528, 330, 331, 1617, 332, 334, 1616, 336, 507, + /* 1300 */ 1615, 338, 1179, 1630, 1600, 152, 341, 1141, 342, 1140, + /* 1310 */ 489, 1805, 1594, 1676, 1593, 347, 348, 1660, 1592, 1591, + /* 1320 */ 1689, 508, 1107, 266, 1661, 510, 1663, 1664, 506, 1563, + /* 1330 */ 527, 507, 1562, 1561, 1560, 1630, 1559, 1558, 1557, 1556, + /* 1340 */ 1555, 1554, 1553, 1552, 1551, 1676, 1184, 1550, 1549, 1548, + /* 1350 */ 1547, 1546, 1689, 508, 1545, 132, 1661, 510, 1663, 1664, + /* 1360 */ 506, 480, 527, 507, 115, 1660, 1544, 1630, 1187, 1543, + /* 1370 */ 301, 1542, 1541, 1540, 1109, 1539, 1538, 1537, 1660, 525, + /* 1380 */ 1235, 1236, 1536, 1420, 1689, 1388, 160, 271, 1661, 510, + /* 1390 */ 1663, 1664, 506, 1676, 527, 938, 106, 138, 937, 388, + /* 1400 */ 1806, 505, 1387, 161, 390, 107, 1676, 1608, 1602, 1586, + /* 1410 */ 1585, 507, 1576, 1469, 508, 1630, 166, 171, 1660, 1419, + /* 1420 */ 966, 1417, 1415, 407, 507, 405, 1413, 411, 1630, 415, + /* 1430 */ 1411, 303, 1689, 419, 406, 270, 1661, 510, 1663, 1664, + /* 1440 */ 506, 409, 527, 410, 1702, 1689, 1676, 413, 271, 1661, + /* 1450 */ 510, 1663, 1664, 506, 508, 527, 414, 1400, 177, 1399, + /* 1460 */ 418, 417, 1386, 1471, 507, 1074, 1660, 1470, 1630, 1073, + /* 1470 */ 139, 305, 574, 576, 999, 1169, 420, 416, 412, 408, + /* 1480 */ 176, 45, 998, 178, 997, 1689, 996, 993, 271, 1661, + /* 1490 */ 510, 1663, 1664, 506, 1676, 527, 992, 991, 1409, 288, + /* 1500 */ 1167, 1404, 508, 289, 442, 63, 1402, 290, 174, 1385, + /* 1510 */ 447, 445, 507, 1384, 449, 83, 1630, 1175, 1607, 1148, + /* 1520 */ 49, 1601, 456, 1660, 1584, 126, 1583, 1575, 199, 65, + /* 1530 */ 196, 4, 133, 1689, 201, 37, 258, 1661, 510, 1663, + /* 1540 */ 1664, 506, 204, 527, 15, 457, 43, 1316, 1309, 208, + /* 1550 */ 22, 1676, 209, 23, 210, 66, 607, 1288, 1650, 508, + /* 1560 */ 1287, 216, 1345, 42, 136, 41, 173, 1168, 165, 507, + /* 1570 */ 170, 1660, 168, 1630, 17, 1340, 1339, 16, 13, 1334, + /* 1580 */ 10, 299, 1344, 1343, 300, 1251, 19, 137, 149, 1230, + /* 1590 */ 1689, 163, 1215, 265, 1661, 510, 1663, 1664, 506, 1676, + /* 1600 */ 527, 1660, 509, 1574, 29, 515, 12, 508, 1649, 233, + /* 1610 */ 72, 1170, 1229, 20, 235, 1185, 531, 507, 238, 21, + /* 1620 */ 229, 1630, 227, 529, 1314, 964, 313, 231, 67, 1676, + /* 1630 */ 68, 1660, 1692, 1173, 1174, 1232, 526, 508, 1689, 44, + /* 1640 */ 533, 267, 1661, 510, 1663, 1664, 506, 507, 527, 1060, + /* 1650 */ 1057, 1630, 535, 538, 536, 541, 544, 1054, 539, 1676, + /* 1660 */ 1037, 1052, 1048, 542, 1069, 1046, 545, 508, 1689, 551, + /* 1670 */ 1051, 259, 1661, 510, 1663, 1664, 506, 507, 527, 1660, + /* 1680 */ 73, 1630, 74, 75, 1066, 1065, 1050, 560, 1660, 1049, + /* 1690 */ 988, 1006, 563, 240, 986, 985, 984, 983, 1689, 981, + /* 1700 */ 1067, 268, 1661, 510, 1663, 1664, 506, 1676, 527, 982, + /* 1710 */ 1003, 980, 979, 1001, 976, 508, 1676, 975, 974, 971, + /* 1720 */ 970, 969, 1416, 584, 508, 507, 585, 586, 1414, 1630, + /* 1730 */ 588, 589, 590, 1412, 507, 592, 1660, 593, 1630, 594, + /* 1740 */ 1410, 596, 597, 598, 1398, 600, 1689, 601, 1397, 260, + /* 1750 */ 1661, 510, 1663, 1664, 506, 1689, 527, 1383, 269, 1661, + /* 1760 */ 510, 1663, 1664, 506, 1676, 527, 609, 604, 605, 1358, + /* 1770 */ 1358, 1171, 508, 251, 608, 1358, 1358, 1358, 1358, 1358, + /* 1780 */ 1358, 1358, 507, 1358, 1660, 1358, 1630, 1358, 1358, 1358, + /* 1790 */ 1358, 1358, 1358, 1358, 1358, 1660, 1358, 1358, 1358, 1358, + /* 1800 */ 1358, 1358, 1358, 1689, 1358, 1358, 261, 1661, 510, 1663, + /* 1810 */ 1664, 506, 1676, 527, 1660, 1358, 1358, 1358, 1358, 1358, + /* 1820 */ 508, 1358, 1358, 1676, 1358, 1358, 1358, 1358, 1358, 1358, + /* 1830 */ 507, 508, 1358, 1358, 1630, 1358, 1358, 1358, 1358, 1358, + /* 1840 */ 1358, 507, 1676, 1358, 1358, 1630, 1358, 1358, 1358, 1358, + /* 1850 */ 508, 1689, 1358, 1358, 1672, 1661, 510, 1663, 1664, 506, + /* 1860 */ 507, 527, 1689, 1358, 1630, 1671, 1661, 510, 1663, 1664, + /* 1870 */ 506, 1358, 527, 1660, 1358, 1358, 1358, 1358, 1358, 1358, + /* 1880 */ 1358, 1689, 1660, 1358, 1670, 1661, 510, 1663, 1664, 506, + /* 1890 */ 1358, 527, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, + /* 1900 */ 1358, 1676, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, + /* 1910 */ 1676, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, 507, + /* 1920 */ 1358, 1358, 1358, 1630, 1358, 1358, 1358, 1358, 507, 1358, + /* 1930 */ 1358, 1358, 1630, 1358, 1358, 1358, 1358, 1358, 1358, 1358, + /* 1940 */ 1689, 1358, 1660, 280, 1661, 510, 1663, 1664, 506, 1689, + /* 1950 */ 527, 1660, 279, 1661, 510, 1663, 1664, 506, 1358, 527, + /* 1960 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, + /* 1970 */ 1676, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, 1676, + /* 1980 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, 507, 1358, + /* 1990 */ 1358, 1358, 1630, 1358, 1358, 1358, 1358, 507, 1358, 1660, + /* 2000 */ 1358, 1630, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1689, + /* 2010 */ 484, 1358, 281, 1661, 510, 1663, 1664, 506, 1689, 527, + /* 2020 */ 1358, 278, 1661, 510, 1663, 1664, 506, 1676, 527, 1358, + /* 2030 */ 1358, 1358, 1358, 1358, 1358, 508, 1358, 1358, 1358, 112, + /* 2040 */ 1358, 1358, 1358, 1358, 1358, 507, 484, 1358, 1358, 1630, + /* 2050 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 488, + /* 2060 */ 1358, 1358, 1358, 1358, 1358, 1358, 1689, 1358, 1358, 264, + /* 2070 */ 1661, 510, 1663, 1664, 506, 112, 527, 110, 1358, 1358, + /* 2080 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, + /* 2090 */ 1358, 1358, 215, 1736, 483, 488, 482, 1358, 1358, 1791, + /* 2100 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, + /* 2110 */ 1358, 1358, 147, 110, 1358, 1358, 1788, 1358, 1358, 1358, + /* 2120 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 215, 1736, + /* 2130 */ 483, 1358, 482, 1358, 1358, 1791, 1358, 1358, 1358, 1358, + /* 2140 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 145, 1358, + /* 2150 */ 1358, 1358, 1788, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 270, 336, 336, 241, 244, 271, 246, 247, 274, 1, - /* 10 */ 2, 297, 12, 13, 349, 349, 2, 4, 353, 353, - /* 20 */ 20, 244, 22, 246, 247, 291, 12, 13, 14, 15, - /* 30 */ 16, 269, 2, 12, 13, 14, 15, 16, 20, 277, - /* 40 */ 306, 307, 12, 13, 14, 15, 16, 47, 238, 287, - /* 50 */ 336, 317, 240, 291, 242, 42, 43, 20, 58, 297, - /* 60 */ 12, 13, 14, 349, 64, 321, 322, 353, 20, 307, - /* 70 */ 22, 248, 310, 311, 312, 313, 314, 315, 251, 317, - /* 80 */ 80, 253, 320, 336, 20, 248, 324, 325, 20, 81, - /* 90 */ 271, 264, 57, 274, 266, 47, 349, 260, 336, 272, - /* 100 */ 353, 241, 102, 275, 267, 282, 58, 297, 12, 13, - /* 110 */ 291, 349, 64, 113, 277, 353, 20, 80, 22, 12, - /* 120 */ 13, 14, 15, 16, 14, 306, 307, 4, 80, 269, - /* 130 */ 20, 12, 13, 14, 15, 16, 317, 277, 12, 13, - /* 140 */ 14, 15, 16, 47, 80, 269, 336, 287, 80, 254, - /* 150 */ 102, 291, 276, 258, 58, 241, 156, 281, 269, 349, - /* 160 */ 64, 113, 257, 353, 259, 58, 277, 307, 268, 148, - /* 170 */ 310, 311, 312, 313, 314, 315, 80, 317, 178, 179, - /* 180 */ 280, 181, 182, 183, 184, 185, 186, 187, 188, 189, - /* 190 */ 190, 191, 192, 193, 194, 195, 89, 0, 102, 248, - /* 200 */ 81, 312, 20, 80, 156, 291, 0, 81, 208, 113, - /* 210 */ 20, 260, 297, 21, 354, 355, 24, 25, 26, 27, - /* 220 */ 28, 29, 30, 31, 32, 308, 178, 179, 277, 181, - /* 230 */ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - /* 240 */ 192, 193, 194, 195, 0, 208, 139, 248, 269, 332, - /* 250 */ 229, 336, 156, 249, 250, 276, 178, 60, 61, 80, - /* 260 */ 281, 269, 65, 57, 349, 68, 69, 160, 353, 72, - /* 270 */ 73, 74, 208, 281, 178, 179, 277, 181, 182, 183, - /* 280 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - /* 290 */ 194, 195, 12, 13, 0, 217, 218, 219, 220, 221, - /* 300 */ 20, 57, 22, 196, 197, 198, 199, 200, 201, 202, - /* 310 */ 203, 204, 205, 314, 22, 21, 253, 271, 24, 25, - /* 320 */ 26, 27, 28, 29, 30, 31, 32, 47, 329, 330, - /* 330 */ 331, 208, 333, 248, 20, 248, 248, 291, 275, 47, - /* 340 */ 12, 13, 14, 287, 64, 260, 290, 260, 20, 293, - /* 350 */ 22, 80, 306, 307, 267, 12, 13, 14, 15, 16, - /* 360 */ 80, 248, 277, 317, 277, 277, 12, 13, 14, 15, - /* 370 */ 16, 277, 60, 61, 271, 47, 55, 65, 284, 241, - /* 380 */ 68, 69, 102, 248, 72, 73, 74, 208, 12, 13, - /* 390 */ 277, 57, 64, 113, 291, 260, 20, 261, 22, 269, - /* 400 */ 79, 58, 314, 82, 20, 269, 276, 269, 80, 306, - /* 410 */ 307, 281, 277, 20, 278, 277, 328, 329, 330, 331, - /* 420 */ 317, 333, 143, 47, 81, 287, 155, 314, 157, 291, - /* 430 */ 102, 279, 89, 165, 166, 0, 156, 169, 286, 287, - /* 440 */ 64, 113, 329, 330, 331, 307, 333, 91, 310, 311, - /* 450 */ 312, 313, 314, 315, 241, 317, 80, 22, 178, 179, - /* 460 */ 151, 181, 182, 183, 184, 185, 186, 187, 188, 189, - /* 470 */ 190, 191, 192, 193, 194, 195, 35, 261, 102, 208, - /* 480 */ 171, 172, 139, 79, 156, 269, 348, 248, 208, 113, - /* 490 */ 75, 87, 213, 214, 278, 270, 248, 12, 13, 14, - /* 500 */ 15, 16, 241, 160, 291, 270, 178, 179, 260, 181, - /* 510 */ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - /* 520 */ 192, 193, 194, 195, 83, 277, 85, 86, 241, 88, - /* 530 */ 64, 14, 156, 92, 119, 120, 297, 20, 145, 196, - /* 540 */ 197, 198, 199, 200, 201, 202, 203, 204, 205, 241, - /* 550 */ 245, 147, 291, 248, 178, 179, 115, 181, 182, 183, - /* 560 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - /* 570 */ 194, 195, 12, 13, 18, 336, 20, 269, 291, 248, - /* 580 */ 20, 261, 22, 27, 139, 277, 30, 270, 349, 269, - /* 590 */ 92, 260, 353, 245, 92, 287, 248, 14, 278, 291, - /* 600 */ 20, 3, 22, 20, 48, 160, 251, 47, 277, 111, - /* 610 */ 112, 241, 114, 115, 116, 307, 241, 115, 310, 311, - /* 620 */ 312, 313, 314, 315, 64, 317, 241, 272, 320, 49, - /* 630 */ 145, 20, 324, 325, 326, 0, 14, 15, 16, 270, - /* 640 */ 80, 196, 93, 94, 95, 96, 97, 98, 99, 100, - /* 650 */ 101, 102, 103, 345, 105, 106, 107, 108, 109, 110, - /* 660 */ 270, 291, 102, 241, 241, 241, 291, 241, 241, 241, - /* 670 */ 241, 241, 241, 113, 118, 241, 291, 121, 122, 123, - /* 680 */ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - /* 690 */ 134, 135, 136, 137, 138, 60, 61, 62, 63, 182, - /* 700 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - /* 710 */ 75, 76, 77, 291, 291, 291, 156, 291, 291, 291, - /* 720 */ 291, 291, 291, 241, 37, 291, 269, 241, 255, 256, - /* 730 */ 241, 255, 256, 286, 287, 278, 42, 43, 178, 179, - /* 740 */ 308, 181, 182, 183, 184, 185, 186, 187, 188, 189, - /* 750 */ 190, 191, 192, 193, 194, 195, 145, 18, 269, 248, - /* 760 */ 4, 241, 23, 308, 332, 182, 277, 47, 22, 248, - /* 770 */ 20, 260, 0, 291, 35, 36, 287, 291, 39, 287, - /* 780 */ 291, 260, 206, 207, 64, 293, 297, 332, 277, 269, - /* 790 */ 167, 168, 41, 47, 248, 56, 307, 277, 277, 310, - /* 800 */ 311, 312, 313, 314, 315, 262, 317, 287, 265, 320, - /* 810 */ 64, 291, 248, 324, 325, 41, 300, 45, 84, 80, - /* 820 */ 47, 87, 224, 277, 260, 336, 84, 307, 41, 87, - /* 830 */ 310, 311, 312, 313, 314, 315, 44, 317, 349, 248, - /* 840 */ 320, 277, 353, 297, 324, 325, 326, 84, 102, 84, - /* 850 */ 87, 260, 87, 21, 58, 81, 117, 241, 338, 113, - /* 860 */ 314, 248, 248, 270, 344, 345, 34, 47, 277, 145, - /* 870 */ 146, 41, 80, 260, 260, 329, 330, 331, 0, 333, - /* 880 */ 1, 2, 336, 0, 64, 269, 113, 148, 149, 150, - /* 890 */ 277, 277, 153, 277, 207, 349, 242, 158, 41, 353, - /* 900 */ 22, 47, 156, 287, 41, 22, 41, 291, 258, 170, - /* 910 */ 41, 81, 173, 41, 175, 176, 177, 41, 193, 194, - /* 920 */ 241, 0, 41, 307, 178, 179, 310, 311, 312, 313, - /* 930 */ 314, 315, 182, 317, 356, 41, 320, 347, 81, 80, - /* 940 */ 324, 325, 326, 304, 81, 41, 81, 208, 269, 90, - /* 950 */ 81, 335, 269, 81, 247, 41, 277, 81, 41, 341, - /* 960 */ 249, 33, 81, 334, 280, 209, 287, 113, 309, 350, - /* 970 */ 291, 41, 241, 45, 178, 81, 350, 226, 350, 51, - /* 980 */ 52, 53, 54, 55, 41, 81, 307, 41, 41, 310, - /* 990 */ 311, 312, 313, 314, 315, 81, 317, 0, 81, 320, - /* 1000 */ 269, 337, 20, 324, 325, 326, 248, 79, 277, 45, - /* 1010 */ 82, 81, 47, 92, 335, 228, 255, 305, 287, 298, - /* 1020 */ 154, 40, 291, 248, 81, 248, 285, 81, 81, 139, - /* 1030 */ 283, 241, 111, 112, 248, 114, 115, 116, 307, 20, - /* 1040 */ 283, 310, 311, 312, 313, 314, 315, 4, 317, 243, - /* 1050 */ 243, 320, 20, 253, 302, 324, 325, 326, 287, 269, - /* 1060 */ 20, 253, 19, 295, 253, 277, 335, 277, 140, 20, - /* 1070 */ 142, 288, 144, 248, 253, 253, 33, 287, 243, 253, - /* 1080 */ 64, 291, 241, 269, 269, 269, 269, 297, 45, 92, - /* 1090 */ 248, 302, 164, 50, 243, 291, 269, 307, 55, 241, - /* 1100 */ 310, 311, 312, 313, 314, 315, 269, 317, 111, 112, - /* 1110 */ 269, 114, 115, 116, 269, 269, 269, 269, 277, 269, - /* 1120 */ 163, 251, 79, 287, 301, 82, 336, 269, 287, 295, - /* 1130 */ 277, 251, 291, 251, 20, 277, 251, 288, 297, 349, - /* 1140 */ 309, 216, 215, 353, 346, 287, 223, 292, 307, 291, - /* 1150 */ 211, 310, 311, 312, 313, 314, 315, 241, 317, 291, - /* 1160 */ 222, 210, 343, 292, 346, 307, 291, 339, 310, 311, - /* 1170 */ 312, 313, 314, 315, 207, 317, 277, 336, 320, 291, - /* 1180 */ 342, 20, 324, 325, 0, 269, 40, 327, 227, 241, - /* 1190 */ 349, 352, 340, 277, 353, 308, 230, 225, 80, 292, - /* 1200 */ 357, 291, 291, 287, 292, 142, 291, 291, 24, 25, - /* 1210 */ 26, 27, 28, 29, 30, 31, 32, 269, 351, 248, - /* 1220 */ 323, 289, 277, 307, 351, 277, 310, 311, 312, 313, - /* 1230 */ 314, 315, 288, 317, 251, 287, 320, 251, 352, 291, - /* 1240 */ 324, 325, 241, 352, 351, 265, 277, 80, 277, 273, - /* 1250 */ 259, 248, 243, 251, 299, 307, 303, 263, 310, 311, - /* 1260 */ 312, 313, 314, 315, 316, 317, 318, 319, 297, 296, - /* 1270 */ 269, 263, 252, 263, 239, 0, 0, 72, 277, 0, - /* 1280 */ 47, 174, 47, 47, 47, 314, 174, 0, 287, 47, - /* 1290 */ 47, 174, 291, 0, 47, 0, 47, 0, 47, 241, - /* 1300 */ 329, 330, 331, 0, 333, 80, 159, 336, 307, 160, - /* 1310 */ 113, 310, 311, 312, 313, 314, 315, 0, 317, 156, - /* 1320 */ 349, 320, 0, 152, 353, 151, 325, 269, 19, 0, - /* 1330 */ 0, 0, 44, 0, 0, 277, 0, 0, 0, 0, - /* 1340 */ 0, 0, 33, 22, 40, 287, 241, 0, 0, 291, - /* 1350 */ 0, 0, 294, 0, 45, 0, 0, 0, 0, 0, - /* 1360 */ 51, 52, 53, 54, 55, 307, 0, 0, 310, 311, - /* 1370 */ 312, 313, 314, 315, 269, 317, 0, 0, 0, 0, - /* 1380 */ 0, 0, 277, 0, 0, 241, 0, 41, 79, 40, - /* 1390 */ 0, 82, 287, 0, 0, 0, 291, 37, 44, 14, - /* 1400 */ 38, 14, 37, 0, 0, 44, 37, 0, 0, 45, - /* 1410 */ 47, 59, 307, 269, 0, 310, 311, 312, 313, 314, - /* 1420 */ 315, 277, 317, 0, 0, 116, 37, 0, 37, 47, - /* 1430 */ 0, 287, 87, 45, 37, 291, 241, 37, 294, 47, - /* 1440 */ 0, 45, 0, 0, 45, 47, 0, 22, 47, 47, - /* 1450 */ 141, 307, 47, 144, 310, 311, 312, 313, 314, 315, - /* 1460 */ 355, 317, 89, 47, 269, 241, 47, 41, 0, 41, - /* 1470 */ 22, 162, 277, 164, 22, 0, 47, 22, 47, 0, - /* 1480 */ 47, 47, 287, 48, 22, 0, 291, 22, 0, 20, - /* 1490 */ 0, 47, 22, 269, 0, 0, 161, 241, 0, 41, - /* 1500 */ 80, 277, 307, 37, 41, 310, 311, 312, 313, 314, - /* 1510 */ 315, 287, 317, 145, 319, 291, 145, 142, 294, 212, - /* 1520 */ 81, 41, 81, 41, 206, 269, 81, 80, 44, 80, - /* 1530 */ 80, 307, 41, 277, 310, 311, 312, 313, 314, 315, - /* 1540 */ 44, 317, 81, 287, 80, 44, 140, 291, 81, 41, - /* 1550 */ 294, 44, 81, 241, 212, 41, 212, 81, 47, 2, - /* 1560 */ 47, 41, 47, 307, 47, 47, 310, 311, 312, 313, - /* 1570 */ 314, 315, 47, 317, 81, 44, 44, 80, 22, 143, - /* 1580 */ 81, 269, 80, 80, 241, 80, 80, 178, 0, 277, - /* 1590 */ 180, 81, 37, 140, 90, 44, 44, 81, 22, 287, - /* 1600 */ 81, 80, 80, 291, 80, 47, 80, 80, 80, 47, - /* 1610 */ 81, 81, 269, 241, 91, 80, 47, 80, 47, 307, - /* 1620 */ 277, 81, 310, 311, 312, 313, 314, 315, 80, 317, - /* 1630 */ 287, 81, 47, 80, 291, 81, 47, 104, 104, 80, - /* 1640 */ 104, 269, 104, 22, 80, 80, 47, 80, 47, 277, - /* 1650 */ 307, 22, 92, 310, 311, 312, 313, 314, 315, 287, - /* 1660 */ 317, 59, 241, 291, 58, 78, 41, 64, 12, 13, - /* 1670 */ 47, 47, 22, 241, 113, 47, 64, 47, 22, 307, - /* 1680 */ 47, 47, 310, 311, 312, 313, 314, 315, 47, 317, - /* 1690 */ 269, 47, 47, 47, 47, 47, 47, 0, 277, 47, - /* 1700 */ 47, 269, 45, 47, 37, 0, 47, 45, 287, 277, - /* 1710 */ 37, 0, 291, 47, 45, 37, 0, 47, 37, 287, - /* 1720 */ 64, 45, 0, 291, 241, 0, 47, 0, 307, 46, - /* 1730 */ 22, 310, 311, 312, 313, 314, 315, 22, 317, 307, - /* 1740 */ 21, 20, 310, 311, 312, 313, 314, 315, 22, 317, - /* 1750 */ 21, 358, 269, 241, 358, 358, 358, 358, 102, 358, - /* 1760 */ 277, 358, 358, 358, 358, 358, 358, 358, 358, 113, - /* 1770 */ 287, 358, 358, 358, 291, 358, 358, 358, 358, 358, - /* 1780 */ 358, 269, 358, 358, 358, 241, 358, 358, 358, 277, - /* 1790 */ 307, 358, 358, 310, 311, 312, 313, 314, 315, 287, - /* 1800 */ 317, 358, 358, 291, 358, 358, 358, 358, 358, 358, - /* 1810 */ 358, 358, 156, 269, 358, 358, 358, 358, 358, 307, - /* 1820 */ 358, 277, 310, 311, 312, 313, 314, 315, 358, 317, - /* 1830 */ 358, 287, 358, 358, 178, 291, 358, 358, 358, 358, - /* 1840 */ 358, 241, 358, 358, 358, 189, 190, 191, 358, 358, - /* 1850 */ 358, 307, 358, 358, 310, 311, 312, 313, 314, 315, - /* 1860 */ 358, 317, 358, 358, 358, 358, 358, 358, 358, 269, - /* 1870 */ 358, 358, 241, 358, 358, 358, 358, 277, 358, 358, - /* 1880 */ 358, 358, 358, 358, 358, 358, 358, 287, 358, 358, - /* 1890 */ 358, 291, 358, 358, 358, 358, 358, 358, 358, 358, - /* 1900 */ 269, 241, 358, 358, 358, 358, 358, 307, 277, 358, - /* 1910 */ 310, 311, 312, 313, 314, 315, 358, 317, 287, 358, - /* 1920 */ 358, 358, 291, 358, 358, 358, 358, 358, 358, 269, - /* 1930 */ 358, 358, 241, 358, 358, 358, 358, 277, 307, 358, - /* 1940 */ 358, 310, 311, 312, 313, 314, 315, 287, 317, 358, - /* 1950 */ 358, 291, 358, 358, 358, 358, 358, 358, 358, 358, - /* 1960 */ 269, 241, 358, 358, 358, 358, 358, 307, 277, 358, - /* 1970 */ 310, 311, 312, 313, 314, 315, 358, 317, 287, 358, - /* 1980 */ 358, 358, 291, 358, 358, 358, 358, 358, 358, 269, - /* 1990 */ 358, 358, 358, 358, 358, 358, 358, 277, 307, 358, - /* 2000 */ 358, 310, 311, 312, 313, 314, 315, 287, 317, 358, - /* 2010 */ 358, 291, 241, 358, 358, 358, 358, 358, 358, 358, - /* 2020 */ 358, 358, 358, 241, 358, 358, 358, 307, 358, 358, - /* 2030 */ 310, 311, 312, 313, 314, 315, 358, 317, 358, 358, - /* 2040 */ 269, 358, 358, 358, 358, 358, 358, 358, 277, 358, - /* 2050 */ 358, 269, 358, 358, 358, 358, 358, 358, 287, 277, - /* 2060 */ 358, 358, 291, 358, 358, 358, 358, 358, 358, 287, - /* 2070 */ 358, 358, 358, 291, 358, 358, 358, 241, 307, 358, - /* 2080 */ 358, 310, 311, 312, 313, 314, 315, 358, 317, 307, - /* 2090 */ 358, 358, 310, 311, 312, 313, 314, 315, 358, 317, - /* 2100 */ 358, 358, 358, 358, 358, 269, 358, 358, 358, 358, - /* 2110 */ 358, 358, 358, 277, 358, 358, 358, 358, 358, 358, - /* 2120 */ 358, 358, 358, 287, 358, 358, 358, 291, 358, 358, - /* 2130 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 2140 */ 358, 358, 358, 307, 358, 358, 310, 311, 312, 313, - /* 2150 */ 314, 315, 358, 317, + /* 0 */ 246, 273, 248, 249, 276, 246, 250, 248, 249, 324, + /* 10 */ 325, 4, 12, 13, 242, 271, 244, 243, 262, 339, + /* 20 */ 20, 293, 22, 279, 20, 269, 12, 13, 14, 15, + /* 30 */ 16, 247, 352, 255, 250, 279, 356, 309, 310, 12, + /* 40 */ 13, 14, 15, 16, 271, 271, 268, 47, 320, 42, + /* 50 */ 43, 278, 47, 279, 250, 277, 283, 55, 58, 315, + /* 60 */ 12, 13, 14, 289, 64, 2, 262, 293, 20, 64, + /* 70 */ 22, 0, 58, 299, 20, 12, 13, 14, 15, 16, + /* 80 */ 4, 81, 80, 279, 310, 83, 250, 313, 314, 315, + /* 90 */ 316, 317, 318, 0, 320, 47, 82, 323, 262, 251, + /* 100 */ 252, 327, 328, 103, 90, 269, 58, 12, 13, 14, + /* 110 */ 15, 16, 64, 339, 114, 279, 270, 24, 25, 26, + /* 120 */ 27, 28, 29, 30, 31, 32, 352, 75, 282, 81, + /* 130 */ 356, 60, 61, 62, 63, 81, 65, 66, 67, 68, + /* 140 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + /* 150 */ 289, 103, 279, 292, 140, 81, 295, 81, 158, 286, + /* 160 */ 21, 339, 114, 24, 25, 26, 27, 28, 29, 30, + /* 170 */ 31, 32, 120, 121, 352, 250, 162, 150, 356, 247, + /* 180 */ 180, 181, 250, 183, 184, 185, 186, 187, 188, 189, + /* 190 */ 190, 191, 192, 193, 194, 195, 196, 197, 0, 12, + /* 200 */ 13, 14, 15, 16, 167, 168, 158, 256, 171, 284, + /* 210 */ 210, 260, 198, 199, 200, 201, 202, 203, 204, 205, + /* 220 */ 206, 207, 0, 12, 13, 14, 15, 16, 180, 181, + /* 230 */ 250, 183, 184, 185, 186, 187, 188, 189, 190, 191, + /* 240 */ 192, 193, 194, 195, 196, 197, 12, 13, 0, 20, + /* 250 */ 253, 22, 60, 61, 20, 57, 22, 65, 231, 279, + /* 260 */ 68, 69, 263, 339, 72, 73, 74, 12, 13, 82, + /* 270 */ 271, 274, 243, 57, 20, 20, 352, 22, 49, 280, + /* 280 */ 356, 47, 60, 61, 210, 20, 210, 65, 255, 47, + /* 290 */ 68, 69, 58, 82, 72, 73, 74, 317, 64, 0, + /* 300 */ 271, 14, 47, 243, 243, 250, 64, 20, 279, 250, + /* 310 */ 277, 331, 332, 333, 334, 81, 336, 262, 289, 64, + /* 320 */ 21, 262, 293, 24, 25, 26, 27, 28, 29, 30, + /* 330 */ 31, 32, 271, 243, 279, 81, 81, 103, 279, 310, + /* 340 */ 279, 93, 313, 314, 315, 316, 317, 318, 114, 320, + /* 350 */ 289, 20, 323, 293, 293, 271, 327, 328, 103, 271, + /* 360 */ 112, 113, 278, 115, 116, 117, 243, 283, 280, 114, + /* 370 */ 259, 310, 261, 271, 313, 314, 315, 316, 317, 318, + /* 380 */ 278, 320, 250, 293, 323, 283, 311, 2, 327, 328, + /* 390 */ 329, 20, 158, 3, 262, 257, 258, 12, 13, 14, + /* 400 */ 15, 16, 341, 12, 13, 14, 15, 16, 347, 348, + /* 410 */ 335, 279, 81, 158, 180, 181, 293, 183, 184, 185, + /* 420 */ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + /* 430 */ 196, 197, 250, 257, 258, 180, 181, 243, 183, 184, + /* 440 */ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + /* 450 */ 195, 196, 197, 12, 13, 14, 243, 4, 20, 19, + /* 460 */ 281, 20, 243, 22, 210, 210, 264, 288, 289, 267, + /* 470 */ 14, 184, 19, 33, 12, 13, 20, 273, 243, 243, + /* 480 */ 273, 299, 20, 276, 22, 45, 33, 293, 47, 250, + /* 490 */ 144, 51, 52, 53, 54, 55, 14, 293, 45, 240, + /* 500 */ 293, 262, 20, 50, 57, 64, 293, 271, 55, 47, + /* 510 */ 153, 250, 293, 309, 310, 279, 309, 310, 279, 250, + /* 520 */ 80, 339, 81, 83, 320, 289, 64, 320, 293, 293, + /* 530 */ 173, 174, 64, 80, 352, 299, 83, 146, 356, 289, + /* 540 */ 279, 210, 41, 81, 103, 295, 310, 20, 279, 313, + /* 550 */ 314, 315, 316, 317, 318, 114, 320, 117, 299, 323, + /* 560 */ 243, 215, 216, 327, 328, 103, 12, 13, 14, 15, + /* 570 */ 16, 273, 80, 263, 272, 339, 114, 93, 317, 92, + /* 580 */ 88, 271, 142, 82, 146, 145, 317, 0, 352, 81, + /* 590 */ 280, 293, 356, 332, 333, 334, 253, 336, 339, 158, + /* 600 */ 116, 332, 333, 334, 164, 336, 166, 309, 310, 266, + /* 610 */ 293, 352, 58, 288, 289, 356, 226, 274, 320, 4, + /* 620 */ 158, 180, 181, 243, 183, 184, 185, 186, 187, 188, + /* 630 */ 189, 190, 191, 192, 193, 194, 195, 196, 197, 35, + /* 640 */ 184, 149, 180, 181, 90, 183, 184, 185, 186, 187, + /* 650 */ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + /* 660 */ 12, 13, 18, 93, 20, 157, 180, 159, 20, 250, + /* 670 */ 22, 27, 250, 293, 30, 14, 15, 16, 208, 209, + /* 680 */ 93, 262, 112, 113, 262, 115, 116, 117, 84, 37, + /* 690 */ 86, 87, 48, 89, 140, 47, 22, 93, 279, 112, + /* 700 */ 113, 279, 115, 116, 117, 219, 220, 221, 222, 223, + /* 710 */ 271, 263, 64, 1, 2, 243, 162, 311, 210, 271, + /* 720 */ 116, 47, 283, 42, 43, 311, 169, 170, 280, 81, + /* 730 */ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + /* 740 */ 104, 335, 106, 107, 108, 109, 110, 111, 299, 335, + /* 750 */ 243, 103, 198, 199, 200, 201, 202, 203, 204, 205, + /* 760 */ 206, 207, 114, 119, 0, 293, 122, 123, 124, 125, + /* 770 */ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + /* 780 */ 136, 137, 138, 139, 250, 250, 18, 250, 339, 20, + /* 790 */ 41, 23, 20, 20, 82, 140, 262, 262, 272, 262, + /* 800 */ 293, 352, 243, 35, 36, 356, 158, 39, 243, 243, + /* 810 */ 243, 299, 243, 279, 279, 243, 279, 162, 250, 243, + /* 820 */ 243, 57, 243, 146, 56, 148, 211, 272, 180, 181, + /* 830 */ 262, 183, 184, 185, 186, 187, 188, 189, 190, 191, + /* 840 */ 192, 193, 194, 195, 196, 197, 41, 279, 271, 81, + /* 850 */ 272, 339, 293, 198, 0, 272, 279, 0, 293, 293, + /* 860 */ 293, 209, 293, 0, 352, 293, 289, 0, 356, 293, + /* 870 */ 293, 85, 293, 85, 88, 85, 88, 85, 88, 22, + /* 880 */ 88, 243, 58, 21, 272, 22, 118, 310, 81, 22, + /* 890 */ 313, 314, 315, 316, 317, 318, 34, 320, 91, 45, + /* 900 */ 323, 1, 2, 272, 327, 328, 329, 244, 303, 271, + /* 910 */ 195, 196, 44, 260, 243, 146, 47, 279, 150, 151, + /* 920 */ 152, 41, 41, 155, 350, 348, 47, 289, 160, 41, + /* 930 */ 359, 293, 41, 41, 41, 307, 344, 271, 249, 41, + /* 940 */ 172, 251, 271, 175, 282, 177, 178, 179, 310, 81, + /* 950 */ 279, 313, 314, 315, 316, 317, 318, 184, 320, 312, + /* 960 */ 289, 323, 82, 82, 293, 327, 328, 329, 20, 41, + /* 970 */ 82, 41, 337, 82, 82, 82, 338, 228, 210, 243, + /* 980 */ 82, 310, 353, 114, 313, 314, 315, 316, 317, 318, + /* 990 */ 353, 320, 41, 114, 323, 243, 41, 41, 327, 328, + /* 1000 */ 329, 250, 41, 353, 180, 340, 41, 271, 45, 338, + /* 1010 */ 82, 308, 82, 47, 257, 279, 41, 41, 301, 40, + /* 1020 */ 156, 250, 287, 271, 250, 289, 140, 243, 285, 293, + /* 1030 */ 285, 279, 250, 82, 20, 230, 245, 82, 82, 245, + /* 1040 */ 20, 289, 305, 82, 255, 293, 310, 82, 289, 313, + /* 1050 */ 314, 315, 316, 317, 318, 271, 320, 82, 82, 323, + /* 1060 */ 20, 255, 310, 279, 328, 313, 314, 315, 316, 317, + /* 1070 */ 318, 20, 320, 289, 297, 323, 300, 293, 243, 327, + /* 1080 */ 328, 329, 255, 299, 297, 255, 20, 279, 290, 255, + /* 1090 */ 338, 255, 250, 243, 310, 255, 245, 313, 314, 315, + /* 1100 */ 316, 317, 318, 271, 320, 250, 271, 64, 271, 271, + /* 1110 */ 271, 245, 271, 293, 279, 271, 271, 271, 271, 271, + /* 1120 */ 271, 271, 305, 339, 289, 253, 304, 253, 293, 279, + /* 1130 */ 297, 253, 165, 290, 299, 279, 352, 253, 20, 289, + /* 1140 */ 356, 289, 218, 293, 243, 310, 349, 294, 313, 314, + /* 1150 */ 315, 316, 317, 318, 217, 320, 225, 346, 293, 349, + /* 1160 */ 310, 345, 224, 313, 314, 315, 316, 317, 318, 294, + /* 1170 */ 320, 312, 271, 323, 339, 293, 293, 327, 328, 20, + /* 1180 */ 279, 213, 212, 209, 279, 40, 229, 352, 311, 360, + /* 1190 */ 289, 356, 232, 81, 293, 293, 243, 293, 227, 293, + /* 1200 */ 12, 13, 294, 343, 294, 243, 330, 143, 291, 290, + /* 1210 */ 22, 310, 342, 355, 313, 314, 315, 316, 317, 318, + /* 1220 */ 319, 320, 321, 322, 271, 354, 279, 81, 355, 326, + /* 1230 */ 253, 267, 279, 271, 253, 47, 250, 279, 253, 354, + /* 1240 */ 245, 279, 289, 261, 355, 302, 293, 275, 354, 265, + /* 1250 */ 306, 289, 64, 243, 265, 293, 265, 298, 296, 254, + /* 1260 */ 241, 0, 0, 310, 72, 0, 313, 314, 315, 316, + /* 1270 */ 317, 318, 310, 320, 47, 313, 314, 315, 316, 317, + /* 1280 */ 318, 271, 320, 176, 47, 243, 47, 47, 0, 279, + /* 1290 */ 176, 103, 47, 47, 0, 176, 47, 0, 47, 289, + /* 1300 */ 0, 47, 114, 293, 0, 81, 162, 114, 161, 158, + /* 1310 */ 357, 358, 0, 271, 0, 154, 153, 243, 0, 0, + /* 1320 */ 310, 279, 44, 313, 314, 315, 316, 317, 318, 0, + /* 1330 */ 320, 289, 0, 0, 0, 293, 0, 0, 0, 0, + /* 1340 */ 0, 0, 0, 0, 0, 271, 158, 0, 0, 0, + /* 1350 */ 0, 0, 310, 279, 0, 313, 314, 315, 316, 317, + /* 1360 */ 318, 351, 320, 289, 40, 243, 0, 293, 180, 0, + /* 1370 */ 296, 0, 0, 0, 22, 0, 0, 0, 243, 191, + /* 1380 */ 192, 193, 0, 0, 310, 0, 40, 313, 314, 315, + /* 1390 */ 316, 317, 318, 271, 320, 14, 37, 41, 14, 44, + /* 1400 */ 358, 279, 0, 38, 44, 37, 271, 0, 0, 0, + /* 1410 */ 0, 289, 0, 0, 279, 293, 37, 37, 243, 0, + /* 1420 */ 59, 0, 0, 37, 289, 47, 0, 37, 293, 37, + /* 1430 */ 0, 296, 310, 37, 45, 313, 314, 315, 316, 317, + /* 1440 */ 318, 47, 320, 45, 322, 310, 271, 47, 313, 314, + /* 1450 */ 315, 316, 317, 318, 279, 320, 45, 0, 33, 0, + /* 1460 */ 45, 47, 0, 0, 289, 47, 243, 0, 293, 22, + /* 1470 */ 45, 296, 41, 41, 47, 22, 51, 52, 53, 54, + /* 1480 */ 55, 90, 47, 88, 47, 310, 47, 47, 313, 314, + /* 1490 */ 315, 316, 317, 318, 271, 320, 47, 47, 0, 22, + /* 1500 */ 47, 0, 279, 22, 48, 80, 0, 22, 83, 0, + /* 1510 */ 22, 47, 289, 0, 22, 20, 293, 64, 0, 47, + /* 1520 */ 146, 0, 22, 243, 0, 163, 0, 0, 37, 81, + /* 1530 */ 143, 41, 81, 310, 141, 41, 313, 314, 315, 316, + /* 1540 */ 317, 318, 82, 320, 214, 146, 41, 82, 82, 81, + /* 1550 */ 81, 271, 41, 41, 44, 81, 103, 82, 44, 279, + /* 1560 */ 82, 44, 82, 41, 44, 208, 141, 114, 143, 289, + /* 1570 */ 145, 243, 147, 293, 41, 47, 47, 214, 214, 82, + /* 1580 */ 2, 47, 47, 47, 47, 180, 41, 44, 44, 82, + /* 1590 */ 310, 166, 22, 313, 314, 315, 316, 317, 318, 271, + /* 1600 */ 320, 243, 182, 0, 81, 144, 81, 279, 44, 37, + /* 1610 */ 91, 158, 82, 81, 141, 22, 47, 289, 44, 81, + /* 1620 */ 81, 293, 82, 92, 82, 59, 47, 81, 81, 271, + /* 1630 */ 81, 243, 81, 180, 181, 82, 81, 279, 310, 81, + /* 1640 */ 81, 313, 314, 315, 316, 317, 318, 289, 320, 82, + /* 1650 */ 82, 293, 47, 47, 81, 47, 47, 82, 81, 271, + /* 1660 */ 22, 105, 82, 81, 47, 82, 81, 279, 310, 93, + /* 1670 */ 105, 313, 314, 315, 316, 317, 318, 289, 320, 243, + /* 1680 */ 81, 293, 81, 81, 47, 22, 105, 58, 243, 105, + /* 1690 */ 47, 64, 79, 41, 47, 47, 47, 47, 310, 22, + /* 1700 */ 114, 313, 314, 315, 316, 317, 318, 271, 320, 47, + /* 1710 */ 64, 47, 47, 47, 47, 279, 271, 47, 47, 47, + /* 1720 */ 47, 47, 0, 47, 279, 289, 45, 37, 0, 293, + /* 1730 */ 47, 45, 37, 0, 289, 47, 243, 45, 293, 37, + /* 1740 */ 0, 47, 45, 37, 0, 47, 310, 46, 0, 313, + /* 1750 */ 314, 315, 316, 317, 318, 310, 320, 0, 313, 314, + /* 1760 */ 315, 316, 317, 318, 271, 320, 20, 22, 21, 361, + /* 1770 */ 361, 22, 279, 22, 21, 361, 361, 361, 361, 361, + /* 1780 */ 361, 361, 289, 361, 243, 361, 293, 361, 361, 361, + /* 1790 */ 361, 361, 361, 361, 361, 243, 361, 361, 361, 361, + /* 1800 */ 361, 361, 361, 310, 361, 361, 313, 314, 315, 316, + /* 1810 */ 317, 318, 271, 320, 243, 361, 361, 361, 361, 361, + /* 1820 */ 279, 361, 361, 271, 361, 361, 361, 361, 361, 361, + /* 1830 */ 289, 279, 361, 361, 293, 361, 361, 361, 361, 361, + /* 1840 */ 361, 289, 271, 361, 361, 293, 361, 361, 361, 361, + /* 1850 */ 279, 310, 361, 361, 313, 314, 315, 316, 317, 318, + /* 1860 */ 289, 320, 310, 361, 293, 313, 314, 315, 316, 317, + /* 1870 */ 318, 361, 320, 243, 361, 361, 361, 361, 361, 361, + /* 1880 */ 361, 310, 243, 361, 313, 314, 315, 316, 317, 318, + /* 1890 */ 361, 320, 361, 361, 361, 361, 361, 361, 361, 361, + /* 1900 */ 361, 271, 361, 361, 361, 361, 361, 361, 361, 279, + /* 1910 */ 271, 361, 361, 361, 361, 361, 361, 361, 279, 289, + /* 1920 */ 361, 361, 361, 293, 361, 361, 361, 361, 289, 361, + /* 1930 */ 361, 361, 293, 361, 361, 361, 361, 361, 361, 361, + /* 1940 */ 310, 361, 243, 313, 314, 315, 316, 317, 318, 310, + /* 1950 */ 320, 243, 313, 314, 315, 316, 317, 318, 361, 320, + /* 1960 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + /* 1970 */ 271, 361, 361, 361, 361, 361, 361, 361, 279, 271, + /* 1980 */ 361, 361, 361, 361, 361, 361, 361, 279, 289, 361, + /* 1990 */ 361, 361, 293, 361, 361, 361, 361, 289, 361, 243, + /* 2000 */ 361, 293, 361, 361, 361, 361, 361, 361, 361, 310, + /* 2010 */ 250, 361, 313, 314, 315, 316, 317, 318, 310, 320, + /* 2020 */ 361, 313, 314, 315, 316, 317, 318, 271, 320, 361, + /* 2030 */ 361, 361, 361, 361, 361, 279, 361, 361, 361, 279, + /* 2040 */ 361, 361, 361, 361, 361, 289, 250, 361, 361, 293, + /* 2050 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 299, + /* 2060 */ 361, 361, 361, 361, 361, 361, 310, 361, 361, 313, + /* 2070 */ 314, 315, 316, 317, 318, 279, 320, 317, 361, 361, + /* 2080 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + /* 2090 */ 361, 361, 332, 333, 334, 299, 336, 361, 361, 339, + /* 2100 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + /* 2110 */ 361, 361, 352, 317, 361, 361, 356, 361, 361, 361, + /* 2120 */ 361, 361, 361, 361, 361, 361, 361, 361, 332, 333, + /* 2130 */ 334, 361, 336, 361, 361, 339, 361, 361, 361, 361, + /* 2140 */ 361, 361, 361, 361, 361, 361, 361, 361, 352, 361, + /* 2150 */ 361, 361, 356, }; -#define YY_SHIFT_COUNT (604) +#define YY_SHIFT_COUNT (610) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (1729) +#define YY_SHIFT_MAX (1757) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 739, 0, 0, 48, 96, 96, 96, 96, 280, 280, - /* 10 */ 96, 96, 328, 376, 560, 376, 376, 376, 376, 376, - /* 20 */ 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, - /* 30 */ 376, 376, 376, 376, 376, 376, 376, 376, 37, 37, - /* 40 */ 68, 68, 68, 1656, 1656, 1656, 1656, 64, 271, 179, - /* 50 */ 18, 18, 13, 13, 123, 179, 179, 18, 18, 18, - /* 60 */ 18, 18, 18, 35, 18, 182, 190, 314, 182, 18, - /* 70 */ 18, 182, 18, 182, 182, 314, 182, 18, 334, 556, - /* 80 */ 343, 107, 107, 192, 312, 746, 746, 746, 746, 746, - /* 90 */ 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, - /* 100 */ 746, 746, 746, 746, 441, 580, 110, 110, 206, 720, - /* 110 */ 393, 393, 393, 244, 720, 384, 314, 182, 182, 314, - /* 120 */ 356, 466, 549, 549, 549, 549, 549, 549, 549, 1309, - /* 130 */ 294, 197, 21, 78, 268, 279, 517, 583, 694, 292, - /* 140 */ 502, 611, 576, 687, 576, 598, 598, 598, 756, 750, - /* 150 */ 982, 964, 965, 866, 982, 982, 981, 890, 890, 982, - /* 160 */ 1019, 1019, 1032, 35, 314, 35, 1040, 35, 384, 1049, - /* 170 */ 35, 35, 982, 35, 1019, 182, 182, 182, 182, 182, - /* 180 */ 182, 182, 182, 182, 182, 182, 982, 1019, 1016, 1032, - /* 190 */ 334, 957, 314, 334, 1040, 334, 384, 1049, 334, 1114, - /* 200 */ 925, 927, 1016, 925, 927, 1016, 1016, 182, 923, 938, - /* 210 */ 939, 951, 967, 384, 1161, 1146, 961, 972, 966, 961, - /* 220 */ 972, 961, 972, 1118, 927, 1016, 1016, 927, 1016, 1063, - /* 230 */ 384, 1049, 334, 356, 334, 384, 1167, 466, 982, 334, - /* 240 */ 1019, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 635, - /* 250 */ 928, 1184, 1043, 921, 997, 119, 14, 30, 485, 126, - /* 260 */ 498, 354, 354, 354, 354, 354, 354, 354, 354, 309, - /* 270 */ 321, 415, 404, 8, 445, 622, 622, 622, 622, 772, - /* 280 */ 774, 734, 742, 763, 765, 435, 878, 883, 832, 623, - /* 290 */ 724, 830, 857, 863, 879, 725, 751, 787, 865, 796, - /* 300 */ 869, 792, 872, 876, 881, 894, 904, 773, 854, 914, - /* 310 */ 917, 930, 943, 946, 947, 859, 820, 1275, 1276, 1205, - /* 320 */ 1279, 1233, 1107, 1235, 1236, 1237, 1112, 1287, 1242, 1243, - /* 330 */ 1117, 1293, 1247, 1295, 1249, 1297, 1251, 1303, 1225, 1149, - /* 340 */ 1147, 1197, 1163, 1317, 1322, 1171, 1174, 1329, 1330, 1288, - /* 350 */ 1331, 1333, 1334, 1336, 1337, 1338, 1339, 1340, 1341, 1347, - /* 360 */ 1348, 1350, 1351, 1353, 1355, 1356, 1357, 1358, 1304, 1359, - /* 370 */ 1366, 1367, 1376, 1377, 1378, 1321, 1379, 1380, 1381, 1383, - /* 380 */ 1384, 1386, 1349, 1360, 1346, 1385, 1354, 1387, 1361, 1390, - /* 390 */ 1362, 1365, 1393, 1394, 1395, 1403, 1369, 1404, 1352, 1407, - /* 400 */ 1408, 1363, 1364, 1389, 1414, 1382, 1388, 1391, 1423, 1392, - /* 410 */ 1396, 1397, 1424, 1398, 1399, 1400, 1427, 1430, 1440, 1442, - /* 420 */ 1373, 1345, 1401, 1425, 1443, 1402, 1405, 1416, 1419, 1426, - /* 430 */ 1428, 1429, 1431, 1433, 1446, 1448, 1468, 1452, 1435, 1475, - /* 440 */ 1455, 1434, 1479, 1462, 1485, 1465, 1469, 1488, 1368, 1444, - /* 450 */ 1490, 1335, 1470, 1371, 1375, 1494, 1495, 1498, 1420, 1466, - /* 460 */ 1406, 1458, 1463, 1307, 1439, 1480, 1441, 1447, 1449, 1450, - /* 470 */ 1445, 1482, 1484, 1496, 1464, 1491, 1342, 1461, 1467, 1501, - /* 480 */ 1318, 1508, 1507, 1471, 1514, 1344, 1476, 1511, 1513, 1515, - /* 490 */ 1517, 1518, 1525, 1476, 1557, 1409, 1520, 1493, 1497, 1499, - /* 500 */ 1531, 1502, 1503, 1532, 1556, 1410, 1505, 1510, 1516, 1506, - /* 510 */ 1521, 1436, 1522, 1588, 1555, 1453, 1524, 1504, 1551, 1552, - /* 520 */ 1526, 1519, 1527, 1576, 1528, 1523, 1529, 1558, 1562, 1535, - /* 530 */ 1530, 1569, 1537, 1540, 1571, 1548, 1550, 1585, 1553, 1554, - /* 540 */ 1589, 1559, 1533, 1534, 1536, 1538, 1621, 1560, 1564, 1565, - /* 550 */ 1599, 1567, 1561, 1601, 1629, 1602, 1606, 1603, 1587, 1625, - /* 560 */ 1623, 1624, 1628, 1630, 1633, 1650, 1634, 1641, 1612, 1426, - /* 570 */ 1644, 1428, 1645, 1646, 1647, 1648, 1649, 1652, 1697, 1653, - /* 580 */ 1657, 1667, 1705, 1659, 1662, 1673, 1711, 1666, 1669, 1678, - /* 590 */ 1716, 1670, 1676, 1681, 1722, 1679, 1683, 1725, 1727, 1708, - /* 600 */ 1719, 1715, 1726, 1729, 1721, + /* 0 */ 768, 0, 0, 48, 234, 234, 234, 234, 255, 255, + /* 10 */ 234, 234, 441, 462, 648, 462, 462, 462, 462, 462, + /* 20 */ 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, + /* 30 */ 462, 462, 462, 462, 462, 462, 462, 462, 254, 254, + /* 40 */ 54, 54, 54, 1188, 1188, 1188, 1188, 331, 508, 74, + /* 50 */ 4, 4, 7, 7, 76, 74, 74, 4, 4, 4, + /* 60 */ 4, 4, 4, 216, 4, 265, 371, 527, 265, 4, + /* 70 */ 4, 265, 4, 265, 265, 527, 265, 4, 447, 644, + /* 80 */ 14, 554, 554, 139, 192, 1453, 1453, 1453, 1453, 1453, + /* 90 */ 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, + /* 100 */ 1453, 1453, 1453, 1453, 604, 229, 482, 482, 198, 5, + /* 110 */ 438, 438, 438, 764, 5, 772, 527, 265, 265, 527, + /* 120 */ 487, 468, 636, 636, 636, 636, 636, 636, 636, 440, + /* 130 */ 299, 222, 27, 486, 37, 346, 287, 456, 681, 674, + /* 140 */ 484, 769, 470, 652, 470, 390, 390, 390, 615, 773, + /* 150 */ 948, 963, 966, 864, 948, 948, 979, 886, 886, 948, + /* 160 */ 1014, 1014, 1020, 216, 527, 216, 1040, 1051, 216, 1040, + /* 170 */ 216, 772, 1066, 216, 216, 948, 216, 1014, 265, 265, + /* 180 */ 265, 265, 265, 265, 265, 265, 265, 265, 265, 948, + /* 190 */ 1014, 1043, 1020, 447, 967, 527, 447, 1040, 447, 772, + /* 200 */ 1066, 447, 1118, 924, 937, 1043, 924, 937, 1043, 1043, + /* 210 */ 265, 931, 938, 968, 970, 974, 772, 1159, 1145, 957, + /* 220 */ 971, 960, 957, 971, 957, 971, 1112, 937, 1043, 1043, + /* 230 */ 937, 1043, 1064, 772, 1066, 447, 487, 447, 772, 1146, + /* 240 */ 468, 948, 447, 1014, 2153, 2153, 2153, 2153, 2153, 2153, + /* 250 */ 2153, 2153, 71, 1425, 93, 453, 248, 587, 187, 63, + /* 260 */ 385, 391, 211, 570, 95, 95, 95, 95, 95, 95, + /* 270 */ 95, 95, 357, 2, 52, 492, 712, 655, 661, 661, + /* 280 */ 661, 661, 854, 501, 786, 788, 790, 792, 857, 863, + /* 290 */ 867, 862, 557, 677, 880, 881, 888, 900, 715, 749, + /* 300 */ 805, 891, 824, 892, 868, 893, 898, 928, 930, 951, + /* 310 */ 869, 879, 955, 956, 961, 965, 975, 976, 807, 242, + /* 320 */ 1261, 1262, 1192, 1265, 1227, 1107, 1237, 1239, 1240, 1114, + /* 330 */ 1288, 1245, 1246, 1119, 1294, 1249, 1297, 1251, 1300, 1254, + /* 340 */ 1304, 1224, 1144, 1147, 1193, 1151, 1312, 1314, 1161, 1163, + /* 350 */ 1318, 1319, 1278, 1329, 1332, 1333, 1334, 1336, 1337, 1338, + /* 360 */ 1339, 1340, 1341, 1342, 1343, 1344, 1347, 1348, 1349, 1350, + /* 370 */ 1351, 1324, 1354, 1366, 1369, 1371, 1372, 1373, 1352, 1375, + /* 380 */ 1376, 1377, 1382, 1383, 1385, 1346, 1359, 1356, 1381, 1355, + /* 390 */ 1384, 1360, 1402, 1365, 1368, 1407, 1408, 1409, 1379, 1410, + /* 400 */ 1412, 1380, 1413, 1361, 1419, 1421, 1378, 1389, 1386, 1422, + /* 410 */ 1394, 1398, 1390, 1426, 1400, 1411, 1392, 1430, 1414, 1415, + /* 420 */ 1396, 1457, 1459, 1462, 1463, 1391, 1395, 1418, 1447, 1467, + /* 430 */ 1427, 1435, 1437, 1439, 1431, 1432, 1440, 1449, 1450, 1498, + /* 440 */ 1477, 1501, 1481, 1456, 1506, 1485, 1464, 1509, 1488, 1513, + /* 450 */ 1492, 1495, 1518, 1374, 1472, 1521, 1362, 1500, 1399, 1387, + /* 460 */ 1524, 1526, 1527, 1448, 1491, 1393, 1490, 1494, 1330, 1460, + /* 470 */ 1505, 1465, 1451, 1468, 1469, 1466, 1511, 1510, 1514, 1474, + /* 480 */ 1512, 1363, 1475, 1478, 1517, 1357, 1522, 1520, 1480, 1533, + /* 490 */ 1364, 1497, 1528, 1529, 1534, 1535, 1536, 1537, 1497, 1578, + /* 500 */ 1405, 1545, 1507, 1523, 1530, 1543, 1525, 1532, 1544, 1570, + /* 510 */ 1420, 1538, 1540, 1542, 1539, 1546, 1461, 1547, 1603, 1572, + /* 520 */ 1473, 1549, 1519, 1564, 1574, 1551, 1553, 1555, 1593, 1558, + /* 530 */ 1531, 1567, 1569, 1579, 1559, 1568, 1605, 1573, 1575, 1606, + /* 540 */ 1577, 1580, 1608, 1582, 1583, 1609, 1585, 1556, 1565, 1581, + /* 550 */ 1584, 1638, 1576, 1599, 1601, 1617, 1602, 1586, 1637, 1663, + /* 560 */ 1566, 1629, 1643, 1627, 1613, 1652, 1647, 1648, 1649, 1650, + /* 570 */ 1662, 1677, 1664, 1665, 1646, 1431, 1666, 1432, 1667, 1670, + /* 580 */ 1671, 1672, 1673, 1674, 1722, 1676, 1681, 1690, 1728, 1683, + /* 590 */ 1686, 1695, 1733, 1688, 1692, 1702, 1740, 1694, 1697, 1706, + /* 600 */ 1744, 1698, 1701, 1748, 1757, 1745, 1747, 1749, 1751, 1753, + /* 610 */ 1746, }; -#define YY_REDUCE_COUNT (248) -#define YY_REDUCE_MIN (-335) -#define YY_REDUCE_MAX (1836) +#define YY_REDUCE_COUNT (251) +#define YY_REDUCE_MIN (-320) +#define YY_REDUCE_MAX (1796) static const short yy_reduce_ofst[] = { - /* 0 */ -190, -238, 489, 520, 308, 616, 679, 731, 790, 841, - /* 10 */ 858, 916, 948, -140, 1001, 1058, 138, 1105, 1144, 1195, - /* 20 */ 1224, 1256, 1312, 1343, 1372, 1421, 1432, 1483, 1512, 1544, - /* 30 */ 1600, 1631, 1660, 1691, 1720, 1771, 1782, 1836, 546, 971, - /* 40 */ 88, -1, 113, -266, -181, 46, 103, 239, -286, -85, - /* 50 */ -163, 87, -240, -223, -335, -334, -253, -49, 85, 135, - /* 60 */ 248, 331, 511, -172, 521, -124, -111, 56, 136, 564, - /* 70 */ 591, -21, 613, 216, 130, 152, 320, 614, -173, -177, - /* 80 */ -256, -256, -256, -188, -105, -86, 213, 261, 287, 370, - /* 90 */ 375, 385, 422, 423, 424, 426, 427, 428, 429, 430, - /* 100 */ 431, 434, 482, 486, -100, 4, 305, 348, 63, 473, - /* 110 */ -83, 432, 455, 355, 476, 94, 492, 457, -8, 447, - /* 120 */ 543, -95, -270, 225, 235, 317, 369, 390, 593, 516, - /* 130 */ 654, 650, 578, 590, 639, 618, 683, 683, 707, 711, - /* 140 */ 684, 659, 629, 629, 629, 619, 626, 628, 664, 683, - /* 150 */ 758, 712, 761, 721, 775, 777, 741, 747, 757, 786, - /* 160 */ 806, 807, 752, 800, 771, 808, 768, 811, 788, 783, - /* 170 */ 821, 822, 825, 826, 835, 814, 815, 816, 817, 827, - /* 180 */ 837, 845, 846, 847, 848, 850, 842, 851, 804, 789, - /* 190 */ 870, 823, 836, 880, 834, 882, 853, 849, 885, 831, - /* 200 */ 798, 855, 868, 818, 871, 875, 888, 683, 819, 838, - /* 210 */ 852, 828, 629, 899, 887, 860, 839, 867, 843, 886, - /* 220 */ 873, 891, 893, 897, 907, 910, 911, 912, 915, 932, - /* 230 */ 945, 944, 983, 980, 986, 969, 976, 991, 1003, 1002, - /* 240 */ 1009, 955, 953, 973, 994, 1008, 1010, 1020, 1035, + /* 0 */ 259, -226, 236, 61, 577, 638, 671, 752, 784, 835, + /* 10 */ 29, 850, 901, 953, 736, 962, 1010, 1042, 1074, 1122, + /* 20 */ 1135, 1175, 1223, 1280, 1328, 1358, 1388, 1436, 1445, 1493, + /* 30 */ 1541, 1552, 1571, 1630, 1639, 1699, 1708, 1756, 1760, 1796, + /* 40 */ -20, 261, 269, -272, 207, 204, 298, 182, 449, 512, + /* 50 */ -244, -164, -246, -241, -320, -178, -76, -196, 55, 59, + /* 60 */ 132, 239, 419, -222, 422, -227, -256, -139, -1, 534, + /* 70 */ 535, 84, 537, 310, 102, 179, 448, 568, 343, -75, + /* 80 */ -315, -315, -315, -228, -49, 60, 90, 123, 194, 213, + /* 90 */ 219, 235, 317, 380, 472, 507, 559, 565, 566, 567, + /* 100 */ 569, 572, 576, 579, -154, -152, -216, -68, 33, 138, + /* 110 */ 75, 406, 414, -3, 176, -127, 250, 88, 439, 325, + /* 120 */ 202, 111, 302, 526, 555, 578, 583, 612, 631, 605, + /* 130 */ 663, 653, 571, 574, 628, 592, 666, 666, 689, 690, + /* 140 */ 662, 647, 635, 635, 635, 629, 637, 650, 665, 666, + /* 150 */ 751, 703, 757, 717, 771, 774, 735, 743, 745, 782, + /* 160 */ 791, 794, 737, 789, 759, 806, 777, 776, 827, 787, + /* 170 */ 830, 808, 798, 834, 836, 842, 840, 851, 832, 837, + /* 180 */ 838, 839, 841, 844, 845, 846, 847, 848, 849, 855, + /* 190 */ 866, 820, 817, 872, 822, 852, 874, 833, 878, 856, + /* 200 */ 843, 884, 859, 797, 853, 865, 810, 875, 882, 883, + /* 210 */ 666, 811, 816, 860, 870, 635, 905, 877, 876, 858, + /* 220 */ 871, 829, 873, 885, 889, 894, 903, 908, 902, 904, + /* 230 */ 910, 906, 917, 947, 919, 977, 964, 981, 958, 972, + /* 240 */ 982, 986, 985, 995, 943, 944, 959, 984, 989, 991, + /* 250 */ 1005, 1019, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 10 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 20 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 30 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 40 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 50 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 60 */ 1345, 1345, 1345, 1414, 1345, 1345, 1345, 1345, 1345, 1345, - /* 70 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1412, 1552, - /* 80 */ 1345, 1717, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 90 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 100 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1414, 1345, - /* 110 */ 1728, 1728, 1728, 1412, 1345, 1345, 1345, 1345, 1345, 1345, - /* 120 */ 1507, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1590, - /* 130 */ 1345, 1345, 1794, 1345, 1596, 1752, 1345, 1345, 1345, 1345, - /* 140 */ 1460, 1744, 1720, 1734, 1721, 1779, 1779, 1779, 1737, 1345, - /* 150 */ 1345, 1345, 1345, 1582, 1345, 1345, 1557, 1554, 1554, 1345, - /* 160 */ 1345, 1345, 1345, 1414, 1345, 1414, 1345, 1414, 1345, 1345, - /* 170 */ 1414, 1414, 1345, 1414, 1345, 1345, 1345, 1345, 1345, 1345, - /* 180 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 190 */ 1412, 1592, 1345, 1412, 1345, 1412, 1345, 1345, 1412, 1345, - /* 200 */ 1759, 1757, 1345, 1759, 1757, 1345, 1345, 1345, 1771, 1767, - /* 210 */ 1750, 1748, 1734, 1345, 1345, 1345, 1785, 1781, 1797, 1785, - /* 220 */ 1781, 1785, 1781, 1345, 1757, 1345, 1345, 1757, 1345, 1565, - /* 230 */ 1345, 1345, 1412, 1345, 1412, 1345, 1476, 1345, 1345, 1412, - /* 240 */ 1345, 1584, 1598, 1574, 1510, 1510, 1510, 1415, 1350, 1345, - /* 250 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 260 */ 1472, 1661, 1770, 1769, 1693, 1692, 1691, 1689, 1660, 1345, - /* 270 */ 1345, 1345, 1345, 1345, 1345, 1654, 1655, 1653, 1652, 1345, - /* 280 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 290 */ 1345, 1345, 1345, 1345, 1718, 1345, 1782, 1786, 1345, 1345, - /* 300 */ 1345, 1638, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 310 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 320 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 330 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 340 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 350 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 360 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 370 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 380 */ 1345, 1345, 1345, 1345, 1379, 1345, 1345, 1345, 1345, 1345, - /* 390 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 400 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 410 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 420 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1441, - /* 430 */ 1440, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 440 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 450 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 460 */ 1345, 1741, 1751, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 470 */ 1345, 1345, 1345, 1638, 1345, 1768, 1345, 1727, 1723, 1345, - /* 480 */ 1345, 1719, 1345, 1345, 1780, 1345, 1345, 1345, 1345, 1345, - /* 490 */ 1345, 1345, 1345, 1345, 1713, 1345, 1686, 1345, 1345, 1345, - /* 500 */ 1345, 1345, 1345, 1345, 1345, 1648, 1345, 1345, 1345, 1345, - /* 510 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1637, 1345, - /* 520 */ 1677, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1504, - /* 530 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 540 */ 1345, 1345, 1489, 1487, 1486, 1485, 1345, 1482, 1345, 1345, - /* 550 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1434, - /* 560 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1425, - /* 570 */ 1345, 1424, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 580 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 590 */ 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, - /* 600 */ 1345, 1345, 1345, 1345, 1345, + /* 0 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 10 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 20 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 30 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 40 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 50 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 60 */ 1356, 1356, 1356, 1425, 1356, 1356, 1356, 1356, 1356, 1356, + /* 70 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1423, 1564, + /* 80 */ 1356, 1731, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 90 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 100 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1425, 1356, + /* 110 */ 1742, 1742, 1742, 1423, 1356, 1356, 1356, 1356, 1356, 1356, + /* 120 */ 1519, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1603, + /* 130 */ 1356, 1356, 1808, 1356, 1609, 1766, 1356, 1356, 1356, 1356, + /* 140 */ 1472, 1758, 1734, 1748, 1735, 1793, 1793, 1793, 1751, 1356, + /* 150 */ 1356, 1356, 1356, 1595, 1356, 1356, 1569, 1566, 1566, 1356, + /* 160 */ 1356, 1356, 1356, 1425, 1356, 1425, 1356, 1356, 1425, 1356, + /* 170 */ 1425, 1356, 1356, 1425, 1425, 1356, 1425, 1356, 1356, 1356, + /* 180 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 190 */ 1356, 1356, 1356, 1423, 1605, 1356, 1423, 1356, 1423, 1356, + /* 200 */ 1356, 1423, 1356, 1773, 1771, 1356, 1773, 1771, 1356, 1356, + /* 210 */ 1356, 1785, 1781, 1764, 1762, 1748, 1356, 1356, 1356, 1799, + /* 220 */ 1795, 1811, 1799, 1795, 1799, 1795, 1356, 1771, 1356, 1356, + /* 230 */ 1771, 1356, 1577, 1356, 1356, 1423, 1356, 1423, 1356, 1488, + /* 240 */ 1356, 1356, 1423, 1356, 1597, 1611, 1587, 1522, 1522, 1522, + /* 250 */ 1426, 1361, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 260 */ 1356, 1356, 1356, 1484, 1675, 1784, 1783, 1707, 1706, 1705, + /* 270 */ 1703, 1674, 1356, 1356, 1356, 1356, 1356, 1356, 1668, 1669, + /* 280 */ 1667, 1666, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 290 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1732, 1356, 1796, + /* 300 */ 1800, 1356, 1356, 1356, 1651, 1356, 1356, 1356, 1356, 1356, + /* 310 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 320 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 330 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 340 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 350 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 360 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 370 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 380 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1390, 1356, 1356, + /* 390 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 400 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 410 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 420 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 430 */ 1356, 1356, 1356, 1356, 1453, 1452, 1356, 1356, 1356, 1356, + /* 440 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 450 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 460 */ 1356, 1356, 1356, 1356, 1356, 1356, 1755, 1765, 1356, 1356, + /* 470 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1651, 1356, + /* 480 */ 1782, 1356, 1741, 1737, 1356, 1356, 1733, 1356, 1356, 1794, + /* 490 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1727, + /* 500 */ 1356, 1700, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 510 */ 1662, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 520 */ 1356, 1356, 1356, 1650, 1356, 1691, 1356, 1356, 1356, 1356, + /* 530 */ 1356, 1356, 1356, 1356, 1516, 1356, 1356, 1356, 1356, 1356, + /* 540 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1501, 1499, 1498, + /* 550 */ 1497, 1356, 1494, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 560 */ 1356, 1356, 1356, 1356, 1356, 1445, 1356, 1356, 1356, 1356, + /* 570 */ 1356, 1356, 1356, 1356, 1356, 1436, 1356, 1435, 1356, 1356, + /* 580 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 590 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 600 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 610 */ 1356, }; /********** End of lemon-generated parsing tables *****************************/ @@ -903,6 +906,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* VGROUPS => nothing */ 0, /* SINGLE_STABLE => nothing */ 0, /* RETENTIONS => nothing */ + 0, /* SCHEMALESS => nothing */ 0, /* NK_COLON => nothing */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ @@ -971,6 +975,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* INTERVAL => nothing */ 0, /* TOPIC => nothing */ 0, /* AS => nothing */ + 0, /* CGROUP => nothing */ 0, /* WITH => nothing */ 0, /* SCHEMA => nothing */ 0, /* DESC => nothing */ @@ -1057,12 +1062,12 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ID => nothing */ - 231, /* NK_BITNOT => ID */ - 231, /* INSERT => ID */ - 231, /* VALUES => ID */ - 231, /* IMPORT => ID */ - 231, /* NK_SEMI => ID */ - 231, /* FILE => ID */ + 233, /* NK_BITNOT => ID */ + 233, /* INSERT => ID */ + 233, /* VALUES => ID */ + 233, /* IMPORT => ID */ + 233, /* NK_SEMI => ID */ + 233, /* FILE => ID */ }; #endif /* YYFALLBACK */ @@ -1228,286 +1233,289 @@ static const char *const yyTokenName[] = { /* 75 */ "VGROUPS", /* 76 */ "SINGLE_STABLE", /* 77 */ "RETENTIONS", - /* 78 */ "NK_COLON", - /* 79 */ "TABLE", - /* 80 */ "NK_LP", - /* 81 */ "NK_RP", - /* 82 */ "STABLE", - /* 83 */ "ADD", - /* 84 */ "COLUMN", - /* 85 */ "MODIFY", - /* 86 */ "RENAME", - /* 87 */ "TAG", - /* 88 */ "SET", - /* 89 */ "NK_EQ", - /* 90 */ "USING", - /* 91 */ "TAGS", - /* 92 */ "COMMENT", - /* 93 */ "BOOL", - /* 94 */ "TINYINT", - /* 95 */ "SMALLINT", - /* 96 */ "INT", - /* 97 */ "INTEGER", - /* 98 */ "BIGINT", - /* 99 */ "FLOAT", - /* 100 */ "DOUBLE", - /* 101 */ "BINARY", - /* 102 */ "TIMESTAMP", - /* 103 */ "NCHAR", - /* 104 */ "UNSIGNED", - /* 105 */ "JSON", - /* 106 */ "VARCHAR", - /* 107 */ "MEDIUMBLOB", - /* 108 */ "BLOB", - /* 109 */ "VARBINARY", - /* 110 */ "DECIMAL", - /* 111 */ "DELAY", - /* 112 */ "FILE_FACTOR", - /* 113 */ "NK_FLOAT", - /* 114 */ "ROLLUP", - /* 115 */ "TTL", - /* 116 */ "SMA", - /* 117 */ "SHOW", - /* 118 */ "DATABASES", - /* 119 */ "TABLES", - /* 120 */ "STABLES", - /* 121 */ "MNODES", - /* 122 */ "MODULES", - /* 123 */ "QNODES", - /* 124 */ "FUNCTIONS", - /* 125 */ "INDEXES", - /* 126 */ "ACCOUNTS", - /* 127 */ "APPS", - /* 128 */ "CONNECTIONS", - /* 129 */ "LICENCE", - /* 130 */ "GRANTS", - /* 131 */ "QUERIES", - /* 132 */ "SCORES", - /* 133 */ "TOPICS", - /* 134 */ "VARIABLES", - /* 135 */ "BNODES", - /* 136 */ "SNODES", - /* 137 */ "CLUSTER", - /* 138 */ "TRANSACTIONS", - /* 139 */ "LIKE", - /* 140 */ "INDEX", - /* 141 */ "FULLTEXT", - /* 142 */ "FUNCTION", - /* 143 */ "INTERVAL", - /* 144 */ "TOPIC", - /* 145 */ "AS", - /* 146 */ "WITH", - /* 147 */ "SCHEMA", - /* 148 */ "DESC", - /* 149 */ "DESCRIBE", - /* 150 */ "RESET", - /* 151 */ "QUERY", - /* 152 */ "CACHE", - /* 153 */ "EXPLAIN", - /* 154 */ "ANALYZE", - /* 155 */ "VERBOSE", - /* 156 */ "NK_BOOL", - /* 157 */ "RATIO", - /* 158 */ "COMPACT", - /* 159 */ "VNODES", - /* 160 */ "IN", - /* 161 */ "OUTPUTTYPE", - /* 162 */ "AGGREGATE", - /* 163 */ "BUFSIZE", - /* 164 */ "STREAM", - /* 165 */ "INTO", - /* 166 */ "TRIGGER", - /* 167 */ "AT_ONCE", - /* 168 */ "WINDOW_CLOSE", - /* 169 */ "WATERMARK", - /* 170 */ "KILL", - /* 171 */ "CONNECTION", - /* 172 */ "TRANSACTION", - /* 173 */ "MERGE", - /* 174 */ "VGROUP", - /* 175 */ "REDISTRIBUTE", - /* 176 */ "SPLIT", - /* 177 */ "SYNCDB", - /* 178 */ "NULL", - /* 179 */ "NK_QUESTION", - /* 180 */ "NK_ARROW", - /* 181 */ "ROWTS", - /* 182 */ "TBNAME", - /* 183 */ "QSTARTTS", - /* 184 */ "QENDTS", - /* 185 */ "WSTARTTS", - /* 186 */ "WENDTS", - /* 187 */ "WDURATION", - /* 188 */ "CAST", - /* 189 */ "NOW", - /* 190 */ "TODAY", - /* 191 */ "TIMEZONE", - /* 192 */ "COUNT", - /* 193 */ "FIRST", - /* 194 */ "LAST", - /* 195 */ "LAST_ROW", - /* 196 */ "BETWEEN", - /* 197 */ "IS", - /* 198 */ "NK_LT", - /* 199 */ "NK_GT", - /* 200 */ "NK_LE", - /* 201 */ "NK_GE", - /* 202 */ "NK_NE", - /* 203 */ "MATCH", - /* 204 */ "NMATCH", - /* 205 */ "CONTAINS", - /* 206 */ "JOIN", - /* 207 */ "INNER", - /* 208 */ "SELECT", - /* 209 */ "DISTINCT", - /* 210 */ "WHERE", - /* 211 */ "PARTITION", - /* 212 */ "BY", - /* 213 */ "SESSION", - /* 214 */ "STATE_WINDOW", - /* 215 */ "SLIDING", - /* 216 */ "FILL", - /* 217 */ "VALUE", - /* 218 */ "NONE", - /* 219 */ "PREV", - /* 220 */ "LINEAR", - /* 221 */ "NEXT", - /* 222 */ "GROUP", - /* 223 */ "HAVING", - /* 224 */ "ORDER", - /* 225 */ "SLIMIT", - /* 226 */ "SOFFSET", - /* 227 */ "LIMIT", - /* 228 */ "OFFSET", - /* 229 */ "ASC", - /* 230 */ "NULLS", - /* 231 */ "ID", - /* 232 */ "NK_BITNOT", - /* 233 */ "INSERT", - /* 234 */ "VALUES", - /* 235 */ "IMPORT", - /* 236 */ "NK_SEMI", - /* 237 */ "FILE", - /* 238 */ "cmd", - /* 239 */ "account_options", - /* 240 */ "alter_account_options", - /* 241 */ "literal", - /* 242 */ "alter_account_option", - /* 243 */ "user_name", - /* 244 */ "privileges", - /* 245 */ "priv_level", - /* 246 */ "priv_type_list", - /* 247 */ "priv_type", - /* 248 */ "db_name", - /* 249 */ "dnode_endpoint", - /* 250 */ "dnode_host_name", - /* 251 */ "not_exists_opt", - /* 252 */ "db_options", - /* 253 */ "exists_opt", - /* 254 */ "alter_db_options", - /* 255 */ "integer_list", - /* 256 */ "variable_list", - /* 257 */ "retention_list", - /* 258 */ "alter_db_option", - /* 259 */ "retention", - /* 260 */ "full_table_name", - /* 261 */ "column_def_list", - /* 262 */ "tags_def_opt", - /* 263 */ "table_options", - /* 264 */ "multi_create_clause", - /* 265 */ "tags_def", - /* 266 */ "multi_drop_clause", - /* 267 */ "alter_table_clause", - /* 268 */ "alter_table_options", - /* 269 */ "column_name", - /* 270 */ "type_name", - /* 271 */ "signed_literal", - /* 272 */ "create_subtable_clause", - /* 273 */ "specific_tags_opt", - /* 274 */ "literal_list", - /* 275 */ "drop_table_clause", - /* 276 */ "col_name_list", - /* 277 */ "table_name", - /* 278 */ "column_def", - /* 279 */ "func_name_list", - /* 280 */ "alter_table_option", - /* 281 */ "col_name", - /* 282 */ "db_name_cond_opt", - /* 283 */ "like_pattern_opt", - /* 284 */ "table_name_cond", - /* 285 */ "from_db_opt", - /* 286 */ "func_name", - /* 287 */ "function_name", - /* 288 */ "index_name", - /* 289 */ "index_options", - /* 290 */ "func_list", - /* 291 */ "duration_literal", - /* 292 */ "sliding_opt", - /* 293 */ "func", - /* 294 */ "expression_list", - /* 295 */ "topic_name", - /* 296 */ "topic_options", - /* 297 */ "query_expression", - /* 298 */ "analyze_opt", - /* 299 */ "explain_options", - /* 300 */ "agg_func_opt", - /* 301 */ "bufsize_opt", - /* 302 */ "stream_name", - /* 303 */ "stream_options", - /* 304 */ "into_opt", - /* 305 */ "dnode_list", - /* 306 */ "signed", - /* 307 */ "literal_func", - /* 308 */ "table_alias", - /* 309 */ "column_alias", - /* 310 */ "expression", - /* 311 */ "pseudo_column", - /* 312 */ "column_reference", - /* 313 */ "function_expression", - /* 314 */ "subquery", - /* 315 */ "star_func", - /* 316 */ "star_func_para_list", - /* 317 */ "noarg_func", - /* 318 */ "other_para_list", - /* 319 */ "star_func_para", - /* 320 */ "predicate", - /* 321 */ "compare_op", - /* 322 */ "in_op", - /* 323 */ "in_predicate_value", - /* 324 */ "boolean_value_expression", - /* 325 */ "boolean_primary", - /* 326 */ "common_expression", - /* 327 */ "from_clause", - /* 328 */ "table_reference_list", - /* 329 */ "table_reference", - /* 330 */ "table_primary", - /* 331 */ "joined_table", - /* 332 */ "alias_opt", - /* 333 */ "parenthesized_joined_table", - /* 334 */ "join_type", - /* 335 */ "search_condition", - /* 336 */ "query_specification", - /* 337 */ "set_quantifier_opt", - /* 338 */ "select_list", - /* 339 */ "where_clause_opt", - /* 340 */ "partition_by_clause_opt", - /* 341 */ "twindow_clause_opt", - /* 342 */ "group_by_clause_opt", - /* 343 */ "having_clause_opt", - /* 344 */ "select_sublist", - /* 345 */ "select_item", - /* 346 */ "fill_opt", - /* 347 */ "fill_mode", - /* 348 */ "group_by_list", - /* 349 */ "query_expression_body", - /* 350 */ "order_by_clause_opt", - /* 351 */ "slimit_clause_opt", - /* 352 */ "limit_clause_opt", - /* 353 */ "query_primary", - /* 354 */ "sort_specification_list", - /* 355 */ "sort_specification", - /* 356 */ "ordering_specification_opt", - /* 357 */ "null_ordering_opt", + /* 78 */ "SCHEMALESS", + /* 79 */ "NK_COLON", + /* 80 */ "TABLE", + /* 81 */ "NK_LP", + /* 82 */ "NK_RP", + /* 83 */ "STABLE", + /* 84 */ "ADD", + /* 85 */ "COLUMN", + /* 86 */ "MODIFY", + /* 87 */ "RENAME", + /* 88 */ "TAG", + /* 89 */ "SET", + /* 90 */ "NK_EQ", + /* 91 */ "USING", + /* 92 */ "TAGS", + /* 93 */ "COMMENT", + /* 94 */ "BOOL", + /* 95 */ "TINYINT", + /* 96 */ "SMALLINT", + /* 97 */ "INT", + /* 98 */ "INTEGER", + /* 99 */ "BIGINT", + /* 100 */ "FLOAT", + /* 101 */ "DOUBLE", + /* 102 */ "BINARY", + /* 103 */ "TIMESTAMP", + /* 104 */ "NCHAR", + /* 105 */ "UNSIGNED", + /* 106 */ "JSON", + /* 107 */ "VARCHAR", + /* 108 */ "MEDIUMBLOB", + /* 109 */ "BLOB", + /* 110 */ "VARBINARY", + /* 111 */ "DECIMAL", + /* 112 */ "DELAY", + /* 113 */ "FILE_FACTOR", + /* 114 */ "NK_FLOAT", + /* 115 */ "ROLLUP", + /* 116 */ "TTL", + /* 117 */ "SMA", + /* 118 */ "SHOW", + /* 119 */ "DATABASES", + /* 120 */ "TABLES", + /* 121 */ "STABLES", + /* 122 */ "MNODES", + /* 123 */ "MODULES", + /* 124 */ "QNODES", + /* 125 */ "FUNCTIONS", + /* 126 */ "INDEXES", + /* 127 */ "ACCOUNTS", + /* 128 */ "APPS", + /* 129 */ "CONNECTIONS", + /* 130 */ "LICENCE", + /* 131 */ "GRANTS", + /* 132 */ "QUERIES", + /* 133 */ "SCORES", + /* 134 */ "TOPICS", + /* 135 */ "VARIABLES", + /* 136 */ "BNODES", + /* 137 */ "SNODES", + /* 138 */ "CLUSTER", + /* 139 */ "TRANSACTIONS", + /* 140 */ "LIKE", + /* 141 */ "INDEX", + /* 142 */ "FULLTEXT", + /* 143 */ "FUNCTION", + /* 144 */ "INTERVAL", + /* 145 */ "TOPIC", + /* 146 */ "AS", + /* 147 */ "CGROUP", + /* 148 */ "WITH", + /* 149 */ "SCHEMA", + /* 150 */ "DESC", + /* 151 */ "DESCRIBE", + /* 152 */ "RESET", + /* 153 */ "QUERY", + /* 154 */ "CACHE", + /* 155 */ "EXPLAIN", + /* 156 */ "ANALYZE", + /* 157 */ "VERBOSE", + /* 158 */ "NK_BOOL", + /* 159 */ "RATIO", + /* 160 */ "COMPACT", + /* 161 */ "VNODES", + /* 162 */ "IN", + /* 163 */ "OUTPUTTYPE", + /* 164 */ "AGGREGATE", + /* 165 */ "BUFSIZE", + /* 166 */ "STREAM", + /* 167 */ "INTO", + /* 168 */ "TRIGGER", + /* 169 */ "AT_ONCE", + /* 170 */ "WINDOW_CLOSE", + /* 171 */ "WATERMARK", + /* 172 */ "KILL", + /* 173 */ "CONNECTION", + /* 174 */ "TRANSACTION", + /* 175 */ "MERGE", + /* 176 */ "VGROUP", + /* 177 */ "REDISTRIBUTE", + /* 178 */ "SPLIT", + /* 179 */ "SYNCDB", + /* 180 */ "NULL", + /* 181 */ "NK_QUESTION", + /* 182 */ "NK_ARROW", + /* 183 */ "ROWTS", + /* 184 */ "TBNAME", + /* 185 */ "QSTARTTS", + /* 186 */ "QENDTS", + /* 187 */ "WSTARTTS", + /* 188 */ "WENDTS", + /* 189 */ "WDURATION", + /* 190 */ "CAST", + /* 191 */ "NOW", + /* 192 */ "TODAY", + /* 193 */ "TIMEZONE", + /* 194 */ "COUNT", + /* 195 */ "FIRST", + /* 196 */ "LAST", + /* 197 */ "LAST_ROW", + /* 198 */ "BETWEEN", + /* 199 */ "IS", + /* 200 */ "NK_LT", + /* 201 */ "NK_GT", + /* 202 */ "NK_LE", + /* 203 */ "NK_GE", + /* 204 */ "NK_NE", + /* 205 */ "MATCH", + /* 206 */ "NMATCH", + /* 207 */ "CONTAINS", + /* 208 */ "JOIN", + /* 209 */ "INNER", + /* 210 */ "SELECT", + /* 211 */ "DISTINCT", + /* 212 */ "WHERE", + /* 213 */ "PARTITION", + /* 214 */ "BY", + /* 215 */ "SESSION", + /* 216 */ "STATE_WINDOW", + /* 217 */ "SLIDING", + /* 218 */ "FILL", + /* 219 */ "VALUE", + /* 220 */ "NONE", + /* 221 */ "PREV", + /* 222 */ "LINEAR", + /* 223 */ "NEXT", + /* 224 */ "GROUP", + /* 225 */ "HAVING", + /* 226 */ "ORDER", + /* 227 */ "SLIMIT", + /* 228 */ "SOFFSET", + /* 229 */ "LIMIT", + /* 230 */ "OFFSET", + /* 231 */ "ASC", + /* 232 */ "NULLS", + /* 233 */ "ID", + /* 234 */ "NK_BITNOT", + /* 235 */ "INSERT", + /* 236 */ "VALUES", + /* 237 */ "IMPORT", + /* 238 */ "NK_SEMI", + /* 239 */ "FILE", + /* 240 */ "cmd", + /* 241 */ "account_options", + /* 242 */ "alter_account_options", + /* 243 */ "literal", + /* 244 */ "alter_account_option", + /* 245 */ "user_name", + /* 246 */ "privileges", + /* 247 */ "priv_level", + /* 248 */ "priv_type_list", + /* 249 */ "priv_type", + /* 250 */ "db_name", + /* 251 */ "dnode_endpoint", + /* 252 */ "dnode_host_name", + /* 253 */ "not_exists_opt", + /* 254 */ "db_options", + /* 255 */ "exists_opt", + /* 256 */ "alter_db_options", + /* 257 */ "integer_list", + /* 258 */ "variable_list", + /* 259 */ "retention_list", + /* 260 */ "alter_db_option", + /* 261 */ "retention", + /* 262 */ "full_table_name", + /* 263 */ "column_def_list", + /* 264 */ "tags_def_opt", + /* 265 */ "table_options", + /* 266 */ "multi_create_clause", + /* 267 */ "tags_def", + /* 268 */ "multi_drop_clause", + /* 269 */ "alter_table_clause", + /* 270 */ "alter_table_options", + /* 271 */ "column_name", + /* 272 */ "type_name", + /* 273 */ "signed_literal", + /* 274 */ "create_subtable_clause", + /* 275 */ "specific_tags_opt", + /* 276 */ "literal_list", + /* 277 */ "drop_table_clause", + /* 278 */ "col_name_list", + /* 279 */ "table_name", + /* 280 */ "column_def", + /* 281 */ "func_name_list", + /* 282 */ "alter_table_option", + /* 283 */ "col_name", + /* 284 */ "db_name_cond_opt", + /* 285 */ "like_pattern_opt", + /* 286 */ "table_name_cond", + /* 287 */ "from_db_opt", + /* 288 */ "func_name", + /* 289 */ "function_name", + /* 290 */ "index_name", + /* 291 */ "index_options", + /* 292 */ "func_list", + /* 293 */ "duration_literal", + /* 294 */ "sliding_opt", + /* 295 */ "func", + /* 296 */ "expression_list", + /* 297 */ "topic_name", + /* 298 */ "topic_options", + /* 299 */ "query_expression", + /* 300 */ "cgroup_name", + /* 301 */ "analyze_opt", + /* 302 */ "explain_options", + /* 303 */ "agg_func_opt", + /* 304 */ "bufsize_opt", + /* 305 */ "stream_name", + /* 306 */ "stream_options", + /* 307 */ "into_opt", + /* 308 */ "dnode_list", + /* 309 */ "signed", + /* 310 */ "literal_func", + /* 311 */ "table_alias", + /* 312 */ "column_alias", + /* 313 */ "expression", + /* 314 */ "pseudo_column", + /* 315 */ "column_reference", + /* 316 */ "function_expression", + /* 317 */ "subquery", + /* 318 */ "star_func", + /* 319 */ "star_func_para_list", + /* 320 */ "noarg_func", + /* 321 */ "other_para_list", + /* 322 */ "star_func_para", + /* 323 */ "predicate", + /* 324 */ "compare_op", + /* 325 */ "in_op", + /* 326 */ "in_predicate_value", + /* 327 */ "boolean_value_expression", + /* 328 */ "boolean_primary", + /* 329 */ "common_expression", + /* 330 */ "from_clause", + /* 331 */ "table_reference_list", + /* 332 */ "table_reference", + /* 333 */ "table_primary", + /* 334 */ "joined_table", + /* 335 */ "alias_opt", + /* 336 */ "parenthesized_joined_table", + /* 337 */ "join_type", + /* 338 */ "search_condition", + /* 339 */ "query_specification", + /* 340 */ "set_quantifier_opt", + /* 341 */ "select_list", + /* 342 */ "where_clause_opt", + /* 343 */ "partition_by_clause_opt", + /* 344 */ "twindow_clause_opt", + /* 345 */ "group_by_clause_opt", + /* 346 */ "having_clause_opt", + /* 347 */ "select_sublist", + /* 348 */ "select_item", + /* 349 */ "fill_opt", + /* 350 */ "fill_mode", + /* 351 */ "group_by_list", + /* 352 */ "query_expression_body", + /* 353 */ "order_by_clause_opt", + /* 354 */ "slimit_clause_opt", + /* 355 */ "limit_clause_opt", + /* 356 */ "query_primary", + /* 357 */ "sort_specification_list", + /* 358 */ "sort_specification", + /* 359 */ "ordering_specification_opt", + /* 360 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1602,371 +1610,374 @@ static const char *const yyRuleName[] = { /* 84 */ "db_options ::= db_options VGROUPS NK_INTEGER", /* 85 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", /* 86 */ "db_options ::= db_options RETENTIONS retention_list", - /* 87 */ "alter_db_options ::= alter_db_option", - /* 88 */ "alter_db_options ::= alter_db_options alter_db_option", - /* 89 */ "alter_db_option ::= BUFFER NK_INTEGER", - /* 90 */ "alter_db_option ::= CACHELAST NK_INTEGER", - /* 91 */ "alter_db_option ::= FSYNC NK_INTEGER", - /* 92 */ "alter_db_option ::= KEEP integer_list", - /* 93 */ "alter_db_option ::= KEEP variable_list", - /* 94 */ "alter_db_option ::= PAGES NK_INTEGER", - /* 95 */ "alter_db_option ::= REPLICA NK_INTEGER", - /* 96 */ "alter_db_option ::= STRICT NK_INTEGER", - /* 97 */ "alter_db_option ::= WAL NK_INTEGER", - /* 98 */ "integer_list ::= NK_INTEGER", - /* 99 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", - /* 100 */ "variable_list ::= NK_VARIABLE", - /* 101 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", - /* 102 */ "retention_list ::= retention", - /* 103 */ "retention_list ::= retention_list NK_COMMA retention", - /* 104 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", - /* 105 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 106 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 107 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 108 */ "cmd ::= DROP TABLE multi_drop_clause", - /* 109 */ "cmd ::= DROP STABLE exists_opt full_table_name", - /* 110 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 111 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 112 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 113 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", - /* 114 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 115 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 116 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 117 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 118 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 119 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 120 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 121 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", - /* 122 */ "multi_create_clause ::= create_subtable_clause", - /* 123 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 124 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options", - /* 125 */ "multi_drop_clause ::= drop_table_clause", - /* 126 */ "multi_drop_clause ::= multi_drop_clause drop_table_clause", - /* 127 */ "drop_table_clause ::= exists_opt full_table_name", - /* 128 */ "specific_tags_opt ::=", - /* 129 */ "specific_tags_opt ::= NK_LP col_name_list NK_RP", - /* 130 */ "full_table_name ::= table_name", - /* 131 */ "full_table_name ::= db_name NK_DOT table_name", - /* 132 */ "column_def_list ::= column_def", - /* 133 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 134 */ "column_def ::= column_name type_name", - /* 135 */ "column_def ::= column_name type_name COMMENT NK_STRING", - /* 136 */ "type_name ::= BOOL", - /* 137 */ "type_name ::= TINYINT", - /* 138 */ "type_name ::= SMALLINT", - /* 139 */ "type_name ::= INT", - /* 140 */ "type_name ::= INTEGER", - /* 141 */ "type_name ::= BIGINT", - /* 142 */ "type_name ::= FLOAT", - /* 143 */ "type_name ::= DOUBLE", - /* 144 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 145 */ "type_name ::= TIMESTAMP", - /* 146 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 147 */ "type_name ::= TINYINT UNSIGNED", - /* 148 */ "type_name ::= SMALLINT UNSIGNED", - /* 149 */ "type_name ::= INT UNSIGNED", - /* 150 */ "type_name ::= BIGINT UNSIGNED", - /* 151 */ "type_name ::= JSON", - /* 152 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 153 */ "type_name ::= MEDIUMBLOB", - /* 154 */ "type_name ::= BLOB", - /* 155 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 156 */ "type_name ::= DECIMAL", - /* 157 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 158 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 159 */ "tags_def_opt ::=", - /* 160 */ "tags_def_opt ::= tags_def", - /* 161 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", - /* 162 */ "table_options ::=", - /* 163 */ "table_options ::= table_options COMMENT NK_STRING", - /* 164 */ "table_options ::= table_options DELAY NK_INTEGER", - /* 165 */ "table_options ::= table_options FILE_FACTOR NK_FLOAT", - /* 166 */ "table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP", - /* 167 */ "table_options ::= table_options TTL NK_INTEGER", - /* 168 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 169 */ "alter_table_options ::= alter_table_option", - /* 170 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 171 */ "alter_table_option ::= COMMENT NK_STRING", - /* 172 */ "alter_table_option ::= TTL NK_INTEGER", - /* 173 */ "col_name_list ::= col_name", - /* 174 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 175 */ "col_name ::= column_name", - /* 176 */ "cmd ::= SHOW DNODES", - /* 177 */ "cmd ::= SHOW USERS", - /* 178 */ "cmd ::= SHOW DATABASES", - /* 179 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", - /* 180 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 181 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 182 */ "cmd ::= SHOW MNODES", - /* 183 */ "cmd ::= SHOW MODULES", - /* 184 */ "cmd ::= SHOW QNODES", - /* 185 */ "cmd ::= SHOW FUNCTIONS", - /* 186 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 187 */ "cmd ::= SHOW STREAMS", - /* 188 */ "cmd ::= SHOW ACCOUNTS", - /* 189 */ "cmd ::= SHOW APPS", - /* 190 */ "cmd ::= SHOW CONNECTIONS", - /* 191 */ "cmd ::= SHOW LICENCE", - /* 192 */ "cmd ::= SHOW GRANTS", - /* 193 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 194 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 195 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 196 */ "cmd ::= SHOW QUERIES", - /* 197 */ "cmd ::= SHOW SCORES", - /* 198 */ "cmd ::= SHOW TOPICS", - /* 199 */ "cmd ::= SHOW VARIABLES", - /* 200 */ "cmd ::= SHOW BNODES", - /* 201 */ "cmd ::= SHOW SNODES", - /* 202 */ "cmd ::= SHOW CLUSTER", - /* 203 */ "cmd ::= SHOW TRANSACTIONS", - /* 204 */ "db_name_cond_opt ::=", - /* 205 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 206 */ "like_pattern_opt ::=", - /* 207 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 208 */ "table_name_cond ::= table_name", - /* 209 */ "from_db_opt ::=", - /* 210 */ "from_db_opt ::= FROM db_name", - /* 211 */ "func_name_list ::= func_name", - /* 212 */ "func_name_list ::= func_name_list NK_COMMA func_name", - /* 213 */ "func_name ::= function_name", - /* 214 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options", - /* 215 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP", - /* 216 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name", - /* 217 */ "index_options ::=", - /* 218 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt", - /* 219 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt", - /* 220 */ "func_list ::= func", - /* 221 */ "func_list ::= func_list NK_COMMA func", - /* 222 */ "func ::= function_name NK_LP expression_list NK_RP", - /* 223 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression", - /* 224 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name", - /* 225 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 226 */ "topic_options ::=", - /* 227 */ "topic_options ::= topic_options WITH TABLE", - /* 228 */ "topic_options ::= topic_options WITH SCHEMA", - /* 229 */ "topic_options ::= topic_options WITH TAG", - /* 230 */ "cmd ::= DESC full_table_name", - /* 231 */ "cmd ::= DESCRIBE full_table_name", - /* 232 */ "cmd ::= RESET QUERY CACHE", - /* 233 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", - /* 234 */ "analyze_opt ::=", - /* 235 */ "analyze_opt ::= ANALYZE", - /* 236 */ "explain_options ::=", - /* 237 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 238 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 239 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", - /* 240 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 241 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 242 */ "agg_func_opt ::=", - /* 243 */ "agg_func_opt ::= AGGREGATE", - /* 244 */ "bufsize_opt ::=", - /* 245 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 246 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", - /* 247 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 248 */ "into_opt ::=", - /* 249 */ "into_opt ::= INTO full_table_name", - /* 250 */ "stream_options ::=", - /* 251 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 252 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 253 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 254 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 255 */ "cmd ::= KILL QUERY NK_INTEGER", - /* 256 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 257 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 258 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 259 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 260 */ "dnode_list ::= DNODE NK_INTEGER", - /* 261 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 262 */ "cmd ::= SYNCDB db_name REPLICA", - /* 263 */ "cmd ::= query_expression", - /* 264 */ "literal ::= NK_INTEGER", - /* 265 */ "literal ::= NK_FLOAT", - /* 266 */ "literal ::= NK_STRING", - /* 267 */ "literal ::= NK_BOOL", - /* 268 */ "literal ::= TIMESTAMP NK_STRING", - /* 269 */ "literal ::= duration_literal", - /* 270 */ "literal ::= NULL", - /* 271 */ "literal ::= NK_QUESTION", - /* 272 */ "duration_literal ::= NK_VARIABLE", - /* 273 */ "signed ::= NK_INTEGER", - /* 274 */ "signed ::= NK_PLUS NK_INTEGER", - /* 275 */ "signed ::= NK_MINUS NK_INTEGER", - /* 276 */ "signed ::= NK_FLOAT", - /* 277 */ "signed ::= NK_PLUS NK_FLOAT", - /* 278 */ "signed ::= NK_MINUS NK_FLOAT", - /* 279 */ "signed_literal ::= signed", - /* 280 */ "signed_literal ::= NK_STRING", - /* 281 */ "signed_literal ::= NK_BOOL", - /* 282 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 283 */ "signed_literal ::= duration_literal", - /* 284 */ "signed_literal ::= NULL", - /* 285 */ "signed_literal ::= literal_func", - /* 286 */ "literal_list ::= signed_literal", - /* 287 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 288 */ "db_name ::= NK_ID", - /* 289 */ "table_name ::= NK_ID", - /* 290 */ "column_name ::= NK_ID", - /* 291 */ "function_name ::= NK_ID", - /* 292 */ "table_alias ::= NK_ID", - /* 293 */ "column_alias ::= NK_ID", - /* 294 */ "user_name ::= NK_ID", - /* 295 */ "index_name ::= NK_ID", - /* 296 */ "topic_name ::= NK_ID", - /* 297 */ "stream_name ::= NK_ID", - /* 298 */ "expression ::= literal", - /* 299 */ "expression ::= pseudo_column", - /* 300 */ "expression ::= column_reference", - /* 301 */ "expression ::= function_expression", - /* 302 */ "expression ::= subquery", - /* 303 */ "expression ::= NK_LP expression NK_RP", - /* 304 */ "expression ::= NK_PLUS expression", - /* 305 */ "expression ::= NK_MINUS expression", - /* 306 */ "expression ::= expression NK_PLUS expression", - /* 307 */ "expression ::= expression NK_MINUS expression", - /* 308 */ "expression ::= expression NK_STAR expression", - /* 309 */ "expression ::= expression NK_SLASH expression", - /* 310 */ "expression ::= expression NK_REM expression", - /* 311 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 312 */ "expression_list ::= expression", - /* 313 */ "expression_list ::= expression_list NK_COMMA expression", - /* 314 */ "column_reference ::= column_name", - /* 315 */ "column_reference ::= table_name NK_DOT column_name", - /* 316 */ "pseudo_column ::= ROWTS", - /* 317 */ "pseudo_column ::= TBNAME", - /* 318 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 319 */ "pseudo_column ::= QSTARTTS", - /* 320 */ "pseudo_column ::= QENDTS", - /* 321 */ "pseudo_column ::= WSTARTTS", - /* 322 */ "pseudo_column ::= WENDTS", - /* 323 */ "pseudo_column ::= WDURATION", - /* 324 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 325 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 326 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", - /* 327 */ "function_expression ::= literal_func", - /* 328 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 329 */ "literal_func ::= NOW", - /* 330 */ "noarg_func ::= NOW", - /* 331 */ "noarg_func ::= TODAY", - /* 332 */ "noarg_func ::= TIMEZONE", - /* 333 */ "star_func ::= COUNT", - /* 334 */ "star_func ::= FIRST", - /* 335 */ "star_func ::= LAST", - /* 336 */ "star_func ::= LAST_ROW", - /* 337 */ "star_func_para_list ::= NK_STAR", - /* 338 */ "star_func_para_list ::= other_para_list", - /* 339 */ "other_para_list ::= star_func_para", - /* 340 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 341 */ "star_func_para ::= expression", - /* 342 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 343 */ "predicate ::= expression compare_op expression", - /* 344 */ "predicate ::= expression BETWEEN expression AND expression", - /* 345 */ "predicate ::= expression NOT BETWEEN expression AND expression", - /* 346 */ "predicate ::= expression IS NULL", - /* 347 */ "predicate ::= expression IS NOT NULL", - /* 348 */ "predicate ::= expression in_op in_predicate_value", - /* 349 */ "compare_op ::= NK_LT", - /* 350 */ "compare_op ::= NK_GT", - /* 351 */ "compare_op ::= NK_LE", - /* 352 */ "compare_op ::= NK_GE", - /* 353 */ "compare_op ::= NK_NE", - /* 354 */ "compare_op ::= NK_EQ", - /* 355 */ "compare_op ::= LIKE", - /* 356 */ "compare_op ::= NOT LIKE", - /* 357 */ "compare_op ::= MATCH", - /* 358 */ "compare_op ::= NMATCH", - /* 359 */ "compare_op ::= CONTAINS", - /* 360 */ "in_op ::= IN", - /* 361 */ "in_op ::= NOT IN", - /* 362 */ "in_predicate_value ::= NK_LP expression_list NK_RP", - /* 363 */ "boolean_value_expression ::= boolean_primary", - /* 364 */ "boolean_value_expression ::= NOT boolean_primary", - /* 365 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 366 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 367 */ "boolean_primary ::= predicate", - /* 368 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 369 */ "common_expression ::= expression", - /* 370 */ "common_expression ::= boolean_value_expression", - /* 371 */ "from_clause ::= FROM table_reference_list", - /* 372 */ "table_reference_list ::= table_reference", - /* 373 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 374 */ "table_reference ::= table_primary", - /* 375 */ "table_reference ::= joined_table", - /* 376 */ "table_primary ::= table_name alias_opt", - /* 377 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 378 */ "table_primary ::= subquery alias_opt", - /* 379 */ "table_primary ::= parenthesized_joined_table", - /* 380 */ "alias_opt ::=", - /* 381 */ "alias_opt ::= table_alias", - /* 382 */ "alias_opt ::= AS table_alias", - /* 383 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 384 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 385 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 386 */ "join_type ::=", - /* 387 */ "join_type ::= INNER", - /* 388 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 389 */ "set_quantifier_opt ::=", - /* 390 */ "set_quantifier_opt ::= DISTINCT", - /* 391 */ "set_quantifier_opt ::= ALL", - /* 392 */ "select_list ::= NK_STAR", - /* 393 */ "select_list ::= select_sublist", - /* 394 */ "select_sublist ::= select_item", - /* 395 */ "select_sublist ::= select_sublist NK_COMMA select_item", - /* 396 */ "select_item ::= common_expression", - /* 397 */ "select_item ::= common_expression column_alias", - /* 398 */ "select_item ::= common_expression AS column_alias", - /* 399 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 400 */ "where_clause_opt ::=", - /* 401 */ "where_clause_opt ::= WHERE search_condition", - /* 402 */ "partition_by_clause_opt ::=", - /* 403 */ "partition_by_clause_opt ::= PARTITION BY expression_list", - /* 404 */ "twindow_clause_opt ::=", - /* 405 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 406 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", - /* 407 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 408 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 409 */ "sliding_opt ::=", - /* 410 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 411 */ "fill_opt ::=", - /* 412 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 413 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 414 */ "fill_mode ::= NONE", - /* 415 */ "fill_mode ::= PREV", - /* 416 */ "fill_mode ::= NULL", - /* 417 */ "fill_mode ::= LINEAR", - /* 418 */ "fill_mode ::= NEXT", - /* 419 */ "group_by_clause_opt ::=", - /* 420 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 421 */ "group_by_list ::= expression", - /* 422 */ "group_by_list ::= group_by_list NK_COMMA expression", - /* 423 */ "having_clause_opt ::=", - /* 424 */ "having_clause_opt ::= HAVING search_condition", - /* 425 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 426 */ "query_expression_body ::= query_primary", - /* 427 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", - /* 428 */ "query_expression_body ::= query_expression_body UNION query_expression_body", - /* 429 */ "query_primary ::= query_specification", - /* 430 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP", - /* 431 */ "order_by_clause_opt ::=", - /* 432 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 433 */ "slimit_clause_opt ::=", - /* 434 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 435 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 436 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 437 */ "limit_clause_opt ::=", - /* 438 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 439 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 440 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 441 */ "subquery ::= NK_LP query_expression NK_RP", - /* 442 */ "search_condition ::= common_expression", - /* 443 */ "sort_specification_list ::= sort_specification", - /* 444 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 445 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", - /* 446 */ "ordering_specification_opt ::=", - /* 447 */ "ordering_specification_opt ::= ASC", - /* 448 */ "ordering_specification_opt ::= DESC", - /* 449 */ "null_ordering_opt ::=", - /* 450 */ "null_ordering_opt ::= NULLS FIRST", - /* 451 */ "null_ordering_opt ::= NULLS LAST", + /* 87 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", + /* 88 */ "alter_db_options ::= alter_db_option", + /* 89 */ "alter_db_options ::= alter_db_options alter_db_option", + /* 90 */ "alter_db_option ::= BUFFER NK_INTEGER", + /* 91 */ "alter_db_option ::= CACHELAST NK_INTEGER", + /* 92 */ "alter_db_option ::= FSYNC NK_INTEGER", + /* 93 */ "alter_db_option ::= KEEP integer_list", + /* 94 */ "alter_db_option ::= KEEP variable_list", + /* 95 */ "alter_db_option ::= PAGES NK_INTEGER", + /* 96 */ "alter_db_option ::= REPLICA NK_INTEGER", + /* 97 */ "alter_db_option ::= STRICT NK_INTEGER", + /* 98 */ "alter_db_option ::= WAL NK_INTEGER", + /* 99 */ "integer_list ::= NK_INTEGER", + /* 100 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", + /* 101 */ "variable_list ::= NK_VARIABLE", + /* 102 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", + /* 103 */ "retention_list ::= retention", + /* 104 */ "retention_list ::= retention_list NK_COMMA retention", + /* 105 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", + /* 106 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 107 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 108 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 109 */ "cmd ::= DROP TABLE multi_drop_clause", + /* 110 */ "cmd ::= DROP STABLE exists_opt full_table_name", + /* 111 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 112 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 113 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 114 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", + /* 115 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 116 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 117 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 118 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 119 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 120 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 121 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 122 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", + /* 123 */ "multi_create_clause ::= create_subtable_clause", + /* 124 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 125 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options", + /* 126 */ "multi_drop_clause ::= drop_table_clause", + /* 127 */ "multi_drop_clause ::= multi_drop_clause drop_table_clause", + /* 128 */ "drop_table_clause ::= exists_opt full_table_name", + /* 129 */ "specific_tags_opt ::=", + /* 130 */ "specific_tags_opt ::= NK_LP col_name_list NK_RP", + /* 131 */ "full_table_name ::= table_name", + /* 132 */ "full_table_name ::= db_name NK_DOT table_name", + /* 133 */ "column_def_list ::= column_def", + /* 134 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 135 */ "column_def ::= column_name type_name", + /* 136 */ "column_def ::= column_name type_name COMMENT NK_STRING", + /* 137 */ "type_name ::= BOOL", + /* 138 */ "type_name ::= TINYINT", + /* 139 */ "type_name ::= SMALLINT", + /* 140 */ "type_name ::= INT", + /* 141 */ "type_name ::= INTEGER", + /* 142 */ "type_name ::= BIGINT", + /* 143 */ "type_name ::= FLOAT", + /* 144 */ "type_name ::= DOUBLE", + /* 145 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 146 */ "type_name ::= TIMESTAMP", + /* 147 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 148 */ "type_name ::= TINYINT UNSIGNED", + /* 149 */ "type_name ::= SMALLINT UNSIGNED", + /* 150 */ "type_name ::= INT UNSIGNED", + /* 151 */ "type_name ::= BIGINT UNSIGNED", + /* 152 */ "type_name ::= JSON", + /* 153 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 154 */ "type_name ::= MEDIUMBLOB", + /* 155 */ "type_name ::= BLOB", + /* 156 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 157 */ "type_name ::= DECIMAL", + /* 158 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 159 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 160 */ "tags_def_opt ::=", + /* 161 */ "tags_def_opt ::= tags_def", + /* 162 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", + /* 163 */ "table_options ::=", + /* 164 */ "table_options ::= table_options COMMENT NK_STRING", + /* 165 */ "table_options ::= table_options DELAY NK_INTEGER", + /* 166 */ "table_options ::= table_options FILE_FACTOR NK_FLOAT", + /* 167 */ "table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP", + /* 168 */ "table_options ::= table_options TTL NK_INTEGER", + /* 169 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 170 */ "alter_table_options ::= alter_table_option", + /* 171 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 172 */ "alter_table_option ::= COMMENT NK_STRING", + /* 173 */ "alter_table_option ::= TTL NK_INTEGER", + /* 174 */ "col_name_list ::= col_name", + /* 175 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 176 */ "col_name ::= column_name", + /* 177 */ "cmd ::= SHOW DNODES", + /* 178 */ "cmd ::= SHOW USERS", + /* 179 */ "cmd ::= SHOW DATABASES", + /* 180 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", + /* 181 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 182 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 183 */ "cmd ::= SHOW MNODES", + /* 184 */ "cmd ::= SHOW MODULES", + /* 185 */ "cmd ::= SHOW QNODES", + /* 186 */ "cmd ::= SHOW FUNCTIONS", + /* 187 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 188 */ "cmd ::= SHOW STREAMS", + /* 189 */ "cmd ::= SHOW ACCOUNTS", + /* 190 */ "cmd ::= SHOW APPS", + /* 191 */ "cmd ::= SHOW CONNECTIONS", + /* 192 */ "cmd ::= SHOW LICENCE", + /* 193 */ "cmd ::= SHOW GRANTS", + /* 194 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 195 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 196 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 197 */ "cmd ::= SHOW QUERIES", + /* 198 */ "cmd ::= SHOW SCORES", + /* 199 */ "cmd ::= SHOW TOPICS", + /* 200 */ "cmd ::= SHOW VARIABLES", + /* 201 */ "cmd ::= SHOW BNODES", + /* 202 */ "cmd ::= SHOW SNODES", + /* 203 */ "cmd ::= SHOW CLUSTER", + /* 204 */ "cmd ::= SHOW TRANSACTIONS", + /* 205 */ "db_name_cond_opt ::=", + /* 206 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 207 */ "like_pattern_opt ::=", + /* 208 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 209 */ "table_name_cond ::= table_name", + /* 210 */ "from_db_opt ::=", + /* 211 */ "from_db_opt ::= FROM db_name", + /* 212 */ "func_name_list ::= func_name", + /* 213 */ "func_name_list ::= func_name_list NK_COMMA func_name", + /* 214 */ "func_name ::= function_name", + /* 215 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options", + /* 216 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP", + /* 217 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name", + /* 218 */ "index_options ::=", + /* 219 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt", + /* 220 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt", + /* 221 */ "func_list ::= func", + /* 222 */ "func_list ::= func_list NK_COMMA func", + /* 223 */ "func ::= function_name NK_LP expression_list NK_RP", + /* 224 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression", + /* 225 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name", + /* 226 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 227 */ "cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name", + /* 228 */ "topic_options ::=", + /* 229 */ "topic_options ::= topic_options WITH TABLE", + /* 230 */ "topic_options ::= topic_options WITH SCHEMA", + /* 231 */ "topic_options ::= topic_options WITH TAG", + /* 232 */ "cmd ::= DESC full_table_name", + /* 233 */ "cmd ::= DESCRIBE full_table_name", + /* 234 */ "cmd ::= RESET QUERY CACHE", + /* 235 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", + /* 236 */ "analyze_opt ::=", + /* 237 */ "analyze_opt ::= ANALYZE", + /* 238 */ "explain_options ::=", + /* 239 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 240 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 241 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", + /* 242 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 243 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 244 */ "agg_func_opt ::=", + /* 245 */ "agg_func_opt ::= AGGREGATE", + /* 246 */ "bufsize_opt ::=", + /* 247 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 248 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", + /* 249 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 250 */ "into_opt ::=", + /* 251 */ "into_opt ::= INTO full_table_name", + /* 252 */ "stream_options ::=", + /* 253 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 254 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 255 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 256 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 257 */ "cmd ::= KILL QUERY NK_INTEGER", + /* 258 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 259 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 260 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 261 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 262 */ "dnode_list ::= DNODE NK_INTEGER", + /* 263 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 264 */ "cmd ::= SYNCDB db_name REPLICA", + /* 265 */ "cmd ::= query_expression", + /* 266 */ "literal ::= NK_INTEGER", + /* 267 */ "literal ::= NK_FLOAT", + /* 268 */ "literal ::= NK_STRING", + /* 269 */ "literal ::= NK_BOOL", + /* 270 */ "literal ::= TIMESTAMP NK_STRING", + /* 271 */ "literal ::= duration_literal", + /* 272 */ "literal ::= NULL", + /* 273 */ "literal ::= NK_QUESTION", + /* 274 */ "duration_literal ::= NK_VARIABLE", + /* 275 */ "signed ::= NK_INTEGER", + /* 276 */ "signed ::= NK_PLUS NK_INTEGER", + /* 277 */ "signed ::= NK_MINUS NK_INTEGER", + /* 278 */ "signed ::= NK_FLOAT", + /* 279 */ "signed ::= NK_PLUS NK_FLOAT", + /* 280 */ "signed ::= NK_MINUS NK_FLOAT", + /* 281 */ "signed_literal ::= signed", + /* 282 */ "signed_literal ::= NK_STRING", + /* 283 */ "signed_literal ::= NK_BOOL", + /* 284 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 285 */ "signed_literal ::= duration_literal", + /* 286 */ "signed_literal ::= NULL", + /* 287 */ "signed_literal ::= literal_func", + /* 288 */ "literal_list ::= signed_literal", + /* 289 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 290 */ "db_name ::= NK_ID", + /* 291 */ "table_name ::= NK_ID", + /* 292 */ "column_name ::= NK_ID", + /* 293 */ "function_name ::= NK_ID", + /* 294 */ "table_alias ::= NK_ID", + /* 295 */ "column_alias ::= NK_ID", + /* 296 */ "user_name ::= NK_ID", + /* 297 */ "index_name ::= NK_ID", + /* 298 */ "topic_name ::= NK_ID", + /* 299 */ "stream_name ::= NK_ID", + /* 300 */ "cgroup_name ::= NK_ID", + /* 301 */ "expression ::= literal", + /* 302 */ "expression ::= pseudo_column", + /* 303 */ "expression ::= column_reference", + /* 304 */ "expression ::= function_expression", + /* 305 */ "expression ::= subquery", + /* 306 */ "expression ::= NK_LP expression NK_RP", + /* 307 */ "expression ::= NK_PLUS expression", + /* 308 */ "expression ::= NK_MINUS expression", + /* 309 */ "expression ::= expression NK_PLUS expression", + /* 310 */ "expression ::= expression NK_MINUS expression", + /* 311 */ "expression ::= expression NK_STAR expression", + /* 312 */ "expression ::= expression NK_SLASH expression", + /* 313 */ "expression ::= expression NK_REM expression", + /* 314 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 315 */ "expression_list ::= expression", + /* 316 */ "expression_list ::= expression_list NK_COMMA expression", + /* 317 */ "column_reference ::= column_name", + /* 318 */ "column_reference ::= table_name NK_DOT column_name", + /* 319 */ "pseudo_column ::= ROWTS", + /* 320 */ "pseudo_column ::= TBNAME", + /* 321 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 322 */ "pseudo_column ::= QSTARTTS", + /* 323 */ "pseudo_column ::= QENDTS", + /* 324 */ "pseudo_column ::= WSTARTTS", + /* 325 */ "pseudo_column ::= WENDTS", + /* 326 */ "pseudo_column ::= WDURATION", + /* 327 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 328 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 329 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", + /* 330 */ "function_expression ::= literal_func", + /* 331 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 332 */ "literal_func ::= NOW", + /* 333 */ "noarg_func ::= NOW", + /* 334 */ "noarg_func ::= TODAY", + /* 335 */ "noarg_func ::= TIMEZONE", + /* 336 */ "star_func ::= COUNT", + /* 337 */ "star_func ::= FIRST", + /* 338 */ "star_func ::= LAST", + /* 339 */ "star_func ::= LAST_ROW", + /* 340 */ "star_func_para_list ::= NK_STAR", + /* 341 */ "star_func_para_list ::= other_para_list", + /* 342 */ "other_para_list ::= star_func_para", + /* 343 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 344 */ "star_func_para ::= expression", + /* 345 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 346 */ "predicate ::= expression compare_op expression", + /* 347 */ "predicate ::= expression BETWEEN expression AND expression", + /* 348 */ "predicate ::= expression NOT BETWEEN expression AND expression", + /* 349 */ "predicate ::= expression IS NULL", + /* 350 */ "predicate ::= expression IS NOT NULL", + /* 351 */ "predicate ::= expression in_op in_predicate_value", + /* 352 */ "compare_op ::= NK_LT", + /* 353 */ "compare_op ::= NK_GT", + /* 354 */ "compare_op ::= NK_LE", + /* 355 */ "compare_op ::= NK_GE", + /* 356 */ "compare_op ::= NK_NE", + /* 357 */ "compare_op ::= NK_EQ", + /* 358 */ "compare_op ::= LIKE", + /* 359 */ "compare_op ::= NOT LIKE", + /* 360 */ "compare_op ::= MATCH", + /* 361 */ "compare_op ::= NMATCH", + /* 362 */ "compare_op ::= CONTAINS", + /* 363 */ "in_op ::= IN", + /* 364 */ "in_op ::= NOT IN", + /* 365 */ "in_predicate_value ::= NK_LP expression_list NK_RP", + /* 366 */ "boolean_value_expression ::= boolean_primary", + /* 367 */ "boolean_value_expression ::= NOT boolean_primary", + /* 368 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 369 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 370 */ "boolean_primary ::= predicate", + /* 371 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 372 */ "common_expression ::= expression", + /* 373 */ "common_expression ::= boolean_value_expression", + /* 374 */ "from_clause ::= FROM table_reference_list", + /* 375 */ "table_reference_list ::= table_reference", + /* 376 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 377 */ "table_reference ::= table_primary", + /* 378 */ "table_reference ::= joined_table", + /* 379 */ "table_primary ::= table_name alias_opt", + /* 380 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 381 */ "table_primary ::= subquery alias_opt", + /* 382 */ "table_primary ::= parenthesized_joined_table", + /* 383 */ "alias_opt ::=", + /* 384 */ "alias_opt ::= table_alias", + /* 385 */ "alias_opt ::= AS table_alias", + /* 386 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 387 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 388 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 389 */ "join_type ::=", + /* 390 */ "join_type ::= INNER", + /* 391 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 392 */ "set_quantifier_opt ::=", + /* 393 */ "set_quantifier_opt ::= DISTINCT", + /* 394 */ "set_quantifier_opt ::= ALL", + /* 395 */ "select_list ::= NK_STAR", + /* 396 */ "select_list ::= select_sublist", + /* 397 */ "select_sublist ::= select_item", + /* 398 */ "select_sublist ::= select_sublist NK_COMMA select_item", + /* 399 */ "select_item ::= common_expression", + /* 400 */ "select_item ::= common_expression column_alias", + /* 401 */ "select_item ::= common_expression AS column_alias", + /* 402 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 403 */ "where_clause_opt ::=", + /* 404 */ "where_clause_opt ::= WHERE search_condition", + /* 405 */ "partition_by_clause_opt ::=", + /* 406 */ "partition_by_clause_opt ::= PARTITION BY expression_list", + /* 407 */ "twindow_clause_opt ::=", + /* 408 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 409 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", + /* 410 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 411 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 412 */ "sliding_opt ::=", + /* 413 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 414 */ "fill_opt ::=", + /* 415 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 416 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 417 */ "fill_mode ::= NONE", + /* 418 */ "fill_mode ::= PREV", + /* 419 */ "fill_mode ::= NULL", + /* 420 */ "fill_mode ::= LINEAR", + /* 421 */ "fill_mode ::= NEXT", + /* 422 */ "group_by_clause_opt ::=", + /* 423 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 424 */ "group_by_list ::= expression", + /* 425 */ "group_by_list ::= group_by_list NK_COMMA expression", + /* 426 */ "having_clause_opt ::=", + /* 427 */ "having_clause_opt ::= HAVING search_condition", + /* 428 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 429 */ "query_expression_body ::= query_primary", + /* 430 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", + /* 431 */ "query_expression_body ::= query_expression_body UNION query_expression_body", + /* 432 */ "query_primary ::= query_specification", + /* 433 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP", + /* 434 */ "order_by_clause_opt ::=", + /* 435 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 436 */ "slimit_clause_opt ::=", + /* 437 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 438 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 439 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 440 */ "limit_clause_opt ::=", + /* 441 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 442 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 443 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 444 */ "subquery ::= NK_LP query_expression NK_RP", + /* 445 */ "search_condition ::= common_expression", + /* 446 */ "sort_specification_list ::= sort_specification", + /* 447 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 448 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", + /* 449 */ "ordering_specification_opt ::=", + /* 450 */ "ordering_specification_opt ::= ASC", + /* 451 */ "ordering_specification_opt ::= DESC", + /* 452 */ "null_ordering_opt ::=", + /* 453 */ "null_ordering_opt ::= NULLS FIRST", + /* 454 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2093,174 +2104,175 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 238: /* cmd */ - case 241: /* literal */ - case 252: /* db_options */ - case 254: /* alter_db_options */ - case 259: /* retention */ - case 260: /* full_table_name */ - case 263: /* table_options */ - case 267: /* alter_table_clause */ - case 268: /* alter_table_options */ - case 271: /* signed_literal */ - case 272: /* create_subtable_clause */ - case 275: /* drop_table_clause */ - case 278: /* column_def */ - case 281: /* col_name */ - case 282: /* db_name_cond_opt */ - case 283: /* like_pattern_opt */ - case 284: /* table_name_cond */ - case 285: /* from_db_opt */ - case 286: /* func_name */ - case 289: /* index_options */ - case 291: /* duration_literal */ - case 292: /* sliding_opt */ - case 293: /* func */ - case 296: /* topic_options */ - case 297: /* query_expression */ - case 299: /* explain_options */ - case 303: /* stream_options */ - case 304: /* into_opt */ - case 306: /* signed */ - case 307: /* literal_func */ - case 310: /* expression */ - case 311: /* pseudo_column */ - case 312: /* column_reference */ - case 313: /* function_expression */ - case 314: /* subquery */ - case 319: /* star_func_para */ - case 320: /* predicate */ - case 323: /* in_predicate_value */ - case 324: /* boolean_value_expression */ - case 325: /* boolean_primary */ - case 326: /* common_expression */ - case 327: /* from_clause */ - case 328: /* table_reference_list */ - case 329: /* table_reference */ - case 330: /* table_primary */ - case 331: /* joined_table */ - case 333: /* parenthesized_joined_table */ - case 335: /* search_condition */ - case 336: /* query_specification */ - case 339: /* where_clause_opt */ - case 341: /* twindow_clause_opt */ - case 343: /* having_clause_opt */ - case 345: /* select_item */ - case 346: /* fill_opt */ - case 349: /* query_expression_body */ - case 351: /* slimit_clause_opt */ - case 352: /* limit_clause_opt */ - case 353: /* query_primary */ - case 355: /* sort_specification */ + case 240: /* cmd */ + case 243: /* literal */ + case 254: /* db_options */ + case 256: /* alter_db_options */ + case 261: /* retention */ + case 262: /* full_table_name */ + case 265: /* table_options */ + case 269: /* alter_table_clause */ + case 270: /* alter_table_options */ + case 273: /* signed_literal */ + case 274: /* create_subtable_clause */ + case 277: /* drop_table_clause */ + case 280: /* column_def */ + case 283: /* col_name */ + case 284: /* db_name_cond_opt */ + case 285: /* like_pattern_opt */ + case 286: /* table_name_cond */ + case 287: /* from_db_opt */ + case 288: /* func_name */ + case 291: /* index_options */ + case 293: /* duration_literal */ + case 294: /* sliding_opt */ + case 295: /* func */ + case 298: /* topic_options */ + case 299: /* query_expression */ + case 302: /* explain_options */ + case 306: /* stream_options */ + case 307: /* into_opt */ + case 309: /* signed */ + case 310: /* literal_func */ + case 313: /* expression */ + case 314: /* pseudo_column */ + case 315: /* column_reference */ + case 316: /* function_expression */ + case 317: /* subquery */ + case 322: /* star_func_para */ + case 323: /* predicate */ + case 326: /* in_predicate_value */ + case 327: /* boolean_value_expression */ + case 328: /* boolean_primary */ + case 329: /* common_expression */ + case 330: /* from_clause */ + case 331: /* table_reference_list */ + case 332: /* table_reference */ + case 333: /* table_primary */ + case 334: /* joined_table */ + case 336: /* parenthesized_joined_table */ + case 338: /* search_condition */ + case 339: /* query_specification */ + case 342: /* where_clause_opt */ + case 344: /* twindow_clause_opt */ + case 346: /* having_clause_opt */ + case 348: /* select_item */ + case 349: /* fill_opt */ + case 352: /* query_expression_body */ + case 354: /* slimit_clause_opt */ + case 355: /* limit_clause_opt */ + case 356: /* query_primary */ + case 358: /* sort_specification */ { - nodesDestroyNode((yypminor->yy172)); + nodesDestroyNode((yypminor->yy636)); } break; - case 239: /* account_options */ - case 240: /* alter_account_options */ - case 242: /* alter_account_option */ - case 301: /* bufsize_opt */ + case 241: /* account_options */ + case 242: /* alter_account_options */ + case 244: /* alter_account_option */ + case 304: /* bufsize_opt */ { } break; - case 243: /* user_name */ - case 245: /* priv_level */ - case 248: /* db_name */ - case 249: /* dnode_endpoint */ - case 250: /* dnode_host_name */ - case 269: /* column_name */ - case 277: /* table_name */ - case 287: /* function_name */ - case 288: /* index_name */ - case 295: /* topic_name */ - case 302: /* stream_name */ - case 308: /* table_alias */ - case 309: /* column_alias */ - case 315: /* star_func */ - case 317: /* noarg_func */ - case 332: /* alias_opt */ + case 245: /* user_name */ + case 247: /* priv_level */ + case 250: /* db_name */ + case 251: /* dnode_endpoint */ + case 252: /* dnode_host_name */ + case 271: /* column_name */ + case 279: /* table_name */ + case 289: /* function_name */ + case 290: /* index_name */ + case 297: /* topic_name */ + case 300: /* cgroup_name */ + case 305: /* stream_name */ + case 311: /* table_alias */ + case 312: /* column_alias */ + case 318: /* star_func */ + case 320: /* noarg_func */ + case 335: /* alias_opt */ { } break; - case 244: /* privileges */ - case 246: /* priv_type_list */ - case 247: /* priv_type */ + case 246: /* privileges */ + case 248: /* priv_type_list */ + case 249: /* priv_type */ { } break; - case 251: /* not_exists_opt */ - case 253: /* exists_opt */ - case 298: /* analyze_opt */ - case 300: /* agg_func_opt */ - case 337: /* set_quantifier_opt */ + case 253: /* not_exists_opt */ + case 255: /* exists_opt */ + case 301: /* analyze_opt */ + case 303: /* agg_func_opt */ + case 340: /* set_quantifier_opt */ { } break; - case 255: /* integer_list */ - case 256: /* variable_list */ - case 257: /* retention_list */ - case 261: /* column_def_list */ - case 262: /* tags_def_opt */ - case 264: /* multi_create_clause */ - case 265: /* tags_def */ - case 266: /* multi_drop_clause */ - case 273: /* specific_tags_opt */ - case 274: /* literal_list */ - case 276: /* col_name_list */ - case 279: /* func_name_list */ - case 290: /* func_list */ - case 294: /* expression_list */ - case 305: /* dnode_list */ - case 316: /* star_func_para_list */ - case 318: /* other_para_list */ - case 338: /* select_list */ - case 340: /* partition_by_clause_opt */ - case 342: /* group_by_clause_opt */ - case 344: /* select_sublist */ - case 348: /* group_by_list */ - case 350: /* order_by_clause_opt */ - case 354: /* sort_specification_list */ + case 257: /* integer_list */ + case 258: /* variable_list */ + case 259: /* retention_list */ + case 263: /* column_def_list */ + case 264: /* tags_def_opt */ + case 266: /* multi_create_clause */ + case 267: /* tags_def */ + case 268: /* multi_drop_clause */ + case 275: /* specific_tags_opt */ + case 276: /* literal_list */ + case 278: /* col_name_list */ + case 281: /* func_name_list */ + case 292: /* func_list */ + case 296: /* expression_list */ + case 308: /* dnode_list */ + case 319: /* star_func_para_list */ + case 321: /* other_para_list */ + case 341: /* select_list */ + case 343: /* partition_by_clause_opt */ + case 345: /* group_by_clause_opt */ + case 347: /* select_sublist */ + case 351: /* group_by_list */ + case 353: /* order_by_clause_opt */ + case 357: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy60)); + nodesDestroyList((yypminor->yy236)); } break; - case 258: /* alter_db_option */ - case 280: /* alter_table_option */ + case 260: /* alter_db_option */ + case 282: /* alter_table_option */ { } break; - case 270: /* type_name */ + case 272: /* type_name */ { } break; - case 321: /* compare_op */ - case 322: /* in_op */ + case 324: /* compare_op */ + case 325: /* in_op */ { } break; - case 334: /* join_type */ + case 337: /* join_type */ { } break; - case 347: /* fill_mode */ + case 350: /* fill_mode */ { } break; - case 356: /* ordering_specification_opt */ + case 359: /* ordering_specification_opt */ { } break; - case 357: /* null_ordering_opt */ + case 360: /* null_ordering_opt */ { } @@ -2559,458 +2571,461 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { - { 238, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 238, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 239, 0 }, /* (2) account_options ::= */ - { 239, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 239, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 239, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 239, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 239, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 239, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 239, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 239, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 239, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 240, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 240, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 242, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 242, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 242, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 242, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 242, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 242, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 242, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 242, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 242, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 242, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 238, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ - { 238, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 238, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ - { 238, -3 }, /* (27) cmd ::= DROP USER user_name */ - { 238, -6 }, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ - { 238, -6 }, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - { 244, -1 }, /* (30) privileges ::= ALL */ - { 244, -1 }, /* (31) privileges ::= priv_type_list */ - { 246, -1 }, /* (32) priv_type_list ::= priv_type */ - { 246, -3 }, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - { 247, -1 }, /* (34) priv_type ::= READ */ - { 247, -1 }, /* (35) priv_type ::= WRITE */ - { 245, -3 }, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ - { 245, -3 }, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ - { 238, -3 }, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ - { 238, -5 }, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ - { 238, -3 }, /* (40) cmd ::= DROP DNODE NK_INTEGER */ - { 238, -3 }, /* (41) cmd ::= DROP DNODE dnode_endpoint */ - { 238, -4 }, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 238, -5 }, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 238, -4 }, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ - { 238, -5 }, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 249, -1 }, /* (46) dnode_endpoint ::= NK_STRING */ - { 250, -1 }, /* (47) dnode_host_name ::= NK_ID */ - { 250, -1 }, /* (48) dnode_host_name ::= NK_IPTOKEN */ - { 238, -3 }, /* (49) cmd ::= ALTER LOCAL NK_STRING */ - { 238, -4 }, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 238, -5 }, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 238, -4 }, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ - { 238, -2 }, /* (61) cmd ::= USE db_name */ - { 238, -4 }, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ - { 251, -3 }, /* (63) not_exists_opt ::= IF NOT EXISTS */ - { 251, 0 }, /* (64) not_exists_opt ::= */ - { 253, -2 }, /* (65) exists_opt ::= IF EXISTS */ - { 253, 0 }, /* (66) exists_opt ::= */ - { 252, 0 }, /* (67) db_options ::= */ - { 252, -3 }, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ - { 252, -3 }, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ - { 252, -3 }, /* (70) db_options ::= db_options COMP NK_INTEGER */ - { 252, -3 }, /* (71) db_options ::= db_options DAYS NK_INTEGER */ - { 252, -3 }, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ - { 252, -3 }, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ - { 252, -3 }, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ - { 252, -3 }, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ - { 252, -3 }, /* (76) db_options ::= db_options KEEP integer_list */ - { 252, -3 }, /* (77) db_options ::= db_options KEEP variable_list */ - { 252, -3 }, /* (78) db_options ::= db_options PAGES NK_INTEGER */ - { 252, -3 }, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ - { 252, -3 }, /* (80) db_options ::= db_options PRECISION NK_STRING */ - { 252, -3 }, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ - { 252, -3 }, /* (82) db_options ::= db_options STRICT NK_INTEGER */ - { 252, -3 }, /* (83) db_options ::= db_options WAL NK_INTEGER */ - { 252, -3 }, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ - { 252, -3 }, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - { 252, -3 }, /* (86) db_options ::= db_options RETENTIONS retention_list */ - { 254, -1 }, /* (87) alter_db_options ::= alter_db_option */ - { 254, -2 }, /* (88) alter_db_options ::= alter_db_options alter_db_option */ - { 258, -2 }, /* (89) alter_db_option ::= BUFFER NK_INTEGER */ - { 258, -2 }, /* (90) alter_db_option ::= CACHELAST NK_INTEGER */ - { 258, -2 }, /* (91) alter_db_option ::= FSYNC NK_INTEGER */ - { 258, -2 }, /* (92) alter_db_option ::= KEEP integer_list */ - { 258, -2 }, /* (93) alter_db_option ::= KEEP variable_list */ - { 258, -2 }, /* (94) alter_db_option ::= PAGES NK_INTEGER */ - { 258, -2 }, /* (95) alter_db_option ::= REPLICA NK_INTEGER */ - { 258, -2 }, /* (96) alter_db_option ::= STRICT NK_INTEGER */ - { 258, -2 }, /* (97) alter_db_option ::= WAL NK_INTEGER */ - { 255, -1 }, /* (98) integer_list ::= NK_INTEGER */ - { 255, -3 }, /* (99) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 256, -1 }, /* (100) variable_list ::= NK_VARIABLE */ - { 256, -3 }, /* (101) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 257, -1 }, /* (102) retention_list ::= retention */ - { 257, -3 }, /* (103) retention_list ::= retention_list NK_COMMA retention */ - { 259, -3 }, /* (104) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 238, -9 }, /* (105) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 238, -3 }, /* (106) cmd ::= CREATE TABLE multi_create_clause */ - { 238, -9 }, /* (107) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 238, -3 }, /* (108) cmd ::= DROP TABLE multi_drop_clause */ - { 238, -4 }, /* (109) cmd ::= DROP STABLE exists_opt full_table_name */ - { 238, -3 }, /* (110) cmd ::= ALTER TABLE alter_table_clause */ - { 238, -3 }, /* (111) cmd ::= ALTER STABLE alter_table_clause */ - { 267, -2 }, /* (112) alter_table_clause ::= full_table_name alter_table_options */ - { 267, -5 }, /* (113) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 267, -4 }, /* (114) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 267, -5 }, /* (115) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 267, -5 }, /* (116) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 267, -5 }, /* (117) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 267, -4 }, /* (118) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 267, -5 }, /* (119) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 267, -5 }, /* (120) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 267, -6 }, /* (121) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 264, -1 }, /* (122) multi_create_clause ::= create_subtable_clause */ - { 264, -2 }, /* (123) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 272, -10 }, /* (124) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ - { 266, -1 }, /* (125) multi_drop_clause ::= drop_table_clause */ - { 266, -2 }, /* (126) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 275, -2 }, /* (127) drop_table_clause ::= exists_opt full_table_name */ - { 273, 0 }, /* (128) specific_tags_opt ::= */ - { 273, -3 }, /* (129) specific_tags_opt ::= NK_LP col_name_list NK_RP */ - { 260, -1 }, /* (130) full_table_name ::= table_name */ - { 260, -3 }, /* (131) full_table_name ::= db_name NK_DOT table_name */ - { 261, -1 }, /* (132) column_def_list ::= column_def */ - { 261, -3 }, /* (133) column_def_list ::= column_def_list NK_COMMA column_def */ - { 278, -2 }, /* (134) column_def ::= column_name type_name */ - { 278, -4 }, /* (135) column_def ::= column_name type_name COMMENT NK_STRING */ - { 270, -1 }, /* (136) type_name ::= BOOL */ - { 270, -1 }, /* (137) type_name ::= TINYINT */ - { 270, -1 }, /* (138) type_name ::= SMALLINT */ - { 270, -1 }, /* (139) type_name ::= INT */ - { 270, -1 }, /* (140) type_name ::= INTEGER */ - { 270, -1 }, /* (141) type_name ::= BIGINT */ - { 270, -1 }, /* (142) type_name ::= FLOAT */ - { 270, -1 }, /* (143) type_name ::= DOUBLE */ - { 270, -4 }, /* (144) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 270, -1 }, /* (145) type_name ::= TIMESTAMP */ - { 270, -4 }, /* (146) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 270, -2 }, /* (147) type_name ::= TINYINT UNSIGNED */ - { 270, -2 }, /* (148) type_name ::= SMALLINT UNSIGNED */ - { 270, -2 }, /* (149) type_name ::= INT UNSIGNED */ - { 270, -2 }, /* (150) type_name ::= BIGINT UNSIGNED */ - { 270, -1 }, /* (151) type_name ::= JSON */ - { 270, -4 }, /* (152) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 270, -1 }, /* (153) type_name ::= MEDIUMBLOB */ - { 270, -1 }, /* (154) type_name ::= BLOB */ - { 270, -4 }, /* (155) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 270, -1 }, /* (156) type_name ::= DECIMAL */ - { 270, -4 }, /* (157) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 270, -6 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 262, 0 }, /* (159) tags_def_opt ::= */ - { 262, -1 }, /* (160) tags_def_opt ::= tags_def */ - { 265, -4 }, /* (161) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 263, 0 }, /* (162) table_options ::= */ - { 263, -3 }, /* (163) table_options ::= table_options COMMENT NK_STRING */ - { 263, -3 }, /* (164) table_options ::= table_options DELAY NK_INTEGER */ - { 263, -3 }, /* (165) table_options ::= table_options FILE_FACTOR NK_FLOAT */ - { 263, -5 }, /* (166) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ - { 263, -3 }, /* (167) table_options ::= table_options TTL NK_INTEGER */ - { 263, -5 }, /* (168) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 268, -1 }, /* (169) alter_table_options ::= alter_table_option */ - { 268, -2 }, /* (170) alter_table_options ::= alter_table_options alter_table_option */ - { 280, -2 }, /* (171) alter_table_option ::= COMMENT NK_STRING */ - { 280, -2 }, /* (172) alter_table_option ::= TTL NK_INTEGER */ - { 276, -1 }, /* (173) col_name_list ::= col_name */ - { 276, -3 }, /* (174) col_name_list ::= col_name_list NK_COMMA col_name */ - { 281, -1 }, /* (175) col_name ::= column_name */ - { 238, -2 }, /* (176) cmd ::= SHOW DNODES */ - { 238, -2 }, /* (177) cmd ::= SHOW USERS */ - { 238, -2 }, /* (178) cmd ::= SHOW DATABASES */ - { 238, -4 }, /* (179) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 238, -4 }, /* (180) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 238, -3 }, /* (181) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 238, -2 }, /* (182) cmd ::= SHOW MNODES */ - { 238, -2 }, /* (183) cmd ::= SHOW MODULES */ - { 238, -2 }, /* (184) cmd ::= SHOW QNODES */ - { 238, -2 }, /* (185) cmd ::= SHOW FUNCTIONS */ - { 238, -5 }, /* (186) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 238, -2 }, /* (187) cmd ::= SHOW STREAMS */ - { 238, -2 }, /* (188) cmd ::= SHOW ACCOUNTS */ - { 238, -2 }, /* (189) cmd ::= SHOW APPS */ - { 238, -2 }, /* (190) cmd ::= SHOW CONNECTIONS */ - { 238, -2 }, /* (191) cmd ::= SHOW LICENCE */ - { 238, -2 }, /* (192) cmd ::= SHOW GRANTS */ - { 238, -4 }, /* (193) cmd ::= SHOW CREATE DATABASE db_name */ - { 238, -4 }, /* (194) cmd ::= SHOW CREATE TABLE full_table_name */ - { 238, -4 }, /* (195) cmd ::= SHOW CREATE STABLE full_table_name */ - { 238, -2 }, /* (196) cmd ::= SHOW QUERIES */ - { 238, -2 }, /* (197) cmd ::= SHOW SCORES */ - { 238, -2 }, /* (198) cmd ::= SHOW TOPICS */ - { 238, -2 }, /* (199) cmd ::= SHOW VARIABLES */ - { 238, -2 }, /* (200) cmd ::= SHOW BNODES */ - { 238, -2 }, /* (201) cmd ::= SHOW SNODES */ - { 238, -2 }, /* (202) cmd ::= SHOW CLUSTER */ - { 238, -2 }, /* (203) cmd ::= SHOW TRANSACTIONS */ - { 282, 0 }, /* (204) db_name_cond_opt ::= */ - { 282, -2 }, /* (205) db_name_cond_opt ::= db_name NK_DOT */ - { 283, 0 }, /* (206) like_pattern_opt ::= */ - { 283, -2 }, /* (207) like_pattern_opt ::= LIKE NK_STRING */ - { 284, -1 }, /* (208) table_name_cond ::= table_name */ - { 285, 0 }, /* (209) from_db_opt ::= */ - { 285, -2 }, /* (210) from_db_opt ::= FROM db_name */ - { 279, -1 }, /* (211) func_name_list ::= func_name */ - { 279, -3 }, /* (212) func_name_list ::= func_name_list NK_COMMA func_name */ - { 286, -1 }, /* (213) func_name ::= function_name */ - { 238, -8 }, /* (214) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ - { 238, -10 }, /* (215) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ - { 238, -6 }, /* (216) cmd ::= DROP INDEX exists_opt index_name ON table_name */ - { 289, 0 }, /* (217) index_options ::= */ - { 289, -9 }, /* (218) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ - { 289, -11 }, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ - { 290, -1 }, /* (220) func_list ::= func */ - { 290, -3 }, /* (221) func_list ::= func_list NK_COMMA func */ - { 293, -4 }, /* (222) func ::= function_name NK_LP expression_list NK_RP */ - { 238, -7 }, /* (223) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ - { 238, -7 }, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ - { 238, -4 }, /* (225) cmd ::= DROP TOPIC exists_opt topic_name */ - { 296, 0 }, /* (226) topic_options ::= */ - { 296, -3 }, /* (227) topic_options ::= topic_options WITH TABLE */ - { 296, -3 }, /* (228) topic_options ::= topic_options WITH SCHEMA */ - { 296, -3 }, /* (229) topic_options ::= topic_options WITH TAG */ - { 238, -2 }, /* (230) cmd ::= DESC full_table_name */ - { 238, -2 }, /* (231) cmd ::= DESCRIBE full_table_name */ - { 238, -3 }, /* (232) cmd ::= RESET QUERY CACHE */ - { 238, -4 }, /* (233) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ - { 298, 0 }, /* (234) analyze_opt ::= */ - { 298, -1 }, /* (235) analyze_opt ::= ANALYZE */ - { 299, 0 }, /* (236) explain_options ::= */ - { 299, -3 }, /* (237) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 299, -3 }, /* (238) explain_options ::= explain_options RATIO NK_FLOAT */ - { 238, -6 }, /* (239) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ - { 238, -10 }, /* (240) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 238, -4 }, /* (241) cmd ::= DROP FUNCTION exists_opt function_name */ - { 300, 0 }, /* (242) agg_func_opt ::= */ - { 300, -1 }, /* (243) agg_func_opt ::= AGGREGATE */ - { 301, 0 }, /* (244) bufsize_opt ::= */ - { 301, -2 }, /* (245) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 238, -8 }, /* (246) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ - { 238, -4 }, /* (247) cmd ::= DROP STREAM exists_opt stream_name */ - { 304, 0 }, /* (248) into_opt ::= */ - { 304, -2 }, /* (249) into_opt ::= INTO full_table_name */ - { 303, 0 }, /* (250) stream_options ::= */ - { 303, -3 }, /* (251) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 303, -3 }, /* (252) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 303, -3 }, /* (253) stream_options ::= stream_options WATERMARK duration_literal */ - { 238, -3 }, /* (254) cmd ::= KILL CONNECTION NK_INTEGER */ - { 238, -3 }, /* (255) cmd ::= KILL QUERY NK_INTEGER */ - { 238, -3 }, /* (256) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 238, -4 }, /* (257) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 238, -4 }, /* (258) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 238, -3 }, /* (259) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 305, -2 }, /* (260) dnode_list ::= DNODE NK_INTEGER */ - { 305, -3 }, /* (261) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 238, -3 }, /* (262) cmd ::= SYNCDB db_name REPLICA */ - { 238, -1 }, /* (263) cmd ::= query_expression */ - { 241, -1 }, /* (264) literal ::= NK_INTEGER */ - { 241, -1 }, /* (265) literal ::= NK_FLOAT */ - { 241, -1 }, /* (266) literal ::= NK_STRING */ - { 241, -1 }, /* (267) literal ::= NK_BOOL */ - { 241, -2 }, /* (268) literal ::= TIMESTAMP NK_STRING */ - { 241, -1 }, /* (269) literal ::= duration_literal */ - { 241, -1 }, /* (270) literal ::= NULL */ - { 241, -1 }, /* (271) literal ::= NK_QUESTION */ - { 291, -1 }, /* (272) duration_literal ::= NK_VARIABLE */ - { 306, -1 }, /* (273) signed ::= NK_INTEGER */ - { 306, -2 }, /* (274) signed ::= NK_PLUS NK_INTEGER */ - { 306, -2 }, /* (275) signed ::= NK_MINUS NK_INTEGER */ - { 306, -1 }, /* (276) signed ::= NK_FLOAT */ - { 306, -2 }, /* (277) signed ::= NK_PLUS NK_FLOAT */ - { 306, -2 }, /* (278) signed ::= NK_MINUS NK_FLOAT */ - { 271, -1 }, /* (279) signed_literal ::= signed */ - { 271, -1 }, /* (280) signed_literal ::= NK_STRING */ - { 271, -1 }, /* (281) signed_literal ::= NK_BOOL */ - { 271, -2 }, /* (282) signed_literal ::= TIMESTAMP NK_STRING */ - { 271, -1 }, /* (283) signed_literal ::= duration_literal */ - { 271, -1 }, /* (284) signed_literal ::= NULL */ - { 271, -1 }, /* (285) signed_literal ::= literal_func */ - { 274, -1 }, /* (286) literal_list ::= signed_literal */ - { 274, -3 }, /* (287) literal_list ::= literal_list NK_COMMA signed_literal */ - { 248, -1 }, /* (288) db_name ::= NK_ID */ - { 277, -1 }, /* (289) table_name ::= NK_ID */ - { 269, -1 }, /* (290) column_name ::= NK_ID */ - { 287, -1 }, /* (291) function_name ::= NK_ID */ - { 308, -1 }, /* (292) table_alias ::= NK_ID */ - { 309, -1 }, /* (293) column_alias ::= NK_ID */ - { 243, -1 }, /* (294) user_name ::= NK_ID */ - { 288, -1 }, /* (295) index_name ::= NK_ID */ - { 295, -1 }, /* (296) topic_name ::= NK_ID */ - { 302, -1 }, /* (297) stream_name ::= NK_ID */ - { 310, -1 }, /* (298) expression ::= literal */ - { 310, -1 }, /* (299) expression ::= pseudo_column */ - { 310, -1 }, /* (300) expression ::= column_reference */ - { 310, -1 }, /* (301) expression ::= function_expression */ - { 310, -1 }, /* (302) expression ::= subquery */ - { 310, -3 }, /* (303) expression ::= NK_LP expression NK_RP */ - { 310, -2 }, /* (304) expression ::= NK_PLUS expression */ - { 310, -2 }, /* (305) expression ::= NK_MINUS expression */ - { 310, -3 }, /* (306) expression ::= expression NK_PLUS expression */ - { 310, -3 }, /* (307) expression ::= expression NK_MINUS expression */ - { 310, -3 }, /* (308) expression ::= expression NK_STAR expression */ - { 310, -3 }, /* (309) expression ::= expression NK_SLASH expression */ - { 310, -3 }, /* (310) expression ::= expression NK_REM expression */ - { 310, -3 }, /* (311) expression ::= column_reference NK_ARROW NK_STRING */ - { 294, -1 }, /* (312) expression_list ::= expression */ - { 294, -3 }, /* (313) expression_list ::= expression_list NK_COMMA expression */ - { 312, -1 }, /* (314) column_reference ::= column_name */ - { 312, -3 }, /* (315) column_reference ::= table_name NK_DOT column_name */ - { 311, -1 }, /* (316) pseudo_column ::= ROWTS */ - { 311, -1 }, /* (317) pseudo_column ::= TBNAME */ - { 311, -3 }, /* (318) pseudo_column ::= table_name NK_DOT TBNAME */ - { 311, -1 }, /* (319) pseudo_column ::= QSTARTTS */ - { 311, -1 }, /* (320) pseudo_column ::= QENDTS */ - { 311, -1 }, /* (321) pseudo_column ::= WSTARTTS */ - { 311, -1 }, /* (322) pseudo_column ::= WENDTS */ - { 311, -1 }, /* (323) pseudo_column ::= WDURATION */ - { 313, -4 }, /* (324) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 313, -4 }, /* (325) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 313, -6 }, /* (326) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ - { 313, -1 }, /* (327) function_expression ::= literal_func */ - { 307, -3 }, /* (328) literal_func ::= noarg_func NK_LP NK_RP */ - { 307, -1 }, /* (329) literal_func ::= NOW */ - { 317, -1 }, /* (330) noarg_func ::= NOW */ - { 317, -1 }, /* (331) noarg_func ::= TODAY */ - { 317, -1 }, /* (332) noarg_func ::= TIMEZONE */ - { 315, -1 }, /* (333) star_func ::= COUNT */ - { 315, -1 }, /* (334) star_func ::= FIRST */ - { 315, -1 }, /* (335) star_func ::= LAST */ - { 315, -1 }, /* (336) star_func ::= LAST_ROW */ - { 316, -1 }, /* (337) star_func_para_list ::= NK_STAR */ - { 316, -1 }, /* (338) star_func_para_list ::= other_para_list */ - { 318, -1 }, /* (339) other_para_list ::= star_func_para */ - { 318, -3 }, /* (340) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 319, -1 }, /* (341) star_func_para ::= expression */ - { 319, -3 }, /* (342) star_func_para ::= table_name NK_DOT NK_STAR */ - { 320, -3 }, /* (343) predicate ::= expression compare_op expression */ - { 320, -5 }, /* (344) predicate ::= expression BETWEEN expression AND expression */ - { 320, -6 }, /* (345) predicate ::= expression NOT BETWEEN expression AND expression */ - { 320, -3 }, /* (346) predicate ::= expression IS NULL */ - { 320, -4 }, /* (347) predicate ::= expression IS NOT NULL */ - { 320, -3 }, /* (348) predicate ::= expression in_op in_predicate_value */ - { 321, -1 }, /* (349) compare_op ::= NK_LT */ - { 321, -1 }, /* (350) compare_op ::= NK_GT */ - { 321, -1 }, /* (351) compare_op ::= NK_LE */ - { 321, -1 }, /* (352) compare_op ::= NK_GE */ - { 321, -1 }, /* (353) compare_op ::= NK_NE */ - { 321, -1 }, /* (354) compare_op ::= NK_EQ */ - { 321, -1 }, /* (355) compare_op ::= LIKE */ - { 321, -2 }, /* (356) compare_op ::= NOT LIKE */ - { 321, -1 }, /* (357) compare_op ::= MATCH */ - { 321, -1 }, /* (358) compare_op ::= NMATCH */ - { 321, -1 }, /* (359) compare_op ::= CONTAINS */ - { 322, -1 }, /* (360) in_op ::= IN */ - { 322, -2 }, /* (361) in_op ::= NOT IN */ - { 323, -3 }, /* (362) in_predicate_value ::= NK_LP expression_list NK_RP */ - { 324, -1 }, /* (363) boolean_value_expression ::= boolean_primary */ - { 324, -2 }, /* (364) boolean_value_expression ::= NOT boolean_primary */ - { 324, -3 }, /* (365) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 324, -3 }, /* (366) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 325, -1 }, /* (367) boolean_primary ::= predicate */ - { 325, -3 }, /* (368) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 326, -1 }, /* (369) common_expression ::= expression */ - { 326, -1 }, /* (370) common_expression ::= boolean_value_expression */ - { 327, -2 }, /* (371) from_clause ::= FROM table_reference_list */ - { 328, -1 }, /* (372) table_reference_list ::= table_reference */ - { 328, -3 }, /* (373) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 329, -1 }, /* (374) table_reference ::= table_primary */ - { 329, -1 }, /* (375) table_reference ::= joined_table */ - { 330, -2 }, /* (376) table_primary ::= table_name alias_opt */ - { 330, -4 }, /* (377) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 330, -2 }, /* (378) table_primary ::= subquery alias_opt */ - { 330, -1 }, /* (379) table_primary ::= parenthesized_joined_table */ - { 332, 0 }, /* (380) alias_opt ::= */ - { 332, -1 }, /* (381) alias_opt ::= table_alias */ - { 332, -2 }, /* (382) alias_opt ::= AS table_alias */ - { 333, -3 }, /* (383) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 333, -3 }, /* (384) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 331, -6 }, /* (385) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 334, 0 }, /* (386) join_type ::= */ - { 334, -1 }, /* (387) join_type ::= INNER */ - { 336, -9 }, /* (388) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - { 337, 0 }, /* (389) set_quantifier_opt ::= */ - { 337, -1 }, /* (390) set_quantifier_opt ::= DISTINCT */ - { 337, -1 }, /* (391) set_quantifier_opt ::= ALL */ - { 338, -1 }, /* (392) select_list ::= NK_STAR */ - { 338, -1 }, /* (393) select_list ::= select_sublist */ - { 344, -1 }, /* (394) select_sublist ::= select_item */ - { 344, -3 }, /* (395) select_sublist ::= select_sublist NK_COMMA select_item */ - { 345, -1 }, /* (396) select_item ::= common_expression */ - { 345, -2 }, /* (397) select_item ::= common_expression column_alias */ - { 345, -3 }, /* (398) select_item ::= common_expression AS column_alias */ - { 345, -3 }, /* (399) select_item ::= table_name NK_DOT NK_STAR */ - { 339, 0 }, /* (400) where_clause_opt ::= */ - { 339, -2 }, /* (401) where_clause_opt ::= WHERE search_condition */ - { 340, 0 }, /* (402) partition_by_clause_opt ::= */ - { 340, -3 }, /* (403) partition_by_clause_opt ::= PARTITION BY expression_list */ - { 341, 0 }, /* (404) twindow_clause_opt ::= */ - { 341, -6 }, /* (405) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 341, -4 }, /* (406) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ - { 341, -6 }, /* (407) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 341, -8 }, /* (408) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 292, 0 }, /* (409) sliding_opt ::= */ - { 292, -4 }, /* (410) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 346, 0 }, /* (411) fill_opt ::= */ - { 346, -4 }, /* (412) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 346, -6 }, /* (413) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 347, -1 }, /* (414) fill_mode ::= NONE */ - { 347, -1 }, /* (415) fill_mode ::= PREV */ - { 347, -1 }, /* (416) fill_mode ::= NULL */ - { 347, -1 }, /* (417) fill_mode ::= LINEAR */ - { 347, -1 }, /* (418) fill_mode ::= NEXT */ - { 342, 0 }, /* (419) group_by_clause_opt ::= */ - { 342, -3 }, /* (420) group_by_clause_opt ::= GROUP BY group_by_list */ - { 348, -1 }, /* (421) group_by_list ::= expression */ - { 348, -3 }, /* (422) group_by_list ::= group_by_list NK_COMMA expression */ - { 343, 0 }, /* (423) having_clause_opt ::= */ - { 343, -2 }, /* (424) having_clause_opt ::= HAVING search_condition */ - { 297, -4 }, /* (425) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 349, -1 }, /* (426) query_expression_body ::= query_primary */ - { 349, -4 }, /* (427) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ - { 349, -3 }, /* (428) query_expression_body ::= query_expression_body UNION query_expression_body */ - { 353, -1 }, /* (429) query_primary ::= query_specification */ - { 353, -6 }, /* (430) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ - { 350, 0 }, /* (431) order_by_clause_opt ::= */ - { 350, -3 }, /* (432) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 351, 0 }, /* (433) slimit_clause_opt ::= */ - { 351, -2 }, /* (434) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 351, -4 }, /* (435) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 351, -4 }, /* (436) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 352, 0 }, /* (437) limit_clause_opt ::= */ - { 352, -2 }, /* (438) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 352, -4 }, /* (439) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 352, -4 }, /* (440) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 314, -3 }, /* (441) subquery ::= NK_LP query_expression NK_RP */ - { 335, -1 }, /* (442) search_condition ::= common_expression */ - { 354, -1 }, /* (443) sort_specification_list ::= sort_specification */ - { 354, -3 }, /* (444) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 355, -3 }, /* (445) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ - { 356, 0 }, /* (446) ordering_specification_opt ::= */ - { 356, -1 }, /* (447) ordering_specification_opt ::= ASC */ - { 356, -1 }, /* (448) ordering_specification_opt ::= DESC */ - { 357, 0 }, /* (449) null_ordering_opt ::= */ - { 357, -2 }, /* (450) null_ordering_opt ::= NULLS FIRST */ - { 357, -2 }, /* (451) null_ordering_opt ::= NULLS LAST */ + { 240, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + { 240, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + { 241, 0 }, /* (2) account_options ::= */ + { 241, -3 }, /* (3) account_options ::= account_options PPS literal */ + { 241, -3 }, /* (4) account_options ::= account_options TSERIES literal */ + { 241, -3 }, /* (5) account_options ::= account_options STORAGE literal */ + { 241, -3 }, /* (6) account_options ::= account_options STREAMS literal */ + { 241, -3 }, /* (7) account_options ::= account_options QTIME literal */ + { 241, -3 }, /* (8) account_options ::= account_options DBS literal */ + { 241, -3 }, /* (9) account_options ::= account_options USERS literal */ + { 241, -3 }, /* (10) account_options ::= account_options CONNS literal */ + { 241, -3 }, /* (11) account_options ::= account_options STATE literal */ + { 242, -1 }, /* (12) alter_account_options ::= alter_account_option */ + { 242, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + { 244, -2 }, /* (14) alter_account_option ::= PASS literal */ + { 244, -2 }, /* (15) alter_account_option ::= PPS literal */ + { 244, -2 }, /* (16) alter_account_option ::= TSERIES literal */ + { 244, -2 }, /* (17) alter_account_option ::= STORAGE literal */ + { 244, -2 }, /* (18) alter_account_option ::= STREAMS literal */ + { 244, -2 }, /* (19) alter_account_option ::= QTIME literal */ + { 244, -2 }, /* (20) alter_account_option ::= DBS literal */ + { 244, -2 }, /* (21) alter_account_option ::= USERS literal */ + { 244, -2 }, /* (22) alter_account_option ::= CONNS literal */ + { 244, -2 }, /* (23) alter_account_option ::= STATE literal */ + { 240, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ + { 240, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + { 240, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ + { 240, -3 }, /* (27) cmd ::= DROP USER user_name */ + { 240, -6 }, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ + { 240, -6 }, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ + { 246, -1 }, /* (30) privileges ::= ALL */ + { 246, -1 }, /* (31) privileges ::= priv_type_list */ + { 248, -1 }, /* (32) priv_type_list ::= priv_type */ + { 248, -3 }, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + { 249, -1 }, /* (34) priv_type ::= READ */ + { 249, -1 }, /* (35) priv_type ::= WRITE */ + { 247, -3 }, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ + { 247, -3 }, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ + { 240, -3 }, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ + { 240, -5 }, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ + { 240, -3 }, /* (40) cmd ::= DROP DNODE NK_INTEGER */ + { 240, -3 }, /* (41) cmd ::= DROP DNODE dnode_endpoint */ + { 240, -4 }, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + { 240, -5 }, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + { 240, -4 }, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ + { 240, -5 }, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + { 251, -1 }, /* (46) dnode_endpoint ::= NK_STRING */ + { 252, -1 }, /* (47) dnode_host_name ::= NK_ID */ + { 252, -1 }, /* (48) dnode_host_name ::= NK_IPTOKEN */ + { 240, -3 }, /* (49) cmd ::= ALTER LOCAL NK_STRING */ + { 240, -4 }, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + { 240, -5 }, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + { 240, -5 }, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + { 240, -5 }, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + { 240, -5 }, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + { 240, -5 }, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + { 240, -5 }, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + { 240, -5 }, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + { 240, -5 }, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + { 240, -5 }, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + { 240, -4 }, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ + { 240, -2 }, /* (61) cmd ::= USE db_name */ + { 240, -4 }, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ + { 253, -3 }, /* (63) not_exists_opt ::= IF NOT EXISTS */ + { 253, 0 }, /* (64) not_exists_opt ::= */ + { 255, -2 }, /* (65) exists_opt ::= IF EXISTS */ + { 255, 0 }, /* (66) exists_opt ::= */ + { 254, 0 }, /* (67) db_options ::= */ + { 254, -3 }, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ + { 254, -3 }, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ + { 254, -3 }, /* (70) db_options ::= db_options COMP NK_INTEGER */ + { 254, -3 }, /* (71) db_options ::= db_options DAYS NK_INTEGER */ + { 254, -3 }, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ + { 254, -3 }, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ + { 254, -3 }, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ + { 254, -3 }, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ + { 254, -3 }, /* (76) db_options ::= db_options KEEP integer_list */ + { 254, -3 }, /* (77) db_options ::= db_options KEEP variable_list */ + { 254, -3 }, /* (78) db_options ::= db_options PAGES NK_INTEGER */ + { 254, -3 }, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ + { 254, -3 }, /* (80) db_options ::= db_options PRECISION NK_STRING */ + { 254, -3 }, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ + { 254, -3 }, /* (82) db_options ::= db_options STRICT NK_INTEGER */ + { 254, -3 }, /* (83) db_options ::= db_options WAL NK_INTEGER */ + { 254, -3 }, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ + { 254, -3 }, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 254, -3 }, /* (86) db_options ::= db_options RETENTIONS retention_list */ + { 254, -3 }, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ + { 256, -1 }, /* (88) alter_db_options ::= alter_db_option */ + { 256, -2 }, /* (89) alter_db_options ::= alter_db_options alter_db_option */ + { 260, -2 }, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ + { 260, -2 }, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ + { 260, -2 }, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ + { 260, -2 }, /* (93) alter_db_option ::= KEEP integer_list */ + { 260, -2 }, /* (94) alter_db_option ::= KEEP variable_list */ + { 260, -2 }, /* (95) alter_db_option ::= PAGES NK_INTEGER */ + { 260, -2 }, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ + { 260, -2 }, /* (97) alter_db_option ::= STRICT NK_INTEGER */ + { 260, -2 }, /* (98) alter_db_option ::= WAL NK_INTEGER */ + { 257, -1 }, /* (99) integer_list ::= NK_INTEGER */ + { 257, -3 }, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 258, -1 }, /* (101) variable_list ::= NK_VARIABLE */ + { 258, -3 }, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 259, -1 }, /* (103) retention_list ::= retention */ + { 259, -3 }, /* (104) retention_list ::= retention_list NK_COMMA retention */ + { 261, -3 }, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 240, -9 }, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 240, -3 }, /* (107) cmd ::= CREATE TABLE multi_create_clause */ + { 240, -9 }, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 240, -3 }, /* (109) cmd ::= DROP TABLE multi_drop_clause */ + { 240, -4 }, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ + { 240, -3 }, /* (111) cmd ::= ALTER TABLE alter_table_clause */ + { 240, -3 }, /* (112) cmd ::= ALTER STABLE alter_table_clause */ + { 269, -2 }, /* (113) alter_table_clause ::= full_table_name alter_table_options */ + { 269, -5 }, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 269, -4 }, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 269, -5 }, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 269, -5 }, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 269, -5 }, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 269, -4 }, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 269, -5 }, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 269, -5 }, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 269, -6 }, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 266, -1 }, /* (123) multi_create_clause ::= create_subtable_clause */ + { 266, -2 }, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 274, -10 }, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ + { 268, -1 }, /* (126) multi_drop_clause ::= drop_table_clause */ + { 268, -2 }, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 277, -2 }, /* (128) drop_table_clause ::= exists_opt full_table_name */ + { 275, 0 }, /* (129) specific_tags_opt ::= */ + { 275, -3 }, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ + { 262, -1 }, /* (131) full_table_name ::= table_name */ + { 262, -3 }, /* (132) full_table_name ::= db_name NK_DOT table_name */ + { 263, -1 }, /* (133) column_def_list ::= column_def */ + { 263, -3 }, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ + { 280, -2 }, /* (135) column_def ::= column_name type_name */ + { 280, -4 }, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ + { 272, -1 }, /* (137) type_name ::= BOOL */ + { 272, -1 }, /* (138) type_name ::= TINYINT */ + { 272, -1 }, /* (139) type_name ::= SMALLINT */ + { 272, -1 }, /* (140) type_name ::= INT */ + { 272, -1 }, /* (141) type_name ::= INTEGER */ + { 272, -1 }, /* (142) type_name ::= BIGINT */ + { 272, -1 }, /* (143) type_name ::= FLOAT */ + { 272, -1 }, /* (144) type_name ::= DOUBLE */ + { 272, -4 }, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 272, -1 }, /* (146) type_name ::= TIMESTAMP */ + { 272, -4 }, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 272, -2 }, /* (148) type_name ::= TINYINT UNSIGNED */ + { 272, -2 }, /* (149) type_name ::= SMALLINT UNSIGNED */ + { 272, -2 }, /* (150) type_name ::= INT UNSIGNED */ + { 272, -2 }, /* (151) type_name ::= BIGINT UNSIGNED */ + { 272, -1 }, /* (152) type_name ::= JSON */ + { 272, -4 }, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 272, -1 }, /* (154) type_name ::= MEDIUMBLOB */ + { 272, -1 }, /* (155) type_name ::= BLOB */ + { 272, -4 }, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 272, -1 }, /* (157) type_name ::= DECIMAL */ + { 272, -4 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 272, -6 }, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 264, 0 }, /* (160) tags_def_opt ::= */ + { 264, -1 }, /* (161) tags_def_opt ::= tags_def */ + { 267, -4 }, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 265, 0 }, /* (163) table_options ::= */ + { 265, -3 }, /* (164) table_options ::= table_options COMMENT NK_STRING */ + { 265, -3 }, /* (165) table_options ::= table_options DELAY NK_INTEGER */ + { 265, -3 }, /* (166) table_options ::= table_options FILE_FACTOR NK_FLOAT */ + { 265, -5 }, /* (167) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ + { 265, -3 }, /* (168) table_options ::= table_options TTL NK_INTEGER */ + { 265, -5 }, /* (169) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 270, -1 }, /* (170) alter_table_options ::= alter_table_option */ + { 270, -2 }, /* (171) alter_table_options ::= alter_table_options alter_table_option */ + { 282, -2 }, /* (172) alter_table_option ::= COMMENT NK_STRING */ + { 282, -2 }, /* (173) alter_table_option ::= TTL NK_INTEGER */ + { 278, -1 }, /* (174) col_name_list ::= col_name */ + { 278, -3 }, /* (175) col_name_list ::= col_name_list NK_COMMA col_name */ + { 283, -1 }, /* (176) col_name ::= column_name */ + { 240, -2 }, /* (177) cmd ::= SHOW DNODES */ + { 240, -2 }, /* (178) cmd ::= SHOW USERS */ + { 240, -2 }, /* (179) cmd ::= SHOW DATABASES */ + { 240, -4 }, /* (180) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 240, -4 }, /* (181) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 240, -3 }, /* (182) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 240, -2 }, /* (183) cmd ::= SHOW MNODES */ + { 240, -2 }, /* (184) cmd ::= SHOW MODULES */ + { 240, -2 }, /* (185) cmd ::= SHOW QNODES */ + { 240, -2 }, /* (186) cmd ::= SHOW FUNCTIONS */ + { 240, -5 }, /* (187) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 240, -2 }, /* (188) cmd ::= SHOW STREAMS */ + { 240, -2 }, /* (189) cmd ::= SHOW ACCOUNTS */ + { 240, -2 }, /* (190) cmd ::= SHOW APPS */ + { 240, -2 }, /* (191) cmd ::= SHOW CONNECTIONS */ + { 240, -2 }, /* (192) cmd ::= SHOW LICENCE */ + { 240, -2 }, /* (193) cmd ::= SHOW GRANTS */ + { 240, -4 }, /* (194) cmd ::= SHOW CREATE DATABASE db_name */ + { 240, -4 }, /* (195) cmd ::= SHOW CREATE TABLE full_table_name */ + { 240, -4 }, /* (196) cmd ::= SHOW CREATE STABLE full_table_name */ + { 240, -2 }, /* (197) cmd ::= SHOW QUERIES */ + { 240, -2 }, /* (198) cmd ::= SHOW SCORES */ + { 240, -2 }, /* (199) cmd ::= SHOW TOPICS */ + { 240, -2 }, /* (200) cmd ::= SHOW VARIABLES */ + { 240, -2 }, /* (201) cmd ::= SHOW BNODES */ + { 240, -2 }, /* (202) cmd ::= SHOW SNODES */ + { 240, -2 }, /* (203) cmd ::= SHOW CLUSTER */ + { 240, -2 }, /* (204) cmd ::= SHOW TRANSACTIONS */ + { 284, 0 }, /* (205) db_name_cond_opt ::= */ + { 284, -2 }, /* (206) db_name_cond_opt ::= db_name NK_DOT */ + { 285, 0 }, /* (207) like_pattern_opt ::= */ + { 285, -2 }, /* (208) like_pattern_opt ::= LIKE NK_STRING */ + { 286, -1 }, /* (209) table_name_cond ::= table_name */ + { 287, 0 }, /* (210) from_db_opt ::= */ + { 287, -2 }, /* (211) from_db_opt ::= FROM db_name */ + { 281, -1 }, /* (212) func_name_list ::= func_name */ + { 281, -3 }, /* (213) func_name_list ::= func_name_list NK_COMMA func_name */ + { 288, -1 }, /* (214) func_name ::= function_name */ + { 240, -8 }, /* (215) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ + { 240, -10 }, /* (216) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ + { 240, -6 }, /* (217) cmd ::= DROP INDEX exists_opt index_name ON table_name */ + { 291, 0 }, /* (218) index_options ::= */ + { 291, -9 }, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ + { 291, -11 }, /* (220) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ + { 292, -1 }, /* (221) func_list ::= func */ + { 292, -3 }, /* (222) func_list ::= func_list NK_COMMA func */ + { 295, -4 }, /* (223) func ::= function_name NK_LP expression_list NK_RP */ + { 240, -7 }, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ + { 240, -7 }, /* (225) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ + { 240, -4 }, /* (226) cmd ::= DROP TOPIC exists_opt topic_name */ + { 240, -6 }, /* (227) cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name */ + { 298, 0 }, /* (228) topic_options ::= */ + { 298, -3 }, /* (229) topic_options ::= topic_options WITH TABLE */ + { 298, -3 }, /* (230) topic_options ::= topic_options WITH SCHEMA */ + { 298, -3 }, /* (231) topic_options ::= topic_options WITH TAG */ + { 240, -2 }, /* (232) cmd ::= DESC full_table_name */ + { 240, -2 }, /* (233) cmd ::= DESCRIBE full_table_name */ + { 240, -3 }, /* (234) cmd ::= RESET QUERY CACHE */ + { 240, -4 }, /* (235) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ + { 301, 0 }, /* (236) analyze_opt ::= */ + { 301, -1 }, /* (237) analyze_opt ::= ANALYZE */ + { 302, 0 }, /* (238) explain_options ::= */ + { 302, -3 }, /* (239) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 302, -3 }, /* (240) explain_options ::= explain_options RATIO NK_FLOAT */ + { 240, -6 }, /* (241) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ + { 240, -10 }, /* (242) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 240, -4 }, /* (243) cmd ::= DROP FUNCTION exists_opt function_name */ + { 303, 0 }, /* (244) agg_func_opt ::= */ + { 303, -1 }, /* (245) agg_func_opt ::= AGGREGATE */ + { 304, 0 }, /* (246) bufsize_opt ::= */ + { 304, -2 }, /* (247) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 240, -8 }, /* (248) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ + { 240, -4 }, /* (249) cmd ::= DROP STREAM exists_opt stream_name */ + { 307, 0 }, /* (250) into_opt ::= */ + { 307, -2 }, /* (251) into_opt ::= INTO full_table_name */ + { 306, 0 }, /* (252) stream_options ::= */ + { 306, -3 }, /* (253) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 306, -3 }, /* (254) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 306, -3 }, /* (255) stream_options ::= stream_options WATERMARK duration_literal */ + { 240, -3 }, /* (256) cmd ::= KILL CONNECTION NK_INTEGER */ + { 240, -3 }, /* (257) cmd ::= KILL QUERY NK_INTEGER */ + { 240, -3 }, /* (258) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 240, -4 }, /* (259) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 240, -4 }, /* (260) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 240, -3 }, /* (261) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 308, -2 }, /* (262) dnode_list ::= DNODE NK_INTEGER */ + { 308, -3 }, /* (263) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 240, -3 }, /* (264) cmd ::= SYNCDB db_name REPLICA */ + { 240, -1 }, /* (265) cmd ::= query_expression */ + { 243, -1 }, /* (266) literal ::= NK_INTEGER */ + { 243, -1 }, /* (267) literal ::= NK_FLOAT */ + { 243, -1 }, /* (268) literal ::= NK_STRING */ + { 243, -1 }, /* (269) literal ::= NK_BOOL */ + { 243, -2 }, /* (270) literal ::= TIMESTAMP NK_STRING */ + { 243, -1 }, /* (271) literal ::= duration_literal */ + { 243, -1 }, /* (272) literal ::= NULL */ + { 243, -1 }, /* (273) literal ::= NK_QUESTION */ + { 293, -1 }, /* (274) duration_literal ::= NK_VARIABLE */ + { 309, -1 }, /* (275) signed ::= NK_INTEGER */ + { 309, -2 }, /* (276) signed ::= NK_PLUS NK_INTEGER */ + { 309, -2 }, /* (277) signed ::= NK_MINUS NK_INTEGER */ + { 309, -1 }, /* (278) signed ::= NK_FLOAT */ + { 309, -2 }, /* (279) signed ::= NK_PLUS NK_FLOAT */ + { 309, -2 }, /* (280) signed ::= NK_MINUS NK_FLOAT */ + { 273, -1 }, /* (281) signed_literal ::= signed */ + { 273, -1 }, /* (282) signed_literal ::= NK_STRING */ + { 273, -1 }, /* (283) signed_literal ::= NK_BOOL */ + { 273, -2 }, /* (284) signed_literal ::= TIMESTAMP NK_STRING */ + { 273, -1 }, /* (285) signed_literal ::= duration_literal */ + { 273, -1 }, /* (286) signed_literal ::= NULL */ + { 273, -1 }, /* (287) signed_literal ::= literal_func */ + { 276, -1 }, /* (288) literal_list ::= signed_literal */ + { 276, -3 }, /* (289) literal_list ::= literal_list NK_COMMA signed_literal */ + { 250, -1 }, /* (290) db_name ::= NK_ID */ + { 279, -1 }, /* (291) table_name ::= NK_ID */ + { 271, -1 }, /* (292) column_name ::= NK_ID */ + { 289, -1 }, /* (293) function_name ::= NK_ID */ + { 311, -1 }, /* (294) table_alias ::= NK_ID */ + { 312, -1 }, /* (295) column_alias ::= NK_ID */ + { 245, -1 }, /* (296) user_name ::= NK_ID */ + { 290, -1 }, /* (297) index_name ::= NK_ID */ + { 297, -1 }, /* (298) topic_name ::= NK_ID */ + { 305, -1 }, /* (299) stream_name ::= NK_ID */ + { 300, -1 }, /* (300) cgroup_name ::= NK_ID */ + { 313, -1 }, /* (301) expression ::= literal */ + { 313, -1 }, /* (302) expression ::= pseudo_column */ + { 313, -1 }, /* (303) expression ::= column_reference */ + { 313, -1 }, /* (304) expression ::= function_expression */ + { 313, -1 }, /* (305) expression ::= subquery */ + { 313, -3 }, /* (306) expression ::= NK_LP expression NK_RP */ + { 313, -2 }, /* (307) expression ::= NK_PLUS expression */ + { 313, -2 }, /* (308) expression ::= NK_MINUS expression */ + { 313, -3 }, /* (309) expression ::= expression NK_PLUS expression */ + { 313, -3 }, /* (310) expression ::= expression NK_MINUS expression */ + { 313, -3 }, /* (311) expression ::= expression NK_STAR expression */ + { 313, -3 }, /* (312) expression ::= expression NK_SLASH expression */ + { 313, -3 }, /* (313) expression ::= expression NK_REM expression */ + { 313, -3 }, /* (314) expression ::= column_reference NK_ARROW NK_STRING */ + { 296, -1 }, /* (315) expression_list ::= expression */ + { 296, -3 }, /* (316) expression_list ::= expression_list NK_COMMA expression */ + { 315, -1 }, /* (317) column_reference ::= column_name */ + { 315, -3 }, /* (318) column_reference ::= table_name NK_DOT column_name */ + { 314, -1 }, /* (319) pseudo_column ::= ROWTS */ + { 314, -1 }, /* (320) pseudo_column ::= TBNAME */ + { 314, -3 }, /* (321) pseudo_column ::= table_name NK_DOT TBNAME */ + { 314, -1 }, /* (322) pseudo_column ::= QSTARTTS */ + { 314, -1 }, /* (323) pseudo_column ::= QENDTS */ + { 314, -1 }, /* (324) pseudo_column ::= WSTARTTS */ + { 314, -1 }, /* (325) pseudo_column ::= WENDTS */ + { 314, -1 }, /* (326) pseudo_column ::= WDURATION */ + { 316, -4 }, /* (327) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 316, -4 }, /* (328) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 316, -6 }, /* (329) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ + { 316, -1 }, /* (330) function_expression ::= literal_func */ + { 310, -3 }, /* (331) literal_func ::= noarg_func NK_LP NK_RP */ + { 310, -1 }, /* (332) literal_func ::= NOW */ + { 320, -1 }, /* (333) noarg_func ::= NOW */ + { 320, -1 }, /* (334) noarg_func ::= TODAY */ + { 320, -1 }, /* (335) noarg_func ::= TIMEZONE */ + { 318, -1 }, /* (336) star_func ::= COUNT */ + { 318, -1 }, /* (337) star_func ::= FIRST */ + { 318, -1 }, /* (338) star_func ::= LAST */ + { 318, -1 }, /* (339) star_func ::= LAST_ROW */ + { 319, -1 }, /* (340) star_func_para_list ::= NK_STAR */ + { 319, -1 }, /* (341) star_func_para_list ::= other_para_list */ + { 321, -1 }, /* (342) other_para_list ::= star_func_para */ + { 321, -3 }, /* (343) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 322, -1 }, /* (344) star_func_para ::= expression */ + { 322, -3 }, /* (345) star_func_para ::= table_name NK_DOT NK_STAR */ + { 323, -3 }, /* (346) predicate ::= expression compare_op expression */ + { 323, -5 }, /* (347) predicate ::= expression BETWEEN expression AND expression */ + { 323, -6 }, /* (348) predicate ::= expression NOT BETWEEN expression AND expression */ + { 323, -3 }, /* (349) predicate ::= expression IS NULL */ + { 323, -4 }, /* (350) predicate ::= expression IS NOT NULL */ + { 323, -3 }, /* (351) predicate ::= expression in_op in_predicate_value */ + { 324, -1 }, /* (352) compare_op ::= NK_LT */ + { 324, -1 }, /* (353) compare_op ::= NK_GT */ + { 324, -1 }, /* (354) compare_op ::= NK_LE */ + { 324, -1 }, /* (355) compare_op ::= NK_GE */ + { 324, -1 }, /* (356) compare_op ::= NK_NE */ + { 324, -1 }, /* (357) compare_op ::= NK_EQ */ + { 324, -1 }, /* (358) compare_op ::= LIKE */ + { 324, -2 }, /* (359) compare_op ::= NOT LIKE */ + { 324, -1 }, /* (360) compare_op ::= MATCH */ + { 324, -1 }, /* (361) compare_op ::= NMATCH */ + { 324, -1 }, /* (362) compare_op ::= CONTAINS */ + { 325, -1 }, /* (363) in_op ::= IN */ + { 325, -2 }, /* (364) in_op ::= NOT IN */ + { 326, -3 }, /* (365) in_predicate_value ::= NK_LP expression_list NK_RP */ + { 327, -1 }, /* (366) boolean_value_expression ::= boolean_primary */ + { 327, -2 }, /* (367) boolean_value_expression ::= NOT boolean_primary */ + { 327, -3 }, /* (368) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 327, -3 }, /* (369) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 328, -1 }, /* (370) boolean_primary ::= predicate */ + { 328, -3 }, /* (371) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 329, -1 }, /* (372) common_expression ::= expression */ + { 329, -1 }, /* (373) common_expression ::= boolean_value_expression */ + { 330, -2 }, /* (374) from_clause ::= FROM table_reference_list */ + { 331, -1 }, /* (375) table_reference_list ::= table_reference */ + { 331, -3 }, /* (376) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 332, -1 }, /* (377) table_reference ::= table_primary */ + { 332, -1 }, /* (378) table_reference ::= joined_table */ + { 333, -2 }, /* (379) table_primary ::= table_name alias_opt */ + { 333, -4 }, /* (380) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 333, -2 }, /* (381) table_primary ::= subquery alias_opt */ + { 333, -1 }, /* (382) table_primary ::= parenthesized_joined_table */ + { 335, 0 }, /* (383) alias_opt ::= */ + { 335, -1 }, /* (384) alias_opt ::= table_alias */ + { 335, -2 }, /* (385) alias_opt ::= AS table_alias */ + { 336, -3 }, /* (386) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 336, -3 }, /* (387) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 334, -6 }, /* (388) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 337, 0 }, /* (389) join_type ::= */ + { 337, -1 }, /* (390) join_type ::= INNER */ + { 339, -9 }, /* (391) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + { 340, 0 }, /* (392) set_quantifier_opt ::= */ + { 340, -1 }, /* (393) set_quantifier_opt ::= DISTINCT */ + { 340, -1 }, /* (394) set_quantifier_opt ::= ALL */ + { 341, -1 }, /* (395) select_list ::= NK_STAR */ + { 341, -1 }, /* (396) select_list ::= select_sublist */ + { 347, -1 }, /* (397) select_sublist ::= select_item */ + { 347, -3 }, /* (398) select_sublist ::= select_sublist NK_COMMA select_item */ + { 348, -1 }, /* (399) select_item ::= common_expression */ + { 348, -2 }, /* (400) select_item ::= common_expression column_alias */ + { 348, -3 }, /* (401) select_item ::= common_expression AS column_alias */ + { 348, -3 }, /* (402) select_item ::= table_name NK_DOT NK_STAR */ + { 342, 0 }, /* (403) where_clause_opt ::= */ + { 342, -2 }, /* (404) where_clause_opt ::= WHERE search_condition */ + { 343, 0 }, /* (405) partition_by_clause_opt ::= */ + { 343, -3 }, /* (406) partition_by_clause_opt ::= PARTITION BY expression_list */ + { 344, 0 }, /* (407) twindow_clause_opt ::= */ + { 344, -6 }, /* (408) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 344, -4 }, /* (409) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ + { 344, -6 }, /* (410) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 344, -8 }, /* (411) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 294, 0 }, /* (412) sliding_opt ::= */ + { 294, -4 }, /* (413) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 349, 0 }, /* (414) fill_opt ::= */ + { 349, -4 }, /* (415) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 349, -6 }, /* (416) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 350, -1 }, /* (417) fill_mode ::= NONE */ + { 350, -1 }, /* (418) fill_mode ::= PREV */ + { 350, -1 }, /* (419) fill_mode ::= NULL */ + { 350, -1 }, /* (420) fill_mode ::= LINEAR */ + { 350, -1 }, /* (421) fill_mode ::= NEXT */ + { 345, 0 }, /* (422) group_by_clause_opt ::= */ + { 345, -3 }, /* (423) group_by_clause_opt ::= GROUP BY group_by_list */ + { 351, -1 }, /* (424) group_by_list ::= expression */ + { 351, -3 }, /* (425) group_by_list ::= group_by_list NK_COMMA expression */ + { 346, 0 }, /* (426) having_clause_opt ::= */ + { 346, -2 }, /* (427) having_clause_opt ::= HAVING search_condition */ + { 299, -4 }, /* (428) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 352, -1 }, /* (429) query_expression_body ::= query_primary */ + { 352, -4 }, /* (430) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ + { 352, -3 }, /* (431) query_expression_body ::= query_expression_body UNION query_expression_body */ + { 356, -1 }, /* (432) query_primary ::= query_specification */ + { 356, -6 }, /* (433) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ + { 353, 0 }, /* (434) order_by_clause_opt ::= */ + { 353, -3 }, /* (435) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 354, 0 }, /* (436) slimit_clause_opt ::= */ + { 354, -2 }, /* (437) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 354, -4 }, /* (438) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 354, -4 }, /* (439) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 355, 0 }, /* (440) limit_clause_opt ::= */ + { 355, -2 }, /* (441) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 355, -4 }, /* (442) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 355, -4 }, /* (443) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 317, -3 }, /* (444) subquery ::= NK_LP query_expression NK_RP */ + { 338, -1 }, /* (445) search_condition ::= common_expression */ + { 357, -1 }, /* (446) sort_specification_list ::= sort_specification */ + { 357, -3 }, /* (447) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 358, -3 }, /* (448) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ + { 359, 0 }, /* (449) ordering_specification_opt ::= */ + { 359, -1 }, /* (450) ordering_specification_opt ::= ASC */ + { 359, -1 }, /* (451) ordering_specification_opt ::= DESC */ + { 360, 0 }, /* (452) null_ordering_opt ::= */ + { 360, -2 }, /* (453) null_ordering_opt ::= NULLS FIRST */ + { 360, -2 }, /* (454) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3099,11 +3114,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,239,&yymsp[0].minor); + yy_destructor(yypParser,241,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,240,&yymsp[0].minor); + yy_destructor(yypParser,242,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3117,20 +3132,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,239,&yymsp[-2].minor); +{ yy_destructor(yypParser,241,&yymsp[-2].minor); { } - yy_destructor(yypParser,241,&yymsp[0].minor); + yy_destructor(yypParser,243,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,242,&yymsp[0].minor); +{ yy_destructor(yypParser,244,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,240,&yymsp[-1].minor); +{ yy_destructor(yypParser,242,&yymsp[-1].minor); { } - yy_destructor(yypParser,242,&yymsp[0].minor); + yy_destructor(yypParser,244,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3144,63 +3159,63 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,241,&yymsp[0].minor); + yy_destructor(yypParser,243,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy105, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy53, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy105, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy53, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy53); } break; case 28: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy593, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy435, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } break; case 29: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy593, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy435, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } break; case 30: /* privileges ::= ALL */ -{ yymsp[0].minor.yy593 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy435 = PRIVILEGE_TYPE_ALL; } break; case 31: /* privileges ::= priv_type_list */ case 32: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==32); -{ yylhsminor.yy593 = yymsp[0].minor.yy593; } - yymsp[0].minor.yy593 = yylhsminor.yy593; +{ yylhsminor.yy435 = yymsp[0].minor.yy435; } + yymsp[0].minor.yy435 = yylhsminor.yy435; break; case 33: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy593 = yymsp[-2].minor.yy593 | yymsp[0].minor.yy593; } - yymsp[-2].minor.yy593 = yylhsminor.yy593; +{ yylhsminor.yy435 = yymsp[-2].minor.yy435 | yymsp[0].minor.yy435; } + yymsp[-2].minor.yy435 = yylhsminor.yy435; break; case 34: /* priv_type ::= READ */ -{ yymsp[0].minor.yy593 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy435 = PRIVILEGE_TYPE_READ; } break; case 35: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy593 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy435 = PRIVILEGE_TYPE_WRITE; } break; case 36: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy105 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy105 = yylhsminor.yy105; +{ yylhsminor.yy53 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy53 = yylhsminor.yy53; break; case 37: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy105 = yymsp[-2].minor.yy105; } - yymsp[-2].minor.yy105 = yylhsminor.yy105; +{ yylhsminor.yy53 = yymsp[-2].minor.yy53; } + yymsp[-2].minor.yy53 = yylhsminor.yy53; break; case 38: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy105, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy53, NULL); } break; case 39: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0); } break; case 40: /* cmd ::= DROP DNODE NK_INTEGER */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 41: /* cmd ::= DROP DNODE dnode_endpoint */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy53); } break; case 42: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3217,25 +3232,26 @@ static YYACTIONTYPE yy_reduce( case 46: /* dnode_endpoint ::= NK_STRING */ case 47: /* dnode_host_name ::= NK_ID */ yytestcase(yyruleno==47); case 48: /* dnode_host_name ::= NK_IPTOKEN */ yytestcase(yyruleno==48); - case 288: /* db_name ::= NK_ID */ yytestcase(yyruleno==288); - case 289: /* table_name ::= NK_ID */ yytestcase(yyruleno==289); - case 290: /* column_name ::= NK_ID */ yytestcase(yyruleno==290); - case 291: /* function_name ::= NK_ID */ yytestcase(yyruleno==291); - case 292: /* table_alias ::= NK_ID */ yytestcase(yyruleno==292); - case 293: /* column_alias ::= NK_ID */ yytestcase(yyruleno==293); - case 294: /* user_name ::= NK_ID */ yytestcase(yyruleno==294); - case 295: /* index_name ::= NK_ID */ yytestcase(yyruleno==295); - case 296: /* topic_name ::= NK_ID */ yytestcase(yyruleno==296); - case 297: /* stream_name ::= NK_ID */ yytestcase(yyruleno==297); - case 330: /* noarg_func ::= NOW */ yytestcase(yyruleno==330); - case 331: /* noarg_func ::= TODAY */ yytestcase(yyruleno==331); - case 332: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==332); - case 333: /* star_func ::= COUNT */ yytestcase(yyruleno==333); - case 334: /* star_func ::= FIRST */ yytestcase(yyruleno==334); - case 335: /* star_func ::= LAST */ yytestcase(yyruleno==335); - case 336: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==336); -{ yylhsminor.yy105 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy105 = yylhsminor.yy105; + case 290: /* db_name ::= NK_ID */ yytestcase(yyruleno==290); + case 291: /* table_name ::= NK_ID */ yytestcase(yyruleno==291); + case 292: /* column_name ::= NK_ID */ yytestcase(yyruleno==292); + case 293: /* function_name ::= NK_ID */ yytestcase(yyruleno==293); + case 294: /* table_alias ::= NK_ID */ yytestcase(yyruleno==294); + case 295: /* column_alias ::= NK_ID */ yytestcase(yyruleno==295); + case 296: /* user_name ::= NK_ID */ yytestcase(yyruleno==296); + case 297: /* index_name ::= NK_ID */ yytestcase(yyruleno==297); + case 298: /* topic_name ::= NK_ID */ yytestcase(yyruleno==298); + case 299: /* stream_name ::= NK_ID */ yytestcase(yyruleno==299); + case 300: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==300); + case 333: /* noarg_func ::= NOW */ yytestcase(yyruleno==333); + case 334: /* noarg_func ::= TODAY */ yytestcase(yyruleno==334); + case 335: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==335); + case 336: /* star_func ::= COUNT */ yytestcase(yyruleno==336); + case 337: /* star_func ::= FIRST */ yytestcase(yyruleno==337); + case 338: /* star_func ::= LAST */ yytestcase(yyruleno==338); + case 339: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==339); +{ yylhsminor.yy53 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy53 = yylhsminor.yy53; break; case 49: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3268,1154 +3284,1161 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 59: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy617, &yymsp[-1].minor.yy105, yymsp[0].minor.yy172); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy603, &yymsp[-1].minor.yy53, yymsp[0].minor.yy636); } break; case 60: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } break; case 61: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy53); } break; case 62: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy105, yymsp[0].minor.yy172); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy53, yymsp[0].minor.yy636); } break; case 63: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy617 = true; } +{ yymsp[-2].minor.yy603 = true; } break; case 64: /* not_exists_opt ::= */ case 66: /* exists_opt ::= */ yytestcase(yyruleno==66); - case 234: /* analyze_opt ::= */ yytestcase(yyruleno==234); - case 242: /* agg_func_opt ::= */ yytestcase(yyruleno==242); - case 389: /* set_quantifier_opt ::= */ yytestcase(yyruleno==389); -{ yymsp[1].minor.yy617 = false; } + case 236: /* analyze_opt ::= */ yytestcase(yyruleno==236); + case 244: /* agg_func_opt ::= */ yytestcase(yyruleno==244); + case 392: /* set_quantifier_opt ::= */ yytestcase(yyruleno==392); +{ yymsp[1].minor.yy603 = false; } break; case 65: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy617 = true; } +{ yymsp[-1].minor.yy603 = true; } break; case 67: /* db_options ::= */ -{ yymsp[1].minor.yy172 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy636 = createDefaultDatabaseOptions(pCxt); } break; case 68: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 69: /* db_options ::= db_options CACHELAST NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 70: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 71: /* db_options ::= db_options DAYS NK_INTEGER */ case 72: /* db_options ::= db_options DAYS NK_VARIABLE */ yytestcase(yyruleno==72); -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 73: /* db_options ::= db_options FSYNC NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 74: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 75: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 76: /* db_options ::= db_options KEEP integer_list */ case 77: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==77); -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_KEEP, yymsp[0].minor.yy60); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_KEEP, yymsp[0].minor.yy236); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 78: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 79: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 80: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 81: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 82: /* db_options ::= db_options STRICT NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 83: /* db_options ::= db_options WAL NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 84: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 85: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; case 86: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_RETENTIONS, yymsp[0].minor.yy60); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; - break; - case 87: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy172 = createAlterDatabaseOptions(pCxt); yylhsminor.yy172 = setAlterDatabaseOption(pCxt, yylhsminor.yy172, &yymsp[0].minor.yy609); } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 88: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy172 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy172, &yymsp[0].minor.yy609); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; - break; - case 89: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } - break; - case 90: /* alter_db_option ::= CACHELAST NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } - break; - case 91: /* alter_db_option ::= FSYNC NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } - break; - case 92: /* alter_db_option ::= KEEP integer_list */ - case 93: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==93); -{ yymsp[-1].minor.yy609.type = DB_OPTION_KEEP; yymsp[-1].minor.yy609.pList = yymsp[0].minor.yy60; } - break; - case 94: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_PAGES; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } - break; - case 95: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } - break; - case 96: /* alter_db_option ::= STRICT NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_STRICT; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } - break; - case 97: /* alter_db_option ::= WAL NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_WAL; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } - break; - case 98: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy60 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy60 = yylhsminor.yy60; - break; - case 99: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 261: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==261); -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy60 = yylhsminor.yy60; - break; - case 100: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy60 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy60 = yylhsminor.yy60; - break; - case 101: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy60 = yylhsminor.yy60; - break; - case 102: /* retention_list ::= retention */ - case 122: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==122); - case 125: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==125); - case 132: /* column_def_list ::= column_def */ yytestcase(yyruleno==132); - case 173: /* col_name_list ::= col_name */ yytestcase(yyruleno==173); - case 211: /* func_name_list ::= func_name */ yytestcase(yyruleno==211); - case 220: /* func_list ::= func */ yytestcase(yyruleno==220); - case 286: /* literal_list ::= signed_literal */ yytestcase(yyruleno==286); - case 339: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==339); - case 394: /* select_sublist ::= select_item */ yytestcase(yyruleno==394); - case 443: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==443); -{ yylhsminor.yy60 = createNodeList(pCxt, yymsp[0].minor.yy172); } - yymsp[0].minor.yy60 = yylhsminor.yy60; - break; - case 103: /* retention_list ::= retention_list NK_COMMA retention */ - case 133: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==133); - case 174: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==174); - case 212: /* func_name_list ::= func_name_list NK_COMMA func_name */ yytestcase(yyruleno==212); - case 221: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==221); - case 287: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==287); - case 340: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==340); - case 395: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==395); - case 444: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==444); -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, yymsp[0].minor.yy172); } - yymsp[-2].minor.yy60 = yylhsminor.yy60; - break; - case 104: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy172 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; - break; - case 105: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 107: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==107); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy617, yymsp[-5].minor.yy172, yymsp[-3].minor.yy60, yymsp[-1].minor.yy60, yymsp[0].minor.yy172); } - break; - case 106: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy60); } - break; - case 108: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy60); } - break; - case 109: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy617, yymsp[0].minor.yy172); } - break; - case 110: /* cmd ::= ALTER TABLE alter_table_clause */ - case 111: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==111); - case 263: /* cmd ::= query_expression */ yytestcase(yyruleno==263); -{ pCxt->pRootNode = yymsp[0].minor.yy172; } - break; - case 112: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy172 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; - break; - case 113: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; - break; - case 114: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy172 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy172, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy105); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; - break; - case 115: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_RETENTIONS, yymsp[0].minor.yy236); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; + break; + case 87: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ +{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; + break; + case 88: /* alter_db_options ::= alter_db_option */ +{ yylhsminor.yy636 = createAlterDatabaseOptions(pCxt); yylhsminor.yy636 = setAlterDatabaseOption(pCxt, yylhsminor.yy636, &yymsp[0].minor.yy25); } + yymsp[0].minor.yy636 = yylhsminor.yy636; + break; + case 89: /* alter_db_options ::= alter_db_options alter_db_option */ +{ yylhsminor.yy636 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy636, &yymsp[0].minor.yy25); } + yymsp[-1].minor.yy636 = yylhsminor.yy636; + break; + case 90: /* alter_db_option ::= BUFFER NK_INTEGER */ +{ yymsp[-1].minor.yy25.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } + break; + case 91: /* alter_db_option ::= CACHELAST NK_INTEGER */ +{ yymsp[-1].minor.yy25.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } + break; + case 92: /* alter_db_option ::= FSYNC NK_INTEGER */ +{ yymsp[-1].minor.yy25.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } + break; + case 93: /* alter_db_option ::= KEEP integer_list */ + case 94: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==94); +{ yymsp[-1].minor.yy25.type = DB_OPTION_KEEP; yymsp[-1].minor.yy25.pList = yymsp[0].minor.yy236; } + break; + case 95: /* alter_db_option ::= PAGES NK_INTEGER */ +{ yymsp[-1].minor.yy25.type = DB_OPTION_PAGES; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } + break; + case 96: /* alter_db_option ::= REPLICA NK_INTEGER */ +{ yymsp[-1].minor.yy25.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } + break; + case 97: /* alter_db_option ::= STRICT NK_INTEGER */ +{ yymsp[-1].minor.yy25.type = DB_OPTION_STRICT; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } + break; + case 98: /* alter_db_option ::= WAL NK_INTEGER */ +{ yymsp[-1].minor.yy25.type = DB_OPTION_WAL; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } + break; + case 99: /* integer_list ::= NK_INTEGER */ +{ yylhsminor.yy236 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy236 = yylhsminor.yy236; + break; + case 100: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ + case 263: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==263); +{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy236 = yylhsminor.yy236; + break; + case 101: /* variable_list ::= NK_VARIABLE */ +{ yylhsminor.yy236 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy236 = yylhsminor.yy236; + break; + case 102: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ +{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy236 = yylhsminor.yy236; + break; + case 103: /* retention_list ::= retention */ + case 123: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==123); + case 126: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==126); + case 133: /* column_def_list ::= column_def */ yytestcase(yyruleno==133); + case 174: /* col_name_list ::= col_name */ yytestcase(yyruleno==174); + case 212: /* func_name_list ::= func_name */ yytestcase(yyruleno==212); + case 221: /* func_list ::= func */ yytestcase(yyruleno==221); + case 288: /* literal_list ::= signed_literal */ yytestcase(yyruleno==288); + case 342: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==342); + case 397: /* select_sublist ::= select_item */ yytestcase(yyruleno==397); + case 446: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==446); +{ yylhsminor.yy236 = createNodeList(pCxt, yymsp[0].minor.yy636); } + yymsp[0].minor.yy236 = yylhsminor.yy236; + break; + case 104: /* retention_list ::= retention_list NK_COMMA retention */ + case 134: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==134); + case 175: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==175); + case 213: /* func_name_list ::= func_name_list NK_COMMA func_name */ yytestcase(yyruleno==213); + case 222: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==222); + case 289: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==289); + case 343: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==343); + case 398: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==398); + case 447: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==447); +{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, yymsp[0].minor.yy636); } + yymsp[-2].minor.yy236 = yylhsminor.yy236; + break; + case 105: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ +{ yylhsminor.yy636 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; + break; + case 106: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + case 108: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==108); +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy603, yymsp[-5].minor.yy636, yymsp[-3].minor.yy236, yymsp[-1].minor.yy236, yymsp[0].minor.yy636); } + break; + case 107: /* cmd ::= CREATE TABLE multi_create_clause */ +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy236); } + break; + case 109: /* cmd ::= DROP TABLE multi_drop_clause */ +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy236); } + break; + case 110: /* cmd ::= DROP STABLE exists_opt full_table_name */ +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy603, yymsp[0].minor.yy636); } + break; + case 111: /* cmd ::= ALTER TABLE alter_table_clause */ + case 112: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==112); + case 265: /* cmd ::= query_expression */ yytestcase(yyruleno==265); +{ pCxt->pRootNode = yymsp[0].minor.yy636; } + break; + case 113: /* alter_table_clause ::= full_table_name alter_table_options */ +{ yylhsminor.yy636 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } + yymsp[-1].minor.yy636 = yylhsminor.yy636; + break; + case 114: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ +{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } + yymsp[-4].minor.yy636 = yylhsminor.yy636; + break; + case 115: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ +{ yylhsminor.yy636 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy636, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy53); } + yymsp[-3].minor.yy636 = yylhsminor.yy636; + break; + case 116: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ +{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } + yymsp[-4].minor.yy636 = yylhsminor.yy636; break; - case 116: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy172 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; - break; - case 117: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; - break; - case 118: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy172 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy172, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy105); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + case 117: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ +{ yylhsminor.yy636 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } + yymsp[-4].minor.yy636 = yylhsminor.yy636; + break; + case 118: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ +{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } + yymsp[-4].minor.yy636 = yylhsminor.yy636; + break; + case 119: /* alter_table_clause ::= full_table_name DROP TAG column_name */ +{ yylhsminor.yy636 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy636, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy53); } + yymsp[-3].minor.yy636 = yylhsminor.yy636; break; - case 119: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; + case 120: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ +{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } + yymsp[-4].minor.yy636 = yylhsminor.yy636; break; - case 120: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy172 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; - break; - case 121: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy172 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy172, &yymsp[-2].minor.yy105, yymsp[0].minor.yy172); } - yymsp[-5].minor.yy172 = yylhsminor.yy172; + case 121: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ +{ yylhsminor.yy636 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } + yymsp[-4].minor.yy636 = yylhsminor.yy636; + break; + case 122: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ +{ yylhsminor.yy636 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy636, &yymsp[-2].minor.yy53, yymsp[0].minor.yy636); } + yymsp[-5].minor.yy636 = yylhsminor.yy636; break; - case 123: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 126: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==126); -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-1].minor.yy60, yymsp[0].minor.yy172); } - yymsp[-1].minor.yy60 = yylhsminor.yy60; + case 124: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 127: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==127); +{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-1].minor.yy236, yymsp[0].minor.yy636); } + yymsp[-1].minor.yy236 = yylhsminor.yy236; break; - case 124: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ -{ yylhsminor.yy172 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy617, yymsp[-8].minor.yy172, yymsp[-6].minor.yy172, yymsp[-5].minor.yy60, yymsp[-2].minor.yy60, yymsp[0].minor.yy172); } - yymsp[-9].minor.yy172 = yylhsminor.yy172; + case 125: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ +{ yylhsminor.yy636 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy603, yymsp[-8].minor.yy636, yymsp[-6].minor.yy636, yymsp[-5].minor.yy236, yymsp[-2].minor.yy236, yymsp[0].minor.yy636); } + yymsp[-9].minor.yy636 = yylhsminor.yy636; break; - case 127: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy172 = createDropTableClause(pCxt, yymsp[-1].minor.yy617, yymsp[0].minor.yy172); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 128: /* drop_table_clause ::= exists_opt full_table_name */ +{ yylhsminor.yy636 = createDropTableClause(pCxt, yymsp[-1].minor.yy603, yymsp[0].minor.yy636); } + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 128: /* specific_tags_opt ::= */ - case 159: /* tags_def_opt ::= */ yytestcase(yyruleno==159); - case 402: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==402); - case 419: /* group_by_clause_opt ::= */ yytestcase(yyruleno==419); - case 431: /* order_by_clause_opt ::= */ yytestcase(yyruleno==431); -{ yymsp[1].minor.yy60 = NULL; } + case 129: /* specific_tags_opt ::= */ + case 160: /* tags_def_opt ::= */ yytestcase(yyruleno==160); + case 405: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==405); + case 422: /* group_by_clause_opt ::= */ yytestcase(yyruleno==422); + case 434: /* order_by_clause_opt ::= */ yytestcase(yyruleno==434); +{ yymsp[1].minor.yy236 = NULL; } break; - case 129: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy60 = yymsp[-1].minor.yy60; } + case 130: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ +{ yymsp[-2].minor.yy236 = yymsp[-1].minor.yy236; } break; - case 130: /* full_table_name ::= table_name */ -{ yylhsminor.yy172 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy105, NULL); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 131: /* full_table_name ::= table_name */ +{ yylhsminor.yy636 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy53, NULL); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 131: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy172 = createRealTableNode(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105, NULL); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 132: /* full_table_name ::= db_name NK_DOT table_name */ +{ yylhsminor.yy636 = createRealTableNode(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53, NULL); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 134: /* column_def ::= column_name type_name */ -{ yylhsminor.yy172 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248, NULL); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 135: /* column_def ::= column_name type_name */ +{ yylhsminor.yy636 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450, NULL); } + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 135: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy172 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy105, yymsp[-2].minor.yy248, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + case 136: /* column_def ::= column_name type_name COMMENT NK_STRING */ +{ yylhsminor.yy636 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy53, yymsp[-2].minor.yy450, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy636 = yylhsminor.yy636; break; - case 136: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_BOOL); } + case 137: /* type_name ::= BOOL */ +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_BOOL); } break; - case 137: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_TINYINT); } + case 138: /* type_name ::= TINYINT */ +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; - case 138: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_SMALLINT); } + case 139: /* type_name ::= SMALLINT */ +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; - case 139: /* type_name ::= INT */ - case 140: /* type_name ::= INTEGER */ yytestcase(yyruleno==140); -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_INT); } + case 140: /* type_name ::= INT */ + case 141: /* type_name ::= INTEGER */ yytestcase(yyruleno==141); +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_INT); } break; - case 141: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_BIGINT); } + case 142: /* type_name ::= BIGINT */ +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; - case 142: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_FLOAT); } + case 143: /* type_name ::= FLOAT */ +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; - case 143: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_DOUBLE); } + case 144: /* type_name ::= DOUBLE */ +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; - case 144: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } + case 145: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; - case 145: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } + case 146: /* type_name ::= TIMESTAMP */ +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; - case 146: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } + case 147: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; - case 147: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_UTINYINT); } + case 148: /* type_name ::= TINYINT UNSIGNED */ +{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; - case 148: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_USMALLINT); } + case 149: /* type_name ::= SMALLINT UNSIGNED */ +{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; - case 149: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_UINT); } + case 150: /* type_name ::= INT UNSIGNED */ +{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_UINT); } break; - case 150: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_UBIGINT); } + case 151: /* type_name ::= BIGINT UNSIGNED */ +{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; - case 151: /* type_name ::= JSON */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_JSON); } + case 152: /* type_name ::= JSON */ +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_JSON); } break; - case 152: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } + case 153: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; - case 153: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } + case 154: /* type_name ::= MEDIUMBLOB */ +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; - case 154: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_BLOB); } + case 155: /* type_name ::= BLOB */ +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_BLOB); } break; - case 155: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } + case 156: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; - case 156: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 157: /* type_name ::= DECIMAL */ +{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 157: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy248 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 158: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy450 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 158: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy248 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 159: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ +{ yymsp[-5].minor.yy450 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 160: /* tags_def_opt ::= tags_def */ - case 338: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==338); - case 393: /* select_list ::= select_sublist */ yytestcase(yyruleno==393); -{ yylhsminor.yy60 = yymsp[0].minor.yy60; } - yymsp[0].minor.yy60 = yylhsminor.yy60; + case 161: /* tags_def_opt ::= tags_def */ + case 341: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==341); + case 396: /* select_list ::= select_sublist */ yytestcase(yyruleno==396); +{ yylhsminor.yy236 = yymsp[0].minor.yy236; } + yymsp[0].minor.yy236 = yylhsminor.yy236; break; - case 161: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy60 = yymsp[-1].minor.yy60; } + case 162: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ +{ yymsp[-3].minor.yy236 = yymsp[-1].minor.yy236; } break; - case 162: /* table_options ::= */ -{ yymsp[1].minor.yy172 = createDefaultTableOptions(pCxt); } + case 163: /* table_options ::= */ +{ yymsp[1].minor.yy636 = createDefaultTableOptions(pCxt); } break; - case 163: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 164: /* table_options ::= table_options COMMENT NK_STRING */ +{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 164: /* table_options ::= table_options DELAY NK_INTEGER */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_DELAY, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 165: /* table_options ::= table_options DELAY NK_INTEGER */ +{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_DELAY, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 165: /* table_options ::= table_options FILE_FACTOR NK_FLOAT */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_FILE_FACTOR, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 166: /* table_options ::= table_options FILE_FACTOR NK_FLOAT */ +{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_FILE_FACTOR, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 166: /* table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-4].minor.yy172, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy60); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; + case 167: /* table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ +{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-4].minor.yy636, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy236); } + yymsp[-4].minor.yy636 = yylhsminor.yy636; break; - case 167: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 168: /* table_options ::= table_options TTL NK_INTEGER */ +{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 168: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-4].minor.yy172, TABLE_OPTION_SMA, yymsp[-1].minor.yy60); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; + case 169: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ +{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-4].minor.yy636, TABLE_OPTION_SMA, yymsp[-1].minor.yy236); } + yymsp[-4].minor.yy636 = yylhsminor.yy636; break; - case 169: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy172 = createAlterTableOptions(pCxt); yylhsminor.yy172 = setTableOption(pCxt, yylhsminor.yy172, yymsp[0].minor.yy609.type, &yymsp[0].minor.yy609.val); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 170: /* alter_table_options ::= alter_table_option */ +{ yylhsminor.yy636 = createAlterTableOptions(pCxt); yylhsminor.yy636 = setTableOption(pCxt, yylhsminor.yy636, yymsp[0].minor.yy25.type, &yymsp[0].minor.yy25.val); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 170: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-1].minor.yy172, yymsp[0].minor.yy609.type, &yymsp[0].minor.yy609.val); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 171: /* alter_table_options ::= alter_table_options alter_table_option */ +{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-1].minor.yy636, yymsp[0].minor.yy25.type, &yymsp[0].minor.yy25.val); } + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 171: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy609.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } + case 172: /* alter_table_option ::= COMMENT NK_STRING */ +{ yymsp[-1].minor.yy25.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } break; - case 172: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } + case 173: /* alter_table_option ::= TTL NK_INTEGER */ +{ yymsp[-1].minor.yy25.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } break; - case 175: /* col_name ::= column_name */ -{ yylhsminor.yy172 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy105); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 176: /* col_name ::= column_name */ +{ yylhsminor.yy636 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy53); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 176: /* cmd ::= SHOW DNODES */ + case 177: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); } break; - case 177: /* cmd ::= SHOW USERS */ + case 178: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT, NULL, NULL); } break; - case 178: /* cmd ::= SHOW DATABASES */ + case 179: /* cmd ::= SHOW DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); } break; - case 179: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } + case 180: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } break; - case 180: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } + case 181: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } break; - case 181: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy172, NULL); } + case 182: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy636, NULL); } break; - case 182: /* cmd ::= SHOW MNODES */ + case 183: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); } break; - case 183: /* cmd ::= SHOW MODULES */ + case 184: /* cmd ::= SHOW MODULES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT, NULL, NULL); } break; - case 184: /* cmd ::= SHOW QNODES */ + case 185: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT, NULL, NULL); } break; - case 185: /* cmd ::= SHOW FUNCTIONS */ + case 186: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); } break; - case 186: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } + case 187: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } break; - case 187: /* cmd ::= SHOW STREAMS */ + case 188: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); } break; - case 188: /* cmd ::= SHOW ACCOUNTS */ + case 189: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 189: /* cmd ::= SHOW APPS */ + case 190: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT, NULL, NULL); } break; - case 190: /* cmd ::= SHOW CONNECTIONS */ + case 191: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT, NULL, NULL); } break; - case 191: /* cmd ::= SHOW LICENCE */ - case 192: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==192); + case 192: /* cmd ::= SHOW LICENCE */ + case 193: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==193); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); } break; - case 193: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy105); } + case 194: /* cmd ::= SHOW CREATE DATABASE db_name */ +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy53); } break; - case 194: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy172); } + case 195: /* cmd ::= SHOW CREATE TABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy636); } break; - case 195: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy172); } + case 196: /* cmd ::= SHOW CREATE STABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy636); } break; - case 196: /* cmd ::= SHOW QUERIES */ + case 197: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT, NULL, NULL); } break; - case 197: /* cmd ::= SHOW SCORES */ + case 198: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT, NULL, NULL); } break; - case 198: /* cmd ::= SHOW TOPICS */ + case 199: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT, NULL, NULL); } break; - case 199: /* cmd ::= SHOW VARIABLES */ + case 200: /* cmd ::= SHOW VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLE_STMT, NULL, NULL); } break; - case 200: /* cmd ::= SHOW BNODES */ + case 201: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT, NULL, NULL); } break; - case 201: /* cmd ::= SHOW SNODES */ + case 202: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT, NULL, NULL); } break; - case 202: /* cmd ::= SHOW CLUSTER */ + case 203: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT, NULL, NULL); } break; - case 203: /* cmd ::= SHOW TRANSACTIONS */ + case 204: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT, NULL, NULL); } break; - case 204: /* db_name_cond_opt ::= */ - case 209: /* from_db_opt ::= */ yytestcase(yyruleno==209); -{ yymsp[1].minor.yy172 = createDefaultDatabaseCondValue(pCxt); } + case 205: /* db_name_cond_opt ::= */ + case 210: /* from_db_opt ::= */ yytestcase(yyruleno==210); +{ yymsp[1].minor.yy636 = createDefaultDatabaseCondValue(pCxt); } break; - case 205: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy105); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 206: /* db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy53); } + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 206: /* like_pattern_opt ::= */ - case 217: /* index_options ::= */ yytestcase(yyruleno==217); - case 248: /* into_opt ::= */ yytestcase(yyruleno==248); - case 400: /* where_clause_opt ::= */ yytestcase(yyruleno==400); - case 404: /* twindow_clause_opt ::= */ yytestcase(yyruleno==404); - case 409: /* sliding_opt ::= */ yytestcase(yyruleno==409); - case 411: /* fill_opt ::= */ yytestcase(yyruleno==411); - case 423: /* having_clause_opt ::= */ yytestcase(yyruleno==423); - case 433: /* slimit_clause_opt ::= */ yytestcase(yyruleno==433); - case 437: /* limit_clause_opt ::= */ yytestcase(yyruleno==437); -{ yymsp[1].minor.yy172 = NULL; } + case 207: /* like_pattern_opt ::= */ + case 218: /* index_options ::= */ yytestcase(yyruleno==218); + case 250: /* into_opt ::= */ yytestcase(yyruleno==250); + case 403: /* where_clause_opt ::= */ yytestcase(yyruleno==403); + case 407: /* twindow_clause_opt ::= */ yytestcase(yyruleno==407); + case 412: /* sliding_opt ::= */ yytestcase(yyruleno==412); + case 414: /* fill_opt ::= */ yytestcase(yyruleno==414); + case 426: /* having_clause_opt ::= */ yytestcase(yyruleno==426); + case 436: /* slimit_clause_opt ::= */ yytestcase(yyruleno==436); + case 440: /* limit_clause_opt ::= */ yytestcase(yyruleno==440); +{ yymsp[1].minor.yy636 = NULL; } break; - case 207: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 208: /* like_pattern_opt ::= LIKE NK_STRING */ +{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 208: /* table_name_cond ::= table_name */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy105); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 209: /* table_name_cond ::= table_name */ +{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy53); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 210: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy105); } + case 211: /* from_db_opt ::= FROM db_name */ +{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy53); } break; - case 213: /* func_name ::= function_name */ -{ yylhsminor.yy172 = createFunctionNode(pCxt, &yymsp[0].minor.yy105, NULL); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 214: /* func_name ::= function_name */ +{ yylhsminor.yy636 = createFunctionNode(pCxt, &yymsp[0].minor.yy53, NULL); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 214: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy617, &yymsp[-3].minor.yy105, &yymsp[-1].minor.yy105, NULL, yymsp[0].minor.yy172); } + case 215: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy603, &yymsp[-3].minor.yy53, &yymsp[-1].minor.yy53, NULL, yymsp[0].minor.yy636); } break; - case 215: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy617, &yymsp[-5].minor.yy105, &yymsp[-3].minor.yy105, yymsp[-1].minor.yy60, NULL); } + case 216: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy603, &yymsp[-5].minor.yy53, &yymsp[-3].minor.yy53, yymsp[-1].minor.yy236, NULL); } break; - case 216: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy617, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105); } + case 217: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy603, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } break; - case 218: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ -{ yymsp[-8].minor.yy172 = createIndexOption(pCxt, yymsp[-6].minor.yy60, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), NULL, yymsp[0].minor.yy172); } + case 219: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ +{ yymsp[-8].minor.yy636 = createIndexOption(pCxt, yymsp[-6].minor.yy236, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), NULL, yymsp[0].minor.yy636); } break; - case 219: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ -{ yymsp[-10].minor.yy172 = createIndexOption(pCxt, yymsp[-8].minor.yy60, releaseRawExprNode(pCxt, yymsp[-4].minor.yy172), releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), yymsp[0].minor.yy172); } + case 220: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ +{ yymsp[-10].minor.yy636 = createIndexOption(pCxt, yymsp[-8].minor.yy236, releaseRawExprNode(pCxt, yymsp[-4].minor.yy636), releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), yymsp[0].minor.yy636); } break; - case 222: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy172 = createFunctionNode(pCxt, &yymsp[-3].minor.yy105, yymsp[-1].minor.yy60); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + case 223: /* func ::= function_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy636 = createFunctionNode(pCxt, &yymsp[-3].minor.yy53, yymsp[-1].minor.yy236); } + yymsp[-3].minor.yy636 = yylhsminor.yy636; break; - case 223: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy617, &yymsp[-3].minor.yy105, yymsp[0].minor.yy172, NULL, yymsp[-2].minor.yy172); } + case 224: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy603, &yymsp[-3].minor.yy53, yymsp[0].minor.yy636, NULL, yymsp[-2].minor.yy636); } break; - case 224: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy617, &yymsp[-3].minor.yy105, NULL, &yymsp[0].minor.yy105, yymsp[-2].minor.yy172); } + case 225: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy603, &yymsp[-3].minor.yy53, NULL, &yymsp[0].minor.yy53, yymsp[-2].minor.yy636); } break; - case 225: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } + case 226: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } break; - case 226: /* topic_options ::= */ -{ yymsp[1].minor.yy172 = createTopicOptions(pCxt); } + case 227: /* cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy603, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } break; - case 227: /* topic_options ::= topic_options WITH TABLE */ -{ ((STopicOptions*)yymsp[-2].minor.yy172)->withTable = true; yylhsminor.yy172 = yymsp[-2].minor.yy172; } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 228: /* topic_options ::= */ +{ yymsp[1].minor.yy636 = createTopicOptions(pCxt); } break; - case 228: /* topic_options ::= topic_options WITH SCHEMA */ -{ ((STopicOptions*)yymsp[-2].minor.yy172)->withSchema = true; yylhsminor.yy172 = yymsp[-2].minor.yy172; } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 229: /* topic_options ::= topic_options WITH TABLE */ +{ ((STopicOptions*)yymsp[-2].minor.yy636)->withTable = true; yylhsminor.yy636 = yymsp[-2].minor.yy636; } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 229: /* topic_options ::= topic_options WITH TAG */ -{ ((STopicOptions*)yymsp[-2].minor.yy172)->withTag = true; yylhsminor.yy172 = yymsp[-2].minor.yy172; } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 230: /* topic_options ::= topic_options WITH SCHEMA */ +{ ((STopicOptions*)yymsp[-2].minor.yy636)->withSchema = true; yylhsminor.yy636 = yymsp[-2].minor.yy636; } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 230: /* cmd ::= DESC full_table_name */ - case 231: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==231); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy172); } + case 231: /* topic_options ::= topic_options WITH TAG */ +{ ((STopicOptions*)yymsp[-2].minor.yy636)->withTag = true; yylhsminor.yy636 = yymsp[-2].minor.yy636; } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 232: /* cmd ::= RESET QUERY CACHE */ + case 232: /* cmd ::= DESC full_table_name */ + case 233: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==233); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy636); } + break; + case 234: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 233: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy617, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } + case 235: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy603, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } break; - case 235: /* analyze_opt ::= ANALYZE */ - case 243: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==243); - case 390: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==390); -{ yymsp[0].minor.yy617 = true; } + case 237: /* analyze_opt ::= ANALYZE */ + case 245: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==245); + case 393: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==393); +{ yymsp[0].minor.yy603 = true; } break; - case 236: /* explain_options ::= */ -{ yymsp[1].minor.yy172 = createDefaultExplainOptions(pCxt); } + case 238: /* explain_options ::= */ +{ yymsp[1].minor.yy636 = createDefaultExplainOptions(pCxt); } break; - case 237: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy172 = setExplainVerbose(pCxt, yymsp[-2].minor.yy172, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 239: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy636 = setExplainVerbose(pCxt, yymsp[-2].minor.yy636, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 238: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy172 = setExplainRatio(pCxt, yymsp[-2].minor.yy172, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 240: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy636 = setExplainRatio(pCxt, yymsp[-2].minor.yy636, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 239: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ -{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy60); } + case 241: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ +{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy236); } break; - case 240: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy617, yymsp[-8].minor.yy617, &yymsp[-5].minor.yy105, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy248, yymsp[0].minor.yy140); } + case 242: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy603, yymsp[-8].minor.yy603, &yymsp[-5].minor.yy53, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy450, yymsp[0].minor.yy158); } break; - case 241: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } + case 243: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } break; - case 244: /* bufsize_opt ::= */ -{ yymsp[1].minor.yy140 = 0; } + case 246: /* bufsize_opt ::= */ +{ yymsp[1].minor.yy158 = 0; } break; - case 245: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ -{ yymsp[-1].minor.yy140 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + case 247: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ +{ yymsp[-1].minor.yy158 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 246: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy617, &yymsp[-4].minor.yy105, yymsp[-2].minor.yy172, yymsp[-3].minor.yy172, yymsp[0].minor.yy172); } + case 248: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy603, &yymsp[-4].minor.yy53, yymsp[-2].minor.yy636, yymsp[-3].minor.yy636, yymsp[0].minor.yy636); } break; - case 247: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } + case 249: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } break; - case 249: /* into_opt ::= INTO full_table_name */ - case 371: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==371); - case 401: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==401); - case 424: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==424); -{ yymsp[-1].minor.yy172 = yymsp[0].minor.yy172; } + case 251: /* into_opt ::= INTO full_table_name */ + case 374: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==374); + case 404: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==404); + case 427: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==427); +{ yymsp[-1].minor.yy636 = yymsp[0].minor.yy636; } break; - case 250: /* stream_options ::= */ -{ yymsp[1].minor.yy172 = createStreamOptions(pCxt); } + case 252: /* stream_options ::= */ +{ yymsp[1].minor.yy636 = createStreamOptions(pCxt); } break; - case 251: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy172)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy172 = yymsp[-2].minor.yy172; } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 253: /* stream_options ::= stream_options TRIGGER AT_ONCE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy636)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy636 = yymsp[-2].minor.yy636; } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 252: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy172)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy172 = yymsp[-2].minor.yy172; } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 254: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy636)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy636 = yymsp[-2].minor.yy636; } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 253: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy172)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy172); yylhsminor.yy172 = yymsp[-2].minor.yy172; } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 255: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy636)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy636); yylhsminor.yy636 = yymsp[-2].minor.yy636; } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 254: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 256: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 255: /* cmd ::= KILL QUERY NK_INTEGER */ + case 257: /* cmd ::= KILL QUERY NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_QUERY_STMT, &yymsp[0].minor.yy0); } break; - case 256: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 258: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 257: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 259: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 258: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy60); } + case 260: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy236); } break; - case 259: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 261: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 260: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy60 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 262: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy236 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 262: /* cmd ::= SYNCDB db_name REPLICA */ -{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy105); } + case 264: /* cmd ::= SYNCDB db_name REPLICA */ +{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy53); } break; - case 264: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 266: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 265: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 267: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 266: /* literal ::= NK_STRING */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 268: /* literal ::= NK_STRING */ +{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 267: /* literal ::= NK_BOOL */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 269: /* literal ::= NK_BOOL */ +{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 268: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 270: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 269: /* literal ::= duration_literal */ - case 279: /* signed_literal ::= signed */ yytestcase(yyruleno==279); - case 298: /* expression ::= literal */ yytestcase(yyruleno==298); - case 299: /* expression ::= pseudo_column */ yytestcase(yyruleno==299); - case 300: /* expression ::= column_reference */ yytestcase(yyruleno==300); - case 301: /* expression ::= function_expression */ yytestcase(yyruleno==301); - case 302: /* expression ::= subquery */ yytestcase(yyruleno==302); - case 327: /* function_expression ::= literal_func */ yytestcase(yyruleno==327); - case 363: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==363); - case 367: /* boolean_primary ::= predicate */ yytestcase(yyruleno==367); - case 369: /* common_expression ::= expression */ yytestcase(yyruleno==369); - case 370: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==370); - case 372: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==372); - case 374: /* table_reference ::= table_primary */ yytestcase(yyruleno==374); - case 375: /* table_reference ::= joined_table */ yytestcase(yyruleno==375); - case 379: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==379); - case 426: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==426); - case 429: /* query_primary ::= query_specification */ yytestcase(yyruleno==429); -{ yylhsminor.yy172 = yymsp[0].minor.yy172; } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 271: /* literal ::= duration_literal */ + case 281: /* signed_literal ::= signed */ yytestcase(yyruleno==281); + case 301: /* expression ::= literal */ yytestcase(yyruleno==301); + case 302: /* expression ::= pseudo_column */ yytestcase(yyruleno==302); + case 303: /* expression ::= column_reference */ yytestcase(yyruleno==303); + case 304: /* expression ::= function_expression */ yytestcase(yyruleno==304); + case 305: /* expression ::= subquery */ yytestcase(yyruleno==305); + case 330: /* function_expression ::= literal_func */ yytestcase(yyruleno==330); + case 366: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==366); + case 370: /* boolean_primary ::= predicate */ yytestcase(yyruleno==370); + case 372: /* common_expression ::= expression */ yytestcase(yyruleno==372); + case 373: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==373); + case 375: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==375); + case 377: /* table_reference ::= table_primary */ yytestcase(yyruleno==377); + case 378: /* table_reference ::= joined_table */ yytestcase(yyruleno==378); + case 382: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==382); + case 429: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==429); + case 432: /* query_primary ::= query_specification */ yytestcase(yyruleno==432); +{ yylhsminor.yy636 = yymsp[0].minor.yy636; } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 270: /* literal ::= NULL */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 272: /* literal ::= NULL */ +{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 271: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 273: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 272: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 274: /* duration_literal ::= NK_VARIABLE */ +{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 273: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 275: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 274: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + case 276: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; - case 275: /* signed ::= NK_MINUS NK_INTEGER */ + case 277: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 276: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 278: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 277: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 279: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 278: /* signed ::= NK_MINUS NK_FLOAT */ + case 280: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 280: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 282: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 281: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 283: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 282: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 284: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 283: /* signed_literal ::= duration_literal */ - case 285: /* signed_literal ::= literal_func */ yytestcase(yyruleno==285); - case 341: /* star_func_para ::= expression */ yytestcase(yyruleno==341); - case 396: /* select_item ::= common_expression */ yytestcase(yyruleno==396); - case 442: /* search_condition ::= common_expression */ yytestcase(yyruleno==442); -{ yylhsminor.yy172 = releaseRawExprNode(pCxt, yymsp[0].minor.yy172); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 285: /* signed_literal ::= duration_literal */ + case 287: /* signed_literal ::= literal_func */ yytestcase(yyruleno==287); + case 344: /* star_func_para ::= expression */ yytestcase(yyruleno==344); + case 399: /* select_item ::= common_expression */ yytestcase(yyruleno==399); + case 445: /* search_condition ::= common_expression */ yytestcase(yyruleno==445); +{ yylhsminor.yy636 = releaseRawExprNode(pCxt, yymsp[0].minor.yy636); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 284: /* signed_literal ::= NULL */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 286: /* signed_literal ::= NULL */ +{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 303: /* expression ::= NK_LP expression NK_RP */ - case 368: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==368); -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 306: /* expression ::= NK_LP expression NK_RP */ + case 371: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==371); +{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636)); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 304: /* expression ::= NK_PLUS expression */ + case 307: /* expression ::= NK_PLUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy172)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy636)); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 305: /* expression ::= NK_MINUS expression */ + case 308: /* expression ::= NK_MINUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy172), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy636), NULL)); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 306: /* expression ::= expression NK_PLUS expression */ + case 309: /* expression ::= expression NK_PLUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 307: /* expression ::= expression NK_MINUS expression */ + case 310: /* expression ::= expression NK_MINUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 308: /* expression ::= expression NK_STAR expression */ + case 311: /* expression ::= expression NK_STAR expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 309: /* expression ::= expression NK_SLASH expression */ + case 312: /* expression ::= expression NK_SLASH expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 310: /* expression ::= expression NK_REM expression */ + case 313: /* expression ::= expression NK_REM expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 311: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 314: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 312: /* expression_list ::= expression */ -{ yylhsminor.yy60 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy172)); } - yymsp[0].minor.yy60 = yylhsminor.yy60; + case 315: /* expression_list ::= expression */ +{ yylhsminor.yy236 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy636)); } + yymsp[0].minor.yy236 = yylhsminor.yy236; break; - case 313: /* expression_list ::= expression_list NK_COMMA expression */ -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, releaseRawExprNode(pCxt, yymsp[0].minor.yy172)); } - yymsp[-2].minor.yy60 = yylhsminor.yy60; + case 316: /* expression_list ::= expression_list NK_COMMA expression */ +{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, releaseRawExprNode(pCxt, yymsp[0].minor.yy636)); } + yymsp[-2].minor.yy236 = yylhsminor.yy236; break; - case 314: /* column_reference ::= column_name */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy105, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy105)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 317: /* column_reference ::= column_name */ +{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy53, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy53)); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 315: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105, createColumnNode(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 318: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53, createColumnNode(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53)); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 316: /* pseudo_column ::= ROWTS */ - case 317: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==317); - case 319: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==319); - case 320: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==320); - case 321: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==321); - case 322: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==322); - case 323: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==323); - case 329: /* literal_func ::= NOW */ yytestcase(yyruleno==329); -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 319: /* pseudo_column ::= ROWTS */ + case 320: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==320); + case 322: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==322); + case 323: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==323); + case 324: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==324); + case 325: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==325); + case 326: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==326); + case 332: /* literal_func ::= NOW */ yytestcase(yyruleno==332); +{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy636 = yylhsminor.yy636; break; - case 318: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy105)))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 321: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy53)))); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 324: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 325: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==325); -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy105, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy105, yymsp[-1].minor.yy60)); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + case 327: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 328: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==328); +{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy53, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy53, yymsp[-1].minor.yy236)); } + yymsp[-3].minor.yy636 = yylhsminor.yy636; break; - case 326: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), yymsp[-1].minor.yy248)); } - yymsp[-5].minor.yy172 = yylhsminor.yy172; + case 329: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ +{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), yymsp[-1].minor.yy450)); } + yymsp[-5].minor.yy636 = yylhsminor.yy636; break; - case 328: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy105, NULL)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 331: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy53, NULL)); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 337: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy60 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy60 = yylhsminor.yy60; + case 340: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy236 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy236 = yylhsminor.yy236; break; - case 342: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 399: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==399); -{ yylhsminor.yy172 = createColumnNode(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 345: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 402: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==402); +{ yylhsminor.yy636 = createColumnNode(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 343: /* predicate ::= expression compare_op expression */ - case 348: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==348); + case 346: /* predicate ::= expression compare_op expression */ + case 351: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==351); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy572, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy136, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 344: /* predicate ::= expression BETWEEN expression AND expression */ + case 347: /* predicate ::= expression BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy172), releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy636); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy636), releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; + yymsp[-4].minor.yy636 = yylhsminor.yy636; break; - case 345: /* predicate ::= expression NOT BETWEEN expression AND expression */ + case 348: /* predicate ::= expression NOT BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy172), releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy636); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy636), releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-5].minor.yy172 = yylhsminor.yy172; + yymsp[-5].minor.yy636 = yylhsminor.yy636; break; - case 346: /* predicate ::= expression IS NULL */ + case 349: /* predicate ::= expression IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), NULL)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 347: /* predicate ::= expression IS NOT NULL */ + case 350: /* predicate ::= expression IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), NULL)); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + yymsp[-3].minor.yy636 = yylhsminor.yy636; break; - case 349: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy572 = OP_TYPE_LOWER_THAN; } + case 352: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy136 = OP_TYPE_LOWER_THAN; } break; - case 350: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy572 = OP_TYPE_GREATER_THAN; } + case 353: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy136 = OP_TYPE_GREATER_THAN; } break; - case 351: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy572 = OP_TYPE_LOWER_EQUAL; } + case 354: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy136 = OP_TYPE_LOWER_EQUAL; } break; - case 352: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy572 = OP_TYPE_GREATER_EQUAL; } + case 355: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy136 = OP_TYPE_GREATER_EQUAL; } break; - case 353: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy572 = OP_TYPE_NOT_EQUAL; } + case 356: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy136 = OP_TYPE_NOT_EQUAL; } break; - case 354: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy572 = OP_TYPE_EQUAL; } + case 357: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy136 = OP_TYPE_EQUAL; } break; - case 355: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy572 = OP_TYPE_LIKE; } + case 358: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy136 = OP_TYPE_LIKE; } break; - case 356: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy572 = OP_TYPE_NOT_LIKE; } + case 359: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy136 = OP_TYPE_NOT_LIKE; } break; - case 357: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy572 = OP_TYPE_MATCH; } + case 360: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy136 = OP_TYPE_MATCH; } break; - case 358: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy572 = OP_TYPE_NMATCH; } + case 361: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy136 = OP_TYPE_NMATCH; } break; - case 359: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy572 = OP_TYPE_JSON_CONTAINS; } + case 362: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy136 = OP_TYPE_JSON_CONTAINS; } break; - case 360: /* in_op ::= IN */ -{ yymsp[0].minor.yy572 = OP_TYPE_IN; } + case 363: /* in_op ::= IN */ +{ yymsp[0].minor.yy136 = OP_TYPE_IN; } break; - case 361: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy572 = OP_TYPE_NOT_IN; } + case 364: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy136 = OP_TYPE_NOT_IN; } break; - case 362: /* in_predicate_value ::= NK_LP expression_list NK_RP */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy60)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 365: /* in_predicate_value ::= NK_LP expression_list NK_RP */ +{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy236)); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 364: /* boolean_value_expression ::= NOT boolean_primary */ + case 367: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy172), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy636), NULL)); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 365: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 368: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 366: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 369: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); + yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 373: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy172 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy172, yymsp[0].minor.yy172, NULL); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 376: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy636 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy636, yymsp[0].minor.yy636, NULL); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 376: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy172 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 379: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy636 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 377: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy172 = createRealTableNode(pCxt, &yymsp[-3].minor.yy105, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + case 380: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy636 = createRealTableNode(pCxt, &yymsp[-3].minor.yy53, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } + yymsp[-3].minor.yy636 = yylhsminor.yy636; break; - case 378: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy172 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172), &yymsp[0].minor.yy105); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 381: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy636 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636), &yymsp[0].minor.yy53); } + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 380: /* alias_opt ::= */ -{ yymsp[1].minor.yy105 = nil_token; } + case 383: /* alias_opt ::= */ +{ yymsp[1].minor.yy53 = nil_token; } break; - case 381: /* alias_opt ::= table_alias */ -{ yylhsminor.yy105 = yymsp[0].minor.yy105; } - yymsp[0].minor.yy105 = yylhsminor.yy105; + case 384: /* alias_opt ::= table_alias */ +{ yylhsminor.yy53 = yymsp[0].minor.yy53; } + yymsp[0].minor.yy53 = yylhsminor.yy53; break; - case 382: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy105 = yymsp[0].minor.yy105; } + case 385: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy53 = yymsp[0].minor.yy53; } break; - case 383: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 384: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==384); -{ yymsp[-2].minor.yy172 = yymsp[-1].minor.yy172; } + case 386: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 387: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==387); +{ yymsp[-2].minor.yy636 = yymsp[-1].minor.yy636; } break; - case 385: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy172 = createJoinTableNode(pCxt, yymsp[-4].minor.yy636, yymsp[-5].minor.yy172, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } - yymsp[-5].minor.yy172 = yylhsminor.yy172; + case 388: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy636 = createJoinTableNode(pCxt, yymsp[-4].minor.yy342, yymsp[-5].minor.yy636, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } + yymsp[-5].minor.yy636 = yylhsminor.yy636; break; - case 386: /* join_type ::= */ -{ yymsp[1].minor.yy636 = JOIN_TYPE_INNER; } + case 389: /* join_type ::= */ +{ yymsp[1].minor.yy342 = JOIN_TYPE_INNER; } break; - case 387: /* join_type ::= INNER */ -{ yymsp[0].minor.yy636 = JOIN_TYPE_INNER; } + case 390: /* join_type ::= INNER */ +{ yymsp[0].minor.yy342 = JOIN_TYPE_INNER; } break; - case 388: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 391: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-8].minor.yy172 = createSelectStmt(pCxt, yymsp[-7].minor.yy617, yymsp[-6].minor.yy60, yymsp[-5].minor.yy172); - yymsp[-8].minor.yy172 = addWhereClause(pCxt, yymsp[-8].minor.yy172, yymsp[-4].minor.yy172); - yymsp[-8].minor.yy172 = addPartitionByClause(pCxt, yymsp[-8].minor.yy172, yymsp[-3].minor.yy60); - yymsp[-8].minor.yy172 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy172, yymsp[-2].minor.yy172); - yymsp[-8].minor.yy172 = addGroupByClause(pCxt, yymsp[-8].minor.yy172, yymsp[-1].minor.yy60); - yymsp[-8].minor.yy172 = addHavingClause(pCxt, yymsp[-8].minor.yy172, yymsp[0].minor.yy172); + yymsp[-8].minor.yy636 = createSelectStmt(pCxt, yymsp[-7].minor.yy603, yymsp[-6].minor.yy236, yymsp[-5].minor.yy636); + yymsp[-8].minor.yy636 = addWhereClause(pCxt, yymsp[-8].minor.yy636, yymsp[-4].minor.yy636); + yymsp[-8].minor.yy636 = addPartitionByClause(pCxt, yymsp[-8].minor.yy636, yymsp[-3].minor.yy236); + yymsp[-8].minor.yy636 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy636, yymsp[-2].minor.yy636); + yymsp[-8].minor.yy636 = addGroupByClause(pCxt, yymsp[-8].minor.yy636, yymsp[-1].minor.yy236); + yymsp[-8].minor.yy636 = addHavingClause(pCxt, yymsp[-8].minor.yy636, yymsp[0].minor.yy636); } break; - case 391: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy617 = false; } + case 394: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy603 = false; } break; - case 392: /* select_list ::= NK_STAR */ -{ yymsp[0].minor.yy60 = NULL; } + case 395: /* select_list ::= NK_STAR */ +{ yymsp[0].minor.yy236 = NULL; } break; - case 397: /* select_item ::= common_expression column_alias */ -{ yylhsminor.yy172 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172), &yymsp[0].minor.yy105); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 400: /* select_item ::= common_expression column_alias */ +{ yylhsminor.yy636 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636), &yymsp[0].minor.yy53); } + yymsp[-1].minor.yy636 = yylhsminor.yy636; break; - case 398: /* select_item ::= common_expression AS column_alias */ -{ yylhsminor.yy172 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), &yymsp[0].minor.yy105); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 401: /* select_item ::= common_expression AS column_alias */ +{ yylhsminor.yy636 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), &yymsp[0].minor.yy53); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 403: /* partition_by_clause_opt ::= PARTITION BY expression_list */ - case 420: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==420); - case 432: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==432); -{ yymsp[-2].minor.yy60 = yymsp[0].minor.yy60; } + case 406: /* partition_by_clause_opt ::= PARTITION BY expression_list */ + case 423: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==423); + case 435: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==435); +{ yymsp[-2].minor.yy236 = yymsp[0].minor.yy236; } break; - case 405: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy172 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), releaseRawExprNode(pCxt, yymsp[-1].minor.yy172)); } + case 408: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy636 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), releaseRawExprNode(pCxt, yymsp[-1].minor.yy636)); } break; - case 406: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ -{ yymsp[-3].minor.yy172 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172)); } + case 409: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ +{ yymsp[-3].minor.yy636 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636)); } break; - case 407: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy172 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), NULL, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } + case 410: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy636 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), NULL, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } break; - case 408: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy172 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy172), releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } + case 411: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy636 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy636), releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } break; - case 410: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ -{ yymsp[-3].minor.yy172 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy172); } + case 413: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ +{ yymsp[-3].minor.yy636 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy636); } break; - case 412: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy172 = createFillNode(pCxt, yymsp[-1].minor.yy202, NULL); } + case 415: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy636 = createFillNode(pCxt, yymsp[-1].minor.yy18, NULL); } break; - case 413: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy172 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy60)); } + case 416: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy636 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy236)); } break; - case 414: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy202 = FILL_MODE_NONE; } + case 417: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy18 = FILL_MODE_NONE; } break; - case 415: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy202 = FILL_MODE_PREV; } + case 418: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy18 = FILL_MODE_PREV; } break; - case 416: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy202 = FILL_MODE_NULL; } + case 419: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy18 = FILL_MODE_NULL; } break; - case 417: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy202 = FILL_MODE_LINEAR; } + case 420: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy18 = FILL_MODE_LINEAR; } break; - case 418: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy202 = FILL_MODE_NEXT; } + case 421: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy18 = FILL_MODE_NEXT; } break; - case 421: /* group_by_list ::= expression */ -{ yylhsminor.yy60 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[0].minor.yy60 = yylhsminor.yy60; + case 424: /* group_by_list ::= expression */ +{ yylhsminor.yy236 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } + yymsp[0].minor.yy236 = yylhsminor.yy236; break; - case 422: /* group_by_list ::= group_by_list NK_COMMA expression */ -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-2].minor.yy60 = yylhsminor.yy60; + case 425: /* group_by_list ::= group_by_list NK_COMMA expression */ +{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } + yymsp[-2].minor.yy236 = yylhsminor.yy236; break; - case 425: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 428: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy172 = addOrderByClause(pCxt, yymsp[-3].minor.yy172, yymsp[-2].minor.yy60); - yylhsminor.yy172 = addSlimitClause(pCxt, yylhsminor.yy172, yymsp[-1].minor.yy172); - yylhsminor.yy172 = addLimitClause(pCxt, yylhsminor.yy172, yymsp[0].minor.yy172); + yylhsminor.yy636 = addOrderByClause(pCxt, yymsp[-3].minor.yy636, yymsp[-2].minor.yy236); + yylhsminor.yy636 = addSlimitClause(pCxt, yylhsminor.yy636, yymsp[-1].minor.yy636); + yylhsminor.yy636 = addLimitClause(pCxt, yylhsminor.yy636, yymsp[0].minor.yy636); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + yymsp[-3].minor.yy636 = yylhsminor.yy636; break; - case 427: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ -{ yylhsminor.yy172 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy172, yymsp[0].minor.yy172); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + case 430: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ +{ yylhsminor.yy636 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy636, yymsp[0].minor.yy636); } + yymsp[-3].minor.yy636 = yylhsminor.yy636; break; - case 428: /* query_expression_body ::= query_expression_body UNION query_expression_body */ -{ yylhsminor.yy172 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 431: /* query_expression_body ::= query_expression_body UNION query_expression_body */ +{ yylhsminor.yy636 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 430: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ -{ yymsp[-5].minor.yy172 = yymsp[-4].minor.yy172; } - yy_destructor(yypParser,350,&yymsp[-3].minor); - yy_destructor(yypParser,351,&yymsp[-2].minor); - yy_destructor(yypParser,352,&yymsp[-1].minor); + case 433: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ +{ yymsp[-5].minor.yy636 = yymsp[-4].minor.yy636; } + yy_destructor(yypParser,353,&yymsp[-3].minor); + yy_destructor(yypParser,354,&yymsp[-2].minor); + yy_destructor(yypParser,355,&yymsp[-1].minor); break; - case 434: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 438: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==438); -{ yymsp[-1].minor.yy172 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 437: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 441: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==441); +{ yymsp[-1].minor.yy636 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 435: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 439: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==439); -{ yymsp[-3].minor.yy172 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 438: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 442: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==442); +{ yymsp[-3].minor.yy636 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 436: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 440: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==440); -{ yymsp[-3].minor.yy172 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 439: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 443: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==443); +{ yymsp[-3].minor.yy636 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 441: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy172); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 444: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy636); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 445: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy172 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), yymsp[-1].minor.yy14, yymsp[0].minor.yy17); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 448: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy636 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), yymsp[-1].minor.yy430, yymsp[0].minor.yy185); } + yymsp[-2].minor.yy636 = yylhsminor.yy636; break; - case 446: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy14 = ORDER_ASC; } + case 449: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy430 = ORDER_ASC; } break; - case 447: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy14 = ORDER_ASC; } + case 450: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy430 = ORDER_ASC; } break; - case 448: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy14 = ORDER_DESC; } + case 451: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy430 = ORDER_DESC; } break; - case 449: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy17 = NULL_ORDER_DEFAULT; } + case 452: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy185 = NULL_ORDER_DEFAULT; } break; - case 450: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy17 = NULL_ORDER_FIRST; } + case 453: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy185 = NULL_ORDER_FIRST; } break; - case 451: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy17 = NULL_ORDER_LAST; } + case 454: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy185 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/libs/parser/test/parInitialCTest.cpp b/source/libs/parser/test/parInitialCTest.cpp index abcb6bca8b..a5e7ef51a7 100644 --- a/source/libs/parser/test/parInitialCTest.cpp +++ b/source/libs/parser/test/parInitialCTest.cpp @@ -90,6 +90,7 @@ TEST_F(ParserInitialCTest, createDatabase) { expect.walLevel = TSDB_DEFAULT_WAL_LEVEL; expect.numOfVgroups = TSDB_DEFAULT_VN_PER_DB; expect.numOfStables = TSDB_DEFAULT_DB_SINGLE_STABLE; + expect.schemaless = TSDB_DEFAULT_DB_SCHEMALESS; }; auto setDbBufferFunc = [&](int32_t buffer) { expect.buffer = buffer; }; @@ -124,6 +125,7 @@ TEST_F(ParserInitialCTest, createDatabase) { taosArrayPush(expect.pRetensions, &retention); ++expect.numOfRetensions; }; + auto setDbSchemalessFunc = [&](int8_t schemaless) { expect.schemaless = schemaless; }; setCheckDdlFunc([&](const SQuery* pQuery, ParserStage stage) { ASSERT_EQ(nodeType(pQuery->pRoot), QUERY_NODE_CREATE_DATABASE_STMT); @@ -149,6 +151,7 @@ TEST_F(ParserInitialCTest, createDatabase) { ASSERT_EQ(req.replications, expect.replications); ASSERT_EQ(req.strict, expect.strict); ASSERT_EQ(req.cacheLastRow, expect.cacheLastRow); + ASSERT_EQ(req.schemaless, expect.schemaless); ASSERT_EQ(req.ignoreExist, expect.ignoreExist); ASSERT_EQ(req.numOfRetensions, expect.numOfRetensions); if (expect.numOfRetensions > 0) { @@ -188,6 +191,7 @@ TEST_F(ParserInitialCTest, createDatabase) { setDbWalLevelFunc(2); setDbVgroupsFunc(100); setDbSingleStableFunc(1); + setDbSchemalessFunc(1); run("CREATE DATABASE IF NOT EXISTS wxy_db " "BUFFER 64 " "CACHELAST 2 " @@ -205,7 +209,8 @@ TEST_F(ParserInitialCTest, createDatabase) { "STRICT 1 " "WAL 2 " "VGROUPS 100 " - "SINGLE_STABLE 1 "); + "SINGLE_STABLE 1 " + "SCHEMALESS 1"); setCreateDbReqFunc("wxy_db", 1); setDbDaysFunc(100); diff --git a/source/libs/parser/test/parInitialDTest.cpp b/source/libs/parser/test/parInitialDTest.cpp index 1153b238b1..7cf3337fea 100644 --- a/source/libs/parser/test/parInitialDTest.cpp +++ b/source/libs/parser/test/parInitialDTest.cpp @@ -19,7 +19,7 @@ using namespace std; namespace ParserTest { -class ParserInitialDTest : public ParserTestBase {}; +class ParserInitialDTest : public ParserDdlTest {}; // todo delete // todo desc @@ -29,7 +29,37 @@ class ParserInitialDTest : public ParserTestBase {}; TEST_F(ParserInitialDTest, dropBnode) { useDb("root", "test"); - run("drop bnode on dnode 1"); + run("DROP BNODE ON DNODE 1"); +} + +// DROP CGROUP [ IF EXISTS ] cgroup_name ON topic_name +TEST_F(ParserInitialDTest, dropCGroup) { + useDb("root", "test"); + + SMDropCgroupReq expect = {0}; + + auto setDropCgroupReqFunc = [&](const char* pTopicName, const char* pCGroupName, int8_t igNotExists = 0) { + memset(&expect, 0, sizeof(SMDropCgroupReq)); + snprintf(expect.topic, sizeof(expect.topic), "0.%s", pTopicName); + strcpy(expect.cgroup, pCGroupName); + expect.igNotExists = igNotExists; + }; + + setCheckDdlFunc([&](const SQuery* pQuery, ParserStage stage) { + ASSERT_EQ(nodeType(pQuery->pRoot), QUERY_NODE_DROP_CGROUP_STMT); + SMDropCgroupReq req = {0}; + ASSERT_TRUE(TSDB_CODE_SUCCESS == tDeserializeSMDropCgroupReq(pQuery->pCmdMsg->pMsg, pQuery->pCmdMsg->msgLen, &req)); + + ASSERT_EQ(std::string(req.topic), std::string(expect.topic)); + ASSERT_EQ(std::string(req.cgroup), std::string(expect.cgroup)); + ASSERT_EQ(req.igNotExists, expect.igNotExists); + }); + + setDropCgroupReqFunc("tp1", "cg1"); + run("DROP CGROUP cg1 ON tp1"); + + setDropCgroupReqFunc("tp1", "cg1", 1); + run("DROP CGROUP IF EXISTS cg1 ON tp1"); } // todo drop database diff --git a/source/libs/parser/test/parSelectTest.cpp b/source/libs/parser/test/parSelectTest.cpp index b68ef2c591..f00500faa4 100644 --- a/source/libs/parser/test/parSelectTest.cpp +++ b/source/libs/parser/test/parSelectTest.cpp @@ -121,13 +121,13 @@ TEST_F(ParserSelectTest, selectFunc) { run("SELECT MAX(c1), c2 FROM t1 STATE_WINDOW(c3)"); } -TEST_F(ParserSelectTest, nonstdFunc) { +TEST_F(ParserSelectTest, IndefiniteRowsFunc) { useDb("root", "test"); run("SELECT DIFF(c1) FROM t1"); } -TEST_F(ParserSelectTest, nonstdFuncSemanticCheck) { +TEST_F(ParserSelectTest, IndefiniteRowsFuncSemanticCheck) { useDb("root", "test"); run("SELECT DIFF(c1), c2 FROM t1", TSDB_CODE_PAR_NOT_ALLOWED_FUNC, PARSER_STAGE_TRANSLATE); diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index 4e77ae5fba..467b26b7c4 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -321,6 +321,7 @@ static int32_t createJoinLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect } pJoin->joinType = pJoinTable->joinType; + pJoin->isSingleTableJoin = pJoinTable->table.singleTable; int32_t code = TSDB_CODE_SUCCESS; @@ -418,7 +419,7 @@ static SColumnNode* createColumnByExpr(const char* pStmtName, SExprNode* pExpr) } static int32_t createAggLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect, SLogicNode** pLogicNode) { - if (!pSelect->hasAggFuncs && !pSelect->hasIndefiniteRowsFunc && NULL == pSelect->pGroupByList) { + if (!pSelect->hasAggFuncs && NULL == pSelect->pGroupByList) { return TSDB_CODE_SUCCESS; } @@ -442,8 +443,8 @@ static int32_t createAggLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect, code = rewriteExprForSelect(pAgg->pGroupKeys, pSelect, SQL_CLAUSE_GROUP_BY); } - if (TSDB_CODE_SUCCESS == code && (pSelect->hasAggFuncs || pSelect->hasIndefiniteRowsFunc)) { - code = nodesCollectFuncs(pSelect, SQL_CLAUSE_GROUP_BY, fmIsVectorFunc, &pAgg->pAggFuncs); + if (TSDB_CODE_SUCCESS == code && pSelect->hasAggFuncs) { + code = nodesCollectFuncs(pSelect, SQL_CLAUSE_GROUP_BY, fmIsAggFunc, &pAgg->pAggFuncs); } // rewrite the expression in subsequent clauses diff --git a/source/libs/planner/src/planSpliter.c b/source/libs/planner/src/planSpliter.c index 1a97d9ab1b..ea149f8363 100644 --- a/source/libs/planner/src/planSpliter.c +++ b/source/libs/planner/src/planSpliter.c @@ -18,7 +18,6 @@ #define SPLIT_FLAG_MASK(n) (1 << n) #define SPLIT_FLAG_STS SPLIT_FLAG_MASK(0) -#define SPLIT_FLAG_CTJ SPLIT_FLAG_MASK(1) #define SPLIT_FLAG_SET_MASK(val, mask) (val) |= (mask) #define SPLIT_FLAG_TEST_MASK(val, mask) (((val) & (mask)) != 0) @@ -42,7 +41,8 @@ typedef struct SStsInfo { } SStsInfo; typedef struct SCtjInfo { - SScanLogicNode* pScan; + SJoinLogicNode* pJoin; + SLogicNode* pSplitNode; SLogicSubplan* pSubplan; } SCtjInfo; @@ -58,7 +58,7 @@ typedef struct SUnInfo { typedef bool (*FSplFindSplitNode)(SLogicSubplan* pSubplan, void* pInfo); -static SLogicSubplan* splCreateScanSubplan(SSplitContext* pCxt, SScanLogicNode* pScan, int32_t flag) { +static SLogicSubplan* splCreateSubplan(SSplitContext* pCxt, SLogicNode* pNode, int32_t flag) { SLogicSubplan* pSubplan = nodesMakeNode(QUERY_NODE_LOGIC_SUBPLAN); if (NULL == pSubplan) { return NULL; @@ -66,35 +66,37 @@ static SLogicSubplan* splCreateScanSubplan(SSplitContext* pCxt, SScanLogicNode* pSubplan->id.queryId = pCxt->queryId; pSubplan->id.groupId = pCxt->groupId; pSubplan->subplanType = SUBPLAN_TYPE_SCAN; - pSubplan->pNode = (SLogicNode*)nodesCloneNode(pScan); - TSWAP(pSubplan->pVgroupList, ((SScanLogicNode*)pSubplan->pNode)->pVgroupList); + pSubplan->pNode = (SLogicNode*)nodesCloneNode(pNode); + if (QUERY_NODE_LOGIC_PLAN_SCAN == nodeType(pNode)) { + TSWAP(pSubplan->pVgroupList, ((SScanLogicNode*)pSubplan->pNode)->pVgroupList); + } SPLIT_FLAG_SET_MASK(pSubplan->splitFlag, flag); return pSubplan; } -static int32_t splCreateExchangeNode(SSplitContext* pCxt, SLogicSubplan* pSubplan, SScanLogicNode* pScan, +static int32_t splCreateExchangeNode(SSplitContext* pCxt, SLogicSubplan* pSubplan, SLogicNode* pSplitNode, ESubplanType subplanType) { SExchangeLogicNode* pExchange = nodesMakeNode(QUERY_NODE_LOGIC_PLAN_EXCHANGE); if (NULL == pExchange) { return TSDB_CODE_OUT_OF_MEMORY; } pExchange->srcGroupId = pCxt->groupId; - pExchange->precision = pScan->pMeta->tableInfo.precision; - pExchange->node.pTargets = nodesCloneList(pScan->node.pTargets); + pExchange->precision = pSplitNode->precision; + pExchange->node.pTargets = nodesCloneList(pSplitNode->pTargets); if (NULL == pExchange->node.pTargets) { return TSDB_CODE_OUT_OF_MEMORY; } - pSubplan->subplanType = SUBPLAN_TYPE_MERGE; + pSubplan->subplanType = subplanType; - if (NULL == pScan->node.pParent) { + if (NULL == pSplitNode->pParent) { pSubplan->pNode = (SLogicNode*)pExchange; return TSDB_CODE_SUCCESS; } SNode* pNode; - FOREACH(pNode, pScan->node.pParent->pChildren) { - if (nodesEqualNode(pNode, pScan)) { + FOREACH(pNode, pSplitNode->pParent->pChildren) { + if (nodesEqualNode(pNode, pSplitNode)) { REPLACE_NODE(pExchange); nodesDestroyNode(pNode); return TSDB_CODE_SUCCESS; @@ -148,33 +150,31 @@ static int32_t stsSplit(SSplitContext* pCxt, SLogicSubplan* pSubplan) { if (!splMatch(pCxt, pSubplan, SPLIT_FLAG_STS, (FSplFindSplitNode)stsFindSplitNode, &info)) { return TSDB_CODE_SUCCESS; } - int32_t code = - nodesListMakeStrictAppend(&info.pSubplan->pChildren, splCreateScanSubplan(pCxt, info.pScan, SPLIT_FLAG_STS)); + int32_t code = nodesListMakeStrictAppend(&info.pSubplan->pChildren, + splCreateSubplan(pCxt, (SLogicNode*)info.pScan, SPLIT_FLAG_STS)); if (TSDB_CODE_SUCCESS == code) { - code = splCreateExchangeNode(pCxt, info.pSubplan, info.pScan, SUBPLAN_TYPE_MERGE); + code = splCreateExchangeNode(pCxt, info.pSubplan, (SLogicNode*)info.pScan, SUBPLAN_TYPE_MERGE); } ++(pCxt->groupId); pCxt->split = true; return code; } -static bool ctjIsSingleTable(int8_t tableType) { - return (TSDB_CHILD_TABLE == tableType || TSDB_NORMAL_TABLE == tableType); +static bool needSplit(SJoinLogicNode* pJoin) { + if (!pJoin->isSingleTableJoin) { + return false; + } + return QUERY_NODE_LOGIC_PLAN_EXCHANGE != nodeType(nodesListGetNode(pJoin->node.pChildren, 0)) && + QUERY_NODE_LOGIC_PLAN_EXCHANGE != nodeType(nodesListGetNode(pJoin->node.pChildren, 1)); } -static SLogicNode* ctjMatchByNode(SLogicNode* pNode) { - if (QUERY_NODE_LOGIC_PLAN_JOIN == nodeType(pNode)) { - SLogicNode* pLeft = (SLogicNode*)nodesListGetNode(pNode->pChildren, 0); - SLogicNode* pRight = (SLogicNode*)nodesListGetNode(pNode->pChildren, 1); - if (QUERY_NODE_LOGIC_PLAN_SCAN == nodeType(pLeft) && ctjIsSingleTable(((SScanLogicNode*)pLeft)->pMeta->tableType) && - QUERY_NODE_LOGIC_PLAN_SCAN == nodeType(pRight) && - ctjIsSingleTable(((SScanLogicNode*)pRight)->pMeta->tableType)) { - return pRight; - } +static SJoinLogicNode* ctjMatchByNode(SLogicNode* pNode) { + if (QUERY_NODE_LOGIC_PLAN_JOIN == nodeType(pNode) && needSplit((SJoinLogicNode*)pNode)) { + return (SJoinLogicNode*)pNode; } SNode* pChild; FOREACH(pChild, pNode->pChildren) { - SLogicNode* pSplitNode = ctjMatchByNode((SLogicNode*)pChild); + SJoinLogicNode* pSplitNode = ctjMatchByNode((SLogicNode*)pChild); if (NULL != pSplitNode) { return pSplitNode; } @@ -183,23 +183,23 @@ static SLogicNode* ctjMatchByNode(SLogicNode* pNode) { } static bool ctjFindSplitNode(SLogicSubplan* pSubplan, SCtjInfo* pInfo) { - SLogicNode* pSplitNode = ctjMatchByNode(pSubplan->pNode); - if (NULL != pSplitNode) { - pInfo->pScan = (SScanLogicNode*)pSplitNode; + SJoinLogicNode* pJoin = ctjMatchByNode(pSubplan->pNode); + if (NULL != pJoin) { + pInfo->pJoin = pJoin; + pInfo->pSplitNode = nodesListGetNode(pJoin->node.pChildren, 1); pInfo->pSubplan = pSubplan; } - return NULL != pSplitNode; + return NULL != pJoin; } static int32_t ctjSplit(SSplitContext* pCxt, SLogicSubplan* pSubplan) { SCtjInfo info = {0}; - if (!splMatch(pCxt, pSubplan, SPLIT_FLAG_CTJ, (FSplFindSplitNode)ctjFindSplitNode, &info)) { + if (!splMatch(pCxt, pSubplan, 0, (FSplFindSplitNode)ctjFindSplitNode, &info)) { return TSDB_CODE_SUCCESS; } - int32_t code = - nodesListMakeStrictAppend(&info.pSubplan->pChildren, splCreateScanSubplan(pCxt, info.pScan, SPLIT_FLAG_CTJ)); + int32_t code = nodesListMakeStrictAppend(&info.pSubplan->pChildren, splCreateSubplan(pCxt, info.pSplitNode, 0)); if (TSDB_CODE_SUCCESS == code) { - code = splCreateExchangeNode(pCxt, info.pSubplan, info.pScan, info.pSubplan->subplanType); + code = splCreateExchangeNode(pCxt, info.pSubplan, info.pSplitNode, info.pSubplan->subplanType); } ++(pCxt->groupId); pCxt->split = true; diff --git a/source/libs/planner/test/planSubqueryTest.cpp b/source/libs/planner/test/planSubqueryTest.cpp index 2d559c6f3b..f82e10e998 100644 --- a/source/libs/planner/test/planSubqueryTest.cpp +++ b/source/libs/planner/test/planSubqueryTest.cpp @@ -26,6 +26,8 @@ TEST_F(PlanSubqeuryTest, basic) { run("SELECT * FROM (SELECT * FROM t1)"); run("SELECT LAST(c1) FROM (SELECT * FROM t1)"); + + run("SELECT c1 FROM (SELECT TODAY() AS c1 FROM t1)"); } TEST_F(PlanSubqeuryTest, doubleGroupBy) {