diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 1edfcbabad..57599f9421 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -156,104 +156,105 @@ #define TK_SNODES 138 #define TK_CLUSTER 139 #define TK_TRANSACTIONS 140 -#define TK_LIKE 141 -#define TK_INDEX 142 -#define TK_FULLTEXT 143 -#define TK_FUNCTION 144 -#define TK_INTERVAL 145 -#define TK_TOPIC 146 -#define TK_AS 147 -#define TK_CONSUMER 148 -#define TK_GROUP 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_NK_FLOAT 160 -#define TK_COMPACT 161 -#define TK_VNODES 162 -#define TK_IN 163 -#define TK_OUTPUTTYPE 164 -#define TK_AGGREGATE 165 -#define TK_BUFSIZE 166 -#define TK_STREAM 167 -#define TK_INTO 168 -#define TK_TRIGGER 169 -#define TK_AT_ONCE 170 -#define TK_WINDOW_CLOSE 171 -#define TK_KILL 172 -#define TK_CONNECTION 173 -#define TK_TRANSACTION 174 -#define TK_BALANCE 175 -#define TK_VGROUP 176 -#define TK_MERGE 177 -#define TK_REDISTRIBUTE 178 -#define TK_SPLIT 179 -#define TK_SYNCDB 180 -#define TK_DELETE 181 -#define TK_NULL 182 -#define TK_NK_QUESTION 183 -#define TK_NK_ARROW 184 -#define TK_ROWTS 185 -#define TK_TBNAME 186 -#define TK_QSTARTTS 187 -#define TK_QENDTS 188 -#define TK_WSTARTTS 189 -#define TK_WENDTS 190 -#define TK_WDURATION 191 -#define TK_CAST 192 -#define TK_NOW 193 -#define TK_TODAY 194 -#define TK_TIMEZONE 195 -#define TK_COUNT 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_HAVING 224 -#define TK_ORDER 225 -#define TK_SLIMIT 226 -#define TK_SOFFSET 227 -#define TK_LIMIT 228 -#define TK_OFFSET 229 -#define TK_ASC 230 -#define TK_NULLS 231 -#define TK_ID 232 -#define TK_NK_BITNOT 233 -#define TK_INSERT 234 -#define TK_VALUES 235 -#define TK_IMPORT 236 -#define TK_NK_SEMI 237 -#define TK_FILE 238 +#define TK_DISTRIBUTED 141 +#define TK_LIKE 142 +#define TK_INDEX 143 +#define TK_FULLTEXT 144 +#define TK_FUNCTION 145 +#define TK_INTERVAL 146 +#define TK_TOPIC 147 +#define TK_AS 148 +#define TK_CONSUMER 149 +#define TK_GROUP 150 +#define TK_DESC 151 +#define TK_DESCRIBE 152 +#define TK_RESET 153 +#define TK_QUERY 154 +#define TK_CACHE 155 +#define TK_EXPLAIN 156 +#define TK_ANALYZE 157 +#define TK_VERBOSE 158 +#define TK_NK_BOOL 159 +#define TK_RATIO 160 +#define TK_NK_FLOAT 161 +#define TK_COMPACT 162 +#define TK_VNODES 163 +#define TK_IN 164 +#define TK_OUTPUTTYPE 165 +#define TK_AGGREGATE 166 +#define TK_BUFSIZE 167 +#define TK_STREAM 168 +#define TK_INTO 169 +#define TK_TRIGGER 170 +#define TK_AT_ONCE 171 +#define TK_WINDOW_CLOSE 172 +#define TK_KILL 173 +#define TK_CONNECTION 174 +#define TK_TRANSACTION 175 +#define TK_BALANCE 176 +#define TK_VGROUP 177 +#define TK_MERGE 178 +#define TK_REDISTRIBUTE 179 +#define TK_SPLIT 180 +#define TK_SYNCDB 181 +#define TK_DELETE 182 +#define TK_NULL 183 +#define TK_NK_QUESTION 184 +#define TK_NK_ARROW 185 +#define TK_ROWTS 186 +#define TK_TBNAME 187 +#define TK_QSTARTTS 188 +#define TK_QENDTS 189 +#define TK_WSTARTTS 190 +#define TK_WENDTS 191 +#define TK_WDURATION 192 +#define TK_CAST 193 +#define TK_NOW 194 +#define TK_TODAY 195 +#define TK_TIMEZONE 196 +#define TK_COUNT 197 +#define TK_LAST_ROW 198 +#define TK_BETWEEN 199 +#define TK_IS 200 +#define TK_NK_LT 201 +#define TK_NK_GT 202 +#define TK_NK_LE 203 +#define TK_NK_GE 204 +#define TK_NK_NE 205 +#define TK_MATCH 206 +#define TK_NMATCH 207 +#define TK_CONTAINS 208 +#define TK_JOIN 209 +#define TK_INNER 210 +#define TK_SELECT 211 +#define TK_DISTINCT 212 +#define TK_WHERE 213 +#define TK_PARTITION 214 +#define TK_BY 215 +#define TK_SESSION 216 +#define TK_STATE_WINDOW 217 +#define TK_SLIDING 218 +#define TK_FILL 219 +#define TK_VALUE 220 +#define TK_NONE 221 +#define TK_PREV 222 +#define TK_LINEAR 223 +#define TK_NEXT 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/function/functionMgt.h b/include/libs/function/functionMgt.h index 8e003eea7f..a21e408310 100644 --- a/include/libs/function/functionMgt.h +++ b/include/libs/function/functionMgt.h @@ -121,7 +121,8 @@ typedef enum EFunctionType { // internal function FUNCTION_TYPE_SELECT_VALUE, - FUNCTION_TYPE_BLOCK_DIST, // block distribution aggregate function + FUNCTION_TYPE_BLOCK_DIST, // block distribution aggregate function + FUNCTION_TYPE_BLOCK_DIST_INFO, // block distribution pseudo column function // distributed splitting functions FUNCTION_TYPE_APERCENTILE_PARTIAL = 4000, diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 087d252ed7..cae20499a3 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -203,9 +203,10 @@ typedef struct SAlterDnodeStmt { } SAlterDnodeStmt; typedef struct SShowStmt { - ENodeType type; - SNode* pDbName; // SValueNode - SNode* pTbNamePattern; // SValueNode + ENodeType type; + SNode* pDbName; // SValueNode + SNode* pTbName; // SValueNode + EOperatorType tableCondType; } SShowStmt; typedef struct SShowCreateDatabaseStmt { @@ -221,6 +222,12 @@ typedef struct SShowCreateTableStmt { STableMeta* pMeta; } SShowCreateTableStmt; +typedef struct SShowTableDistributedStmt { + ENodeType type; + char dbName[TSDB_DB_NAME_LEN]; + char tableName[TSDB_TABLE_NAME_LEN]; +} SShowTableDistributedStmt; + typedef enum EIndexType { INDEX_TYPE_SMA = 1, INDEX_TYPE_FULLTEXT } EIndexType; typedef struct SIndexOptions { diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index 08190d978e..244896d0db 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -185,6 +185,7 @@ typedef enum ENodeType { QUERY_NODE_SHOW_CREATE_TABLE_STMT, QUERY_NODE_SHOW_CREATE_STABLE_STMT, QUERY_NODE_SHOW_TRANSACTIONS_STMT, + QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT, QUERY_NODE_KILL_CONNECTION_STMT, QUERY_NODE_KILL_QUERY_STMT, QUERY_NODE_KILL_TRANSACTION_STMT, @@ -214,6 +215,7 @@ typedef enum ENodeType { QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN, QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN, QUERY_NODE_PHYSICAL_PLAN_SYSTABLE_SCAN, + QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN, QUERY_NODE_PHYSICAL_PLAN_PROJECT, QUERY_NODE_PHYSICAL_PLAN_MERGE_JOIN, QUERY_NODE_PHYSICAL_PLAN_HASH_AGG, diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h index a9002b5d19..21bc861773 100644 --- a/include/libs/nodes/plannodes.h +++ b/include/libs/nodes/plannodes.h @@ -39,7 +39,8 @@ typedef enum EScanType { SCAN_TYPE_TABLE, SCAN_TYPE_SYSTEM_TABLE, SCAN_TYPE_STREAM, - SCAN_TYPE_TABLE_MERGE + SCAN_TYPE_TABLE_MERGE, + SCAN_TYPE_BLOCK_INFO } EScanType; typedef struct SScanLogicNode { @@ -143,21 +144,21 @@ typedef enum EWindowAlgorithm { } EWindowAlgorithm; typedef struct SWindowLogicNode { - SLogicNode node; - EWindowType winType; - SNodeList* pFuncs; - int64_t interval; - int64_t offset; - int64_t sliding; - int8_t intervalUnit; - int8_t slidingUnit; - int64_t sessionGap; - SNode* pTspk; - SNode* pStateExpr; - int8_t triggerType; - int64_t watermark; - double filesFactor; - EWindowAlgorithm windowAlgo; + SLogicNode node; + EWindowType winType; + SNodeList* pFuncs; + int64_t interval; + int64_t offset; + int64_t sliding; + int8_t intervalUnit; + int8_t slidingUnit; + int64_t sessionGap; + SNode* pTspk; + SNode* pStateExpr; + int8_t triggerType; + int64_t watermark; + double filesFactor; + EWindowAlgorithm windowAlgo; } SWindowLogicNode; typedef struct SFillLogicNode { @@ -247,6 +248,7 @@ typedef struct SScanPhysiNode { } SScanPhysiNode; typedef SScanPhysiNode STagScanPhysiNode; +typedef SScanPhysiNode SBlockDistScanPhysiNode; typedef struct SSystemTableScanPhysiNode { SScanPhysiNode scan; diff --git a/include/libs/transport/trpc.h b/include/libs/transport/trpc.h index e3db1550a0..77de5f4756 100644 --- a/include/libs/transport/trpc.h +++ b/include/libs/transport/trpc.h @@ -23,6 +23,7 @@ extern "C" { #include #include "taosdef.h" #include "tmsg.h" +#include "ttrace.h" #define TAOS_CONN_SERVER 0 #define TAOS_CONN_CLIENT 1 @@ -41,10 +42,12 @@ typedef struct { typedef struct SRpcHandleInfo { // rpc info - void * handle; // rpc handle returned to app - int64_t refId; // refid, used by server - int32_t noResp; // has response or not(default 0, 0: resp, 1: no resp); - int32_t persistHandle; // persist handle or not + void * handle; // rpc handle returned to app + int64_t refId; // refid, used by server + int32_t noResp; // has response or not(default 0, 0: resp, 1: no resp); + int32_t persistHandle; // persist handle or not + STraceId traceId; + // int64_t traceId; // app info void *ahandle; // app handle set by client diff --git a/include/util/ttrace.h b/include/util/ttrace.h new file mode 100644 index 0000000000..206cbbf28d --- /dev/null +++ b/include/util/ttrace.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +#ifndef _TD_TRACE_H_ +#define _TD_TRACE_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#pragma(push, 1) + +typedef struct STraceId { + int64_t rootId; + int64_t msgId; +} STraceId; + +#pragma(pop) + +#define TRACE_SET_ROOTID(traceId, root) \ + do { \ + (traceId)->rootId = root; \ + } while (0); + +#define TRACE_GET_ROOTID(traceId) (traceId)->rootId + +#define TRACE_SET_MSGID(traceId, mId) \ + do { \ + (traceId)->msgId = mId; \ + } while (0) + +#define TRACE_GET_MSGID(traceId) (traceId)->msgId + +#define TRACE_TO_STR(traceId, buf) \ + do { \ + sprintf(buf, "0x%" PRIx64 ":0x%" PRIx64 "", traceId->rootId, traceId->msgId); \ + } while (0) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/source/client/inc/clientInt.h b/source/client/inc/clientInt.h index 51a5b84a1c..1c6142cb31 100644 --- a/source/client/inc/clientInt.h +++ b/source/client/inc/clientInt.h @@ -162,6 +162,7 @@ typedef struct SReqResultInfo { int32_t precision; bool convertUcs4; int32_t payloadLen; + char* convertJson; } SReqResultInfo; typedef struct SRequestSendRecvBody { @@ -242,6 +243,7 @@ static FORCE_INLINE SReqResultInfo* tmqGetNextResInfo(TAOS_RES* res, bool conver taosMemoryFreeClear(msg->resInfo.pCol); taosMemoryFreeClear(msg->resInfo.length); taosMemoryFreeClear(msg->resInfo.convertBuf); + taosMemoryFreeClear(msg->resInfo.convertJson); } setQueryResultFromRsp(&msg->resInfo, pRetrieve, convertUcs4, false); return &msg->resInfo; diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index 78454268b7..9f04e89694 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -212,6 +212,7 @@ void doFreeReqResultInfo(SReqResultInfo *pResInfo) { taosMemoryFreeClear(pResInfo->pCol); taosMemoryFreeClear(pResInfo->fields); taosMemoryFreeClear(pResInfo->userFields); + taosMemoryFreeClear(pResInfo->convertJson); if (pResInfo->convertBuf != NULL) { for (int32_t i = 0; i < pResInfo->numOfCols; ++i) { diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 9668d2b72c..7fc15ca85a 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -1339,67 +1339,6 @@ static int32_t doConvertUCS4(SReqResultInfo* pResultInfo, int32_t numOfRows, int } } - pResultInfo->pCol[i].pData = pResultInfo->convertBuf[i]; - pResultInfo->row[i] = pResultInfo->pCol[i].pData; - } else if (type == TSDB_DATA_TYPE_JSON && colLength[i] > 0) { - char* p = taosMemoryRealloc(pResultInfo->convertBuf[i], colLength[i]); - if (p == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; - } - - pResultInfo->convertBuf[i] = p; - int32_t len = 0; - SResultColumn* pCol = &pResultInfo->pCol[i]; - for (int32_t j = 0; j < numOfRows; ++j) { - if (pCol->offset[j] != -1) { - char* pStart = pCol->offset[j] + pCol->pData; - - int32_t jsonInnerType = *pStart; - char* jsonInnerData = pStart + CHAR_BYTES; - char dst[TSDB_MAX_JSON_TAG_LEN] = {0}; - if (jsonInnerType == TSDB_DATA_TYPE_NULL) { - sprintf(varDataVal(dst), "%s", TSDB_DATA_NULL_STR_L); - varDataSetLen(dst, strlen(varDataVal(dst))); - } else if (jsonInnerType == TD_TAG_JSON) { - char* jsonString = parseTagDatatoJson(pStart); - STR_TO_VARSTR(dst, jsonString); - taosMemoryFree(jsonString); - } else if (jsonInnerType == TSDB_DATA_TYPE_NCHAR) { // value -> "value" - *(char*)varDataVal(dst) = '\"'; - int32_t length = taosUcs4ToMbs((TdUcs4*)varDataVal(jsonInnerData), varDataLen(jsonInnerData), - varDataVal(dst) + CHAR_BYTES); - if (length <= 0) { - tscError("charset:%s to %s. convert failed.", DEFAULT_UNICODE_ENCODEC, tsCharset); - length = 0; - } - varDataSetLen(dst, length + CHAR_BYTES * 2); - *(char*)POINTER_SHIFT(varDataVal(dst), length + CHAR_BYTES) = '\"'; - } else if (jsonInnerType == TSDB_DATA_TYPE_DOUBLE) { - double jsonVd = *(double*)(jsonInnerData); - sprintf(varDataVal(dst), "%.9lf", jsonVd); - varDataSetLen(dst, strlen(varDataVal(dst))); - } else if (jsonInnerType == TSDB_DATA_TYPE_BOOL) { - sprintf(varDataVal(dst), "%s", (*((char*)jsonInnerData) == 1) ? "true" : "false"); - varDataSetLen(dst, strlen(varDataVal(dst))); - } else { - ASSERT(0); - } - - if (len + varDataTLen(dst) > colLength[i]) { - p = taosMemoryRealloc(pResultInfo->convertBuf[i], len + varDataTLen(dst)); - if (p == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; - } - - pResultInfo->convertBuf[i] = p; - } - p = pResultInfo->convertBuf[i] + len; - memcpy(p, dst, varDataTLen(dst)); - pCol->offset[j] = len; - len += varDataTLen(dst); - } - } - pResultInfo->pCol[i].pData = pResultInfo->convertBuf[i]; pResultInfo->row[i] = pResultInfo->pCol[i].pData; } @@ -1408,6 +1347,171 @@ static int32_t doConvertUCS4(SReqResultInfo* pResultInfo, int32_t numOfRows, int return TSDB_CODE_SUCCESS; } +static int32_t estimateJsonLen(SReqResultInfo* pResultInfo, int32_t numOfCols, int32_t numOfRows){ + char* p = (char*)pResultInfo->pData; + + int32_t len = sizeof(int32_t) + sizeof(uint64_t) + numOfCols * (sizeof(int16_t) + sizeof(int32_t)); + int32_t* colLength = (int32_t*)(p + len); + len += sizeof(int32_t) * numOfCols; + + char* pStart = p + len; + for (int32_t i = 0; i < numOfCols; ++i) { + int32_t colLen = htonl(colLength[i]); + + if (pResultInfo->fields[i].type == TSDB_DATA_TYPE_JSON) { + int32_t* offset = (int32_t*)pStart; + int32_t lenTmp = numOfRows * sizeof(int32_t); + len += lenTmp; + pStart += lenTmp; + + for (int32_t j = 0; j < numOfRows; ++j) { + if (offset[j] == -1) { + continue; + } + char* data = offset[j] + pStart; + + int32_t jsonInnerType = *data; + char* jsonInnerData = data + CHAR_BYTES; + if (jsonInnerType == TSDB_DATA_TYPE_NULL) { + len += (VARSTR_HEADER_SIZE + strlen(TSDB_DATA_NULL_STR_L)); + } else if (jsonInnerType & TD_TAG_JSON) { + len += (VARSTR_HEADER_SIZE + ((const STag*)(data))->len); + } else if (jsonInnerType == TSDB_DATA_TYPE_NCHAR) { // value -> "value" + len += varDataTLen(jsonInnerData) + CHAR_BYTES * 2; + } else if (jsonInnerType == TSDB_DATA_TYPE_DOUBLE) { + len += (VARSTR_HEADER_SIZE + 32); + } else if (jsonInnerType == TSDB_DATA_TYPE_BOOL) { + len += (VARSTR_HEADER_SIZE + 5); + } else { + ASSERT(0); + } + + } + } else if (IS_VAR_DATA_TYPE(pResultInfo->fields[i].type)) { + int32_t lenTmp = numOfRows * sizeof(int32_t); + len += (lenTmp + colLen); + pStart += lenTmp; + } else { + int32_t lenTmp = BitmapLen(pResultInfo->numOfRows); + len += (lenTmp + colLen); + pStart += lenTmp; + } + pStart += colLen; + } + return len; +} + +static int32_t doConvertJson(SReqResultInfo* pResultInfo, int32_t numOfCols, int32_t numOfRows) { + bool needConvert = false; + for (int32_t i = 0; i < numOfCols; ++i) { + if (pResultInfo->fields[i].type == TSDB_DATA_TYPE_JSON) { + needConvert = true; + break; + } + } + if(!needConvert) return TSDB_CODE_SUCCESS; + + char* p = (char*)pResultInfo->pData; + int32_t dataLen = estimateJsonLen(pResultInfo, numOfCols, numOfRows); + + pResultInfo->convertJson = taosMemoryCalloc(1, dataLen); + if(pResultInfo->convertJson == NULL) return TSDB_CODE_OUT_OF_MEMORY; + char* p1 = pResultInfo->convertJson; + + int32_t len = sizeof(int32_t) + sizeof(uint64_t) + numOfCols * (sizeof(int16_t) + sizeof(int32_t)); + memcpy(p1, p, len); + + p += len; + p1 += len; + + len = sizeof(int32_t) * numOfCols; + int32_t* colLength = (int32_t*)p; + int32_t* colLength1 = (int32_t*)p1; + memcpy(p1, p, len); + p += len; + p1 += len; + + char* pStart = p; + char* pStart1 = p1; + for (int32_t i = 0; i < numOfCols; ++i) { + int32_t colLen = htonl(colLength[i]); + int32_t colLen1 = htonl(colLength1[i]); + ASSERT(colLen < dataLen); + + if (pResultInfo->fields[i].type == TSDB_DATA_TYPE_JSON) { + int32_t* offset = (int32_t*)pStart; + int32_t* offset1 = (int32_t*)pStart1; + len = numOfRows * sizeof(int32_t); + memcpy(pStart1, pStart, len); + pStart += len; + pStart1 += len; + + len = 0; + for (int32_t j = 0; j < numOfRows; ++j) { + if (offset[j] == -1) { + continue; + } + char* data = offset[j] + pStart; + + int32_t jsonInnerType = *data; + char* jsonInnerData = data + CHAR_BYTES; + char dst[TSDB_MAX_JSON_TAG_LEN] = {0}; + if (jsonInnerType == TSDB_DATA_TYPE_NULL) { + sprintf(varDataVal(dst), "%s", TSDB_DATA_NULL_STR_L); + varDataSetLen(dst, strlen(varDataVal(dst))); + } else if (jsonInnerType & TD_TAG_JSON) { + char* jsonString = parseTagDatatoJson(data); + STR_TO_VARSTR(dst, jsonString); + taosMemoryFree(jsonString); + } else if (jsonInnerType == TSDB_DATA_TYPE_NCHAR) { // value -> "value" + *(char*)varDataVal(dst) = '\"'; + int32_t length = taosUcs4ToMbs((TdUcs4*)varDataVal(jsonInnerData), varDataLen(jsonInnerData), + varDataVal(dst) + CHAR_BYTES); + if (length <= 0) { + tscError("charset:%s to %s. convert failed.", DEFAULT_UNICODE_ENCODEC, tsCharset); + length = 0; + } + varDataSetLen(dst, length + CHAR_BYTES * 2); + *(char*)POINTER_SHIFT(varDataVal(dst), length + CHAR_BYTES) = '\"'; + } else if (jsonInnerType == TSDB_DATA_TYPE_DOUBLE) { + double jsonVd = *(double*)(jsonInnerData); + sprintf(varDataVal(dst), "%.9lf", jsonVd); + varDataSetLen(dst, strlen(varDataVal(dst))); + } else if (jsonInnerType == TSDB_DATA_TYPE_BOOL) { + sprintf(varDataVal(dst), "%s", (*((char*)jsonInnerData) == 1) ? "true" : "false"); + varDataSetLen(dst, strlen(varDataVal(dst))); + } else { + ASSERT(0); + } + + offset1[j]= len; + memcpy(pStart1 + len, dst, varDataTLen(dst)); + len += varDataTLen(dst); + } + colLen1 = len; + colLength1[i] = htonl(len); + } else if (IS_VAR_DATA_TYPE(pResultInfo->fields[i].type)) { + len = numOfRows * sizeof(int32_t); + memcpy(pStart1, pStart, len); + pStart += len; + pStart1 += len; + memcpy(pStart1, pStart, colLen); + } else { + len = BitmapLen(pResultInfo->numOfRows); + memcpy(pStart1, pStart, len); + pStart += len; + pStart1 += len; + memcpy(pStart1, pStart, colLen); + + } + pStart += colLen; + pStart1 += colLen1; + } + + pResultInfo->pData = pResultInfo->convertJson; + return TSDB_CODE_SUCCESS; +} + int32_t setResultDataPtr(SReqResultInfo* pResultInfo, TAOS_FIELD* pFields, int32_t numOfCols, int32_t numOfRows, bool convertUcs4) { assert(numOfCols > 0 && pFields != NULL && pResultInfo != NULL); @@ -1419,6 +1523,10 @@ int32_t setResultDataPtr(SReqResultInfo* pResultInfo, TAOS_FIELD* pFields, int32 if (code != TSDB_CODE_SUCCESS) { return code; } + code = doConvertJson(pResultInfo, numOfCols, numOfRows); + if (code != TSDB_CODE_SUCCESS) { + return code; + } char* p = (char*)pResultInfo->pData; @@ -1462,8 +1570,7 @@ int32_t setResultDataPtr(SReqResultInfo* pResultInfo, TAOS_FIELD* pFields, int32 pStart += colLength[i]; } - // convert UCS4-LE encoded character to native multi-bytes character in current data block. - if (convertUcs4) { + if(convertUcs4){ code = doConvertUCS4(pResultInfo, numOfRows, numOfCols, colLength); } diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c index bd78fe46ef..9ffa0e606a 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c @@ -101,7 +101,8 @@ void dmStopMonitorThread(SDnodeMgmt *pMgmt) { static void dmProcessMgmtQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) { SDnodeMgmt *pMgmt = pInfo->ahandle; int32_t code = -1; - dTrace("msg:%p, will be processed in dnode queue, type:%s", pMsg, TMSG_INFO(pMsg->msgType)); + STraceId * trace = &pMsg->info.traceId; + dGTrace("msg:%p, will be processed in dnode queue, type:%s", pMsg, TMSG_INFO(pMsg->msgType)); switch (pMsg->msgType) { case TDMT_DND_CONFIG_DNODE: diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c b/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c index 88f667ce9e..60c42d31f5 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c @@ -48,7 +48,8 @@ static inline void mmSendRsp(SRpcMsg *pMsg, int32_t code) { static void mmProcessRpcMsg(SQueueInfo *pInfo, SRpcMsg *pMsg) { SMnodeMgmt *pMgmt = pInfo->ahandle; int32_t code = -1; - dTrace("msg:%p, get from mnode queue", pMsg); + STraceId * trace = &pMsg->info.traceId; + dGTrace("msg:%p, get from mnode queue", pMsg); switch (pMsg->msgType) { case TDMT_MON_MM_INFO: diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c index 88831384d4..09fdd4b087 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c @@ -31,7 +31,8 @@ static void vmProcessMgmtQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) { SVnodeMgmt *pMgmt = pInfo->ahandle; int32_t code = -1; - dTrace("msg:%p, get from vnode-mgmt queue", pMsg); + STraceId *trace = &pMsg->info.traceId; + dGTrace("msg:%p, get from vnode-mgmt queue", pMsg); switch (pMsg->msgType) { case TDMT_MON_VM_INFO: code = vmProcessGetMonitorInfoReq(pMgmt, pMsg); @@ -97,7 +98,7 @@ static void vmProcessFetchQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) { static void vmProcessSyncQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) { SVnodeObj *pVnode = pInfo->ahandle; - SRpcMsg *pMsg = NULL; + SRpcMsg * pMsg = NULL; for (int32_t i = 0; i < numOfMsgs; ++i) { if (taosGetQitem(qall, (void **)&pMsg) == 0) continue; @@ -118,7 +119,7 @@ static void vmProcessSyncQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numOf static void vmProcessMergeQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) { SVnodeObj *pVnode = pInfo->ahandle; - SRpcMsg *pMsg = NULL; + SRpcMsg * pMsg = NULL; for (int32_t i = 0; i < numOfMsgs; ++i) { if (taosGetQitem(qall, (void **)&pMsg) == 0) continue; diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c index 13f2452e66..660f512fc5 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c +++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c @@ -40,8 +40,9 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) { SMgmtWrapper *pWrapper = NULL; SDnodeHandle *pHandle = &pTrans->msgHandles[TMSG_INDEX(pRpc->msgType)]; - dTrace("msg:%s is received, handle:%p len:%d code:0x%x app:%p refId:%" PRId64, TMSG_INFO(pRpc->msgType), - pRpc->info.handle, pRpc->contLen, pRpc->code, pRpc->info.ahandle, pRpc->info.refId); + STraceId *trace = &pRpc->info.traceId; + dGTrace("msg:%s is received, handle:%p len:%d code:0x%x app:%p refId:%" PRId64, TMSG_INFO(pRpc->msgType), + pRpc->info.handle, pRpc->contLen, pRpc->code, pRpc->info.ahandle, pRpc->info.refId); if (pRpc->msgType == TDMT_DND_NET_TEST) { dmProcessNetTestReq(pDnode, pRpc); diff --git a/source/dnode/mgmt/node_util/inc/dmUtil.h b/source/dnode/mgmt/node_util/inc/dmUtil.h index c142a6cfd8..7897f62f62 100644 --- a/source/dnode/mgmt/node_util/inc/dmUtil.h +++ b/source/dnode/mgmt/node_util/inc/dmUtil.h @@ -34,13 +34,13 @@ #include "dnode.h" #include "mnode.h" -#include "qnode.h" #include "monitor.h" +#include "qnode.h" #include "sync.h" #include "wal.h" #include "libs/function/function.h" - +// clang-format off #ifdef __cplusplus extern "C" { #endif @@ -51,6 +51,7 @@ extern "C" { #define dInfo(...) { if (dDebugFlag & DEBUG_INFO) { taosPrintLog("DND ", DEBUG_INFO, 255, __VA_ARGS__); }} #define dDebug(...) { if (dDebugFlag & DEBUG_DEBUG) { taosPrintLog("DND ", DEBUG_DEBUG, dDebugFlag, __VA_ARGS__); }} #define dTrace(...) { if (dDebugFlag & DEBUG_TRACE) { taosPrintLog("DND ", DEBUG_TRACE, dDebugFlag, __VA_ARGS__); }} +#define dGTrace(param, ...) do { char buf[40] = {0}; TRACE_TO_STR(trace, buf); dTrace(param ",GTID: %s", __VA_ARGS__, buf);} while(0) typedef enum { DNODE = 0, @@ -184,3 +185,4 @@ void dmSetMnodeEpSet(SDnodeData *pData, SEpSet *pEpSet); #endif #endif /*_TD_DM_INT_H_*/ +// clang-format on diff --git a/source/dnode/mnode/impl/inc/mndInt.h b/source/dnode/mnode/impl/inc/mndInt.h index 37bae1d5c0..c810a0cbc7 100644 --- a/source/dnode/mnode/impl/inc/mndInt.h +++ b/source/dnode/mnode/impl/inc/mndInt.h @@ -40,6 +40,8 @@ extern "C" { #define mInfo(...) { if (mDebugFlag & DEBUG_INFO) { taosPrintLog("MND ", DEBUG_INFO, 255, __VA_ARGS__); }} #define mDebug(...) { if (mDebugFlag & DEBUG_DEBUG) { taosPrintLog("MND ", DEBUG_DEBUG, mDebugFlag, __VA_ARGS__); }} #define mTrace(...) { if (mDebugFlag & DEBUG_TRACE) { taosPrintLog("MND ", DEBUG_TRACE, mDebugFlag, __VA_ARGS__); }} +#define mGTrace(param, ...) do { char buf[40] = {0}; TRACE_TO_STR(trace, buf); mTrace(param ", GTID: %s", __VA_ARGS__, buf);} while(0) + // clang-format on #define SYSTABLE_SCH_TABLE_NAME_LEN ((TSDB_TABLE_NAME_LEN - 1) + VARSTR_HEADER_SIZE) @@ -54,7 +56,7 @@ typedef void (*ShowFreeIterFp)(SMnode *pMnode, void *pIter); typedef struct SQWorker SQHandle; typedef struct { - const char *name; + const char * name; MndInitFp initFp; MndCleanupFp cleanupFp; } SMnodeStep; @@ -63,7 +65,7 @@ typedef struct { int64_t showId; ShowRetrieveFp retrieveFps[TSDB_MGMT_TABLE_MAX]; ShowFreeIterFp freeIterFps[TSDB_MGMT_TABLE_MAX]; - SCacheObj *cache; + SCacheObj * cache; } SShowMgmt; typedef struct { @@ -100,14 +102,14 @@ typedef struct SMnode { bool stopped; bool restored; bool deploy; - char *path; + char * path; int64_t checkTime; - SSdb *pSdb; - SArray *pSteps; - SQHandle *pQuery; - SHashObj *infosMeta; - SHashObj *perfsMeta; - SWal *pWal; + SSdb * pSdb; + SArray * pSteps; + SQHandle * pQuery; + SHashObj * infosMeta; + SHashObj * perfsMeta; + SWal * pWal; SShowMgmt showMgmt; SProfileMgmt profileMgmt; STelemMgmt telemMgmt; diff --git a/source/dnode/mnode/impl/src/mndMain.c b/source/dnode/mnode/impl/src/mndMain.c index bc418e0f53..fa6f45bdad 100644 --- a/source/dnode/mnode/impl/src/mndMain.c +++ b/source/dnode/mnode/impl/src/mndMain.c @@ -58,21 +58,21 @@ static void *mndBuildTimerMsg(int32_t *pContLen) { static void mndPullupTrans(SMnode *pMnode) { int32_t contLen = 0; - void *pReq = mndBuildTimerMsg(&contLen); + void * pReq = mndBuildTimerMsg(&contLen); SRpcMsg rpcMsg = {.msgType = TDMT_MND_TRANS_TIMER, .pCont = pReq, .contLen = contLen}; tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg); } static void mndCalMqRebalance(SMnode *pMnode) { int32_t contLen = 0; - void *pReq = mndBuildTimerMsg(&contLen); + void * pReq = mndBuildTimerMsg(&contLen); SRpcMsg rpcMsg = {.msgType = TDMT_MND_MQ_TIMER, .pCont = pReq, .contLen = contLen}; tmsgPutToQueue(&pMnode->msgCb, READ_QUEUE, &rpcMsg); } static void mndPullupTelem(SMnode *pMnode) { int32_t contLen = 0; - void *pReq = mndBuildTimerMsg(&contLen); + void * pReq = mndBuildTimerMsg(&contLen); SRpcMsg rpcMsg = {.msgType = TDMT_MND_TELEM_TIMER, .pCont = pReq, .contLen = contLen}; tmsgPutToQueue(&pMnode->msgCb, READ_QUEUE, &rpcMsg); } @@ -378,7 +378,7 @@ void mndStop(SMnode *pMnode) { } int32_t mndProcessSyncMsg(SRpcMsg *pMsg) { - SMnode *pMnode = pMsg->info.node; + SMnode * pMnode = pMsg->info.node; SSyncMgmt *pMgmt = &pMnode->syncMgmt; int32_t code = 0; @@ -540,7 +540,7 @@ static int32_t mndCheckMsgContent(SRpcMsg *pMsg) { } int32_t mndProcessRpcMsg(SRpcMsg *pMsg) { - SMnode *pMnode = pMsg->info.node; + SMnode * pMnode = pMsg->info.node; MndMsgFp fp = pMnode->msgFp[TMSG_INDEX(pMsg->msgType)]; if (fp == NULL) { mError("msg:%p, failed to get msg handle, app:%p type:%s", pMsg, pMsg->info.ahandle, TMSG_INFO(pMsg->msgType)); @@ -551,7 +551,8 @@ int32_t mndProcessRpcMsg(SRpcMsg *pMsg) { if (mndCheckMsgContent(pMsg) != 0) return -1; if (mndCheckMnodeState(pMsg) != 0) return -1; - mTrace("msg:%p, start to process in mnode, app:%p type:%s", pMsg, pMsg->info.ahandle, TMSG_INFO(pMsg->msgType)); + STraceId *trace = &pMsg->info.traceId; + mGTrace("msg:%p, start to process in mnode, app:%p type:%s", pMsg, pMsg->info.ahandle, TMSG_INFO(pMsg->msgType)); int32_t code = (*fp)(pMsg); mndReleaseRpcRef(pMnode); @@ -592,7 +593,7 @@ int32_t mndGetMonitorInfo(SMnode *pMnode, SMonClusterInfo *pClusterInfo, SMonVgr SMonGrantInfo *pGrantInfo) { if (mndAcquireRpcRef(pMnode) != 0) return -1; - SSdb *pSdb = pMnode->pSdb; + SSdb * pSdb = pMnode->pSdb; int64_t ms = taosGetTimestampMs(); pClusterInfo->dnodes = taosArrayInit(sdbGetSize(pSdb, SDB_DNODE), sizeof(SMonDnodeDesc)); @@ -668,7 +669,7 @@ int32_t mndGetMonitorInfo(SMnode *pMnode, SMonClusterInfo *pClusterInfo, SMonVgr pGrantInfo->timeseries_used += pVgroup->numOfTimeSeries; tstrncpy(desc.status, "unsynced", sizeof(desc.status)); for (int32_t i = 0; i < pVgroup->replica; ++i) { - SVnodeGid *pVgid = &pVgroup->vnodeGid[i]; + SVnodeGid * pVgid = &pVgroup->vnodeGid[i]; SMonVnodeDesc *pVnDesc = &desc.vnodes[i]; pVnDesc->dnode_id = pVgid->dnodeId; tstrncpy(pVnDesc->vnode_role, syncStr(pVgid->role), sizeof(pVnDesc->vnode_role)); diff --git a/source/dnode/vnode/src/inc/vnd.h b/source/dnode/vnode/src/inc/vnd.h index b0599b82ef..9339402d43 100644 --- a/source/dnode/vnode/src/inc/vnd.h +++ b/source/dnode/vnode/src/inc/vnd.h @@ -18,6 +18,7 @@ #include "sync.h" #include "syncTools.h" +#include "ttrace.h" #include "vnodeInt.h" #ifdef __cplusplus @@ -31,6 +32,7 @@ extern "C" { #define vInfo(...) do { if (vDebugFlag & DEBUG_INFO) { taosPrintLog("VND ", DEBUG_INFO, 255, __VA_ARGS__); }} while(0) #define vDebug(...) do { if (vDebugFlag & DEBUG_DEBUG) { taosPrintLog("VND ", DEBUG_DEBUG, vDebugFlag, __VA_ARGS__); }} while(0) #define vTrace(...) do { if (vDebugFlag & DEBUG_TRACE) { taosPrintLog("VND ", DEBUG_TRACE, vDebugFlag, __VA_ARGS__); }} while(0) +#define vGTrace(param, ...) do { char buf[40] = {0}; TRACE_TO_STR(trace, buf); vTrace(param " GTID: %s", __VA_ARGS__, buf);} while(0)//#define vDye(...) do // clang-format on // vnodeCfg.c @@ -89,4 +91,4 @@ void vnodeSyncClose(SVnode* pVnode); } #endif -#endif /*_TD_VND_H_*/ \ No newline at end of file +#endif /*_TD_VND_H_*/ diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index ea3494594e..ae61aa454e 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -84,8 +84,8 @@ static int32_t vnodeProcessAlterReplicaReq(SVnode *pVnode, SRpcMsg *pMsg) { terrno = TSDB_CODE_INVALID_MSG; return TSDB_CODE_INVALID_MSG; } - - vInfo("vgId:%d, start to alter vnode replica to %d, handle:%p", TD_VID(pVnode), req.replica, pMsg->info.handle); + STraceId *trace = &pMsg->info.traceId; + vGTrace("vgId:%d, start to alter vnode replica to %d, handle:%p", TD_VID(pVnode), req.replica, pMsg->info.handle); SSyncCfg cfg = {.replicaNum = req.replica, .myIndex = req.selfIndex}; for (int32_t r = 0; r < req.replica; ++r) { SNodeInfo *pNode = &cfg.nodeInfo[r]; @@ -119,14 +119,15 @@ static int32_t vnodeProcessAlterReplicaReq(SVnode *pVnode, SRpcMsg *pMsg) { } void vnodeProposeMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) { - SVnode *pVnode = pInfo->ahandle; + SVnode * pVnode = pInfo->ahandle; int32_t vgId = pVnode->config.vgId; int32_t code = 0; SRpcMsg *pMsg = NULL; for (int32_t m = 0; m < numOfMsgs; m++) { if (taosGetQitem(qall, (void **)&pMsg) == 0) continue; - vTrace("vgId:%d, msg:%p get from vnode-write queue handle:%p", vgId, pMsg, pMsg->info.handle); + STraceId *trace = &pMsg->info.traceId; + vGTrace("vgId:%d, msg:%p get from vnode-write queue handle:%p", vgId, pMsg, pMsg->info.handle); if (pMsg->msgType == TDMT_VND_ALTER_REPLICA) { code = vnodeProcessAlterReplicaReq(pVnode, pMsg); @@ -149,10 +150,10 @@ void vnodeProposeMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) { newEpSet.inUse = (newEpSet.inUse + 1) % newEpSet.numOfEps; } - vTrace("vgId:%d, msg:%p is redirect since not leader, numOfEps:%d inUse:%d", vgId, pMsg, newEpSet.numOfEps, - newEpSet.inUse); + vGTrace("vgId:%d, msg:%p is redirect since not leader, numOfEps:%d inUse:%d", vgId, pMsg, newEpSet.numOfEps, + newEpSet.inUse); for (int32_t i = 0; i < newEpSet.numOfEps; ++i) { - vTrace("vgId:%d, msg:%p redirect:%d ep:%s:%u", vgId, pMsg, i, newEpSet.eps[i].fqdn, newEpSet.eps[i].port); + vGTrace("vgId:%d, msg:%p redirect:%d ep:%s:%u", vgId, pMsg, i, newEpSet.eps[i].fqdn, newEpSet.eps[i].port); } SRpcMsg rsp = {.code = TSDB_CODE_RPC_REDIRECT, .info = pMsg->info}; @@ -164,7 +165,7 @@ void vnodeProposeMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) { tmsgSendRsp(&rsp); } - vTrace("vgId:%d, msg:%p is freed, code:0x%x", vgId, pMsg, code); + vGTrace("vgId:%d, msg:%p is freed, code:0x%x", vgId, pMsg, code); rpcFreeCont(pMsg->pCont); taosFreeQitem(pMsg); } @@ -173,15 +174,16 @@ void vnodeProposeMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) { } void vnodeApplyMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) { - SVnode *pVnode = pInfo->ahandle; + SVnode * pVnode = pInfo->ahandle; int32_t vgId = pVnode->config.vgId; int32_t code = 0; SRpcMsg *pMsg = NULL; for (int32_t i = 0; i < numOfMsgs; ++i) { if (taosGetQitem(qall, (void **)&pMsg) == 0) continue; - vTrace("vgId:%d, msg:%p get from vnode-apply queue, index:%" PRId64 " type:%s handle:%p", vgId, pMsg, - pMsg->info.conn.applyIndex, TMSG_INFO(pMsg->msgType), pMsg->info.handle); + STraceId *trace = &pMsg->info.traceId; + vGTrace("vgId:%d, msg:%p get from vnode-apply queue, type:%s handle:%p", vgId, pMsg, TMSG_INFO(pMsg->msgType), + pMsg->info.handle); SRpcMsg rsp = {.code = pMsg->code, .info = pMsg->info}; if (rsp.code == 0) { @@ -196,7 +198,7 @@ void vnodeApplyMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) { tmsgSendRsp(&rsp); } - vTrace("vgId:%d, msg:%p is freed, code:0x%x", vgId, pMsg, rsp.code); + vGTrace("vgId:%d, msg:%p is freed, code:0x%x", vgId, pMsg, rsp.code); rpcFreeCont(pMsg->pCont); taosFreeQitem(pMsg); } @@ -218,8 +220,9 @@ int32_t vnodeProcessSyncReq(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) { char *syncNodeStr = sync2SimpleStr(pVnode->sync); snprintf(logBuf, sizeof(logBuf), "==vnodeProcessSyncReq== msgType:%d, syncNode: %s", pMsg->msgType, syncNodeStr); static int64_t vndTick = 0; + STraceId * trace = &pMsg->info.traceId; if (++vndTick % 10 == 1) { - vTrace("sync trace msg:%s, %s", TMSG_INFO(pMsg->msgType), syncNodeStr); + vGTrace("sync trace msg:%s, %s", TMSG_INFO(pMsg->msgType), syncNodeStr); } syncRpcMsgLog2(logBuf, pMsg); taosMemoryFree(syncNodeStr); @@ -334,8 +337,9 @@ static void vnodeSyncReconfig(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SReCon syncGetAndDelRespRpc(pVnode->sync, cbMeta.seqNum, &rpcMsg.info); rpcMsg.info.conn.applyIndex = cbMeta.index; - vInfo("vgId:%d, alter vnode replica is confirmed, type:%s contLen:%d seq:%" PRIu64 " index:%" PRId64 " handle:%p", - TD_VID(pVnode), TMSG_INFO(pMsg->msgType), pMsg->contLen, cbMeta.seqNum, cbMeta.index, rpcMsg.info.handle); + STraceId *trace = (STraceId *)&pMsg->info.traceId; + vGTrace("vgId:%d, alter vnode replica is confirmed, type:%s contLen:%d seq:%" PRIu64 " handle:%p", TD_VID(pVnode), + TMSG_INFO(pMsg->msgType), pMsg->contLen, cbMeta.seqNum, rpcMsg.info.handle); if (rpcMsg.info.handle != NULL) { tmsgSendRsp(&rpcMsg); } @@ -344,7 +348,7 @@ static void vnodeSyncReconfig(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SReCon } static void vnodeSyncCommitMsg(SSyncFSM *pFsm, const SRpcMsg *pMsg, SFsmCbMeta cbMeta) { - SVnode *pVnode = pFsm->data; + SVnode * pVnode = pFsm->data; SSnapshot snapshot = {0}; SyncIndex beginIndex = SYNC_INDEX_INVALID; char logBuf[256] = {0}; diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index e1375e8a6f..d2985a33a8 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -1508,6 +1508,11 @@ static int32_t translateBlockDistFunc(SFunctionNode* pFunc, char* pErrBuf, int32 return TSDB_CODE_SUCCESS; } +static int32_t translateBlockDistInfoFunc(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + pFunc->node.resType = (SDataType){.bytes = 128, .type = TSDB_DATA_TYPE_VARCHAR}; + return TSDB_CODE_SUCCESS; +} + static bool getBlockDistFuncEnv(SFunctionNode* UNUSED_PARAM(pFunc), SFuncExecEnv* pEnv) { pEnv->calcMemSize = sizeof(STableBlockDistInfo); return true; @@ -2520,6 +2525,12 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .getEnvFunc = getBlockDistFuncEnv, .processFunc = blockDistFunction, .finalizeFunc = blockDistFinalize + }, + { + .name = "_block_dist_info", + .type = FUNCTION_TYPE_BLOCK_DIST_INFO, + .classification = FUNC_MGT_PSEUDO_COLUMN_FUNC | FUNC_MGT_SCAN_PC_FUNC, + .translateFunc = translateBlockDistInfoFunc, } }; // clang-format on diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 1b2eadd8e8..21cf2d1159 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -216,6 +216,8 @@ const char* nodesNodeName(ENodeType type) { return "PhysiSreamScan"; case QUERY_NODE_PHYSICAL_PLAN_SYSTABLE_SCAN: return "PhysiSystemTableScan"; + case QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN: + return "PhysiBlockDistScan"; case QUERY_NODE_PHYSICAL_PLAN_PROJECT: return "PhysiProject"; case QUERY_NODE_PHYSICAL_PLAN_MERGE_JOIN: @@ -3971,6 +3973,7 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { case QUERY_NODE_LOGIC_PLAN: return logicPlanToJson(pObj, pJson); case QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN: + case QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN: return physiTagScanNodeToJson(pObj, pJson); case QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN: case QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN: @@ -4106,6 +4109,7 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { case QUERY_NODE_LOGIC_PLAN: return jsonToLogicPlan(pJson, pObj); case QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN: + case QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN: return jsonToPhysiTagScanNode(pJson, pObj); case QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN: case QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 6ebd0f2d39..9dd383301d 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -215,6 +215,8 @@ SNode* nodesMakeNode(ENodeType type) { case QUERY_NODE_SHOW_CREATE_TABLE_STMT: case QUERY_NODE_SHOW_CREATE_STABLE_STMT: return makeNode(type, sizeof(SShowCreateTableStmt)); + case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT: + return makeNode(type, sizeof(SShowTableDistributedStmt)); case QUERY_NODE_KILL_QUERY_STMT: return makeNode(type, sizeof(SKillQueryStmt)); case QUERY_NODE_KILL_TRANSACTION_STMT: @@ -264,6 +266,8 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SStreamScanPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_SYSTABLE_SCAN: return makeNode(type, sizeof(SSystemTableScanPhysiNode)); + case QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN: + return makeNode(type, sizeof(SBlockDistScanPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_PROJECT: return makeNode(type, sizeof(SProjectPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_MERGE_JOIN: @@ -628,18 +632,23 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_SHOW_APPS_STMT: case QUERY_NODE_SHOW_SCORES_STMT: case QUERY_NODE_SHOW_VARIABLE_STMT: - case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: - case QUERY_NODE_SHOW_CREATE_TABLE_STMT: - case QUERY_NODE_SHOW_CREATE_STABLE_STMT: case QUERY_NODE_SHOW_TRANSACTIONS_STMT: { SShowStmt* pStmt = (SShowStmt*)pNode; nodesDestroyNode(pStmt->pDbName); - nodesDestroyNode(pStmt->pTbNamePattern); + nodesDestroyNode(pStmt->pTbName); break; } - case QUERY_NODE_KILL_CONNECTION_STMT: // no pointer field - case QUERY_NODE_KILL_QUERY_STMT: // no pointer field - case QUERY_NODE_KILL_TRANSACTION_STMT: // no pointer field + case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: + taosMemoryFreeClear(((SShowCreateDatabaseStmt*)pNode)->pCfg); + break; + case QUERY_NODE_SHOW_CREATE_TABLE_STMT: + case QUERY_NODE_SHOW_CREATE_STABLE_STMT: + taosMemoryFreeClear(((SShowCreateTableStmt*)pNode)->pMeta); + break; + case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT: // no pointer field + case QUERY_NODE_KILL_CONNECTION_STMT: // no pointer field + case QUERY_NODE_KILL_QUERY_STMT: // no pointer field + case QUERY_NODE_KILL_TRANSACTION_STMT: // no pointer field break; case QUERY_NODE_DELETE_STMT: { SDeleteStmt* pStmt = (SDeleteStmt*)pNode; @@ -752,6 +761,7 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_PHYSICAL_PLAN_TABLE_SEQ_SCAN: case QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN: case QUERY_NODE_PHYSICAL_PLAN_SYSTABLE_SCAN: + case QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN: destroyScanPhysiNode((SScanPhysiNode*)pNode); break; case QUERY_NODE_PHYSICAL_PLAN_PROJECT: { diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index b4f49b3e88..366aaa71eb 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -151,9 +151,12 @@ SNode* createAlterTableRenameCol(SAstCreateContext* pCxt, SNode* pRealTable, int SToken* pNewColName); SNode* createAlterTableSetTag(SAstCreateContext* pCxt, SNode* pRealTable, SToken* pTagName, SNode* pVal); SNode* createUseDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName); -SNode* createShowStmt(SAstCreateContext* pCxt, ENodeType type, SNode* pDbName, SNode* pTbNamePattern); +SNode* createShowStmt(SAstCreateContext* pCxt, ENodeType type); +SNode* createShowStmtWithCond(SAstCreateContext* pCxt, ENodeType type, SNode* pDbName, SNode* pTbName, + EOperatorType tableCondType); SNode* createShowCreateDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName); SNode* createShowCreateTableStmt(SAstCreateContext* pCxt, ENodeType type, SNode* pRealTable); +SNode* createShowTableDistributedStmt(SAstCreateContext* pCxt, SNode* pRealTable); SNode* createCreateUserStmt(SAstCreateContext* pCxt, SToken* pUserName, const SToken* pPassword); SNode* createAlterUserStmt(SAstCreateContext* pCxt, SToken* pUserName, int8_t alterType, const SToken* pVal); SNode* createDropUserStmt(SAstCreateContext* pCxt, SToken* pUserName); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 476485904c..ffc97fc746 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -350,34 +350,35 @@ col_name_list(A) ::= col_name_list(B) NK_COMMA col_name(C). col_name(A) ::= column_name(B). { A = createColumnNode(pCxt, NULL, &B); } /************************************************ show ****************************************************************/ -cmd ::= SHOW DNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); } -cmd ::= SHOW USERS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT, NULL, NULL); } -cmd ::= SHOW DATABASES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); } -cmd ::= SHOW db_name_cond_opt(A) TABLES like_pattern_opt(B). { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, A, B); } -cmd ::= SHOW db_name_cond_opt(A) STABLES like_pattern_opt(B). { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, A, B); } -cmd ::= SHOW db_name_cond_opt(A) VGROUPS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, A, NULL); } -cmd ::= SHOW MNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); } -cmd ::= SHOW MODULES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT, NULL, NULL); } -cmd ::= SHOW QNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT, NULL, NULL); } -cmd ::= SHOW FUNCTIONS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); } -cmd ::= SHOW INDEXES FROM table_name_cond(A) from_db_opt(B). { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, A, B); } -cmd ::= SHOW STREAMS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); } +cmd ::= SHOW DNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } +cmd ::= SHOW USERS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } +cmd ::= SHOW DATABASES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } +cmd ::= SHOW db_name_cond_opt(A) TABLES like_pattern_opt(B). { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, A, B, OP_TYPE_LIKE); } +cmd ::= SHOW db_name_cond_opt(A) STABLES like_pattern_opt(B). { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, A, B, OP_TYPE_LIKE); } +cmd ::= SHOW db_name_cond_opt(A) VGROUPS. { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, A, NULL, OP_TYPE_LIKE); } +cmd ::= SHOW MNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } +cmd ::= SHOW MODULES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT); } +cmd ::= SHOW QNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } +cmd ::= SHOW FUNCTIONS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } +cmd ::= SHOW INDEXES FROM table_name_cond(A) from_db_opt(B). { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, B, A, OP_TYPE_EQUAL); } +cmd ::= SHOW STREAMS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } cmd ::= SHOW ACCOUNTS. { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -cmd ::= SHOW APPS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT, NULL, NULL); } -cmd ::= SHOW CONNECTIONS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT, NULL, NULL); } -cmd ::= SHOW LICENCE. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); } -cmd ::= SHOW GRANTS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); } +cmd ::= SHOW APPS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } +cmd ::= SHOW CONNECTIONS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } +cmd ::= SHOW LICENCE. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT); } +cmd ::= SHOW GRANTS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT); } cmd ::= SHOW CREATE DATABASE db_name(A). { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &A); } cmd ::= SHOW CREATE TABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, A); } cmd ::= SHOW CREATE STABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, A); } -cmd ::= SHOW QUERIES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT, NULL, NULL); } -cmd ::= SHOW SCORES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT, NULL, NULL); } -cmd ::= SHOW TOPICS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT, NULL, NULL); } -cmd ::= SHOW VARIABLES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLE_STMT, NULL, NULL); } -cmd ::= SHOW BNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT, NULL, NULL); } -cmd ::= SHOW SNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT, NULL, NULL); } -cmd ::= SHOW CLUSTER. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT, NULL, NULL); } -cmd ::= SHOW TRANSACTIONS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT, NULL, NULL); } +cmd ::= SHOW QUERIES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } +cmd ::= SHOW SCORES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } +cmd ::= SHOW TOPICS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } +cmd ::= SHOW VARIABLES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLE_STMT); } +cmd ::= SHOW BNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } +cmd ::= SHOW SNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } +cmd ::= SHOW CLUSTER. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } +cmd ::= SHOW TRANSACTIONS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } +cmd ::= SHOW TABLE DISTRIBUTED full_table_name(A). { pCxt->pRootNode = createShowTableDistributedStmt(pCxt, A); } db_name_cond_opt(A) ::= . { A = createDefaultDatabaseCondValue(pCxt); } db_name_cond_opt(A) ::= db_name(B) NK_DOT. { A = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &B); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 6ea1b090ad..31ee2af055 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1100,7 +1100,15 @@ static bool needDbShowStmt(ENodeType type) { QUERY_NODE_SHOW_VGROUPS_STMT == type; } -SNode* createShowStmt(SAstCreateContext* pCxt, ENodeType type, SNode* pDbName, SNode* pTbNamePattern) { +SNode* createShowStmt(SAstCreateContext* pCxt, ENodeType type) { + CHECK_PARSER_STATUS(pCxt); + SShowStmt* pStmt = (SShowStmt*)nodesMakeNode(type); + CHECK_OUT_OF_MEM(pStmt); + return (SNode*)pStmt; +} + +SNode* createShowStmtWithCond(SAstCreateContext* pCxt, ENodeType type, SNode* pDbName, SNode* pTbName, + EOperatorType tableCondType) { CHECK_PARSER_STATUS(pCxt); if (needDbShowStmt(type) && NULL == pDbName && NULL == pCxt->pQueryCxt->db) { snprintf(pCxt->pQueryCxt->pMsg, pCxt->pQueryCxt->msgLen, "db not specified"); @@ -1110,7 +1118,8 @@ SNode* createShowStmt(SAstCreateContext* pCxt, ENodeType type, SNode* pDbName, S SShowStmt* pStmt = (SShowStmt*)nodesMakeNode(type); CHECK_OUT_OF_MEM(pStmt); pStmt->pDbName = pDbName; - pStmt->pTbNamePattern = pTbNamePattern; + pStmt->pTbName = pTbName; + pStmt->tableCondType = tableCondType; return (SNode*)pStmt; } @@ -1131,6 +1140,17 @@ SNode* createShowCreateTableStmt(SAstCreateContext* pCxt, ENodeType type, SNode* CHECK_OUT_OF_MEM(pStmt); strcpy(pStmt->dbName, ((SRealTableNode*)pRealTable)->table.dbName); strcpy(pStmt->tableName, ((SRealTableNode*)pRealTable)->table.tableName); + nodesDestroyNode(pRealTable); + return (SNode*)pStmt; +} + +SNode* createShowTableDistributedStmt(SAstCreateContext* pCxt, SNode* pRealTable) { + CHECK_PARSER_STATUS(pCxt); + SShowTableDistributedStmt* pStmt = (SShowTableDistributedStmt*)nodesMakeNode(QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT); + CHECK_OUT_OF_MEM(pStmt); + strcpy(pStmt->dbName, ((SRealTableNode*)pRealTable)->table.dbName); + strcpy(pStmt->tableName, ((SRealTableNode*)pRealTable)->table.tableName); + nodesDestroyNode(pRealTable); return (SNode*)pStmt; } diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 41d32204da..0d5a3fcbe4 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -68,12 +68,12 @@ static SKeyword keywordTable[] = { {"CONTAINS", TK_CONTAINS}, {"DATABASE", TK_DATABASE}, {"DATABASES", TK_DATABASES}, - // {"DAYS", TK_DAYS}, {"DBS", TK_DBS}, {"DELETE", TK_DELETE}, {"DESC", TK_DESC}, {"DESCRIBE", TK_DESCRIBE}, {"DISTINCT", TK_DISTINCT}, + {"DISTRIBUTED", TK_DISTRIBUTED}, {"DNODE", TK_DNODE}, {"DNODES", TK_DNODES}, {"DOUBLE", TK_DOUBLE}, @@ -81,7 +81,6 @@ static SKeyword keywordTable[] = { {"DURATION", TK_DURATION}, {"EXISTS", TK_EXISTS}, {"EXPLAIN", TK_EXPLAIN}, - // {"FILE_FACTOR", TK_FILE_FACTOR}, {"FILL", TK_FILL}, {"FIRST", TK_FIRST}, {"FLOAT", TK_FLOAT}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 3cb885c8e1..09fc93932e 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -4534,28 +4534,36 @@ static const char* getSysTableName(ENodeType type) { return NULL; } -static int32_t createSelectStmtForShow(ENodeType showType, SSelectStmt** pStmt) { +static int32_t createSimpleSelectStmt(const char* pDb, const char* pTable, SSelectStmt** pStmt) { SSelectStmt* pSelect = (SSelectStmt*)nodesMakeNode(QUERY_NODE_SELECT_STMT); if (NULL == pSelect) { return TSDB_CODE_OUT_OF_MEMORY; } sprintf(pSelect->stmtName, "%p", pSelect); - SRealTableNode* pTable = (SRealTableNode*)nodesMakeNode(QUERY_NODE_REAL_TABLE); - if (NULL == pTable) { + SRealTableNode* pRealTable = (SRealTableNode*)nodesMakeNode(QUERY_NODE_REAL_TABLE); + if (NULL == pRealTable) { nodesDestroyNode((SNode*)pSelect); return TSDB_CODE_OUT_OF_MEMORY; } - strcpy(pTable->table.dbName, getSysDbName(showType)); - strcpy(pTable->table.tableName, getSysTableName(showType)); - strcpy(pTable->table.tableAlias, pTable->table.tableName); - pSelect->pFromTable = (SNode*)pTable; + strcpy(pRealTable->table.dbName, pDb); + strcpy(pRealTable->table.tableName, pTable); + strcpy(pRealTable->table.tableAlias, pTable); + pSelect->pFromTable = (SNode*)pRealTable; *pStmt = pSelect; return TSDB_CODE_SUCCESS; } +static int32_t createSelectStmtForShow(ENodeType showType, SSelectStmt** pStmt) { + return createSimpleSelectStmt(getSysDbName(showType), getSysTableName(showType), pStmt); +} + +static int32_t createSelectStmtForShowTableDist(SShowTableDistributedStmt* pStmt, SSelectStmt** pOutput) { + return createSimpleSelectStmt(pStmt->dbName, pStmt->tableName, pOutput); +} + static int32_t createOperatorNode(EOperatorType opType, const char* pColName, SNode* pRight, SNode** pOp) { if (NULL == pRight) { return TSDB_CODE_SUCCESS; @@ -4609,7 +4617,7 @@ static int32_t createShowCondition(const SShowStmt* pShow, SSelectStmt* pSelect) SNode* pTbCond = NULL; if (TSDB_CODE_SUCCESS != createOperatorNode(OP_TYPE_EQUAL, "db_name", pShow->pDbName, &pDbCond) || TSDB_CODE_SUCCESS != - createOperatorNode(OP_TYPE_LIKE, getTbNameColName(nodeType(pShow)), pShow->pTbNamePattern, &pTbCond)) { + createOperatorNode(pShow->tableCondType, getTbNameColName(nodeType(pShow)), pShow->pTbName, &pTbCond)) { nodesDestroyNode(pDbCond); nodesDestroyNode(pTbCond); return TSDB_CODE_OUT_OF_MEMORY; @@ -4646,6 +4654,46 @@ static int32_t rewriteShow(STranslateContext* pCxt, SQuery* pQuery) { return code; } +static SNode* createBlockDistInfoFunc() { + SFunctionNode* pFunc = (SFunctionNode*)nodesMakeNode(QUERY_NODE_FUNCTION); + if (NULL == pFunc) { + return NULL; + } + + strcpy(pFunc->functionName, "_block_dist_info"); + strcpy(pFunc->node.aliasName, "_block_dist_info"); + return (SNode*)pFunc; +} + +static SNode* createBlockDistFunc() { + SFunctionNode* pFunc = (SFunctionNode*)nodesMakeNode(QUERY_NODE_FUNCTION); + if (NULL == pFunc) { + return NULL; + } + + strcpy(pFunc->functionName, "_block_dist"); + strcpy(pFunc->node.aliasName, "_block_dist"); + if (TSDB_CODE_SUCCESS != nodesListMakeStrictAppend(&pFunc->pParameterList, createBlockDistInfoFunc())) { + nodesDestroyNode((SNode*)pFunc); + return NULL; + } + return (SNode*)pFunc; +} + +static int32_t rewriteShowTableDist(STranslateContext* pCxt, SQuery* pQuery) { + SSelectStmt* pStmt = NULL; + int32_t code = createSelectStmtForShowTableDist((SShowTableDistributedStmt*)pQuery->pRoot, &pStmt); + if (TSDB_CODE_SUCCESS == code) { + code = nodesListMakeStrictAppend(&pStmt->pProjectionList, createBlockDistFunc()); + } + if (TSDB_CODE_SUCCESS == code) { + pQuery->showRewrite = true; + nodesDestroyNode(pQuery->pRoot); + pQuery->pRoot = (SNode*)pStmt; + } + return code; +} + typedef struct SVgroupCreateTableBatch { SVCreateTbBatchReq req; SVgroupInfo info; @@ -5584,6 +5632,9 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { case QUERY_NODE_SHOW_APPS_STMT: code = rewriteShow(pCxt, pQuery); break; + case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT: + code = rewriteShowTableDist(pCxt, pQuery); + break; case QUERY_NODE_CREATE_TABLE_STMT: if (NULL == ((SCreateTableStmt*)pQuery->pRoot)->pTags) { code = rewriteCreateTable(pCxt, pQuery); diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index a950b4efb0..c8e182cf16 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -104,25 +104,25 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 359 +#define YYNOCODE 360 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EOperatorType yy28; - int32_t yy42; - ENullOrder yy107; - EFillMode yy320; - SToken yy421; - SNodeList* yy530; - SAlterOption yy557; - EOrder yy610; - bool yy621; - EJoinType yy636; - int64_t yy669; - SNode* yy674; - SDataType yy690; + EFillMode yy54; + int32_t yy100; + bool yy137; + int64_t yy189; + SToken yy209; + ENullOrder yy217; + SDataType yy304; + EOperatorType yy380; + SNodeList* yy424; + EOrder yy578; + SAlterOption yy605; + EJoinType yy612; + SNode* yy632; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -138,17 +138,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 622 -#define YYNRULE 459 -#define YYNTOKEN 239 -#define YY_MAX_SHIFT 621 -#define YY_MIN_SHIFTREDUCE 912 -#define YY_MAX_SHIFTREDUCE 1370 -#define YY_ERROR_ACTION 1371 -#define YY_ACCEPT_ACTION 1372 -#define YY_NO_ACTION 1373 -#define YY_MIN_REDUCE 1374 -#define YY_MAX_REDUCE 1832 +#define YYNSTATE 625 +#define YYNRULE 460 +#define YYNTOKEN 240 +#define YY_MAX_SHIFT 624 +#define YY_MIN_SHIFTREDUCE 915 +#define YY_MAX_SHIFTREDUCE 1374 +#define YY_ERROR_ACTION 1375 +#define YY_ACCEPT_ACTION 1376 +#define YY_NO_ACTION 1377 +#define YY_MIN_REDUCE 1378 +#define YY_MAX_REDUCE 1837 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -215,594 +215,590 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2098) +#define YY_ACTTAB_COUNT (2079) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1557, 321, 1679, 1666, 1550, 1552, 300, 396, 1666, 397, - /* 10 */ 1406, 317, 35, 33, 1663, 404, 1556, 397, 1406, 1663, - /* 20 */ 309, 1483, 1184, 1557, 36, 34, 32, 31, 30, 1695, - /* 30 */ 299, 536, 36, 34, 32, 31, 30, 521, 1810, 1555, - /* 40 */ 1659, 1665, 1649, 1810, 520, 1659, 1665, 1182, 28, 233, - /* 50 */ 1809, 540, 362, 1372, 1807, 150, 540, 501, 14, 1807, - /* 60 */ 35, 33, 1311, 395, 1190, 1679, 399, 536, 309, 1708, - /* 70 */ 1184, 159, 82, 1680, 523, 1682, 1683, 519, 414, 540, - /* 80 */ 57, 1, 1748, 536, 401, 1810, 283, 1744, 497, 281, - /* 90 */ 1206, 537, 1695, 537, 1325, 1182, 62, 1808, 1810, 61, - /* 100 */ 521, 1807, 106, 618, 154, 1649, 14, 520, 942, 435, - /* 110 */ 151, 326, 1190, 24, 1807, 414, 114, 1253, 1254, 1505, - /* 120 */ 501, 1505, 356, 36, 34, 32, 31, 30, 39, 2, - /* 130 */ 134, 497, 1708, 1695, 1462, 82, 1680, 523, 1682, 1683, - /* 140 */ 519, 490, 540, 524, 38, 1748, 946, 947, 1318, 283, - /* 150 */ 1744, 618, 1810, 1600, 1208, 112, 196, 56, 1185, 114, - /* 160 */ 1183, 1810, 1208, 1810, 149, 1253, 1254, 130, 1807, 499, - /* 170 */ 146, 1755, 1756, 149, 1760, 149, 574, 1807, 489, 1807, - /* 180 */ 508, 486, 1188, 1189, 347, 1235, 1236, 1238, 1239, 1240, - /* 190 */ 1241, 1242, 516, 538, 1250, 1251, 1252, 1255, 112, 36, - /* 200 */ 34, 32, 31, 30, 349, 345, 1185, 133, 1183, 1386, - /* 210 */ 152, 66, 282, 147, 1755, 1756, 1209, 1760, 524, 35, - /* 220 */ 33, 36, 34, 32, 31, 30, 312, 309, 1599, 1184, - /* 230 */ 1188, 1189, 1375, 1235, 1236, 1238, 1239, 1240, 1241, 1242, - /* 240 */ 516, 538, 1250, 1251, 1252, 1255, 36, 34, 32, 31, - /* 250 */ 30, 492, 487, 96, 1182, 73, 95, 94, 93, 92, - /* 260 */ 91, 90, 89, 88, 87, 14, 491, 35, 33, 1222, - /* 270 */ 26, 1190, 1433, 152, 1496, 309, 1498, 1184, 1193, 56, - /* 280 */ 36, 34, 32, 31, 30, 1663, 152, 403, 2, 1335, - /* 290 */ 399, 1049, 563, 562, 561, 1053, 560, 1055, 1056, 559, - /* 300 */ 1058, 556, 1182, 1064, 553, 1066, 1067, 550, 547, 1261, - /* 310 */ 618, 1659, 1665, 1091, 1092, 1208, 32, 31, 30, 1190, - /* 320 */ 1237, 589, 540, 1397, 1253, 1254, 483, 1333, 1334, 1336, - /* 330 */ 1337, 1209, 596, 595, 594, 324, 8, 593, 592, 591, - /* 340 */ 116, 586, 585, 584, 583, 582, 581, 580, 579, 124, - /* 350 */ 575, 1436, 578, 313, 1477, 355, 56, 354, 618, 1367, - /* 360 */ 1207, 131, 350, 1649, 572, 1185, 1396, 1183, 509, 1395, - /* 370 */ 1507, 96, 1253, 1254, 95, 94, 93, 92, 91, 90, - /* 380 */ 89, 88, 87, 122, 121, 569, 568, 567, 64, 1188, - /* 390 */ 1189, 1196, 1235, 1236, 1238, 1239, 1240, 1241, 1242, 516, - /* 400 */ 538, 1250, 1251, 1252, 1255, 497, 1649, 537, 152, 1649, - /* 410 */ 1501, 449, 448, 1185, 1557, 1183, 447, 1394, 360, 111, - /* 420 */ 444, 314, 1393, 443, 442, 441, 35, 33, 1256, 570, - /* 430 */ 1555, 1679, 1548, 114, 309, 1505, 1184, 1188, 1189, 1366, - /* 440 */ 1235, 1236, 1238, 1239, 1240, 1241, 1242, 516, 538, 1250, - /* 450 */ 1251, 1252, 1255, 1392, 1184, 449, 448, 1649, 1695, 1391, - /* 460 */ 447, 1182, 1649, 111, 444, 152, 521, 443, 442, 441, - /* 470 */ 197, 1649, 112, 520, 35, 33, 1551, 1552, 1190, 1182, - /* 480 */ 1190, 1237, 309, 1679, 1184, 152, 537, 148, 1755, 1756, - /* 490 */ 293, 1760, 959, 1649, 958, 9, 1190, 361, 1708, 1649, - /* 500 */ 64, 84, 1680, 523, 1682, 1683, 519, 1390, 540, 1182, - /* 510 */ 1695, 1748, 203, 110, 1505, 1747, 1744, 618, 500, 433, - /* 520 */ 473, 960, 1500, 1649, 571, 520, 1190, 1548, 1166, 1167, - /* 530 */ 187, 1253, 1254, 185, 537, 618, 316, 315, 56, 294, - /* 540 */ 67, 292, 291, 9, 437, 106, 1198, 1649, 439, 1482, - /* 550 */ 1708, 1310, 440, 83, 1680, 523, 1682, 1683, 519, 1011, - /* 560 */ 540, 1810, 1505, 1748, 959, 618, 958, 302, 1744, 145, - /* 570 */ 438, 1191, 1185, 149, 1183, 463, 1013, 1807, 1557, 1253, - /* 580 */ 1254, 225, 446, 445, 537, 320, 479, 1775, 1190, 386, - /* 590 */ 1185, 7, 1183, 960, 1555, 371, 1188, 1189, 1208, 1235, - /* 600 */ 1236, 1238, 1239, 1240, 1241, 1242, 516, 538, 1250, 1251, - /* 610 */ 1252, 1255, 1505, 319, 1188, 1189, 1810, 1275, 946, 947, - /* 620 */ 1185, 131, 1183, 322, 144, 79, 1389, 541, 149, 1388, - /* 630 */ 1507, 131, 1807, 35, 33, 163, 162, 1544, 115, 1280, - /* 640 */ 1507, 309, 572, 1184, 1188, 1189, 1497, 1235, 1236, 1238, - /* 650 */ 1239, 1240, 1241, 1242, 516, 538, 1250, 1251, 1252, 1255, - /* 660 */ 1385, 122, 121, 569, 568, 567, 1649, 152, 1182, 1649, - /* 670 */ 537, 1384, 11, 10, 25, 1667, 1383, 537, 280, 54, - /* 680 */ 1206, 372, 1199, 1762, 1194, 1190, 1663, 379, 413, 1382, - /* 690 */ 391, 36, 34, 32, 31, 30, 590, 588, 1505, 537, - /* 700 */ 1649, 1679, 2, 1210, 132, 1505, 1202, 1759, 392, 262, - /* 710 */ 1502, 1649, 1659, 1665, 1192, 1381, 1649, 538, 1250, 1251, - /* 720 */ 1374, 260, 53, 540, 618, 52, 1380, 1505, 1695, 1649, - /* 730 */ 1379, 256, 1762, 1762, 1535, 505, 521, 284, 1253, 1254, - /* 740 */ 1480, 1649, 164, 520, 105, 104, 103, 102, 101, 100, - /* 750 */ 99, 98, 97, 1287, 480, 1649, 1758, 1757, 1309, 1767, - /* 760 */ 1306, 1222, 1378, 1306, 1237, 566, 1649, 56, 1708, 1273, - /* 770 */ 1649, 278, 1680, 523, 1682, 1683, 519, 577, 540, 1185, - /* 780 */ 390, 1183, 1481, 385, 384, 383, 382, 381, 378, 377, - /* 790 */ 376, 375, 374, 370, 369, 368, 367, 366, 365, 364, - /* 800 */ 363, 1211, 1649, 1188, 1189, 81, 1235, 1236, 1238, 1239, - /* 810 */ 1240, 1241, 1242, 516, 538, 1250, 1251, 1252, 1255, 131, - /* 820 */ 1274, 537, 36, 34, 32, 31, 30, 1195, 1508, 537, - /* 830 */ 224, 1637, 1626, 572, 537, 1377, 60, 59, 359, 574, - /* 840 */ 471, 158, 1279, 189, 513, 534, 188, 353, 191, 1505, - /* 850 */ 439, 190, 122, 121, 569, 568, 567, 1505, 279, 537, - /* 860 */ 537, 343, 1505, 341, 337, 333, 155, 328, 284, 1494, - /* 870 */ 535, 246, 438, 1423, 1490, 1649, 335, 27, 307, 1268, - /* 880 */ 1269, 1270, 1271, 1272, 1276, 1277, 1278, 1505, 1505, 1418, - /* 890 */ 1679, 1590, 537, 1416, 193, 450, 152, 192, 1669, 461, - /* 900 */ 1273, 503, 161, 323, 120, 621, 46, 983, 212, 1369, - /* 910 */ 1370, 452, 459, 11, 10, 455, 78, 1695, 37, 251, - /* 920 */ 1505, 506, 1492, 1488, 984, 500, 75, 200, 209, 515, - /* 930 */ 1649, 142, 520, 565, 182, 1671, 37, 612, 608, 604, - /* 940 */ 600, 250, 470, 1387, 37, 475, 137, 1332, 235, 214, - /* 950 */ 118, 1274, 431, 427, 423, 419, 181, 1708, 228, 1281, - /* 960 */ 83, 1680, 523, 1682, 1683, 519, 80, 540, 1265, 244, - /* 970 */ 1748, 484, 1463, 1279, 302, 1744, 145, 1243, 119, 120, - /* 980 */ 46, 65, 545, 119, 179, 1139, 120, 107, 1412, 237, - /* 990 */ 464, 529, 119, 432, 1776, 1696, 219, 325, 1407, 1545, - /* 1000 */ 1778, 498, 533, 3, 1679, 5, 227, 230, 27, 307, - /* 1010 */ 1268, 1269, 1270, 1271, 1272, 1276, 1277, 1278, 327, 243, - /* 1020 */ 1042, 255, 1206, 1070, 1074, 232, 330, 1081, 1079, 478, - /* 1030 */ 1679, 1695, 205, 123, 614, 334, 289, 1150, 1011, 521, - /* 1040 */ 290, 252, 380, 178, 1649, 170, 520, 175, 373, 409, - /* 1050 */ 1592, 1158, 160, 199, 388, 387, 1679, 1695, 389, 1212, - /* 1060 */ 393, 394, 402, 1215, 405, 521, 167, 406, 168, 169, - /* 1070 */ 1649, 1708, 520, 1214, 83, 1680, 523, 1682, 1683, 519, - /* 1080 */ 407, 540, 1216, 1695, 1748, 408, 172, 410, 302, 1744, - /* 1090 */ 1823, 521, 174, 1213, 412, 177, 1649, 1708, 520, 1782, - /* 1100 */ 83, 1680, 523, 1682, 1683, 519, 411, 540, 1679, 63, - /* 1110 */ 1748, 415, 180, 434, 302, 1744, 1823, 436, 1495, 184, - /* 1120 */ 1491, 186, 1679, 1708, 125, 1805, 83, 1680, 523, 1682, - /* 1130 */ 1683, 519, 298, 540, 86, 1695, 1748, 126, 198, 1493, - /* 1140 */ 302, 1744, 1823, 521, 1489, 127, 1631, 253, 1649, 1695, - /* 1150 */ 520, 1766, 128, 1630, 472, 465, 469, 521, 1211, 466, - /* 1160 */ 527, 201, 1649, 501, 520, 204, 207, 476, 485, 477, - /* 1170 */ 474, 1789, 1779, 1679, 482, 1708, 301, 501, 269, 1680, - /* 1180 */ 523, 1682, 1683, 519, 210, 540, 488, 1788, 6, 1708, - /* 1190 */ 454, 213, 269, 1680, 523, 1682, 1683, 519, 494, 540, - /* 1200 */ 1695, 1306, 1769, 220, 1810, 462, 481, 113, 521, 1210, - /* 1210 */ 1763, 40, 510, 1649, 303, 520, 151, 18, 1810, 195, - /* 1220 */ 1807, 1598, 507, 530, 531, 218, 525, 1597, 221, 526, - /* 1230 */ 149, 457, 239, 241, 1807, 311, 451, 1679, 139, 532, - /* 1240 */ 1708, 194, 1826, 84, 1680, 523, 1682, 1683, 519, 1729, - /* 1250 */ 540, 1679, 254, 1748, 72, 1806, 1506, 512, 1744, 504, - /* 1260 */ 1679, 511, 74, 226, 1695, 1478, 51, 543, 229, 50, - /* 1270 */ 231, 257, 518, 617, 249, 47, 138, 1649, 1695, 520, - /* 1280 */ 1549, 261, 263, 270, 264, 259, 521, 1695, 1643, 1642, - /* 1290 */ 58, 1649, 1641, 520, 329, 521, 1638, 332, 331, 1177, - /* 1300 */ 1649, 1178, 520, 156, 1708, 336, 1636, 277, 1680, 523, - /* 1310 */ 1682, 1683, 519, 517, 540, 514, 1720, 1679, 1708, 338, - /* 1320 */ 339, 135, 1680, 523, 1682, 1683, 519, 1708, 540, 340, - /* 1330 */ 84, 1680, 523, 1682, 1683, 519, 1635, 540, 342, 1679, - /* 1340 */ 1748, 1634, 344, 1633, 1695, 1745, 346, 1632, 348, 1616, - /* 1350 */ 157, 351, 521, 352, 1153, 1152, 1610, 1649, 1609, 520, - /* 1360 */ 357, 358, 1608, 1607, 502, 1824, 1695, 1125, 1585, 1584, - /* 1370 */ 1583, 1582, 1581, 1580, 521, 1579, 1578, 1577, 1576, 1649, - /* 1380 */ 1575, 520, 1574, 1573, 1708, 1572, 1571, 273, 1680, 523, - /* 1390 */ 1682, 1683, 519, 1679, 540, 1570, 1569, 1568, 1567, 117, - /* 1400 */ 1566, 1565, 1564, 1563, 1562, 1679, 1708, 1561, 1560, 135, - /* 1410 */ 1680, 523, 1682, 1683, 519, 1127, 540, 1559, 1558, 1435, - /* 1420 */ 1695, 1403, 143, 949, 493, 108, 948, 165, 521, 1402, - /* 1430 */ 1624, 1618, 1695, 1649, 398, 520, 400, 166, 1606, 173, - /* 1440 */ 518, 1605, 109, 1595, 1484, 1649, 306, 520, 171, 1434, - /* 1450 */ 176, 1432, 418, 1825, 1430, 1428, 1679, 422, 1426, 426, - /* 1460 */ 1708, 416, 430, 278, 1680, 523, 1682, 1683, 519, 977, - /* 1470 */ 540, 417, 1708, 421, 420, 277, 1680, 523, 1682, 1683, - /* 1480 */ 519, 424, 540, 1695, 1721, 425, 428, 429, 1415, 1414, - /* 1490 */ 1401, 521, 1486, 1085, 1084, 1485, 1649, 1010, 520, 1009, - /* 1500 */ 1008, 587, 589, 1007, 1004, 1424, 45, 1679, 295, 308, - /* 1510 */ 1003, 183, 1002, 1419, 453, 296, 1417, 456, 297, 1400, - /* 1520 */ 458, 1679, 1399, 1708, 460, 1623, 278, 1680, 523, 1682, - /* 1530 */ 1683, 519, 85, 540, 1695, 1617, 49, 467, 1160, 1604, - /* 1540 */ 1603, 1602, 521, 129, 1594, 68, 206, 1649, 1695, 520, - /* 1550 */ 211, 4, 37, 15, 136, 43, 521, 1331, 215, 22, - /* 1560 */ 310, 1649, 1324, 520, 216, 217, 69, 23, 1669, 16, - /* 1570 */ 1679, 468, 223, 41, 1708, 208, 202, 278, 1680, 523, - /* 1580 */ 1682, 1683, 519, 48, 540, 1303, 1302, 1679, 1708, 42, - /* 1590 */ 140, 265, 1680, 523, 1682, 1683, 519, 1695, 540, 1360, - /* 1600 */ 17, 1355, 1349, 1354, 10, 521, 19, 304, 1359, 1358, - /* 1610 */ 1649, 305, 520, 1245, 1695, 29, 141, 153, 1244, 1266, - /* 1620 */ 234, 1230, 521, 12, 20, 1593, 21, 1649, 236, 520, - /* 1630 */ 240, 1329, 522, 238, 70, 1668, 1679, 1708, 245, 528, - /* 1640 */ 272, 1680, 523, 1682, 1683, 519, 75, 540, 1679, 13, - /* 1650 */ 71, 1711, 1200, 1247, 1708, 539, 44, 274, 1680, 523, - /* 1660 */ 1682, 1683, 519, 1695, 540, 1071, 544, 318, 542, 242, - /* 1670 */ 546, 521, 1068, 548, 1065, 1695, 1649, 549, 520, 551, - /* 1680 */ 554, 552, 555, 521, 557, 1059, 1057, 558, 1649, 1679, - /* 1690 */ 520, 1063, 1062, 1048, 76, 77, 1080, 55, 564, 247, - /* 1700 */ 1061, 1076, 1060, 1708, 975, 573, 266, 1680, 523, 1682, - /* 1710 */ 1683, 519, 999, 540, 1017, 1708, 1695, 576, 275, 1680, - /* 1720 */ 523, 1682, 1683, 519, 521, 540, 248, 997, 996, 1649, - /* 1730 */ 995, 520, 992, 994, 993, 991, 990, 1014, 1012, 987, - /* 1740 */ 986, 1679, 985, 982, 981, 980, 1431, 597, 598, 599, - /* 1750 */ 1679, 1429, 601, 602, 1427, 603, 1708, 1425, 605, 267, - /* 1760 */ 1680, 523, 1682, 1683, 519, 606, 540, 607, 1695, 609, - /* 1770 */ 610, 611, 1413, 613, 1398, 615, 521, 1695, 1186, 616, - /* 1780 */ 619, 1649, 258, 520, 620, 521, 1373, 1373, 1373, 1373, - /* 1790 */ 1649, 1373, 520, 1373, 1373, 1373, 1373, 1373, 1373, 1679, - /* 1800 */ 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1708, 1373, - /* 1810 */ 1373, 276, 1680, 523, 1682, 1683, 519, 1708, 540, 1373, - /* 1820 */ 268, 1680, 523, 1682, 1683, 519, 1695, 540, 1373, 1373, - /* 1830 */ 1373, 1373, 1373, 1373, 521, 1373, 1373, 497, 1373, 1649, - /* 1840 */ 1679, 520, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, - /* 1850 */ 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1679, 1373, 1373, - /* 1860 */ 1373, 1373, 1373, 1373, 1373, 114, 1708, 1695, 1373, 1691, - /* 1870 */ 1680, 523, 1682, 1683, 519, 521, 540, 1373, 1373, 1373, - /* 1880 */ 1649, 1373, 520, 1373, 1695, 501, 1373, 1373, 1373, 1373, - /* 1890 */ 1373, 1373, 521, 1373, 1373, 1373, 1373, 1649, 1373, 520, - /* 1900 */ 1373, 1373, 1373, 1373, 112, 1373, 1679, 1708, 1373, 1373, - /* 1910 */ 1690, 1680, 523, 1682, 1683, 519, 1373, 540, 1679, 222, - /* 1920 */ 1755, 496, 1373, 495, 1708, 1373, 1810, 1689, 1680, 523, - /* 1930 */ 1682, 1683, 519, 1695, 540, 1373, 1373, 1373, 151, 497, - /* 1940 */ 1373, 521, 1807, 1373, 1373, 1695, 1649, 1373, 520, 1373, - /* 1950 */ 1373, 1373, 1373, 521, 1373, 1373, 1373, 1373, 1649, 1679, - /* 1960 */ 520, 1373, 1373, 1373, 1373, 1373, 1373, 114, 1373, 1373, - /* 1970 */ 1373, 1373, 1373, 1708, 1373, 1373, 287, 1680, 523, 1682, - /* 1980 */ 1683, 519, 1373, 540, 1373, 1708, 1695, 501, 286, 1680, - /* 1990 */ 523, 1682, 1683, 519, 521, 540, 1373, 1373, 1373, 1649, - /* 2000 */ 1373, 520, 1373, 1373, 1373, 1373, 112, 1373, 1373, 1373, - /* 2010 */ 1373, 1679, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, - /* 2020 */ 1679, 222, 1755, 496, 1373, 495, 1708, 1373, 1810, 288, - /* 2030 */ 1680, 523, 1682, 1683, 519, 1373, 540, 1373, 1695, 1373, - /* 2040 */ 149, 1373, 1373, 1373, 1807, 1373, 521, 1695, 1373, 1373, - /* 2050 */ 1373, 1649, 1373, 520, 1373, 521, 1373, 1373, 1373, 1373, - /* 2060 */ 1649, 1373, 520, 1373, 1373, 1373, 1373, 1373, 1373, 1373, - /* 2070 */ 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1708, 1373, - /* 2080 */ 1373, 285, 1680, 523, 1682, 1683, 519, 1708, 540, 1373, - /* 2090 */ 271, 1680, 523, 1682, 1683, 519, 1373, 540, + /* 0 */ 1498, 322, 1684, 1671, 1554, 1556, 301, 399, 1401, 400, + /* 10 */ 1410, 945, 35, 33, 1668, 1500, 57, 65, 500, 1400, + /* 20 */ 310, 24, 1188, 1213, 28, 234, 1668, 540, 539, 1700, + /* 30 */ 111, 36, 34, 32, 31, 30, 1212, 524, 107, 1504, + /* 40 */ 1664, 1670, 1654, 540, 523, 438, 115, 1186, 1654, 949, + /* 50 */ 950, 543, 1664, 1670, 155, 1509, 357, 504, 14, 1654, + /* 60 */ 35, 33, 1315, 543, 1194, 1437, 504, 592, 310, 1713, + /* 70 */ 1188, 1509, 83, 1685, 526, 1687, 1688, 522, 134, 543, + /* 80 */ 1390, 1, 1753, 1555, 1556, 113, 284, 1749, 36, 34, + /* 90 */ 32, 31, 30, 56, 540, 1186, 500, 1815, 1815, 1815, + /* 100 */ 223, 1760, 499, 621, 498, 361, 14, 1815, 351, 150, + /* 110 */ 152, 1814, 1194, 1812, 1812, 1812, 417, 1257, 1258, 152, + /* 120 */ 1094, 1095, 1509, 1812, 115, 599, 598, 597, 325, 2, + /* 130 */ 596, 595, 594, 117, 589, 588, 587, 586, 585, 584, + /* 140 */ 583, 582, 125, 578, 36, 34, 32, 31, 30, 539, + /* 150 */ 56, 621, 36, 34, 32, 31, 30, 449, 448, 1189, + /* 160 */ 1376, 1187, 363, 113, 97, 1257, 1258, 96, 95, 94, + /* 170 */ 93, 92, 91, 90, 89, 88, 132, 502, 147, 1760, + /* 180 */ 1761, 575, 1765, 1192, 1193, 1512, 1239, 1240, 1242, 1243, + /* 190 */ 1244, 1245, 1246, 519, 541, 1254, 1255, 1256, 1259, 282, + /* 200 */ 123, 122, 572, 571, 570, 398, 1322, 1189, 402, 1187, + /* 210 */ 38, 153, 1212, 407, 1329, 400, 1410, 581, 327, 1481, + /* 220 */ 35, 33, 539, 153, 962, 1684, 961, 1371, 310, 1487, + /* 230 */ 1188, 1192, 1193, 294, 1239, 1240, 1242, 1243, 1244, 1245, + /* 240 */ 1246, 519, 541, 1254, 1255, 1256, 1259, 489, 1188, 452, + /* 250 */ 451, 204, 1700, 963, 450, 1186, 1700, 112, 447, 1815, + /* 260 */ 524, 446, 445, 444, 493, 1654, 14, 523, 35, 33, + /* 270 */ 1440, 150, 1194, 1186, 1399, 1812, 310, 56, 1188, 68, + /* 280 */ 153, 1684, 295, 39, 293, 292, 417, 440, 131, 2, + /* 290 */ 1194, 442, 1713, 476, 494, 85, 1685, 526, 1687, 1688, + /* 300 */ 522, 492, 543, 1186, 540, 1753, 197, 1370, 1700, 1752, + /* 310 */ 1749, 621, 1815, 441, 1654, 107, 524, 495, 490, 466, + /* 320 */ 1194, 1654, 443, 523, 151, 1257, 1258, 511, 1812, 621, + /* 330 */ 452, 451, 1509, 1815, 1815, 450, 504, 8, 112, 447, + /* 340 */ 153, 1265, 446, 445, 444, 1813, 150, 1212, 1713, 1812, + /* 350 */ 1812, 83, 1685, 526, 1687, 1688, 522, 1194, 543, 621, + /* 360 */ 1815, 1753, 67, 283, 1314, 284, 1749, 1189, 1398, 1187, + /* 370 */ 26, 1213, 150, 1257, 1258, 1671, 1812, 1815, 318, 1241, + /* 380 */ 36, 34, 32, 31, 30, 1189, 1668, 1187, 500, 150, + /* 390 */ 1767, 1192, 1193, 1812, 1239, 1240, 1242, 1243, 1244, 1245, + /* 400 */ 1246, 519, 541, 1254, 1255, 1256, 1259, 153, 1654, 1192, + /* 410 */ 1193, 389, 1664, 1670, 1764, 1189, 115, 1187, 36, 34, + /* 420 */ 32, 31, 30, 543, 1485, 1561, 577, 527, 35, 33, + /* 430 */ 1260, 160, 300, 1684, 1211, 313, 310, 1604, 1188, 1192, + /* 440 */ 1193, 1559, 1239, 1240, 1242, 1243, 1244, 1245, 1246, 519, + /* 450 */ 541, 1254, 1255, 1256, 1259, 113, 63, 164, 163, 62, + /* 460 */ 1700, 314, 348, 1186, 32, 31, 30, 153, 524, 132, + /* 470 */ 148, 1760, 1761, 1654, 1765, 523, 35, 33, 1511, 65, + /* 480 */ 1194, 577, 350, 346, 310, 1684, 1188, 540, 1226, 36, + /* 490 */ 34, 32, 31, 30, 962, 135, 961, 9, 362, 1466, + /* 500 */ 1713, 1505, 1397, 85, 1685, 526, 1687, 1688, 522, 1396, + /* 510 */ 543, 1186, 1700, 1753, 1241, 1509, 512, 515, 1749, 621, + /* 520 */ 503, 436, 1561, 963, 320, 1654, 1486, 523, 1194, 315, + /* 530 */ 145, 580, 132, 1257, 1258, 540, 1672, 1561, 1559, 1395, + /* 540 */ 540, 1511, 1654, 1548, 321, 9, 364, 1668, 500, 1654, + /* 550 */ 540, 374, 1713, 1559, 569, 84, 1685, 526, 1687, 1688, + /* 560 */ 522, 375, 543, 1509, 1279, 1753, 1379, 621, 1509, 303, + /* 570 */ 1749, 146, 1313, 1664, 1670, 1189, 115, 1187, 1509, 1654, + /* 580 */ 1394, 1257, 1258, 226, 543, 1214, 1284, 97, 482, 1780, + /* 590 */ 96, 95, 94, 93, 92, 91, 90, 89, 88, 1192, + /* 600 */ 1193, 1014, 1239, 1240, 1242, 1243, 1244, 1245, 1246, 519, + /* 610 */ 541, 1254, 1255, 1256, 1259, 113, 323, 527, 1016, 575, + /* 620 */ 1654, 25, 80, 1189, 132, 1187, 1339, 1605, 1393, 1392, + /* 630 */ 149, 1760, 1761, 1511, 1765, 116, 35, 33, 123, 122, + /* 640 */ 572, 571, 570, 1501, 310, 1684, 1188, 1192, 1193, 74, + /* 650 */ 1239, 1240, 1242, 1243, 1244, 1245, 1246, 519, 541, 1254, + /* 660 */ 1255, 1256, 1259, 486, 1337, 1338, 1340, 1341, 1654, 1654, + /* 670 */ 1502, 1186, 1700, 56, 1389, 36, 34, 32, 31, 30, + /* 680 */ 503, 11, 10, 1388, 198, 1654, 406, 523, 1194, 402, + /* 690 */ 593, 591, 1387, 473, 1052, 566, 565, 564, 1056, 563, + /* 700 */ 1058, 1059, 562, 1061, 559, 2, 1067, 556, 1069, 1070, + /* 710 */ 553, 550, 1713, 225, 1654, 84, 1685, 526, 1687, 1688, + /* 720 */ 522, 285, 543, 1654, 281, 1753, 1210, 621, 540, 303, + /* 730 */ 1749, 146, 1654, 382, 404, 257, 394, 540, 1539, 416, + /* 740 */ 1210, 1257, 1258, 1170, 1171, 1226, 133, 1378, 1506, 1781, + /* 750 */ 356, 263, 355, 1277, 395, 1215, 1509, 1767, 1386, 540, + /* 760 */ 54, 1385, 1291, 261, 53, 1509, 1767, 52, 7, 540, + /* 770 */ 1631, 106, 105, 104, 103, 102, 101, 100, 99, 98, + /* 780 */ 474, 1763, 1595, 1189, 165, 1187, 365, 1509, 573, 1212, + /* 790 */ 1762, 1552, 508, 162, 79, 540, 574, 1509, 1654, 1552, + /* 800 */ 1494, 1654, 1496, 153, 76, 1278, 324, 1192, 1193, 56, + /* 810 */ 1239, 1240, 1242, 1243, 1244, 1245, 1246, 519, 541, 1254, + /* 820 */ 1255, 1256, 1259, 1509, 949, 950, 393, 1283, 1492, 388, + /* 830 */ 387, 386, 385, 384, 381, 380, 379, 378, 377, 373, + /* 840 */ 372, 371, 370, 369, 368, 367, 366, 82, 36, 34, + /* 850 */ 32, 31, 30, 1772, 1310, 1384, 1383, 1382, 1684, 1561, + /* 860 */ 442, 540, 27, 308, 1272, 1273, 1274, 1275, 1276, 1280, + /* 870 */ 1281, 1282, 537, 1381, 188, 1560, 457, 186, 201, 60, + /* 880 */ 59, 360, 441, 210, 159, 1700, 11, 10, 540, 1509, + /* 890 */ 354, 465, 540, 524, 285, 1654, 1654, 1654, 1654, 538, + /* 900 */ 523, 280, 1642, 247, 344, 196, 342, 338, 334, 156, + /* 910 */ 329, 190, 192, 1654, 189, 191, 1509, 460, 1484, 1684, + /* 920 */ 1509, 516, 454, 1427, 121, 1713, 1277, 195, 84, 1685, + /* 930 */ 526, 1687, 1688, 522, 194, 543, 1422, 193, 1753, 153, + /* 940 */ 1420, 1310, 303, 1749, 1828, 453, 1700, 336, 1373, 1374, + /* 950 */ 1674, 464, 51, 1787, 524, 50, 1241, 46, 455, 1654, + /* 960 */ 213, 523, 458, 518, 462, 478, 1416, 37, 37, 37, + /* 970 */ 568, 1391, 236, 1467, 229, 119, 120, 487, 1278, 509, + /* 980 */ 1684, 435, 121, 506, 46, 1197, 1713, 1676, 548, 84, + /* 990 */ 1685, 526, 1687, 1688, 522, 1196, 543, 467, 1336, 1753, + /* 1000 */ 1283, 215, 986, 303, 1749, 1828, 1701, 1700, 1285, 1247, + /* 1010 */ 1143, 575, 617, 238, 1810, 524, 532, 244, 120, 987, + /* 1020 */ 1654, 121, 523, 1045, 220, 256, 108, 120, 326, 1073, + /* 1030 */ 123, 122, 572, 571, 570, 27, 308, 1272, 1273, 1274, + /* 1040 */ 1275, 1276, 1280, 1281, 1282, 1411, 1269, 1713, 1549, 1684, + /* 1050 */ 84, 1685, 526, 1687, 1688, 522, 1783, 543, 1684, 1077, + /* 1060 */ 1753, 501, 1084, 228, 303, 1749, 1828, 1082, 124, 231, + /* 1070 */ 233, 5, 3, 328, 1210, 1771, 1700, 335, 331, 290, + /* 1080 */ 1014, 291, 1154, 253, 524, 1700, 161, 376, 1597, 1654, + /* 1090 */ 383, 523, 391, 524, 396, 390, 392, 1216, 1654, 1200, + /* 1100 */ 523, 397, 405, 1219, 504, 408, 168, 1684, 409, 1199, + /* 1110 */ 1218, 410, 1220, 504, 170, 411, 1713, 413, 414, 270, + /* 1120 */ 1685, 526, 1687, 1688, 522, 1713, 543, 173, 270, 1685, + /* 1130 */ 526, 1687, 1688, 522, 1700, 543, 175, 1217, 415, 418, + /* 1140 */ 178, 64, 521, 437, 181, 1815, 439, 1654, 1499, 523, + /* 1150 */ 185, 1495, 299, 87, 1815, 254, 199, 152, 187, 468, + /* 1160 */ 1636, 1812, 126, 1684, 127, 1497, 150, 1493, 469, 128, + /* 1170 */ 1812, 129, 1684, 202, 1713, 480, 1635, 278, 1685, 526, + /* 1180 */ 1687, 1688, 522, 520, 543, 517, 1725, 475, 477, 479, + /* 1190 */ 1700, 205, 624, 472, 208, 1215, 1794, 488, 524, 1700, + /* 1200 */ 530, 1793, 497, 1654, 211, 523, 252, 524, 1784, 214, + /* 1210 */ 484, 1774, 1654, 6, 523, 485, 302, 221, 143, 219, + /* 1220 */ 1310, 140, 114, 1214, 615, 611, 607, 603, 251, 491, + /* 1230 */ 1713, 40, 513, 136, 1685, 526, 1687, 1688, 522, 1713, + /* 1240 */ 543, 510, 85, 1685, 526, 1687, 1688, 522, 183, 543, + /* 1250 */ 304, 1684, 1753, 81, 222, 18, 245, 1750, 1603, 1811, + /* 1260 */ 138, 1602, 1768, 533, 528, 227, 434, 430, 426, 422, + /* 1270 */ 182, 507, 1831, 529, 312, 230, 505, 1829, 1700, 1734, + /* 1280 */ 240, 534, 242, 255, 535, 1510, 524, 73, 75, 536, + /* 1290 */ 546, 1654, 1553, 523, 1482, 66, 250, 258, 180, 514, + /* 1300 */ 620, 47, 1684, 139, 483, 232, 264, 271, 262, 265, + /* 1310 */ 260, 1648, 1647, 58, 1646, 500, 330, 481, 1713, 1684, + /* 1320 */ 206, 279, 1685, 526, 1687, 1688, 522, 1643, 543, 1700, + /* 1330 */ 332, 333, 1181, 1182, 157, 337, 1641, 524, 339, 1162, + /* 1340 */ 340, 200, 1654, 115, 523, 341, 1700, 1640, 343, 1639, + /* 1350 */ 345, 1638, 347, 1637, 524, 349, 1621, 158, 179, 1654, + /* 1360 */ 171, 523, 176, 504, 412, 352, 1157, 353, 1684, 1713, + /* 1370 */ 1156, 1615, 274, 1685, 526, 1687, 1688, 522, 1614, 543, + /* 1380 */ 358, 359, 113, 169, 1129, 1590, 1713, 1613, 1612, 136, + /* 1390 */ 1685, 526, 1687, 1688, 522, 1700, 543, 223, 1760, 499, + /* 1400 */ 61, 498, 1589, 524, 1815, 1588, 1587, 1586, 1654, 496, + /* 1410 */ 523, 1585, 1584, 1583, 1582, 1581, 150, 1580, 1579, 1578, + /* 1420 */ 1812, 307, 1684, 1577, 1576, 1575, 1574, 1573, 1572, 118, + /* 1430 */ 1571, 1570, 1569, 1830, 1568, 1713, 1567, 1566, 279, 1685, + /* 1440 */ 526, 1687, 1688, 522, 1131, 543, 1565, 1564, 1563, 1700, + /* 1450 */ 166, 1406, 952, 109, 951, 1629, 1623, 521, 1562, 1439, + /* 1460 */ 1407, 144, 1654, 174, 523, 401, 1611, 1610, 1600, 1488, + /* 1470 */ 110, 1684, 172, 403, 1438, 317, 316, 167, 177, 1436, + /* 1480 */ 1684, 1434, 421, 1432, 1430, 1202, 425, 420, 1419, 1713, + /* 1490 */ 1418, 419, 278, 1685, 526, 1687, 1688, 522, 1700, 543, + /* 1500 */ 423, 1726, 980, 1405, 427, 1490, 524, 1700, 431, 424, + /* 1510 */ 1195, 1654, 429, 523, 433, 524, 428, 1087, 432, 1489, + /* 1520 */ 1654, 590, 523, 1088, 309, 1013, 1428, 1194, 296, 1012, + /* 1530 */ 592, 1423, 1011, 311, 1010, 1684, 297, 1421, 1713, 1007, + /* 1540 */ 184, 279, 1685, 526, 1687, 1688, 522, 1713, 543, 1006, + /* 1550 */ 279, 1685, 526, 1687, 1688, 522, 1005, 543, 456, 459, + /* 1560 */ 45, 1684, 1700, 298, 1404, 461, 544, 1403, 463, 86, + /* 1570 */ 524, 1628, 1164, 1622, 130, 1654, 470, 523, 1609, 1608, + /* 1580 */ 1607, 1599, 69, 4, 207, 37, 212, 15, 1700, 1335, + /* 1590 */ 1328, 43, 137, 217, 216, 218, 524, 22, 70, 203, + /* 1600 */ 1674, 1654, 1713, 523, 23, 266, 1685, 526, 1687, 1688, + /* 1610 */ 522, 1307, 543, 1684, 16, 1306, 224, 41, 42, 141, + /* 1620 */ 1364, 1353, 1203, 17, 1198, 10, 19, 1684, 1713, 209, + /* 1630 */ 1359, 273, 1685, 526, 1687, 1688, 522, 1358, 543, 1684, + /* 1640 */ 1700, 49, 471, 305, 48, 1363, 1206, 1362, 524, 306, + /* 1650 */ 1249, 29, 142, 1654, 1700, 523, 1248, 541, 1254, 1255, + /* 1660 */ 154, 1234, 524, 1598, 531, 12, 1700, 1654, 20, 523, + /* 1670 */ 235, 241, 21, 237, 524, 1333, 525, 13, 239, 1654, + /* 1680 */ 1713, 523, 1270, 275, 1685, 526, 1687, 1688, 522, 1673, + /* 1690 */ 543, 71, 72, 1684, 1713, 76, 243, 267, 1685, 526, + /* 1700 */ 1687, 1688, 522, 246, 543, 1716, 1713, 1251, 542, 276, + /* 1710 */ 1685, 526, 1687, 1688, 522, 1684, 543, 1204, 44, 547, + /* 1720 */ 1700, 545, 1074, 319, 549, 551, 1071, 552, 524, 1068, + /* 1730 */ 554, 555, 557, 1654, 1062, 523, 558, 560, 1060, 561, + /* 1740 */ 1066, 1065, 1700, 1064, 1051, 77, 1063, 78, 1083, 248, + /* 1750 */ 524, 55, 1079, 567, 576, 1654, 978, 523, 1002, 579, + /* 1760 */ 1713, 249, 1020, 268, 1685, 526, 1687, 1688, 522, 995, + /* 1770 */ 543, 1000, 999, 998, 997, 996, 994, 1684, 993, 1017, + /* 1780 */ 1015, 1435, 1713, 990, 989, 277, 1685, 526, 1687, 1688, + /* 1790 */ 522, 1684, 543, 988, 602, 985, 984, 983, 600, 601, + /* 1800 */ 1433, 605, 604, 606, 1700, 1431, 608, 609, 610, 1429, + /* 1810 */ 612, 614, 524, 613, 1417, 1402, 616, 1654, 1700, 523, + /* 1820 */ 618, 1190, 619, 623, 259, 622, 524, 1377, 1377, 1377, + /* 1830 */ 1377, 1654, 1684, 523, 1377, 1377, 1377, 1377, 1377, 1377, + /* 1840 */ 1377, 1377, 1377, 1377, 1713, 1377, 1684, 269, 1685, 526, + /* 1850 */ 1687, 1688, 522, 1377, 543, 1377, 1377, 1377, 1713, 1700, + /* 1860 */ 1377, 1696, 1685, 526, 1687, 1688, 522, 524, 543, 1377, + /* 1870 */ 1377, 1377, 1654, 1700, 523, 1377, 1377, 1377, 1377, 1377, + /* 1880 */ 1377, 524, 1377, 1377, 1377, 1377, 1654, 1377, 523, 1377, + /* 1890 */ 1377, 1377, 1377, 1377, 1377, 1377, 1377, 1684, 1377, 1713, + /* 1900 */ 1377, 1377, 1695, 1685, 526, 1687, 1688, 522, 1377, 543, + /* 1910 */ 1377, 1684, 1377, 1713, 1377, 1377, 1694, 1685, 526, 1687, + /* 1920 */ 1688, 522, 1377, 543, 1700, 1377, 1377, 1377, 1377, 1377, + /* 1930 */ 1377, 1377, 524, 1377, 1377, 1377, 1377, 1654, 1700, 523, + /* 1940 */ 1377, 1377, 1377, 1377, 1377, 1377, 524, 1377, 1377, 1377, + /* 1950 */ 1377, 1654, 1377, 523, 1377, 1377, 1377, 1377, 1377, 1377, + /* 1960 */ 1684, 1377, 1377, 1377, 1713, 1377, 1377, 288, 1685, 526, + /* 1970 */ 1687, 1688, 522, 1377, 543, 1377, 1377, 1684, 1713, 1377, + /* 1980 */ 1377, 287, 1685, 526, 1687, 1688, 522, 1700, 543, 1377, + /* 1990 */ 1377, 1377, 1377, 1377, 1377, 524, 1377, 1377, 1377, 1377, + /* 2000 */ 1654, 1684, 523, 1377, 1700, 1377, 1377, 1377, 1377, 1377, + /* 2010 */ 1377, 1377, 524, 1377, 1377, 1377, 1377, 1654, 1377, 523, + /* 2020 */ 1377, 1377, 1377, 1377, 1377, 1377, 1377, 1713, 1700, 1377, + /* 2030 */ 289, 1685, 526, 1687, 1688, 522, 524, 543, 1377, 1377, + /* 2040 */ 1377, 1654, 1377, 523, 1713, 1377, 1377, 286, 1685, 526, + /* 2050 */ 1687, 1688, 522, 1377, 543, 1377, 1377, 1377, 1377, 1377, + /* 2060 */ 1377, 1377, 1377, 1377, 1377, 1377, 1377, 1377, 1713, 1377, + /* 2070 */ 1377, 272, 1685, 526, 1687, 1688, 522, 1377, 543, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 269, 280, 242, 271, 283, 284, 274, 245, 271, 247, - /* 10 */ 248, 274, 12, 13, 282, 245, 285, 247, 248, 282, - /* 20 */ 20, 0, 22, 269, 12, 13, 14, 15, 16, 269, - /* 30 */ 276, 20, 12, 13, 14, 15, 16, 277, 338, 285, - /* 40 */ 308, 309, 282, 338, 284, 308, 309, 47, 323, 324, - /* 50 */ 350, 319, 249, 239, 354, 350, 319, 297, 58, 354, - /* 60 */ 12, 13, 14, 246, 64, 242, 249, 20, 20, 309, - /* 70 */ 22, 55, 312, 313, 314, 315, 316, 317, 57, 319, - /* 80 */ 4, 81, 322, 20, 14, 338, 326, 327, 249, 286, - /* 90 */ 20, 249, 269, 249, 82, 47, 80, 350, 338, 83, - /* 100 */ 277, 354, 260, 103, 260, 282, 58, 284, 4, 267, - /* 110 */ 350, 297, 64, 2, 354, 57, 277, 117, 118, 277, - /* 120 */ 297, 277, 297, 12, 13, 14, 15, 16, 81, 81, - /* 130 */ 254, 249, 309, 269, 258, 312, 313, 314, 315, 316, - /* 140 */ 317, 277, 319, 284, 81, 322, 42, 43, 14, 326, - /* 150 */ 327, 103, 338, 294, 20, 316, 113, 81, 158, 277, - /* 160 */ 160, 338, 20, 338, 350, 117, 118, 147, 354, 330, - /* 170 */ 331, 332, 333, 350, 335, 350, 57, 354, 314, 354, - /* 180 */ 41, 145, 182, 183, 153, 185, 186, 187, 188, 189, - /* 190 */ 190, 191, 192, 193, 194, 195, 196, 197, 316, 12, - /* 200 */ 13, 14, 15, 16, 173, 174, 158, 241, 160, 243, - /* 210 */ 210, 168, 169, 331, 332, 333, 20, 335, 284, 12, - /* 220 */ 13, 12, 13, 14, 15, 16, 292, 20, 294, 22, - /* 230 */ 182, 183, 0, 185, 186, 187, 188, 189, 190, 191, - /* 240 */ 192, 193, 194, 195, 196, 197, 12, 13, 14, 15, - /* 250 */ 16, 215, 216, 21, 47, 251, 24, 25, 26, 27, - /* 260 */ 28, 29, 30, 31, 32, 58, 20, 12, 13, 82, - /* 270 */ 2, 64, 0, 210, 271, 20, 272, 22, 47, 81, - /* 280 */ 12, 13, 14, 15, 16, 282, 210, 246, 81, 182, - /* 290 */ 249, 94, 95, 96, 97, 98, 99, 100, 101, 102, - /* 300 */ 103, 104, 47, 106, 107, 108, 109, 110, 111, 14, - /* 310 */ 103, 308, 309, 117, 118, 20, 14, 15, 16, 64, - /* 320 */ 186, 41, 319, 242, 117, 118, 219, 220, 221, 222, - /* 330 */ 223, 20, 60, 61, 62, 63, 81, 65, 66, 67, - /* 340 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - /* 350 */ 78, 0, 257, 261, 259, 157, 81, 159, 103, 150, - /* 360 */ 20, 269, 82, 282, 93, 158, 242, 160, 229, 242, - /* 370 */ 278, 21, 117, 118, 24, 25, 26, 27, 28, 29, - /* 380 */ 30, 31, 32, 112, 113, 114, 115, 116, 253, 182, - /* 390 */ 183, 160, 185, 186, 187, 188, 189, 190, 191, 192, - /* 400 */ 193, 194, 195, 196, 197, 249, 282, 249, 210, 282, - /* 410 */ 275, 60, 61, 158, 269, 160, 65, 242, 260, 68, - /* 420 */ 69, 276, 242, 72, 73, 74, 12, 13, 14, 279, - /* 430 */ 285, 242, 282, 277, 20, 277, 22, 182, 183, 230, - /* 440 */ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - /* 450 */ 195, 196, 197, 242, 22, 60, 61, 282, 269, 242, - /* 460 */ 65, 47, 282, 68, 69, 210, 277, 72, 73, 74, - /* 470 */ 112, 282, 316, 284, 12, 13, 283, 284, 64, 47, - /* 480 */ 64, 186, 20, 242, 22, 210, 249, 331, 332, 333, - /* 490 */ 35, 335, 20, 282, 22, 81, 64, 260, 309, 282, - /* 500 */ 253, 312, 313, 314, 315, 316, 317, 242, 319, 47, - /* 510 */ 269, 322, 55, 266, 277, 326, 327, 103, 277, 47, - /* 520 */ 297, 49, 275, 282, 279, 284, 64, 282, 170, 171, - /* 530 */ 85, 117, 118, 88, 249, 103, 12, 13, 81, 84, - /* 540 */ 83, 86, 87, 81, 89, 260, 22, 282, 93, 0, - /* 550 */ 309, 4, 267, 312, 313, 314, 315, 316, 317, 47, - /* 560 */ 319, 338, 277, 322, 20, 103, 22, 326, 327, 328, - /* 570 */ 115, 47, 158, 350, 160, 297, 64, 354, 269, 117, - /* 580 */ 118, 340, 255, 256, 249, 276, 345, 346, 64, 75, - /* 590 */ 158, 37, 160, 49, 285, 260, 182, 183, 20, 185, - /* 600 */ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - /* 610 */ 196, 197, 277, 261, 182, 183, 338, 141, 42, 43, - /* 620 */ 158, 269, 160, 261, 268, 251, 242, 103, 350, 242, - /* 630 */ 278, 269, 354, 12, 13, 121, 122, 281, 264, 163, - /* 640 */ 278, 20, 93, 22, 182, 183, 272, 185, 186, 187, - /* 650 */ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - /* 660 */ 242, 112, 113, 114, 115, 116, 282, 210, 47, 282, - /* 670 */ 249, 242, 1, 2, 198, 271, 242, 249, 18, 3, - /* 680 */ 20, 260, 158, 310, 160, 64, 282, 27, 260, 242, - /* 690 */ 30, 12, 13, 14, 15, 16, 255, 256, 277, 249, - /* 700 */ 282, 242, 81, 20, 18, 277, 182, 334, 48, 23, - /* 710 */ 260, 282, 308, 309, 47, 242, 282, 193, 194, 195, - /* 720 */ 0, 35, 36, 319, 103, 39, 242, 277, 269, 282, - /* 730 */ 242, 262, 310, 310, 265, 41, 277, 58, 117, 118, - /* 740 */ 0, 282, 56, 284, 24, 25, 26, 27, 28, 29, - /* 750 */ 30, 31, 32, 82, 295, 282, 334, 334, 211, 208, - /* 760 */ 209, 82, 242, 209, 186, 92, 282, 81, 309, 90, - /* 770 */ 282, 312, 313, 314, 315, 316, 317, 64, 319, 158, - /* 780 */ 120, 160, 0, 123, 124, 125, 126, 127, 128, 129, - /* 790 */ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - /* 800 */ 140, 20, 282, 182, 183, 119, 185, 186, 187, 188, - /* 810 */ 189, 190, 191, 192, 193, 194, 195, 196, 197, 269, - /* 820 */ 141, 249, 12, 13, 14, 15, 16, 160, 278, 249, - /* 830 */ 147, 0, 260, 93, 249, 242, 150, 151, 152, 57, - /* 840 */ 260, 155, 163, 85, 58, 260, 88, 161, 85, 277, - /* 850 */ 93, 88, 112, 113, 114, 115, 116, 277, 172, 249, - /* 860 */ 249, 175, 277, 177, 178, 179, 180, 181, 58, 270, - /* 870 */ 260, 260, 115, 0, 270, 282, 45, 198, 199, 200, - /* 880 */ 201, 202, 203, 204, 205, 206, 207, 277, 277, 0, - /* 890 */ 242, 277, 249, 0, 85, 22, 210, 88, 44, 21, - /* 900 */ 90, 225, 288, 260, 41, 19, 41, 47, 41, 117, - /* 910 */ 118, 22, 34, 1, 2, 22, 81, 269, 41, 33, - /* 920 */ 277, 227, 270, 270, 64, 277, 91, 270, 147, 270, - /* 930 */ 282, 45, 284, 270, 33, 81, 41, 51, 52, 53, - /* 940 */ 54, 55, 301, 243, 41, 82, 45, 82, 41, 82, - /* 950 */ 41, 141, 51, 52, 53, 54, 55, 309, 357, 82, - /* 960 */ 312, 313, 314, 315, 316, 317, 80, 319, 182, 83, - /* 970 */ 322, 348, 258, 163, 326, 327, 328, 82, 41, 41, - /* 980 */ 41, 80, 41, 41, 83, 82, 41, 41, 0, 82, - /* 990 */ 305, 82, 41, 250, 346, 269, 342, 250, 248, 281, - /* 1000 */ 311, 336, 116, 339, 242, 212, 351, 351, 198, 199, - /* 1010 */ 200, 201, 202, 203, 204, 205, 206, 207, 307, 82, - /* 1020 */ 82, 82, 20, 82, 82, 351, 249, 82, 82, 143, - /* 1030 */ 242, 269, 146, 82, 46, 45, 306, 156, 47, 277, - /* 1040 */ 255, 299, 289, 142, 282, 144, 284, 146, 249, 148, - /* 1050 */ 249, 165, 40, 167, 141, 287, 242, 269, 287, 20, - /* 1060 */ 249, 244, 244, 20, 303, 277, 253, 284, 167, 253, - /* 1070 */ 282, 309, 284, 20, 312, 313, 314, 315, 316, 317, - /* 1080 */ 296, 319, 20, 269, 322, 298, 253, 296, 326, 327, - /* 1090 */ 328, 277, 253, 20, 290, 253, 282, 309, 284, 337, - /* 1100 */ 312, 313, 314, 315, 316, 317, 277, 319, 242, 253, - /* 1110 */ 322, 249, 253, 244, 326, 327, 328, 269, 269, 269, - /* 1120 */ 269, 269, 242, 309, 269, 337, 312, 313, 314, 315, - /* 1130 */ 316, 317, 244, 319, 249, 269, 322, 269, 251, 269, - /* 1140 */ 326, 327, 328, 277, 269, 269, 282, 303, 282, 269, - /* 1150 */ 284, 337, 269, 282, 249, 166, 284, 277, 20, 302, - /* 1160 */ 217, 251, 282, 297, 284, 251, 251, 277, 218, 290, - /* 1170 */ 296, 347, 311, 242, 282, 309, 282, 297, 312, 313, - /* 1180 */ 314, 315, 316, 317, 293, 319, 282, 347, 224, 309, - /* 1190 */ 4, 293, 312, 313, 314, 315, 316, 317, 149, 319, - /* 1200 */ 269, 209, 344, 307, 338, 19, 213, 277, 277, 20, - /* 1210 */ 310, 40, 228, 282, 231, 284, 350, 81, 338, 33, - /* 1220 */ 354, 293, 226, 144, 291, 343, 282, 293, 329, 282, - /* 1230 */ 350, 45, 277, 251, 354, 282, 50, 242, 341, 290, - /* 1240 */ 309, 55, 358, 312, 313, 314, 315, 316, 317, 325, - /* 1250 */ 319, 242, 265, 322, 251, 353, 277, 326, 327, 353, - /* 1260 */ 242, 353, 81, 352, 269, 259, 80, 273, 352, 83, - /* 1270 */ 352, 249, 277, 244, 251, 300, 304, 282, 269, 284, - /* 1280 */ 282, 240, 263, 263, 263, 252, 277, 269, 0, 0, - /* 1290 */ 40, 282, 0, 284, 72, 277, 0, 176, 47, 47, - /* 1300 */ 282, 47, 284, 47, 309, 176, 0, 312, 313, 314, - /* 1310 */ 315, 316, 317, 318, 319, 320, 321, 242, 309, 47, - /* 1320 */ 47, 312, 313, 314, 315, 316, 317, 309, 319, 176, - /* 1330 */ 312, 313, 314, 315, 316, 317, 0, 319, 176, 242, - /* 1340 */ 322, 0, 47, 0, 269, 327, 22, 0, 47, 0, - /* 1350 */ 81, 163, 277, 162, 160, 158, 0, 282, 0, 284, - /* 1360 */ 154, 153, 0, 0, 355, 356, 269, 44, 0, 0, - /* 1370 */ 0, 0, 0, 0, 277, 0, 0, 0, 0, 282, - /* 1380 */ 0, 284, 0, 0, 309, 0, 0, 312, 313, 314, - /* 1390 */ 315, 316, 317, 242, 319, 0, 0, 0, 0, 40, - /* 1400 */ 0, 0, 0, 0, 0, 242, 309, 0, 0, 312, - /* 1410 */ 313, 314, 315, 316, 317, 22, 319, 0, 0, 0, - /* 1420 */ 269, 0, 41, 14, 349, 37, 14, 40, 277, 0, - /* 1430 */ 0, 0, 269, 282, 44, 284, 44, 38, 0, 149, - /* 1440 */ 277, 0, 37, 0, 0, 282, 295, 284, 37, 0, - /* 1450 */ 37, 0, 37, 356, 0, 0, 242, 37, 0, 37, - /* 1460 */ 309, 47, 37, 312, 313, 314, 315, 316, 317, 59, - /* 1470 */ 319, 45, 309, 45, 47, 312, 313, 314, 315, 316, - /* 1480 */ 317, 47, 319, 269, 321, 45, 47, 45, 0, 0, - /* 1490 */ 0, 277, 0, 47, 22, 0, 282, 47, 284, 47, - /* 1500 */ 47, 41, 41, 47, 47, 0, 90, 242, 22, 295, - /* 1510 */ 47, 88, 47, 0, 48, 22, 0, 47, 22, 0, - /* 1520 */ 22, 242, 0, 309, 22, 0, 312, 313, 314, 315, - /* 1530 */ 316, 317, 20, 319, 269, 0, 147, 22, 47, 0, - /* 1540 */ 0, 0, 277, 164, 0, 81, 37, 282, 269, 284, - /* 1550 */ 82, 41, 41, 214, 81, 41, 277, 82, 81, 81, - /* 1560 */ 295, 282, 82, 284, 41, 44, 81, 41, 44, 214, - /* 1570 */ 242, 147, 44, 208, 309, 142, 144, 312, 313, 314, - /* 1580 */ 315, 316, 317, 147, 319, 82, 82, 242, 309, 41, - /* 1590 */ 44, 312, 313, 314, 315, 316, 317, 269, 319, 82, - /* 1600 */ 41, 47, 82, 47, 2, 277, 41, 47, 47, 47, - /* 1610 */ 282, 47, 284, 82, 269, 81, 44, 44, 82, 182, - /* 1620 */ 82, 22, 277, 81, 81, 0, 81, 282, 81, 284, - /* 1630 */ 37, 82, 184, 81, 81, 44, 242, 309, 44, 145, - /* 1640 */ 312, 313, 314, 315, 316, 317, 91, 319, 242, 214, - /* 1650 */ 81, 81, 22, 82, 309, 81, 81, 312, 313, 314, - /* 1660 */ 315, 316, 317, 269, 319, 82, 47, 47, 92, 142, - /* 1670 */ 81, 277, 82, 47, 82, 269, 282, 81, 284, 47, - /* 1680 */ 47, 81, 81, 277, 47, 82, 82, 81, 282, 242, - /* 1690 */ 284, 105, 105, 22, 81, 81, 47, 81, 93, 41, - /* 1700 */ 105, 22, 105, 309, 59, 58, 312, 313, 314, 315, - /* 1710 */ 316, 317, 47, 319, 64, 309, 269, 79, 312, 313, - /* 1720 */ 314, 315, 316, 317, 277, 319, 41, 47, 47, 282, - /* 1730 */ 47, 284, 22, 47, 47, 47, 47, 64, 47, 47, - /* 1740 */ 47, 242, 47, 47, 47, 47, 0, 47, 45, 37, - /* 1750 */ 242, 0, 47, 45, 0, 37, 309, 0, 47, 312, - /* 1760 */ 313, 314, 315, 316, 317, 45, 319, 37, 269, 47, - /* 1770 */ 45, 37, 0, 47, 0, 22, 277, 269, 22, 21, - /* 1780 */ 21, 282, 22, 284, 20, 277, 359, 359, 359, 359, - /* 1790 */ 282, 359, 284, 359, 359, 359, 359, 359, 359, 242, - /* 1800 */ 359, 359, 359, 359, 359, 359, 359, 359, 309, 359, - /* 1810 */ 359, 312, 313, 314, 315, 316, 317, 309, 319, 359, - /* 1820 */ 312, 313, 314, 315, 316, 317, 269, 319, 359, 359, - /* 1830 */ 359, 359, 359, 359, 277, 359, 359, 249, 359, 282, - /* 1840 */ 242, 284, 359, 359, 359, 359, 359, 359, 359, 359, - /* 1850 */ 359, 359, 359, 359, 359, 359, 359, 242, 359, 359, - /* 1860 */ 359, 359, 359, 359, 359, 277, 309, 269, 359, 312, - /* 1870 */ 313, 314, 315, 316, 317, 277, 319, 359, 359, 359, - /* 1880 */ 282, 359, 284, 359, 269, 297, 359, 359, 359, 359, - /* 1890 */ 359, 359, 277, 359, 359, 359, 359, 282, 359, 284, - /* 1900 */ 359, 359, 359, 359, 316, 359, 242, 309, 359, 359, - /* 1910 */ 312, 313, 314, 315, 316, 317, 359, 319, 242, 331, - /* 1920 */ 332, 333, 359, 335, 309, 359, 338, 312, 313, 314, - /* 1930 */ 315, 316, 317, 269, 319, 359, 359, 359, 350, 249, - /* 1940 */ 359, 277, 354, 359, 359, 269, 282, 359, 284, 359, - /* 1950 */ 359, 359, 359, 277, 359, 359, 359, 359, 282, 242, - /* 1960 */ 284, 359, 359, 359, 359, 359, 359, 277, 359, 359, - /* 1970 */ 359, 359, 359, 309, 359, 359, 312, 313, 314, 315, - /* 1980 */ 316, 317, 359, 319, 359, 309, 269, 297, 312, 313, - /* 1990 */ 314, 315, 316, 317, 277, 319, 359, 359, 359, 282, - /* 2000 */ 359, 284, 359, 359, 359, 359, 316, 359, 359, 359, - /* 2010 */ 359, 242, 359, 359, 359, 359, 359, 359, 359, 359, - /* 2020 */ 242, 331, 332, 333, 359, 335, 309, 359, 338, 312, - /* 2030 */ 313, 314, 315, 316, 317, 359, 319, 359, 269, 359, - /* 2040 */ 350, 359, 359, 359, 354, 359, 277, 269, 359, 359, - /* 2050 */ 359, 282, 359, 284, 359, 277, 359, 359, 359, 359, - /* 2060 */ 282, 359, 284, 359, 359, 359, 359, 359, 359, 359, - /* 2070 */ 359, 359, 359, 359, 359, 359, 359, 359, 309, 359, - /* 2080 */ 359, 312, 313, 314, 315, 316, 317, 309, 319, 359, - /* 2090 */ 312, 313, 314, 315, 316, 317, 359, 319, + /* 0 */ 271, 281, 243, 272, 284, 285, 275, 246, 243, 248, + /* 10 */ 249, 4, 12, 13, 283, 272, 4, 254, 250, 243, + /* 20 */ 20, 2, 22, 20, 324, 325, 283, 250, 20, 270, + /* 30 */ 267, 12, 13, 14, 15, 16, 20, 278, 261, 276, + /* 40 */ 309, 310, 283, 250, 285, 268, 278, 47, 283, 42, + /* 50 */ 43, 320, 309, 310, 261, 278, 298, 298, 58, 283, + /* 60 */ 12, 13, 14, 320, 64, 0, 298, 41, 20, 310, + /* 70 */ 22, 278, 313, 314, 315, 316, 317, 318, 242, 320, + /* 80 */ 244, 81, 323, 284, 285, 317, 327, 328, 12, 13, + /* 90 */ 14, 15, 16, 81, 250, 47, 250, 339, 339, 339, + /* 100 */ 332, 333, 334, 103, 336, 261, 58, 339, 82, 351, + /* 110 */ 351, 351, 64, 355, 355, 355, 57, 117, 118, 351, + /* 120 */ 117, 118, 278, 355, 278, 60, 61, 62, 63, 81, + /* 130 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + /* 140 */ 75, 76, 77, 78, 12, 13, 14, 15, 16, 20, + /* 150 */ 81, 103, 12, 13, 14, 15, 16, 256, 257, 159, + /* 160 */ 240, 161, 250, 317, 21, 117, 118, 24, 25, 26, + /* 170 */ 27, 28, 29, 30, 31, 32, 270, 331, 332, 333, + /* 180 */ 334, 93, 336, 183, 184, 279, 186, 187, 188, 189, + /* 190 */ 190, 191, 192, 193, 194, 195, 196, 197, 198, 287, + /* 200 */ 112, 113, 114, 115, 116, 247, 14, 159, 250, 161, + /* 210 */ 81, 211, 20, 246, 82, 248, 249, 258, 298, 260, + /* 220 */ 12, 13, 20, 211, 20, 243, 22, 151, 20, 0, + /* 230 */ 22, 183, 184, 35, 186, 187, 188, 189, 190, 191, + /* 240 */ 192, 193, 194, 195, 196, 197, 198, 146, 22, 60, + /* 250 */ 61, 55, 270, 49, 65, 47, 270, 68, 69, 339, + /* 260 */ 278, 72, 73, 74, 278, 283, 58, 285, 12, 13, + /* 270 */ 0, 351, 64, 47, 243, 355, 20, 81, 22, 83, + /* 280 */ 211, 243, 84, 81, 86, 87, 57, 89, 148, 81, + /* 290 */ 64, 93, 310, 298, 20, 313, 314, 315, 316, 317, + /* 300 */ 318, 315, 320, 47, 250, 323, 113, 231, 270, 327, + /* 310 */ 328, 103, 339, 115, 283, 261, 278, 216, 217, 298, + /* 320 */ 64, 283, 268, 285, 351, 117, 118, 41, 355, 103, + /* 330 */ 60, 61, 278, 339, 339, 65, 298, 81, 68, 69, + /* 340 */ 211, 14, 72, 73, 74, 351, 351, 20, 310, 355, + /* 350 */ 355, 313, 314, 315, 316, 317, 318, 64, 320, 103, + /* 360 */ 339, 323, 169, 170, 4, 327, 328, 159, 243, 161, + /* 370 */ 2, 20, 351, 117, 118, 272, 355, 339, 275, 187, + /* 380 */ 12, 13, 14, 15, 16, 159, 283, 161, 250, 351, + /* 390 */ 311, 183, 184, 355, 186, 187, 188, 189, 190, 191, + /* 400 */ 192, 193, 194, 195, 196, 197, 198, 211, 283, 183, + /* 410 */ 184, 75, 309, 310, 335, 159, 278, 161, 12, 13, + /* 420 */ 14, 15, 16, 320, 0, 270, 57, 285, 12, 13, + /* 430 */ 14, 55, 277, 243, 20, 293, 20, 295, 22, 183, + /* 440 */ 184, 286, 186, 187, 188, 189, 190, 191, 192, 193, + /* 450 */ 194, 195, 196, 197, 198, 317, 80, 121, 122, 83, + /* 460 */ 270, 262, 154, 47, 14, 15, 16, 211, 278, 270, + /* 470 */ 332, 333, 334, 283, 336, 285, 12, 13, 279, 254, + /* 480 */ 64, 57, 174, 175, 20, 243, 22, 250, 82, 12, + /* 490 */ 13, 14, 15, 16, 20, 255, 22, 81, 261, 259, + /* 500 */ 310, 276, 243, 313, 314, 315, 316, 317, 318, 243, + /* 510 */ 320, 47, 270, 323, 187, 278, 230, 327, 328, 103, + /* 520 */ 278, 47, 270, 49, 262, 283, 0, 285, 64, 277, + /* 530 */ 269, 64, 270, 117, 118, 250, 272, 270, 286, 243, + /* 540 */ 250, 279, 283, 282, 277, 81, 261, 283, 250, 283, + /* 550 */ 250, 261, 310, 286, 92, 313, 314, 315, 316, 317, + /* 560 */ 318, 261, 320, 278, 142, 323, 0, 103, 278, 327, + /* 570 */ 328, 329, 212, 309, 310, 159, 278, 161, 278, 283, + /* 580 */ 243, 117, 118, 341, 320, 20, 164, 21, 346, 347, + /* 590 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 183, + /* 600 */ 184, 47, 186, 187, 188, 189, 190, 191, 192, 193, + /* 610 */ 194, 195, 196, 197, 198, 317, 262, 285, 64, 93, + /* 620 */ 283, 199, 252, 159, 270, 161, 183, 295, 243, 243, + /* 630 */ 332, 333, 334, 279, 336, 265, 12, 13, 112, 113, + /* 640 */ 114, 115, 116, 273, 20, 243, 22, 183, 184, 252, + /* 650 */ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + /* 660 */ 196, 197, 198, 220, 221, 222, 223, 224, 283, 283, + /* 670 */ 273, 47, 270, 81, 243, 12, 13, 14, 15, 16, + /* 680 */ 278, 1, 2, 243, 112, 283, 247, 285, 64, 250, + /* 690 */ 256, 257, 243, 302, 94, 95, 96, 97, 98, 99, + /* 700 */ 100, 101, 102, 103, 104, 81, 106, 107, 108, 109, + /* 710 */ 110, 111, 310, 148, 283, 313, 314, 315, 316, 317, + /* 720 */ 318, 58, 320, 283, 18, 323, 20, 103, 250, 327, + /* 730 */ 328, 329, 283, 27, 14, 263, 30, 250, 266, 261, + /* 740 */ 20, 117, 118, 171, 172, 82, 18, 0, 261, 347, + /* 750 */ 158, 23, 160, 90, 48, 20, 278, 311, 243, 250, + /* 760 */ 3, 243, 82, 35, 36, 278, 311, 39, 37, 250, + /* 770 */ 261, 24, 25, 26, 27, 28, 29, 30, 31, 32, + /* 780 */ 261, 335, 278, 159, 56, 161, 80, 278, 280, 20, + /* 790 */ 335, 283, 41, 289, 81, 250, 280, 278, 283, 283, + /* 800 */ 271, 283, 271, 211, 91, 142, 261, 183, 184, 81, + /* 810 */ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + /* 820 */ 196, 197, 198, 278, 42, 43, 120, 164, 271, 123, + /* 830 */ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + /* 840 */ 134, 135, 136, 137, 138, 139, 140, 119, 12, 13, + /* 850 */ 14, 15, 16, 209, 210, 243, 243, 243, 243, 270, + /* 860 */ 93, 250, 199, 200, 201, 202, 203, 204, 205, 206, + /* 870 */ 207, 208, 261, 243, 85, 286, 4, 88, 271, 151, + /* 880 */ 152, 153, 115, 148, 156, 270, 1, 2, 250, 278, + /* 890 */ 162, 19, 250, 278, 58, 283, 283, 283, 283, 261, + /* 900 */ 285, 173, 0, 261, 176, 33, 178, 179, 180, 181, + /* 910 */ 182, 85, 85, 283, 88, 88, 278, 45, 0, 243, + /* 920 */ 278, 58, 50, 0, 41, 310, 90, 55, 313, 314, + /* 930 */ 315, 316, 317, 318, 85, 320, 0, 88, 323, 211, + /* 940 */ 0, 210, 327, 328, 329, 22, 270, 45, 117, 118, + /* 950 */ 44, 21, 80, 338, 278, 83, 187, 41, 22, 283, + /* 960 */ 41, 285, 22, 271, 34, 82, 0, 41, 41, 41, + /* 970 */ 271, 244, 41, 259, 358, 41, 41, 349, 142, 228, + /* 980 */ 243, 251, 41, 226, 41, 47, 310, 81, 41, 313, + /* 990 */ 314, 315, 316, 317, 318, 47, 320, 306, 82, 323, + /* 1000 */ 164, 82, 47, 327, 328, 329, 270, 270, 82, 82, + /* 1010 */ 82, 93, 46, 82, 338, 278, 82, 82, 41, 64, + /* 1020 */ 283, 41, 285, 82, 343, 82, 41, 41, 251, 82, + /* 1030 */ 112, 113, 114, 115, 116, 199, 200, 201, 202, 203, + /* 1040 */ 204, 205, 206, 207, 208, 249, 183, 310, 282, 243, + /* 1050 */ 313, 314, 315, 316, 317, 318, 312, 320, 243, 82, + /* 1060 */ 323, 337, 82, 352, 327, 328, 329, 82, 82, 352, + /* 1070 */ 352, 213, 340, 308, 20, 338, 270, 45, 250, 307, + /* 1080 */ 47, 256, 157, 300, 278, 270, 40, 250, 250, 283, + /* 1090 */ 290, 285, 142, 278, 250, 288, 288, 20, 283, 161, + /* 1100 */ 285, 245, 245, 20, 298, 304, 254, 243, 285, 161, + /* 1110 */ 20, 297, 20, 298, 254, 299, 310, 297, 278, 313, + /* 1120 */ 314, 315, 316, 317, 318, 310, 320, 254, 313, 314, + /* 1130 */ 315, 316, 317, 318, 270, 320, 254, 20, 291, 250, + /* 1140 */ 254, 254, 278, 245, 254, 339, 270, 283, 270, 285, + /* 1150 */ 270, 270, 245, 250, 339, 304, 252, 351, 270, 167, + /* 1160 */ 283, 355, 270, 243, 270, 270, 351, 270, 303, 270, + /* 1170 */ 355, 270, 243, 252, 310, 291, 283, 313, 314, 315, + /* 1180 */ 316, 317, 318, 319, 320, 321, 322, 250, 297, 278, + /* 1190 */ 270, 252, 19, 285, 252, 20, 348, 219, 278, 270, + /* 1200 */ 218, 348, 150, 283, 294, 285, 33, 278, 312, 294, + /* 1210 */ 214, 345, 283, 225, 285, 283, 283, 308, 45, 344, + /* 1220 */ 210, 342, 278, 20, 51, 52, 53, 54, 55, 283, + /* 1230 */ 310, 40, 229, 313, 314, 315, 316, 317, 318, 310, + /* 1240 */ 320, 227, 313, 314, 315, 316, 317, 318, 33, 320, + /* 1250 */ 232, 243, 323, 80, 330, 81, 83, 328, 294, 354, + /* 1260 */ 45, 294, 311, 145, 283, 353, 51, 52, 53, 54, + /* 1270 */ 55, 354, 359, 283, 283, 353, 356, 357, 270, 326, + /* 1280 */ 278, 292, 252, 266, 291, 278, 278, 252, 81, 116, + /* 1290 */ 274, 283, 283, 285, 260, 80, 252, 250, 83, 354, + /* 1300 */ 245, 301, 243, 305, 296, 353, 264, 264, 241, 264, + /* 1310 */ 253, 0, 0, 40, 0, 250, 72, 144, 310, 243, + /* 1320 */ 147, 313, 314, 315, 316, 317, 318, 0, 320, 270, + /* 1330 */ 47, 177, 47, 47, 47, 177, 0, 278, 47, 166, + /* 1340 */ 47, 168, 283, 278, 285, 177, 270, 0, 177, 0, + /* 1350 */ 47, 0, 22, 0, 278, 47, 0, 81, 143, 283, + /* 1360 */ 145, 285, 147, 298, 149, 164, 161, 163, 243, 310, + /* 1370 */ 159, 0, 313, 314, 315, 316, 317, 318, 0, 320, + /* 1380 */ 155, 154, 317, 168, 44, 0, 310, 0, 0, 313, + /* 1390 */ 314, 315, 316, 317, 318, 270, 320, 332, 333, 334, + /* 1400 */ 141, 336, 0, 278, 339, 0, 0, 0, 283, 350, + /* 1410 */ 285, 0, 0, 0, 0, 0, 351, 0, 0, 0, + /* 1420 */ 355, 296, 243, 0, 0, 0, 0, 0, 0, 40, + /* 1430 */ 0, 0, 0, 357, 0, 310, 0, 0, 313, 314, + /* 1440 */ 315, 316, 317, 318, 22, 320, 0, 0, 0, 270, + /* 1450 */ 40, 0, 14, 37, 14, 0, 0, 278, 0, 0, + /* 1460 */ 0, 41, 283, 150, 285, 44, 0, 0, 0, 0, + /* 1470 */ 37, 243, 37, 44, 0, 12, 13, 38, 37, 0, + /* 1480 */ 243, 0, 37, 0, 0, 22, 37, 45, 0, 310, + /* 1490 */ 0, 47, 313, 314, 315, 316, 317, 318, 270, 320, + /* 1500 */ 47, 322, 59, 0, 47, 0, 278, 270, 47, 45, + /* 1510 */ 47, 283, 37, 285, 37, 278, 45, 22, 45, 0, + /* 1520 */ 283, 41, 285, 47, 296, 47, 0, 64, 22, 47, + /* 1530 */ 41, 0, 47, 296, 47, 243, 22, 0, 310, 47, + /* 1540 */ 88, 313, 314, 315, 316, 317, 318, 310, 320, 47, + /* 1550 */ 313, 314, 315, 316, 317, 318, 47, 320, 48, 47, + /* 1560 */ 90, 243, 270, 22, 0, 22, 103, 0, 22, 20, + /* 1570 */ 278, 0, 47, 0, 165, 283, 22, 285, 0, 0, + /* 1580 */ 0, 0, 81, 41, 37, 41, 82, 215, 270, 82, + /* 1590 */ 82, 41, 81, 41, 81, 44, 278, 81, 81, 145, + /* 1600 */ 44, 283, 310, 285, 41, 313, 314, 315, 316, 317, + /* 1610 */ 318, 82, 320, 243, 215, 82, 44, 209, 41, 44, + /* 1620 */ 82, 82, 159, 41, 161, 2, 41, 243, 310, 143, + /* 1630 */ 47, 313, 314, 315, 316, 317, 318, 47, 320, 243, + /* 1640 */ 270, 148, 148, 47, 148, 47, 183, 47, 278, 47, + /* 1650 */ 82, 81, 44, 283, 270, 285, 82, 194, 195, 196, + /* 1660 */ 44, 22, 278, 0, 146, 81, 270, 283, 81, 285, + /* 1670 */ 82, 37, 81, 81, 278, 82, 185, 215, 81, 283, + /* 1680 */ 310, 285, 183, 313, 314, 315, 316, 317, 318, 44, + /* 1690 */ 320, 81, 81, 243, 310, 91, 143, 313, 314, 315, + /* 1700 */ 316, 317, 318, 44, 320, 81, 310, 82, 81, 313, + /* 1710 */ 314, 315, 316, 317, 318, 243, 320, 22, 81, 47, + /* 1720 */ 270, 92, 82, 47, 81, 47, 82, 81, 278, 82, + /* 1730 */ 47, 81, 47, 283, 82, 285, 81, 47, 82, 81, + /* 1740 */ 105, 105, 270, 105, 22, 81, 105, 81, 47, 41, + /* 1750 */ 278, 81, 22, 93, 58, 283, 59, 285, 47, 79, + /* 1760 */ 310, 41, 64, 313, 314, 315, 316, 317, 318, 22, + /* 1770 */ 320, 47, 47, 47, 47, 47, 47, 243, 47, 64, + /* 1780 */ 47, 0, 310, 47, 47, 313, 314, 315, 316, 317, + /* 1790 */ 318, 243, 320, 47, 37, 47, 47, 47, 47, 45, + /* 1800 */ 0, 45, 47, 37, 270, 0, 47, 45, 37, 0, + /* 1810 */ 47, 37, 278, 45, 0, 0, 47, 283, 270, 285, + /* 1820 */ 22, 22, 21, 20, 22, 21, 278, 360, 360, 360, + /* 1830 */ 360, 283, 243, 285, 360, 360, 360, 360, 360, 360, + /* 1840 */ 360, 360, 360, 360, 310, 360, 243, 313, 314, 315, + /* 1850 */ 316, 317, 318, 360, 320, 360, 360, 360, 310, 270, + /* 1860 */ 360, 313, 314, 315, 316, 317, 318, 278, 320, 360, + /* 1870 */ 360, 360, 283, 270, 285, 360, 360, 360, 360, 360, + /* 1880 */ 360, 278, 360, 360, 360, 360, 283, 360, 285, 360, + /* 1890 */ 360, 360, 360, 360, 360, 360, 360, 243, 360, 310, + /* 1900 */ 360, 360, 313, 314, 315, 316, 317, 318, 360, 320, + /* 1910 */ 360, 243, 360, 310, 360, 360, 313, 314, 315, 316, + /* 1920 */ 317, 318, 360, 320, 270, 360, 360, 360, 360, 360, + /* 1930 */ 360, 360, 278, 360, 360, 360, 360, 283, 270, 285, + /* 1940 */ 360, 360, 360, 360, 360, 360, 278, 360, 360, 360, + /* 1950 */ 360, 283, 360, 285, 360, 360, 360, 360, 360, 360, + /* 1960 */ 243, 360, 360, 360, 310, 360, 360, 313, 314, 315, + /* 1970 */ 316, 317, 318, 360, 320, 360, 360, 243, 310, 360, + /* 1980 */ 360, 313, 314, 315, 316, 317, 318, 270, 320, 360, + /* 1990 */ 360, 360, 360, 360, 360, 278, 360, 360, 360, 360, + /* 2000 */ 283, 243, 285, 360, 270, 360, 360, 360, 360, 360, + /* 2010 */ 360, 360, 278, 360, 360, 360, 360, 283, 360, 285, + /* 2020 */ 360, 360, 360, 360, 360, 360, 360, 310, 270, 360, + /* 2030 */ 313, 314, 315, 316, 317, 318, 278, 320, 360, 360, + /* 2040 */ 360, 283, 360, 285, 310, 360, 360, 313, 314, 315, + /* 2050 */ 316, 317, 318, 360, 320, 360, 360, 360, 360, 360, + /* 2060 */ 360, 360, 360, 360, 360, 360, 360, 360, 310, 360, + /* 2070 */ 360, 313, 314, 315, 316, 317, 318, 360, 320, }; -#define YY_SHIFT_COUNT (621) +#define YY_SHIFT_COUNT (624) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (1774) +#define YY_SHIFT_MAX (1815) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 686, 0, 0, 48, 207, 207, 207, 207, 255, 255, - /* 10 */ 207, 207, 414, 462, 621, 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, 63, 63, - /* 40 */ 47, 47, 47, 524, 524, 524, 524, 198, 457, 275, - /* 50 */ 11, 11, 104, 104, 76, 196, 275, 275, 11, 11, - /* 60 */ 11, 11, 11, 11, 11, 58, 11, 11, 142, 246, - /* 70 */ 311, 142, 11, 11, 142, 11, 142, 142, 142, 11, - /* 80 */ 119, 660, 679, 810, 810, 350, 395, 432, 432, 432, - /* 90 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, - /* 100 */ 432, 432, 432, 432, 432, 432, 455, 196, 70, 70, - /* 110 */ 21, 512, 683, 683, 683, 782, 512, 340, 311, 142, - /* 120 */ 142, 416, 416, 673, 713, 197, 197, 197, 197, 197, - /* 130 */ 197, 197, 886, 232, 351, 209, 107, 472, 43, 36, - /* 140 */ 134, 295, 544, 576, 757, 781, 551, 554, 551, 676, - /* 150 */ 676, 676, 547, 578, 793, 1002, 990, 991, 881, 1002, - /* 160 */ 1002, 1012, 913, 913, 1002, 1039, 1039, 1043, 58, 311, - /* 170 */ 58, 1053, 1062, 58, 1053, 58, 340, 1073, 58, 58, - /* 180 */ 1002, 58, 1039, 142, 142, 142, 142, 142, 142, 142, - /* 190 */ 142, 142, 142, 142, 1002, 1039, 416, 416, 1043, 119, - /* 200 */ 989, 311, 119, 1002, 1053, 119, 340, 1073, 119, 1138, - /* 210 */ 950, 943, 416, 950, 943, 416, 416, 142, 964, 1049, - /* 220 */ 993, 793, 992, 340, 1189, 1171, 984, 996, 983, 984, - /* 230 */ 996, 984, 996, 1136, 943, 416, 416, 943, 416, 1079, - /* 240 */ 340, 1073, 119, 673, 119, 340, 1181, 416, 713, 1002, - /* 250 */ 119, 1039, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 272, - /* 260 */ 901, 720, 1186, 549, 740, 12, 111, 268, 20, 187, - /* 270 */ 271, 234, 234, 234, 234, 234, 234, 234, 234, 31, - /* 280 */ 16, 514, 358, 671, 476, 302, 302, 302, 302, 831, - /* 290 */ 280, 445, 758, 763, 809, 873, 889, 893, 878, 863, - /* 300 */ 865, 867, 912, 792, 694, 139, 877, 786, 895, 854, - /* 310 */ 903, 907, 909, 937, 938, 231, 667, 939, 941, 942, - /* 320 */ 945, 946, 951, 835, 860, 988, 1288, 1289, 1250, 1292, - /* 330 */ 1222, 1296, 1251, 1121, 1252, 1254, 1256, 1129, 1306, 1272, - /* 340 */ 1273, 1153, 1336, 1162, 1341, 1295, 1343, 1324, 1347, 1301, - /* 350 */ 1349, 1269, 1188, 1191, 1194, 1197, 1356, 1358, 1206, 1208, - /* 360 */ 1362, 1363, 1323, 1368, 1369, 1370, 1371, 1372, 1373, 1375, - /* 370 */ 1376, 1377, 1378, 1380, 1382, 1383, 1385, 1386, 1395, 1396, - /* 380 */ 1397, 1359, 1398, 1400, 1401, 1402, 1403, 1404, 1393, 1407, - /* 390 */ 1408, 1417, 1418, 1419, 1421, 1387, 1388, 1381, 1409, 1390, - /* 400 */ 1412, 1392, 1429, 1399, 1405, 1430, 1431, 1438, 1411, 1290, - /* 410 */ 1441, 1443, 1413, 1444, 1410, 1449, 1451, 1414, 1426, 1415, - /* 420 */ 1454, 1427, 1428, 1420, 1455, 1434, 1440, 1422, 1458, 1439, - /* 430 */ 1442, 1425, 1488, 1489, 1490, 1492, 1416, 1423, 1446, 1472, - /* 440 */ 1495, 1450, 1452, 1453, 1456, 1460, 1461, 1457, 1463, 1465, - /* 450 */ 1505, 1486, 1513, 1493, 1466, 1516, 1496, 1470, 1519, 1498, - /* 460 */ 1522, 1502, 1512, 1525, 1389, 1491, 1535, 1379, 1515, 1424, - /* 470 */ 1432, 1539, 1540, 1541, 1436, 1544, 1464, 1509, 1433, 1510, - /* 480 */ 1511, 1339, 1468, 1514, 1475, 1473, 1477, 1478, 1480, 1523, - /* 490 */ 1521, 1524, 1485, 1526, 1355, 1503, 1504, 1528, 1365, 1548, - /* 500 */ 1546, 1517, 1559, 1435, 1520, 1554, 1556, 1560, 1561, 1562, - /* 510 */ 1564, 1520, 1602, 1437, 1565, 1531, 1534, 1536, 1572, 1542, - /* 520 */ 1543, 1573, 1599, 1448, 1545, 1538, 1549, 1547, 1552, 1494, - /* 530 */ 1553, 1625, 1593, 1527, 1569, 1555, 1591, 1594, 1570, 1571, - /* 540 */ 1574, 1630, 1575, 1576, 1583, 1619, 1620, 1589, 1590, 1626, - /* 550 */ 1596, 1592, 1632, 1600, 1603, 1633, 1601, 1604, 1637, 1606, - /* 560 */ 1586, 1587, 1595, 1597, 1671, 1605, 1613, 1614, 1649, 1616, - /* 570 */ 1658, 1658, 1679, 1645, 1647, 1665, 1650, 1638, 1685, 1680, - /* 580 */ 1681, 1683, 1686, 1687, 1710, 1688, 1689, 1673, 1460, 1691, - /* 590 */ 1461, 1692, 1693, 1695, 1696, 1697, 1698, 1746, 1700, 1703, - /* 600 */ 1712, 1751, 1705, 1708, 1718, 1754, 1711, 1720, 1730, 1757, - /* 610 */ 1722, 1725, 1734, 1772, 1726, 1774, 1753, 1758, 1756, 1760, - /* 620 */ 1759, 1764, + /* 0 */ 728, 0, 0, 48, 208, 208, 208, 208, 256, 256, + /* 10 */ 208, 208, 416, 464, 624, 464, 464, 464, 464, 464, + /* 20 */ 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, + /* 30 */ 464, 464, 464, 464, 464, 464, 464, 464, 129, 129, + /* 40 */ 202, 202, 202, 1463, 1463, 1463, 1463, 592, 196, 69, + /* 50 */ 8, 8, 7, 7, 12, 3, 69, 69, 8, 8, + /* 60 */ 8, 8, 8, 8, 8, 8, 59, 8, 8, 16, + /* 70 */ 274, 351, 16, 8, 8, 16, 8, 16, 16, 16, + /* 80 */ 8, 369, 706, 663, 836, 836, 143, 189, 226, 226, + /* 90 */ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, + /* 100 */ 226, 226, 226, 226, 226, 226, 226, 198, 3, 720, + /* 110 */ 720, 229, 554, 565, 565, 565, 424, 554, 414, 351, + /* 120 */ 16, 16, 293, 293, 462, 467, 600, 600, 600, 600, + /* 130 */ 600, 600, 600, 1173, 566, 270, 76, 443, 474, 193, + /* 140 */ 101, 192, 327, 204, 782, 767, 735, 644, 731, 644, + /* 150 */ 757, 757, 757, 360, 769, 858, 1054, 1032, 1033, 925, + /* 160 */ 1054, 1054, 1046, 950, 950, 1054, 1077, 1077, 1083, 59, + /* 170 */ 351, 59, 1090, 1092, 59, 1090, 59, 414, 1117, 59, + /* 180 */ 59, 1054, 59, 1077, 16, 16, 16, 16, 16, 16, + /* 190 */ 16, 16, 16, 16, 16, 1054, 1077, 293, 293, 1083, + /* 200 */ 369, 992, 351, 369, 1054, 1090, 369, 414, 1117, 369, + /* 210 */ 1175, 978, 982, 293, 978, 982, 293, 293, 16, 988, + /* 220 */ 1052, 996, 858, 1010, 414, 1203, 1191, 1003, 1014, 1018, + /* 230 */ 1003, 1014, 1003, 1014, 1174, 982, 293, 293, 982, 293, + /* 240 */ 1118, 414, 1117, 369, 462, 369, 414, 1207, 293, 467, + /* 250 */ 1054, 369, 1077, 2079, 2079, 2079, 2079, 2079, 2079, 2079, + /* 260 */ 65, 1215, 747, 872, 526, 918, 132, 19, 368, 140, + /* 270 */ 406, 88, 477, 477, 477, 477, 477, 477, 477, 477, + /* 280 */ 308, 376, 336, 572, 680, 422, 450, 450, 450, 450, + /* 290 */ 902, 26, 789, 826, 827, 849, 923, 936, 940, 930, + /* 300 */ 883, 916, 919, 885, 831, 751, 286, 926, 863, 927, + /* 310 */ 906, 928, 931, 934, 935, 941, 938, 948, 943, 947, + /* 320 */ 977, 980, 985, 986, 713, 955, 966, 1311, 1312, 1273, + /* 330 */ 1314, 1244, 1327, 1283, 1154, 1285, 1286, 1287, 1158, 1336, + /* 340 */ 1291, 1293, 1168, 1347, 1171, 1349, 1303, 1351, 1330, 1353, + /* 350 */ 1308, 1356, 1276, 1201, 1204, 1205, 1211, 1371, 1378, 1225, + /* 360 */ 1227, 1387, 1388, 1340, 1385, 1259, 1402, 1405, 1406, 1407, + /* 370 */ 1411, 1412, 1413, 1414, 1415, 1417, 1418, 1419, 1423, 1424, + /* 380 */ 1425, 1426, 1427, 1428, 1389, 1430, 1431, 1432, 1434, 1436, + /* 390 */ 1437, 1422, 1446, 1447, 1448, 1458, 1459, 1460, 1410, 1416, + /* 400 */ 1420, 1438, 1421, 1440, 1429, 1451, 1439, 1433, 1455, 1456, + /* 410 */ 1466, 1435, 1313, 1467, 1468, 1441, 1469, 1443, 1474, 1479, + /* 420 */ 1444, 1442, 1445, 1481, 1453, 1464, 1449, 1483, 1457, 1471, + /* 430 */ 1475, 1484, 1461, 1473, 1477, 1488, 1490, 1503, 1505, 1470, + /* 440 */ 1452, 1476, 1495, 1519, 1478, 1482, 1485, 1487, 1480, 1489, + /* 450 */ 1492, 1502, 1509, 1526, 1506, 1531, 1514, 1510, 1537, 1541, + /* 460 */ 1512, 1564, 1543, 1567, 1546, 1549, 1571, 1493, 1525, 1573, + /* 470 */ 1409, 1554, 1494, 1454, 1578, 1579, 1580, 1496, 1581, 1501, + /* 480 */ 1547, 1486, 1542, 1544, 1372, 1504, 1550, 1507, 1511, 1513, + /* 490 */ 1516, 1508, 1552, 1551, 1556, 1517, 1563, 1399, 1529, 1533, + /* 500 */ 1572, 1408, 1577, 1575, 1538, 1582, 1462, 1539, 1583, 1590, + /* 510 */ 1596, 1598, 1600, 1602, 1539, 1623, 1499, 1585, 1568, 1570, + /* 520 */ 1574, 1608, 1584, 1587, 1616, 1639, 1491, 1591, 1588, 1593, + /* 530 */ 1592, 1597, 1518, 1610, 1663, 1634, 1553, 1611, 1604, 1645, + /* 540 */ 1659, 1624, 1625, 1627, 1695, 1637, 1629, 1640, 1672, 1676, + /* 550 */ 1643, 1644, 1678, 1646, 1647, 1683, 1650, 1652, 1685, 1655, + /* 560 */ 1656, 1690, 1658, 1635, 1636, 1638, 1641, 1722, 1660, 1664, + /* 570 */ 1666, 1701, 1670, 1708, 1708, 1730, 1697, 1696, 1711, 1698, + /* 580 */ 1680, 1720, 1724, 1725, 1726, 1727, 1728, 1747, 1729, 1731, + /* 590 */ 1715, 1480, 1733, 1489, 1736, 1737, 1746, 1748, 1749, 1750, + /* 600 */ 1781, 1751, 1754, 1757, 1800, 1755, 1756, 1766, 1805, 1759, + /* 610 */ 1762, 1771, 1809, 1763, 1768, 1774, 1814, 1769, 1815, 1798, + /* 620 */ 1801, 1799, 1802, 1804, 1803, }; -#define YY_REDUCE_COUNT (258) +#define YY_REDUCE_COUNT (259) #define YY_REDUCE_MIN (-300) -#define YY_REDUCE_MAX (1778) +#define YY_REDUCE_MAX (1758) static const short yy_reduce_ofst[] = { - /* 0 */ -186, -240, -177, 241, 648, 762, 788, 814, 866, 880, - /* 10 */ 189, 931, 995, 1009, 1018, 459, 1075, 1097, 1151, 1163, - /* 20 */ 1214, 1265, 1279, 1328, 1345, 1394, 1406, 1447, 1499, 1508, - /* 30 */ 1557, 1598, 1615, 1664, 1676, 1717, 1769, 1778, 1588, 1690, - /* 40 */ -161, -118, 156, -268, -263, 3, 404, -175, 223, 278, - /* 50 */ -158, 285, -238, -230, -300, -279, -295, -253, -156, 158, - /* 60 */ 237, 335, 421, 428, 450, 247, 572, 580, -246, -136, - /* 70 */ -66, 92, 585, 610, 145, 611, 352, 309, 362, 643, - /* 80 */ 374, -197, -275, -275, -275, -34, -124, 81, 124, 127, - /* 90 */ 175, 180, 211, 217, 265, 384, 387, 418, 429, 434, - /* 100 */ 447, 473, 484, 488, 520, 593, 356, 193, -183, 41, - /* 110 */ 135, 327, 373, 422, 423, 4, 441, 614, -141, 550, - /* 120 */ -269, 150, 245, 469, 95, 599, 604, 652, 653, 657, - /* 130 */ 659, 663, 641, 700, 714, 601, 623, 743, 685, 654, - /* 140 */ 726, 726, 747, 750, 718, 689, 665, 665, 665, 655, - /* 150 */ 656, 674, 664, 726, 711, 777, 730, 785, 742, 799, - /* 160 */ 801, 753, 768, 771, 811, 817, 818, 761, 813, 783, - /* 170 */ 816, 784, 787, 833, 791, 839, 829, 804, 842, 856, - /* 180 */ 862, 859, 869, 848, 849, 850, 851, 852, 855, 868, - /* 190 */ 870, 875, 876, 883, 885, 888, 864, 871, 844, 887, - /* 200 */ 857, 872, 910, 905, 874, 914, 890, 879, 915, 861, - /* 210 */ 824, 891, 892, 840, 898, 894, 904, 726, 858, 882, - /* 220 */ 897, 896, 665, 930, 900, 899, 902, 911, 884, 906, - /* 230 */ 916, 908, 918, 924, 928, 944, 947, 934, 953, 933, - /* 240 */ 955, 949, 982, 987, 1003, 979, 994, 998, 1006, 1022, - /* 250 */ 1023, 1029, 975, 972, 1019, 1020, 1021, 1033, 1041, + /* 0 */ -80, -241, 38, 242, 402, 615, 676, 737, 806, 815, + /* 10 */ -18, 190, 864, 920, 929, 1008, 1059, 1076, 1125, 1179, + /* 20 */ 1228, 1237, 1292, 1318, 1370, 1384, 1396, 1450, 1472, 1534, + /* 30 */ 1548, 1589, 1603, 1654, 1668, 1717, 1734, 1758, -232, 1065, + /* 40 */ -154, 138, 298, -269, 103, -257, 264, -242, -5, 21, + /* 50 */ -223, 54, -239, -33, -240, -280, -27, -6, -207, -156, + /* 60 */ 237, 285, 290, 300, 478, 487, -237, 509, 519, 155, + /* 70 */ -14, 142, 199, 611, 638, 252, 642, 262, 267, 354, + /* 80 */ 545, 370, -88, -300, -300, -300, -164, 240, -235, -224, + /* 90 */ 31, 125, 259, 266, 296, 337, 385, 386, 431, 440, + /* 100 */ 449, 515, 518, 612, 613, 614, 630, 261, -201, -42, + /* 110 */ 439, 225, -99, 79, 446, 455, 397, 434, 504, 332, + /* 120 */ -94, 589, 508, 516, 472, -41, -271, 529, 531, 557, + /* 130 */ 607, 692, 699, 391, 727, 714, 616, 628, 730, 691, + /* 140 */ 681, 736, 736, 777, 796, 766, 744, 724, 724, 724, + /* 150 */ 711, 717, 718, 732, 736, 765, 828, 772, 825, 783, + /* 160 */ 837, 838, 800, 807, 808, 844, 856, 857, 801, 852, + /* 170 */ 823, 860, 814, 816, 873, 820, 882, 840, 847, 886, + /* 180 */ 887, 889, 890, 898, 876, 878, 880, 881, 888, 892, + /* 190 */ 894, 895, 897, 899, 901, 903, 907, 877, 893, 851, + /* 200 */ 904, 865, 908, 921, 937, 891, 939, 911, 884, 942, + /* 210 */ 896, 848, 910, 932, 853, 915, 933, 946, 736, 866, + /* 220 */ 875, 879, 909, 724, 944, 951, 924, 905, 912, 913, + /* 230 */ 917, 922, 945, 952, 953, 964, 981, 990, 967, 991, + /* 240 */ 989, 1002, 993, 1030, 1017, 1035, 1007, 1016, 1009, 1034, + /* 250 */ 1047, 1044, 1055, 1000, 998, 1042, 1043, 1045, 1057, 1067, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 10 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 20 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 30 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 40 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 50 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 60 */ 1371, 1371, 1371, 1371, 1371, 1440, 1371, 1371, 1371, 1371, - /* 70 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 80 */ 1438, 1586, 1371, 1750, 1371, 1371, 1371, 1371, 1371, 1371, - /* 90 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 100 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 110 */ 1440, 1371, 1761, 1761, 1761, 1438, 1371, 1371, 1371, 1371, - /* 120 */ 1371, 1371, 1371, 1534, 1371, 1371, 1371, 1371, 1371, 1371, - /* 130 */ 1371, 1371, 1619, 1371, 1371, 1827, 1371, 1371, 1625, 1785, - /* 140 */ 1371, 1371, 1371, 1371, 1487, 1777, 1753, 1767, 1754, 1812, - /* 150 */ 1812, 1812, 1770, 1371, 1781, 1371, 1371, 1371, 1611, 1371, - /* 160 */ 1371, 1591, 1588, 1588, 1371, 1371, 1371, 1371, 1440, 1371, - /* 170 */ 1440, 1371, 1371, 1440, 1371, 1440, 1371, 1371, 1440, 1440, - /* 180 */ 1371, 1440, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 190 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1438, - /* 200 */ 1621, 1371, 1438, 1371, 1371, 1438, 1371, 1371, 1438, 1371, - /* 210 */ 1792, 1790, 1371, 1792, 1790, 1371, 1371, 1371, 1804, 1800, - /* 220 */ 1783, 1781, 1767, 1371, 1371, 1371, 1818, 1814, 1830, 1818, - /* 230 */ 1814, 1818, 1814, 1371, 1790, 1371, 1371, 1790, 1371, 1596, - /* 240 */ 1371, 1371, 1438, 1371, 1438, 1371, 1503, 1371, 1371, 1371, - /* 250 */ 1438, 1371, 1613, 1627, 1537, 1537, 1537, 1441, 1376, 1371, - /* 260 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 270 */ 1499, 1694, 1803, 1802, 1726, 1725, 1724, 1722, 1693, 1371, - /* 280 */ 1371, 1371, 1371, 1371, 1371, 1687, 1688, 1686, 1685, 1371, - /* 290 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 300 */ 1371, 1371, 1751, 1371, 1815, 1819, 1371, 1371, 1371, 1670, - /* 310 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 320 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 330 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 340 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 350 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 360 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 370 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 380 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 390 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1405, 1371, 1371, - /* 400 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 410 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 420 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 430 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 440 */ 1371, 1371, 1371, 1371, 1371, 1468, 1467, 1371, 1371, 1371, - /* 450 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 460 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 470 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1774, - /* 480 */ 1784, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 490 */ 1371, 1670, 1371, 1801, 1371, 1760, 1756, 1371, 1371, 1752, - /* 500 */ 1371, 1371, 1813, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 510 */ 1371, 1371, 1746, 1371, 1719, 1371, 1371, 1371, 1371, 1371, - /* 520 */ 1371, 1371, 1371, 1681, 1371, 1371, 1371, 1371, 1371, 1371, - /* 530 */ 1371, 1371, 1371, 1371, 1371, 1371, 1669, 1371, 1710, 1371, - /* 540 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1531, 1371, 1371, - /* 550 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 560 */ 1516, 1514, 1513, 1512, 1371, 1509, 1371, 1371, 1371, 1371, - /* 570 */ 1540, 1539, 1371, 1371, 1371, 1371, 1371, 1371, 1460, 1371, - /* 580 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1451, 1371, - /* 590 */ 1450, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 600 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 610 */ 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - /* 620 */ 1371, 1371, + /* 0 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 10 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 20 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 30 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 40 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 50 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 60 */ 1375, 1375, 1375, 1375, 1375, 1375, 1444, 1375, 1375, 1375, + /* 70 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 80 */ 1375, 1442, 1591, 1375, 1755, 1375, 1375, 1375, 1375, 1375, + /* 90 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 100 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 110 */ 1375, 1444, 1375, 1766, 1766, 1766, 1442, 1375, 1375, 1375, + /* 120 */ 1375, 1375, 1375, 1375, 1538, 1375, 1375, 1375, 1375, 1375, + /* 130 */ 1375, 1375, 1375, 1624, 1375, 1375, 1832, 1375, 1375, 1630, + /* 140 */ 1790, 1375, 1375, 1375, 1375, 1491, 1782, 1758, 1772, 1759, + /* 150 */ 1817, 1817, 1817, 1775, 1375, 1786, 1375, 1375, 1375, 1616, + /* 160 */ 1375, 1375, 1596, 1593, 1593, 1375, 1375, 1375, 1375, 1444, + /* 170 */ 1375, 1444, 1375, 1375, 1444, 1375, 1444, 1375, 1375, 1444, + /* 180 */ 1444, 1375, 1444, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 190 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 200 */ 1442, 1626, 1375, 1442, 1375, 1375, 1442, 1375, 1375, 1442, + /* 210 */ 1375, 1797, 1795, 1375, 1797, 1795, 1375, 1375, 1375, 1809, + /* 220 */ 1805, 1788, 1786, 1772, 1375, 1375, 1375, 1823, 1819, 1835, + /* 230 */ 1823, 1819, 1823, 1819, 1375, 1795, 1375, 1375, 1795, 1375, + /* 240 */ 1601, 1375, 1375, 1442, 1375, 1442, 1375, 1507, 1375, 1375, + /* 250 */ 1375, 1442, 1375, 1618, 1632, 1541, 1541, 1541, 1445, 1380, + /* 260 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 270 */ 1375, 1503, 1699, 1808, 1807, 1731, 1730, 1729, 1727, 1698, + /* 280 */ 1375, 1375, 1375, 1375, 1375, 1375, 1692, 1693, 1691, 1690, + /* 290 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 300 */ 1375, 1375, 1375, 1756, 1375, 1820, 1824, 1375, 1375, 1375, + /* 310 */ 1675, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 320 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 330 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 340 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 350 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 360 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 370 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 380 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 390 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 400 */ 1409, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 410 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 420 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 430 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 440 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1472, 1471, + /* 450 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 460 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 470 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 480 */ 1375, 1375, 1779, 1789, 1375, 1375, 1375, 1375, 1375, 1375, + /* 490 */ 1375, 1375, 1375, 1375, 1675, 1375, 1806, 1375, 1765, 1761, + /* 500 */ 1375, 1375, 1757, 1375, 1375, 1818, 1375, 1375, 1375, 1375, + /* 510 */ 1375, 1375, 1375, 1375, 1375, 1751, 1375, 1724, 1375, 1375, + /* 520 */ 1375, 1375, 1375, 1375, 1375, 1375, 1686, 1375, 1375, 1375, + /* 530 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1674, + /* 540 */ 1375, 1715, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 550 */ 1535, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 560 */ 1375, 1375, 1375, 1520, 1518, 1517, 1516, 1375, 1513, 1375, + /* 570 */ 1375, 1375, 1375, 1544, 1543, 1375, 1375, 1375, 1375, 1375, + /* 580 */ 1375, 1464, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 590 */ 1375, 1455, 1375, 1454, 1375, 1375, 1375, 1375, 1375, 1375, + /* 600 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 610 */ 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, + /* 620 */ 1375, 1375, 1375, 1375, 1375, }; /********** End of lemon-generated parsing tables *****************************/ @@ -963,6 +959,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* SNODES => nothing */ 0, /* CLUSTER => nothing */ 0, /* TRANSACTIONS => nothing */ + 0, /* DISTRIBUTED => nothing */ 0, /* LIKE => nothing */ 0, /* INDEX => nothing */ 0, /* FULLTEXT => nothing */ @@ -1055,12 +1052,12 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ID => nothing */ - 232, /* NK_BITNOT => ID */ - 232, /* INSERT => ID */ - 232, /* VALUES => ID */ - 232, /* IMPORT => ID */ - 232, /* NK_SEMI => ID */ - 232, /* FILE => ID */ + 233, /* NK_BITNOT => ID */ + 233, /* INSERT => ID */ + 233, /* VALUES => ID */ + 233, /* IMPORT => ID */ + 233, /* NK_SEMI => ID */ + 233, /* FILE => ID */ }; #endif /* YYFALLBACK */ @@ -1289,224 +1286,225 @@ static const char *const yyTokenName[] = { /* 138 */ "SNODES", /* 139 */ "CLUSTER", /* 140 */ "TRANSACTIONS", - /* 141 */ "LIKE", - /* 142 */ "INDEX", - /* 143 */ "FULLTEXT", - /* 144 */ "FUNCTION", - /* 145 */ "INTERVAL", - /* 146 */ "TOPIC", - /* 147 */ "AS", - /* 148 */ "CONSUMER", - /* 149 */ "GROUP", - /* 150 */ "DESC", - /* 151 */ "DESCRIBE", - /* 152 */ "RESET", - /* 153 */ "QUERY", - /* 154 */ "CACHE", - /* 155 */ "EXPLAIN", - /* 156 */ "ANALYZE", - /* 157 */ "VERBOSE", - /* 158 */ "NK_BOOL", - /* 159 */ "RATIO", - /* 160 */ "NK_FLOAT", - /* 161 */ "COMPACT", - /* 162 */ "VNODES", - /* 163 */ "IN", - /* 164 */ "OUTPUTTYPE", - /* 165 */ "AGGREGATE", - /* 166 */ "BUFSIZE", - /* 167 */ "STREAM", - /* 168 */ "INTO", - /* 169 */ "TRIGGER", - /* 170 */ "AT_ONCE", - /* 171 */ "WINDOW_CLOSE", - /* 172 */ "KILL", - /* 173 */ "CONNECTION", - /* 174 */ "TRANSACTION", - /* 175 */ "BALANCE", - /* 176 */ "VGROUP", - /* 177 */ "MERGE", - /* 178 */ "REDISTRIBUTE", - /* 179 */ "SPLIT", - /* 180 */ "SYNCDB", - /* 181 */ "DELETE", - /* 182 */ "NULL", - /* 183 */ "NK_QUESTION", - /* 184 */ "NK_ARROW", - /* 185 */ "ROWTS", - /* 186 */ "TBNAME", - /* 187 */ "QSTARTTS", - /* 188 */ "QENDTS", - /* 189 */ "WSTARTTS", - /* 190 */ "WENDTS", - /* 191 */ "WDURATION", - /* 192 */ "CAST", - /* 193 */ "NOW", - /* 194 */ "TODAY", - /* 195 */ "TIMEZONE", - /* 196 */ "COUNT", - /* 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 */ "HAVING", - /* 225 */ "ORDER", - /* 226 */ "SLIMIT", - /* 227 */ "SOFFSET", - /* 228 */ "LIMIT", - /* 229 */ "OFFSET", - /* 230 */ "ASC", - /* 231 */ "NULLS", - /* 232 */ "ID", - /* 233 */ "NK_BITNOT", - /* 234 */ "INSERT", - /* 235 */ "VALUES", - /* 236 */ "IMPORT", - /* 237 */ "NK_SEMI", - /* 238 */ "FILE", - /* 239 */ "cmd", - /* 240 */ "account_options", - /* 241 */ "alter_account_options", - /* 242 */ "literal", - /* 243 */ "alter_account_option", - /* 244 */ "user_name", - /* 245 */ "privileges", - /* 246 */ "priv_level", - /* 247 */ "priv_type_list", - /* 248 */ "priv_type", - /* 249 */ "db_name", - /* 250 */ "dnode_endpoint", - /* 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 */ "duration_list", - /* 280 */ "rollup_func_list", - /* 281 */ "alter_table_option", - /* 282 */ "duration_literal", - /* 283 */ "rollup_func_name", - /* 284 */ "function_name", - /* 285 */ "col_name", - /* 286 */ "db_name_cond_opt", - /* 287 */ "like_pattern_opt", - /* 288 */ "table_name_cond", - /* 289 */ "from_db_opt", - /* 290 */ "index_name", - /* 291 */ "index_options", - /* 292 */ "func_list", - /* 293 */ "sliding_opt", - /* 294 */ "func", - /* 295 */ "expression_list", - /* 296 */ "topic_name", - /* 297 */ "query_expression", - /* 298 */ "cgroup_name", - /* 299 */ "analyze_opt", - /* 300 */ "explain_options", - /* 301 */ "agg_func_opt", - /* 302 */ "bufsize_opt", - /* 303 */ "stream_name", - /* 304 */ "stream_options", - /* 305 */ "into_opt", - /* 306 */ "dnode_list", - /* 307 */ "where_clause_opt", - /* 308 */ "signed", - /* 309 */ "literal_func", - /* 310 */ "table_alias", - /* 311 */ "column_alias", - /* 312 */ "expression", - /* 313 */ "pseudo_column", - /* 314 */ "column_reference", - /* 315 */ "function_expression", - /* 316 */ "subquery", - /* 317 */ "star_func", - /* 318 */ "star_func_para_list", - /* 319 */ "noarg_func", - /* 320 */ "other_para_list", - /* 321 */ "star_func_para", - /* 322 */ "predicate", - /* 323 */ "compare_op", - /* 324 */ "in_op", - /* 325 */ "in_predicate_value", - /* 326 */ "boolean_value_expression", - /* 327 */ "boolean_primary", - /* 328 */ "common_expression", - /* 329 */ "from_clause", - /* 330 */ "table_reference_list", - /* 331 */ "table_reference", - /* 332 */ "table_primary", - /* 333 */ "joined_table", - /* 334 */ "alias_opt", - /* 335 */ "parenthesized_joined_table", - /* 336 */ "join_type", - /* 337 */ "search_condition", - /* 338 */ "query_specification", - /* 339 */ "set_quantifier_opt", - /* 340 */ "select_list", - /* 341 */ "partition_by_clause_opt", - /* 342 */ "twindow_clause_opt", - /* 343 */ "group_by_clause_opt", - /* 344 */ "having_clause_opt", - /* 345 */ "select_sublist", - /* 346 */ "select_item", - /* 347 */ "fill_opt", - /* 348 */ "fill_mode", - /* 349 */ "group_by_list", - /* 350 */ "query_expression_body", - /* 351 */ "order_by_clause_opt", - /* 352 */ "slimit_clause_opt", - /* 353 */ "limit_clause_opt", - /* 354 */ "query_primary", - /* 355 */ "sort_specification_list", - /* 356 */ "sort_specification", - /* 357 */ "ordering_specification_opt", - /* 358 */ "null_ordering_opt", + /* 141 */ "DISTRIBUTED", + /* 142 */ "LIKE", + /* 143 */ "INDEX", + /* 144 */ "FULLTEXT", + /* 145 */ "FUNCTION", + /* 146 */ "INTERVAL", + /* 147 */ "TOPIC", + /* 148 */ "AS", + /* 149 */ "CONSUMER", + /* 150 */ "GROUP", + /* 151 */ "DESC", + /* 152 */ "DESCRIBE", + /* 153 */ "RESET", + /* 154 */ "QUERY", + /* 155 */ "CACHE", + /* 156 */ "EXPLAIN", + /* 157 */ "ANALYZE", + /* 158 */ "VERBOSE", + /* 159 */ "NK_BOOL", + /* 160 */ "RATIO", + /* 161 */ "NK_FLOAT", + /* 162 */ "COMPACT", + /* 163 */ "VNODES", + /* 164 */ "IN", + /* 165 */ "OUTPUTTYPE", + /* 166 */ "AGGREGATE", + /* 167 */ "BUFSIZE", + /* 168 */ "STREAM", + /* 169 */ "INTO", + /* 170 */ "TRIGGER", + /* 171 */ "AT_ONCE", + /* 172 */ "WINDOW_CLOSE", + /* 173 */ "KILL", + /* 174 */ "CONNECTION", + /* 175 */ "TRANSACTION", + /* 176 */ "BALANCE", + /* 177 */ "VGROUP", + /* 178 */ "MERGE", + /* 179 */ "REDISTRIBUTE", + /* 180 */ "SPLIT", + /* 181 */ "SYNCDB", + /* 182 */ "DELETE", + /* 183 */ "NULL", + /* 184 */ "NK_QUESTION", + /* 185 */ "NK_ARROW", + /* 186 */ "ROWTS", + /* 187 */ "TBNAME", + /* 188 */ "QSTARTTS", + /* 189 */ "QENDTS", + /* 190 */ "WSTARTTS", + /* 191 */ "WENDTS", + /* 192 */ "WDURATION", + /* 193 */ "CAST", + /* 194 */ "NOW", + /* 195 */ "TODAY", + /* 196 */ "TIMEZONE", + /* 197 */ "COUNT", + /* 198 */ "LAST_ROW", + /* 199 */ "BETWEEN", + /* 200 */ "IS", + /* 201 */ "NK_LT", + /* 202 */ "NK_GT", + /* 203 */ "NK_LE", + /* 204 */ "NK_GE", + /* 205 */ "NK_NE", + /* 206 */ "MATCH", + /* 207 */ "NMATCH", + /* 208 */ "CONTAINS", + /* 209 */ "JOIN", + /* 210 */ "INNER", + /* 211 */ "SELECT", + /* 212 */ "DISTINCT", + /* 213 */ "WHERE", + /* 214 */ "PARTITION", + /* 215 */ "BY", + /* 216 */ "SESSION", + /* 217 */ "STATE_WINDOW", + /* 218 */ "SLIDING", + /* 219 */ "FILL", + /* 220 */ "VALUE", + /* 221 */ "NONE", + /* 222 */ "PREV", + /* 223 */ "LINEAR", + /* 224 */ "NEXT", + /* 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 */ "not_exists_opt", + /* 253 */ "db_options", + /* 254 */ "exists_opt", + /* 255 */ "alter_db_options", + /* 256 */ "integer_list", + /* 257 */ "variable_list", + /* 258 */ "retention_list", + /* 259 */ "alter_db_option", + /* 260 */ "retention", + /* 261 */ "full_table_name", + /* 262 */ "column_def_list", + /* 263 */ "tags_def_opt", + /* 264 */ "table_options", + /* 265 */ "multi_create_clause", + /* 266 */ "tags_def", + /* 267 */ "multi_drop_clause", + /* 268 */ "alter_table_clause", + /* 269 */ "alter_table_options", + /* 270 */ "column_name", + /* 271 */ "type_name", + /* 272 */ "signed_literal", + /* 273 */ "create_subtable_clause", + /* 274 */ "specific_tags_opt", + /* 275 */ "literal_list", + /* 276 */ "drop_table_clause", + /* 277 */ "col_name_list", + /* 278 */ "table_name", + /* 279 */ "column_def", + /* 280 */ "duration_list", + /* 281 */ "rollup_func_list", + /* 282 */ "alter_table_option", + /* 283 */ "duration_literal", + /* 284 */ "rollup_func_name", + /* 285 */ "function_name", + /* 286 */ "col_name", + /* 287 */ "db_name_cond_opt", + /* 288 */ "like_pattern_opt", + /* 289 */ "table_name_cond", + /* 290 */ "from_db_opt", + /* 291 */ "index_name", + /* 292 */ "index_options", + /* 293 */ "func_list", + /* 294 */ "sliding_opt", + /* 295 */ "func", + /* 296 */ "expression_list", + /* 297 */ "topic_name", + /* 298 */ "query_expression", + /* 299 */ "cgroup_name", + /* 300 */ "analyze_opt", + /* 301 */ "explain_options", + /* 302 */ "agg_func_opt", + /* 303 */ "bufsize_opt", + /* 304 */ "stream_name", + /* 305 */ "stream_options", + /* 306 */ "into_opt", + /* 307 */ "dnode_list", + /* 308 */ "where_clause_opt", + /* 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 */ "partition_by_clause_opt", + /* 343 */ "twindow_clause_opt", + /* 344 */ "group_by_clause_opt", + /* 345 */ "having_clause_opt", + /* 346 */ "select_sublist", + /* 347 */ "select_item", + /* 348 */ "fill_opt", + /* 349 */ "fill_mode", + /* 350 */ "group_by_list", + /* 351 */ "query_expression_body", + /* 352 */ "order_by_clause_opt", + /* 353 */ "slimit_clause_opt", + /* 354 */ "limit_clause_opt", + /* 355 */ "query_primary", + /* 356 */ "sort_specification_list", + /* 357 */ "sort_specification", + /* 358 */ "ordering_specification_opt", + /* 359 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1726,253 +1724,254 @@ static const char *const yyRuleName[] = { /* 209 */ "cmd ::= SHOW SNODES", /* 210 */ "cmd ::= SHOW CLUSTER", /* 211 */ "cmd ::= SHOW TRANSACTIONS", - /* 212 */ "db_name_cond_opt ::=", - /* 213 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 214 */ "like_pattern_opt ::=", - /* 215 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 216 */ "table_name_cond ::= table_name", - /* 217 */ "from_db_opt ::=", - /* 218 */ "from_db_opt ::= FROM db_name", - /* 219 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options", - /* 220 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP", - /* 221 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name", - /* 222 */ "index_options ::=", - /* 223 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt", - /* 224 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt", - /* 225 */ "func_list ::= func", - /* 226 */ "func_list ::= func_list NK_COMMA func", - /* 227 */ "func ::= function_name NK_LP expression_list NK_RP", - /* 228 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression", - /* 229 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", - /* 230 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", - /* 231 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 232 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 233 */ "cmd ::= DESC full_table_name", - /* 234 */ "cmd ::= DESCRIBE full_table_name", - /* 235 */ "cmd ::= RESET QUERY CACHE", - /* 236 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", - /* 237 */ "analyze_opt ::=", - /* 238 */ "analyze_opt ::= ANALYZE", - /* 239 */ "explain_options ::=", - /* 240 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 241 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 242 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", - /* 243 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 244 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 245 */ "agg_func_opt ::=", - /* 246 */ "agg_func_opt ::= AGGREGATE", - /* 247 */ "bufsize_opt ::=", - /* 248 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 249 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", - /* 250 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 251 */ "into_opt ::=", - /* 252 */ "into_opt ::= INTO full_table_name", - /* 253 */ "stream_options ::=", - /* 254 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 255 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 256 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 257 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 258 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 259 */ "cmd ::= KILL QUERY NK_STRING", - /* 260 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 261 */ "cmd ::= BALANCE VGROUP", - /* 262 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 263 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 264 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 265 */ "dnode_list ::= DNODE NK_INTEGER", - /* 266 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 267 */ "cmd ::= SYNCDB db_name REPLICA", - /* 268 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 269 */ "cmd ::= query_expression", - /* 270 */ "literal ::= NK_INTEGER", - /* 271 */ "literal ::= NK_FLOAT", - /* 272 */ "literal ::= NK_STRING", - /* 273 */ "literal ::= NK_BOOL", - /* 274 */ "literal ::= TIMESTAMP NK_STRING", - /* 275 */ "literal ::= duration_literal", - /* 276 */ "literal ::= NULL", - /* 277 */ "literal ::= NK_QUESTION", - /* 278 */ "duration_literal ::= NK_VARIABLE", - /* 279 */ "signed ::= NK_INTEGER", - /* 280 */ "signed ::= NK_PLUS NK_INTEGER", - /* 281 */ "signed ::= NK_MINUS NK_INTEGER", - /* 282 */ "signed ::= NK_FLOAT", - /* 283 */ "signed ::= NK_PLUS NK_FLOAT", - /* 284 */ "signed ::= NK_MINUS NK_FLOAT", - /* 285 */ "signed_literal ::= signed", - /* 286 */ "signed_literal ::= NK_STRING", - /* 287 */ "signed_literal ::= NK_BOOL", - /* 288 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 289 */ "signed_literal ::= duration_literal", - /* 290 */ "signed_literal ::= NULL", - /* 291 */ "signed_literal ::= literal_func", - /* 292 */ "literal_list ::= signed_literal", - /* 293 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 294 */ "db_name ::= NK_ID", - /* 295 */ "table_name ::= NK_ID", - /* 296 */ "column_name ::= NK_ID", - /* 297 */ "function_name ::= NK_ID", - /* 298 */ "table_alias ::= NK_ID", - /* 299 */ "column_alias ::= NK_ID", - /* 300 */ "user_name ::= NK_ID", - /* 301 */ "index_name ::= NK_ID", - /* 302 */ "topic_name ::= NK_ID", - /* 303 */ "stream_name ::= NK_ID", - /* 304 */ "cgroup_name ::= NK_ID", - /* 305 */ "expression ::= literal", - /* 306 */ "expression ::= pseudo_column", - /* 307 */ "expression ::= column_reference", - /* 308 */ "expression ::= function_expression", - /* 309 */ "expression ::= subquery", - /* 310 */ "expression ::= NK_LP expression NK_RP", - /* 311 */ "expression ::= NK_PLUS expression", - /* 312 */ "expression ::= NK_MINUS expression", - /* 313 */ "expression ::= expression NK_PLUS expression", - /* 314 */ "expression ::= expression NK_MINUS expression", - /* 315 */ "expression ::= expression NK_STAR expression", - /* 316 */ "expression ::= expression NK_SLASH expression", - /* 317 */ "expression ::= expression NK_REM expression", - /* 318 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 319 */ "expression_list ::= expression", - /* 320 */ "expression_list ::= expression_list NK_COMMA expression", - /* 321 */ "column_reference ::= column_name", - /* 322 */ "column_reference ::= table_name NK_DOT column_name", - /* 323 */ "pseudo_column ::= ROWTS", - /* 324 */ "pseudo_column ::= TBNAME", - /* 325 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 326 */ "pseudo_column ::= QSTARTTS", - /* 327 */ "pseudo_column ::= QENDTS", - /* 328 */ "pseudo_column ::= WSTARTTS", - /* 329 */ "pseudo_column ::= WENDTS", - /* 330 */ "pseudo_column ::= WDURATION", - /* 331 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 332 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 333 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", - /* 334 */ "function_expression ::= literal_func", - /* 335 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 336 */ "literal_func ::= NOW", - /* 337 */ "noarg_func ::= NOW", - /* 338 */ "noarg_func ::= TODAY", - /* 339 */ "noarg_func ::= TIMEZONE", - /* 340 */ "star_func ::= COUNT", - /* 341 */ "star_func ::= FIRST", - /* 342 */ "star_func ::= LAST", - /* 343 */ "star_func ::= LAST_ROW", - /* 344 */ "star_func_para_list ::= NK_STAR", - /* 345 */ "star_func_para_list ::= other_para_list", - /* 346 */ "other_para_list ::= star_func_para", - /* 347 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 348 */ "star_func_para ::= expression", - /* 349 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 350 */ "predicate ::= expression compare_op expression", - /* 351 */ "predicate ::= expression BETWEEN expression AND expression", - /* 352 */ "predicate ::= expression NOT BETWEEN expression AND expression", - /* 353 */ "predicate ::= expression IS NULL", - /* 354 */ "predicate ::= expression IS NOT NULL", - /* 355 */ "predicate ::= expression in_op in_predicate_value", - /* 356 */ "compare_op ::= NK_LT", - /* 357 */ "compare_op ::= NK_GT", - /* 358 */ "compare_op ::= NK_LE", - /* 359 */ "compare_op ::= NK_GE", - /* 360 */ "compare_op ::= NK_NE", - /* 361 */ "compare_op ::= NK_EQ", - /* 362 */ "compare_op ::= LIKE", - /* 363 */ "compare_op ::= NOT LIKE", - /* 364 */ "compare_op ::= MATCH", - /* 365 */ "compare_op ::= NMATCH", - /* 366 */ "compare_op ::= CONTAINS", - /* 367 */ "in_op ::= IN", - /* 368 */ "in_op ::= NOT IN", - /* 369 */ "in_predicate_value ::= NK_LP expression_list NK_RP", - /* 370 */ "boolean_value_expression ::= boolean_primary", - /* 371 */ "boolean_value_expression ::= NOT boolean_primary", - /* 372 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 373 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 374 */ "boolean_primary ::= predicate", - /* 375 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 376 */ "common_expression ::= expression", - /* 377 */ "common_expression ::= boolean_value_expression", - /* 378 */ "from_clause ::= FROM table_reference_list", - /* 379 */ "table_reference_list ::= table_reference", - /* 380 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 381 */ "table_reference ::= table_primary", - /* 382 */ "table_reference ::= joined_table", - /* 383 */ "table_primary ::= table_name alias_opt", - /* 384 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 385 */ "table_primary ::= subquery alias_opt", - /* 386 */ "table_primary ::= parenthesized_joined_table", - /* 387 */ "alias_opt ::=", - /* 388 */ "alias_opt ::= table_alias", - /* 389 */ "alias_opt ::= AS table_alias", - /* 390 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 391 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 392 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 393 */ "join_type ::=", - /* 394 */ "join_type ::= INNER", - /* 395 */ "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", - /* 396 */ "set_quantifier_opt ::=", - /* 397 */ "set_quantifier_opt ::= DISTINCT", - /* 398 */ "set_quantifier_opt ::= ALL", - /* 399 */ "select_list ::= NK_STAR", - /* 400 */ "select_list ::= select_sublist", - /* 401 */ "select_sublist ::= select_item", - /* 402 */ "select_sublist ::= select_sublist NK_COMMA select_item", - /* 403 */ "select_item ::= common_expression", - /* 404 */ "select_item ::= common_expression column_alias", - /* 405 */ "select_item ::= common_expression AS column_alias", - /* 406 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 407 */ "where_clause_opt ::=", - /* 408 */ "where_clause_opt ::= WHERE search_condition", - /* 409 */ "partition_by_clause_opt ::=", - /* 410 */ "partition_by_clause_opt ::= PARTITION BY expression_list", - /* 411 */ "twindow_clause_opt ::=", - /* 412 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 413 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", - /* 414 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 415 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 416 */ "sliding_opt ::=", - /* 417 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 418 */ "fill_opt ::=", - /* 419 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 420 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 421 */ "fill_mode ::= NONE", - /* 422 */ "fill_mode ::= PREV", - /* 423 */ "fill_mode ::= NULL", - /* 424 */ "fill_mode ::= LINEAR", - /* 425 */ "fill_mode ::= NEXT", - /* 426 */ "group_by_clause_opt ::=", - /* 427 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 428 */ "group_by_list ::= expression", - /* 429 */ "group_by_list ::= group_by_list NK_COMMA expression", - /* 430 */ "having_clause_opt ::=", - /* 431 */ "having_clause_opt ::= HAVING search_condition", - /* 432 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 433 */ "query_expression_body ::= query_primary", - /* 434 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", - /* 435 */ "query_expression_body ::= query_expression_body UNION query_expression_body", - /* 436 */ "query_primary ::= query_specification", - /* 437 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP", - /* 438 */ "order_by_clause_opt ::=", - /* 439 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 440 */ "slimit_clause_opt ::=", - /* 441 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 442 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 443 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 444 */ "limit_clause_opt ::=", - /* 445 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 446 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 447 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 448 */ "subquery ::= NK_LP query_expression NK_RP", - /* 449 */ "search_condition ::= common_expression", - /* 450 */ "sort_specification_list ::= sort_specification", - /* 451 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 452 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", - /* 453 */ "ordering_specification_opt ::=", - /* 454 */ "ordering_specification_opt ::= ASC", - /* 455 */ "ordering_specification_opt ::= DESC", - /* 456 */ "null_ordering_opt ::=", - /* 457 */ "null_ordering_opt ::= NULLS FIRST", - /* 458 */ "null_ordering_opt ::= NULLS LAST", + /* 212 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 213 */ "db_name_cond_opt ::=", + /* 214 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 215 */ "like_pattern_opt ::=", + /* 216 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 217 */ "table_name_cond ::= table_name", + /* 218 */ "from_db_opt ::=", + /* 219 */ "from_db_opt ::= FROM db_name", + /* 220 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options", + /* 221 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP", + /* 222 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name", + /* 223 */ "index_options ::=", + /* 224 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt", + /* 225 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt", + /* 226 */ "func_list ::= func", + /* 227 */ "func_list ::= func_list NK_COMMA func", + /* 228 */ "func ::= function_name NK_LP expression_list NK_RP", + /* 229 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression", + /* 230 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", + /* 231 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", + /* 232 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 233 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 234 */ "cmd ::= DESC full_table_name", + /* 235 */ "cmd ::= DESCRIBE full_table_name", + /* 236 */ "cmd ::= RESET QUERY CACHE", + /* 237 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", + /* 238 */ "analyze_opt ::=", + /* 239 */ "analyze_opt ::= ANALYZE", + /* 240 */ "explain_options ::=", + /* 241 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 242 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 243 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", + /* 244 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 245 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 246 */ "agg_func_opt ::=", + /* 247 */ "agg_func_opt ::= AGGREGATE", + /* 248 */ "bufsize_opt ::=", + /* 249 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 250 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", + /* 251 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 252 */ "into_opt ::=", + /* 253 */ "into_opt ::= INTO full_table_name", + /* 254 */ "stream_options ::=", + /* 255 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 256 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 257 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 258 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 259 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 260 */ "cmd ::= KILL QUERY NK_STRING", + /* 261 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 262 */ "cmd ::= BALANCE VGROUP", + /* 263 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 264 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 265 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 266 */ "dnode_list ::= DNODE NK_INTEGER", + /* 267 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 268 */ "cmd ::= SYNCDB db_name REPLICA", + /* 269 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 270 */ "cmd ::= query_expression", + /* 271 */ "literal ::= NK_INTEGER", + /* 272 */ "literal ::= NK_FLOAT", + /* 273 */ "literal ::= NK_STRING", + /* 274 */ "literal ::= NK_BOOL", + /* 275 */ "literal ::= TIMESTAMP NK_STRING", + /* 276 */ "literal ::= duration_literal", + /* 277 */ "literal ::= NULL", + /* 278 */ "literal ::= NK_QUESTION", + /* 279 */ "duration_literal ::= NK_VARIABLE", + /* 280 */ "signed ::= NK_INTEGER", + /* 281 */ "signed ::= NK_PLUS NK_INTEGER", + /* 282 */ "signed ::= NK_MINUS NK_INTEGER", + /* 283 */ "signed ::= NK_FLOAT", + /* 284 */ "signed ::= NK_PLUS NK_FLOAT", + /* 285 */ "signed ::= NK_MINUS NK_FLOAT", + /* 286 */ "signed_literal ::= signed", + /* 287 */ "signed_literal ::= NK_STRING", + /* 288 */ "signed_literal ::= NK_BOOL", + /* 289 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 290 */ "signed_literal ::= duration_literal", + /* 291 */ "signed_literal ::= NULL", + /* 292 */ "signed_literal ::= literal_func", + /* 293 */ "literal_list ::= signed_literal", + /* 294 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 295 */ "db_name ::= NK_ID", + /* 296 */ "table_name ::= NK_ID", + /* 297 */ "column_name ::= NK_ID", + /* 298 */ "function_name ::= NK_ID", + /* 299 */ "table_alias ::= NK_ID", + /* 300 */ "column_alias ::= NK_ID", + /* 301 */ "user_name ::= NK_ID", + /* 302 */ "index_name ::= NK_ID", + /* 303 */ "topic_name ::= NK_ID", + /* 304 */ "stream_name ::= NK_ID", + /* 305 */ "cgroup_name ::= NK_ID", + /* 306 */ "expression ::= literal", + /* 307 */ "expression ::= pseudo_column", + /* 308 */ "expression ::= column_reference", + /* 309 */ "expression ::= function_expression", + /* 310 */ "expression ::= subquery", + /* 311 */ "expression ::= NK_LP expression NK_RP", + /* 312 */ "expression ::= NK_PLUS expression", + /* 313 */ "expression ::= NK_MINUS expression", + /* 314 */ "expression ::= expression NK_PLUS expression", + /* 315 */ "expression ::= expression NK_MINUS expression", + /* 316 */ "expression ::= expression NK_STAR expression", + /* 317 */ "expression ::= expression NK_SLASH expression", + /* 318 */ "expression ::= expression NK_REM expression", + /* 319 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 320 */ "expression_list ::= expression", + /* 321 */ "expression_list ::= expression_list NK_COMMA expression", + /* 322 */ "column_reference ::= column_name", + /* 323 */ "column_reference ::= table_name NK_DOT column_name", + /* 324 */ "pseudo_column ::= ROWTS", + /* 325 */ "pseudo_column ::= TBNAME", + /* 326 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 327 */ "pseudo_column ::= QSTARTTS", + /* 328 */ "pseudo_column ::= QENDTS", + /* 329 */ "pseudo_column ::= WSTARTTS", + /* 330 */ "pseudo_column ::= WENDTS", + /* 331 */ "pseudo_column ::= WDURATION", + /* 332 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 333 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 334 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", + /* 335 */ "function_expression ::= literal_func", + /* 336 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 337 */ "literal_func ::= NOW", + /* 338 */ "noarg_func ::= NOW", + /* 339 */ "noarg_func ::= TODAY", + /* 340 */ "noarg_func ::= TIMEZONE", + /* 341 */ "star_func ::= COUNT", + /* 342 */ "star_func ::= FIRST", + /* 343 */ "star_func ::= LAST", + /* 344 */ "star_func ::= LAST_ROW", + /* 345 */ "star_func_para_list ::= NK_STAR", + /* 346 */ "star_func_para_list ::= other_para_list", + /* 347 */ "other_para_list ::= star_func_para", + /* 348 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 349 */ "star_func_para ::= expression", + /* 350 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 351 */ "predicate ::= expression compare_op expression", + /* 352 */ "predicate ::= expression BETWEEN expression AND expression", + /* 353 */ "predicate ::= expression NOT BETWEEN expression AND expression", + /* 354 */ "predicate ::= expression IS NULL", + /* 355 */ "predicate ::= expression IS NOT NULL", + /* 356 */ "predicate ::= expression in_op in_predicate_value", + /* 357 */ "compare_op ::= NK_LT", + /* 358 */ "compare_op ::= NK_GT", + /* 359 */ "compare_op ::= NK_LE", + /* 360 */ "compare_op ::= NK_GE", + /* 361 */ "compare_op ::= NK_NE", + /* 362 */ "compare_op ::= NK_EQ", + /* 363 */ "compare_op ::= LIKE", + /* 364 */ "compare_op ::= NOT LIKE", + /* 365 */ "compare_op ::= MATCH", + /* 366 */ "compare_op ::= NMATCH", + /* 367 */ "compare_op ::= CONTAINS", + /* 368 */ "in_op ::= IN", + /* 369 */ "in_op ::= NOT IN", + /* 370 */ "in_predicate_value ::= NK_LP expression_list NK_RP", + /* 371 */ "boolean_value_expression ::= boolean_primary", + /* 372 */ "boolean_value_expression ::= NOT boolean_primary", + /* 373 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 374 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 375 */ "boolean_primary ::= predicate", + /* 376 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 377 */ "common_expression ::= expression", + /* 378 */ "common_expression ::= boolean_value_expression", + /* 379 */ "from_clause ::= FROM table_reference_list", + /* 380 */ "table_reference_list ::= table_reference", + /* 381 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 382 */ "table_reference ::= table_primary", + /* 383 */ "table_reference ::= joined_table", + /* 384 */ "table_primary ::= table_name alias_opt", + /* 385 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 386 */ "table_primary ::= subquery alias_opt", + /* 387 */ "table_primary ::= parenthesized_joined_table", + /* 388 */ "alias_opt ::=", + /* 389 */ "alias_opt ::= table_alias", + /* 390 */ "alias_opt ::= AS table_alias", + /* 391 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 392 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 393 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 394 */ "join_type ::=", + /* 395 */ "join_type ::= INNER", + /* 396 */ "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", + /* 397 */ "set_quantifier_opt ::=", + /* 398 */ "set_quantifier_opt ::= DISTINCT", + /* 399 */ "set_quantifier_opt ::= ALL", + /* 400 */ "select_list ::= NK_STAR", + /* 401 */ "select_list ::= select_sublist", + /* 402 */ "select_sublist ::= select_item", + /* 403 */ "select_sublist ::= select_sublist NK_COMMA select_item", + /* 404 */ "select_item ::= common_expression", + /* 405 */ "select_item ::= common_expression column_alias", + /* 406 */ "select_item ::= common_expression AS column_alias", + /* 407 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 408 */ "where_clause_opt ::=", + /* 409 */ "where_clause_opt ::= WHERE search_condition", + /* 410 */ "partition_by_clause_opt ::=", + /* 411 */ "partition_by_clause_opt ::= PARTITION BY expression_list", + /* 412 */ "twindow_clause_opt ::=", + /* 413 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 414 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", + /* 415 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 416 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 417 */ "sliding_opt ::=", + /* 418 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 419 */ "fill_opt ::=", + /* 420 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 421 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 422 */ "fill_mode ::= NONE", + /* 423 */ "fill_mode ::= PREV", + /* 424 */ "fill_mode ::= NULL", + /* 425 */ "fill_mode ::= LINEAR", + /* 426 */ "fill_mode ::= NEXT", + /* 427 */ "group_by_clause_opt ::=", + /* 428 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 429 */ "group_by_list ::= expression", + /* 430 */ "group_by_list ::= group_by_list NK_COMMA expression", + /* 431 */ "having_clause_opt ::=", + /* 432 */ "having_clause_opt ::= HAVING search_condition", + /* 433 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 434 */ "query_expression_body ::= query_primary", + /* 435 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", + /* 436 */ "query_expression_body ::= query_expression_body UNION query_expression_body", + /* 437 */ "query_primary ::= query_specification", + /* 438 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP", + /* 439 */ "order_by_clause_opt ::=", + /* 440 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 441 */ "slimit_clause_opt ::=", + /* 442 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 443 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 444 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 445 */ "limit_clause_opt ::=", + /* 446 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 447 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 448 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 449 */ "subquery ::= NK_LP query_expression NK_RP", + /* 450 */ "search_condition ::= common_expression", + /* 451 */ "sort_specification_list ::= sort_specification", + /* 452 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 453 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", + /* 454 */ "ordering_specification_opt ::=", + /* 455 */ "ordering_specification_opt ::= ASC", + /* 456 */ "ordering_specification_opt ::= DESC", + /* 457 */ "null_ordering_opt ::=", + /* 458 */ "null_ordering_opt ::= NULLS FIRST", + /* 459 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2099,174 +2098,174 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 239: /* cmd */ - case 242: /* 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 282: /* duration_literal */ - case 283: /* rollup_func_name */ - case 285: /* col_name */ - case 286: /* db_name_cond_opt */ - case 287: /* like_pattern_opt */ - case 288: /* table_name_cond */ - case 289: /* from_db_opt */ - case 291: /* index_options */ - case 293: /* sliding_opt */ - case 294: /* func */ - case 297: /* query_expression */ - case 300: /* explain_options */ - case 304: /* stream_options */ - case 305: /* into_opt */ - case 307: /* where_clause_opt */ - case 308: /* signed */ - case 309: /* literal_func */ - case 312: /* expression */ - case 313: /* pseudo_column */ - case 314: /* column_reference */ - case 315: /* function_expression */ - case 316: /* subquery */ - case 321: /* star_func_para */ - case 322: /* predicate */ - case 325: /* in_predicate_value */ - case 326: /* boolean_value_expression */ - case 327: /* boolean_primary */ - case 328: /* common_expression */ - case 329: /* from_clause */ - case 330: /* table_reference_list */ - case 331: /* table_reference */ - case 332: /* table_primary */ - case 333: /* joined_table */ - case 335: /* parenthesized_joined_table */ - case 337: /* search_condition */ - case 338: /* query_specification */ - case 342: /* twindow_clause_opt */ - case 344: /* having_clause_opt */ - case 346: /* select_item */ - case 347: /* fill_opt */ - case 350: /* query_expression_body */ - case 352: /* slimit_clause_opt */ - case 353: /* limit_clause_opt */ - case 354: /* query_primary */ - case 356: /* sort_specification */ + case 240: /* cmd */ + case 243: /* literal */ + case 253: /* db_options */ + case 255: /* alter_db_options */ + case 260: /* retention */ + case 261: /* full_table_name */ + case 264: /* table_options */ + case 268: /* alter_table_clause */ + case 269: /* alter_table_options */ + case 272: /* signed_literal */ + case 273: /* create_subtable_clause */ + case 276: /* drop_table_clause */ + case 279: /* column_def */ + case 283: /* duration_literal */ + case 284: /* rollup_func_name */ + case 286: /* col_name */ + case 287: /* db_name_cond_opt */ + case 288: /* like_pattern_opt */ + case 289: /* table_name_cond */ + case 290: /* from_db_opt */ + case 292: /* index_options */ + case 294: /* sliding_opt */ + case 295: /* func */ + case 298: /* query_expression */ + case 301: /* explain_options */ + case 305: /* stream_options */ + case 306: /* into_opt */ + case 308: /* where_clause_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 343: /* twindow_clause_opt */ + case 345: /* having_clause_opt */ + case 347: /* select_item */ + case 348: /* fill_opt */ + case 351: /* query_expression_body */ + case 353: /* slimit_clause_opt */ + case 354: /* limit_clause_opt */ + case 355: /* query_primary */ + case 357: /* sort_specification */ { - nodesDestroyNode((yypminor->yy674)); + nodesDestroyNode((yypminor->yy632)); } break; - case 240: /* account_options */ - case 241: /* alter_account_options */ - case 243: /* alter_account_option */ - case 302: /* bufsize_opt */ + case 241: /* account_options */ + case 242: /* alter_account_options */ + case 244: /* alter_account_option */ + case 303: /* bufsize_opt */ { } break; - case 244: /* user_name */ - case 246: /* priv_level */ - case 249: /* db_name */ - case 250: /* dnode_endpoint */ - case 269: /* column_name */ - case 277: /* table_name */ - case 284: /* function_name */ - case 290: /* index_name */ - case 296: /* topic_name */ - case 298: /* cgroup_name */ - case 303: /* stream_name */ - case 310: /* table_alias */ - case 311: /* column_alias */ - case 317: /* star_func */ - case 319: /* noarg_func */ - case 334: /* alias_opt */ + case 245: /* user_name */ + case 247: /* priv_level */ + case 250: /* db_name */ + case 251: /* dnode_endpoint */ + case 270: /* column_name */ + case 278: /* table_name */ + case 285: /* function_name */ + case 291: /* index_name */ + case 297: /* topic_name */ + case 299: /* cgroup_name */ + case 304: /* stream_name */ + case 311: /* table_alias */ + case 312: /* column_alias */ + case 318: /* star_func */ + case 320: /* noarg_func */ + case 335: /* alias_opt */ { } break; - case 245: /* privileges */ - case 247: /* priv_type_list */ - case 248: /* 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 299: /* analyze_opt */ - case 301: /* agg_func_opt */ - case 339: /* set_quantifier_opt */ + case 252: /* not_exists_opt */ + case 254: /* exists_opt */ + case 300: /* analyze_opt */ + case 302: /* 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: /* duration_list */ - case 280: /* rollup_func_list */ - case 292: /* func_list */ - case 295: /* expression_list */ - case 306: /* dnode_list */ - case 318: /* star_func_para_list */ - case 320: /* other_para_list */ - case 340: /* select_list */ - case 341: /* partition_by_clause_opt */ - case 343: /* group_by_clause_opt */ - case 345: /* select_sublist */ - case 349: /* group_by_list */ - case 351: /* order_by_clause_opt */ - case 355: /* sort_specification_list */ + case 256: /* integer_list */ + case 257: /* variable_list */ + case 258: /* retention_list */ + case 262: /* column_def_list */ + case 263: /* tags_def_opt */ + case 265: /* multi_create_clause */ + case 266: /* tags_def */ + case 267: /* multi_drop_clause */ + case 274: /* specific_tags_opt */ + case 275: /* literal_list */ + case 277: /* col_name_list */ + case 280: /* duration_list */ + case 281: /* rollup_func_list */ + case 293: /* func_list */ + case 296: /* expression_list */ + case 307: /* dnode_list */ + case 319: /* star_func_para_list */ + case 321: /* other_para_list */ + case 341: /* select_list */ + case 342: /* partition_by_clause_opt */ + case 344: /* group_by_clause_opt */ + case 346: /* select_sublist */ + case 350: /* group_by_list */ + case 352: /* order_by_clause_opt */ + case 356: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy530)); + nodesDestroyList((yypminor->yy424)); } break; - case 258: /* alter_db_option */ - case 281: /* alter_table_option */ + case 259: /* alter_db_option */ + case 282: /* alter_table_option */ { } break; - case 270: /* type_name */ + case 271: /* type_name */ { } break; - case 323: /* compare_op */ - case 324: /* in_op */ + case 324: /* compare_op */ + case 325: /* in_op */ { } break; - case 336: /* join_type */ + case 337: /* join_type */ { } break; - case 348: /* fill_mode */ + case 349: /* fill_mode */ { } break; - case 357: /* ordering_specification_opt */ + case 358: /* ordering_specification_opt */ { } break; - case 358: /* null_ordering_opt */ + case 359: /* null_ordering_opt */ { } @@ -2565,465 +2564,466 @@ 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[] = { - { 239, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 239, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 240, 0 }, /* (2) account_options ::= */ - { 240, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 240, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 240, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 240, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 240, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 240, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 240, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 240, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 240, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 241, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 241, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 243, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 243, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 243, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 243, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 243, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 243, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 243, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 243, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 243, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 243, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 239, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ - { 239, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 239, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ - { 239, -3 }, /* (27) cmd ::= DROP USER user_name */ - { 239, -6 }, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ - { 239, -6 }, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - { 245, -1 }, /* (30) privileges ::= ALL */ - { 245, -1 }, /* (31) privileges ::= priv_type_list */ - { 247, -1 }, /* (32) priv_type_list ::= priv_type */ - { 247, -3 }, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - { 248, -1 }, /* (34) priv_type ::= READ */ - { 248, -1 }, /* (35) priv_type ::= WRITE */ - { 246, -3 }, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ - { 246, -3 }, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ - { 239, -3 }, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ - { 239, -5 }, /* (39) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - { 239, -3 }, /* (40) cmd ::= DROP DNODE NK_INTEGER */ - { 239, -3 }, /* (41) cmd ::= DROP DNODE dnode_endpoint */ - { 239, -4 }, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 239, -5 }, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 239, -4 }, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ - { 239, -5 }, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 250, -1 }, /* (46) dnode_endpoint ::= NK_STRING */ - { 250, -1 }, /* (47) dnode_endpoint ::= NK_ID */ - { 250, -1 }, /* (48) dnode_endpoint ::= NK_IPTOKEN */ - { 239, -3 }, /* (49) cmd ::= ALTER LOCAL NK_STRING */ - { 239, -4 }, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 239, -5 }, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 239, -5 }, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 239, -5 }, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - { 239, -5 }, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - { 239, -5 }, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - { 239, -5 }, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - { 239, -5 }, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - { 239, -5 }, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - { 239, -5 }, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 239, -4 }, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ - { 239, -2 }, /* (61) cmd ::= USE db_name */ - { 239, -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 DURATION NK_INTEGER */ - { 252, -3 }, /* (72) db_options ::= db_options DURATION 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 */ - { 252, -3 }, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ - { 254, -1 }, /* (88) alter_db_options ::= alter_db_option */ - { 254, -2 }, /* (89) alter_db_options ::= alter_db_options alter_db_option */ - { 258, -2 }, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ - { 258, -2 }, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ - { 258, -2 }, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ - { 258, -2 }, /* (93) alter_db_option ::= KEEP integer_list */ - { 258, -2 }, /* (94) alter_db_option ::= KEEP variable_list */ - { 258, -2 }, /* (95) alter_db_option ::= PAGES NK_INTEGER */ - { 258, -2 }, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ - { 258, -2 }, /* (97) alter_db_option ::= STRICT NK_INTEGER */ - { 258, -2 }, /* (98) alter_db_option ::= WAL NK_INTEGER */ - { 255, -1 }, /* (99) integer_list ::= NK_INTEGER */ - { 255, -3 }, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 256, -1 }, /* (101) variable_list ::= NK_VARIABLE */ - { 256, -3 }, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 257, -1 }, /* (103) retention_list ::= retention */ - { 257, -3 }, /* (104) retention_list ::= retention_list NK_COMMA retention */ - { 259, -3 }, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 239, -9 }, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 239, -3 }, /* (107) cmd ::= CREATE TABLE multi_create_clause */ - { 239, -9 }, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 239, -3 }, /* (109) cmd ::= DROP TABLE multi_drop_clause */ - { 239, -4 }, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ - { 239, -3 }, /* (111) cmd ::= ALTER TABLE alter_table_clause */ - { 239, -3 }, /* (112) cmd ::= ALTER STABLE alter_table_clause */ - { 267, -2 }, /* (113) alter_table_clause ::= full_table_name alter_table_options */ - { 267, -5 }, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 267, -4 }, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 267, -5 }, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 267, -5 }, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 267, -5 }, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 267, -4 }, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 267, -5 }, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 267, -5 }, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 267, -6 }, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 264, -1 }, /* (123) multi_create_clause ::= create_subtable_clause */ - { 264, -2 }, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 272, -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 */ - { 266, -1 }, /* (126) multi_drop_clause ::= drop_table_clause */ - { 266, -2 }, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 275, -2 }, /* (128) drop_table_clause ::= exists_opt full_table_name */ - { 273, 0 }, /* (129) specific_tags_opt ::= */ - { 273, -3 }, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ - { 260, -1 }, /* (131) full_table_name ::= table_name */ - { 260, -3 }, /* (132) full_table_name ::= db_name NK_DOT table_name */ - { 261, -1 }, /* (133) column_def_list ::= column_def */ - { 261, -3 }, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ - { 278, -2 }, /* (135) column_def ::= column_name type_name */ - { 278, -4 }, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ - { 270, -1 }, /* (137) type_name ::= BOOL */ - { 270, -1 }, /* (138) type_name ::= TINYINT */ - { 270, -1 }, /* (139) type_name ::= SMALLINT */ - { 270, -1 }, /* (140) type_name ::= INT */ - { 270, -1 }, /* (141) type_name ::= INTEGER */ - { 270, -1 }, /* (142) type_name ::= BIGINT */ - { 270, -1 }, /* (143) type_name ::= FLOAT */ - { 270, -1 }, /* (144) type_name ::= DOUBLE */ - { 270, -4 }, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 270, -1 }, /* (146) type_name ::= TIMESTAMP */ - { 270, -4 }, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 270, -2 }, /* (148) type_name ::= TINYINT UNSIGNED */ - { 270, -2 }, /* (149) type_name ::= SMALLINT UNSIGNED */ - { 270, -2 }, /* (150) type_name ::= INT UNSIGNED */ - { 270, -2 }, /* (151) type_name ::= BIGINT UNSIGNED */ - { 270, -1 }, /* (152) type_name ::= JSON */ - { 270, -4 }, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 270, -1 }, /* (154) type_name ::= MEDIUMBLOB */ - { 270, -1 }, /* (155) type_name ::= BLOB */ - { 270, -4 }, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 270, -1 }, /* (157) type_name ::= DECIMAL */ - { 270, -4 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 270, -6 }, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 262, 0 }, /* (160) tags_def_opt ::= */ - { 262, -1 }, /* (161) tags_def_opt ::= tags_def */ - { 265, -4 }, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 263, 0 }, /* (163) table_options ::= */ - { 263, -3 }, /* (164) table_options ::= table_options COMMENT NK_STRING */ - { 263, -3 }, /* (165) table_options ::= table_options MAX_DELAY duration_list */ - { 263, -3 }, /* (166) table_options ::= table_options WATERMARK duration_list */ - { 263, -5 }, /* (167) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - { 263, -3 }, /* (168) table_options ::= table_options TTL NK_INTEGER */ - { 263, -5 }, /* (169) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 268, -1 }, /* (170) alter_table_options ::= alter_table_option */ - { 268, -2 }, /* (171) alter_table_options ::= alter_table_options alter_table_option */ - { 281, -2 }, /* (172) alter_table_option ::= COMMENT NK_STRING */ - { 281, -2 }, /* (173) alter_table_option ::= TTL NK_INTEGER */ - { 279, -1 }, /* (174) duration_list ::= duration_literal */ - { 279, -3 }, /* (175) duration_list ::= duration_list NK_COMMA duration_literal */ - { 280, -1 }, /* (176) rollup_func_list ::= rollup_func_name */ - { 280, -3 }, /* (177) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - { 283, -1 }, /* (178) rollup_func_name ::= function_name */ - { 283, -1 }, /* (179) rollup_func_name ::= FIRST */ - { 283, -1 }, /* (180) rollup_func_name ::= LAST */ - { 276, -1 }, /* (181) col_name_list ::= col_name */ - { 276, -3 }, /* (182) col_name_list ::= col_name_list NK_COMMA col_name */ - { 285, -1 }, /* (183) col_name ::= column_name */ - { 239, -2 }, /* (184) cmd ::= SHOW DNODES */ - { 239, -2 }, /* (185) cmd ::= SHOW USERS */ - { 239, -2 }, /* (186) cmd ::= SHOW DATABASES */ - { 239, -4 }, /* (187) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 239, -4 }, /* (188) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 239, -3 }, /* (189) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 239, -2 }, /* (190) cmd ::= SHOW MNODES */ - { 239, -2 }, /* (191) cmd ::= SHOW MODULES */ - { 239, -2 }, /* (192) cmd ::= SHOW QNODES */ - { 239, -2 }, /* (193) cmd ::= SHOW FUNCTIONS */ - { 239, -5 }, /* (194) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 239, -2 }, /* (195) cmd ::= SHOW STREAMS */ - { 239, -2 }, /* (196) cmd ::= SHOW ACCOUNTS */ - { 239, -2 }, /* (197) cmd ::= SHOW APPS */ - { 239, -2 }, /* (198) cmd ::= SHOW CONNECTIONS */ - { 239, -2 }, /* (199) cmd ::= SHOW LICENCE */ - { 239, -2 }, /* (200) cmd ::= SHOW GRANTS */ - { 239, -4 }, /* (201) cmd ::= SHOW CREATE DATABASE db_name */ - { 239, -4 }, /* (202) cmd ::= SHOW CREATE TABLE full_table_name */ - { 239, -4 }, /* (203) cmd ::= SHOW CREATE STABLE full_table_name */ - { 239, -2 }, /* (204) cmd ::= SHOW QUERIES */ - { 239, -2 }, /* (205) cmd ::= SHOW SCORES */ - { 239, -2 }, /* (206) cmd ::= SHOW TOPICS */ - { 239, -2 }, /* (207) cmd ::= SHOW VARIABLES */ - { 239, -2 }, /* (208) cmd ::= SHOW BNODES */ - { 239, -2 }, /* (209) cmd ::= SHOW SNODES */ - { 239, -2 }, /* (210) cmd ::= SHOW CLUSTER */ - { 239, -2 }, /* (211) cmd ::= SHOW TRANSACTIONS */ - { 286, 0 }, /* (212) db_name_cond_opt ::= */ - { 286, -2 }, /* (213) db_name_cond_opt ::= db_name NK_DOT */ - { 287, 0 }, /* (214) like_pattern_opt ::= */ - { 287, -2 }, /* (215) like_pattern_opt ::= LIKE NK_STRING */ - { 288, -1 }, /* (216) table_name_cond ::= table_name */ - { 289, 0 }, /* (217) from_db_opt ::= */ - { 289, -2 }, /* (218) from_db_opt ::= FROM db_name */ - { 239, -8 }, /* (219) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ - { 239, -10 }, /* (220) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ - { 239, -6 }, /* (221) cmd ::= DROP INDEX exists_opt index_name ON table_name */ - { 291, 0 }, /* (222) index_options ::= */ - { 291, -9 }, /* (223) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ - { 291, -11 }, /* (224) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ - { 292, -1 }, /* (225) func_list ::= func */ - { 292, -3 }, /* (226) func_list ::= func_list NK_COMMA func */ - { 294, -4 }, /* (227) func ::= function_name NK_LP expression_list NK_RP */ - { 239, -6 }, /* (228) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ - { 239, -7 }, /* (229) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 239, -7 }, /* (230) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 239, -4 }, /* (231) cmd ::= DROP TOPIC exists_opt topic_name */ - { 239, -7 }, /* (232) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 239, -2 }, /* (233) cmd ::= DESC full_table_name */ - { 239, -2 }, /* (234) cmd ::= DESCRIBE full_table_name */ - { 239, -3 }, /* (235) cmd ::= RESET QUERY CACHE */ - { 239, -4 }, /* (236) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ - { 299, 0 }, /* (237) analyze_opt ::= */ - { 299, -1 }, /* (238) analyze_opt ::= ANALYZE */ - { 300, 0 }, /* (239) explain_options ::= */ - { 300, -3 }, /* (240) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 300, -3 }, /* (241) explain_options ::= explain_options RATIO NK_FLOAT */ - { 239, -6 }, /* (242) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ - { 239, -10 }, /* (243) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 239, -4 }, /* (244) cmd ::= DROP FUNCTION exists_opt function_name */ - { 301, 0 }, /* (245) agg_func_opt ::= */ - { 301, -1 }, /* (246) agg_func_opt ::= AGGREGATE */ - { 302, 0 }, /* (247) bufsize_opt ::= */ - { 302, -2 }, /* (248) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 239, -8 }, /* (249) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ - { 239, -4 }, /* (250) cmd ::= DROP STREAM exists_opt stream_name */ - { 305, 0 }, /* (251) into_opt ::= */ - { 305, -2 }, /* (252) into_opt ::= INTO full_table_name */ - { 304, 0 }, /* (253) stream_options ::= */ - { 304, -3 }, /* (254) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 304, -3 }, /* (255) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 304, -4 }, /* (256) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - { 304, -3 }, /* (257) stream_options ::= stream_options WATERMARK duration_literal */ - { 239, -3 }, /* (258) cmd ::= KILL CONNECTION NK_INTEGER */ - { 239, -3 }, /* (259) cmd ::= KILL QUERY NK_STRING */ - { 239, -3 }, /* (260) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 239, -2 }, /* (261) cmd ::= BALANCE VGROUP */ - { 239, -4 }, /* (262) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 239, -4 }, /* (263) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 239, -3 }, /* (264) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 306, -2 }, /* (265) dnode_list ::= DNODE NK_INTEGER */ - { 306, -3 }, /* (266) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 239, -3 }, /* (267) cmd ::= SYNCDB db_name REPLICA */ - { 239, -4 }, /* (268) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 239, -1 }, /* (269) cmd ::= query_expression */ - { 242, -1 }, /* (270) literal ::= NK_INTEGER */ - { 242, -1 }, /* (271) literal ::= NK_FLOAT */ - { 242, -1 }, /* (272) literal ::= NK_STRING */ - { 242, -1 }, /* (273) literal ::= NK_BOOL */ - { 242, -2 }, /* (274) literal ::= TIMESTAMP NK_STRING */ - { 242, -1 }, /* (275) literal ::= duration_literal */ - { 242, -1 }, /* (276) literal ::= NULL */ - { 242, -1 }, /* (277) literal ::= NK_QUESTION */ - { 282, -1 }, /* (278) duration_literal ::= NK_VARIABLE */ - { 308, -1 }, /* (279) signed ::= NK_INTEGER */ - { 308, -2 }, /* (280) signed ::= NK_PLUS NK_INTEGER */ - { 308, -2 }, /* (281) signed ::= NK_MINUS NK_INTEGER */ - { 308, -1 }, /* (282) signed ::= NK_FLOAT */ - { 308, -2 }, /* (283) signed ::= NK_PLUS NK_FLOAT */ - { 308, -2 }, /* (284) signed ::= NK_MINUS NK_FLOAT */ - { 271, -1 }, /* (285) signed_literal ::= signed */ - { 271, -1 }, /* (286) signed_literal ::= NK_STRING */ - { 271, -1 }, /* (287) signed_literal ::= NK_BOOL */ - { 271, -2 }, /* (288) signed_literal ::= TIMESTAMP NK_STRING */ - { 271, -1 }, /* (289) signed_literal ::= duration_literal */ - { 271, -1 }, /* (290) signed_literal ::= NULL */ - { 271, -1 }, /* (291) signed_literal ::= literal_func */ - { 274, -1 }, /* (292) literal_list ::= signed_literal */ - { 274, -3 }, /* (293) literal_list ::= literal_list NK_COMMA signed_literal */ - { 249, -1 }, /* (294) db_name ::= NK_ID */ - { 277, -1 }, /* (295) table_name ::= NK_ID */ - { 269, -1 }, /* (296) column_name ::= NK_ID */ - { 284, -1 }, /* (297) function_name ::= NK_ID */ - { 310, -1 }, /* (298) table_alias ::= NK_ID */ - { 311, -1 }, /* (299) column_alias ::= NK_ID */ - { 244, -1 }, /* (300) user_name ::= NK_ID */ - { 290, -1 }, /* (301) index_name ::= NK_ID */ - { 296, -1 }, /* (302) topic_name ::= NK_ID */ - { 303, -1 }, /* (303) stream_name ::= NK_ID */ - { 298, -1 }, /* (304) cgroup_name ::= NK_ID */ - { 312, -1 }, /* (305) expression ::= literal */ - { 312, -1 }, /* (306) expression ::= pseudo_column */ - { 312, -1 }, /* (307) expression ::= column_reference */ - { 312, -1 }, /* (308) expression ::= function_expression */ - { 312, -1 }, /* (309) expression ::= subquery */ - { 312, -3 }, /* (310) expression ::= NK_LP expression NK_RP */ - { 312, -2 }, /* (311) expression ::= NK_PLUS expression */ - { 312, -2 }, /* (312) expression ::= NK_MINUS expression */ - { 312, -3 }, /* (313) expression ::= expression NK_PLUS expression */ - { 312, -3 }, /* (314) expression ::= expression NK_MINUS expression */ - { 312, -3 }, /* (315) expression ::= expression NK_STAR expression */ - { 312, -3 }, /* (316) expression ::= expression NK_SLASH expression */ - { 312, -3 }, /* (317) expression ::= expression NK_REM expression */ - { 312, -3 }, /* (318) expression ::= column_reference NK_ARROW NK_STRING */ - { 295, -1 }, /* (319) expression_list ::= expression */ - { 295, -3 }, /* (320) expression_list ::= expression_list NK_COMMA expression */ - { 314, -1 }, /* (321) column_reference ::= column_name */ - { 314, -3 }, /* (322) column_reference ::= table_name NK_DOT column_name */ - { 313, -1 }, /* (323) pseudo_column ::= ROWTS */ - { 313, -1 }, /* (324) pseudo_column ::= TBNAME */ - { 313, -3 }, /* (325) pseudo_column ::= table_name NK_DOT TBNAME */ - { 313, -1 }, /* (326) pseudo_column ::= QSTARTTS */ - { 313, -1 }, /* (327) pseudo_column ::= QENDTS */ - { 313, -1 }, /* (328) pseudo_column ::= WSTARTTS */ - { 313, -1 }, /* (329) pseudo_column ::= WENDTS */ - { 313, -1 }, /* (330) pseudo_column ::= WDURATION */ - { 315, -4 }, /* (331) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 315, -4 }, /* (332) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 315, -6 }, /* (333) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ - { 315, -1 }, /* (334) function_expression ::= literal_func */ - { 309, -3 }, /* (335) literal_func ::= noarg_func NK_LP NK_RP */ - { 309, -1 }, /* (336) literal_func ::= NOW */ - { 319, -1 }, /* (337) noarg_func ::= NOW */ - { 319, -1 }, /* (338) noarg_func ::= TODAY */ - { 319, -1 }, /* (339) noarg_func ::= TIMEZONE */ - { 317, -1 }, /* (340) star_func ::= COUNT */ - { 317, -1 }, /* (341) star_func ::= FIRST */ - { 317, -1 }, /* (342) star_func ::= LAST */ - { 317, -1 }, /* (343) star_func ::= LAST_ROW */ - { 318, -1 }, /* (344) star_func_para_list ::= NK_STAR */ - { 318, -1 }, /* (345) star_func_para_list ::= other_para_list */ - { 320, -1 }, /* (346) other_para_list ::= star_func_para */ - { 320, -3 }, /* (347) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 321, -1 }, /* (348) star_func_para ::= expression */ - { 321, -3 }, /* (349) star_func_para ::= table_name NK_DOT NK_STAR */ - { 322, -3 }, /* (350) predicate ::= expression compare_op expression */ - { 322, -5 }, /* (351) predicate ::= expression BETWEEN expression AND expression */ - { 322, -6 }, /* (352) predicate ::= expression NOT BETWEEN expression AND expression */ - { 322, -3 }, /* (353) predicate ::= expression IS NULL */ - { 322, -4 }, /* (354) predicate ::= expression IS NOT NULL */ - { 322, -3 }, /* (355) predicate ::= expression in_op in_predicate_value */ - { 323, -1 }, /* (356) compare_op ::= NK_LT */ - { 323, -1 }, /* (357) compare_op ::= NK_GT */ - { 323, -1 }, /* (358) compare_op ::= NK_LE */ - { 323, -1 }, /* (359) compare_op ::= NK_GE */ - { 323, -1 }, /* (360) compare_op ::= NK_NE */ - { 323, -1 }, /* (361) compare_op ::= NK_EQ */ - { 323, -1 }, /* (362) compare_op ::= LIKE */ - { 323, -2 }, /* (363) compare_op ::= NOT LIKE */ - { 323, -1 }, /* (364) compare_op ::= MATCH */ - { 323, -1 }, /* (365) compare_op ::= NMATCH */ - { 323, -1 }, /* (366) compare_op ::= CONTAINS */ - { 324, -1 }, /* (367) in_op ::= IN */ - { 324, -2 }, /* (368) in_op ::= NOT IN */ - { 325, -3 }, /* (369) in_predicate_value ::= NK_LP expression_list NK_RP */ - { 326, -1 }, /* (370) boolean_value_expression ::= boolean_primary */ - { 326, -2 }, /* (371) boolean_value_expression ::= NOT boolean_primary */ - { 326, -3 }, /* (372) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 326, -3 }, /* (373) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 327, -1 }, /* (374) boolean_primary ::= predicate */ - { 327, -3 }, /* (375) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 328, -1 }, /* (376) common_expression ::= expression */ - { 328, -1 }, /* (377) common_expression ::= boolean_value_expression */ - { 329, -2 }, /* (378) from_clause ::= FROM table_reference_list */ - { 330, -1 }, /* (379) table_reference_list ::= table_reference */ - { 330, -3 }, /* (380) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 331, -1 }, /* (381) table_reference ::= table_primary */ - { 331, -1 }, /* (382) table_reference ::= joined_table */ - { 332, -2 }, /* (383) table_primary ::= table_name alias_opt */ - { 332, -4 }, /* (384) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 332, -2 }, /* (385) table_primary ::= subquery alias_opt */ - { 332, -1 }, /* (386) table_primary ::= parenthesized_joined_table */ - { 334, 0 }, /* (387) alias_opt ::= */ - { 334, -1 }, /* (388) alias_opt ::= table_alias */ - { 334, -2 }, /* (389) alias_opt ::= AS table_alias */ - { 335, -3 }, /* (390) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 335, -3 }, /* (391) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 333, -6 }, /* (392) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 336, 0 }, /* (393) join_type ::= */ - { 336, -1 }, /* (394) join_type ::= INNER */ - { 338, -9 }, /* (395) 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 */ - { 339, 0 }, /* (396) set_quantifier_opt ::= */ - { 339, -1 }, /* (397) set_quantifier_opt ::= DISTINCT */ - { 339, -1 }, /* (398) set_quantifier_opt ::= ALL */ - { 340, -1 }, /* (399) select_list ::= NK_STAR */ - { 340, -1 }, /* (400) select_list ::= select_sublist */ - { 345, -1 }, /* (401) select_sublist ::= select_item */ - { 345, -3 }, /* (402) select_sublist ::= select_sublist NK_COMMA select_item */ - { 346, -1 }, /* (403) select_item ::= common_expression */ - { 346, -2 }, /* (404) select_item ::= common_expression column_alias */ - { 346, -3 }, /* (405) select_item ::= common_expression AS column_alias */ - { 346, -3 }, /* (406) select_item ::= table_name NK_DOT NK_STAR */ - { 307, 0 }, /* (407) where_clause_opt ::= */ - { 307, -2 }, /* (408) where_clause_opt ::= WHERE search_condition */ - { 341, 0 }, /* (409) partition_by_clause_opt ::= */ - { 341, -3 }, /* (410) partition_by_clause_opt ::= PARTITION BY expression_list */ - { 342, 0 }, /* (411) twindow_clause_opt ::= */ - { 342, -6 }, /* (412) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 342, -4 }, /* (413) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ - { 342, -6 }, /* (414) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 342, -8 }, /* (415) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 293, 0 }, /* (416) sliding_opt ::= */ - { 293, -4 }, /* (417) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 347, 0 }, /* (418) fill_opt ::= */ - { 347, -4 }, /* (419) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 347, -6 }, /* (420) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 348, -1 }, /* (421) fill_mode ::= NONE */ - { 348, -1 }, /* (422) fill_mode ::= PREV */ - { 348, -1 }, /* (423) fill_mode ::= NULL */ - { 348, -1 }, /* (424) fill_mode ::= LINEAR */ - { 348, -1 }, /* (425) fill_mode ::= NEXT */ - { 343, 0 }, /* (426) group_by_clause_opt ::= */ - { 343, -3 }, /* (427) group_by_clause_opt ::= GROUP BY group_by_list */ - { 349, -1 }, /* (428) group_by_list ::= expression */ - { 349, -3 }, /* (429) group_by_list ::= group_by_list NK_COMMA expression */ - { 344, 0 }, /* (430) having_clause_opt ::= */ - { 344, -2 }, /* (431) having_clause_opt ::= HAVING search_condition */ - { 297, -4 }, /* (432) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 350, -1 }, /* (433) query_expression_body ::= query_primary */ - { 350, -4 }, /* (434) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ - { 350, -3 }, /* (435) query_expression_body ::= query_expression_body UNION query_expression_body */ - { 354, -1 }, /* (436) query_primary ::= query_specification */ - { 354, -6 }, /* (437) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ - { 351, 0 }, /* (438) order_by_clause_opt ::= */ - { 351, -3 }, /* (439) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 352, 0 }, /* (440) slimit_clause_opt ::= */ - { 352, -2 }, /* (441) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 352, -4 }, /* (442) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 352, -4 }, /* (443) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 353, 0 }, /* (444) limit_clause_opt ::= */ - { 353, -2 }, /* (445) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 353, -4 }, /* (446) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 353, -4 }, /* (447) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 316, -3 }, /* (448) subquery ::= NK_LP query_expression NK_RP */ - { 337, -1 }, /* (449) search_condition ::= common_expression */ - { 355, -1 }, /* (450) sort_specification_list ::= sort_specification */ - { 355, -3 }, /* (451) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 356, -3 }, /* (452) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ - { 357, 0 }, /* (453) ordering_specification_opt ::= */ - { 357, -1 }, /* (454) ordering_specification_opt ::= ASC */ - { 357, -1 }, /* (455) ordering_specification_opt ::= DESC */ - { 358, 0 }, /* (456) null_ordering_opt ::= */ - { 358, -2 }, /* (457) null_ordering_opt ::= NULLS FIRST */ - { 358, -2 }, /* (458) 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_endpoint 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 */ + { 251, -1 }, /* (47) dnode_endpoint ::= NK_ID */ + { 251, -1 }, /* (48) dnode_endpoint ::= 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 */ + { 252, -3 }, /* (63) not_exists_opt ::= IF NOT EXISTS */ + { 252, 0 }, /* (64) not_exists_opt ::= */ + { 254, -2 }, /* (65) exists_opt ::= IF EXISTS */ + { 254, 0 }, /* (66) exists_opt ::= */ + { 253, 0 }, /* (67) db_options ::= */ + { 253, -3 }, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ + { 253, -3 }, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ + { 253, -3 }, /* (70) db_options ::= db_options COMP NK_INTEGER */ + { 253, -3 }, /* (71) db_options ::= db_options DURATION NK_INTEGER */ + { 253, -3 }, /* (72) db_options ::= db_options DURATION NK_VARIABLE */ + { 253, -3 }, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ + { 253, -3 }, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ + { 253, -3 }, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ + { 253, -3 }, /* (76) db_options ::= db_options KEEP integer_list */ + { 253, -3 }, /* (77) db_options ::= db_options KEEP variable_list */ + { 253, -3 }, /* (78) db_options ::= db_options PAGES NK_INTEGER */ + { 253, -3 }, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ + { 253, -3 }, /* (80) db_options ::= db_options PRECISION NK_STRING */ + { 253, -3 }, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ + { 253, -3 }, /* (82) db_options ::= db_options STRICT NK_INTEGER */ + { 253, -3 }, /* (83) db_options ::= db_options WAL NK_INTEGER */ + { 253, -3 }, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ + { 253, -3 }, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 253, -3 }, /* (86) db_options ::= db_options RETENTIONS retention_list */ + { 253, -3 }, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ + { 255, -1 }, /* (88) alter_db_options ::= alter_db_option */ + { 255, -2 }, /* (89) alter_db_options ::= alter_db_options alter_db_option */ + { 259, -2 }, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ + { 259, -2 }, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ + { 259, -2 }, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ + { 259, -2 }, /* (93) alter_db_option ::= KEEP integer_list */ + { 259, -2 }, /* (94) alter_db_option ::= KEEP variable_list */ + { 259, -2 }, /* (95) alter_db_option ::= PAGES NK_INTEGER */ + { 259, -2 }, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ + { 259, -2 }, /* (97) alter_db_option ::= STRICT NK_INTEGER */ + { 259, -2 }, /* (98) alter_db_option ::= WAL NK_INTEGER */ + { 256, -1 }, /* (99) integer_list ::= NK_INTEGER */ + { 256, -3 }, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 257, -1 }, /* (101) variable_list ::= NK_VARIABLE */ + { 257, -3 }, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 258, -1 }, /* (103) retention_list ::= retention */ + { 258, -3 }, /* (104) retention_list ::= retention_list NK_COMMA retention */ + { 260, -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 */ + { 268, -2 }, /* (113) alter_table_clause ::= full_table_name alter_table_options */ + { 268, -5 }, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 268, -4 }, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 268, -5 }, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 268, -5 }, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 268, -5 }, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 268, -4 }, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 268, -5 }, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 268, -5 }, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 268, -6 }, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 265, -1 }, /* (123) multi_create_clause ::= create_subtable_clause */ + { 265, -2 }, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 273, -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 */ + { 267, -1 }, /* (126) multi_drop_clause ::= drop_table_clause */ + { 267, -2 }, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 276, -2 }, /* (128) drop_table_clause ::= exists_opt full_table_name */ + { 274, 0 }, /* (129) specific_tags_opt ::= */ + { 274, -3 }, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ + { 261, -1 }, /* (131) full_table_name ::= table_name */ + { 261, -3 }, /* (132) full_table_name ::= db_name NK_DOT table_name */ + { 262, -1 }, /* (133) column_def_list ::= column_def */ + { 262, -3 }, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ + { 279, -2 }, /* (135) column_def ::= column_name type_name */ + { 279, -4 }, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ + { 271, -1 }, /* (137) type_name ::= BOOL */ + { 271, -1 }, /* (138) type_name ::= TINYINT */ + { 271, -1 }, /* (139) type_name ::= SMALLINT */ + { 271, -1 }, /* (140) type_name ::= INT */ + { 271, -1 }, /* (141) type_name ::= INTEGER */ + { 271, -1 }, /* (142) type_name ::= BIGINT */ + { 271, -1 }, /* (143) type_name ::= FLOAT */ + { 271, -1 }, /* (144) type_name ::= DOUBLE */ + { 271, -4 }, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 271, -1 }, /* (146) type_name ::= TIMESTAMP */ + { 271, -4 }, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 271, -2 }, /* (148) type_name ::= TINYINT UNSIGNED */ + { 271, -2 }, /* (149) type_name ::= SMALLINT UNSIGNED */ + { 271, -2 }, /* (150) type_name ::= INT UNSIGNED */ + { 271, -2 }, /* (151) type_name ::= BIGINT UNSIGNED */ + { 271, -1 }, /* (152) type_name ::= JSON */ + { 271, -4 }, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 271, -1 }, /* (154) type_name ::= MEDIUMBLOB */ + { 271, -1 }, /* (155) type_name ::= BLOB */ + { 271, -4 }, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 271, -1 }, /* (157) type_name ::= DECIMAL */ + { 271, -4 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 271, -6 }, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 263, 0 }, /* (160) tags_def_opt ::= */ + { 263, -1 }, /* (161) tags_def_opt ::= tags_def */ + { 266, -4 }, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 264, 0 }, /* (163) table_options ::= */ + { 264, -3 }, /* (164) table_options ::= table_options COMMENT NK_STRING */ + { 264, -3 }, /* (165) table_options ::= table_options MAX_DELAY duration_list */ + { 264, -3 }, /* (166) table_options ::= table_options WATERMARK duration_list */ + { 264, -5 }, /* (167) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + { 264, -3 }, /* (168) table_options ::= table_options TTL NK_INTEGER */ + { 264, -5 }, /* (169) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 269, -1 }, /* (170) alter_table_options ::= alter_table_option */ + { 269, -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 */ + { 280, -1 }, /* (174) duration_list ::= duration_literal */ + { 280, -3 }, /* (175) duration_list ::= duration_list NK_COMMA duration_literal */ + { 281, -1 }, /* (176) rollup_func_list ::= rollup_func_name */ + { 281, -3 }, /* (177) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + { 284, -1 }, /* (178) rollup_func_name ::= function_name */ + { 284, -1 }, /* (179) rollup_func_name ::= FIRST */ + { 284, -1 }, /* (180) rollup_func_name ::= LAST */ + { 277, -1 }, /* (181) col_name_list ::= col_name */ + { 277, -3 }, /* (182) col_name_list ::= col_name_list NK_COMMA col_name */ + { 286, -1 }, /* (183) col_name ::= column_name */ + { 240, -2 }, /* (184) cmd ::= SHOW DNODES */ + { 240, -2 }, /* (185) cmd ::= SHOW USERS */ + { 240, -2 }, /* (186) cmd ::= SHOW DATABASES */ + { 240, -4 }, /* (187) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 240, -4 }, /* (188) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 240, -3 }, /* (189) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 240, -2 }, /* (190) cmd ::= SHOW MNODES */ + { 240, -2 }, /* (191) cmd ::= SHOW MODULES */ + { 240, -2 }, /* (192) cmd ::= SHOW QNODES */ + { 240, -2 }, /* (193) cmd ::= SHOW FUNCTIONS */ + { 240, -5 }, /* (194) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 240, -2 }, /* (195) cmd ::= SHOW STREAMS */ + { 240, -2 }, /* (196) cmd ::= SHOW ACCOUNTS */ + { 240, -2 }, /* (197) cmd ::= SHOW APPS */ + { 240, -2 }, /* (198) cmd ::= SHOW CONNECTIONS */ + { 240, -2 }, /* (199) cmd ::= SHOW LICENCE */ + { 240, -2 }, /* (200) cmd ::= SHOW GRANTS */ + { 240, -4 }, /* (201) cmd ::= SHOW CREATE DATABASE db_name */ + { 240, -4 }, /* (202) cmd ::= SHOW CREATE TABLE full_table_name */ + { 240, -4 }, /* (203) cmd ::= SHOW CREATE STABLE full_table_name */ + { 240, -2 }, /* (204) cmd ::= SHOW QUERIES */ + { 240, -2 }, /* (205) cmd ::= SHOW SCORES */ + { 240, -2 }, /* (206) cmd ::= SHOW TOPICS */ + { 240, -2 }, /* (207) cmd ::= SHOW VARIABLES */ + { 240, -2 }, /* (208) cmd ::= SHOW BNODES */ + { 240, -2 }, /* (209) cmd ::= SHOW SNODES */ + { 240, -2 }, /* (210) cmd ::= SHOW CLUSTER */ + { 240, -2 }, /* (211) cmd ::= SHOW TRANSACTIONS */ + { 240, -4 }, /* (212) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + { 287, 0 }, /* (213) db_name_cond_opt ::= */ + { 287, -2 }, /* (214) db_name_cond_opt ::= db_name NK_DOT */ + { 288, 0 }, /* (215) like_pattern_opt ::= */ + { 288, -2 }, /* (216) like_pattern_opt ::= LIKE NK_STRING */ + { 289, -1 }, /* (217) table_name_cond ::= table_name */ + { 290, 0 }, /* (218) from_db_opt ::= */ + { 290, -2 }, /* (219) from_db_opt ::= FROM db_name */ + { 240, -8 }, /* (220) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ + { 240, -10 }, /* (221) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ + { 240, -6 }, /* (222) cmd ::= DROP INDEX exists_opt index_name ON table_name */ + { 292, 0 }, /* (223) index_options ::= */ + { 292, -9 }, /* (224) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ + { 292, -11 }, /* (225) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ + { 293, -1 }, /* (226) func_list ::= func */ + { 293, -3 }, /* (227) func_list ::= func_list NK_COMMA func */ + { 295, -4 }, /* (228) func ::= function_name NK_LP expression_list NK_RP */ + { 240, -6 }, /* (229) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ + { 240, -7 }, /* (230) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 240, -7 }, /* (231) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 240, -4 }, /* (232) cmd ::= DROP TOPIC exists_opt topic_name */ + { 240, -7 }, /* (233) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 240, -2 }, /* (234) cmd ::= DESC full_table_name */ + { 240, -2 }, /* (235) cmd ::= DESCRIBE full_table_name */ + { 240, -3 }, /* (236) cmd ::= RESET QUERY CACHE */ + { 240, -4 }, /* (237) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ + { 300, 0 }, /* (238) analyze_opt ::= */ + { 300, -1 }, /* (239) analyze_opt ::= ANALYZE */ + { 301, 0 }, /* (240) explain_options ::= */ + { 301, -3 }, /* (241) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 301, -3 }, /* (242) explain_options ::= explain_options RATIO NK_FLOAT */ + { 240, -6 }, /* (243) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ + { 240, -10 }, /* (244) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 240, -4 }, /* (245) cmd ::= DROP FUNCTION exists_opt function_name */ + { 302, 0 }, /* (246) agg_func_opt ::= */ + { 302, -1 }, /* (247) agg_func_opt ::= AGGREGATE */ + { 303, 0 }, /* (248) bufsize_opt ::= */ + { 303, -2 }, /* (249) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 240, -8 }, /* (250) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ + { 240, -4 }, /* (251) cmd ::= DROP STREAM exists_opt stream_name */ + { 306, 0 }, /* (252) into_opt ::= */ + { 306, -2 }, /* (253) into_opt ::= INTO full_table_name */ + { 305, 0 }, /* (254) stream_options ::= */ + { 305, -3 }, /* (255) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 305, -3 }, /* (256) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 305, -4 }, /* (257) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + { 305, -3 }, /* (258) stream_options ::= stream_options WATERMARK duration_literal */ + { 240, -3 }, /* (259) cmd ::= KILL CONNECTION NK_INTEGER */ + { 240, -3 }, /* (260) cmd ::= KILL QUERY NK_STRING */ + { 240, -3 }, /* (261) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 240, -2 }, /* (262) cmd ::= BALANCE VGROUP */ + { 240, -4 }, /* (263) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 240, -4 }, /* (264) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 240, -3 }, /* (265) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 307, -2 }, /* (266) dnode_list ::= DNODE NK_INTEGER */ + { 307, -3 }, /* (267) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 240, -3 }, /* (268) cmd ::= SYNCDB db_name REPLICA */ + { 240, -4 }, /* (269) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 240, -1 }, /* (270) cmd ::= query_expression */ + { 243, -1 }, /* (271) literal ::= NK_INTEGER */ + { 243, -1 }, /* (272) literal ::= NK_FLOAT */ + { 243, -1 }, /* (273) literal ::= NK_STRING */ + { 243, -1 }, /* (274) literal ::= NK_BOOL */ + { 243, -2 }, /* (275) literal ::= TIMESTAMP NK_STRING */ + { 243, -1 }, /* (276) literal ::= duration_literal */ + { 243, -1 }, /* (277) literal ::= NULL */ + { 243, -1 }, /* (278) literal ::= NK_QUESTION */ + { 283, -1 }, /* (279) duration_literal ::= NK_VARIABLE */ + { 309, -1 }, /* (280) signed ::= NK_INTEGER */ + { 309, -2 }, /* (281) signed ::= NK_PLUS NK_INTEGER */ + { 309, -2 }, /* (282) signed ::= NK_MINUS NK_INTEGER */ + { 309, -1 }, /* (283) signed ::= NK_FLOAT */ + { 309, -2 }, /* (284) signed ::= NK_PLUS NK_FLOAT */ + { 309, -2 }, /* (285) signed ::= NK_MINUS NK_FLOAT */ + { 272, -1 }, /* (286) signed_literal ::= signed */ + { 272, -1 }, /* (287) signed_literal ::= NK_STRING */ + { 272, -1 }, /* (288) signed_literal ::= NK_BOOL */ + { 272, -2 }, /* (289) signed_literal ::= TIMESTAMP NK_STRING */ + { 272, -1 }, /* (290) signed_literal ::= duration_literal */ + { 272, -1 }, /* (291) signed_literal ::= NULL */ + { 272, -1 }, /* (292) signed_literal ::= literal_func */ + { 275, -1 }, /* (293) literal_list ::= signed_literal */ + { 275, -3 }, /* (294) literal_list ::= literal_list NK_COMMA signed_literal */ + { 250, -1 }, /* (295) db_name ::= NK_ID */ + { 278, -1 }, /* (296) table_name ::= NK_ID */ + { 270, -1 }, /* (297) column_name ::= NK_ID */ + { 285, -1 }, /* (298) function_name ::= NK_ID */ + { 311, -1 }, /* (299) table_alias ::= NK_ID */ + { 312, -1 }, /* (300) column_alias ::= NK_ID */ + { 245, -1 }, /* (301) user_name ::= NK_ID */ + { 291, -1 }, /* (302) index_name ::= NK_ID */ + { 297, -1 }, /* (303) topic_name ::= NK_ID */ + { 304, -1 }, /* (304) stream_name ::= NK_ID */ + { 299, -1 }, /* (305) cgroup_name ::= NK_ID */ + { 313, -1 }, /* (306) expression ::= literal */ + { 313, -1 }, /* (307) expression ::= pseudo_column */ + { 313, -1 }, /* (308) expression ::= column_reference */ + { 313, -1 }, /* (309) expression ::= function_expression */ + { 313, -1 }, /* (310) expression ::= subquery */ + { 313, -3 }, /* (311) expression ::= NK_LP expression NK_RP */ + { 313, -2 }, /* (312) expression ::= NK_PLUS expression */ + { 313, -2 }, /* (313) expression ::= NK_MINUS expression */ + { 313, -3 }, /* (314) expression ::= expression NK_PLUS expression */ + { 313, -3 }, /* (315) expression ::= expression NK_MINUS expression */ + { 313, -3 }, /* (316) expression ::= expression NK_STAR expression */ + { 313, -3 }, /* (317) expression ::= expression NK_SLASH expression */ + { 313, -3 }, /* (318) expression ::= expression NK_REM expression */ + { 313, -3 }, /* (319) expression ::= column_reference NK_ARROW NK_STRING */ + { 296, -1 }, /* (320) expression_list ::= expression */ + { 296, -3 }, /* (321) expression_list ::= expression_list NK_COMMA expression */ + { 315, -1 }, /* (322) column_reference ::= column_name */ + { 315, -3 }, /* (323) column_reference ::= table_name NK_DOT column_name */ + { 314, -1 }, /* (324) pseudo_column ::= ROWTS */ + { 314, -1 }, /* (325) pseudo_column ::= TBNAME */ + { 314, -3 }, /* (326) pseudo_column ::= table_name NK_DOT TBNAME */ + { 314, -1 }, /* (327) pseudo_column ::= QSTARTTS */ + { 314, -1 }, /* (328) pseudo_column ::= QENDTS */ + { 314, -1 }, /* (329) pseudo_column ::= WSTARTTS */ + { 314, -1 }, /* (330) pseudo_column ::= WENDTS */ + { 314, -1 }, /* (331) pseudo_column ::= WDURATION */ + { 316, -4 }, /* (332) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 316, -4 }, /* (333) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 316, -6 }, /* (334) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ + { 316, -1 }, /* (335) function_expression ::= literal_func */ + { 310, -3 }, /* (336) literal_func ::= noarg_func NK_LP NK_RP */ + { 310, -1 }, /* (337) literal_func ::= NOW */ + { 320, -1 }, /* (338) noarg_func ::= NOW */ + { 320, -1 }, /* (339) noarg_func ::= TODAY */ + { 320, -1 }, /* (340) noarg_func ::= TIMEZONE */ + { 318, -1 }, /* (341) star_func ::= COUNT */ + { 318, -1 }, /* (342) star_func ::= FIRST */ + { 318, -1 }, /* (343) star_func ::= LAST */ + { 318, -1 }, /* (344) star_func ::= LAST_ROW */ + { 319, -1 }, /* (345) star_func_para_list ::= NK_STAR */ + { 319, -1 }, /* (346) star_func_para_list ::= other_para_list */ + { 321, -1 }, /* (347) other_para_list ::= star_func_para */ + { 321, -3 }, /* (348) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 322, -1 }, /* (349) star_func_para ::= expression */ + { 322, -3 }, /* (350) star_func_para ::= table_name NK_DOT NK_STAR */ + { 323, -3 }, /* (351) predicate ::= expression compare_op expression */ + { 323, -5 }, /* (352) predicate ::= expression BETWEEN expression AND expression */ + { 323, -6 }, /* (353) predicate ::= expression NOT BETWEEN expression AND expression */ + { 323, -3 }, /* (354) predicate ::= expression IS NULL */ + { 323, -4 }, /* (355) predicate ::= expression IS NOT NULL */ + { 323, -3 }, /* (356) predicate ::= expression in_op in_predicate_value */ + { 324, -1 }, /* (357) compare_op ::= NK_LT */ + { 324, -1 }, /* (358) compare_op ::= NK_GT */ + { 324, -1 }, /* (359) compare_op ::= NK_LE */ + { 324, -1 }, /* (360) compare_op ::= NK_GE */ + { 324, -1 }, /* (361) compare_op ::= NK_NE */ + { 324, -1 }, /* (362) compare_op ::= NK_EQ */ + { 324, -1 }, /* (363) compare_op ::= LIKE */ + { 324, -2 }, /* (364) compare_op ::= NOT LIKE */ + { 324, -1 }, /* (365) compare_op ::= MATCH */ + { 324, -1 }, /* (366) compare_op ::= NMATCH */ + { 324, -1 }, /* (367) compare_op ::= CONTAINS */ + { 325, -1 }, /* (368) in_op ::= IN */ + { 325, -2 }, /* (369) in_op ::= NOT IN */ + { 326, -3 }, /* (370) in_predicate_value ::= NK_LP expression_list NK_RP */ + { 327, -1 }, /* (371) boolean_value_expression ::= boolean_primary */ + { 327, -2 }, /* (372) boolean_value_expression ::= NOT boolean_primary */ + { 327, -3 }, /* (373) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 327, -3 }, /* (374) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 328, -1 }, /* (375) boolean_primary ::= predicate */ + { 328, -3 }, /* (376) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 329, -1 }, /* (377) common_expression ::= expression */ + { 329, -1 }, /* (378) common_expression ::= boolean_value_expression */ + { 330, -2 }, /* (379) from_clause ::= FROM table_reference_list */ + { 331, -1 }, /* (380) table_reference_list ::= table_reference */ + { 331, -3 }, /* (381) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 332, -1 }, /* (382) table_reference ::= table_primary */ + { 332, -1 }, /* (383) table_reference ::= joined_table */ + { 333, -2 }, /* (384) table_primary ::= table_name alias_opt */ + { 333, -4 }, /* (385) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 333, -2 }, /* (386) table_primary ::= subquery alias_opt */ + { 333, -1 }, /* (387) table_primary ::= parenthesized_joined_table */ + { 335, 0 }, /* (388) alias_opt ::= */ + { 335, -1 }, /* (389) alias_opt ::= table_alias */ + { 335, -2 }, /* (390) alias_opt ::= AS table_alias */ + { 336, -3 }, /* (391) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 336, -3 }, /* (392) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 334, -6 }, /* (393) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 337, 0 }, /* (394) join_type ::= */ + { 337, -1 }, /* (395) join_type ::= INNER */ + { 339, -9 }, /* (396) 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 }, /* (397) set_quantifier_opt ::= */ + { 340, -1 }, /* (398) set_quantifier_opt ::= DISTINCT */ + { 340, -1 }, /* (399) set_quantifier_opt ::= ALL */ + { 341, -1 }, /* (400) select_list ::= NK_STAR */ + { 341, -1 }, /* (401) select_list ::= select_sublist */ + { 346, -1 }, /* (402) select_sublist ::= select_item */ + { 346, -3 }, /* (403) select_sublist ::= select_sublist NK_COMMA select_item */ + { 347, -1 }, /* (404) select_item ::= common_expression */ + { 347, -2 }, /* (405) select_item ::= common_expression column_alias */ + { 347, -3 }, /* (406) select_item ::= common_expression AS column_alias */ + { 347, -3 }, /* (407) select_item ::= table_name NK_DOT NK_STAR */ + { 308, 0 }, /* (408) where_clause_opt ::= */ + { 308, -2 }, /* (409) where_clause_opt ::= WHERE search_condition */ + { 342, 0 }, /* (410) partition_by_clause_opt ::= */ + { 342, -3 }, /* (411) partition_by_clause_opt ::= PARTITION BY expression_list */ + { 343, 0 }, /* (412) twindow_clause_opt ::= */ + { 343, -6 }, /* (413) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 343, -4 }, /* (414) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ + { 343, -6 }, /* (415) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 343, -8 }, /* (416) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 294, 0 }, /* (417) sliding_opt ::= */ + { 294, -4 }, /* (418) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 348, 0 }, /* (419) fill_opt ::= */ + { 348, -4 }, /* (420) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 348, -6 }, /* (421) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 349, -1 }, /* (422) fill_mode ::= NONE */ + { 349, -1 }, /* (423) fill_mode ::= PREV */ + { 349, -1 }, /* (424) fill_mode ::= NULL */ + { 349, -1 }, /* (425) fill_mode ::= LINEAR */ + { 349, -1 }, /* (426) fill_mode ::= NEXT */ + { 344, 0 }, /* (427) group_by_clause_opt ::= */ + { 344, -3 }, /* (428) group_by_clause_opt ::= GROUP BY group_by_list */ + { 350, -1 }, /* (429) group_by_list ::= expression */ + { 350, -3 }, /* (430) group_by_list ::= group_by_list NK_COMMA expression */ + { 345, 0 }, /* (431) having_clause_opt ::= */ + { 345, -2 }, /* (432) having_clause_opt ::= HAVING search_condition */ + { 298, -4 }, /* (433) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 351, -1 }, /* (434) query_expression_body ::= query_primary */ + { 351, -4 }, /* (435) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ + { 351, -3 }, /* (436) query_expression_body ::= query_expression_body UNION query_expression_body */ + { 355, -1 }, /* (437) query_primary ::= query_specification */ + { 355, -6 }, /* (438) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ + { 352, 0 }, /* (439) order_by_clause_opt ::= */ + { 352, -3 }, /* (440) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 353, 0 }, /* (441) slimit_clause_opt ::= */ + { 353, -2 }, /* (442) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 353, -4 }, /* (443) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 353, -4 }, /* (444) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 354, 0 }, /* (445) limit_clause_opt ::= */ + { 354, -2 }, /* (446) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 354, -4 }, /* (447) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 354, -4 }, /* (448) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 317, -3 }, /* (449) subquery ::= NK_LP query_expression NK_RP */ + { 338, -1 }, /* (450) search_condition ::= common_expression */ + { 356, -1 }, /* (451) sort_specification_list ::= sort_specification */ + { 356, -3 }, /* (452) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 357, -3 }, /* (453) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ + { 358, 0 }, /* (454) ordering_specification_opt ::= */ + { 358, -1 }, /* (455) ordering_specification_opt ::= ASC */ + { 358, -1 }, /* (456) ordering_specification_opt ::= DESC */ + { 359, 0 }, /* (457) null_ordering_opt ::= */ + { 359, -2 }, /* (458) null_ordering_opt ::= NULLS FIRST */ + { 359, -2 }, /* (459) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3112,11 +3112,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,240,&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,241,&yymsp[0].minor); + yy_destructor(yypParser,242,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3130,20 +3130,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,240,&yymsp[-2].minor); +{ yy_destructor(yypParser,241,&yymsp[-2].minor); { } - yy_destructor(yypParser,242,&yymsp[0].minor); + yy_destructor(yypParser,243,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,243,&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,241,&yymsp[-1].minor); +{ yy_destructor(yypParser,242,&yymsp[-1].minor); { } - yy_destructor(yypParser,243,&yymsp[0].minor); + yy_destructor(yypParser,244,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3157,63 +3157,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,242,&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.yy421, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy421, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy209, 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.yy421, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy209, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy421); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy209); } break; case 28: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy669, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy189, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209); } break; case 29: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy669, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy189, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209); } break; case 30: /* privileges ::= ALL */ -{ yymsp[0].minor.yy669 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy189 = PRIVILEGE_TYPE_ALL; } break; case 31: /* privileges ::= priv_type_list */ case 32: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==32); -{ yylhsminor.yy669 = yymsp[0].minor.yy669; } - yymsp[0].minor.yy669 = yylhsminor.yy669; +{ yylhsminor.yy189 = yymsp[0].minor.yy189; } + yymsp[0].minor.yy189 = yylhsminor.yy189; break; case 33: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy669 = yymsp[-2].minor.yy669 | yymsp[0].minor.yy669; } - yymsp[-2].minor.yy669 = yylhsminor.yy669; +{ yylhsminor.yy189 = yymsp[-2].minor.yy189 | yymsp[0].minor.yy189; } + yymsp[-2].minor.yy189 = yylhsminor.yy189; break; case 34: /* priv_type ::= READ */ -{ yymsp[0].minor.yy669 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy189 = PRIVILEGE_TYPE_READ; } break; case 35: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy669 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy189 = PRIVILEGE_TYPE_WRITE; } break; case 36: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy421 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy421 = yylhsminor.yy421; +{ yylhsminor.yy209 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy209 = yylhsminor.yy209; break; case 37: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy421 = yymsp[-2].minor.yy421; } - yymsp[-2].minor.yy421 = yylhsminor.yy421; +{ yylhsminor.yy209 = yymsp[-2].minor.yy209; } + yymsp[-2].minor.yy209 = yylhsminor.yy209; break; case 38: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy421, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy209, NULL); } break; case 39: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy209, &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.yy421); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy209); } break; case 42: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3230,26 +3230,26 @@ static YYACTIONTYPE yy_reduce( case 46: /* dnode_endpoint ::= NK_STRING */ case 47: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==47); case 48: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==48); - case 294: /* db_name ::= NK_ID */ yytestcase(yyruleno==294); - case 295: /* table_name ::= NK_ID */ yytestcase(yyruleno==295); - case 296: /* column_name ::= NK_ID */ yytestcase(yyruleno==296); - case 297: /* function_name ::= NK_ID */ yytestcase(yyruleno==297); - case 298: /* table_alias ::= NK_ID */ yytestcase(yyruleno==298); - case 299: /* column_alias ::= NK_ID */ yytestcase(yyruleno==299); - case 300: /* user_name ::= NK_ID */ yytestcase(yyruleno==300); - case 301: /* index_name ::= NK_ID */ yytestcase(yyruleno==301); - case 302: /* topic_name ::= NK_ID */ yytestcase(yyruleno==302); - case 303: /* stream_name ::= NK_ID */ yytestcase(yyruleno==303); - case 304: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==304); - case 337: /* noarg_func ::= NOW */ yytestcase(yyruleno==337); - case 338: /* noarg_func ::= TODAY */ yytestcase(yyruleno==338); - case 339: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==339); - case 340: /* star_func ::= COUNT */ yytestcase(yyruleno==340); - case 341: /* star_func ::= FIRST */ yytestcase(yyruleno==341); - case 342: /* star_func ::= LAST */ yytestcase(yyruleno==342); - case 343: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==343); -{ yylhsminor.yy421 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy421 = yylhsminor.yy421; + case 295: /* db_name ::= NK_ID */ yytestcase(yyruleno==295); + case 296: /* table_name ::= NK_ID */ yytestcase(yyruleno==296); + case 297: /* column_name ::= NK_ID */ yytestcase(yyruleno==297); + case 298: /* function_name ::= NK_ID */ yytestcase(yyruleno==298); + case 299: /* table_alias ::= NK_ID */ yytestcase(yyruleno==299); + case 300: /* column_alias ::= NK_ID */ yytestcase(yyruleno==300); + case 301: /* user_name ::= NK_ID */ yytestcase(yyruleno==301); + case 302: /* index_name ::= NK_ID */ yytestcase(yyruleno==302); + case 303: /* topic_name ::= NK_ID */ yytestcase(yyruleno==303); + case 304: /* stream_name ::= NK_ID */ yytestcase(yyruleno==304); + case 305: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==305); + case 338: /* noarg_func ::= NOW */ yytestcase(yyruleno==338); + case 339: /* noarg_func ::= TODAY */ yytestcase(yyruleno==339); + case 340: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==340); + case 341: /* star_func ::= COUNT */ yytestcase(yyruleno==341); + case 342: /* star_func ::= FIRST */ yytestcase(yyruleno==342); + case 343: /* star_func ::= LAST */ yytestcase(yyruleno==343); + case 344: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==344); +{ yylhsminor.yy209 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy209 = yylhsminor.yy209; break; case 49: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3282,156 +3282,156 @@ 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.yy621, &yymsp[-1].minor.yy421, yymsp[0].minor.yy674); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy137, &yymsp[-1].minor.yy209, yymsp[0].minor.yy632); } break; case 60: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy209); } break; case 61: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy421); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy209); } break; case 62: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy421, yymsp[0].minor.yy674); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy209, yymsp[0].minor.yy632); } break; case 63: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy621 = true; } +{ yymsp[-2].minor.yy137 = true; } break; case 64: /* not_exists_opt ::= */ case 66: /* exists_opt ::= */ yytestcase(yyruleno==66); - case 237: /* analyze_opt ::= */ yytestcase(yyruleno==237); - case 245: /* agg_func_opt ::= */ yytestcase(yyruleno==245); - case 396: /* set_quantifier_opt ::= */ yytestcase(yyruleno==396); -{ yymsp[1].minor.yy621 = false; } + case 238: /* analyze_opt ::= */ yytestcase(yyruleno==238); + case 246: /* agg_func_opt ::= */ yytestcase(yyruleno==246); + case 397: /* set_quantifier_opt ::= */ yytestcase(yyruleno==397); +{ yymsp[1].minor.yy137 = false; } break; case 65: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy621 = true; } +{ yymsp[-1].minor.yy137 = true; } break; case 67: /* db_options ::= */ -{ yymsp[1].minor.yy674 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy632 = createDefaultDatabaseOptions(pCxt); } break; case 68: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 69: /* db_options ::= db_options CACHELAST NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 70: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 71: /* db_options ::= db_options DURATION NK_INTEGER */ case 72: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==72); -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 73: /* db_options ::= db_options FSYNC NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 74: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 75: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 76: /* db_options ::= db_options KEEP integer_list */ case 77: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==77); -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_KEEP, yymsp[0].minor.yy530); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_KEEP, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 78: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 79: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 80: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 81: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 82: /* db_options ::= db_options STRICT NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 83: /* db_options ::= db_options WAL NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 84: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 85: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 86: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_RETENTIONS, yymsp[0].minor.yy530); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_RETENTIONS, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 87: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 88: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy674 = createAlterDatabaseOptions(pCxt); yylhsminor.yy674 = setAlterDatabaseOption(pCxt, yylhsminor.yy674, &yymsp[0].minor.yy557); } - yymsp[0].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterDatabaseOptions(pCxt); yylhsminor.yy632 = setAlterDatabaseOption(pCxt, yylhsminor.yy632, &yymsp[0].minor.yy605); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 89: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy674 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy674, &yymsp[0].minor.yy557); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy632, &yymsp[0].minor.yy605); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; case 90: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy557.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 91: /* alter_db_option ::= CACHELAST NK_INTEGER */ -{ yymsp[-1].minor.yy557.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 92: /* alter_db_option ::= FSYNC NK_INTEGER */ -{ yymsp[-1].minor.yy557.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy605.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.yy557.type = DB_OPTION_KEEP; yymsp[-1].minor.yy557.pList = yymsp[0].minor.yy530; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_KEEP; yymsp[-1].minor.yy605.pList = yymsp[0].minor.yy424; } break; case 95: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy557.type = DB_OPTION_PAGES; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_PAGES; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 96: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy557.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 97: /* alter_db_option ::= STRICT NK_INTEGER */ -{ yymsp[-1].minor.yy557.type = DB_OPTION_STRICT; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_STRICT; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 98: /* alter_db_option ::= WAL NK_INTEGER */ -{ yymsp[-1].minor.yy557.type = DB_OPTION_WAL; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_WAL; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 99: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy530 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy530 = yylhsminor.yy530; +{ yylhsminor.yy424 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 100: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 266: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==266); -{ yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy530 = yylhsminor.yy530; + case 267: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==267); +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 101: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy530 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy530 = yylhsminor.yy530; +{ yylhsminor.yy424 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 102: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy530 = yylhsminor.yy530; +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 103: /* retention_list ::= retention */ case 123: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==123); @@ -3439,1009 +3439,1012 @@ static YYACTIONTYPE yy_reduce( case 133: /* column_def_list ::= column_def */ yytestcase(yyruleno==133); case 176: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==176); case 181: /* col_name_list ::= col_name */ yytestcase(yyruleno==181); - case 225: /* func_list ::= func */ yytestcase(yyruleno==225); - case 292: /* literal_list ::= signed_literal */ yytestcase(yyruleno==292); - case 346: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==346); - case 401: /* select_sublist ::= select_item */ yytestcase(yyruleno==401); - case 450: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==450); -{ yylhsminor.yy530 = createNodeList(pCxt, yymsp[0].minor.yy674); } - yymsp[0].minor.yy530 = yylhsminor.yy530; + case 226: /* func_list ::= func */ yytestcase(yyruleno==226); + case 293: /* literal_list ::= signed_literal */ yytestcase(yyruleno==293); + case 347: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==347); + case 402: /* select_sublist ::= select_item */ yytestcase(yyruleno==402); + case 451: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==451); +{ yylhsminor.yy424 = createNodeList(pCxt, yymsp[0].minor.yy632); } + yymsp[0].minor.yy424 = yylhsminor.yy424; 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 177: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==177); case 182: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==182); - case 226: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==226); - case 293: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==293); - case 347: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==347); - case 402: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==402); - case 451: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==451); -{ yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, yymsp[0].minor.yy674); } - yymsp[-2].minor.yy530 = yylhsminor.yy530; + case 227: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==227); + case 294: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==294); + case 348: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==348); + case 403: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==403); + case 452: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==452); +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, yymsp[0].minor.yy632); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 105: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy674 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; 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.yy621, yymsp[-5].minor.yy674, yymsp[-3].minor.yy530, yymsp[-1].minor.yy530, yymsp[0].minor.yy674); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy137, yymsp[-5].minor.yy632, yymsp[-3].minor.yy424, yymsp[-1].minor.yy424, yymsp[0].minor.yy632); } break; case 107: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy530); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy424); } break; case 109: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy530); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy424); } break; case 110: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy621, yymsp[0].minor.yy674); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy137, yymsp[0].minor.yy632); } break; case 111: /* cmd ::= ALTER TABLE alter_table_clause */ case 112: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==112); - case 269: /* cmd ::= query_expression */ yytestcase(yyruleno==269); -{ pCxt->pRootNode = yymsp[0].minor.yy674; } + case 270: /* cmd ::= query_expression */ yytestcase(yyruleno==270); +{ pCxt->pRootNode = yymsp[0].minor.yy632; } break; case 113: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy674 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy632, yymsp[0].minor.yy632); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; case 114: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); } - yymsp[-4].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy209, yymsp[0].minor.yy304); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 115: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy674 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy674, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy421); } - yymsp[-3].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy632, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy209); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; case 116: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); } - yymsp[-4].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy209, yymsp[0].minor.yy304); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 117: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy674 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); } - yymsp[-4].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy209, &yymsp[0].minor.yy209); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 118: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); } - yymsp[-4].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy209, yymsp[0].minor.yy304); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 119: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy674 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy674, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy421); } - yymsp[-3].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy632, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy209); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; case 120: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); } - yymsp[-4].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy209, yymsp[0].minor.yy304); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 121: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy674 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); } - yymsp[-4].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy209, &yymsp[0].minor.yy209); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 122: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy674 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy674, &yymsp[-2].minor.yy421, yymsp[0].minor.yy674); } - yymsp[-5].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy632, &yymsp[-2].minor.yy209, yymsp[0].minor.yy632); } + yymsp[-5].minor.yy632 = yylhsminor.yy632; break; 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.yy530 = addNodeToList(pCxt, yymsp[-1].minor.yy530, yymsp[0].minor.yy674); } - yymsp[-1].minor.yy530 = yylhsminor.yy530; +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-1].minor.yy424, yymsp[0].minor.yy632); } + yymsp[-1].minor.yy424 = yylhsminor.yy424; break; 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.yy674 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy621, yymsp[-8].minor.yy674, yymsp[-6].minor.yy674, yymsp[-5].minor.yy530, yymsp[-2].minor.yy530, yymsp[0].minor.yy674); } - yymsp[-9].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy137, yymsp[-8].minor.yy632, yymsp[-6].minor.yy632, yymsp[-5].minor.yy424, yymsp[-2].minor.yy424, yymsp[0].minor.yy632); } + yymsp[-9].minor.yy632 = yylhsminor.yy632; break; case 128: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy674 = createDropTableClause(pCxt, yymsp[-1].minor.yy621, yymsp[0].minor.yy674); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createDropTableClause(pCxt, yymsp[-1].minor.yy137, yymsp[0].minor.yy632); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; case 129: /* specific_tags_opt ::= */ case 160: /* tags_def_opt ::= */ yytestcase(yyruleno==160); - case 409: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==409); - case 426: /* group_by_clause_opt ::= */ yytestcase(yyruleno==426); - case 438: /* order_by_clause_opt ::= */ yytestcase(yyruleno==438); -{ yymsp[1].minor.yy530 = NULL; } + case 410: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==410); + case 427: /* group_by_clause_opt ::= */ yytestcase(yyruleno==427); + case 439: /* order_by_clause_opt ::= */ yytestcase(yyruleno==439); +{ yymsp[1].minor.yy424 = NULL; } break; case 130: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy530 = yymsp[-1].minor.yy530; } +{ yymsp[-2].minor.yy424 = yymsp[-1].minor.yy424; } break; case 131: /* full_table_name ::= table_name */ -{ yylhsminor.yy674 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy421, NULL); } - yymsp[0].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy209, NULL); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 132: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy674 = createRealTableNode(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421, NULL); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createRealTableNode(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209, NULL); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 135: /* column_def ::= column_name type_name */ -{ yylhsminor.yy674 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690, NULL); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy209, yymsp[0].minor.yy304, NULL); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; case 136: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy674 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy421, yymsp[-2].minor.yy690, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy209, yymsp[-2].minor.yy304, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; case 137: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 138: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 139: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 140: /* type_name ::= INT */ case 141: /* type_name ::= INTEGER */ yytestcase(yyruleno==141); -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_INT); } break; case 142: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 143: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 144: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 145: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 146: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 147: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 148: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 149: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 150: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 151: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 152: /* type_name ::= JSON */ -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 153: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 154: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 155: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 156: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 157: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 158: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy690 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 159: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy690 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 161: /* tags_def_opt ::= tags_def */ - case 345: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==345); - case 400: /* select_list ::= select_sublist */ yytestcase(yyruleno==400); -{ yylhsminor.yy530 = yymsp[0].minor.yy530; } - yymsp[0].minor.yy530 = yylhsminor.yy530; + case 346: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==346); + case 401: /* select_list ::= select_sublist */ yytestcase(yyruleno==401); +{ yylhsminor.yy424 = yymsp[0].minor.yy424; } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 162: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy530 = yymsp[-1].minor.yy530; } +{ yymsp[-3].minor.yy424 = yymsp[-1].minor.yy424; } break; case 163: /* table_options ::= */ -{ yymsp[1].minor.yy674 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy632 = createDefaultTableOptions(pCxt); } break; case 164: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-2].minor.yy632, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 165: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy530); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-2].minor.yy632, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 166: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy530); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-2].minor.yy632, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 167: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-4].minor.yy674, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy530); } - yymsp[-4].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-4].minor.yy632, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy424); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 168: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-2].minor.yy632, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 169: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-4].minor.yy674, TABLE_OPTION_SMA, yymsp[-1].minor.yy530); } - yymsp[-4].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-4].minor.yy632, TABLE_OPTION_SMA, yymsp[-1].minor.yy424); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 170: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy674 = createAlterTableOptions(pCxt); yylhsminor.yy674 = setTableOption(pCxt, yylhsminor.yy674, yymsp[0].minor.yy557.type, &yymsp[0].minor.yy557.val); } - yymsp[0].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createAlterTableOptions(pCxt); yylhsminor.yy632 = setTableOption(pCxt, yylhsminor.yy632, yymsp[0].minor.yy605.type, &yymsp[0].minor.yy605.val); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 171: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-1].minor.yy674, yymsp[0].minor.yy557.type, &yymsp[0].minor.yy557.val); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-1].minor.yy632, yymsp[0].minor.yy605.type, &yymsp[0].minor.yy605.val); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; case 172: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy557.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 173: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy557.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 174: /* duration_list ::= duration_literal */ - case 319: /* expression_list ::= expression */ yytestcase(yyruleno==319); -{ yylhsminor.yy530 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy674)); } - yymsp[0].minor.yy530 = yylhsminor.yy530; + case 320: /* expression_list ::= expression */ yytestcase(yyruleno==320); +{ yylhsminor.yy424 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy632)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 175: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 320: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==320); -{ yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, releaseRawExprNode(pCxt, yymsp[0].minor.yy674)); } - yymsp[-2].minor.yy530 = yylhsminor.yy530; + case 321: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==321); +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, releaseRawExprNode(pCxt, yymsp[0].minor.yy632)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 178: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy674 = createFunctionNode(pCxt, &yymsp[0].minor.yy421, NULL); } - yymsp[0].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createFunctionNode(pCxt, &yymsp[0].minor.yy209, NULL); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 179: /* rollup_func_name ::= FIRST */ case 180: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==180); -{ yylhsminor.yy674 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 183: /* col_name ::= column_name */ -{ yylhsminor.yy674 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy421); } - yymsp[0].minor.yy674 = yylhsminor.yy674; +{ yylhsminor.yy632 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy209); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 184: /* cmd ::= SHOW DNODES */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } break; case 185: /* cmd ::= SHOW USERS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } break; case 186: /* cmd ::= SHOW DATABASES */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; case 187: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy632, yymsp[0].minor.yy632, OP_TYPE_LIKE); } break; case 188: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy632, yymsp[0].minor.yy632, OP_TYPE_LIKE); } break; case 189: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy674, NULL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy632, NULL, OP_TYPE_LIKE); } break; case 190: /* cmd ::= SHOW MNODES */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } break; case 191: /* cmd ::= SHOW MODULES */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT); } break; case 192: /* cmd ::= SHOW QNODES */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } break; case 193: /* cmd ::= SHOW FUNCTIONS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; case 194: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy632, yymsp[-1].minor.yy632, OP_TYPE_EQUAL); } break; case 195: /* cmd ::= SHOW STREAMS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } break; case 196: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; case 197: /* cmd ::= SHOW APPS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } break; case 198: /* cmd ::= SHOW CONNECTIONS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } break; case 199: /* cmd ::= SHOW LICENCE */ case 200: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==200); -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT); } break; case 201: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy421); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy209); } break; case 202: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy674); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy632); } break; case 203: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy674); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy632); } break; case 204: /* cmd ::= SHOW QUERIES */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; case 205: /* cmd ::= SHOW SCORES */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; case 206: /* cmd ::= SHOW TOPICS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; case 207: /* cmd ::= SHOW VARIABLES */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLE_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLE_STMT); } break; case 208: /* cmd ::= SHOW BNODES */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; case 209: /* cmd ::= SHOW SNODES */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; case 210: /* cmd ::= SHOW CLUSTER */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; case 211: /* cmd ::= SHOW TRANSACTIONS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT, NULL, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 212: /* db_name_cond_opt ::= */ - case 217: /* from_db_opt ::= */ yytestcase(yyruleno==217); -{ yymsp[1].minor.yy674 = createDefaultDatabaseCondValue(pCxt); } + case 212: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy632); } break; - case 213: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy421); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; + case 213: /* db_name_cond_opt ::= */ + case 218: /* from_db_opt ::= */ yytestcase(yyruleno==218); +{ yymsp[1].minor.yy632 = createDefaultDatabaseCondValue(pCxt); } break; - case 214: /* like_pattern_opt ::= */ - case 222: /* index_options ::= */ yytestcase(yyruleno==222); - case 251: /* into_opt ::= */ yytestcase(yyruleno==251); - case 407: /* where_clause_opt ::= */ yytestcase(yyruleno==407); - case 411: /* twindow_clause_opt ::= */ yytestcase(yyruleno==411); - case 416: /* sliding_opt ::= */ yytestcase(yyruleno==416); - case 418: /* fill_opt ::= */ yytestcase(yyruleno==418); - case 430: /* having_clause_opt ::= */ yytestcase(yyruleno==430); - case 440: /* slimit_clause_opt ::= */ yytestcase(yyruleno==440); - case 444: /* limit_clause_opt ::= */ yytestcase(yyruleno==444); -{ yymsp[1].minor.yy674 = NULL; } + case 214: /* db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy209); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 215: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 215: /* like_pattern_opt ::= */ + case 223: /* index_options ::= */ yytestcase(yyruleno==223); + case 252: /* into_opt ::= */ yytestcase(yyruleno==252); + case 408: /* where_clause_opt ::= */ yytestcase(yyruleno==408); + case 412: /* twindow_clause_opt ::= */ yytestcase(yyruleno==412); + case 417: /* sliding_opt ::= */ yytestcase(yyruleno==417); + case 419: /* fill_opt ::= */ yytestcase(yyruleno==419); + case 431: /* having_clause_opt ::= */ yytestcase(yyruleno==431); + case 441: /* slimit_clause_opt ::= */ yytestcase(yyruleno==441); + case 445: /* limit_clause_opt ::= */ yytestcase(yyruleno==445); +{ yymsp[1].minor.yy632 = NULL; } break; - case 216: /* table_name_cond ::= table_name */ -{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy421); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 216: /* like_pattern_opt ::= LIKE NK_STRING */ +{ yymsp[-1].minor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 218: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy421); } + case 217: /* table_name_cond ::= table_name */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy209); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 219: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy621, &yymsp[-3].minor.yy421, &yymsp[-1].minor.yy421, NULL, yymsp[0].minor.yy674); } + case 219: /* from_db_opt ::= FROM db_name */ +{ yymsp[-1].minor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy209); } break; - case 220: /* 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.yy621, &yymsp[-5].minor.yy421, &yymsp[-3].minor.yy421, yymsp[-1].minor.yy530, NULL); } + case 220: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy137, &yymsp[-3].minor.yy209, &yymsp[-1].minor.yy209, NULL, yymsp[0].minor.yy632); } break; - case 221: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy621, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); } + case 221: /* 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.yy137, &yymsp[-5].minor.yy209, &yymsp[-3].minor.yy209, yymsp[-1].minor.yy424, NULL); } break; - case 223: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ -{ yymsp[-8].minor.yy674 = createIndexOption(pCxt, yymsp[-6].minor.yy530, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), NULL, yymsp[0].minor.yy674); } + case 222: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy137, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209); } break; - case 224: /* 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.yy674 = createIndexOption(pCxt, yymsp[-8].minor.yy530, releaseRawExprNode(pCxt, yymsp[-4].minor.yy674), releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), yymsp[0].minor.yy674); } + case 224: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ +{ yymsp[-8].minor.yy632 = createIndexOption(pCxt, yymsp[-6].minor.yy424, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), NULL, yymsp[0].minor.yy632); } break; - case 227: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy674 = createFunctionNode(pCxt, &yymsp[-3].minor.yy421, yymsp[-1].minor.yy530); } - yymsp[-3].minor.yy674 = yylhsminor.yy674; + case 225: /* 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.yy632 = createIndexOption(pCxt, yymsp[-8].minor.yy424, releaseRawExprNode(pCxt, yymsp[-4].minor.yy632), releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), yymsp[0].minor.yy632); } break; - case 228: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy621, &yymsp[-2].minor.yy421, yymsp[0].minor.yy674, NULL, NULL); } + case 228: /* func ::= function_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy632 = createFunctionNode(pCxt, &yymsp[-3].minor.yy209, yymsp[-1].minor.yy424); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 229: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy621, &yymsp[-3].minor.yy421, NULL, &yymsp[0].minor.yy421, NULL); } + case 229: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy137, &yymsp[-2].minor.yy209, yymsp[0].minor.yy632, NULL, NULL); } break; - case 230: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy621, &yymsp[-3].minor.yy421, NULL, NULL, yymsp[0].minor.yy674); } + case 230: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy137, &yymsp[-3].minor.yy209, NULL, &yymsp[0].minor.yy209, NULL); } break; - case 231: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); } + case 231: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy137, &yymsp[-3].minor.yy209, NULL, NULL, yymsp[0].minor.yy632); } break; - case 232: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy621, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); } + case 232: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy209); } break; - case 233: /* cmd ::= DESC full_table_name */ - case 234: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==234); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy674); } + case 233: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy137, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209); } break; - case 235: /* cmd ::= RESET QUERY CACHE */ + case 234: /* cmd ::= DESC full_table_name */ + case 235: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==235); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy632); } + break; + case 236: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 236: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy621, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } + case 237: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy137, yymsp[-1].minor.yy632, yymsp[0].minor.yy632); } break; - case 238: /* analyze_opt ::= ANALYZE */ - case 246: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==246); - case 397: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==397); -{ yymsp[0].minor.yy621 = true; } + case 239: /* analyze_opt ::= ANALYZE */ + case 247: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==247); + case 398: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==398); +{ yymsp[0].minor.yy137 = true; } break; - case 239: /* explain_options ::= */ -{ yymsp[1].minor.yy674 = createDefaultExplainOptions(pCxt); } + case 240: /* explain_options ::= */ +{ yymsp[1].minor.yy632 = createDefaultExplainOptions(pCxt); } break; - case 240: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy674 = setExplainVerbose(pCxt, yymsp[-2].minor.yy674, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 241: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy632 = setExplainVerbose(pCxt, yymsp[-2].minor.yy632, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 241: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy674 = setExplainRatio(pCxt, yymsp[-2].minor.yy674, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 242: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy632 = setExplainRatio(pCxt, yymsp[-2].minor.yy632, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 242: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ -{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy530); } + case 243: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ +{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy424); } break; - case 243: /* 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.yy621, yymsp[-8].minor.yy621, &yymsp[-5].minor.yy421, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy690, yymsp[0].minor.yy42); } + case 244: /* 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.yy137, yymsp[-8].minor.yy137, &yymsp[-5].minor.yy209, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy304, yymsp[0].minor.yy100); } break; - case 244: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); } + case 245: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy209); } break; - case 247: /* bufsize_opt ::= */ -{ yymsp[1].minor.yy42 = 0; } + case 248: /* bufsize_opt ::= */ +{ yymsp[1].minor.yy100 = 0; } break; - case 248: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ -{ yymsp[-1].minor.yy42 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + case 249: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ +{ yymsp[-1].minor.yy100 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 249: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy621, &yymsp[-4].minor.yy421, yymsp[-2].minor.yy674, yymsp[-3].minor.yy674, yymsp[0].minor.yy674); } + case 250: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy137, &yymsp[-4].minor.yy209, yymsp[-2].minor.yy632, yymsp[-3].minor.yy632, yymsp[0].minor.yy632); } break; - case 250: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); } + case 251: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy209); } break; - case 252: /* into_opt ::= INTO full_table_name */ - case 378: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==378); - case 408: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==408); - case 431: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==431); -{ yymsp[-1].minor.yy674 = yymsp[0].minor.yy674; } + case 253: /* into_opt ::= INTO full_table_name */ + case 379: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==379); + case 409: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==409); + case 432: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==432); +{ yymsp[-1].minor.yy632 = yymsp[0].minor.yy632; } break; - case 253: /* stream_options ::= */ -{ yymsp[1].minor.yy674 = createStreamOptions(pCxt); } + case 254: /* stream_options ::= */ +{ yymsp[1].minor.yy632 = createStreamOptions(pCxt); } break; - case 254: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy674)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy674 = yymsp[-2].minor.yy674; } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 255: /* stream_options ::= stream_options TRIGGER AT_ONCE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy632)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy632 = yymsp[-2].minor.yy632; } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 255: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy674)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy674 = yymsp[-2].minor.yy674; } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 256: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy632)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy632 = yymsp[-2].minor.yy632; } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 256: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-3].minor.yy674)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy674)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = yymsp[-3].minor.yy674; } - yymsp[-3].minor.yy674 = yylhsminor.yy674; + case 257: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ +{ ((SStreamOptions*)yymsp[-3].minor.yy632)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy632)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy632); yylhsminor.yy632 = yymsp[-3].minor.yy632; } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 257: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy674)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = yymsp[-2].minor.yy674; } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 258: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy632)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy632); yylhsminor.yy632 = yymsp[-2].minor.yy632; } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 258: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 259: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 259: /* cmd ::= KILL QUERY NK_STRING */ + case 260: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 260: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 261: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 261: /* cmd ::= BALANCE VGROUP */ + case 262: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 262: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 263: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 263: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy530); } + case 264: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy424); } break; - case 264: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 265: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 265: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy530 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 266: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy424 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 267: /* cmd ::= SYNCDB db_name REPLICA */ -{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy421); } + case 268: /* cmd ::= SYNCDB db_name REPLICA */ +{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy209); } break; - case 268: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } + case 269: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy632, yymsp[0].minor.yy632); } break; - case 270: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 271: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 271: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 272: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 272: /* literal ::= NK_STRING */ -{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 273: /* literal ::= NK_STRING */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 273: /* literal ::= NK_BOOL */ -{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 274: /* literal ::= NK_BOOL */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 274: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; + case 275: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 275: /* literal ::= duration_literal */ - case 285: /* signed_literal ::= signed */ yytestcase(yyruleno==285); - case 305: /* expression ::= literal */ yytestcase(yyruleno==305); - case 306: /* expression ::= pseudo_column */ yytestcase(yyruleno==306); - case 307: /* expression ::= column_reference */ yytestcase(yyruleno==307); - case 308: /* expression ::= function_expression */ yytestcase(yyruleno==308); - case 309: /* expression ::= subquery */ yytestcase(yyruleno==309); - case 334: /* function_expression ::= literal_func */ yytestcase(yyruleno==334); - case 370: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==370); - case 374: /* boolean_primary ::= predicate */ yytestcase(yyruleno==374); - case 376: /* common_expression ::= expression */ yytestcase(yyruleno==376); - case 377: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==377); - case 379: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==379); - case 381: /* table_reference ::= table_primary */ yytestcase(yyruleno==381); - case 382: /* table_reference ::= joined_table */ yytestcase(yyruleno==382); - case 386: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==386); - case 433: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==433); - case 436: /* query_primary ::= query_specification */ yytestcase(yyruleno==436); -{ yylhsminor.yy674 = yymsp[0].minor.yy674; } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 276: /* literal ::= duration_literal */ + case 286: /* signed_literal ::= signed */ yytestcase(yyruleno==286); + case 306: /* expression ::= literal */ yytestcase(yyruleno==306); + case 307: /* expression ::= pseudo_column */ yytestcase(yyruleno==307); + case 308: /* expression ::= column_reference */ yytestcase(yyruleno==308); + case 309: /* expression ::= function_expression */ yytestcase(yyruleno==309); + case 310: /* expression ::= subquery */ yytestcase(yyruleno==310); + case 335: /* function_expression ::= literal_func */ yytestcase(yyruleno==335); + case 371: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==371); + case 375: /* boolean_primary ::= predicate */ yytestcase(yyruleno==375); + case 377: /* common_expression ::= expression */ yytestcase(yyruleno==377); + case 378: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==378); + case 380: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==380); + case 382: /* table_reference ::= table_primary */ yytestcase(yyruleno==382); + case 383: /* table_reference ::= joined_table */ yytestcase(yyruleno==383); + case 387: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==387); + case 434: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==434); + case 437: /* query_primary ::= query_specification */ yytestcase(yyruleno==437); +{ yylhsminor.yy632 = yymsp[0].minor.yy632; } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 276: /* literal ::= NULL */ -{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 277: /* literal ::= NULL */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 277: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 278: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 278: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 279: /* duration_literal ::= NK_VARIABLE */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 279: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 280: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 280: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + case 281: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; - case 281: /* signed ::= NK_MINUS NK_INTEGER */ + case 282: /* 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.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 282: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 283: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 283: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 284: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 284: /* signed ::= NK_MINUS NK_FLOAT */ + case 285: /* 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.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 286: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 287: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 287: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 288: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 288: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 289: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 289: /* signed_literal ::= duration_literal */ - case 291: /* signed_literal ::= literal_func */ yytestcase(yyruleno==291); - case 348: /* star_func_para ::= expression */ yytestcase(yyruleno==348); - case 403: /* select_item ::= common_expression */ yytestcase(yyruleno==403); - case 449: /* search_condition ::= common_expression */ yytestcase(yyruleno==449); -{ yylhsminor.yy674 = releaseRawExprNode(pCxt, yymsp[0].minor.yy674); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 290: /* signed_literal ::= duration_literal */ + case 292: /* signed_literal ::= literal_func */ yytestcase(yyruleno==292); + case 349: /* star_func_para ::= expression */ yytestcase(yyruleno==349); + case 404: /* select_item ::= common_expression */ yytestcase(yyruleno==404); + case 450: /* search_condition ::= common_expression */ yytestcase(yyruleno==450); +{ yylhsminor.yy632 = releaseRawExprNode(pCxt, yymsp[0].minor.yy632); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 290: /* signed_literal ::= NULL */ -{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 291: /* signed_literal ::= NULL */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 310: /* expression ::= NK_LP expression NK_RP */ - case 375: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==375); -{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674)); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 311: /* expression ::= NK_LP expression NK_RP */ + case 376: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==376); +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy632)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 311: /* expression ::= NK_PLUS expression */ + case 312: /* expression ::= NK_PLUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy674)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy632)); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 312: /* expression ::= NK_MINUS expression */ + case 313: /* expression ::= NK_MINUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy674), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy632), NULL)); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 313: /* expression ::= expression NK_PLUS expression */ + case 314: /* expression ::= expression NK_PLUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 314: /* expression ::= expression NK_MINUS expression */ + case 315: /* expression ::= expression NK_MINUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 315: /* expression ::= expression NK_STAR expression */ + case 316: /* expression ::= expression NK_STAR expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 316: /* expression ::= expression NK_SLASH expression */ + case 317: /* expression ::= expression NK_SLASH expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 317: /* expression ::= expression NK_REM expression */ + case 318: /* expression ::= expression NK_REM expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 318: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 319: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 321: /* column_reference ::= column_name */ -{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy421, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy421)); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 322: /* column_reference ::= column_name */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy209, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy209)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 322: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421, createColumnNode(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421)); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 323: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209, createColumnNode(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 323: /* pseudo_column ::= ROWTS */ - case 324: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==324); - case 326: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==326); - case 327: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==327); - case 328: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==328); - case 329: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==329); - case 330: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==330); - case 336: /* literal_func ::= NOW */ yytestcase(yyruleno==336); -{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy674 = yylhsminor.yy674; + case 324: /* pseudo_column ::= ROWTS */ + case 325: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==325); + case 327: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==327); + case 328: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==328); + case 329: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==329); + case 330: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==330); + case 331: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==331); + case 337: /* literal_func ::= NOW */ yytestcase(yyruleno==337); +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 325: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy421)))); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 326: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy209)))); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 331: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 332: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==332); -{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy421, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy421, yymsp[-1].minor.yy530)); } - yymsp[-3].minor.yy674 = yylhsminor.yy674; + case 332: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 333: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==333); +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy209, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy209, yymsp[-1].minor.yy424)); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 333: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ -{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), yymsp[-1].minor.yy690)); } - yymsp[-5].minor.yy674 = yylhsminor.yy674; + case 334: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy632), yymsp[-1].minor.yy304)); } + yymsp[-5].minor.yy632 = yylhsminor.yy632; break; - case 335: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy421, NULL)); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 336: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy209, NULL)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 344: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy530 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy530 = yylhsminor.yy530; + case 345: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy424 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; - case 349: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 406: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==406); -{ yylhsminor.yy674 = createColumnNode(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 350: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 407: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==407); +{ yylhsminor.yy632 = createColumnNode(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 350: /* predicate ::= expression compare_op expression */ - case 355: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==355); + case 351: /* predicate ::= expression compare_op expression */ + case 356: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==356); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy28, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy380, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 351: /* predicate ::= expression BETWEEN expression AND expression */ + case 352: /* predicate ::= expression BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy674); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy674), releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy632), releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-4].minor.yy674 = yylhsminor.yy674; + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; - case 352: /* predicate ::= expression NOT BETWEEN expression AND expression */ + case 353: /* predicate ::= expression NOT BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy674); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy674), releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy632), releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-5].minor.yy674 = yylhsminor.yy674; + yymsp[-5].minor.yy632 = yylhsminor.yy632; break; - case 353: /* predicate ::= expression IS NULL */ + case 354: /* predicate ::= expression IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), NULL)); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 354: /* predicate ::= expression IS NOT NULL */ + case 355: /* predicate ::= expression IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy632), NULL)); } - yymsp[-3].minor.yy674 = yylhsminor.yy674; + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 356: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy28 = OP_TYPE_LOWER_THAN; } + case 357: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_THAN; } break; - case 357: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy28 = OP_TYPE_GREATER_THAN; } + case 358: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_THAN; } break; - case 358: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy28 = OP_TYPE_LOWER_EQUAL; } + case 359: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_EQUAL; } break; - case 359: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy28 = OP_TYPE_GREATER_EQUAL; } + case 360: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_EQUAL; } break; - case 360: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy28 = OP_TYPE_NOT_EQUAL; } + case 361: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy380 = OP_TYPE_NOT_EQUAL; } break; - case 361: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy28 = OP_TYPE_EQUAL; } + case 362: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy380 = OP_TYPE_EQUAL; } break; - case 362: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy28 = OP_TYPE_LIKE; } + case 363: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy380 = OP_TYPE_LIKE; } break; - case 363: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy28 = OP_TYPE_NOT_LIKE; } + case 364: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_LIKE; } break; - case 364: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy28 = OP_TYPE_MATCH; } + case 365: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy380 = OP_TYPE_MATCH; } break; - case 365: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy28 = OP_TYPE_NMATCH; } + case 366: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy380 = OP_TYPE_NMATCH; } break; - case 366: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy28 = OP_TYPE_JSON_CONTAINS; } + case 367: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy380 = OP_TYPE_JSON_CONTAINS; } break; - case 367: /* in_op ::= IN */ -{ yymsp[0].minor.yy28 = OP_TYPE_IN; } + case 368: /* in_op ::= IN */ +{ yymsp[0].minor.yy380 = OP_TYPE_IN; } break; - case 368: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy28 = OP_TYPE_NOT_IN; } + case 369: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_IN; } break; - case 369: /* in_predicate_value ::= NK_LP expression_list NK_RP */ -{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy530)); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 370: /* in_predicate_value ::= NK_LP expression_list NK_RP */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy424)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 371: /* boolean_value_expression ::= NOT boolean_primary */ + case 372: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy674), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy632), NULL)); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 372: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 373: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 373: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 374: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); - yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 380: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy674 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy674, yymsp[0].minor.yy674, NULL); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 381: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy632 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy632, yymsp[0].minor.yy632, NULL); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 383: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy674 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; + case 384: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy632 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy209, &yymsp[0].minor.yy209); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 384: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy674 = createRealTableNode(pCxt, &yymsp[-3].minor.yy421, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); } - yymsp[-3].minor.yy674 = yylhsminor.yy674; + case 385: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy632 = createRealTableNode(pCxt, &yymsp[-3].minor.yy209, &yymsp[-1].minor.yy209, &yymsp[0].minor.yy209); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 385: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy674 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674), &yymsp[0].minor.yy421); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; + case 386: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy632 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy632), &yymsp[0].minor.yy209); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 387: /* alias_opt ::= */ -{ yymsp[1].minor.yy421 = nil_token; } + case 388: /* alias_opt ::= */ +{ yymsp[1].minor.yy209 = nil_token; } break; - case 388: /* alias_opt ::= table_alias */ -{ yylhsminor.yy421 = yymsp[0].minor.yy421; } - yymsp[0].minor.yy421 = yylhsminor.yy421; + case 389: /* alias_opt ::= table_alias */ +{ yylhsminor.yy209 = yymsp[0].minor.yy209; } + yymsp[0].minor.yy209 = yylhsminor.yy209; break; - case 389: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy421 = yymsp[0].minor.yy421; } + case 390: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy209 = yymsp[0].minor.yy209; } break; - case 390: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 391: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==391); -{ yymsp[-2].minor.yy674 = yymsp[-1].minor.yy674; } + case 391: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 392: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==392); +{ yymsp[-2].minor.yy632 = yymsp[-1].minor.yy632; } break; - case 392: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy674 = createJoinTableNode(pCxt, yymsp[-4].minor.yy636, yymsp[-5].minor.yy674, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); } - yymsp[-5].minor.yy674 = yylhsminor.yy674; + case 393: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy632 = createJoinTableNode(pCxt, yymsp[-4].minor.yy612, yymsp[-5].minor.yy632, yymsp[-2].minor.yy632, yymsp[0].minor.yy632); } + yymsp[-5].minor.yy632 = yylhsminor.yy632; break; - case 393: /* join_type ::= */ -{ yymsp[1].minor.yy636 = JOIN_TYPE_INNER; } + case 394: /* join_type ::= */ +{ yymsp[1].minor.yy612 = JOIN_TYPE_INNER; } break; - case 394: /* join_type ::= INNER */ -{ yymsp[0].minor.yy636 = JOIN_TYPE_INNER; } + case 395: /* join_type ::= INNER */ +{ yymsp[0].minor.yy612 = JOIN_TYPE_INNER; } break; - case 395: /* 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 396: /* 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.yy674 = createSelectStmt(pCxt, yymsp[-7].minor.yy621, yymsp[-6].minor.yy530, yymsp[-5].minor.yy674); - yymsp[-8].minor.yy674 = addWhereClause(pCxt, yymsp[-8].minor.yy674, yymsp[-4].minor.yy674); - yymsp[-8].minor.yy674 = addPartitionByClause(pCxt, yymsp[-8].minor.yy674, yymsp[-3].minor.yy530); - yymsp[-8].minor.yy674 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy674, yymsp[-2].minor.yy674); - yymsp[-8].minor.yy674 = addGroupByClause(pCxt, yymsp[-8].minor.yy674, yymsp[-1].minor.yy530); - yymsp[-8].minor.yy674 = addHavingClause(pCxt, yymsp[-8].minor.yy674, yymsp[0].minor.yy674); + yymsp[-8].minor.yy632 = createSelectStmt(pCxt, yymsp[-7].minor.yy137, yymsp[-6].minor.yy424, yymsp[-5].minor.yy632); + yymsp[-8].minor.yy632 = addWhereClause(pCxt, yymsp[-8].minor.yy632, yymsp[-4].minor.yy632); + yymsp[-8].minor.yy632 = addPartitionByClause(pCxt, yymsp[-8].minor.yy632, yymsp[-3].minor.yy424); + yymsp[-8].minor.yy632 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy632, yymsp[-2].minor.yy632); + yymsp[-8].minor.yy632 = addGroupByClause(pCxt, yymsp[-8].minor.yy632, yymsp[-1].minor.yy424); + yymsp[-8].minor.yy632 = addHavingClause(pCxt, yymsp[-8].minor.yy632, yymsp[0].minor.yy632); } break; - case 398: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy621 = false; } + case 399: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy137 = false; } break; - case 399: /* select_list ::= NK_STAR */ -{ yymsp[0].minor.yy530 = NULL; } + case 400: /* select_list ::= NK_STAR */ +{ yymsp[0].minor.yy424 = NULL; } break; - case 404: /* select_item ::= common_expression column_alias */ -{ yylhsminor.yy674 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674), &yymsp[0].minor.yy421); } - yymsp[-1].minor.yy674 = yylhsminor.yy674; + case 405: /* select_item ::= common_expression column_alias */ +{ yylhsminor.yy632 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy632), &yymsp[0].minor.yy209); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 405: /* select_item ::= common_expression AS column_alias */ -{ yylhsminor.yy674 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), &yymsp[0].minor.yy421); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 406: /* select_item ::= common_expression AS column_alias */ +{ yylhsminor.yy632 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), &yymsp[0].minor.yy209); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 410: /* partition_by_clause_opt ::= PARTITION BY expression_list */ - case 427: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==427); - case 439: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==439); -{ yymsp[-2].minor.yy530 = yymsp[0].minor.yy530; } + case 411: /* partition_by_clause_opt ::= PARTITION BY expression_list */ + case 428: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==428); + case 440: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==440); +{ yymsp[-2].minor.yy424 = yymsp[0].minor.yy424; } break; - case 412: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy674 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), releaseRawExprNode(pCxt, yymsp[-1].minor.yy674)); } + case 413: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy632 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy632), releaseRawExprNode(pCxt, yymsp[-1].minor.yy632)); } break; - case 413: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ -{ yymsp[-3].minor.yy674 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674)); } + case 414: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ +{ yymsp[-3].minor.yy632 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy632)); } break; - case 414: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy674 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), NULL, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } + case 415: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy632 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy632), NULL, yymsp[-1].minor.yy632, yymsp[0].minor.yy632); } break; - case 415: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy674 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy674), releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } + case 416: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy632 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy632), releaseRawExprNode(pCxt, yymsp[-3].minor.yy632), yymsp[-1].minor.yy632, yymsp[0].minor.yy632); } break; - case 417: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ -{ yymsp[-3].minor.yy674 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy674); } + case 418: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ +{ yymsp[-3].minor.yy632 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy632); } break; - case 419: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy674 = createFillNode(pCxt, yymsp[-1].minor.yy320, NULL); } + case 420: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy632 = createFillNode(pCxt, yymsp[-1].minor.yy54, NULL); } break; - case 420: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy674 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy530)); } + case 421: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy632 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy424)); } break; - case 421: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy320 = FILL_MODE_NONE; } + case 422: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy54 = FILL_MODE_NONE; } break; - case 422: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy320 = FILL_MODE_PREV; } + case 423: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy54 = FILL_MODE_PREV; } break; - case 423: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy320 = FILL_MODE_NULL; } + case 424: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy54 = FILL_MODE_NULL; } break; - case 424: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy320 = FILL_MODE_LINEAR; } + case 425: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy54 = FILL_MODE_LINEAR; } break; - case 425: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy320 = FILL_MODE_NEXT; } + case 426: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy54 = FILL_MODE_NEXT; } break; - case 428: /* group_by_list ::= expression */ -{ yylhsminor.yy530 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } - yymsp[0].minor.yy530 = yylhsminor.yy530; + case 429: /* group_by_list ::= expression */ +{ yylhsminor.yy424 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; - case 429: /* group_by_list ::= group_by_list NK_COMMA expression */ -{ yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } - yymsp[-2].minor.yy530 = yylhsminor.yy530; + case 430: /* group_by_list ::= group_by_list NK_COMMA expression */ +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; - case 432: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 433: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy674 = addOrderByClause(pCxt, yymsp[-3].minor.yy674, yymsp[-2].minor.yy530); - yylhsminor.yy674 = addSlimitClause(pCxt, yylhsminor.yy674, yymsp[-1].minor.yy674); - yylhsminor.yy674 = addLimitClause(pCxt, yylhsminor.yy674, yymsp[0].minor.yy674); + yylhsminor.yy632 = addOrderByClause(pCxt, yymsp[-3].minor.yy632, yymsp[-2].minor.yy424); + yylhsminor.yy632 = addSlimitClause(pCxt, yylhsminor.yy632, yymsp[-1].minor.yy632); + yylhsminor.yy632 = addLimitClause(pCxt, yylhsminor.yy632, yymsp[0].minor.yy632); } - yymsp[-3].minor.yy674 = yylhsminor.yy674; + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 434: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ -{ yylhsminor.yy674 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy674, yymsp[0].minor.yy674); } - yymsp[-3].minor.yy674 = yylhsminor.yy674; + case 435: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ +{ yylhsminor.yy632 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy632, yymsp[0].minor.yy632); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 435: /* query_expression_body ::= query_expression_body UNION query_expression_body */ -{ yylhsminor.yy674 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 436: /* query_expression_body ::= query_expression_body UNION query_expression_body */ +{ yylhsminor.yy632 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy632, yymsp[0].minor.yy632); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 437: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ -{ yymsp[-5].minor.yy674 = yymsp[-4].minor.yy674; } - yy_destructor(yypParser,351,&yymsp[-3].minor); - yy_destructor(yypParser,352,&yymsp[-2].minor); - yy_destructor(yypParser,353,&yymsp[-1].minor); + case 438: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ +{ yymsp[-5].minor.yy632 = yymsp[-4].minor.yy632; } + yy_destructor(yypParser,352,&yymsp[-3].minor); + yy_destructor(yypParser,353,&yymsp[-2].minor); + yy_destructor(yypParser,354,&yymsp[-1].minor); break; - case 441: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 445: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==445); -{ yymsp[-1].minor.yy674 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 442: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 446: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==446); +{ yymsp[-1].minor.yy632 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 442: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 446: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==446); -{ yymsp[-3].minor.yy674 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 443: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 447: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==447); +{ yymsp[-3].minor.yy632 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 443: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 447: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==447); -{ yymsp[-3].minor.yy674 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 444: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 448: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==448); +{ yymsp[-3].minor.yy632 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 448: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy674); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 449: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy632); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 452: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy674 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), yymsp[-1].minor.yy610, yymsp[0].minor.yy107); } - yymsp[-2].minor.yy674 = yylhsminor.yy674; + case 453: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy632 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), yymsp[-1].minor.yy578, yymsp[0].minor.yy217); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 453: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy610 = ORDER_ASC; } + case 454: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy578 = ORDER_ASC; } break; - case 454: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy610 = ORDER_ASC; } + case 455: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy578 = ORDER_ASC; } break; - case 455: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy610 = ORDER_DESC; } + case 456: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy578 = ORDER_DESC; } break; - case 456: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy107 = NULL_ORDER_DEFAULT; } + case 457: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy217 = NULL_ORDER_DEFAULT; } break; - case 457: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy107 = NULL_ORDER_FIRST; } + case 458: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy217 = NULL_ORDER_FIRST; } break; - case 458: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy107 = NULL_ORDER_LAST; } + case 459: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy217 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index 3cd5eeb655..eb8420fa5e 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -156,7 +156,11 @@ static EScanType getScanType(SLogicPlanContext* pCxt, SNodeList* pScanPseudoCols if (NULL == pScanCols) { // select count(*) from t - return NULL == pScanPseudoCols ? SCAN_TYPE_TABLE : SCAN_TYPE_TAG; + return NULL == pScanPseudoCols + ? SCAN_TYPE_TABLE + : ((FUNCTION_TYPE_BLOCK_DIST_INFO == ((SFunctionNode*)nodesListGetNode(pScanPseudoCols, 0))->funcType) + ? SCAN_TYPE_BLOCK_INFO + : SCAN_TYPE_TAG); } if (TSDB_SYSTEM_TABLE == tableType) { diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c index 656976b3ca..e9d02ee9f6 100644 --- a/source/libs/planner/src/planPhysiCreater.c +++ b/source/libs/planner/src/planPhysiCreater.c @@ -450,34 +450,37 @@ static void vgroupInfoToNodeAddr(const SVgroupInfo* vg, SQueryNodeAddr* pNodeAdd pNodeAddr->epSet = vg->epSet; } -static int32_t createTagScanPhysiNode(SPhysiPlanContext* pCxt, SSubplan* pSubplan, SScanLogicNode* pScanLogicNode, - SPhysiNode** pPhyNode) { - STagScanPhysiNode* pTagScan = - (STagScanPhysiNode*)makePhysiNode(pCxt, (SLogicNode*)pScanLogicNode, QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN); - if (NULL == pTagScan) { - return TSDB_CODE_OUT_OF_MEMORY; - } - vgroupInfoToNodeAddr(pScanLogicNode->pVgroupList->vgroups, &pSubplan->execNode); - SQueryNodeLoad node = {.addr = pSubplan->execNode, .load = 0}; - taosArrayPush(pCxt->pExecNodeList, &node); - return createScanPhysiNodeFinalize(pCxt, pSubplan, pScanLogicNode, (SScanPhysiNode*)pTagScan, pPhyNode); -} - static ENodeType getScanOperatorType(EScanType scanType) { switch (scanType) { + case SCAN_TYPE_TAG: + return QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN; case SCAN_TYPE_TABLE: return QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN; case SCAN_TYPE_STREAM: return QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN; case SCAN_TYPE_TABLE_MERGE: - // return QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN; return QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN; + case SCAN_TYPE_BLOCK_INFO: + return QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN; default: break; } return QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN; } +static int32_t createSimpleScanPhysiNode(SPhysiPlanContext* pCxt, SSubplan* pSubplan, SScanLogicNode* pScanLogicNode, + SPhysiNode** pPhyNode) { + SScanPhysiNode* pScan = + (SScanPhysiNode*)makePhysiNode(pCxt, (SLogicNode*)pScanLogicNode, getScanOperatorType(pScanLogicNode->scanType)); + if (NULL == pScan) { + return TSDB_CODE_OUT_OF_MEMORY; + } + vgroupInfoToNodeAddr(pScanLogicNode->pVgroupList->vgroups, &pSubplan->execNode); + SQueryNodeLoad node = {.addr = pSubplan->execNode, .load = 0}; + taosArrayPush(pCxt->pExecNodeList, &node); + return createScanPhysiNodeFinalize(pCxt, pSubplan, pScanLogicNode, pScan, pPhyNode); +} + static int32_t createTableScanPhysiNode(SPhysiPlanContext* pCxt, SSubplan* pSubplan, SScanLogicNode* pScanLogicNode, SPhysiNode** pPhyNode) { STableScanPhysiNode* pTableScan = (STableScanPhysiNode*)makePhysiNode(pCxt, (SLogicNode*)pScanLogicNode, @@ -558,7 +561,8 @@ static int32_t createScanPhysiNode(SPhysiPlanContext* pCxt, SSubplan* pSubplan, SPhysiNode** pPhyNode) { switch (pScanLogicNode->scanType) { case SCAN_TYPE_TAG: - return createTagScanPhysiNode(pCxt, pSubplan, pScanLogicNode, pPhyNode); + case SCAN_TYPE_BLOCK_INFO: + return createSimpleScanPhysiNode(pCxt, pSubplan, pScanLogicNode, pPhyNode); case SCAN_TYPE_TABLE: return createTableScanPhysiNode(pCxt, pSubplan, pScanLogicNode, pPhyNode); case SCAN_TYPE_SYSTEM_TABLE: diff --git a/source/libs/planner/test/planOtherTest.cpp b/source/libs/planner/test/planOtherTest.cpp index f9feb8d1fe..0f2540924c 100644 --- a/source/libs/planner/test/planOtherTest.cpp +++ b/source/libs/planner/test/planOtherTest.cpp @@ -70,6 +70,10 @@ TEST_F(PlanOtherTest, show) { useDb("root", "test"); run("SHOW DATABASES"); + + run("SHOW TABLE DISTRIBUTED t1"); + + run("SHOW TABLE DISTRIBUTED st1"); } TEST_F(PlanOtherTest, delete) { diff --git a/source/libs/qcom/src/queryUtil.c b/source/libs/qcom/src/queryUtil.c index 9322d7e594..2120d24d26 100644 --- a/source/libs/qcom/src/queryUtil.c +++ b/source/libs/qcom/src/queryUtil.c @@ -154,7 +154,7 @@ int32_t asyncSendMsgToServerExt(void* pTransporter, SEpSet* epSet, int64_t* pTra .info.persistHandle = persistHandle, .code = 0}; assert(pInfo->fp != NULL); - + TRACE_SET_ROOTID(&rpcMsg.info.traceId, pInfo->requestId); rpcSendRequestWithCtx(pTransporter, epSet, &rpcMsg, pTransporterId, rpcCtx); return TSDB_CODE_SUCCESS; } @@ -204,14 +204,14 @@ void destroyQueryExecRes(SQueryExecRes* pRes) { switch (pRes->msgType) { case TDMT_VND_ALTER_TABLE: case TDMT_MND_ALTER_STB: { - tFreeSTableMetaRsp((STableMetaRsp *)pRes->res); + tFreeSTableMetaRsp((STableMetaRsp*)pRes->res); taosMemoryFreeClear(pRes->res); break; } case TDMT_VND_SUBMIT: { tFreeSSubmitRsp((SSubmitRsp*)pRes->res); break; - } + } case TDMT_VND_QUERY: { taosArrayDestroy((SArray*)pRes->res); break; @@ -220,5 +220,3 @@ void destroyQueryExecRes(SQueryExecRes* pRes) { qError("invalid exec result for request type %d", pRes->msgType); } } - - diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 15a67adf77..7fb3ba4ac0 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -841,15 +841,6 @@ void syncNodeStart(SSyncNode* pSyncNode) { syncNodeBecomeLeader(pSyncNode, "one replica start"); // Raft 3.6.2 Committing entries from previous terms - - // use this now - syncNodeAppendNoop(pSyncNode); - syncMaybeAdvanceCommitIndex(pSyncNode); // maybe only one replica - - if (gRaftDetailLog) { - syncNodeLog2("==state change become leader immediately==", pSyncNode); - } - return; } @@ -1390,7 +1381,7 @@ void syncNodeUpdateConfig(SSyncNode* pSyncNode, SSyncCfg* pNewConfig, SyncIndex syncUtilU642Addr((pSyncNode->replicasId)[i].addr, host, sizeof(host), &port); do { - char eventLog[128]; + char eventLog[256]; snprintf(eventLog, sizeof(eventLog), "snapshot sender reset for %lu, newIndex:%d, %s:%d, %p", (pSyncNode->replicasId)[i].addr, i, host, port, oldSenders[j]); syncNodeEventLog(pSyncNode, eventLog); @@ -1405,7 +1396,7 @@ void syncNodeUpdateConfig(SSyncNode* pSyncNode, SSyncCfg* pNewConfig, SyncIndex (pSyncNode->senders)[i]->replicaIndex = i; do { - char eventLog[128]; + char eventLog[256]; snprintf(eventLog, sizeof(eventLog), "snapshot sender udpate replicaIndex from %d to %d, %s:%d, %p, reset:%d", oldreplicaIndex, i, host, port, (pSyncNode->senders)[i], reset); syncNodeEventLog(pSyncNode, eventLog); @@ -1583,6 +1574,10 @@ void syncNodeBecomeLeader(SSyncNode* pSyncNode, const char* debugStr) { // start heartbeat timer syncNodeStartHeartbeatTimer(pSyncNode); + // append noop + syncNodeAppendNoop(pSyncNode); + syncMaybeAdvanceCommitIndex(pSyncNode); // maybe only one replica + // trace log do { int32_t debugStrLen = strlen(debugStr); @@ -1608,10 +1603,6 @@ void syncNodeCandidate2Leader(SSyncNode* pSyncNode) { // Raft 3.6.2 Committing entries from previous terms - // use this now - syncNodeAppendNoop(pSyncNode); - syncMaybeAdvanceCommitIndex(pSyncNode); // maybe only one replica - // do not use this // syncNodeEqNoop(pSyncNode); } diff --git a/source/libs/transport/inc/transComm.h b/source/libs/transport/inc/transComm.h index e680e30042..146b127422 100644 --- a/source/libs/transport/inc/transComm.h +++ b/source/libs/transport/inc/transComm.h @@ -26,6 +26,7 @@ extern "C" { #include "transLog.h" #include "transportInt.h" #include "trpc.h" +#include "ttrace.h" #include "tutil.h" typedef void* queue[2]; @@ -140,6 +141,7 @@ typedef struct { char spi : 2; char user[TSDB_UNI_LEN]; + STraceId traceId; uint64_t ahandle; // ahandle assigned by client uint32_t code; // del later uint32_t msgType; diff --git a/source/libs/transport/inc/transLog.h b/source/libs/transport/inc/transLog.h index ebf231cfcf..9947ba803f 100644 --- a/source/libs/transport/inc/transLog.h +++ b/source/libs/transport/inc/transLog.h @@ -22,6 +22,7 @@ extern "C" { // clang-format off #include "tlog.h" +#include "ttrace.h" #define tFatal(...) do {if (rpcDebugFlag & DEBUG_FATAL){ taosPrintLog("RPC FATAL ", DEBUG_FATAL, rpcDebugFlag, __VA_ARGS__); }} while (0) #define tError(...)do { if (rpcDebugFlag & DEBUG_ERROR){ taosPrintLog("RPC ERROR ", DEBUG_ERROR, rpcDebugFlag, __VA_ARGS__); } } while(0) @@ -30,6 +31,10 @@ extern "C" { #define tDebug(...) do {if (rpcDebugFlag & DEBUG_DEBUG){ taosPrintLog("RPC ", DEBUG_DEBUG, rpcDebugFlag, __VA_ARGS__); }} while(0) #define tTrace(...) do {if (rpcDebugFlag & DEBUG_TRACE){ taosPrintLog("RPC ", DEBUG_TRACE, rpcDebugFlag, __VA_ARGS__); }} while(0) #define tDump(x, y) do {if (rpcDebugFlag & DEBUG_DUMP) { taosDumpData((unsigned char *)x, y); } } while(0) + +//#define tTR(param, ...) do { char buf[40] = {0};TRACE_TO_STR(trace, buf);tTrace("TRID: %s "param, buf, __VA_ARGS__);} while(0) +#define tGTrace(param, ...) do { char buf[40] = {0}; TRACE_TO_STR(trace, buf); tTrace(param ", GTID: %s", __VA_ARGS__, buf);} while(0) + // clang-format on #ifdef __cplusplus } diff --git a/source/libs/transport/src/trans.c b/source/libs/transport/src/trans.c index 925de2f321..1ec96f4a7a 100644 --- a/source/libs/transport/src/trans.c +++ b/source/libs/transport/src/trans.c @@ -163,6 +163,11 @@ void rpcSetDefaultAddr(void* thandle, const char* ip, const char* fqdn) { transSetDefaultAddr(thandle, ip, fqdn); } +// void rpcSetMsgTraceId(SRpcMsg* pMsg, STraceId uid) { +// SRpcHandleInfo* pInfo = &pMsg->info; +// pInfo->traceId = uid; +//} + int32_t rpcInit() { // impl later return 0; diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 3d570e0860..912c8b59c2 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -48,9 +48,10 @@ typedef struct SCliMsg { STransConnCtx* ctx; STransMsg msg; queue q; - uint64_t st; STransMsgType type; - int sent; //(0: no send, 1: alread sent) + + uint64_t st; + int sent; //(0: no send, 1: alread sent) } SCliMsg; typedef struct SCliThrdObj { @@ -167,27 +168,27 @@ static void cliReleaseUnfinishedMsg(SCliConn* conn) { snprintf(key, sizeof(key), "%s:%d", ip, (int)port); \ } while (0) -#define CONN_HOST_THREAD_INDEX(conn) (conn ? ((SCliConn*)conn)->hThrdIdx : -1) -#define CONN_PERSIST_TIME(para) (para * 1000 * 10) -#define CONN_GET_HOST_THREAD(conn) (conn ? ((SCliConn*)conn)->hostThrd : NULL) -#define CONN_GET_INST_LABEL(conn) (((STrans*)(((SCliThrdObj*)(conn)->hostThrd)->pTransInst))->label) -#define CONN_SHOULD_RELEASE(conn, head) \ - do { \ - if ((head)->release == 1 && (head->msgLen) == sizeof(*head)) { \ - uint64_t ahandle = head->ahandle; \ - CONN_GET_MSGCTX_BY_AHANDLE(conn, ahandle); \ - conn->status = ConnRelease; \ - transClearBuffer(&conn->readBuf); \ - transFreeMsg(transContFromHead((char*)head)); \ - tDebug("cli conn %p receive release request, ref: %d", conn, T_REF_VAL_GET(conn)); \ - if (T_REF_VAL_GET(conn) > 1) { \ - transUnrefCliHandle(conn); \ - } \ - destroyCmsg(pMsg); \ - cliReleaseUnfinishedMsg(conn); \ - addConnToPool(((SCliThrdObj*)conn->hostThrd)->pool, conn); \ - return; \ - } \ +#define CONN_HOST_THREAD_IDX(conn) (conn ? ((SCliConn*)conn)->hThrdIdx : -1) +#define CONN_PERSIST_TIME(para) (para * 1000 * 10) +#define CONN_GET_HOST_THREAD(conn) (conn ? ((SCliConn*)conn)->hostThrd : NULL) +#define CONN_GET_INST_LABEL(conn) (((STrans*)(((SCliThrdObj*)(conn)->hostThrd)->pTransInst))->label) +#define CONN_SHOULD_RELEASE(conn, head) \ + do { \ + if ((head)->release == 1 && (head->msgLen) == sizeof(*head)) { \ + uint64_t ahandle = head->ahandle; \ + CONN_GET_MSGCTX_BY_AHANDLE(conn, ahandle); \ + conn->status = ConnRelease; \ + transClearBuffer(&conn->readBuf); \ + transFreeMsg(transContFromHead((char*)head)); \ + tDebug("%s conn %p receive release request, ref: %d", CONN_GET_INST_LABEL(conn), conn, T_REF_VAL_GET(conn)); \ + if (T_REF_VAL_GET(conn) > 1) { \ + transUnrefCliHandle(conn); \ + } \ + destroyCmsg(pMsg); \ + cliReleaseUnfinishedMsg(conn); \ + addConnToPool(((SCliThrdObj*)conn->hostThrd)->pool, conn); \ + return; \ + } \ } while (0) #define CONN_GET_MSGCTX_BY_AHANDLE(conn, ahandle) \ @@ -280,6 +281,7 @@ void cliHandleResp(SCliConn* conn) { transMsg.code = pHead->code; transMsg.msgType = pHead->msgType; transMsg.info.ahandle = NULL; + transMsg.info.traceId = pHead->traceId; SCliMsg* pMsg = NULL; STransConnCtx* pCtx = NULL; @@ -293,27 +295,28 @@ void cliHandleResp(SCliConn* conn) { if (transMsg.info.ahandle == NULL) { transMsg.info.ahandle = transCtxDumpBrokenlinkVal(&conn->ctx, (int32_t*)&(transMsg.msgType)); } - tDebug("cli conn %p construct ahandle %p, persist: 0", conn, transMsg.info.ahandle); + tDebug("%s conn %p construct ahandle %p, persist: 0", CONN_GET_INST_LABEL(conn), conn, transMsg.info.ahandle); } else { transMsg.info.ahandle = pCtx ? pCtx->ahandle : NULL; - tDebug("cli conn %p get ahandle %p, persist: 0", conn, transMsg.info.ahandle); + tDebug("%s conn %p get ahandle %p, persist: 0", CONN_GET_INST_LABEL(conn), conn, transMsg.info.ahandle); } } else { uint64_t ahandle = (uint64_t)pHead->ahandle; CONN_GET_MSGCTX_BY_AHANDLE(conn, ahandle); if (pMsg == NULL) { transMsg.info.ahandle = transCtxDumpVal(&conn->ctx, transMsg.msgType); - tDebug("cli conn %p construct ahandle %p by %s, persist: 1", conn, transMsg.info.ahandle, - TMSG_INFO(transMsg.msgType)); + tDebug("%s conn %p construct ahandle %p by %s, persist: 1", CONN_GET_INST_LABEL(conn), conn, + transMsg.info.ahandle, TMSG_INFO(transMsg.msgType)); if (!CONN_RELEASE_BY_SERVER(conn) && transMsg.info.ahandle == NULL) { transMsg.code = TSDB_CODE_RPC_NETWORK_UNAVAIL; transMsg.info.ahandle = transCtxDumpBrokenlinkVal(&conn->ctx, (int32_t*)&(transMsg.msgType)); - tDebug("cli conn %p construct ahandle %p due brokenlink, persist: 1", conn, transMsg.info.ahandle); + tDebug("%s conn %p construct ahandle %p due brokenlink, persist: 1", CONN_GET_INST_LABEL(conn), conn, + transMsg.info.ahandle); } } else { pCtx = pMsg ? pMsg->ctx : NULL; transMsg.info.ahandle = pCtx ? pCtx->ahandle : NULL; - tDebug("cli conn %p get ahandle %p, persist: 1", conn, transMsg.info.ahandle); + tDebug("%s conn %p get ahandle %p, persist: 1", CONN_GET_INST_LABEL(conn), conn, transMsg.info.ahandle); } } // buf's mem alread translated to transMsg.pCont @@ -321,26 +324,27 @@ void cliHandleResp(SCliConn* conn) { if (!CONN_NO_PERSIST_BY_APP(conn)) { transMsg.info.handle = conn; - tDebug("%s cli conn %p ref by app", CONN_GET_INST_LABEL(conn), conn); + tDebug("%s conn %p ref by app", CONN_GET_INST_LABEL(conn), conn); } - - tDebug("%s cli conn %p %s received from %s:%d, local info:%s:%d, msg size:%d code:0x%x", pTransInst->label, conn, - TMSG_INFO(pHead->msgType), taosInetNtoa(conn->addr.sin_addr), ntohs(conn->addr.sin_port), - taosInetNtoa(conn->localAddr.sin_addr), ntohs(conn->localAddr.sin_port), transMsg.contLen, transMsg.code); + // char buf[64] = {0}; + // TRACE_TO_STR(&transMsg.info.traceId, buf); + STraceId* trace = &transMsg.info.traceId; + tGTrace("conn %p %s received from %s:%d, local info: %s:%d, msg size: %d, code: %d", conn, TMSG_INFO(pHead->msgType), + taosInetNtoa(conn->addr.sin_addr), ntohs(conn->addr.sin_port), taosInetNtoa(conn->localAddr.sin_addr), + ntohs(conn->localAddr.sin_port), transMsg.contLen, transMsg.code); if (pCtx == NULL && CONN_NO_PERSIST_BY_APP(conn)) { - tTrace("except, server continue send while cli ignore it"); + tDebug("%s except, server continue send while cli ignore it", CONN_GET_INST_LABEL(conn)); // transUnrefCliHandle(conn); return; } if (CONN_RELEASE_BY_SERVER(conn) && transMsg.info.ahandle == NULL) { - tTrace("except, server continue send while cli ignore it"); + tDebug("%s except, server continue send while cli ignore it", CONN_GET_INST_LABEL(conn)); // transUnrefCliHandle(conn); return; } if (cliAppCb(conn, &transMsg, pMsg) != 0) { - tTrace("try to send req to next node"); return; } destroyCmsg(pMsg); @@ -363,7 +367,7 @@ void cliHandleResp(SCliConn* conn) { void cliHandleExcept(SCliConn* pConn) { if (transQueueEmpty(&pConn->cliMsgs)) { if (pConn->broken == true && CONN_NO_PERSIST_BY_APP(pConn)) { - tTrace("%s cli conn %p handle except, persist:0", CONN_GET_INST_LABEL(pConn), pConn); + tTrace("%s conn %p handle except, persist:0", CONN_GET_INST_LABEL(pConn), pConn); transUnrefCliHandle(pConn); return; } @@ -386,11 +390,11 @@ void cliHandleExcept(SCliConn* pConn) { if (pMsg == NULL && !CONN_NO_PERSIST_BY_APP(pConn)) { transMsg.info.ahandle = transCtxDumpVal(&pConn->ctx, transMsg.msgType); - tDebug("%s cli conn %p construct ahandle %p by %s", CONN_GET_INST_LABEL(pConn), pConn, transMsg.info.ahandle, + tDebug("%s conn %p construct ahandle %p by %s", CONN_GET_INST_LABEL(pConn), pConn, transMsg.info.ahandle, TMSG_INFO(transMsg.msgType)); if (transMsg.info.ahandle == NULL) { transMsg.info.ahandle = transCtxDumpBrokenlinkVal(&pConn->ctx, (int32_t*)&(transMsg.msgType)); - tDebug("%s cli conn %p construct ahandle %p due to brokenlink", CONN_GET_INST_LABEL(pConn), pConn, + tDebug("%s conn %p construct ahandle %p due to brokenlink", CONN_GET_INST_LABEL(pConn), pConn, transMsg.info.ahandle); } } else { @@ -404,11 +408,10 @@ void cliHandleExcept(SCliConn* pConn) { } } if (cliAppCb(pConn, &transMsg, pMsg) != 0) { - tTrace("try to send req to next node"); return; } destroyCmsg(pMsg); - tTrace("%s cli conn %p start to destroy", CONN_GET_INST_LABEL(pConn), pConn); + tTrace("%s conn %p start to destroy", CONN_GET_INST_LABEL(pConn), pConn); } while (!transQueueEmpty(&pConn->cliMsgs)); transUnrefCliHandle(pConn); } @@ -417,7 +420,7 @@ void cliTimeoutCb(uv_timer_t* handle) { SCliThrdObj* pThrd = handle->data; STrans* pTransInst = pThrd->pTransInst; int64_t currentTime = pThrd->nextTimeout; - tTrace("%s, cli conn timeout, try to remove expire conn from conn pool", pTransInst->label); + tTrace("%s conn timeout, try to remove expire conn from conn pool", pTransInst->label); SConnList* p = taosHashIterate((SHashObj*)pThrd->pool, NULL); while (p != NULL) { @@ -492,7 +495,7 @@ static void addConnToPool(void* pool, SCliConn* conn) { char key[128] = {0}; CONN_CONSTRUCT_HASH_KEY(key, conn->ip, conn->port); - tTrace("cli conn %p added to conn pool, read buf cap: %d", conn, conn->readBuf.cap); + tTrace("%s conn %p added to conn pool, read buf cap: %d", CONN_GET_INST_LABEL(conn), conn, conn->readBuf.cap); SConnList* plist = taosHashGet((SHashObj*)pool, key, strlen(key)); // list already create before @@ -515,10 +518,10 @@ static void cliRecvCb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { if (nread > 0) { pBuf->len += nread; if (transReadComplete(pBuf)) { - tTrace("%s cli conn %p read complete", CONN_GET_INST_LABEL(conn), conn); + tTrace("%s conn %p read complete", CONN_GET_INST_LABEL(conn), conn); cliHandleResp(conn); } else { - tTrace("%s cli conn %p read partial packet, continue to read", CONN_GET_INST_LABEL(conn), conn); + tTrace("%s conn %p read partial packet, continue to read", CONN_GET_INST_LABEL(conn), conn); } return; } @@ -528,11 +531,11 @@ static void cliRecvCb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { // ref http://docs.libuv.org/en/v1.x/stream.html?highlight=uv_read_start#c.uv_read_cb // nread might be 0, which does not indicate an error or EOF. This is equivalent to EAGAIN or EWOULDBLOCK under // read(2). - tTrace("%s cli conn %p read empty", CONN_GET_INST_LABEL(conn), conn); + tTrace("%s conn %p read empty", CONN_GET_INST_LABEL(conn), conn); return; } if (nread < 0) { - tError("%s cli conn %p read error: %s", CONN_GET_INST_LABEL(conn), conn, uv_err_name(nread)); + tError("%s conn %p read error: %s", CONN_GET_INST_LABEL(conn), conn, uv_err_name(nread)); conn->broken = true; cliHandleExcept(conn); } @@ -557,7 +560,7 @@ static SCliConn* cliCreateConn(SCliThrdObj* pThrd) { return conn; } static void cliDestroyConn(SCliConn* conn, bool clear) { - tTrace("%s cli conn %p remove from conn pool", CONN_GET_INST_LABEL(conn), conn); + tTrace("%s conn %p remove from conn pool", CONN_GET_INST_LABEL(conn), conn); QUEUE_REMOVE(&conn->conn); if (clear) { @@ -570,7 +573,7 @@ static void cliDestroy(uv_handle_t* handle) { taosMemoryFree(conn->stream); transCtxCleanup(&conn->ctx); transQueueDestroy(&conn->cliMsgs); - tTrace("%s cli conn %p destroy successfully", CONN_GET_INST_LABEL(conn), conn); + tTrace("%s conn %p destroy successfully", CONN_GET_INST_LABEL(conn), conn); transDestroyBuffer(&conn->readBuf); taosMemoryFree(conn); } @@ -597,14 +600,14 @@ static void cliSendCb(uv_write_t* req, int status) { SCliConn* pConn = req->data; if (status == 0) { - tTrace("%s cli conn %p data already was written out", CONN_GET_INST_LABEL(pConn), pConn); + tTrace("%s conn %p data already was written out", CONN_GET_INST_LABEL(pConn), pConn); } else { - tError("%s cli conn %p failed to write: %s", CONN_GET_INST_LABEL(pConn), pConn, uv_err_name(status)); + tError("%s conn %p failed to write: %s", CONN_GET_INST_LABEL(pConn), pConn, uv_err_name(status)); cliHandleExcept(pConn); return; } if (cliHandleNoResp(pConn) == true) { - tTrace("%s cli conn %p no resp required", CONN_GET_INST_LABEL(pConn), pConn); + tTrace("%s conn %p no resp required", CONN_GET_INST_LABEL(pConn), pConn); return; } uv_read_start((uv_stream_t*)pConn->stream, cliAllocRecvBufferCb, cliRecvCb); @@ -640,11 +643,16 @@ void cliSend(SCliConn* pConn) { pHead->msgLen = (int32_t)htonl((uint32_t)msgLen); pHead->release = REQUEST_RELEASE_HANDLE(pCliMsg) ? 1 : 0; memcpy(pHead->user, pTransInst->user, strlen(pTransInst->user)); + pHead->traceId = pMsg->info.traceId; uv_buf_t wb = uv_buf_init((char*)pHead, msgLen); - tDebug("%s cli conn %p %s is send to %s:%d, local info %s:%d", CONN_GET_INST_LABEL(pConn), pConn, - TMSG_INFO(pHead->msgType), taosInetNtoa(pConn->addr.sin_addr), ntohs(pConn->addr.sin_port), - taosInetNtoa(pConn->localAddr.sin_addr), ntohs(pConn->localAddr.sin_port)); + + // char buf[64] = {0}; + // TRACE_TO_STR(&pMsg->info.traceId, buf); + STraceId* trace = &pMsg->info.traceId; + tGTrace("conn %p %s is sent to %s:%d, local info %s:%d", pConn, TMSG_INFO(pHead->msgType), + taosInetNtoa(pConn->addr.sin_addr), ntohs(pConn->addr.sin_port), taosInetNtoa(pConn->localAddr.sin_addr), + ntohs(pConn->localAddr.sin_port)); if (pHead->persist == 1) { CONN_SET_PERSIST_BY_APP(pConn); @@ -662,7 +670,7 @@ void cliConnCb(uv_connect_t* req, int status) { // impl later SCliConn* pConn = req->data; if (status != 0) { - tError("%s cli conn %p failed to connect server: %s", CONN_GET_INST_LABEL(pConn), pConn, uv_strerror(status)); + tError("%s conn %p failed to connect server: %s", CONN_GET_INST_LABEL(pConn), pConn, uv_strerror(status)); cliHandleExcept(pConn); return; } @@ -672,7 +680,7 @@ void cliConnCb(uv_connect_t* req, int status) { addrlen = sizeof(pConn->localAddr); uv_tcp_getsockname((uv_tcp_t*)pConn->stream, (struct sockaddr*)&pConn->localAddr, &addrlen); - tTrace("%s cli conn %p connect to server successfully", CONN_GET_INST_LABEL(pConn), pConn); + tTrace("%s conn %p connect to server successfully", CONN_GET_INST_LABEL(pConn), pConn); assert(pConn->stream == req->handle); cliSend(pConn); @@ -691,7 +699,7 @@ static void cliHandleQuit(SCliMsg* pMsg, SCliThrdObj* pThrd) { } static void cliHandleRelease(SCliMsg* pMsg, SCliThrdObj* pThrd) { SCliConn* conn = pMsg->msg.info.handle; - tDebug("%s cli conn %p start to release to inst", CONN_GET_INST_LABEL(conn), conn); + tDebug("%s conn %p start to release to inst", CONN_GET_INST_LABEL(conn), conn); if (T_REF_VAL_GET(conn) == 2) { transUnrefCliHandle(conn); @@ -716,15 +724,15 @@ SCliConn* cliGetConn(SCliMsg* pMsg, SCliThrdObj* pThrd) { if (pMsg->msg.info.handle != NULL) { conn = (SCliConn*)(pMsg->msg.info.handle); if (conn != NULL) { - tTrace("%s cli conn %p reused", CONN_GET_INST_LABEL(conn), conn); + tTrace("%s conn %p reused", CONN_GET_INST_LABEL(conn), conn); } } else { STransConnCtx* pCtx = pMsg->ctx; conn = getConnFromPool(pThrd->pool, EPSET_GET_INUSE_IP(&pCtx->epSet), EPSET_GET_INUSE_PORT(&pCtx->epSet)); if (conn != NULL) { - tTrace("%s cli conn %p get from conn pool", CONN_GET_INST_LABEL(conn), conn); + tTrace("%s conn %p get from conn pool", CONN_GET_INST_LABEL(conn), conn); } else { - tTrace("not found conn in conn pool %p", pThrd->pool); + tTrace("%s not found conn in conn pool %p", ((STrans*)pThrd->pTransInst)->label, pThrd->pool); } } return conn; @@ -750,6 +758,8 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrdObj* pThrd) { cliMayCvtFqdnToIp(&pCtx->epSet, &pThrd->cvtAddr); + transPrintEpSet(&pCtx->epSet); + SCliConn* conn = cliGetConn(pMsg, pThrd); if (conn != NULL) { conn->hThrdIdx = pCtx->hThrdIdx; @@ -768,11 +778,11 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrdObj* pThrd) { int ret = transSetConnOption((uv_tcp_t*)conn->stream); if (ret) { - tError("%s cli conn %p failed to set conn option, errmsg %s", pTransInst->label, conn, uv_err_name(ret)); + tError("%s conn %p failed to set conn option, errmsg %s", pTransInst->label, conn, uv_err_name(ret)); } int fd = taosCreateSocketWithTimeOutOpt(TRANS_CONN_TIMEOUT); if (fd == -1) { - tTrace("%s cli conn %p failed to create socket", pTransInst->label, conn); + tTrace("%s conn %p failed to create socket", pTransInst->label, conn); cliHandleExcept(conn); return; } @@ -782,10 +792,10 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrdObj* pThrd) { addr.sin_family = AF_INET; addr.sin_addr.s_addr = taosGetIpv4FromFqdn(conn->ip); addr.sin_port = (uint16_t)htons((uint16_t)conn->port); - tTrace("%s cli conn %p try to connect to %s:%d", pTransInst->label, conn, conn->ip, conn->port); + tTrace("%s conn %p try to connect to %s:%d", pTransInst->label, conn, conn->ip, conn->port); ret = uv_tcp_connect(&conn->connReq, (uv_tcp_t*)(conn->stream), (const struct sockaddr*)&addr, cliConnCb); if (ret != 0) { - tTrace("%s cli conn %p failed to connect to %s:%d, reason: %s", pTransInst->label, conn, conn->ip, conn->port, + tTrace("%s conn %p failed to connect to %s:%d, reason: %s", pTransInst->label, conn, conn->ip, conn->port, uv_err_name(ret)); cliHandleExcept(conn); return; @@ -944,14 +954,13 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { STrans* pTransInst = pThrd->pTransInst; if (pMsg == NULL || pMsg->ctx == NULL) { - tTrace("%s cli conn %p handle resp", pTransInst->label, pConn); + tTrace("%s conn %p handle resp", pTransInst->label, pConn); pTransInst->cfp(pTransInst->parent, pResp, NULL); return 0; } STransConnCtx* pCtx = pMsg->ctx; SEpSet* pEpSet = &pCtx->epSet; - transPrintEpSet(pEpSet); if (pCtx->retryCount == 0) { pCtx->origEpSet = pCtx->epSet; @@ -964,6 +973,7 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { (pResp->code == TSDB_CODE_RPC_NETWORK_UNAVAIL || pResp->code == TSDB_CODE_APP_NOT_READY || pResp->code == TSDB_CODE_NODE_NOT_DEPLOYED || pResp->code == TSDB_CODE_SYN_NOT_LEADER)) { pMsg->sent = 0; + tTrace("try to send req to next node"); pMsg->st = taosGetTimestampUs(); pCtx->retryCount += 1; if (pResp->code == TSDB_CODE_RPC_NETWORK_UNAVAIL) { @@ -974,22 +984,27 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { arg->param1 = pMsg; arg->param2 = pThrd; transDQSched(pThrd->delayQueue, doDelayTask, arg, TRANS_RETRY_INTERVAL); - tTrace("use local epset, current in use: %d, retry count:%d, limit: %d", pEpSet->inUse, pCtx->retryCount + 1, - pEpSet->numOfEps * 3); + transPrintEpSet(pEpSet); + tTrace("%s use local epset, inUse: %d, retry count:%d, limit: %d", pTransInst->label, pEpSet->inUse, + pCtx->retryCount + 1, pEpSet->numOfEps * 3); + transUnrefCliHandle(pConn); return -1; } } else if (pCtx->retryCount < TRANS_RETRY_COUNT_LIMIT) { if (pResp->contLen == 0) { pEpSet->inUse = (++pEpSet->inUse) % pEpSet->numOfEps; - tTrace("use local epset, current in use: %d, retry count:%d, limit: %d", pEpSet->inUse, pCtx->retryCount + 1, - TRANS_RETRY_COUNT_LIMIT); + transPrintEpSet(&pCtx->epSet); + tTrace("%s use local epset, inUse: %d, retry count:%d, limit: %d", pTransInst->label, pEpSet->inUse, + pCtx->retryCount + 1, TRANS_RETRY_COUNT_LIMIT); } else { SEpSet epSet = {0}; tDeserializeSEpSet(pResp->pCont, pResp->contLen, &epSet); pCtx->epSet = epSet; - tTrace("use remote epset, current in use: %d, retry count:%d, limit: %d", pEpSet->inUse, pCtx->retryCount + 1, - TRANS_RETRY_COUNT_LIMIT); + + transPrintEpSet(&pCtx->epSet); + tTrace("%s use remote epset, inUse: %d, retry count:%d, limit: %d", pTransInst->label, pEpSet->inUse, + pCtx->retryCount + 1, TRANS_RETRY_COUNT_LIMIT); } addConnToPool(pThrd->pool, pConn); @@ -1001,17 +1016,18 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { } } + STraceId* trace = &pResp->info.traceId; if (pCtx->pSem != NULL) { - tTrace("%s cli conn %p(sync) handle resp", pTransInst->label, pConn); + tGTrace("conn %p(sync) handle resp", pConn); if (pCtx->pRsp == NULL) { - tTrace("%s cli conn %p(sync) failed to resp, ignore", pTransInst->label, pConn); + tGTrace("conn %p(sync) failed to resp, ignore", pConn); } else { memcpy((char*)pCtx->pRsp, (char*)pResp, sizeof(*pResp)); } tsem_post(pCtx->pSem); pCtx->pRsp = NULL; } else { - tTrace("%s cli conn %p handle resp", pTransInst->label, pConn); + tGTrace("conn %p handle resp", pConn); if (pResp->code != 0 || pCtx->retryCount == 0 || transEpSetIsEqual(&pCtx->epSet, &pCtx->origEpSet)) { pTransInst->cfp(pTransInst->parent, pResp, NULL); } else { @@ -1039,6 +1055,7 @@ void transRefCliHandle(void* handle) { return; } int ref = T_REF_INC((SCliConn*)handle); + tTrace("%s conn %p ref %d", CONN_GET_INST_LABEL((SCliConn*)handle), handle, ref); UNUSED(ref); } void transUnrefCliHandle(void* handle) { @@ -1046,7 +1063,7 @@ void transUnrefCliHandle(void* handle) { return; } int ref = T_REF_DEC((SCliConn*)handle); - tDebug("%s cli conn %p ref %d", CONN_GET_INST_LABEL((SCliConn*)handle), handle, ref); + tTrace("%s conn %p ref %d", CONN_GET_INST_LABEL((SCliConn*)handle), handle, ref); if (ref == 0) { cliDestroyConn((SCliConn*)handle, true); } @@ -1067,16 +1084,17 @@ void transReleaseCliHandle(void* handle) { void transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransCtx* ctx) { STrans* pTransInst = (STrans*)shandle; - int index = CONN_HOST_THREAD_INDEX((SCliConn*)pReq->info.handle); - if (index == -1) { - index = cliRBChoseIdx(pTransInst); + int idx = CONN_HOST_THREAD_IDX((SCliConn*)pReq->info.handle); + if (idx == -1) { + idx = cliRBChoseIdx(pTransInst); } + TRACE_SET_MSGID(&pReq->info.traceId, tGenIdPI64()); STransConnCtx* pCtx = taosMemoryCalloc(1, sizeof(STransConnCtx)); pCtx->epSet = *pEpSet; pCtx->ahandle = pReq->info.ahandle; pCtx->msgType = pReq->msgType; - pCtx->hThrdIdx = index; + pCtx->hThrdIdx = idx; if (ctx != NULL) { pCtx->appCtx = *ctx; @@ -1089,27 +1107,30 @@ void transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STra cliMsg->st = taosGetTimestampUs(); cliMsg->type = Normal; - SCliThrdObj* thrd = ((SCliObj*)pTransInst->tcphandle)->pThreadObj[index]; + SCliThrdObj* thrd = ((SCliObj*)pTransInst->tcphandle)->pThreadObj[idx]; - tDebug("send request at thread:%d, threadID: %08" PRId64 ", msg: %p, dst: %s:%d, app:%p", index, thrd->pid, pReq, - EPSET_GET_INUSE_IP(&pCtx->epSet), EPSET_GET_INUSE_PORT(&pCtx->epSet), pReq->info.ahandle); + STraceId* trace = &pReq->info.traceId; + tGTrace("%s send request at thread:%08" PRId64 ", dst: %s:%d, app:%p", pTransInst->label, thrd->pid, + EPSET_GET_INUSE_IP(&pCtx->epSet), EPSET_GET_INUSE_PORT(&pCtx->epSet), pReq->info.ahandle); ASSERT(transSendAsync(thrd->asyncPool, &(cliMsg->q)) == 0); } void transSendRecv(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransMsg* pRsp) { STrans* pTransInst = (STrans*)shandle; - int index = CONN_HOST_THREAD_INDEX(pReq->info.handle); - if (index == -1) { - index = cliRBChoseIdx(pTransInst); + int idx = CONN_HOST_THREAD_IDX(pReq->info.handle); + if (idx == -1) { + idx = cliRBChoseIdx(pTransInst); } tsem_t* sem = taosMemoryCalloc(1, sizeof(tsem_t)); tsem_init(sem, 0, 0); + TRACE_SET_MSGID(&pReq->info.traceId, tGenIdPI64()); + STransConnCtx* pCtx = taosMemoryCalloc(1, sizeof(STransConnCtx)); pCtx->epSet = *pEpSet; pCtx->ahandle = pReq->info.ahandle; pCtx->msgType = pReq->msgType; - pCtx->hThrdIdx = index; + pCtx->hThrdIdx = idx; pCtx->pSem = sem; pCtx->pRsp = pRsp; @@ -1119,16 +1140,17 @@ void transSendRecv(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransM cliMsg->st = taosGetTimestampUs(); cliMsg->type = Normal; - SCliThrdObj* thrd = ((SCliObj*)pTransInst->tcphandle)->pThreadObj[index]; - tDebug("send request at thread:%d, threadID:%08" PRId64 ", msg: %p, dst: %s:%d, app:%p", index, thrd->pid, pReq, - EPSET_GET_INUSE_IP(&pCtx->epSet), EPSET_GET_INUSE_PORT(&pCtx->epSet), pReq->info.ahandle); + SCliThrdObj* thrd = ((SCliObj*)pTransInst->tcphandle)->pThreadObj[idx]; + + STraceId* trace = &pReq->info.traceId; + tGTrace("%s send request at thread:%08" PRId64 ", dst: %s:%d, app:%p", pTransInst->label, thrd->pid, + EPSET_GET_INUSE_IP(&pCtx->epSet), EPSET_GET_INUSE_PORT(&pCtx->epSet), pReq->info.ahandle); transSendAsync(thrd->asyncPool, &(cliMsg->q)); tsem_wait(sem); tsem_destroy(sem); taosMemoryFree(sem); } - /* * **/ @@ -1151,7 +1173,7 @@ void transSetDefaultAddr(void* ahandle, const char* ip, const char* fqdn) { cliMsg->type = Update; SCliThrdObj* thrd = ((SCliObj*)pTransInst->tcphandle)->pThreadObj[i]; - tDebug("update epset at thread:%d, threadID:%08" PRId64 "", i, thrd->pid); + tDebug("%s update epset at thread:%08" PRId64 "", pTransInst->label, thrd->pid); transSendAsync(thrd->asyncPool, &(cliMsg->q)); } diff --git a/source/libs/transport/src/transComm.c b/source/libs/transport/src/transComm.c index 9191b60518..8cd7f9d827 100644 --- a/source/libs/transport/src/transComm.c +++ b/source/libs/transport/src/transComm.c @@ -381,7 +381,6 @@ static void transDQTimeout(uv_timer_t* timer) { HeapNode* minNode = heapMin(queue->heap); if (minNode == NULL) break; SDelayTask* task = container_of(minNode, SDelayTask, node); - if (task->execTime <= current) { heapRemove(queue->heap, minNode); task->func(task->arg); @@ -444,7 +443,7 @@ int transDQSched(SDelayQueue* queue, void (*func)(void* arg), void* arg, uint64_ } } - tTrace("timer %p put task into queue, timeoutMs: %" PRIu64 "", queue->timer, timeoutMs); + tTrace("timer %p put task into delay queue, timeoutMs: %" PRIu64 "", queue->timer, timeoutMs); heapInsert(queue->heap, &task->node); uv_timer_start(queue->timer, transDQTimeout, timeoutMs, 0); return 0; @@ -455,11 +454,17 @@ void transPrintEpSet(SEpSet* pEpSet) { tTrace("NULL epset"); return; } - tTrace("epset begin inUse: %d", pEpSet->inUse); + char buf[512] = {0}; + int len = snprintf(buf, sizeof(buf), "epset { "); for (int i = 0; i < pEpSet->numOfEps; i++) { - tTrace("ip: %s, port: %d", pEpSet->eps[i].fqdn, pEpSet->eps[i].port); + if (i == pEpSet->numOfEps - 1) { + len += snprintf(buf + len, sizeof(buf) - len, "%d. %s:%d ", i, pEpSet->eps[i].fqdn, pEpSet->eps[i].port); + } else { + len += snprintf(buf + len, sizeof(buf) - len, "%d. %s:%d, ", i, pEpSet->eps[i].fqdn, pEpSet->eps[i].port); + } } - tTrace("epset end"); + len += snprintf(buf + len, sizeof(buf) - len, "}"); + tTrace("%s, inUse: %d", buf, pEpSet->inUse); } bool transEpSetIsEqual(SEpSet* a, SEpSet* b) { if (a->numOfEps != b->numOfEps || a->inUse != b->inUse) { diff --git a/source/libs/transport/src/transSvr.c b/source/libs/transport/src/transSvr.c index bd3781f9c7..f9558d7252 100644 --- a/source/libs/transport/src/transSvr.c +++ b/source/libs/transport/src/transSvr.c @@ -169,7 +169,7 @@ static bool addHandleToAcceptloop(void* arg); conn->status = ConnRelease; \ transClearBuffer(&conn->readBuf); \ transFreeMsg(transContFromHead((char*)head)); \ - tTrace("server conn %p received release request", conn); \ + tTrace("conn %p received release request", conn); \ \ STransMsg tmsg = {.code = 0, .info.handle = (void*)conn, .info.ahandle = NULL}; \ SSvrMsg* srvMsg = taosMemoryCalloc(1, sizeof(SSvrMsg)); \ @@ -181,7 +181,7 @@ static bool addHandleToAcceptloop(void* arg); return; \ } \ if (conn->regArg.init) { \ - tTrace("server conn %p release, notify server app", conn); \ + tTrace("conn %p release, notify server app", conn); \ STrans* pTransInst = conn->pTransInst; \ (*pTransInst->cfp)(pTransInst->parent, &(conn->regArg.msg), NULL); \ memset(&conn->regArg, 0, sizeof(conn->regArg)); \ @@ -209,25 +209,25 @@ static bool addHandleToAcceptloop(void* arg); #define ASYNC_CHECK_HANDLE(exh1, refId) \ do { \ if (refId > 0) { \ - tTrace("server handle step1"); \ + tTrace("handle step1"); \ SExHandle* exh2 = transAcquireExHandle(refMgt, refId); \ if (exh2 == NULL || refId != exh2->refId) { \ - tTrace("server handle %p except, may already freed, ignore msg, ref1: %" PRIu64 ", ref2 : %" PRIu64 "", exh1, \ + tTrace("handle %p except, may already freed, ignore msg, ref1: %" PRIu64 ", ref2 : %" PRIu64 "", exh1, \ exh2 ? exh2->refId : 0, refId); \ goto _return1; \ } \ } else if (refId == 0) { \ - tTrace("server handle step2"); \ + tTrace("handle step2"); \ SExHandle* exh2 = transAcquireExHandle(refMgt, refId); \ if (exh2 == NULL || refId != exh2->refId) { \ - tTrace("server handle %p except, may already freed, ignore msg, ref1: %" PRIu64 ", ref2 : %" PRIu64 "", exh1, \ - refId, exh2 ? exh2->refId : 0); \ + tTrace("handle %p except, may already freed, ignore msg, ref1: %" PRIu64 ", ref2 : %" PRIu64 "", exh1, refId, \ + exh2 ? exh2->refId : 0); \ goto _return1; \ } else { \ refId = exh1->refId; \ } \ } else if (refId < 0) { \ - tTrace("server handle step3"); \ + tTrace("handle step3"); \ goto _return2; \ } \ } while (0) @@ -270,29 +270,28 @@ static void uvHandleReq(SSvrConn* pConn) { transMsg.msgType = pHead->msgType; transMsg.code = pHead->code; - transMsg.info.ahandle = (void*)pHead->ahandle; - transMsg.info.handle = NULL; - - // transDestroyBuffer(&pConn->readBuf); transClearBuffer(&pConn->readBuf); + pConn->inType = pHead->msgType; if (pConn->status == ConnNormal) { if (pHead->persist == 1) { pConn->status = ConnAcquire; transRefSrvHandle(pConn); - tDebug("server conn %p acquired by server app", pConn); + tDebug("conn %p acquired by server app", pConn); } } + STraceId* trace = &pHead->traceId; if (pConn->status == ConnNormal && pHead->noResp == 0) { transRefSrvHandle(pConn); - tDebug("server conn %p %s received from %s:%d, local info:%s:%d, msg size:%d code:0x%x", pConn, - TMSG_INFO(transMsg.msgType), taosInetNtoa(pConn->addr.sin_addr), ntohs(pConn->addr.sin_port), - taosInetNtoa(pConn->localAddr.sin_addr), ntohs(pConn->localAddr.sin_port), transMsg.contLen, transMsg.code); + + tGTrace("conn %p %s received from %s:%d, local info: %s:%d, msg size: %d", pConn, TMSG_INFO(transMsg.msgType), + taosInetNtoa(pConn->addr.sin_addr), ntohs(pConn->addr.sin_port), taosInetNtoa(pConn->localAddr.sin_addr), + ntohs(pConn->localAddr.sin_port), transMsg.contLen); } else { - tDebug("server conn %p %s received from %s:%d, local info:%s:%d, msg size:%d, resp:%d code:0x%x", pConn, - TMSG_INFO(transMsg.msgType), taosInetNtoa(pConn->addr.sin_addr), ntohs(pConn->addr.sin_port), - taosInetNtoa(pConn->localAddr.sin_addr), ntohs(pConn->localAddr.sin_port), transMsg.contLen, pHead->noResp, - transMsg.code); + tGTrace("conn %p %s received from %s:%d, local info: %s:%d, msg size: %d, resp:%d, code: %d", pConn, + TMSG_INFO(transMsg.msgType), taosInetNtoa(pConn->addr.sin_addr), ntohs(pConn->addr.sin_port), + taosInetNtoa(pConn->localAddr.sin_addr), ntohs(pConn->localAddr.sin_port), transMsg.contLen, pHead->noResp, + transMsg.code); // no ref here } @@ -300,11 +299,14 @@ static void uvHandleReq(SSvrConn* pConn) { // 1. server application should not send resp on handle // 2. once send out data, cli conn released to conn pool immediately // 3. not mixed with persist - + transMsg.info.ahandle = (void*)pHead->ahandle; transMsg.info.handle = (void*)transAcquireExHandle(refMgt, pConn->refId); transMsg.info.refId = pConn->refId; - tTrace("server handle %p conn: %p translated to app, refId: %" PRIu64 "", transMsg.info.handle, pConn, pConn->refId); + transMsg.info.traceId = pHead->traceId; + + tGTrace("handle %p conn: %p translated to app, refId: %" PRIu64 "", transMsg.info.handle, pConn, pConn->refId); assert(transMsg.info.handle != NULL); + if (pHead->noResp == 1) { transMsg.info.refId = -1; } @@ -328,12 +330,12 @@ void uvOnRecvCb(uv_stream_t* cli, ssize_t nread, const uv_buf_t* buf) { SConnBuffer* pBuf = &conn->readBuf; if (nread > 0) { pBuf->len += nread; - tTrace("server conn %p read summary, total read: %d, current read: %d", conn, pBuf->len, (int)nread); + tTrace("conn %p total read: %d, current read: %d", conn, pBuf->len, (int)nread); if (transReadComplete(pBuf)) { - tTrace("server conn %p alread read complete packet", conn); + tTrace("conn %p alread read complete packet", conn); uvHandleReq(conn); } else { - tTrace("server %p read partial packet, continue to read", conn); + tTrace("conn %p read partial packet, continue to read", conn); } return; } @@ -341,12 +343,12 @@ void uvOnRecvCb(uv_stream_t* cli, ssize_t nread, const uv_buf_t* buf) { return; } - tError("server conn %p read error: %s", conn, uv_err_name(nread)); + tError("conn %p read error: %s", conn, uv_err_name(nread)); if (nread < 0) { conn->broken = true; if (conn->status == ConnAcquire) { if (conn->regArg.init) { - tTrace("server conn %p broken, notify server app", conn); + tTrace("conn %p broken, notify server app", conn); STrans* pTransInst = conn->pTransInst; (*pTransInst->cfp)(pTransInst->parent, &(conn->regArg.msg), NULL); memset(&conn->regArg, 0, sizeof(conn->regArg)); @@ -363,14 +365,14 @@ void uvAllocConnBufferCb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* b void uvOnTimeoutCb(uv_timer_t* handle) { // opt SSvrConn* pConn = handle->data; - tError("server conn %p time out", pConn); + tError("conn %p time out", pConn); } void uvOnSendCb(uv_write_t* req, int status) { SSvrConn* conn = req->data; // transClearBuffer(&conn->readBuf); if (status == 0) { - tTrace("server conn %p data already was written on stream", conn); + tTrace("conn %p data already was written on stream", conn); if (!transQueueEmpty(&conn->srvMsgs)) { SSvrMsg* msg = transQueuePop(&conn->srvMsgs); // if (msg->type == Release && conn->status != ConnNormal) { @@ -407,7 +409,7 @@ void uvOnSendCb(uv_write_t* req, int status) { } } } else { - tError("server conn %p failed to write data, %s", conn, uv_err_name(status)); + tError("conn %p failed to write data, %s", conn, uv_err_name(status)); conn->broken = true; transUnrefSrvHandle(conn); } @@ -424,8 +426,6 @@ static void uvOnPipeWriteCb(uv_write_t* req, int status) { } static void uvPrepareSendData(SSvrMsg* smsg, uv_buf_t* wb) { - tTrace("server conn %p prepare to send resp", smsg->pConn); - SSvrConn* pConn = smsg->pConn; STransMsg* pMsg = &smsg->msg; if (pMsg->pCont == 0) { @@ -434,6 +434,7 @@ static void uvPrepareSendData(SSvrMsg* smsg, uv_buf_t* wb) { } STransMsgHead* pHead = transHeadFromCont(pMsg->pCont); pHead->ahandle = (uint64_t)pMsg->info.ahandle; + pHead->traceId = pMsg->info.traceId; if (pConn->status == ConnNormal) { pHead->msgType = pConn->inType + 1; @@ -454,9 +455,11 @@ static void uvPrepareSendData(SSvrMsg* smsg, uv_buf_t* wb) { char* msg = (char*)pHead; int32_t len = transMsgLenFromCont(pMsg->contLen); - tDebug("server conn %p %s is sent to %s:%d, local info: %s:%d, msglen:%d", pConn, TMSG_INFO(pHead->msgType), - taosInetNtoa(pConn->addr.sin_addr), ntohs(pConn->addr.sin_port), taosInetNtoa(pConn->localAddr.sin_addr), - ntohs(pConn->localAddr.sin_port), len); + + STraceId* trace = &pMsg->info.traceId; + tGTrace("conn %p %s is sent to %s:%d, local info: %s:%d, msglen:%d", pConn, TMSG_INFO(pHead->msgType), + taosInetNtoa(pConn->addr.sin_addr), ntohs(pConn->addr.sin_port), taosInetNtoa(pConn->localAddr.sin_addr), + ntohs(pConn->localAddr.sin_port), len); pHead->msgLen = htonl(len); wb->base = msg; @@ -545,7 +548,7 @@ void uvWorkerAsyncCb(uv_async_t* handle) { int64_t refId = transMsg.info.refId; SExHandle* exh2 = transAcquireExHandle(refMgt, refId); if (exh2 == NULL || exh1 != exh2) { - tTrace("server handle except msg %p, ignore it", exh1); + tTrace("handle except msg %p, ignore it", exh1); transReleaseExHandle(refMgt, refId); destroySmsg(msg); continue; @@ -583,18 +586,18 @@ static void uvShutDownCb(uv_shutdown_t* req, int status) { static void uvWorkDoTask(uv_work_t* req) { // doing time-consumeing task // only auth conn currently, add more func later - tTrace("server conn %p start to be processed in BG Thread", req->data); + tTrace("conn %p start to be processed in BG Thread", req->data); return; } static void uvWorkAfterTask(uv_work_t* req, int status) { if (status != 0) { - tTrace("server conn %p failed to processed ", req->data); + tTrace("conn %p failed to processed ", req->data); } // Done time-consumeing task // add more func later // this func called in main loop - tTrace("server conn %p already processed ", req->data); + tTrace("conn %p already processed ", req->data); taosMemoryFree(req); } @@ -629,7 +632,7 @@ void uvOnAcceptCb(uv_stream_t* stream, int status) { } } void uvOnConnectionCb(uv_stream_t* q, ssize_t nread, const uv_buf_t* buf) { - tTrace("server connection coming"); + tTrace("connection coming"); if (nread < 0) { if (nread != UV_EOF) { tError("read error %s", uv_err_name(nread)); @@ -678,18 +681,18 @@ void uvOnConnectionCb(uv_stream_t* q, ssize_t nread, const uv_buf_t* buf) { if (uv_accept(q, (uv_stream_t*)(pConn->pTcp)) == 0) { uv_os_fd_t fd; uv_fileno((const uv_handle_t*)pConn->pTcp, &fd); - tTrace("server conn %p created, fd: %d", pConn, fd); + tTrace("conn %p created, fd: %d", pConn, fd); int addrlen = sizeof(pConn->addr); if (0 != uv_tcp_getpeername(pConn->pTcp, (struct sockaddr*)&pConn->addr, &addrlen)) { - tError("server conn %p failed to get peer info", pConn); + tError("conn %p failed to get peer info", pConn); transUnrefSrvHandle(pConn); return; } addrlen = sizeof(pConn->localAddr); if (0 != uv_tcp_getsockname(pConn->pTcp, (struct sockaddr*)&pConn->localAddr, &addrlen)) { - tError("server conn %p failed to get local info", pConn); + tError("conn %p failed to get local info", pConn); transUnrefSrvHandle(pConn); return; } @@ -798,7 +801,7 @@ static SSvrConn* createConn(void* hThrd) { pConn->refId = exh->refId; transRefSrvHandle(pConn); - tTrace("server handle %p, conn %p created, refId: %" PRId64 "", exh, pConn, pConn->refId); + tTrace("handle %p, conn %p created, refId: %" PRId64 "", exh, pConn, pConn->refId); return pConn; } @@ -809,7 +812,7 @@ static void destroyConn(SSvrConn* conn, bool clear) { transDestroyBuffer(&conn->readBuf); if (clear) { - tTrace("server conn %p to be destroyed", conn); + tTrace("conn %p to be destroyed", conn); // uv_shutdown_t* req = taosMemoryMalloc(sizeof(uv_shutdown_t)); uv_close((uv_handle_t*)conn->pTcp, uvDestroyConn); // uv_close(conn->pTcp) @@ -845,7 +848,7 @@ static void uvDestroyConn(uv_handle_t* handle) { transReleaseExHandle(refMgt, conn->refId); transRemoveExHandle(refMgt, conn->refId); - tDebug("server conn %p destroy", conn); + tDebug("conn %p destroy", conn); // uv_timer_stop(&conn->pTimer); transQueueDestroy(&conn->srvMsgs); @@ -974,18 +977,18 @@ void uvHandleRelease(SSvrMsg* msg, SWorkThrdObj* thrd) { uvStartSendRespInternal(msg); return; } else if (conn->status == ConnRelease || conn->status == ConnNormal) { - tDebug("server conn %p already released, ignore release-msg", conn); + tDebug("conn %p already released, ignore release-msg", conn); } destroySmsg(msg); } void uvHandleResp(SSvrMsg* msg, SWorkThrdObj* thrd) { // send msg to client - tDebug("server conn %p start to send resp (2/2)", msg->pConn); + tDebug("conn %p start to send resp (2/2)", msg->pConn); uvStartSendResp(msg); } void uvHandleRegister(SSvrMsg* msg, SWorkThrdObj* thrd) { SSvrConn* conn = msg->pConn; - tDebug("server conn %p register brokenlink callback", conn); + tDebug("conn %p register brokenlink callback", conn); if (conn->status == ConnAcquire) { if (!transQueuePush(&conn->srvMsgs, msg)) { return; @@ -994,7 +997,7 @@ void uvHandleRegister(SSvrMsg* msg, SWorkThrdObj* thrd) { conn->regArg.notifyCount = 0; conn->regArg.init = 1; conn->regArg.msg = msg->msg; - tDebug("server conn %p register brokenlink callback succ", conn); + tDebug("conn %p register brokenlink callback succ", conn); if (conn->broken) { STrans* pTransInst = conn->pTransInst; @@ -1062,7 +1065,7 @@ void transRefSrvHandle(void* handle) { return; } int ref = T_REF_INC((SSvrConn*)handle); - tDebug("server conn %p ref count: %d", handle, ref); + tDebug("conn %p ref count: %d", handle, ref); } void transUnrefSrvHandle(void* handle) { @@ -1070,7 +1073,7 @@ void transUnrefSrvHandle(void* handle) { return; } int ref = T_REF_DEC((SSvrConn*)handle); - tDebug("server conn %p ref count: %d", handle, ref); + tDebug("conn %p ref count: %d", handle, ref); if (ref == 0) { destroyConn((SSvrConn*)handle, true); } @@ -1091,16 +1094,16 @@ void transReleaseSrvHandle(void* handle) { m->msg = tmsg; m->type = Release; - tTrace("server conn %p start to release", exh->handle); + tTrace("conn %p start to release", exh->handle); transSendAsync(pThrd->asyncPool, &m->q); transReleaseExHandle(refMgt, refId); return; _return1: - tTrace("server handle %p failed to send to release handle", exh); + tTrace("handle %p failed to send to release handle", exh); transReleaseExHandle(refMgt, refId); return; _return2: - tTrace("server handle %p failed to send to release handle", exh); + tTrace("handle %p failed to send to release handle", exh); return; } void transSendResponse(const STransMsg* msg) { @@ -1118,17 +1121,19 @@ void transSendResponse(const STransMsg* msg) { SSvrMsg* m = taosMemoryCalloc(1, sizeof(SSvrMsg)); m->msg = tmsg; m->type = Normal; - tDebug("server conn %p start to send resp (1/2)", exh->handle); + + STraceId* trace = (STraceId*)&msg->info.traceId; + tGTrace("conn %p start to send resp (1/2)", exh->handle); transSendAsync(pThrd->asyncPool, &m->q); transReleaseExHandle(refMgt, refId); return; _return1: - tTrace("server handle %p failed to send resp", exh); + tTrace("handle %p failed to send resp", exh); rpcFreeCont(msg->pCont); transReleaseExHandle(refMgt, refId); return; _return2: - tTrace("server handle %p failed to send resp", exh); + tTrace("handle %p failed to send resp", exh); rpcFreeCont(msg->pCont); return; } @@ -1146,18 +1151,19 @@ void transRegisterMsg(const STransMsg* msg) { SSvrMsg* m = taosMemoryCalloc(1, sizeof(SSvrMsg)); m->msg = tmsg; m->type = Register; - tTrace("server conn %p start to register brokenlink callback", exh->handle); + + tTrace("conn %p start to register brokenlink callback", exh->handle); transSendAsync(pThrd->asyncPool, &m->q); transReleaseExHandle(refMgt, refId); return; _return1: - tTrace("server handle %p failed to send to register brokenlink", exh); + tTrace("handle %p failed to register brokenlink", exh); rpcFreeCont(msg->pCont); transReleaseExHandle(refMgt, refId); return; _return2: - tTrace("server handle %p failed to send to register brokenlink", exh); + tTrace("handle %p failed to register brokenlink", exh); rpcFreeCont(msg->pCont); } diff --git a/source/util/src/thash.c b/source/util/src/thash.c index 8bda59bba7..98762d8fb0 100644 --- a/source/util/src/thash.c +++ b/source/util/src/thash.c @@ -56,7 +56,7 @@ typedef struct SHashEntry { } SHashEntry; struct SHashObj { - SHashEntry **hashList; + SHashEntry ** hashList; size_t capacity; // number of slots int64_t size; // number of elements in hash table _hash_fn_t hashFp; // hash function @@ -65,7 +65,7 @@ struct SHashObj { SRWLatch lock; // read-write spin lock SHashLockTypeE type; // lock type bool enableUpdate; // enable update - SArray *pMemBlock; // memory block allocated for SHashEntry + SArray * pMemBlock; // memory block allocated for SHashEntry _hash_before_fn_t callbackFp; // function invoked before return the value to caller }; @@ -633,7 +633,7 @@ void taosHashTableResize(SHashObj *pHashObj) { } int64_t st = taosGetTimestampUs(); - void *pNewEntryList = taosMemoryRealloc(pHashObj->hashList, sizeof(void *) * newCapacity); + void * pNewEntryList = taosMemoryRealloc(pHashObj->hashList, sizeof(void *) * newCapacity); if (pNewEntryList == NULL) { // uDebug("cache resize failed due to out of memory, capacity remain:%zu", pHashObj->capacity); return; @@ -642,7 +642,7 @@ void taosHashTableResize(SHashObj *pHashObj) { pHashObj->hashList = pNewEntryList; size_t inc = newCapacity - pHashObj->capacity; - void *p = taosMemoryCalloc(inc, sizeof(SHashEntry)); + void * p = taosMemoryCalloc(inc, sizeof(SHashEntry)); for (int32_t i = 0; i < inc; ++i) { pHashObj->hashList[i + pHashObj->capacity] = (void *)((char *)p + i * sizeof(SHashEntry)); @@ -653,9 +653,9 @@ void taosHashTableResize(SHashObj *pHashObj) { pHashObj->capacity = newCapacity; for (int32_t idx = 0; idx < pHashObj->capacity; ++idx) { SHashEntry *pe = pHashObj->hashList[idx]; - SHashNode *pNode; - SHashNode *pNext; - SHashNode *pPrev = NULL; + SHashNode * pNode; + SHashNode * pNext; + SHashNode * pPrev = NULL; if (pe->num == 0) { assert(pe->next == NULL); diff --git a/source/util/src/ttrace.c b/source/util/src/ttrace.c new file mode 100644 index 0000000000..f183fd58fd --- /dev/null +++ b/source/util/src/ttrace.c @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +#include "ttrace.h" +#include "taos.h" +#include "thash.h" +#include "tuuid.h" + +// clang-format off +//static TdThreadOnce init = PTHREAD_ONCE_INIT; +//static void * ids = NULL; +//static TdThreadMutex mtx; +// +//void traceInit() { +// ids = taosHashInit(4096, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), true, HASH_ENTRY_LOCK); +// taosThreadMutexInit(&mtx, NULL); +//} +//void traceCreateEnv() { +// taosThreadOnce(&init, traceInit); +//} +//void traceDestroyEnv() { +// taosThreadMutexDestroy(&mtx); +// taosHashCleanup(ids); +//} +// +//STraceId traceInitId(STraceSubId *h, STraceSubId *l) { +// STraceId id = *h; +// id = ((id << 32) & 0xFFFFFFFF) | ((*l) & 0xFFFFFFFF); +// return id; +//} +//void traceId2Str(STraceId *id, char *buf) { +// int32_t f = (*id >> 32) & 0xFFFFFFFF; +// int32_t s = (*id) & 0xFFFFFFFF; +// sprintf(buf, "%d:%d", f, s); +//} +// +//void traceSetSubId(STraceId *id, STraceSubId *subId) { +// int32_t parent = ((*id >> 32) & 0xFFFFFFFF); +// taosThreadMutexLock(&mtx); +// taosHashPut(ids, subId, sizeof(*subId), &parent, sizeof(parent)); +// taosThreadMutexUnlock(&mtx); +//} +// +//STraceSubId traceGetParentId(STraceId *id) { +// int32_t parent = ((*id >> 32) & 0xFFFFFFFF); +// taosThreadMutexLock(&mtx); +// STraceSubId *p = taosHashGet(ids, (void *)&parent, sizeof(parent)); +// parent = *p; +// taosThreadMutexUnlock(&mtx); +// +// return parent; +//} +// +//STraceSubId traceGenSubId() { +// return tGenIdPI32(); +//} +//void traceSetRootId(STraceId *traceid, int64_t rootId) { +// traceId->rootId = rootId; +//} +//int64_t traceGetRootId(STraceId *traceId); +// +//void traceSetMsgId(STraceId *traceid, int64_t msgId); +//int64_t traceGetMsgId(STraceId *traceid); +// +//char *trace2Str(STraceId *id); +// +//void traceSetSubId(STraceId *id, int32_t *subId); +// clang-format on diff --git a/source/util/src/tuuid.c b/source/util/src/tuuid.c index 1f3cbd9573..9101aec949 100644 --- a/source/util/src/tuuid.c +++ b/source/util/src/tuuid.c @@ -49,7 +49,7 @@ int64_t tGenIdPI64(void) { } int64_t id; - + while (true) { int64_t ts = taosGetTimestampMs(); uint64_t pid = taosGetPId(); diff --git a/tools/taosadapter b/tools/taosadapter index 9ce3f5c98e..29926478ed 160000 --- a/tools/taosadapter +++ b/tools/taosadapter @@ -1 +1 @@ -Subproject commit 9ce3f5c98ef95d9c7c596c4ed7302b0ed69a92b2 +Subproject commit 29926478edd87533a043f91c1a9ed0e27671e626