From ead0389c288104fa9644c06e1061bf2ad4c33f26 Mon Sep 17 00:00:00 2001 From: Huo Linhe Date: Sat, 3 Dec 2022 13:37:46 +0800 Subject: [PATCH 01/97] fix: use taos-connector-rust in packaging scripts Ref: [TD-20926](https://jira.taosdata.com:18080/browse/TD-20926) --- packaging/tools/makeclient.sh | 2 +- packaging/tools/makepkg.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/tools/makeclient.sh b/packaging/tools/makeclient.sh index 4e32e9ad8f..edec338c55 100755 --- a/packaging/tools/makeclient.sh +++ b/packaging/tools/makeclient.sh @@ -187,7 +187,7 @@ if [[ $productName == "TDengine" ]]; then git clone --depth 1 https://github.com/taosdata/taos-connector-dotnet ${install_dir}/connector/dotnet rm -rf ${install_dir}/connector/dotnet/.git ||: # cp -r ${connector_dir}/nodejs ${install_dir}/connector - git clone --depth 1 https://github.com/taosdata/libtaos-rs ${install_dir}/connector/rust + git clone --depth 1 https://github.com/taosdata/taos-connector-rust ${install_dir}/connector/rust rm -rf ${install_dir}/connector/rust/.git ||: fi fi diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh index 2776683a24..4169bed3eb 100755 --- a/packaging/tools/makepkg.sh +++ b/packaging/tools/makepkg.sh @@ -318,7 +318,7 @@ if [ "$verMode" == "cluster" ] || [ "$verMode" == "cloud" ]; then git clone --depth 1 https://github.com/taosdata/taos-connector-dotnet ${install_dir}/connector/dotnet rm -rf ${install_dir}/connector/dotnet/.git ||: - git clone --depth 1 https://github.com/taosdata/libtaos-rs ${install_dir}/connector/rust + git clone --depth 1 https://github.com/taosdata/taos-connector-rust ${install_dir}/connector/rust rm -rf ${install_dir}/connector/rust/.git ||: # cp -r ${connector_dir}/python ${install_dir}/connector @@ -379,4 +379,4 @@ if [ -n "${taostools_bin_files}" ]; then fi fi -cd ${curr_dir} \ No newline at end of file +cd ${curr_dir} From ecc1782288e842b7d4f215b9007fe1e37d73510f Mon Sep 17 00:00:00 2001 From: sunpeng Date: Tue, 6 Dec 2022 11:15:14 +0800 Subject: [PATCH 02/97] docs: update taosadapter document for schemaless ttl --- docs/en/14-reference/04-taosadapter.md | 5 +++++ docs/zh/14-reference/04-taosadapter.md | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/docs/en/14-reference/04-taosadapter.md b/docs/en/14-reference/04-taosadapter.md index ad00584360..870cebb103 100644 --- a/docs/en/14-reference/04-taosadapter.md +++ b/docs/en/14-reference/04-taosadapter.md @@ -59,6 +59,7 @@ Usage of taosAdapter: --collectd.port int collectd server port. Env "TAOS_ADAPTER_COLLECTD_PORT" (default 6045) --collectd.user string collectd user. Env "TAOS_ADAPTER_COLLECTD_USER" (default "root") --collectd.worker int collectd write worker. Env "TAOS_ADAPTER_COLLECTD_WORKER" (default 10) + --collectd.ttl int collectd data ttl. Env "TAOS_ADAPTER_COLLECTD_TTL" (default 0, means no ttl) -c, --config string config path default /etc/taos/taosadapter.toml --cors.allowAllOrigins cors allow all origins. Env "TAOS_ADAPTER_CORS_ALLOW_ALL_ORIGINS" (default true) --cors.allowCredentials cors allow credentials. Env "TAOS_ADAPTER_CORS_ALLOW_Credentials" @@ -100,6 +101,7 @@ Usage of taosAdapter: --node_exporter.responseTimeout duration node_exporter response timeout. Env "TAOS_ADAPTER_NODE_EXPORTER_RESPONSE_TIMEOUT" (default 5s) --node_exporter.urls strings node_exporter urls. Env "TAOS_ADAPTER_NODE_EXPORTER_URLS" (default [http://localhost:9100]) --node_exporter.user string node_exporter user. Env "TAOS_ADAPTER_NODE_EXPORTER_USER" (default "root") + --node_exporter.ttl int node_exporter data ttl. Env "TAOS_ADAPTER_NODE_EXPORTER_TTL"(default 0, means no ttl) --opentsdb.enable enable opentsdb. Env "TAOS_ADAPTER_OPENTSDB_ENABLE" (default true) --opentsdb_telnet.batchSize int opentsdb_telnet batch size. Env "TAOS_ADAPTER_OPENTSDB_TELNET_BATCH_SIZE" (default 1) --opentsdb_telnet.dbs strings opentsdb_telnet db names. Env "TAOS_ADAPTER_OPENTSDB_TELNET_DBS" (default [opentsdb_telnet,collectd_tsdb,icinga2_tsdb,tcollector_tsdb]) @@ -110,6 +112,7 @@ Usage of taosAdapter: --opentsdb_telnet.ports ints opentsdb telnet tcp port. Env "TAOS_ADAPTER_OPENTSDB_TELNET_PORTS" (default [6046,6047,6048,6049]) --opentsdb_telnet.tcpKeepAlive enable tcp keep alive. Env "TAOS_ADAPTER_OPENTSDB_TELNET_TCP_KEEP_ALIVE" --opentsdb_telnet.user string opentsdb_telnet user. Env "TAOS_ADAPTER_OPENTSDB_TELNET_USER" (default "root") + --opentsdb_telnet.ttl int opentsdb_telnet data ttl. Env "TAOS_ADAPTER_OPENTSDB_TELNET_TTL"(default 0, means no ttl) --pool.idleTimeout duration Set idle connection timeout. Env "TAOS_ADAPTER_POOL_IDLE_TIMEOUT" (default 1h0m0s) --pool.maxConnect int max connections to taosd. Env "TAOS_ADAPTER_POOL_MAX_CONNECT" (default 4000) --pool.maxIdle int max idle connections to taosd. Env "TAOS_ADAPTER_POOL_MAX_IDLE" (default 4000) @@ -131,6 +134,7 @@ Usage of taosAdapter: --statsd.tcpKeepAlive enable tcp keep alive. Env "TAOS_ADAPTER_STATSD_TCP_KEEP_ALIVE" --statsd.user string statsd user. Env "TAOS_ADAPTER_STATSD_USER" (default "root") --statsd.worker int statsd write worker. Env "TAOS_ADAPTER_STATSD_WORKER" (default 10) + --statsd.ttl int statsd data ttl. Env "TAOS_ADAPTER_STATSD_TTL" (default 0, means no ttl) --taosConfigDir string load taos client config path. Env "TAOS_ADAPTER_TAOS_CONFIG_FILE" --version Print the version and exit ``` @@ -195,6 +199,7 @@ Support InfluxDB query parameters as follows. - `precision` The time precision used by TDengine - `u` TDengine user name - `p` TDengine password +- `ttl` The time to live of automatically created sub-table. This value cannot be updated. TDengine will use the ttl value of the frist data of sub-table to create sub-table. For more information, please refer [Create Table](/taos-sql/table/#create-table) Note: InfluxDB token authorization is not supported at present. Only Basic authorization and query parameter validation are supported. Example: curl --request POST http://127.0.0.1:6041/influxdb/v1/write?db=test --user "root:taosdata" --data-binary "measurement,host=host1 field1=2i,field2=2.0 1577836800000000000" diff --git a/docs/zh/14-reference/04-taosadapter.md b/docs/zh/14-reference/04-taosadapter.md index 4e1e7b7ace..0909ddf639 100644 --- a/docs/zh/14-reference/04-taosadapter.md +++ b/docs/zh/14-reference/04-taosadapter.md @@ -59,6 +59,7 @@ Usage of taosAdapter: --collectd.port int collectd server port. Env "TAOS_ADAPTER_COLLECTD_PORT" (default 6045) --collectd.user string collectd user. Env "TAOS_ADAPTER_COLLECTD_USER" (default "root") --collectd.worker int collectd write worker. Env "TAOS_ADAPTER_COLLECTD_WORKER" (default 10) + --collectd.ttl int collectd data ttl. Env "TAOS_ADAPTER_COLLECTD_TTL" (default 0, means no ttl) -c, --config string config path default /etc/taos/taosadapter.toml --cors.allowAllOrigins cors allow all origins. Env "TAOS_ADAPTER_CORS_ALLOW_ALL_ORIGINS" (default true) --cors.allowCredentials cors allow credentials. Env "TAOS_ADAPTER_CORS_ALLOW_Credentials" @@ -100,6 +101,7 @@ Usage of taosAdapter: --node_exporter.responseTimeout duration node_exporter response timeout. Env "TAOS_ADAPTER_NODE_EXPORTER_RESPONSE_TIMEOUT" (default 5s) --node_exporter.urls strings node_exporter urls. Env "TAOS_ADAPTER_NODE_EXPORTER_URLS" (default [http://localhost:9100]) --node_exporter.user string node_exporter user. Env "TAOS_ADAPTER_NODE_EXPORTER_USER" (default "root") + --node_exporter.ttl int node_exporter data ttl. Env "TAOS_ADAPTER_NODE_EXPORTER_TTL"(default 0, means no ttl) --opentsdb.enable enable opentsdb. Env "TAOS_ADAPTER_OPENTSDB_ENABLE" (default true) --opentsdb_telnet.batchSize int opentsdb_telnet batch size. Env "TAOS_ADAPTER_OPENTSDB_TELNET_BATCH_SIZE" (default 1) --opentsdb_telnet.dbs strings opentsdb_telnet db names. Env "TAOS_ADAPTER_OPENTSDB_TELNET_DBS" (default [opentsdb_telnet,collectd_tsdb,icinga2_tsdb,tcollector_tsdb]) @@ -110,6 +112,7 @@ Usage of taosAdapter: --opentsdb_telnet.ports ints opentsdb telnet tcp port. Env "TAOS_ADAPTER_OPENTSDB_TELNET_PORTS" (default [6046,6047,6048,6049]) --opentsdb_telnet.tcpKeepAlive enable tcp keep alive. Env "TAOS_ADAPTER_OPENTSDB_TELNET_TCP_KEEP_ALIVE" --opentsdb_telnet.user string opentsdb_telnet user. Env "TAOS_ADAPTER_OPENTSDB_TELNET_USER" (default "root") + --opentsdb_telnet.ttl int opentsdb_telnet data ttl. Env "TAOS_ADAPTER_OPENTSDB_TELNET_TTL"(default 0, means no ttl) --pool.idleTimeout duration Set idle connection timeout. Env "TAOS_ADAPTER_POOL_IDLE_TIMEOUT" (default 1h0m0s) --pool.maxConnect int max connections to taosd. Env "TAOS_ADAPTER_POOL_MAX_CONNECT" (default 4000) --pool.maxIdle int max idle connections to taosd. Env "TAOS_ADAPTER_POOL_MAX_IDLE" (default 4000) @@ -131,6 +134,7 @@ Usage of taosAdapter: --statsd.tcpKeepAlive enable tcp keep alive. Env "TAOS_ADAPTER_STATSD_TCP_KEEP_ALIVE" --statsd.user string statsd user. Env "TAOS_ADAPTER_STATSD_USER" (default "root") --statsd.worker int statsd write worker. Env "TAOS_ADAPTER_STATSD_WORKER" (default 10) + --statsd.ttl int statsd data ttl. Env "TAOS_ADAPTER_STATSD_TTL" (default 0, means no ttl) --taosConfigDir string load taos client config path. Env "TAOS_ADAPTER_TAOS_CONFIG_FILE" --version Print the version and exit ``` @@ -195,6 +199,7 @@ AllowWebSockets - `precision` TDengine 使用的时间精度 - `u` TDengine 用户名 - `p` TDengine 密码 +- `ttl` 自动创建的子表生命周期,以子表的第一条数据的 TTL 参数为准,不可更新。更多信息请参考[创建表文档](taos-sql/table/#创建表)的 TTL 参数。 注意: 目前不支持 InfluxDB 的 token 验证方式,仅支持 Basic 验证和查询参数验证。 示例: curl --request POST http://127.0.0.1:6041/influxdb/v1/write?db=test --user "root:taosdata" --data-binary "measurement,host=host1 field1=2i,field2=2.0 1577836800000000000" From bc36bc188efe36ab2a9042dc5641c5c7fee8a07b Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 8 Dec 2022 09:36:37 +0800 Subject: [PATCH 03/97] feat: event window --- include/libs/nodes/nodes.h | 5 +- include/libs/nodes/plannodes.h | 15 +- include/libs/nodes/querynodes.h | 7 + source/libs/nodes/src/nodesCloneFuncs.c | 10 + source/libs/nodes/src/nodesCodeFuncs.c | 36 + source/libs/nodes/src/nodesTraverseFuncs.c | 22 + source/libs/nodes/src/nodesUtilFuncs.c | 23 +- source/libs/parser/inc/parAst.h | 1 + source/libs/parser/inc/sql.y | 2 + source/libs/parser/src/parAstCreater.c | 14 + source/libs/parser/src/parTranslater.c | 11 + source/libs/parser/src/sql.c | 4505 ++++++++++---------- source/libs/planner/src/planLogicCreater.c | 31 + source/libs/planner/src/planPhysiCreater.c | 29 + source/libs/planner/src/planSpliter.c | 14 + 15 files changed, 2478 insertions(+), 2247 deletions(-) diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index f94e0c98dc..c658714d02 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -112,6 +112,7 @@ typedef enum ENodeType { QUERY_NODE_COLUMN_REF, QUERY_NODE_WHEN_THEN, QUERY_NODE_CASE_WHEN, + QUERY_NODE_EVENT_WINDOW, // Statement nodes are used in parser and planner module. QUERY_NODE_SET_OPERATOR = 100, @@ -265,7 +266,9 @@ typedef enum ENodeType { QUERY_NODE_PHYSICAL_PLAN_QUERY_INSERT, QUERY_NODE_PHYSICAL_PLAN_DELETE, QUERY_NODE_PHYSICAL_SUBPLAN, - QUERY_NODE_PHYSICAL_PLAN + QUERY_NODE_PHYSICAL_PLAN, + QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT, + QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT } ENodeType; /** diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h index d62bdb93cf..0a2d76d097 100644 --- a/include/libs/nodes/plannodes.h +++ b/include/libs/nodes/plannodes.h @@ -185,7 +185,12 @@ typedef struct SMergeLogicNode { bool groupSort; } SMergeLogicNode; -typedef enum EWindowType { WINDOW_TYPE_INTERVAL = 1, WINDOW_TYPE_SESSION, WINDOW_TYPE_STATE } EWindowType; +typedef enum EWindowType { + WINDOW_TYPE_INTERVAL = 1, + WINDOW_TYPE_SESSION, + WINDOW_TYPE_STATE, + WINDOW_TYPE_EVENT +} EWindowType; typedef enum EWindowAlgorithm { INTERVAL_ALGO_HASH = 1, @@ -212,6 +217,8 @@ typedef struct SWindowLogicNode { SNode* pTspk; SNode* pTsEnd; SNode* pStateExpr; + SNode* pStartCond; + SNode* pEndCond; int8_t triggerType; int64_t watermark; int64_t deleteMark; @@ -498,6 +505,12 @@ typedef struct SStateWinodwPhysiNode { typedef SStateWinodwPhysiNode SStreamStateWinodwPhysiNode; +typedef struct SEventWinodwPhysiNode { + SWinodwPhysiNode window; + SNode* pStartCond; + SNode* pEndCond; +} SEventWinodwPhysiNode; + typedef struct SSortPhysiNode { SPhysiNode node; SNodeList* pExprs; // these are expression list of order_by_clause and parameter expression of aggregate function diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index 9f980fd0db..5805f4968b 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -223,6 +223,13 @@ typedef struct SIntervalWindowNode { SNode* pFill; } SIntervalWindowNode; +typedef struct SEventWindowNode { + ENodeType type; // QUERY_NODE_EVENT_WINDOW + SNode* pCol; // timestamp primary key + SNode* pStartCond; + SNode* pEndCond; +} SEventWindowNode; + typedef enum EFillMode { FILL_MODE_NONE = 1, FILL_MODE_VALUE, diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c index 5d20dbd764..cfbab6c652 100644 --- a/source/libs/nodes/src/nodesCloneFuncs.c +++ b/source/libs/nodes/src/nodesCloneFuncs.c @@ -295,6 +295,13 @@ static int32_t stateWindowNodeCopy(const SStateWindowNode* pSrc, SStateWindowNod return TSDB_CODE_SUCCESS; } +static int32_t eventWindowNodeCopy(const SEventWindowNode* pSrc, SEventWindowNode* pDst) { + CLONE_NODE_FIELD(pCol); + CLONE_NODE_FIELD(pStartCond); + CLONE_NODE_FIELD(pEndCond); + return TSDB_CODE_SUCCESS; +} + static int32_t sessionWindowNodeCopy(const SSessionWindowNode* pSrc, SSessionWindowNode* pDst) { CLONE_NODE_FIELD_EX(pCol, SColumnNode*); CLONE_NODE_FIELD_EX(pGap, SValueNode*); @@ -709,6 +716,9 @@ SNode* nodesCloneNode(const SNode* pNode) { case QUERY_NODE_STATE_WINDOW: code = stateWindowNodeCopy((const SStateWindowNode*)pNode, (SStateWindowNode*)pDst); break; + case QUERY_NODE_EVENT_WINDOW: + code = eventWindowNodeCopy((const SEventWindowNode*)pNode, (SEventWindowNode*)pDst); + break; case QUERY_NODE_SESSION_WINDOW: code = sessionWindowNodeCopy((const SSessionWindowNode*)pNode, (SSessionWindowNode*)pDst); break; diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index d062ed34c4..0f9b3247e1 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -85,6 +85,8 @@ const char* nodesNodeName(ENodeType type) { return "WhenThen"; case QUERY_NODE_CASE_WHEN: return "CaseWhen"; + case QUERY_NODE_EVENT_WINDOW: + return "EventWindow"; case QUERY_NODE_SET_OPERATOR: return "SetOperator"; case QUERY_NODE_SELECT_STMT: @@ -3660,6 +3662,36 @@ static int32_t jsonToSessionWindowNode(const SJson* pJson, void* pObj) { return code; } +static const char* jkEventWindowTsPrimaryKey = "TsPrimaryKey"; +static const char* jkEventWindowStartCond = "StartCond"; +static const char* jkEventWindowEndCond = "EndCond"; + +static int32_t eventWindowNodeToJson(const void* pObj, SJson* pJson) { + const SEventWindowNode* pNode = (const SEventWindowNode*)pObj; + + int32_t code = tjsonAddObject(pJson, jkEventWindowTsPrimaryKey, nodeToJson, pNode->pCol); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkEventWindowStartCond, nodeToJson, pNode->pStartCond); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkEventWindowEndCond, nodeToJson, pNode->pEndCond); + } + return code; +} + +static int32_t jsonToEventWindowNode(const SJson* pJson, void* pObj) { + SEventWindowNode* pNode = (SEventWindowNode*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkEventWindowTsPrimaryKey, &pNode->pCol); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkEventWindowStartCond, &pNode->pStartCond); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkEventWindowEndCond, &pNode->pEndCond); + } + return code; +} + static const char* jkIntervalWindowInterval = "Interval"; static const char* jkIntervalWindowOffset = "Offset"; static const char* jkIntervalWindowSliding = "Sliding"; @@ -4615,6 +4647,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return whenThenNodeToJson(pObj, pJson); case QUERY_NODE_CASE_WHEN: return caseWhenNodeToJson(pObj, pJson); + case QUERY_NODE_EVENT_WINDOW: + return eventWindowNodeToJson(pObj, pJson); case QUERY_NODE_SET_OPERATOR: return setOperatorToJson(pObj, pJson); case QUERY_NODE_SELECT_STMT: @@ -4787,6 +4821,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToWhenThenNode(pJson, pObj); case QUERY_NODE_CASE_WHEN: return jsonToCaseWhenNode(pJson, pObj); + case QUERY_NODE_EVENT_WINDOW: + return jsonToEventWindowNode(pJson, pObj); case QUERY_NODE_SET_OPERATOR: return jsonToSetOperator(pJson, pObj); case QUERY_NODE_SELECT_STMT: diff --git a/source/libs/nodes/src/nodesTraverseFuncs.c b/source/libs/nodes/src/nodesTraverseFuncs.c index 106812d55f..ce575ede8a 100644 --- a/source/libs/nodes/src/nodesTraverseFuncs.c +++ b/source/libs/nodes/src/nodesTraverseFuncs.c @@ -165,6 +165,17 @@ static EDealRes dispatchExpr(SNode* pNode, ETraversalOrder order, FNodeWalker wa } break; } + case QUERY_NODE_EVENT_WINDOW: { + SEventWindowNode* pEvent = (SEventWindowNode*)pNode; + res = walkExpr(pEvent->pCol, order, walker, pContext); + if (DEAL_RES_ERROR != res && DEAL_RES_END != res) { + res = walkExpr(pEvent->pStartCond, order, walker, pContext); + } + if (DEAL_RES_ERROR != res && DEAL_RES_END != res) { + res = walkExpr(pEvent->pEndCond, order, walker, pContext); + } + break; + } default: break; } @@ -329,6 +340,17 @@ static EDealRes rewriteExpr(SNode** pRawNode, ETraversalOrder order, FNodeRewrit } break; } + case QUERY_NODE_EVENT_WINDOW: { + SEventWindowNode* pEvent = (SEventWindowNode*)pNode; + res = rewriteExpr(&pEvent->pCol, order, rewriter, pContext); + if (DEAL_RES_ERROR != res && DEAL_RES_END != res) { + res = rewriteExpr(&pEvent->pStartCond, order, rewriter, pContext); + } + if (DEAL_RES_ERROR != res && DEAL_RES_END != res) { + res = rewriteExpr(&pEvent->pEndCond, order, rewriter, pContext); + } + break; + } default: break; } diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index cd5ae7ad6e..2f04375191 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -299,6 +299,8 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SWhenThenNode)); case QUERY_NODE_CASE_WHEN: return makeNode(type, sizeof(SCaseWhenNode)); + case QUERY_NODE_EVENT_WINDOW: + return makeNode(type, sizeof(SEventWindowNode)); case QUERY_NODE_SET_OPERATOR: return makeNode(type, sizeof(SSetOperator)); case QUERY_NODE_SELECT_STMT: @@ -765,16 +767,23 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_COLUMN_REF: // no pointer field break; case QUERY_NODE_WHEN_THEN: { - SWhenThenNode* pStmt = (SWhenThenNode*)pNode; - nodesDestroyNode(pStmt->pWhen); - nodesDestroyNode(pStmt->pThen); + SWhenThenNode* pWhenThen = (SWhenThenNode*)pNode; + nodesDestroyNode(pWhenThen->pWhen); + nodesDestroyNode(pWhenThen->pThen); break; } case QUERY_NODE_CASE_WHEN: { - SCaseWhenNode* pStmt = (SCaseWhenNode*)pNode; - nodesDestroyNode(pStmt->pCase); - nodesDestroyNode(pStmt->pElse); - nodesDestroyList(pStmt->pWhenThenList); + SCaseWhenNode* pCaseWhen = (SCaseWhenNode*)pNode; + nodesDestroyNode(pCaseWhen->pCase); + nodesDestroyNode(pCaseWhen->pElse); + nodesDestroyList(pCaseWhen->pWhenThenList); + break; + } + case QUERY_NODE_EVENT_WINDOW: { + SEventWindowNode* pEvent = (SEventWindowNode*)pNode; + nodesDestroyNode(pEvent->pCol); + nodesDestroyNode(pEvent->pStartCond); + nodesDestroyNode(pEvent->pEndCond); break; } case QUERY_NODE_SET_OPERATOR: { diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index ef67c7536f..c74ec9c147 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -116,6 +116,7 @@ SNode* createLimitNode(SAstCreateContext* pCxt, const SToken* pLimit, const STok SNode* createOrderByExprNode(SAstCreateContext* pCxt, SNode* pExpr, EOrder order, ENullOrder nullOrder); SNode* createSessionWindowNode(SAstCreateContext* pCxt, SNode* pCol, SNode* pGap); SNode* createStateWindowNode(SAstCreateContext* pCxt, SNode* pExpr); +SNode* createEventWindowNode(SAstCreateContext* pCxt, SNode* pStartCond, SNode* pEndCond); SNode* createIntervalWindowNode(SAstCreateContext* pCxt, SNode* pInterval, SNode* pOffset, SNode* pSliding, SNode* pFill); SNode* createFillNode(SAstCreateContext* pCxt, EFillMode mode, SNode* pValues); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index b060f7fc83..bff28efa62 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -964,6 +964,8 @@ twindow_clause_opt(A) ::= twindow_clause_opt(A) ::= INTERVAL NK_LP duration_literal(B) NK_COMMA duration_literal(C) NK_RP sliding_opt(D) fill_opt(E). { A = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C), D, E); } +twindow_clause_opt(A) ::= + EVENT_WINDOW START WITH search_condition(B) END WITH search_condition(C). { A = createEventWindowNode(pCxt, B, C); } sliding_opt(A) ::= . { A = NULL; } sliding_opt(A) ::= SLIDING NK_LP duration_literal(B) NK_RP. { A = releaseRawExprNode(pCxt, B); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index b23adaabb5..446f758ed7 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -605,6 +605,20 @@ SNode* createStateWindowNode(SAstCreateContext* pCxt, SNode* pExpr) { return (SNode*)state; } +SNode* createEventWindowNode(SAstCreateContext* pCxt, SNode* pStartCond, SNode* pEndCond) { + CHECK_PARSER_STATUS(pCxt); + SEventWindowNode* pEvent = (SEventWindowNode*)nodesMakeNode(QUERY_NODE_EVENT_WINDOW); + CHECK_OUT_OF_MEM(pEvent); + pEvent->pCol = createPrimaryKeyCol(pCxt, NULL); + if (NULL == pEvent->pCol) { + nodesDestroyNode((SNode*)pEvent); + CHECK_OUT_OF_MEM(NULL); + } + pEvent->pStartCond = pStartCond; + pEvent->pEndCond = pEndCond; + return (SNode*)pEvent; +} + SNode* createIntervalWindowNode(SAstCreateContext* pCxt, SNode* pInterval, SNode* pOffset, SNode* pSliding, SNode* pFill) { CHECK_PARSER_STATUS(pCxt); diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 85a4e70124..8c0795af6e 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -3143,6 +3143,15 @@ static int32_t translateSessionWindow(STranslateContext* pCxt, SSelectStmt* pSel return TSDB_CODE_SUCCESS; } +static int32_t translateEventWindow(STranslateContext* pCxt, SSelectStmt* pSelect) { + if (QUERY_NODE_TEMP_TABLE == nodeType(pSelect->pFromTable) && + !isGlobalTimeLineQuery(((STempTableNode*)pSelect->pFromTable)->pSubquery)) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TIMELINE_QUERY, + "EVENT_WINDOW requires valid time series input"); + } + return TSDB_CODE_SUCCESS; +} + static int32_t translateSpecificWindow(STranslateContext* pCxt, SSelectStmt* pSelect) { switch (nodeType(pSelect->pWindow)) { case QUERY_NODE_STATE_WINDOW: @@ -3151,6 +3160,8 @@ static int32_t translateSpecificWindow(STranslateContext* pCxt, SSelectStmt* pSe return translateSessionWindow(pCxt, pSelect); case QUERY_NODE_INTERVAL_WINDOW: return translateIntervalWindow(pCxt, pSelect); + case QUERY_NODE_EVENT_WINDOW: + return translateEventWindow(pCxt, pSelect); default: break; } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index b4d4a3457e..7c8934b2b8 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -104,26 +104,26 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 457 +#define YYNOCODE 459 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; EOperatorType yy20; - int8_t yy33; - SAlterOption yy123; - SNode* yy148; - SToken yy199; - EFillMode yy334; - bool yy397; - SNodeList* yy404; - EJoinType yy470; - ENullOrder yy499; - int64_t yy525; - SDataType yy530; - int32_t yy706; - EOrder yy898; + SNode* yy74; + ENullOrder yy109; + SToken yy317; + EOrder yy326; + bool yy335; + int8_t yy449; + int64_t yy531; + EJoinType yy630; + SAlterOption yy767; + EFillMode yy828; + int32_t yy856; + SNodeList* yy874; + SDataType yy898; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -139,17 +139,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 710 -#define YYNRULE 540 -#define YYNTOKEN 322 -#define YY_MAX_SHIFT 709 -#define YY_MIN_SHIFTREDUCE 1052 -#define YY_MAX_SHIFTREDUCE 1591 -#define YY_ERROR_ACTION 1592 -#define YY_ACCEPT_ACTION 1593 -#define YY_NO_ACTION 1594 -#define YY_MIN_REDUCE 1595 -#define YY_MAX_REDUCE 2134 +#define YYNSTATE 716 +#define YYNRULE 541 +#define YYNTOKEN 324 +#define YY_MAX_SHIFT 715 +#define YY_MIN_SHIFTREDUCE 1059 +#define YY_MAX_SHIFTREDUCE 1599 +#define YY_ERROR_ACTION 1600 +#define YY_ACCEPT_ACTION 1601 +#define YY_NO_ACTION 1602 +#define YY_MIN_REDUCE 1603 +#define YY_MAX_REDUCE 2143 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -216,694 +216,714 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2410) +#define YY_ACTTAB_COUNT (2586) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1950, 458, 157, 459, 1631, 566, 167, 1703, 467, 2105, - /* 10 */ 459, 1631, 43, 41, 1522, 365, 1651, 2110, 1796, 1798, - /* 20 */ 360, 2105, 1373, 1595, 565, 173, 598, 332, 1850, 2106, - /* 30 */ 567, 1968, 1741, 1452, 405, 1371, 1664, 2109, 514, 581, - /* 40 */ 52, 2106, 2108, 1933, 1919, 399, 614, 122, 121, 120, - /* 50 */ 119, 118, 117, 116, 115, 114, 464, 1750, 1447, 597, - /* 60 */ 36, 35, 460, 16, 42, 40, 39, 38, 37, 1949, - /* 70 */ 1379, 1929, 1935, 1984, 318, 597, 100, 1951, 618, 1953, - /* 80 */ 1954, 613, 608, 608, 258, 597, 1526, 546, 170, 1938, - /* 90 */ 2037, 2105, 1398, 476, 354, 2033, 12, 2052, 1462, 1950, - /* 100 */ 1933, 513, 512, 511, 1398, 1968, 2111, 173, 175, 128, - /* 110 */ 507, 2106, 567, 560, 506, 505, 2063, 158, 706, 1607, - /* 120 */ 504, 510, 58, 2049, 85, 561, 503, 598, 1929, 1935, - /* 130 */ 1968, 1398, 1085, 1454, 1455, 1104, 1593, 1103, 615, 608, - /* 140 */ 2110, 123, 1846, 1919, 2105, 614, 43, 41, 497, 1558, - /* 150 */ 210, 46, 559, 181, 360, 1727, 1373, 1399, 1750, 1950, - /* 160 */ 2109, 46, 1428, 1437, 2106, 2107, 1105, 1452, 1949, 1371, - /* 170 */ 598, 1087, 1984, 1090, 1091, 100, 1951, 618, 1953, 1954, - /* 180 */ 613, 1374, 608, 1372, 123, 134, 62, 141, 2008, 2037, - /* 190 */ 1968, 502, 1447, 354, 2033, 33, 274, 16, 581, 375, - /* 200 */ 1398, 1750, 652, 1919, 1379, 614, 1377, 1378, 1398, 1427, - /* 210 */ 1430, 1431, 1432, 1433, 1434, 1435, 1436, 610, 606, 1445, - /* 220 */ 1446, 1448, 1449, 1450, 1451, 1453, 1456, 2, 1949, 97, - /* 230 */ 12, 2110, 1984, 1950, 1429, 100, 1951, 618, 1953, 1954, - /* 240 */ 613, 546, 608, 132, 1397, 2105, 1429, 170, 1400, 2037, - /* 250 */ 556, 1742, 706, 354, 2033, 42, 40, 39, 38, 37, - /* 260 */ 2111, 173, 9, 650, 1968, 2106, 567, 1454, 1455, 1797, - /* 270 */ 1798, 176, 615, 1309, 1310, 2064, 58, 1919, 58, 614, - /* 280 */ 43, 41, 146, 145, 647, 646, 645, 143, 360, 1400, - /* 290 */ 1373, 58, 1399, 1950, 509, 508, 1428, 1437, 1618, 578, - /* 300 */ 176, 1452, 1949, 1371, 457, 598, 1984, 462, 1637, 100, - /* 310 */ 1951, 618, 1953, 1954, 613, 1374, 608, 1372, 225, 178, - /* 320 */ 643, 2012, 169, 2037, 1968, 1581, 1447, 354, 2033, 1483, - /* 330 */ 131, 16, 615, 562, 557, 1790, 1750, 1919, 1379, 614, - /* 340 */ 1377, 1378, 1919, 1427, 1430, 1431, 1432, 1433, 1434, 1435, - /* 350 */ 1436, 610, 606, 1445, 1446, 1448, 1449, 1450, 1451, 1453, - /* 360 */ 1456, 2, 1949, 9, 12, 1950, 1984, 677, 675, 100, - /* 370 */ 1951, 618, 1953, 1954, 613, 398, 608, 397, 82, 320, - /* 380 */ 58, 2125, 531, 2037, 529, 80, 706, 354, 2033, 255, - /* 390 */ 2045, 577, 257, 124, 576, 441, 1968, 2105, 2071, 127, - /* 400 */ 30, 1454, 1455, 541, 612, 1256, 1257, 406, 1745, 1919, - /* 410 */ 1488, 614, 565, 173, 43, 41, 1457, 2106, 567, 585, - /* 420 */ 407, 1379, 360, 1725, 1373, 176, 47, 176, 1846, 351, - /* 430 */ 1428, 1437, 1861, 257, 1949, 1452, 185, 1371, 1984, 183, - /* 440 */ 176, 310, 1951, 618, 1953, 1954, 613, 650, 608, 1374, - /* 450 */ 2003, 1372, 466, 189, 188, 462, 1637, 36, 35, 664, - /* 460 */ 1447, 42, 40, 39, 38, 37, 146, 145, 647, 646, - /* 470 */ 645, 143, 1379, 77, 1377, 1378, 76, 1427, 1430, 1431, - /* 480 */ 1432, 1433, 1434, 1435, 1436, 610, 606, 1445, 1446, 1448, - /* 490 */ 1449, 1450, 1451, 1453, 1456, 2, 598, 1617, 44, 598, - /* 500 */ 1739, 1950, 1803, 513, 512, 511, 1398, 598, 1803, 353, - /* 510 */ 403, 128, 507, 404, 1735, 364, 506, 505, 1801, 1616, - /* 520 */ 706, 413, 504, 510, 1801, 352, 363, 1750, 503, 176, - /* 530 */ 1750, 650, 1968, 155, 155, 1454, 1455, 1104, 1750, 1103, - /* 540 */ 615, 1919, 1752, 1752, 527, 1919, 1538, 614, 43, 41, - /* 550 */ 146, 145, 647, 646, 645, 143, 360, 525, 1373, 523, - /* 560 */ 1737, 1950, 598, 1919, 1428, 1437, 394, 1173, 1105, 1452, - /* 570 */ 1949, 1371, 598, 578, 1984, 176, 427, 100, 1951, 618, - /* 580 */ 1953, 1954, 613, 1374, 608, 1372, 428, 396, 392, 2010, - /* 590 */ 1733, 2037, 1968, 1750, 1447, 354, 2033, 226, 230, 9, - /* 600 */ 615, 7, 1175, 1750, 131, 1919, 1379, 614, 1377, 1378, - /* 610 */ 80, 1427, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 610, - /* 620 */ 606, 1445, 1446, 1448, 1449, 1450, 1451, 1453, 1456, 2, - /* 630 */ 1949, 167, 44, 1746, 1984, 366, 605, 100, 1951, 618, - /* 640 */ 1953, 1954, 613, 155, 608, 265, 266, 1615, 1429, 2125, - /* 650 */ 264, 2037, 1752, 1851, 706, 354, 2033, 1614, 1950, 1728, - /* 660 */ 1350, 1351, 580, 171, 2045, 2046, 2099, 129, 2050, 1454, - /* 670 */ 1455, 36, 35, 6, 29, 42, 40, 39, 38, 37, - /* 680 */ 36, 35, 43, 41, 42, 40, 39, 38, 37, 1968, - /* 690 */ 360, 1919, 1373, 91, 598, 598, 2077, 615, 1428, 1437, - /* 700 */ 1613, 1919, 1919, 1452, 614, 1371, 1803, 25, 474, 475, - /* 710 */ 39, 38, 37, 329, 600, 1743, 2009, 1374, 602, 1372, - /* 720 */ 2009, 476, 1801, 609, 155, 1750, 1750, 1949, 1447, 227, - /* 730 */ 1612, 1984, 1780, 1753, 159, 1951, 618, 1953, 1954, 613, - /* 740 */ 1379, 608, 1377, 1378, 1919, 1427, 1430, 1431, 1432, 1433, - /* 750 */ 1434, 1435, 1436, 610, 606, 1445, 1446, 1448, 1449, 1450, - /* 760 */ 1451, 1453, 1456, 2, 36, 35, 12, 1950, 42, 40, - /* 770 */ 39, 38, 37, 1846, 1919, 547, 2074, 566, 1548, 1473, - /* 780 */ 317, 2105, 1396, 2052, 187, 598, 642, 1611, 706, 435, - /* 790 */ 1610, 1609, 448, 1596, 1606, 447, 565, 173, 1968, 1747, - /* 800 */ 1726, 2106, 567, 1454, 1455, 1605, 615, 1608, 1604, 2048, - /* 810 */ 419, 1919, 449, 614, 113, 421, 1750, 112, 111, 110, - /* 820 */ 109, 108, 107, 106, 105, 104, 553, 1546, 1547, 1549, - /* 830 */ 1550, 1919, 1428, 1437, 1919, 1919, 532, 665, 1919, 1720, - /* 840 */ 1984, 598, 598, 306, 1951, 618, 1953, 1954, 613, 1919, - /* 850 */ 608, 1374, 1919, 1372, 1603, 139, 367, 333, 1661, 36, - /* 860 */ 35, 1519, 652, 42, 40, 39, 38, 37, 2109, 409, - /* 870 */ 1401, 1401, 1750, 1750, 2052, 1602, 1377, 1378, 1515, 1427, - /* 880 */ 1430, 1431, 1432, 1433, 1434, 1435, 1436, 610, 606, 1445, - /* 890 */ 1446, 1448, 1449, 1450, 1451, 1453, 1456, 2, 1919, 445, - /* 900 */ 2047, 1704, 440, 439, 438, 437, 434, 433, 432, 431, - /* 910 */ 430, 426, 425, 424, 423, 334, 416, 415, 414, 1919, - /* 920 */ 411, 410, 331, 683, 682, 681, 680, 370, 144, 679, - /* 930 */ 678, 135, 673, 672, 671, 670, 669, 668, 667, 666, - /* 940 */ 148, 662, 661, 660, 369, 368, 657, 656, 655, 654, - /* 950 */ 653, 156, 1601, 1600, 598, 1599, 294, 36, 35, 357, - /* 960 */ 356, 42, 40, 39, 38, 37, 1598, 1950, 542, 1387, - /* 970 */ 292, 66, 598, 133, 65, 644, 2008, 252, 1794, 1401, - /* 980 */ 1452, 51, 1380, 36, 35, 1750, 582, 42, 40, 39, - /* 990 */ 38, 37, 193, 454, 452, 585, 1919, 1919, 1968, 1919, - /* 1000 */ 11, 10, 337, 1750, 648, 1447, 615, 1794, 1862, 554, - /* 1010 */ 1919, 1919, 325, 614, 182, 235, 573, 1379, 1213, 640, - /* 1020 */ 639, 638, 1217, 637, 1219, 1220, 636, 1222, 633, 58, - /* 1030 */ 1228, 630, 1230, 1231, 627, 624, 1949, 209, 288, 598, - /* 1040 */ 1984, 1780, 1803, 100, 1951, 618, 1953, 1954, 613, 649, - /* 1050 */ 608, 584, 1794, 269, 1481, 2125, 216, 2037, 1802, 214, - /* 1060 */ 211, 354, 2033, 709, 338, 604, 336, 335, 99, 499, - /* 1070 */ 1750, 246, 2056, 501, 598, 162, 1906, 281, 1373, 1090, - /* 1080 */ 1091, 493, 489, 485, 481, 208, 2057, 1515, 593, 1833, - /* 1090 */ 598, 1371, 166, 546, 501, 500, 1495, 2105, 699, 695, - /* 1100 */ 691, 687, 279, 1518, 595, 1750, 74, 73, 402, 578, - /* 1110 */ 1482, 180, 2111, 173, 67, 570, 500, 2106, 567, 598, - /* 1120 */ 1382, 1750, 81, 234, 382, 206, 1379, 569, 1388, 316, - /* 1130 */ 1383, 1969, 390, 596, 388, 384, 380, 377, 374, 98, - /* 1140 */ 131, 48, 272, 3, 137, 1381, 125, 371, 1588, 60, - /* 1150 */ 1750, 1855, 113, 1391, 1393, 112, 111, 110, 109, 108, - /* 1160 */ 107, 106, 105, 104, 75, 606, 1445, 1446, 1448, 1449, - /* 1170 */ 1450, 1451, 239, 218, 706, 594, 217, 1950, 176, 45, - /* 1180 */ 598, 32, 358, 1476, 1477, 1478, 1479, 1480, 1484, 1485, - /* 1190 */ 1486, 1487, 205, 199, 275, 204, 1644, 1642, 472, 172, - /* 1200 */ 2045, 2046, 1545, 129, 2050, 1950, 220, 222, 1968, 219, - /* 1210 */ 221, 1750, 260, 262, 197, 50, 615, 140, 516, 519, - /* 1220 */ 545, 1919, 142, 614, 233, 241, 1590, 1591, 1940, 1344, - /* 1230 */ 96, 229, 1320, 11, 10, 1632, 1968, 1374, 574, 1372, - /* 1240 */ 93, 422, 1587, 144, 615, 1133, 1949, 658, 1950, 1919, - /* 1250 */ 1984, 614, 2067, 100, 1951, 618, 1953, 1954, 613, 60, - /* 1260 */ 608, 45, 1377, 1378, 83, 601, 267, 2037, 1385, 1153, - /* 1270 */ 590, 354, 2033, 1791, 1949, 271, 1950, 1942, 1984, 1968, - /* 1280 */ 1134, 101, 1951, 618, 1953, 1954, 613, 615, 608, 579, - /* 1290 */ 254, 31, 1919, 1384, 614, 2037, 1206, 36, 35, 2036, - /* 1300 */ 2033, 42, 40, 39, 38, 37, 251, 1968, 45, 622, - /* 1310 */ 1, 142, 1489, 4, 1438, 615, 144, 1949, 659, 1950, - /* 1320 */ 1919, 1984, 614, 1638, 101, 1951, 618, 1953, 1954, 613, - /* 1330 */ 376, 608, 126, 381, 330, 571, 142, 1950, 2037, 1337, - /* 1340 */ 1151, 282, 603, 2033, 186, 616, 408, 1401, 1856, 1984, - /* 1350 */ 1968, 443, 101, 1951, 618, 1953, 1954, 613, 612, 608, - /* 1360 */ 412, 287, 1234, 1919, 1238, 614, 2037, 417, 1968, 1245, - /* 1370 */ 324, 2033, 701, 1396, 429, 1848, 615, 436, 442, 444, - /* 1380 */ 1950, 1919, 190, 614, 450, 1243, 451, 453, 1949, 147, - /* 1390 */ 455, 1402, 1984, 518, 456, 310, 1951, 618, 1953, 1954, - /* 1400 */ 613, 611, 608, 599, 2002, 465, 1949, 1404, 528, 468, - /* 1410 */ 1984, 1968, 1403, 160, 1951, 618, 1953, 1954, 613, 615, - /* 1420 */ 608, 196, 224, 469, 1919, 198, 614, 1405, 1937, 470, - /* 1430 */ 201, 473, 471, 1950, 1107, 203, 477, 521, 1896, 1933, - /* 1440 */ 78, 1937, 515, 79, 496, 533, 498, 223, 494, 1949, - /* 1450 */ 207, 495, 1933, 1984, 1950, 102, 101, 1951, 618, 1953, - /* 1460 */ 1954, 613, 228, 608, 1968, 568, 2126, 1929, 1935, 343, - /* 1470 */ 2037, 319, 615, 535, 1740, 2034, 213, 1919, 608, 614, - /* 1480 */ 1929, 1935, 355, 373, 64, 1968, 1736, 63, 215, 149, - /* 1490 */ 1895, 608, 150, 615, 372, 1738, 1734, 151, 1919, 152, - /* 1500 */ 614, 536, 1949, 543, 283, 231, 1984, 550, 1950, 159, - /* 1510 */ 1951, 618, 1953, 1954, 613, 555, 608, 537, 540, 237, - /* 1520 */ 588, 2068, 578, 1949, 2078, 546, 552, 1984, 344, 2105, - /* 1530 */ 304, 1951, 618, 1953, 1954, 613, 546, 608, 240, 1968, - /* 1540 */ 2105, 558, 5, 551, 2111, 173, 564, 615, 548, 2106, - /* 1550 */ 567, 2075, 1919, 131, 614, 2111, 173, 549, 248, 2059, - /* 1560 */ 2106, 567, 1950, 36, 35, 245, 345, 42, 40, 39, - /* 1570 */ 38, 37, 250, 1515, 563, 575, 572, 1949, 130, 1950, - /* 1580 */ 2128, 1984, 249, 2083, 160, 1951, 618, 1953, 1954, 613, - /* 1590 */ 2082, 608, 163, 1968, 247, 1400, 583, 259, 349, 2104, - /* 1600 */ 253, 615, 2053, 348, 284, 1950, 1919, 586, 614, 587, - /* 1610 */ 1968, 1867, 174, 2045, 2046, 359, 129, 2050, 615, 591, - /* 1620 */ 1866, 1865, 350, 1919, 88, 614, 285, 592, 286, 57, - /* 1630 */ 90, 1949, 92, 1950, 1751, 1984, 1968, 2127, 311, 1951, - /* 1640 */ 618, 1953, 1954, 613, 615, 608, 2018, 1795, 1949, 1919, - /* 1650 */ 1721, 614, 1984, 289, 620, 311, 1951, 618, 1953, 1954, - /* 1660 */ 613, 278, 608, 702, 1968, 703, 705, 49, 298, 361, - /* 1670 */ 291, 312, 615, 313, 1949, 302, 1950, 1919, 1984, 614, - /* 1680 */ 293, 295, 1951, 618, 1953, 1954, 613, 1913, 608, 321, - /* 1690 */ 322, 1912, 1950, 71, 1911, 1910, 72, 1907, 378, 379, - /* 1700 */ 1365, 1366, 1949, 179, 383, 1905, 1984, 1968, 385, 311, - /* 1710 */ 1951, 618, 1953, 1954, 613, 615, 608, 386, 387, 154, - /* 1720 */ 1919, 1904, 614, 1968, 389, 1903, 1902, 391, 393, 1901, - /* 1730 */ 1340, 615, 1339, 395, 1878, 534, 1919, 1877, 614, 400, - /* 1740 */ 401, 1876, 1875, 1950, 1841, 1949, 1300, 1840, 1838, 1984, - /* 1750 */ 136, 1837, 296, 1951, 618, 1953, 1954, 613, 1836, 608, - /* 1760 */ 1839, 1949, 1835, 1834, 1832, 1984, 1831, 1830, 297, 1951, - /* 1770 */ 618, 1953, 1954, 613, 1968, 608, 184, 546, 418, 1829, - /* 1780 */ 420, 2105, 615, 1828, 1827, 1826, 1950, 1919, 1825, 614, - /* 1790 */ 1824, 1823, 1822, 1821, 1820, 1819, 2111, 173, 1818, 1817, - /* 1800 */ 1816, 2106, 567, 1950, 1815, 1814, 1813, 138, 1812, 1811, - /* 1810 */ 1810, 1809, 1949, 1808, 1807, 1806, 1984, 1968, 1302, 303, - /* 1820 */ 1951, 618, 1953, 1954, 613, 615, 608, 1805, 1804, 446, - /* 1830 */ 1919, 1666, 614, 191, 1968, 1665, 1181, 1663, 192, 1627, - /* 1840 */ 1093, 168, 615, 1092, 194, 1626, 69, 1919, 1891, 614, - /* 1850 */ 1939, 1885, 195, 1874, 1873, 1949, 1950, 70, 200, 1984, - /* 1860 */ 202, 1858, 307, 1951, 618, 1953, 1954, 613, 461, 608, - /* 1870 */ 463, 1729, 1949, 1950, 1662, 1660, 1984, 478, 479, 299, - /* 1880 */ 1951, 618, 1953, 1954, 613, 480, 608, 1968, 1126, 1658, - /* 1890 */ 482, 483, 1656, 486, 1654, 615, 484, 487, 488, 490, - /* 1900 */ 1919, 492, 614, 1641, 1968, 1640, 1623, 1731, 491, 1249, - /* 1910 */ 1730, 1250, 615, 1172, 1171, 1170, 1169, 1919, 1168, 614, - /* 1920 */ 212, 59, 1163, 1165, 1950, 1949, 674, 1652, 676, 1984, - /* 1930 */ 1164, 1162, 308, 1951, 618, 1953, 1954, 613, 339, 608, - /* 1940 */ 1645, 1950, 1949, 340, 1643, 341, 1984, 517, 520, 300, - /* 1950 */ 1951, 618, 1953, 1954, 613, 1968, 608, 1622, 1621, 522, - /* 1960 */ 524, 1620, 1357, 615, 526, 103, 1355, 1950, 1919, 1354, - /* 1970 */ 614, 530, 1968, 24, 1890, 1884, 1346, 538, 1872, 1870, - /* 1980 */ 615, 17, 14, 2110, 1950, 1919, 53, 614, 1560, 18, - /* 1990 */ 56, 243, 28, 1949, 26, 236, 539, 1984, 1968, 232, - /* 2000 */ 309, 1951, 618, 1953, 1954, 613, 615, 608, 342, 153, - /* 2010 */ 1949, 1919, 238, 614, 1984, 1968, 1544, 301, 1951, 618, - /* 2020 */ 1953, 1954, 613, 615, 608, 161, 544, 1537, 1919, 244, - /* 2030 */ 614, 242, 27, 1940, 84, 1950, 1949, 61, 19, 1575, - /* 2040 */ 1984, 1574, 346, 314, 1951, 618, 1953, 1954, 613, 1580, - /* 2050 */ 608, 1581, 1579, 1949, 1578, 347, 1512, 1984, 256, 1511, - /* 2060 */ 315, 1951, 618, 1953, 1954, 613, 1968, 608, 55, 164, - /* 2070 */ 1871, 1869, 1868, 20, 615, 589, 1857, 263, 1950, 1919, - /* 2080 */ 261, 614, 1542, 15, 54, 268, 86, 87, 89, 273, - /* 2090 */ 93, 270, 10, 21, 1950, 1464, 8, 1463, 1987, 1389, - /* 2100 */ 1442, 607, 165, 177, 1949, 1440, 34, 1474, 1984, 1968, - /* 2110 */ 1439, 1962, 1951, 618, 1953, 1954, 613, 615, 608, 13, - /* 2120 */ 1420, 22, 1919, 1412, 614, 1968, 617, 23, 619, 1235, - /* 2130 */ 621, 362, 623, 615, 1232, 625, 626, 628, 1919, 629, - /* 2140 */ 614, 1229, 1223, 631, 1221, 1950, 632, 1949, 634, 635, - /* 2150 */ 1227, 1984, 1212, 1226, 1961, 1951, 618, 1953, 1954, 613, - /* 2160 */ 641, 608, 94, 1949, 276, 95, 1225, 1984, 1244, 68, - /* 2170 */ 1960, 1951, 618, 1953, 1954, 613, 1968, 608, 1224, 1240, - /* 2180 */ 1124, 651, 1159, 1158, 615, 1157, 1156, 1155, 1950, 1919, - /* 2190 */ 1154, 614, 1179, 1152, 1150, 1149, 1148, 663, 277, 1146, - /* 2200 */ 1145, 1144, 1143, 1142, 1141, 1950, 1140, 1139, 1176, 1174, - /* 2210 */ 1136, 1135, 1132, 1131, 1949, 1130, 1659, 1129, 1984, 1968, - /* 2220 */ 684, 326, 1951, 618, 1953, 1954, 613, 615, 608, 686, - /* 2230 */ 1657, 685, 1919, 688, 614, 689, 1968, 1655, 690, 692, - /* 2240 */ 693, 694, 1653, 696, 615, 697, 698, 1639, 700, 1919, - /* 2250 */ 1082, 614, 1619, 280, 704, 708, 1375, 1949, 1950, 1594, - /* 2260 */ 290, 1984, 707, 1594, 327, 1951, 618, 1953, 1954, 613, - /* 2270 */ 1594, 608, 1594, 1594, 1949, 1950, 1594, 1594, 1984, 1594, - /* 2280 */ 1594, 323, 1951, 618, 1953, 1954, 613, 1594, 608, 1968, - /* 2290 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 615, 1594, 1594, - /* 2300 */ 1594, 1594, 1919, 1594, 614, 1594, 1968, 1594, 1594, 1594, - /* 2310 */ 1594, 1594, 1594, 1594, 615, 1594, 1594, 1594, 1594, 1919, - /* 2320 */ 1594, 614, 1594, 1594, 1594, 1594, 1950, 1949, 1594, 1594, - /* 2330 */ 1594, 1984, 1594, 1594, 328, 1951, 618, 1953, 1954, 613, - /* 2340 */ 1594, 608, 1594, 1594, 616, 1594, 1594, 1594, 1984, 1594, - /* 2350 */ 1594, 306, 1951, 618, 1953, 1954, 613, 1968, 608, 1594, - /* 2360 */ 1594, 1594, 1594, 1594, 1594, 615, 1594, 1594, 1594, 1594, - /* 2370 */ 1919, 1594, 614, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 2380 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 2390 */ 1594, 1594, 1594, 1594, 1594, 1949, 1594, 1594, 1594, 1984, - /* 2400 */ 1594, 1594, 305, 1951, 618, 1953, 1954, 613, 1594, 608, + /* 0 */ 1958, 460, 159, 461, 1639, 572, 169, 1711, 469, 2114, + /* 10 */ 461, 1639, 45, 43, 1529, 367, 1659, 2119, 1804, 1806, + /* 20 */ 362, 2114, 1380, 1603, 571, 175, 604, 334, 1858, 2115, + /* 30 */ 573, 1976, 1749, 1459, 407, 1378, 1672, 2118, 516, 587, + /* 40 */ 54, 2115, 2117, 1941, 1927, 401, 620, 124, 123, 122, + /* 50 */ 121, 120, 119, 118, 117, 116, 466, 1758, 1454, 603, + /* 60 */ 38, 37, 462, 18, 44, 42, 41, 40, 39, 1957, + /* 70 */ 1386, 1937, 1943, 1992, 320, 603, 102, 1959, 624, 1961, + /* 80 */ 1962, 619, 614, 614, 260, 603, 1533, 548, 172, 1946, + /* 90 */ 2045, 2114, 1405, 478, 356, 2041, 14, 2060, 1469, 1958, + /* 100 */ 1941, 515, 514, 513, 1405, 1976, 2120, 175, 177, 130, + /* 110 */ 509, 2115, 573, 566, 508, 507, 2071, 160, 712, 1615, + /* 120 */ 506, 512, 60, 2057, 87, 567, 505, 604, 1937, 1943, + /* 130 */ 1976, 169, 1092, 1461, 1462, 1111, 1601, 1110, 621, 614, + /* 140 */ 2119, 125, 1626, 1927, 2114, 620, 45, 43, 499, 1566, + /* 150 */ 212, 48, 565, 1859, 362, 1735, 1380, 1406, 1758, 1958, + /* 160 */ 2118, 48, 1435, 1444, 2115, 2116, 1112, 1459, 1957, 1378, + /* 170 */ 604, 1094, 1992, 1097, 1098, 102, 1959, 624, 1961, 1962, + /* 180 */ 619, 1381, 614, 1379, 125, 136, 1927, 143, 2016, 2045, + /* 190 */ 1976, 504, 1454, 356, 2041, 35, 276, 18, 587, 377, + /* 200 */ 1405, 1758, 1405, 1927, 1386, 620, 1384, 1385, 2118, 1434, + /* 210 */ 1437, 1438, 1439, 1440, 1441, 1442, 1443, 616, 612, 1452, + /* 220 */ 1453, 1455, 1456, 1457, 1458, 1460, 1463, 2, 1957, 99, + /* 230 */ 14, 60, 1992, 1958, 1436, 102, 1959, 624, 1961, 1962, + /* 240 */ 619, 548, 614, 134, 11, 2114, 1436, 172, 1407, 2045, + /* 250 */ 562, 1750, 712, 356, 2041, 44, 42, 41, 40, 39, + /* 260 */ 2120, 175, 658, 656, 1976, 2115, 573, 1461, 1462, 267, + /* 270 */ 268, 178, 621, 64, 266, 2072, 60, 1927, 1405, 620, + /* 280 */ 45, 43, 148, 147, 653, 652, 651, 145, 362, 235, + /* 290 */ 1380, 459, 1406, 1958, 464, 1645, 1435, 1444, 1625, 584, + /* 300 */ 178, 1459, 1957, 1378, 468, 604, 1992, 464, 1645, 102, + /* 310 */ 1959, 624, 1961, 1962, 619, 1381, 614, 1379, 227, 180, + /* 320 */ 11, 2020, 9, 2045, 1976, 1733, 1454, 356, 2041, 85, + /* 330 */ 133, 18, 621, 568, 563, 557, 1758, 1927, 1386, 620, + /* 340 */ 1384, 1385, 1927, 1434, 1437, 1438, 1439, 1440, 1441, 1442, + /* 350 */ 1443, 616, 612, 1452, 1453, 1455, 1456, 1457, 1458, 1460, + /* 360 */ 1463, 2, 1957, 11, 14, 60, 1992, 1490, 1404, 102, + /* 370 */ 1959, 624, 1961, 1962, 619, 1408, 614, 60, 84, 322, + /* 380 */ 178, 2134, 533, 2045, 531, 649, 712, 356, 2041, 257, + /* 390 */ 2053, 583, 259, 126, 582, 511, 510, 2114, 2079, 1805, + /* 400 */ 1806, 1461, 1462, 38, 37, 1263, 1264, 44, 42, 41, + /* 410 */ 40, 39, 571, 175, 45, 43, 1464, 2115, 573, 591, + /* 420 */ 1316, 1317, 362, 1854, 1380, 178, 606, 1958, 2017, 353, + /* 430 */ 1435, 1444, 1869, 656, 183, 1459, 115, 1378, 32, 114, + /* 440 */ 113, 112, 111, 110, 109, 108, 107, 106, 1495, 1381, + /* 450 */ 2060, 1379, 148, 147, 653, 652, 651, 145, 1976, 229, + /* 460 */ 1454, 400, 1788, 399, 543, 443, 621, 590, 1111, 575, + /* 470 */ 1110, 1927, 1386, 620, 1384, 1385, 2056, 1434, 1437, 1438, + /* 480 */ 1439, 1440, 1441, 1442, 1443, 616, 612, 1452, 1453, 1455, + /* 490 */ 1456, 1457, 1458, 1460, 1463, 2, 1957, 1386, 46, 1112, + /* 500 */ 1992, 49, 82, 102, 1959, 624, 1961, 1962, 619, 548, + /* 510 */ 614, 13, 12, 2114, 178, 2134, 129, 2045, 656, 184, + /* 520 */ 712, 356, 2041, 191, 190, 1753, 178, 1811, 2120, 175, + /* 530 */ 213, 171, 2092, 2115, 573, 1461, 1462, 148, 147, 653, + /* 540 */ 652, 651, 145, 1810, 1798, 164, 604, 187, 45, 43, + /* 550 */ 1811, 495, 491, 487, 483, 210, 362, 355, 1380, 604, + /* 560 */ 405, 41, 40, 39, 1435, 1444, 1809, 396, 1596, 1459, + /* 570 */ 1408, 1378, 1604, 406, 38, 37, 670, 1758, 44, 42, + /* 580 */ 41, 40, 39, 1381, 79, 1379, 52, 78, 398, 394, + /* 590 */ 1758, 547, 83, 115, 1454, 208, 114, 113, 112, 111, + /* 600 */ 110, 109, 108, 107, 106, 1556, 1386, 1502, 1384, 1385, + /* 610 */ 27, 1434, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 616, + /* 620 */ 612, 1452, 1453, 1455, 1456, 1457, 1458, 1460, 1463, 2, + /* 630 */ 359, 358, 46, 529, 608, 2119, 2017, 38, 37, 8, + /* 640 */ 1394, 44, 42, 41, 40, 39, 527, 1624, 525, 1408, + /* 650 */ 178, 1459, 1407, 1387, 712, 559, 1554, 1555, 1557, 1558, + /* 660 */ 1736, 2060, 207, 201, 1595, 206, 157, 31, 474, 1461, + /* 670 */ 1462, 1623, 1622, 38, 37, 1761, 1454, 44, 42, 41, + /* 680 */ 40, 39, 45, 43, 199, 1747, 93, 2055, 1386, 1180, + /* 690 */ 362, 1927, 1380, 515, 514, 513, 715, 1621, 1435, 1444, + /* 700 */ 1620, 130, 509, 1459, 1811, 1378, 508, 507, 1751, 1743, + /* 710 */ 283, 366, 506, 512, 236, 1927, 1927, 1381, 505, 1379, + /* 720 */ 1809, 1619, 478, 1811, 1182, 168, 683, 681, 1454, 1589, + /* 730 */ 331, 705, 701, 697, 693, 281, 610, 1097, 1098, 1809, + /* 740 */ 1386, 1927, 1384, 1385, 1927, 1434, 1437, 1438, 1439, 1440, + /* 750 */ 1441, 1442, 1443, 616, 612, 1452, 1453, 1455, 1456, 1457, + /* 760 */ 1458, 1460, 1463, 2, 1712, 1927, 14, 1618, 1745, 604, + /* 770 */ 354, 228, 100, 365, 82, 274, 584, 1617, 157, 1616, + /* 780 */ 319, 157, 1403, 415, 671, 339, 1728, 1760, 712, 437, + /* 790 */ 1760, 1854, 450, 237, 572, 449, 259, 1754, 2114, 1395, + /* 800 */ 1758, 1390, 185, 1461, 1462, 2065, 1522, 133, 600, 1854, + /* 810 */ 421, 1927, 451, 571, 175, 423, 33, 604, 2115, 573, + /* 820 */ 189, 1927, 38, 37, 1398, 1400, 44, 42, 41, 40, + /* 830 */ 39, 429, 1435, 1444, 1357, 1358, 612, 1452, 1453, 1455, + /* 840 */ 1456, 1457, 1458, 1741, 1522, 262, 368, 340, 1758, 338, + /* 850 */ 337, 1381, 501, 1379, 157, 2085, 503, 335, 1669, 591, + /* 860 */ 232, 408, 1351, 1760, 231, 586, 173, 2053, 2054, 411, + /* 870 */ 131, 2058, 1870, 1526, 409, 1614, 1384, 1385, 502, 1434, + /* 880 */ 1437, 1438, 1439, 1440, 1441, 1442, 1443, 616, 612, 1452, + /* 890 */ 1453, 1455, 1456, 1457, 1458, 1460, 1463, 2, 135, 447, + /* 900 */ 1841, 2016, 442, 441, 440, 439, 436, 435, 434, 433, + /* 910 */ 432, 428, 427, 426, 425, 336, 418, 417, 416, 1927, + /* 920 */ 413, 412, 333, 689, 688, 687, 686, 372, 584, 685, + /* 930 */ 684, 137, 679, 678, 677, 676, 675, 674, 673, 672, + /* 940 */ 150, 668, 667, 666, 371, 370, 663, 662, 661, 660, + /* 950 */ 659, 158, 604, 1613, 1612, 1734, 296, 38, 37, 133, + /* 960 */ 1380, 44, 42, 41, 40, 39, 430, 503, 1598, 1599, + /* 970 */ 294, 68, 1611, 1378, 67, 650, 604, 50, 1802, 3, + /* 980 */ 38, 37, 1958, 1758, 44, 42, 41, 40, 39, 502, + /* 990 */ 476, 1405, 195, 456, 454, 38, 37, 1927, 1927, 44, + /* 1000 */ 42, 41, 40, 39, 146, 1610, 1609, 1758, 1386, 576, + /* 1010 */ 604, 654, 327, 1976, 1802, 611, 1927, 658, 174, 2053, + /* 1020 */ 2054, 621, 131, 2058, 477, 1914, 1927, 1608, 620, 60, + /* 1030 */ 1220, 646, 645, 644, 1224, 643, 1226, 1227, 642, 1229, + /* 1040 */ 639, 1758, 1235, 636, 1237, 1238, 633, 630, 1607, 1927, + /* 1050 */ 1927, 1957, 424, 604, 1488, 1992, 712, 53, 102, 1959, + /* 1060 */ 624, 1961, 1962, 619, 604, 614, 579, 1755, 101, 1545, + /* 1070 */ 2134, 1927, 2045, 384, 1958, 1389, 356, 2041, 141, 655, + /* 1080 */ 1606, 584, 1802, 290, 1758, 604, 1788, 555, 139, 615, + /* 1090 */ 127, 69, 1927, 62, 648, 1758, 38, 37, 1388, 544, + /* 1100 */ 44, 42, 41, 40, 39, 1976, 76, 75, 404, 604, + /* 1110 */ 1489, 182, 133, 621, 218, 1525, 1758, 216, 1927, 1381, + /* 1120 */ 620, 1379, 560, 369, 1927, 604, 1652, 220, 604, 318, + /* 1130 */ 219, 254, 392, 1436, 390, 386, 382, 379, 376, 588, + /* 1140 */ 1758, 77, 271, 1957, 1384, 1385, 1553, 1992, 518, 211, + /* 1150 */ 102, 1959, 624, 1961, 1962, 619, 1758, 614, 1480, 1758, + /* 1160 */ 375, 1958, 2134, 604, 2045, 241, 604, 248, 356, 2041, + /* 1170 */ 373, 176, 2053, 2054, 1977, 131, 2058, 599, 178, 2108, + /* 1180 */ 601, 34, 360, 1483, 1484, 1485, 1486, 1487, 1491, 1492, + /* 1190 */ 1493, 1494, 1976, 222, 1758, 1650, 221, 1758, 604, 1863, + /* 1200 */ 621, 47, 548, 98, 1958, 1927, 2114, 620, 224, 264, + /* 1210 */ 1948, 223, 602, 95, 604, 1640, 142, 521, 243, 13, + /* 1220 */ 12, 2120, 175, 1392, 1799, 664, 2115, 573, 277, 1758, + /* 1230 */ 1957, 577, 1958, 144, 1992, 1976, 146, 102, 1959, 624, + /* 1240 */ 1961, 1962, 619, 621, 614, 1758, 1391, 1160, 1927, 2134, + /* 1250 */ 620, 2045, 156, 2075, 1327, 356, 2041, 585, 1140, 1950, + /* 1260 */ 256, 253, 269, 1976, 62, 47, 2064, 1646, 4, 596, + /* 1270 */ 1, 621, 47, 1957, 378, 1958, 1927, 1992, 620, 628, + /* 1280 */ 102, 1959, 624, 1961, 1962, 619, 273, 614, 144, 1213, + /* 1290 */ 580, 383, 2018, 1141, 2045, 332, 1344, 146, 356, 2041, + /* 1300 */ 374, 1957, 410, 284, 128, 1992, 1976, 188, 102, 1959, + /* 1310 */ 624, 1961, 1962, 619, 621, 614, 707, 1496, 1445, 1927, + /* 1320 */ 607, 620, 2045, 665, 144, 289, 356, 2041, 1408, 414, + /* 1330 */ 536, 1864, 1241, 419, 445, 1403, 431, 1856, 444, 438, + /* 1340 */ 1958, 1245, 548, 446, 1957, 1158, 2114, 453, 1992, 1945, + /* 1350 */ 1252, 103, 1959, 624, 1961, 1962, 619, 1250, 614, 192, + /* 1360 */ 1941, 2120, 175, 452, 1958, 2045, 2115, 573, 455, 2044, + /* 1370 */ 2041, 1976, 548, 457, 1409, 1411, 2114, 149, 470, 621, + /* 1380 */ 458, 467, 198, 1958, 1927, 471, 620, 1410, 1937, 1943, + /* 1390 */ 345, 2120, 175, 472, 200, 1976, 2115, 573, 1412, 614, + /* 1400 */ 203, 475, 205, 621, 473, 80, 479, 81, 1927, 1957, + /* 1410 */ 620, 209, 1114, 1992, 1976, 496, 103, 1959, 624, 1961, + /* 1420 */ 1962, 619, 621, 614, 497, 498, 500, 1927, 321, 620, + /* 1430 */ 2045, 1748, 215, 1957, 609, 2041, 1958, 1992, 1744, 217, + /* 1440 */ 162, 1959, 624, 1961, 1962, 619, 104, 614, 151, 152, + /* 1450 */ 1746, 535, 622, 1742, 1904, 153, 1992, 1958, 1945, 103, + /* 1460 */ 1959, 624, 1961, 1962, 619, 1903, 614, 1976, 154, 1941, + /* 1470 */ 537, 285, 230, 2045, 538, 618, 539, 326, 2041, 542, + /* 1480 */ 1927, 233, 620, 545, 2076, 2086, 552, 561, 1976, 2091, + /* 1490 */ 558, 594, 574, 2135, 2090, 346, 621, 1937, 1943, 357, + /* 1500 */ 239, 1927, 242, 620, 2067, 1957, 564, 7, 614, 1992, + /* 1510 */ 1958, 570, 312, 1959, 624, 1961, 1962, 619, 617, 614, + /* 1520 */ 605, 2010, 553, 247, 165, 249, 1957, 252, 551, 550, + /* 1530 */ 1992, 347, 132, 161, 1959, 624, 1961, 1962, 619, 250, + /* 1540 */ 614, 1976, 581, 578, 1522, 1407, 2061, 2137, 251, 621, + /* 1550 */ 589, 286, 2113, 350, 1927, 261, 620, 592, 593, 1875, + /* 1560 */ 287, 1874, 1873, 1958, 255, 352, 597, 598, 90, 92, + /* 1570 */ 1759, 59, 2026, 288, 549, 2082, 94, 1803, 280, 1957, + /* 1580 */ 291, 708, 1729, 1992, 1958, 709, 103, 1959, 624, 1961, + /* 1590 */ 1962, 619, 711, 614, 1976, 626, 315, 51, 323, 324, + /* 1600 */ 2045, 300, 621, 314, 304, 2042, 1958, 1927, 293, 620, + /* 1610 */ 295, 1921, 1920, 73, 1919, 1976, 1918, 74, 1915, 380, + /* 1620 */ 1372, 381, 1373, 621, 385, 181, 1913, 387, 1927, 388, + /* 1630 */ 620, 389, 1957, 1912, 391, 1911, 1992, 1976, 393, 161, + /* 1640 */ 1959, 624, 1961, 1962, 619, 621, 614, 1910, 1909, 395, + /* 1650 */ 1927, 1347, 620, 1957, 397, 1346, 1886, 1992, 1885, 402, + /* 1660 */ 306, 1959, 624, 1961, 1962, 619, 403, 614, 1884, 1883, + /* 1670 */ 1307, 1849, 1958, 1848, 1846, 1957, 138, 1845, 1844, 1992, + /* 1680 */ 186, 2083, 162, 1959, 624, 1961, 1962, 619, 1847, 614, + /* 1690 */ 520, 1843, 1958, 1842, 1840, 1839, 1838, 420, 1837, 422, + /* 1700 */ 1836, 1835, 1834, 1976, 569, 530, 1833, 1832, 351, 1831, + /* 1710 */ 1830, 621, 1829, 1828, 1827, 1826, 1927, 1825, 620, 226, + /* 1720 */ 1824, 1823, 1822, 1976, 140, 1821, 1820, 1819, 1818, 1817, + /* 1730 */ 1309, 618, 1816, 1815, 523, 2136, 1927, 1814, 620, 517, + /* 1740 */ 448, 1957, 1813, 1812, 225, 1992, 1188, 1958, 313, 1959, + /* 1750 */ 624, 1961, 1962, 619, 1674, 614, 1673, 193, 1671, 1635, + /* 1760 */ 196, 1957, 71, 1958, 1100, 1992, 1947, 1099, 312, 1959, + /* 1770 */ 624, 1961, 1962, 619, 194, 614, 1634, 2011, 1976, 170, + /* 1780 */ 72, 66, 1899, 361, 65, 463, 621, 465, 197, 1893, + /* 1790 */ 1882, 1927, 204, 620, 1976, 1881, 202, 1866, 1737, 363, + /* 1800 */ 1133, 1670, 621, 1668, 480, 482, 1958, 1927, 481, 620, + /* 1810 */ 1666, 485, 484, 486, 1664, 488, 1957, 1662, 489, 492, + /* 1820 */ 1992, 493, 490, 313, 1959, 624, 1961, 1962, 619, 1649, + /* 1830 */ 614, 494, 1957, 1648, 1631, 1739, 1992, 1976, 1256, 313, + /* 1840 */ 1959, 624, 1961, 1962, 619, 621, 614, 214, 1257, 1958, + /* 1850 */ 1927, 61, 620, 1738, 1179, 1178, 680, 1176, 1177, 1175, + /* 1860 */ 1172, 1171, 682, 1170, 1660, 1958, 1169, 341, 1653, 342, + /* 1870 */ 1651, 343, 1630, 519, 522, 534, 1629, 524, 526, 1992, + /* 1880 */ 1976, 1628, 308, 1959, 624, 1961, 1962, 619, 621, 614, + /* 1890 */ 1362, 528, 1361, 1927, 105, 620, 1976, 1364, 532, 1898, + /* 1900 */ 26, 1353, 1892, 55, 621, 540, 1880, 1878, 155, 1927, + /* 1910 */ 556, 620, 2119, 541, 16, 546, 1958, 234, 1957, 344, + /* 1920 */ 554, 19, 1992, 28, 238, 297, 1959, 624, 1961, 1962, + /* 1930 */ 619, 58, 614, 1958, 1957, 1568, 5, 6, 1992, 245, + /* 1940 */ 163, 298, 1959, 624, 1961, 1962, 619, 1976, 614, 240, + /* 1950 */ 246, 1552, 244, 63, 29, 621, 1544, 1948, 86, 30, + /* 1960 */ 1927, 21, 620, 1583, 1976, 1582, 348, 1587, 1588, 1586, + /* 1970 */ 1589, 349, 621, 258, 166, 1519, 1518, 1927, 1879, 620, + /* 1980 */ 20, 57, 1877, 17, 1876, 1957, 22, 265, 1958, 1992, + /* 1990 */ 56, 263, 299, 1959, 624, 1961, 1962, 619, 1550, 614, + /* 2000 */ 270, 88, 1957, 1865, 89, 272, 1992, 1958, 91, 305, + /* 2010 */ 1959, 624, 1961, 1962, 619, 595, 614, 95, 275, 1976, + /* 2020 */ 23, 1471, 12, 1396, 10, 1995, 167, 621, 179, 613, + /* 2030 */ 1470, 1958, 1927, 1427, 620, 1449, 1481, 1447, 1976, 36, + /* 2040 */ 623, 1446, 15, 24, 627, 1419, 621, 25, 625, 1242, + /* 2050 */ 364, 1927, 629, 620, 1239, 632, 631, 1957, 1236, 634, + /* 2060 */ 635, 1992, 1976, 1230, 309, 1959, 624, 1961, 1962, 619, + /* 2070 */ 621, 614, 637, 638, 640, 1927, 1957, 620, 1234, 641, + /* 2080 */ 1992, 1219, 1228, 301, 1959, 624, 1961, 1962, 619, 1958, + /* 2090 */ 614, 96, 1233, 1232, 1231, 647, 278, 1251, 97, 1247, + /* 2100 */ 1957, 70, 1131, 657, 1992, 1958, 1166, 310, 1959, 624, + /* 2110 */ 1961, 1962, 619, 1165, 614, 1164, 1163, 1162, 1161, 1159, + /* 2120 */ 1976, 1157, 1156, 1155, 1186, 669, 1153, 1152, 621, 279, + /* 2130 */ 1151, 1150, 1149, 1927, 1148, 620, 1976, 1147, 1146, 1183, + /* 2140 */ 1137, 1181, 1143, 1667, 621, 691, 1142, 1139, 1958, 1927, + /* 2150 */ 1138, 620, 1136, 692, 690, 1665, 694, 695, 1957, 696, + /* 2160 */ 1663, 698, 1992, 700, 1958, 302, 1959, 624, 1961, 1962, + /* 2170 */ 619, 699, 614, 1661, 1957, 702, 703, 704, 1992, 1976, + /* 2180 */ 1647, 311, 1959, 624, 1961, 1962, 619, 621, 614, 706, + /* 2190 */ 1627, 1089, 1927, 282, 620, 1976, 1382, 710, 714, 292, + /* 2200 */ 713, 1602, 1602, 621, 1602, 1602, 1602, 1958, 1927, 1602, + /* 2210 */ 620, 1602, 1602, 1602, 1602, 1602, 1602, 1957, 1602, 1602, + /* 2220 */ 1602, 1992, 1602, 1958, 303, 1959, 624, 1961, 1962, 619, + /* 2230 */ 1602, 614, 1602, 1957, 1602, 1602, 1602, 1992, 1976, 1602, + /* 2240 */ 316, 1959, 624, 1961, 1962, 619, 621, 614, 1602, 1602, + /* 2250 */ 1602, 1927, 1602, 620, 1976, 1602, 1602, 1602, 1602, 1602, + /* 2260 */ 1602, 1602, 621, 1602, 1602, 1602, 1958, 1927, 1602, 620, + /* 2270 */ 1602, 1602, 1602, 1602, 1602, 1602, 1957, 1602, 1602, 1602, + /* 2280 */ 1992, 1602, 1602, 317, 1959, 624, 1961, 1962, 619, 1602, + /* 2290 */ 614, 1602, 1957, 1602, 1602, 1602, 1992, 1976, 1602, 1970, + /* 2300 */ 1959, 624, 1961, 1962, 619, 621, 614, 1602, 1602, 1602, + /* 2310 */ 1927, 1602, 620, 1602, 1602, 1602, 1602, 1958, 1602, 1602, + /* 2320 */ 1602, 1602, 1602, 1602, 1602, 1602, 1602, 1602, 1602, 1602, + /* 2330 */ 1602, 1602, 1602, 1602, 1958, 1957, 1602, 1602, 1602, 1992, + /* 2340 */ 1602, 1602, 1969, 1959, 624, 1961, 1962, 619, 1976, 614, + /* 2350 */ 1602, 1602, 1602, 1602, 1602, 1602, 621, 1602, 1602, 1602, + /* 2360 */ 1958, 1927, 1602, 620, 1602, 1976, 1602, 1602, 1602, 1602, + /* 2370 */ 1602, 1602, 1602, 621, 1602, 1602, 1602, 1602, 1927, 1602, + /* 2380 */ 620, 1602, 1602, 1602, 1602, 1602, 1957, 1602, 1602, 1602, + /* 2390 */ 1992, 1976, 1602, 1968, 1959, 624, 1961, 1962, 619, 621, + /* 2400 */ 614, 1602, 1602, 1957, 1927, 1602, 620, 1992, 1602, 1602, + /* 2410 */ 328, 1959, 624, 1961, 1962, 619, 1958, 614, 1602, 1602, + /* 2420 */ 1602, 1602, 1602, 1602, 1602, 1602, 1602, 1602, 1602, 1957, + /* 2430 */ 1602, 1602, 1958, 1992, 1602, 1602, 329, 1959, 624, 1961, + /* 2440 */ 1962, 619, 1602, 614, 1602, 1602, 1602, 1976, 1602, 1602, + /* 2450 */ 1602, 1602, 1602, 1602, 1602, 621, 1602, 1602, 1602, 1602, + /* 2460 */ 1927, 1602, 620, 1976, 1602, 1602, 1602, 1602, 1602, 1602, + /* 2470 */ 1602, 621, 1602, 1602, 1602, 1602, 1927, 1602, 620, 1602, + /* 2480 */ 1602, 1602, 1602, 1602, 1602, 1957, 1958, 1602, 1602, 1992, + /* 2490 */ 1602, 1602, 325, 1959, 624, 1961, 1962, 619, 1602, 614, + /* 2500 */ 1602, 1957, 1958, 1602, 1602, 1992, 1602, 1602, 330, 1959, + /* 2510 */ 624, 1961, 1962, 619, 1602, 614, 1602, 1976, 1602, 1602, + /* 2520 */ 1602, 1602, 1602, 1602, 1602, 621, 1602, 1602, 1602, 1602, + /* 2530 */ 1927, 1602, 620, 1976, 1602, 1602, 1602, 1602, 1602, 1602, + /* 2540 */ 1602, 621, 1602, 1602, 1602, 1602, 1927, 1602, 620, 1602, + /* 2550 */ 1602, 1602, 1602, 1602, 1602, 622, 1602, 1602, 1602, 1992, + /* 2560 */ 1602, 1602, 308, 1959, 624, 1961, 1962, 619, 1602, 614, + /* 2570 */ 1602, 1957, 1602, 1602, 1602, 1992, 1602, 1602, 307, 1959, + /* 2580 */ 624, 1961, 1962, 619, 1602, 614, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 325, 329, 340, 331, 332, 427, 356, 345, 329, 431, - /* 10 */ 331, 332, 12, 13, 14, 367, 0, 427, 370, 371, - /* 20 */ 20, 431, 22, 0, 446, 447, 333, 377, 378, 451, - /* 30 */ 452, 356, 358, 33, 333, 35, 0, 447, 22, 364, - /* 40 */ 347, 451, 452, 369, 369, 385, 371, 24, 25, 26, - /* 50 */ 27, 28, 29, 30, 31, 32, 14, 364, 58, 20, - /* 60 */ 8, 9, 20, 63, 12, 13, 14, 15, 16, 394, - /* 70 */ 70, 397, 398, 398, 373, 20, 401, 402, 403, 404, - /* 80 */ 405, 406, 408, 408, 58, 20, 14, 427, 413, 358, - /* 90 */ 415, 431, 20, 62, 419, 420, 96, 400, 14, 325, - /* 100 */ 369, 65, 66, 67, 20, 356, 446, 447, 433, 73, - /* 110 */ 74, 451, 452, 364, 78, 79, 441, 324, 118, 326, - /* 120 */ 84, 85, 96, 426, 98, 20, 90, 333, 397, 398, - /* 130 */ 356, 20, 4, 133, 134, 20, 322, 22, 364, 408, - /* 140 */ 427, 347, 364, 369, 431, 371, 12, 13, 354, 97, - /* 150 */ 35, 96, 403, 375, 20, 0, 22, 20, 364, 325, - /* 160 */ 447, 96, 162, 163, 451, 452, 51, 33, 394, 35, - /* 170 */ 333, 43, 398, 45, 46, 401, 402, 403, 404, 405, - /* 180 */ 406, 181, 408, 183, 347, 411, 4, 413, 414, 415, - /* 190 */ 356, 354, 58, 419, 420, 416, 417, 63, 364, 385, - /* 200 */ 20, 364, 62, 369, 70, 371, 206, 207, 20, 209, + /* 0 */ 327, 331, 342, 333, 334, 429, 358, 347, 331, 433, + /* 10 */ 333, 334, 12, 13, 14, 369, 0, 429, 372, 373, + /* 20 */ 20, 433, 22, 0, 448, 449, 335, 379, 380, 453, + /* 30 */ 454, 358, 360, 33, 335, 35, 0, 449, 22, 366, + /* 40 */ 349, 453, 454, 371, 371, 387, 373, 24, 25, 26, + /* 50 */ 27, 28, 29, 30, 31, 32, 14, 366, 58, 20, + /* 60 */ 8, 9, 20, 63, 12, 13, 14, 15, 16, 396, + /* 70 */ 70, 399, 400, 400, 375, 20, 403, 404, 405, 406, + /* 80 */ 407, 408, 410, 410, 58, 20, 14, 429, 415, 360, + /* 90 */ 417, 433, 20, 62, 421, 422, 96, 402, 14, 327, + /* 100 */ 371, 65, 66, 67, 20, 358, 448, 449, 435, 73, + /* 110 */ 74, 453, 454, 366, 78, 79, 443, 326, 118, 328, + /* 120 */ 84, 85, 96, 428, 98, 20, 90, 335, 399, 400, + /* 130 */ 358, 358, 4, 133, 134, 20, 324, 22, 366, 410, + /* 140 */ 429, 349, 327, 371, 433, 373, 12, 13, 356, 97, + /* 150 */ 35, 96, 405, 380, 20, 0, 22, 20, 366, 327, + /* 160 */ 449, 96, 162, 163, 453, 454, 51, 33, 396, 35, + /* 170 */ 335, 43, 400, 45, 46, 403, 404, 405, 406, 407, + /* 180 */ 408, 181, 410, 183, 349, 413, 371, 415, 416, 417, + /* 190 */ 358, 356, 58, 421, 422, 418, 419, 63, 366, 387, + /* 200 */ 20, 366, 20, 371, 70, 373, 206, 207, 3, 209, /* 210 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 394, 337, - /* 230 */ 96, 3, 398, 325, 162, 401, 402, 403, 404, 405, - /* 240 */ 406, 427, 408, 351, 20, 431, 162, 413, 20, 415, - /* 250 */ 167, 359, 118, 419, 420, 12, 13, 14, 15, 16, - /* 260 */ 446, 447, 229, 108, 356, 451, 452, 133, 134, 370, - /* 270 */ 371, 245, 364, 162, 163, 441, 96, 369, 96, 371, - /* 280 */ 12, 13, 127, 128, 129, 130, 131, 132, 20, 20, - /* 290 */ 22, 96, 20, 325, 342, 343, 162, 163, 325, 333, - /* 300 */ 245, 33, 394, 35, 330, 333, 398, 333, 334, 401, - /* 310 */ 402, 403, 404, 405, 406, 181, 408, 183, 128, 347, - /* 320 */ 107, 413, 355, 415, 356, 97, 58, 419, 420, 161, - /* 330 */ 364, 63, 364, 250, 251, 368, 364, 369, 70, 371, - /* 340 */ 206, 207, 369, 209, 210, 211, 212, 213, 214, 215, + /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 396, 339, + /* 230 */ 96, 96, 400, 327, 162, 403, 404, 405, 406, 407, + /* 240 */ 408, 429, 410, 353, 229, 433, 162, 415, 20, 417, + /* 250 */ 167, 361, 118, 421, 422, 12, 13, 14, 15, 16, + /* 260 */ 448, 449, 62, 108, 358, 453, 454, 133, 134, 127, + /* 270 */ 128, 245, 366, 4, 132, 443, 96, 371, 20, 373, + /* 280 */ 12, 13, 127, 128, 129, 130, 131, 132, 20, 58, + /* 290 */ 22, 332, 20, 327, 335, 336, 162, 163, 327, 335, + /* 300 */ 245, 33, 396, 35, 332, 335, 400, 335, 336, 403, + /* 310 */ 404, 405, 406, 407, 408, 181, 410, 183, 128, 349, + /* 320 */ 229, 415, 231, 417, 358, 0, 58, 421, 422, 98, + /* 330 */ 366, 63, 366, 250, 251, 252, 366, 371, 70, 373, + /* 340 */ 206, 207, 371, 209, 210, 211, 212, 213, 214, 215, /* 350 */ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - /* 360 */ 226, 227, 394, 229, 96, 325, 398, 342, 343, 401, - /* 370 */ 402, 403, 404, 405, 406, 180, 408, 182, 188, 189, - /* 380 */ 96, 413, 192, 415, 194, 339, 118, 419, 420, 423, - /* 390 */ 424, 425, 164, 427, 428, 80, 356, 431, 430, 353, - /* 400 */ 232, 133, 134, 389, 364, 133, 134, 22, 362, 369, - /* 410 */ 242, 371, 446, 447, 12, 13, 14, 451, 452, 371, - /* 420 */ 35, 70, 20, 0, 22, 245, 96, 245, 364, 381, - /* 430 */ 162, 163, 384, 164, 394, 33, 58, 35, 398, 375, - /* 440 */ 245, 401, 402, 403, 404, 405, 406, 108, 408, 181, - /* 450 */ 410, 183, 330, 138, 139, 333, 334, 8, 9, 70, - /* 460 */ 58, 12, 13, 14, 15, 16, 127, 128, 129, 130, - /* 470 */ 131, 132, 70, 95, 206, 207, 98, 209, 210, 211, + /* 360 */ 226, 227, 396, 229, 96, 96, 400, 161, 20, 403, + /* 370 */ 404, 405, 406, 407, 408, 20, 410, 96, 188, 189, + /* 380 */ 245, 415, 192, 417, 194, 107, 118, 421, 422, 425, + /* 390 */ 426, 427, 164, 429, 430, 344, 345, 433, 432, 372, + /* 400 */ 373, 133, 134, 8, 9, 133, 134, 12, 13, 14, + /* 410 */ 15, 16, 448, 449, 12, 13, 14, 453, 454, 373, + /* 420 */ 162, 163, 20, 366, 22, 245, 414, 327, 416, 383, + /* 430 */ 162, 163, 386, 108, 377, 33, 21, 35, 232, 24, + /* 440 */ 25, 26, 27, 28, 29, 30, 31, 32, 242, 181, + /* 450 */ 402, 183, 127, 128, 129, 130, 131, 132, 358, 351, + /* 460 */ 58, 180, 354, 182, 391, 80, 366, 387, 20, 264, + /* 470 */ 22, 371, 70, 373, 206, 207, 428, 209, 210, 211, /* 480 */ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - /* 490 */ 222, 223, 224, 225, 226, 227, 333, 325, 96, 333, - /* 500 */ 357, 325, 356, 65, 66, 67, 20, 333, 356, 363, - /* 510 */ 347, 73, 74, 347, 357, 363, 78, 79, 372, 325, - /* 520 */ 118, 347, 84, 85, 372, 348, 348, 364, 90, 245, - /* 530 */ 364, 108, 356, 356, 356, 133, 134, 20, 364, 22, - /* 540 */ 364, 369, 365, 365, 21, 369, 97, 371, 12, 13, - /* 550 */ 127, 128, 129, 130, 131, 132, 20, 34, 22, 36, - /* 560 */ 357, 325, 333, 369, 162, 163, 176, 35, 51, 33, - /* 570 */ 394, 35, 333, 333, 398, 245, 347, 401, 402, 403, - /* 580 */ 404, 405, 406, 181, 408, 183, 347, 197, 198, 413, - /* 590 */ 357, 415, 356, 364, 58, 419, 420, 127, 357, 229, - /* 600 */ 364, 231, 70, 364, 364, 369, 70, 371, 206, 207, - /* 610 */ 339, 209, 210, 211, 212, 213, 214, 215, 216, 217, + /* 490 */ 222, 223, 224, 225, 226, 227, 396, 70, 96, 51, + /* 500 */ 400, 96, 341, 403, 404, 405, 406, 407, 408, 429, + /* 510 */ 410, 1, 2, 433, 245, 415, 355, 417, 108, 164, + /* 520 */ 118, 421, 422, 138, 139, 364, 245, 358, 448, 449, + /* 530 */ 33, 357, 432, 453, 454, 133, 134, 127, 128, 129, + /* 540 */ 130, 131, 132, 374, 370, 48, 335, 58, 12, 13, + /* 550 */ 358, 54, 55, 56, 57, 58, 20, 365, 22, 335, + /* 560 */ 349, 14, 15, 16, 162, 163, 374, 176, 173, 33, + /* 570 */ 20, 35, 0, 349, 8, 9, 70, 366, 12, 13, + /* 580 */ 14, 15, 16, 181, 95, 183, 164, 98, 197, 198, + /* 590 */ 366, 169, 95, 21, 58, 98, 24, 25, 26, 27, + /* 600 */ 28, 29, 30, 31, 32, 206, 70, 97, 206, 207, + /* 610 */ 44, 209, 210, 211, 212, 213, 214, 215, 216, 217, /* 620 */ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - /* 630 */ 394, 356, 96, 362, 398, 348, 63, 401, 402, 403, - /* 640 */ 404, 405, 406, 356, 408, 127, 128, 325, 162, 413, - /* 650 */ 132, 415, 365, 378, 118, 419, 420, 325, 325, 0, - /* 660 */ 190, 191, 422, 423, 424, 425, 430, 427, 428, 133, - /* 670 */ 134, 8, 9, 39, 2, 12, 13, 14, 15, 16, - /* 680 */ 8, 9, 12, 13, 12, 13, 14, 15, 16, 356, - /* 690 */ 20, 369, 22, 337, 333, 333, 379, 364, 162, 163, - /* 700 */ 325, 369, 369, 33, 371, 35, 356, 44, 347, 347, - /* 710 */ 14, 15, 16, 363, 412, 359, 414, 181, 412, 183, - /* 720 */ 414, 62, 372, 357, 356, 364, 364, 394, 58, 349, - /* 730 */ 325, 398, 352, 365, 401, 402, 403, 404, 405, 406, - /* 740 */ 70, 408, 206, 207, 369, 209, 210, 211, 212, 213, + /* 630 */ 12, 13, 96, 21, 414, 3, 416, 8, 9, 39, + /* 640 */ 22, 12, 13, 14, 15, 16, 34, 327, 36, 20, + /* 650 */ 245, 33, 20, 35, 118, 256, 257, 258, 259, 260, + /* 660 */ 0, 402, 165, 166, 269, 168, 358, 2, 171, 133, + /* 670 */ 134, 327, 327, 8, 9, 367, 58, 12, 13, 14, + /* 680 */ 15, 16, 12, 13, 187, 359, 339, 428, 70, 35, + /* 690 */ 20, 371, 22, 65, 66, 67, 19, 327, 162, 163, + /* 700 */ 327, 73, 74, 33, 358, 35, 78, 79, 361, 359, + /* 710 */ 33, 365, 84, 85, 164, 371, 371, 181, 90, 183, + /* 720 */ 374, 327, 62, 358, 70, 48, 344, 345, 58, 97, + /* 730 */ 365, 54, 55, 56, 57, 58, 118, 45, 46, 374, + /* 740 */ 70, 371, 206, 207, 371, 209, 210, 211, 212, 213, /* 750 */ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - /* 760 */ 224, 225, 226, 227, 8, 9, 96, 325, 12, 13, - /* 770 */ 14, 15, 16, 364, 369, 442, 443, 427, 206, 206, - /* 780 */ 18, 431, 20, 400, 375, 333, 357, 325, 118, 27, - /* 790 */ 325, 325, 30, 0, 325, 33, 446, 447, 356, 347, - /* 800 */ 0, 451, 452, 133, 134, 325, 364, 326, 325, 426, - /* 810 */ 48, 369, 50, 371, 21, 53, 364, 24, 25, 26, - /* 820 */ 27, 28, 29, 30, 31, 32, 254, 255, 256, 257, - /* 830 */ 258, 369, 162, 163, 369, 369, 394, 344, 369, 346, - /* 840 */ 398, 333, 333, 401, 402, 403, 404, 405, 406, 369, - /* 850 */ 408, 181, 369, 183, 325, 347, 347, 95, 0, 8, - /* 860 */ 9, 4, 62, 12, 13, 14, 15, 16, 3, 107, - /* 870 */ 20, 20, 364, 364, 400, 325, 206, 207, 244, 209, + /* 760 */ 224, 225, 226, 227, 347, 371, 96, 327, 359, 335, + /* 770 */ 350, 127, 95, 350, 341, 98, 335, 327, 358, 328, + /* 780 */ 18, 358, 20, 349, 346, 37, 348, 367, 118, 27, + /* 790 */ 367, 366, 30, 164, 429, 33, 164, 364, 433, 181, + /* 800 */ 366, 183, 377, 133, 134, 243, 244, 366, 131, 366, + /* 810 */ 48, 371, 50, 448, 449, 53, 2, 335, 453, 454, + /* 820 */ 377, 371, 8, 9, 206, 207, 12, 13, 14, 15, + /* 830 */ 16, 349, 162, 163, 190, 191, 218, 219, 220, 221, + /* 840 */ 222, 223, 224, 359, 244, 168, 350, 99, 366, 101, + /* 850 */ 102, 181, 104, 183, 358, 381, 108, 95, 0, 373, + /* 860 */ 359, 22, 185, 367, 187, 424, 425, 426, 427, 107, + /* 870 */ 429, 430, 386, 4, 35, 327, 206, 207, 130, 209, /* 880 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - /* 890 */ 220, 221, 222, 223, 224, 225, 226, 227, 369, 137, - /* 900 */ 426, 345, 140, 141, 142, 143, 144, 145, 146, 147, - /* 910 */ 148, 149, 150, 151, 152, 153, 154, 155, 156, 369, - /* 920 */ 158, 159, 160, 65, 66, 67, 68, 69, 44, 71, + /* 890 */ 220, 221, 222, 223, 224, 225, 226, 227, 413, 137, + /* 900 */ 0, 416, 140, 141, 142, 143, 144, 145, 146, 147, + /* 910 */ 148, 149, 150, 151, 152, 153, 154, 155, 156, 371, + /* 920 */ 158, 159, 160, 65, 66, 67, 68, 69, 335, 71, /* 930 */ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, /* 940 */ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - /* 950 */ 92, 18, 325, 325, 333, 325, 23, 8, 9, 12, - /* 960 */ 13, 12, 13, 14, 15, 16, 325, 325, 347, 22, - /* 970 */ 37, 38, 333, 411, 41, 366, 414, 455, 369, 20, - /* 980 */ 33, 97, 35, 8, 9, 364, 347, 12, 13, 14, - /* 990 */ 15, 16, 59, 60, 61, 371, 369, 369, 356, 369, - /* 1000 */ 1, 2, 37, 364, 366, 58, 364, 369, 384, 444, - /* 1010 */ 369, 369, 63, 371, 164, 164, 44, 70, 109, 110, - /* 1020 */ 111, 112, 113, 114, 115, 116, 117, 118, 119, 96, - /* 1030 */ 121, 122, 123, 124, 125, 126, 394, 335, 349, 333, - /* 1040 */ 398, 352, 356, 401, 402, 403, 404, 405, 406, 366, - /* 1050 */ 408, 385, 369, 347, 105, 413, 100, 415, 372, 103, - /* 1060 */ 33, 419, 420, 19, 99, 118, 101, 102, 135, 104, - /* 1070 */ 364, 438, 430, 108, 333, 48, 0, 33, 22, 45, - /* 1080 */ 46, 54, 55, 56, 57, 58, 243, 244, 347, 0, - /* 1090 */ 333, 35, 48, 427, 108, 130, 97, 431, 54, 55, - /* 1100 */ 56, 57, 58, 246, 347, 364, 173, 174, 175, 333, - /* 1110 */ 161, 178, 446, 447, 107, 44, 130, 451, 452, 333, - /* 1120 */ 35, 364, 95, 164, 48, 98, 70, 262, 181, 196, - /* 1130 */ 183, 356, 199, 347, 201, 202, 203, 204, 205, 95, - /* 1140 */ 364, 42, 98, 44, 42, 35, 44, 335, 173, 44, - /* 1150 */ 364, 379, 21, 206, 207, 24, 25, 26, 27, 28, - /* 1160 */ 29, 30, 31, 32, 157, 218, 219, 220, 221, 222, - /* 1170 */ 223, 224, 44, 100, 118, 131, 103, 325, 245, 44, - /* 1180 */ 333, 232, 233, 234, 235, 236, 237, 238, 239, 240, - /* 1190 */ 241, 242, 165, 166, 347, 168, 0, 0, 171, 423, - /* 1200 */ 424, 425, 97, 427, 428, 325, 100, 100, 356, 103, - /* 1210 */ 103, 364, 168, 44, 187, 164, 364, 44, 22, 22, - /* 1220 */ 169, 369, 44, 371, 58, 97, 133, 134, 47, 185, - /* 1230 */ 96, 187, 97, 1, 2, 332, 356, 181, 266, 183, - /* 1240 */ 106, 152, 267, 44, 364, 35, 394, 13, 325, 369, - /* 1250 */ 398, 371, 379, 401, 402, 403, 404, 405, 406, 44, - /* 1260 */ 408, 44, 206, 207, 98, 413, 97, 415, 183, 35, - /* 1270 */ 97, 419, 420, 368, 394, 97, 325, 96, 398, 356, - /* 1280 */ 70, 401, 402, 403, 404, 405, 406, 364, 408, 429, - /* 1290 */ 448, 2, 369, 183, 371, 415, 97, 8, 9, 419, - /* 1300 */ 420, 12, 13, 14, 15, 16, 421, 356, 44, 44, - /* 1310 */ 432, 44, 97, 247, 97, 364, 44, 394, 13, 325, - /* 1320 */ 369, 398, 371, 0, 401, 402, 403, 404, 405, 406, - /* 1330 */ 396, 408, 44, 48, 395, 264, 44, 325, 415, 179, - /* 1340 */ 35, 387, 419, 420, 42, 394, 376, 20, 379, 398, - /* 1350 */ 356, 161, 401, 402, 403, 404, 405, 406, 364, 408, - /* 1360 */ 376, 97, 97, 369, 97, 371, 415, 374, 356, 97, - /* 1370 */ 419, 420, 49, 20, 333, 333, 364, 376, 374, 374, - /* 1380 */ 325, 369, 333, 371, 94, 97, 341, 333, 394, 97, - /* 1390 */ 333, 20, 398, 4, 327, 401, 402, 403, 404, 405, - /* 1400 */ 406, 407, 408, 409, 410, 327, 394, 20, 19, 391, - /* 1410 */ 398, 356, 20, 401, 402, 403, 404, 405, 406, 364, - /* 1420 */ 408, 339, 33, 371, 369, 339, 371, 20, 358, 334, - /* 1430 */ 339, 334, 386, 325, 52, 339, 333, 48, 369, 369, - /* 1440 */ 339, 358, 53, 339, 327, 195, 356, 58, 336, 394, - /* 1450 */ 339, 336, 369, 398, 325, 333, 401, 402, 403, 404, - /* 1460 */ 405, 406, 337, 408, 356, 453, 454, 397, 398, 399, - /* 1470 */ 415, 327, 364, 393, 356, 420, 356, 369, 408, 371, - /* 1480 */ 397, 398, 399, 385, 95, 356, 356, 98, 356, 356, - /* 1490 */ 369, 408, 356, 364, 385, 356, 356, 356, 369, 356, - /* 1500 */ 371, 186, 394, 333, 391, 337, 398, 369, 325, 401, - /* 1510 */ 402, 403, 404, 405, 406, 253, 408, 390, 371, 382, - /* 1520 */ 252, 379, 333, 394, 379, 427, 369, 398, 369, 431, - /* 1530 */ 401, 402, 403, 404, 405, 406, 427, 408, 382, 356, - /* 1540 */ 431, 369, 259, 261, 446, 447, 172, 364, 248, 451, - /* 1550 */ 452, 443, 369, 364, 371, 446, 447, 260, 435, 440, - /* 1560 */ 451, 452, 325, 8, 9, 439, 268, 12, 13, 14, - /* 1570 */ 15, 16, 396, 244, 445, 265, 263, 394, 364, 325, - /* 1580 */ 456, 398, 434, 437, 401, 402, 403, 404, 405, 406, - /* 1590 */ 437, 408, 437, 356, 436, 20, 333, 337, 361, 450, - /* 1600 */ 449, 364, 400, 334, 382, 325, 369, 369, 371, 369, - /* 1610 */ 356, 369, 423, 424, 425, 361, 427, 428, 364, 166, - /* 1620 */ 369, 369, 369, 369, 337, 371, 382, 380, 352, 96, - /* 1630 */ 337, 394, 96, 325, 364, 398, 356, 454, 401, 402, - /* 1640 */ 403, 404, 405, 406, 364, 408, 418, 369, 394, 369, - /* 1650 */ 346, 371, 398, 333, 360, 401, 402, 403, 404, 405, - /* 1660 */ 406, 337, 408, 36, 356, 328, 327, 388, 350, 361, - /* 1670 */ 338, 350, 364, 392, 394, 350, 325, 369, 398, 371, - /* 1680 */ 323, 401, 402, 403, 404, 405, 406, 0, 408, 383, - /* 1690 */ 383, 0, 325, 188, 0, 0, 42, 0, 35, 200, - /* 1700 */ 35, 35, 394, 35, 200, 0, 398, 356, 35, 401, - /* 1710 */ 402, 403, 404, 405, 406, 364, 408, 35, 200, 164, - /* 1720 */ 369, 0, 371, 356, 200, 0, 0, 35, 22, 0, - /* 1730 */ 183, 364, 181, 35, 0, 385, 369, 0, 371, 177, - /* 1740 */ 176, 0, 0, 325, 0, 394, 47, 0, 0, 398, - /* 1750 */ 42, 0, 401, 402, 403, 404, 405, 406, 0, 408, - /* 1760 */ 0, 394, 0, 0, 0, 398, 0, 0, 401, 402, - /* 1770 */ 403, 404, 405, 406, 356, 408, 152, 427, 35, 0, - /* 1780 */ 152, 431, 364, 0, 0, 0, 325, 369, 0, 371, - /* 1790 */ 0, 0, 0, 0, 0, 0, 446, 447, 0, 0, - /* 1800 */ 0, 451, 452, 325, 0, 0, 0, 42, 0, 0, - /* 1810 */ 0, 0, 394, 0, 0, 0, 398, 356, 22, 401, - /* 1820 */ 402, 403, 404, 405, 406, 364, 408, 0, 0, 136, - /* 1830 */ 369, 0, 371, 58, 356, 0, 35, 0, 58, 0, - /* 1840 */ 14, 44, 364, 14, 42, 0, 39, 369, 0, 371, - /* 1850 */ 47, 0, 40, 0, 0, 394, 325, 39, 39, 398, - /* 1860 */ 172, 0, 401, 402, 403, 404, 405, 406, 47, 408, - /* 1870 */ 47, 0, 394, 325, 0, 0, 398, 35, 48, 401, - /* 1880 */ 402, 403, 404, 405, 406, 39, 408, 356, 64, 0, - /* 1890 */ 35, 48, 0, 35, 0, 364, 39, 48, 39, 35, - /* 1900 */ 369, 39, 371, 0, 356, 0, 0, 0, 48, 22, - /* 1910 */ 0, 35, 364, 35, 35, 22, 35, 369, 35, 371, - /* 1920 */ 103, 105, 22, 35, 325, 394, 44, 0, 44, 398, - /* 1930 */ 35, 35, 401, 402, 403, 404, 405, 406, 22, 408, - /* 1940 */ 0, 325, 394, 22, 0, 22, 398, 50, 35, 401, - /* 1950 */ 402, 403, 404, 405, 406, 356, 408, 0, 0, 35, - /* 1960 */ 35, 0, 97, 364, 22, 20, 35, 325, 369, 35, - /* 1970 */ 371, 193, 356, 96, 0, 0, 35, 22, 0, 0, - /* 1980 */ 364, 44, 249, 3, 325, 369, 164, 371, 97, 249, - /* 1990 */ 44, 44, 44, 394, 96, 96, 164, 398, 356, 166, - /* 2000 */ 401, 402, 403, 404, 405, 406, 364, 408, 164, 184, - /* 2010 */ 394, 369, 97, 371, 398, 356, 97, 401, 402, 403, - /* 2020 */ 404, 405, 406, 364, 408, 96, 170, 97, 369, 47, - /* 2030 */ 371, 96, 96, 47, 96, 325, 394, 3, 44, 35, - /* 2040 */ 398, 35, 35, 401, 402, 403, 404, 405, 406, 97, - /* 2050 */ 408, 97, 35, 394, 35, 35, 97, 398, 47, 97, - /* 2060 */ 401, 402, 403, 404, 405, 406, 356, 408, 44, 47, - /* 2070 */ 0, 0, 0, 96, 364, 167, 0, 96, 325, 369, - /* 2080 */ 97, 371, 97, 249, 243, 96, 96, 39, 96, 47, - /* 2090 */ 106, 165, 2, 44, 325, 228, 230, 228, 96, 22, - /* 2100 */ 97, 96, 47, 47, 394, 97, 96, 206, 398, 356, - /* 2110 */ 97, 401, 402, 403, 404, 405, 406, 364, 408, 96, - /* 2120 */ 22, 96, 369, 97, 371, 356, 208, 96, 107, 97, - /* 2130 */ 35, 35, 96, 364, 97, 35, 96, 35, 369, 96, - /* 2140 */ 371, 97, 97, 35, 97, 325, 96, 394, 35, 96, - /* 2150 */ 120, 398, 22, 120, 401, 402, 403, 404, 405, 406, - /* 2160 */ 108, 408, 96, 394, 44, 96, 120, 398, 35, 96, - /* 2170 */ 401, 402, 403, 404, 405, 406, 356, 408, 120, 22, - /* 2180 */ 64, 63, 35, 35, 364, 35, 35, 35, 325, 369, - /* 2190 */ 35, 371, 70, 35, 35, 35, 35, 93, 44, 35, - /* 2200 */ 35, 22, 35, 22, 35, 325, 35, 35, 70, 35, - /* 2210 */ 35, 35, 35, 35, 394, 22, 0, 35, 398, 356, - /* 2220 */ 35, 401, 402, 403, 404, 405, 406, 364, 408, 39, - /* 2230 */ 0, 48, 369, 35, 371, 48, 356, 0, 39, 35, - /* 2240 */ 48, 39, 0, 35, 364, 48, 39, 0, 35, 369, - /* 2250 */ 35, 371, 0, 22, 21, 20, 22, 394, 325, 457, - /* 2260 */ 22, 398, 21, 457, 401, 402, 403, 404, 405, 406, - /* 2270 */ 457, 408, 457, 457, 394, 325, 457, 457, 398, 457, - /* 2280 */ 457, 401, 402, 403, 404, 405, 406, 457, 408, 356, - /* 2290 */ 457, 457, 457, 457, 457, 457, 457, 364, 457, 457, - /* 2300 */ 457, 457, 369, 457, 371, 457, 356, 457, 457, 457, - /* 2310 */ 457, 457, 457, 457, 364, 457, 457, 457, 457, 369, - /* 2320 */ 457, 371, 457, 457, 457, 457, 325, 394, 457, 457, - /* 2330 */ 457, 398, 457, 457, 401, 402, 403, 404, 405, 406, - /* 2340 */ 457, 408, 457, 457, 394, 457, 457, 457, 398, 457, - /* 2350 */ 457, 401, 402, 403, 404, 405, 406, 356, 408, 457, - /* 2360 */ 457, 457, 457, 457, 457, 364, 457, 457, 457, 457, - /* 2370 */ 369, 457, 371, 457, 457, 457, 457, 457, 457, 457, - /* 2380 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2390 */ 457, 457, 457, 457, 457, 394, 457, 457, 457, 398, - /* 2400 */ 457, 457, 401, 402, 403, 404, 405, 406, 457, 408, - /* 2410 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2420 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2430 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2440 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2450 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2460 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2470 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2480 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2490 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2500 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2510 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2520 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2530 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2540 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2550 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2560 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2570 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2580 */ 457, 457, 457, 457, 457, + /* 950 */ 92, 18, 335, 327, 327, 0, 23, 8, 9, 366, + /* 960 */ 22, 12, 13, 14, 15, 16, 349, 108, 133, 134, + /* 970 */ 37, 38, 327, 35, 41, 368, 335, 42, 371, 44, + /* 980 */ 8, 9, 327, 366, 12, 13, 14, 15, 16, 130, + /* 990 */ 349, 20, 59, 60, 61, 8, 9, 371, 371, 12, + /* 1000 */ 13, 14, 15, 16, 44, 327, 327, 366, 70, 44, + /* 1010 */ 335, 368, 63, 358, 371, 63, 371, 62, 425, 426, + /* 1020 */ 427, 366, 429, 430, 349, 0, 371, 327, 373, 96, + /* 1030 */ 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + /* 1040 */ 119, 366, 121, 122, 123, 124, 125, 126, 327, 371, + /* 1050 */ 371, 396, 152, 335, 105, 400, 118, 97, 403, 404, + /* 1060 */ 405, 406, 407, 408, 335, 410, 44, 349, 135, 97, + /* 1070 */ 415, 371, 417, 48, 327, 35, 421, 422, 349, 368, + /* 1080 */ 327, 335, 371, 351, 366, 335, 354, 432, 42, 359, + /* 1090 */ 44, 107, 371, 44, 359, 366, 8, 9, 35, 349, + /* 1100 */ 12, 13, 14, 15, 16, 358, 173, 174, 175, 335, + /* 1110 */ 161, 178, 366, 366, 100, 246, 366, 103, 371, 181, + /* 1120 */ 373, 183, 446, 349, 371, 335, 0, 100, 335, 196, + /* 1130 */ 103, 457, 199, 162, 201, 202, 203, 204, 205, 349, + /* 1140 */ 366, 157, 349, 396, 206, 207, 97, 400, 22, 337, + /* 1150 */ 403, 404, 405, 406, 407, 408, 366, 410, 206, 366, + /* 1160 */ 387, 327, 415, 335, 417, 44, 335, 440, 421, 422, + /* 1170 */ 337, 425, 426, 427, 358, 429, 430, 349, 245, 432, + /* 1180 */ 349, 232, 233, 234, 235, 236, 237, 238, 239, 240, + /* 1190 */ 241, 242, 358, 100, 366, 0, 103, 366, 335, 381, + /* 1200 */ 366, 44, 429, 96, 327, 371, 433, 373, 100, 44, + /* 1210 */ 47, 103, 349, 106, 335, 334, 44, 22, 97, 1, + /* 1220 */ 2, 448, 449, 183, 370, 13, 453, 454, 349, 366, + /* 1230 */ 396, 266, 327, 44, 400, 358, 44, 403, 404, 405, + /* 1240 */ 406, 407, 408, 366, 410, 366, 183, 35, 371, 415, + /* 1250 */ 373, 417, 164, 381, 97, 421, 422, 431, 35, 96, + /* 1260 */ 450, 423, 97, 358, 44, 44, 432, 0, 247, 97, + /* 1270 */ 434, 366, 44, 396, 398, 327, 371, 400, 373, 44, + /* 1280 */ 403, 404, 405, 406, 407, 408, 97, 410, 44, 97, + /* 1290 */ 268, 48, 415, 70, 417, 397, 179, 44, 421, 422, + /* 1300 */ 387, 396, 378, 389, 44, 400, 358, 42, 403, 404, + /* 1310 */ 405, 406, 407, 408, 366, 410, 49, 97, 97, 371, + /* 1320 */ 415, 373, 417, 13, 44, 97, 421, 422, 20, 378, + /* 1330 */ 387, 381, 97, 376, 161, 20, 335, 335, 376, 378, + /* 1340 */ 327, 97, 429, 376, 396, 35, 433, 343, 400, 360, + /* 1350 */ 97, 403, 404, 405, 406, 407, 408, 97, 410, 335, + /* 1360 */ 371, 448, 449, 94, 327, 417, 453, 454, 335, 421, + /* 1370 */ 422, 358, 429, 335, 20, 20, 433, 97, 393, 366, + /* 1380 */ 329, 329, 341, 327, 371, 373, 373, 20, 399, 400, + /* 1390 */ 401, 448, 449, 336, 341, 358, 453, 454, 20, 410, + /* 1400 */ 341, 336, 341, 366, 388, 341, 335, 341, 371, 396, + /* 1410 */ 373, 341, 52, 400, 358, 338, 403, 404, 405, 406, + /* 1420 */ 407, 408, 366, 410, 338, 329, 358, 371, 329, 373, + /* 1430 */ 417, 358, 358, 396, 421, 422, 327, 400, 358, 358, + /* 1440 */ 403, 404, 405, 406, 407, 408, 335, 410, 358, 358, + /* 1450 */ 358, 195, 396, 358, 371, 358, 400, 327, 360, 403, + /* 1460 */ 404, 405, 406, 407, 408, 371, 410, 358, 358, 371, + /* 1470 */ 395, 393, 339, 417, 186, 366, 392, 421, 422, 373, + /* 1480 */ 371, 339, 373, 335, 381, 381, 371, 255, 358, 439, + /* 1490 */ 371, 254, 455, 456, 439, 371, 366, 399, 400, 401, + /* 1500 */ 384, 371, 384, 373, 442, 396, 371, 261, 410, 400, + /* 1510 */ 327, 172, 403, 404, 405, 406, 407, 408, 409, 410, + /* 1520 */ 411, 412, 263, 441, 439, 438, 396, 398, 262, 248, + /* 1530 */ 400, 270, 366, 403, 404, 405, 406, 407, 408, 437, + /* 1540 */ 410, 358, 267, 265, 244, 20, 402, 458, 436, 366, + /* 1550 */ 335, 384, 452, 336, 371, 339, 373, 371, 371, 371, + /* 1560 */ 384, 371, 371, 327, 451, 371, 166, 382, 339, 339, + /* 1570 */ 366, 96, 420, 354, 444, 445, 96, 371, 339, 396, + /* 1580 */ 335, 36, 348, 400, 327, 330, 403, 404, 405, 406, + /* 1590 */ 407, 408, 329, 410, 358, 362, 394, 390, 385, 385, + /* 1600 */ 417, 352, 366, 352, 352, 422, 327, 371, 340, 373, + /* 1610 */ 325, 0, 0, 188, 0, 358, 0, 42, 0, 35, + /* 1620 */ 35, 200, 35, 366, 200, 35, 0, 35, 371, 35, + /* 1630 */ 373, 200, 396, 0, 200, 0, 400, 358, 35, 403, + /* 1640 */ 404, 405, 406, 407, 408, 366, 410, 0, 0, 22, + /* 1650 */ 371, 183, 373, 396, 35, 181, 0, 400, 0, 177, + /* 1660 */ 403, 404, 405, 406, 407, 408, 176, 410, 0, 0, + /* 1670 */ 47, 0, 327, 0, 0, 396, 42, 0, 0, 400, + /* 1680 */ 152, 445, 403, 404, 405, 406, 407, 408, 0, 410, + /* 1690 */ 4, 0, 327, 0, 0, 0, 0, 35, 0, 152, + /* 1700 */ 0, 0, 0, 358, 447, 19, 0, 0, 363, 0, + /* 1710 */ 0, 366, 0, 0, 0, 0, 371, 0, 373, 33, + /* 1720 */ 0, 0, 0, 358, 42, 0, 0, 0, 0, 0, + /* 1730 */ 22, 366, 0, 0, 48, 456, 371, 0, 373, 53, + /* 1740 */ 136, 396, 0, 0, 58, 400, 35, 327, 403, 404, + /* 1750 */ 405, 406, 407, 408, 0, 410, 0, 58, 0, 0, + /* 1760 */ 42, 396, 39, 327, 14, 400, 47, 14, 403, 404, + /* 1770 */ 405, 406, 407, 408, 58, 410, 0, 412, 358, 44, + /* 1780 */ 39, 95, 0, 363, 98, 47, 366, 47, 40, 0, + /* 1790 */ 0, 371, 172, 373, 358, 0, 39, 0, 0, 363, + /* 1800 */ 64, 0, 366, 0, 35, 39, 327, 371, 48, 373, + /* 1810 */ 0, 48, 35, 39, 0, 35, 396, 0, 48, 35, + /* 1820 */ 400, 48, 39, 403, 404, 405, 406, 407, 408, 0, + /* 1830 */ 410, 39, 396, 0, 0, 0, 400, 358, 22, 403, + /* 1840 */ 404, 405, 406, 407, 408, 366, 410, 103, 35, 327, + /* 1850 */ 371, 105, 373, 0, 35, 35, 44, 35, 22, 35, + /* 1860 */ 35, 35, 44, 22, 0, 327, 35, 22, 0, 22, + /* 1870 */ 0, 22, 0, 50, 35, 396, 0, 35, 35, 400, + /* 1880 */ 358, 0, 403, 404, 405, 406, 407, 408, 366, 410, + /* 1890 */ 35, 22, 35, 371, 20, 373, 358, 97, 193, 0, + /* 1900 */ 96, 35, 0, 164, 366, 22, 0, 0, 184, 371, + /* 1910 */ 253, 373, 3, 164, 249, 170, 327, 166, 396, 164, + /* 1920 */ 228, 44, 400, 96, 96, 403, 404, 405, 406, 407, + /* 1930 */ 408, 44, 410, 327, 396, 97, 169, 169, 400, 44, + /* 1940 */ 96, 403, 404, 405, 406, 407, 408, 358, 410, 97, + /* 1950 */ 47, 97, 96, 3, 96, 366, 97, 47, 96, 44, + /* 1960 */ 371, 44, 373, 35, 358, 35, 35, 35, 97, 35, + /* 1970 */ 97, 35, 366, 47, 47, 97, 97, 371, 0, 373, + /* 1980 */ 249, 44, 0, 249, 0, 396, 96, 96, 327, 400, + /* 1990 */ 243, 97, 403, 404, 405, 406, 407, 408, 97, 410, + /* 2000 */ 96, 96, 396, 0, 39, 165, 400, 327, 96, 403, + /* 2010 */ 404, 405, 406, 407, 408, 167, 410, 106, 47, 358, + /* 2020 */ 44, 228, 2, 22, 230, 96, 47, 366, 47, 96, + /* 2030 */ 228, 327, 371, 22, 373, 97, 206, 97, 358, 96, + /* 2040 */ 208, 97, 96, 96, 35, 97, 366, 96, 107, 97, + /* 2050 */ 35, 371, 96, 373, 97, 96, 35, 396, 97, 35, + /* 2060 */ 96, 400, 358, 97, 403, 404, 405, 406, 407, 408, + /* 2070 */ 366, 410, 35, 96, 35, 371, 396, 373, 120, 96, + /* 2080 */ 400, 22, 97, 403, 404, 405, 406, 407, 408, 327, + /* 2090 */ 410, 96, 120, 120, 120, 108, 44, 35, 96, 22, + /* 2100 */ 396, 96, 64, 63, 400, 327, 35, 403, 404, 405, + /* 2110 */ 406, 407, 408, 35, 410, 35, 35, 35, 35, 35, + /* 2120 */ 358, 35, 35, 35, 70, 93, 35, 35, 366, 44, + /* 2130 */ 22, 35, 22, 371, 35, 373, 358, 35, 35, 70, + /* 2140 */ 22, 35, 35, 0, 366, 48, 35, 35, 327, 371, + /* 2150 */ 35, 373, 35, 39, 35, 0, 35, 48, 396, 39, + /* 2160 */ 0, 35, 400, 39, 327, 403, 404, 405, 406, 407, + /* 2170 */ 408, 48, 410, 0, 396, 35, 48, 39, 400, 358, + /* 2180 */ 0, 403, 404, 405, 406, 407, 408, 366, 410, 35, + /* 2190 */ 0, 35, 371, 22, 373, 358, 22, 21, 20, 22, + /* 2200 */ 21, 459, 459, 366, 459, 459, 459, 327, 371, 459, + /* 2210 */ 373, 459, 459, 459, 459, 459, 459, 396, 459, 459, + /* 2220 */ 459, 400, 459, 327, 403, 404, 405, 406, 407, 408, + /* 2230 */ 459, 410, 459, 396, 459, 459, 459, 400, 358, 459, + /* 2240 */ 403, 404, 405, 406, 407, 408, 366, 410, 459, 459, + /* 2250 */ 459, 371, 459, 373, 358, 459, 459, 459, 459, 459, + /* 2260 */ 459, 459, 366, 459, 459, 459, 327, 371, 459, 373, + /* 2270 */ 459, 459, 459, 459, 459, 459, 396, 459, 459, 459, + /* 2280 */ 400, 459, 459, 403, 404, 405, 406, 407, 408, 459, + /* 2290 */ 410, 459, 396, 459, 459, 459, 400, 358, 459, 403, + /* 2300 */ 404, 405, 406, 407, 408, 366, 410, 459, 459, 459, + /* 2310 */ 371, 459, 373, 459, 459, 459, 459, 327, 459, 459, + /* 2320 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2330 */ 459, 459, 459, 459, 327, 396, 459, 459, 459, 400, + /* 2340 */ 459, 459, 403, 404, 405, 406, 407, 408, 358, 410, + /* 2350 */ 459, 459, 459, 459, 459, 459, 366, 459, 459, 459, + /* 2360 */ 327, 371, 459, 373, 459, 358, 459, 459, 459, 459, + /* 2370 */ 459, 459, 459, 366, 459, 459, 459, 459, 371, 459, + /* 2380 */ 373, 459, 459, 459, 459, 459, 396, 459, 459, 459, + /* 2390 */ 400, 358, 459, 403, 404, 405, 406, 407, 408, 366, + /* 2400 */ 410, 459, 459, 396, 371, 459, 373, 400, 459, 459, + /* 2410 */ 403, 404, 405, 406, 407, 408, 327, 410, 459, 459, + /* 2420 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 396, + /* 2430 */ 459, 459, 327, 400, 459, 459, 403, 404, 405, 406, + /* 2440 */ 407, 408, 459, 410, 459, 459, 459, 358, 459, 459, + /* 2450 */ 459, 459, 459, 459, 459, 366, 459, 459, 459, 459, + /* 2460 */ 371, 459, 373, 358, 459, 459, 459, 459, 459, 459, + /* 2470 */ 459, 366, 459, 459, 459, 459, 371, 459, 373, 459, + /* 2480 */ 459, 459, 459, 459, 459, 396, 327, 459, 459, 400, + /* 2490 */ 459, 459, 403, 404, 405, 406, 407, 408, 459, 410, + /* 2500 */ 459, 396, 327, 459, 459, 400, 459, 459, 403, 404, + /* 2510 */ 405, 406, 407, 408, 459, 410, 459, 358, 459, 459, + /* 2520 */ 459, 459, 459, 459, 459, 366, 459, 459, 459, 459, + /* 2530 */ 371, 459, 373, 358, 459, 459, 459, 459, 459, 459, + /* 2540 */ 459, 366, 459, 459, 459, 459, 371, 459, 373, 459, + /* 2550 */ 459, 459, 459, 459, 459, 396, 459, 459, 459, 400, + /* 2560 */ 459, 459, 403, 404, 405, 406, 407, 408, 459, 410, + /* 2570 */ 459, 396, 459, 459, 459, 400, 459, 459, 403, 404, + /* 2580 */ 405, 406, 407, 408, 459, 410, }; -#define YY_SHIFT_COUNT (709) +#define YY_SHIFT_COUNT (715) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2252) +#define YY_SHIFT_MAX (2190) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 933, 0, 134, 0, 268, 268, 268, 268, 268, 268, - /* 10 */ 268, 268, 268, 402, 536, 536, 670, 536, 536, 536, + /* 10 */ 268, 268, 268, 268, 268, 402, 536, 536, 670, 536, /* 20 */ 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, /* 30 */ 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, - /* 40 */ 536, 536, 536, 536, 536, 536, 55, 180, 65, 195, - /* 50 */ 26, 284, 330, 284, 65, 65, 947, 947, 284, 947, - /* 60 */ 947, 182, 284, 39, 39, 128, 128, 111, 272, 42, - /* 70 */ 42, 39, 39, 39, 39, 39, 39, 39, 39, 39, - /* 80 */ 39, 31, 39, 39, 105, 39, 137, 39, 39, 188, - /* 90 */ 39, 39, 188, 39, 188, 188, 188, 39, 140, 762, - /* 100 */ 949, 949, 438, 1131, 1056, 1056, 1056, 1056, 1056, 1056, - /* 110 */ 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - /* 120 */ 1056, 1056, 1056, 965, 228, 111, 272, 659, 532, 269, - /* 130 */ 269, 269, 800, 370, 370, 532, 224, 224, 224, 213, - /* 140 */ 137, 33, 188, 351, 188, 351, 351, 213, 389, 909, - /* 150 */ 909, 909, 909, 909, 909, 909, 1044, 36, 793, 851, - /* 160 */ 975, 572, 115, 83, 72, 84, 517, 850, 1034, 986, - /* 170 */ 959, 843, 634, 865, 843, 1099, 857, 486, 1066, 1285, - /* 180 */ 1160, 1302, 1327, 1302, 1190, 1353, 1353, 1302, 1190, 1190, - /* 190 */ 1290, 1353, 1353, 1353, 1371, 1371, 1387, 31, 137, 31, - /* 200 */ 1392, 1407, 31, 1392, 31, 31, 31, 1353, 31, 1382, - /* 210 */ 1382, 1371, 188, 188, 188, 188, 188, 188, 188, 188, - /* 220 */ 188, 188, 188, 1353, 1371, 351, 351, 1250, 1387, 140, - /* 230 */ 1315, 137, 140, 1353, 1327, 1327, 351, 1262, 1268, 351, - /* 240 */ 1262, 1268, 351, 351, 188, 1283, 1374, 1262, 1282, 1297, - /* 250 */ 1300, 1066, 1298, 1310, 1313, 1329, 224, 1575, 1353, 1392, - /* 260 */ 140, 1268, 351, 351, 351, 351, 351, 1268, 351, 1453, - /* 270 */ 140, 213, 140, 224, 1533, 1536, 351, 389, 1353, 140, - /* 280 */ 1627, 1371, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, - /* 290 */ 2410, 858, 1027, 23, 1389, 52, 663, 449, 155, 672, - /* 300 */ 1289, 1555, 423, 756, 756, 756, 756, 756, 756, 756, - /* 310 */ 756, 756, 339, 190, 243, 243, 390, 378, 315, 523, - /* 320 */ 470, 518, 518, 696, 999, 168, 696, 696, 696, 884, - /* 330 */ 1076, 385, 1102, 1007, 1089, 956, 1073, 1106, 1107, 16, - /* 340 */ 1196, 1197, 1166, 1105, 1128, 1093, 1071, 972, 1051, 1135, - /* 350 */ 1169, 1173, 1178, 1199, 1232, 1215, 1085, 1110, 573, 1217, - /* 360 */ 1181, 1264, 1265, 1267, 1272, 1288, 1292, 1134, 1234, 1305, - /* 370 */ 1210, 1323, 1687, 1691, 1505, 1694, 1695, 1654, 1697, 1663, - /* 380 */ 1499, 1665, 1666, 1668, 1504, 1705, 1673, 1682, 1518, 1721, - /* 390 */ 1524, 1725, 1692, 1726, 1706, 1729, 1698, 1547, 1551, 1734, - /* 400 */ 1737, 1562, 1564, 1741, 1742, 1699, 1744, 1747, 1748, 1708, - /* 410 */ 1751, 1758, 1760, 1762, 1763, 1764, 1766, 1767, 1624, 1743, - /* 420 */ 1779, 1628, 1783, 1784, 1785, 1788, 1790, 1791, 1792, 1793, - /* 430 */ 1794, 1795, 1798, 1799, 1800, 1804, 1805, 1765, 1806, 1808, - /* 440 */ 1809, 1810, 1811, 1796, 1813, 1814, 1815, 1693, 1827, 1828, - /* 450 */ 1801, 1831, 1775, 1835, 1780, 1837, 1839, 1802, 1807, 1797, - /* 460 */ 1803, 1826, 1821, 1829, 1823, 1845, 1812, 1818, 1848, 1851, - /* 470 */ 1853, 1819, 1688, 1854, 1861, 1871, 1824, 1874, 1875, 1842, - /* 480 */ 1830, 1846, 1889, 1855, 1843, 1857, 1892, 1858, 1849, 1859, - /* 490 */ 1894, 1864, 1860, 1862, 1903, 1905, 1906, 1907, 1816, 1817, - /* 500 */ 1876, 1887, 1910, 1878, 1879, 1893, 1881, 1883, 1882, 1884, - /* 510 */ 1888, 1895, 1900, 1896, 1927, 1916, 1940, 1921, 1897, 1944, - /* 520 */ 1923, 1913, 1957, 1924, 1958, 1925, 1961, 1942, 1945, 1931, - /* 530 */ 1934, 1778, 1865, 1877, 1974, 1822, 1941, 1975, 1825, 1955, - /* 540 */ 1832, 1833, 1978, 1979, 1844, 1856, 1980, 1937, 1733, 1898, - /* 550 */ 1891, 1899, 1915, 1946, 1919, 1929, 1935, 1936, 1930, 1947, - /* 560 */ 1982, 1986, 1938, 1948, 1740, 1952, 1954, 2034, 1994, 1834, - /* 570 */ 2004, 2006, 2007, 2017, 2019, 2020, 1959, 1962, 2011, 1841, - /* 580 */ 2024, 2022, 2070, 2071, 2072, 1977, 1983, 1985, 1981, 1989, - /* 590 */ 1908, 1990, 2076, 2048, 1926, 1992, 1984, 1803, 2042, 2049, - /* 600 */ 1867, 1866, 1869, 2090, 2077, 1901, 2002, 2003, 2005, 2008, - /* 610 */ 2010, 2013, 2055, 2023, 2025, 2056, 2026, 2098, 1918, 2031, - /* 620 */ 2021, 2032, 2095, 2096, 2036, 2037, 2100, 2040, 2044, 2102, - /* 630 */ 2043, 2045, 2108, 2050, 2047, 2113, 2053, 2030, 2033, 2046, - /* 640 */ 2058, 2130, 2052, 2066, 2120, 2069, 2133, 2073, 2120, 2120, - /* 650 */ 2157, 2116, 2118, 2147, 2148, 2150, 2151, 2152, 2155, 2158, - /* 660 */ 2159, 2160, 2161, 2122, 2104, 2154, 2164, 2165, 2179, 2167, - /* 670 */ 2181, 2169, 2171, 2172, 2138, 1882, 2174, 1884, 2175, 2176, - /* 680 */ 2177, 2178, 2193, 2182, 2216, 2185, 2183, 2190, 2230, 2198, - /* 690 */ 2187, 2199, 2237, 2204, 2192, 2202, 2242, 2208, 2197, 2207, - /* 700 */ 2247, 2213, 2215, 2252, 2231, 2233, 2234, 2238, 2241, 2235, + /* 40 */ 536, 536, 536, 536, 536, 536, 536, 536, 55, 180, + /* 50 */ 65, 281, 26, 135, 405, 135, 65, 65, 618, 618, + /* 60 */ 135, 618, 618, 269, 135, 39, 39, 128, 128, 258, + /* 70 */ 272, 42, 42, 39, 39, 39, 39, 39, 39, 39, + /* 80 */ 39, 39, 39, 31, 39, 39, 105, 39, 137, 39, + /* 90 */ 39, 182, 39, 39, 182, 39, 182, 182, 182, 39, + /* 100 */ 200, 762, 949, 949, 628, 415, 938, 938, 938, 938, + /* 110 */ 938, 938, 938, 938, 938, 938, 938, 938, 938, 938, + /* 120 */ 938, 938, 938, 938, 938, 748, 632, 258, 272, 660, + /* 130 */ 654, 228, 228, 228, 955, 91, 91, 654, 348, 348, + /* 140 */ 348, 278, 137, 15, 182, 427, 182, 427, 427, 278, + /* 150 */ 506, 921, 921, 921, 921, 921, 921, 921, 677, 36, + /* 160 */ 572, 629, 395, 399, 115, 83, 72, 84, 448, 355, + /* 170 */ 692, 859, 550, 562, 600, 205, 562, 935, 869, 971, + /* 180 */ 1021, 1243, 1117, 1265, 1308, 1265, 1173, 1315, 1315, 1265, + /* 190 */ 1173, 1173, 1269, 1315, 1315, 1315, 1354, 1354, 1355, 31, + /* 200 */ 137, 31, 1367, 1378, 31, 1367, 31, 31, 31, 1315, + /* 210 */ 31, 1360, 1360, 1354, 182, 182, 182, 182, 182, 182, + /* 220 */ 182, 182, 182, 182, 182, 1315, 1354, 427, 427, 1256, + /* 230 */ 1355, 200, 1288, 137, 200, 1315, 1308, 1308, 427, 1232, + /* 240 */ 1237, 427, 1232, 1237, 427, 427, 182, 1246, 1339, 1232, + /* 250 */ 1259, 1266, 1281, 1021, 1261, 1275, 1278, 1300, 348, 1525, + /* 260 */ 1315, 1367, 200, 1237, 427, 427, 427, 427, 427, 1237, + /* 270 */ 427, 1400, 200, 278, 200, 348, 1475, 1480, 427, 506, + /* 280 */ 1315, 200, 1545, 1354, 2586, 2586, 2586, 2586, 2586, 2586, + /* 290 */ 2586, 2586, 2586, 858, 497, 23, 1686, 52, 566, 972, + /* 300 */ 155, 665, 814, 1088, 325, 987, 987, 987, 987, 987, + /* 310 */ 987, 987, 987, 987, 410, 190, 243, 243, 391, 489, + /* 320 */ 385, 612, 644, 142, 142, 547, 510, 206, 547, 547, + /* 330 */ 547, 960, 1025, 839, 1046, 984, 900, 1014, 1027, 1093, + /* 340 */ 1108, 16, 1126, 1195, 231, 1049, 1121, 835, 965, 1022, + /* 350 */ 422, 1157, 1165, 1172, 1189, 1192, 1218, 1220, 1040, 1063, + /* 360 */ 952, 1221, 1163, 1228, 1235, 1244, 1253, 1260, 1280, 1107, + /* 370 */ 1212, 1310, 1223, 1267, 1611, 1612, 1425, 1614, 1616, 1575, + /* 380 */ 1618, 1584, 1421, 1585, 1587, 1590, 1424, 1626, 1592, 1594, + /* 390 */ 1431, 1633, 1434, 1635, 1603, 1647, 1627, 1648, 1619, 1468, + /* 400 */ 1474, 1656, 1658, 1482, 1490, 1668, 1669, 1623, 1671, 1673, + /* 410 */ 1674, 1634, 1677, 1678, 1688, 1691, 1693, 1694, 1695, 1696, + /* 420 */ 1528, 1662, 1698, 1547, 1700, 1701, 1702, 1706, 1707, 1709, + /* 430 */ 1710, 1712, 1713, 1714, 1715, 1717, 1720, 1721, 1722, 1682, + /* 440 */ 1725, 1726, 1727, 1728, 1729, 1708, 1732, 1733, 1737, 1604, + /* 450 */ 1742, 1743, 1711, 1754, 1699, 1756, 1716, 1758, 1759, 1718, + /* 460 */ 1723, 1735, 1719, 1750, 1738, 1753, 1740, 1776, 1748, 1741, + /* 470 */ 1782, 1789, 1790, 1757, 1620, 1795, 1797, 1798, 1736, 1801, + /* 480 */ 1803, 1769, 1760, 1766, 1810, 1777, 1763, 1774, 1814, 1780, + /* 490 */ 1770, 1783, 1817, 1784, 1773, 1792, 1829, 1833, 1834, 1835, + /* 500 */ 1746, 1744, 1813, 1816, 1853, 1819, 1820, 1836, 1822, 1824, + /* 510 */ 1812, 1818, 1825, 1826, 1841, 1831, 1864, 1845, 1868, 1847, + /* 520 */ 1823, 1870, 1849, 1839, 1872, 1842, 1876, 1843, 1881, 1869, + /* 530 */ 1874, 1855, 1857, 1705, 1800, 1804, 1899, 1739, 1866, 1902, + /* 540 */ 1724, 1883, 1749, 1751, 1906, 1907, 1755, 1745, 1909, 1877, + /* 550 */ 1665, 1827, 1838, 1828, 1767, 1692, 1768, 1657, 1852, 1887, + /* 560 */ 1854, 1844, 1856, 1858, 1859, 1895, 1903, 1910, 1862, 1915, + /* 570 */ 1731, 1871, 1873, 1950, 1917, 1734, 1928, 1930, 1931, 1932, + /* 580 */ 1934, 1936, 1878, 1879, 1926, 1747, 1937, 1927, 1978, 1982, + /* 590 */ 1984, 1890, 1894, 1901, 1891, 1904, 1848, 1905, 2003, 1965, + /* 600 */ 1840, 1912, 1911, 1719, 1971, 1976, 1793, 1794, 1802, 2020, + /* 610 */ 2001, 1830, 1929, 1938, 1933, 1940, 1943, 1944, 1979, 1946, + /* 620 */ 1947, 1981, 1948, 2011, 1832, 1951, 1941, 1952, 2009, 2015, + /* 630 */ 1956, 1957, 2021, 1959, 1961, 2024, 1964, 1966, 2037, 1977, + /* 640 */ 1985, 2039, 1983, 1958, 1972, 1973, 1974, 2059, 1987, 1995, + /* 650 */ 2052, 2002, 2062, 2005, 2052, 2052, 2077, 2038, 2040, 2071, + /* 660 */ 2078, 2080, 2081, 2082, 2083, 2084, 2086, 2087, 2088, 2054, + /* 670 */ 2032, 2085, 2091, 2092, 2108, 2096, 2110, 2099, 2102, 2103, + /* 680 */ 2069, 1812, 2106, 1818, 2107, 2111, 2112, 2115, 2118, 2117, + /* 690 */ 2143, 2119, 2097, 2114, 2155, 2121, 2109, 2120, 2160, 2126, + /* 700 */ 2123, 2124, 2173, 2140, 2128, 2138, 2180, 2154, 2156, 2190, + /* 710 */ 2171, 2176, 2174, 2177, 2179, 2178, }; -#define YY_REDUCE_COUNT (290) -#define YY_REDUCE_MIN (-422) -#define YY_REDUCE_MAX (2001) +#define YY_REDUCE_COUNT (292) +#define YY_REDUCE_MIN (-424) +#define YY_REDUCE_MAX (2175) static const short yy_reduce_ofst[] = { - /* 0 */ -186, -325, -226, -166, -32, 236, 642, -92, 176, 852, - /* 10 */ 880, 923, 951, 994, 333, 1012, 1055, 1108, 1129, 1183, - /* 20 */ 1237, 40, 1254, 1308, 442, 1280, 1351, 1367, 1418, 1461, - /* 30 */ 1478, 1531, 1548, 1599, 1616, 1642, 1659, 1710, 1753, 1769, - /* 40 */ 1820, 1863, 1880, 1933, 1950, 2001, -34, 350, 240, -340, - /* 50 */ 666, 1098, 1109, 1350, 776, 1189, 1070, 1083, -422, -326, - /* 60 */ -269, -410, -287, -206, -163, -328, -321, -350, -352, -26, - /* 70 */ 122, -307, -28, 163, 166, 174, 229, 239, 361, 362, - /* 80 */ 452, 46, 508, 621, -251, 639, 48, 706, 741, 177, - /* 90 */ 757, 786, 146, 847, 178, 152, 287, 509, -108, -299, - /* 100 */ -221, -221, -338, -207, -27, 172, 194, 322, 332, 375, - /* 110 */ 405, 462, 465, 466, 469, 480, 483, 529, 550, 627, - /* 120 */ 628, 630, 641, -33, -303, 275, -101, 271, -48, -303, - /* 130 */ 383, 474, 356, 302, 306, 25, -222, 64, 409, 380, - /* 140 */ 624, 562, 368, 609, 686, 638, 683, 689, 493, 143, - /* 150 */ 157, 203, 233, 241, 366, 429, 14, 556, 481, 317, - /* 160 */ 522, 565, 702, 633, 775, 775, 812, 772, 903, 905, - /* 170 */ 873, 860, 860, 842, 860, 885, 878, 775, 934, 939, - /* 180 */ 954, 970, 969, 984, 993, 1041, 1042, 1001, 1004, 1005, - /* 190 */ 1045, 1049, 1054, 1057, 1067, 1078, 1018, 1082, 1052, 1086, - /* 200 */ 1095, 1046, 1091, 1097, 1096, 1101, 1104, 1103, 1111, 1112, - /* 210 */ 1115, 1117, 1090, 1118, 1120, 1130, 1132, 1133, 1136, 1139, - /* 220 */ 1140, 1141, 1143, 1122, 1144, 1069, 1121, 1080, 1113, 1125, - /* 230 */ 1127, 1147, 1168, 1170, 1142, 1145, 1138, 1146, 1137, 1157, - /* 240 */ 1153, 1156, 1159, 1172, 775, 1119, 1126, 1155, 1158, 1123, - /* 250 */ 1148, 1176, 1124, 1149, 1151, 860, 1214, 1202, 1263, 1269, - /* 260 */ 1260, 1222, 1238, 1240, 1242, 1251, 1252, 1244, 1253, 1247, - /* 270 */ 1287, 1276, 1293, 1270, 1228, 1294, 1278, 1304, 1320, 1324, - /* 280 */ 1337, 1339, 1279, 1281, 1306, 1307, 1318, 1321, 1325, 1332, - /* 290 */ 1357, + /* 0 */ -188, -327, -228, -168, -34, 100, 655, 747, 834, -94, + /* 10 */ 877, 905, 948, 1013, 1056, 1109, 1130, 1037, 1183, 1236, + /* 20 */ 1257, 1279, 1345, 1365, 1420, 1436, 1479, 1522, 1538, 1589, + /* 30 */ 1606, 1661, 1680, 1704, 1762, 1778, 1821, 1837, 1880, 1896, + /* 40 */ 1939, 1990, 2007, 2033, 2089, 2105, 2159, 2175, -36, 365, + /* 50 */ 441, -342, 80, 773, 913, 943, 593, 746, 989, 1098, + /* 60 */ -424, -328, -271, -412, -289, -208, -165, -330, -323, -352, + /* 70 */ -354, -41, -28, -309, -30, 211, 224, 434, 482, 617, + /* 80 */ 641, 675, 718, 161, 729, 750, -253, 790, 46, 793, + /* 90 */ 828, 420, 831, 863, 192, 879, 423, 346, 496, 774, + /* 100 */ -110, -301, -223, -223, -340, -209, -185, -29, 320, 344, + /* 110 */ 345, 370, 373, 394, 440, 450, 548, 626, 627, 645, + /* 120 */ 678, 679, 700, 721, 753, 174, -305, -227, 27, 433, + /* 130 */ 51, -305, 48, 259, 347, 12, 220, 382, 57, 425, + /* 140 */ 443, 108, 486, 485, 308, 607, 169, 643, 711, 732, + /* 150 */ 438, 326, 350, 409, 484, 501, 730, 735, 73, 417, + /* 160 */ 451, 474, 674, 676, 812, 727, 816, 816, 833, 818, + /* 170 */ 881, 854, 872, 826, 826, 810, 826, 838, 836, 816, + /* 180 */ 876, 898, 914, 924, 950, 951, 957, 1001, 1002, 961, + /* 190 */ 962, 967, 1004, 1024, 1033, 1038, 1051, 1052, 985, 1041, + /* 200 */ 1012, 1053, 1057, 1016, 1059, 1065, 1061, 1064, 1066, 1071, + /* 210 */ 1070, 1077, 1086, 1096, 1068, 1073, 1074, 1080, 1081, 1090, + /* 220 */ 1091, 1092, 1095, 1097, 1110, 1111, 1099, 1083, 1094, 1075, + /* 230 */ 1078, 1133, 1084, 1106, 1142, 1148, 1103, 1104, 1115, 1050, + /* 240 */ 1116, 1119, 1055, 1118, 1124, 1135, 816, 1062, 1082, 1085, + /* 250 */ 1087, 1102, 1112, 1129, 1089, 1100, 1113, 826, 1166, 1144, + /* 260 */ 1215, 1217, 1216, 1167, 1186, 1187, 1188, 1190, 1191, 1176, + /* 270 */ 1194, 1185, 1229, 1219, 1230, 1204, 1152, 1233, 1206, 1234, + /* 280 */ 1245, 1239, 1255, 1263, 1207, 1202, 1213, 1214, 1249, 1251, + /* 290 */ 1252, 1268, 1285, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 10 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 20 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 30 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 40 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 50 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 60 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1849, 1592, 1592, - /* 70 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 80 */ 1592, 1670, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 90 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1668, 1842, - /* 100 */ 2039, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 110 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 120 */ 1592, 1592, 1592, 1592, 2051, 1592, 1592, 1670, 1592, 2051, - /* 130 */ 2051, 2051, 1668, 2011, 2011, 1592, 1592, 1592, 1592, 1779, - /* 140 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1779, 1592, 1592, - /* 150 */ 1592, 1592, 1592, 1592, 1592, 1592, 1886, 1592, 1592, 2076, - /* 160 */ 2129, 1592, 1592, 2079, 1592, 1592, 1592, 1854, 1592, 1732, - /* 170 */ 2066, 2043, 2057, 2113, 2044, 2041, 2060, 1592, 2070, 1592, - /* 180 */ 1879, 1847, 1592, 1847, 1844, 1592, 1592, 1847, 1844, 1844, - /* 190 */ 1723, 1592, 1592, 1592, 1592, 1592, 1592, 1670, 1592, 1670, - /* 200 */ 1592, 1592, 1670, 1592, 1670, 1670, 1670, 1592, 1670, 1649, - /* 210 */ 1649, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 220 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1899, 1592, 1668, - /* 230 */ 1888, 1592, 1668, 1592, 1592, 1592, 1592, 2086, 2084, 1592, - /* 240 */ 2086, 2084, 1592, 1592, 1592, 2098, 2094, 2086, 2102, 2100, - /* 250 */ 2072, 2070, 2132, 2119, 2115, 2057, 1592, 1592, 1592, 1592, - /* 260 */ 1668, 2084, 1592, 1592, 1592, 1592, 1592, 2084, 1592, 1592, - /* 270 */ 1668, 1592, 1668, 1592, 1592, 1748, 1592, 1592, 1592, 1668, - /* 280 */ 1624, 1592, 1881, 1892, 1864, 1864, 1782, 1782, 1782, 1671, - /* 290 */ 1597, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 300 */ 1592, 1592, 1592, 2097, 2096, 1967, 1592, 2015, 2014, 2013, - /* 310 */ 2004, 1966, 1744, 1592, 1965, 1964, 1592, 1592, 1592, 1592, - /* 320 */ 1592, 1860, 1859, 1958, 1592, 1592, 1959, 1957, 1956, 1592, - /* 330 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 340 */ 1592, 1592, 1592, 1592, 1592, 1592, 2116, 2120, 1592, 1592, - /* 350 */ 1592, 1592, 1592, 1592, 2040, 1592, 1592, 1592, 1592, 1592, - /* 360 */ 1941, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 370 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 380 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 390 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 400 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 410 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 420 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 430 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 440 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 450 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1629, - /* 460 */ 1946, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 470 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 480 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 490 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 500 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1710, 1709, - /* 510 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 520 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 530 */ 1592, 1592, 1949, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 540 */ 1592, 1592, 1592, 1592, 1592, 1592, 2112, 2073, 1592, 1592, - /* 550 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 560 */ 1592, 1941, 1592, 2095, 1592, 1592, 2110, 1592, 2114, 1592, - /* 570 */ 1592, 1592, 1592, 1592, 1592, 1592, 2050, 2046, 1592, 1592, - /* 580 */ 2042, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 590 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1940, 1592, 2001, - /* 600 */ 1592, 1592, 1592, 2035, 1592, 1592, 1986, 1592, 1592, 1592, - /* 610 */ 1592, 1592, 1592, 1592, 1592, 1592, 1949, 1592, 1952, 1592, - /* 620 */ 1592, 1592, 1592, 1592, 1776, 1592, 1592, 1592, 1592, 1592, - /* 630 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1761, 1759, 1758, - /* 640 */ 1757, 1592, 1754, 1592, 1789, 1592, 1592, 1592, 1785, 1784, - /* 650 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 660 */ 1592, 1592, 1592, 1592, 1592, 1690, 1592, 1592, 1592, 1592, - /* 670 */ 1592, 1592, 1592, 1592, 1592, 1681, 1592, 1680, 1592, 1592, - /* 680 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 690 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 700 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, + /* 0 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 10 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 20 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 30 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 40 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 50 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 60 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1857, + /* 70 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 80 */ 1600, 1600, 1600, 1678, 1600, 1600, 1600, 1600, 1600, 1600, + /* 90 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 100 */ 1676, 1850, 2047, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 110 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 120 */ 1600, 1600, 1600, 1600, 1600, 1600, 2059, 1600, 1600, 1678, + /* 130 */ 1600, 2059, 2059, 2059, 1676, 2019, 2019, 1600, 1600, 1600, + /* 140 */ 1600, 1787, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1787, + /* 150 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1894, 1600, + /* 160 */ 1600, 2084, 2138, 1600, 1600, 2087, 1600, 1600, 1600, 1862, + /* 170 */ 1600, 1740, 2074, 2051, 2065, 2122, 2052, 2049, 2068, 1600, + /* 180 */ 2078, 1600, 1887, 1855, 1600, 1855, 1852, 1600, 1600, 1855, + /* 190 */ 1852, 1852, 1731, 1600, 1600, 1600, 1600, 1600, 1600, 1678, + /* 200 */ 1600, 1678, 1600, 1600, 1678, 1600, 1678, 1678, 1678, 1600, + /* 210 */ 1678, 1657, 1657, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 220 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1907, + /* 230 */ 1600, 1676, 1896, 1600, 1676, 1600, 1600, 1600, 1600, 2095, + /* 240 */ 2093, 1600, 2095, 2093, 1600, 1600, 1600, 2107, 2103, 2095, + /* 250 */ 2111, 2109, 2080, 2078, 2141, 2128, 2124, 2065, 1600, 1600, + /* 260 */ 1600, 1600, 1676, 2093, 1600, 1600, 1600, 1600, 1600, 2093, + /* 270 */ 1600, 1600, 1676, 1600, 1676, 1600, 1600, 1756, 1600, 1600, + /* 280 */ 1600, 1676, 1632, 1600, 1889, 1900, 1872, 1872, 1790, 1790, + /* 290 */ 1790, 1679, 1605, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 300 */ 1600, 1600, 1600, 1600, 1600, 2106, 2105, 1975, 1600, 2023, + /* 310 */ 2022, 2021, 2012, 1974, 1752, 1600, 1973, 1972, 1600, 1600, + /* 320 */ 1600, 1600, 1600, 1868, 1867, 1966, 1600, 1600, 1967, 1965, + /* 330 */ 1964, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 340 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 2125, 2129, + /* 350 */ 1600, 1600, 1600, 1600, 1600, 1600, 2048, 1600, 1600, 1600, + /* 360 */ 1600, 1600, 1949, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 370 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 380 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 390 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 400 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 410 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 420 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 430 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 440 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 450 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 460 */ 1600, 1637, 1954, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 470 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 480 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 490 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 500 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 510 */ 1718, 1717, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 520 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 530 */ 1600, 1600, 1600, 1600, 1957, 1600, 1600, 1600, 1600, 1600, + /* 540 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 2121, 2081, + /* 550 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 560 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1949, 1600, 2104, + /* 570 */ 1600, 1600, 2119, 1600, 2123, 1600, 1600, 1600, 1600, 1600, + /* 580 */ 1600, 1600, 2058, 2054, 1600, 1600, 2050, 1600, 1600, 1600, + /* 590 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 600 */ 1600, 1600, 1600, 1948, 1600, 2009, 1600, 1600, 1600, 2043, + /* 610 */ 1600, 1600, 1994, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 620 */ 1600, 1600, 1957, 1600, 1960, 1600, 1600, 1600, 1600, 1600, + /* 630 */ 1784, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 640 */ 1600, 1600, 1600, 1769, 1767, 1766, 1765, 1600, 1762, 1600, + /* 650 */ 1797, 1600, 1600, 1600, 1793, 1792, 1600, 1600, 1600, 1600, + /* 660 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 670 */ 1600, 1698, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 680 */ 1600, 1689, 1600, 1688, 1600, 1600, 1600, 1600, 1600, 1600, + /* 690 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 700 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 710 */ 1600, 1600, 1600, 1600, 1600, 1600, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1151,7 +1171,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* COUNT => nothing */ 0, /* LAST_ROW => nothing */ 0, /* CASE => nothing */ - 269, /* END => ABORT */ + 271, /* END => ABORT */ 0, /* WHEN => nothing */ 0, /* THEN => nothing */ 0, /* ELSE => nothing */ @@ -1175,6 +1195,8 @@ static const YYCODETYPE yyFallback[] = { 0, /* BY => nothing */ 0, /* SESSION => nothing */ 0, /* STATE_WINDOW => nothing */ + 0, /* EVENT_WINDOW => nothing */ + 0, /* START => nothing */ 0, /* SLIDING => nothing */ 0, /* FILL => nothing */ 0, /* VALUE => nothing */ @@ -1193,58 +1215,58 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 269, /* AFTER => ABORT */ - 269, /* ATTACH => ABORT */ - 269, /* BEFORE => ABORT */ - 269, /* BEGIN => ABORT */ - 269, /* BITAND => ABORT */ - 269, /* BITNOT => ABORT */ - 269, /* BITOR => ABORT */ - 269, /* BLOCKS => ABORT */ - 269, /* CHANGE => ABORT */ - 269, /* COMMA => ABORT */ - 269, /* COMPACT => ABORT */ - 269, /* CONCAT => ABORT */ - 269, /* CONFLICT => ABORT */ - 269, /* COPY => ABORT */ - 269, /* DEFERRED => ABORT */ - 269, /* DELIMITERS => ABORT */ - 269, /* DETACH => ABORT */ - 269, /* DIVIDE => ABORT */ - 269, /* DOT => ABORT */ - 269, /* EACH => ABORT */ - 269, /* FAIL => ABORT */ - 269, /* FILE => ABORT */ - 269, /* FOR => ABORT */ - 269, /* GLOB => ABORT */ - 269, /* ID => ABORT */ - 269, /* IMMEDIATE => ABORT */ - 269, /* IMPORT => ABORT */ - 269, /* INITIALLY => ABORT */ - 269, /* INSTEAD => ABORT */ - 269, /* ISNULL => ABORT */ - 269, /* KEY => ABORT */ - 269, /* MODULES => ABORT */ - 269, /* NK_BITNOT => ABORT */ - 269, /* NK_SEMI => ABORT */ - 269, /* NOTNULL => ABORT */ - 269, /* OF => ABORT */ - 269, /* PLUS => ABORT */ - 269, /* PRIVILEGE => ABORT */ - 269, /* RAISE => ABORT */ - 269, /* REPLACE => ABORT */ - 269, /* RESTRICT => ABORT */ - 269, /* ROW => ABORT */ - 269, /* SEMI => ABORT */ - 269, /* STAR => ABORT */ - 269, /* STATEMENT => ABORT */ - 269, /* STRING => ABORT */ - 269, /* TIMES => ABORT */ - 269, /* UPDATE => ABORT */ - 269, /* VALUES => ABORT */ - 269, /* VARIABLE => ABORT */ - 269, /* VIEW => ABORT */ - 269, /* WAL => ABORT */ + 271, /* AFTER => ABORT */ + 271, /* ATTACH => ABORT */ + 271, /* BEFORE => ABORT */ + 271, /* BEGIN => ABORT */ + 271, /* BITAND => ABORT */ + 271, /* BITNOT => ABORT */ + 271, /* BITOR => ABORT */ + 271, /* BLOCKS => ABORT */ + 271, /* CHANGE => ABORT */ + 271, /* COMMA => ABORT */ + 271, /* COMPACT => ABORT */ + 271, /* CONCAT => ABORT */ + 271, /* CONFLICT => ABORT */ + 271, /* COPY => ABORT */ + 271, /* DEFERRED => ABORT */ + 271, /* DELIMITERS => ABORT */ + 271, /* DETACH => ABORT */ + 271, /* DIVIDE => ABORT */ + 271, /* DOT => ABORT */ + 271, /* EACH => ABORT */ + 271, /* FAIL => ABORT */ + 271, /* FILE => ABORT */ + 271, /* FOR => ABORT */ + 271, /* GLOB => ABORT */ + 271, /* ID => ABORT */ + 271, /* IMMEDIATE => ABORT */ + 271, /* IMPORT => ABORT */ + 271, /* INITIALLY => ABORT */ + 271, /* INSTEAD => ABORT */ + 271, /* ISNULL => ABORT */ + 271, /* KEY => ABORT */ + 271, /* MODULES => ABORT */ + 271, /* NK_BITNOT => ABORT */ + 271, /* NK_SEMI => ABORT */ + 271, /* NOTNULL => ABORT */ + 271, /* OF => ABORT */ + 271, /* PLUS => ABORT */ + 271, /* PRIVILEGE => ABORT */ + 271, /* RAISE => ABORT */ + 271, /* REPLACE => ABORT */ + 271, /* RESTRICT => ABORT */ + 271, /* ROW => ABORT */ + 271, /* SEMI => ABORT */ + 271, /* STAR => ABORT */ + 271, /* STATEMENT => ABORT */ + 271, /* STRING => ABORT */ + 271, /* TIMES => ABORT */ + 271, /* UPDATE => ABORT */ + 271, /* VALUES => ABORT */ + 271, /* VARIABLE => ABORT */ + 271, /* VIEW => ABORT */ + 271, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1584,211 +1606,213 @@ static const char *const yyTokenName[] = { /* 249 */ "BY", /* 250 */ "SESSION", /* 251 */ "STATE_WINDOW", - /* 252 */ "SLIDING", - /* 253 */ "FILL", - /* 254 */ "VALUE", - /* 255 */ "NONE", - /* 256 */ "PREV", - /* 257 */ "LINEAR", - /* 258 */ "NEXT", - /* 259 */ "HAVING", - /* 260 */ "RANGE", - /* 261 */ "EVERY", - /* 262 */ "ORDER", - /* 263 */ "SLIMIT", - /* 264 */ "SOFFSET", - /* 265 */ "LIMIT", - /* 266 */ "OFFSET", - /* 267 */ "ASC", - /* 268 */ "NULLS", - /* 269 */ "ABORT", - /* 270 */ "AFTER", - /* 271 */ "ATTACH", - /* 272 */ "BEFORE", - /* 273 */ "BEGIN", - /* 274 */ "BITAND", - /* 275 */ "BITNOT", - /* 276 */ "BITOR", - /* 277 */ "BLOCKS", - /* 278 */ "CHANGE", - /* 279 */ "COMMA", - /* 280 */ "COMPACT", - /* 281 */ "CONCAT", - /* 282 */ "CONFLICT", - /* 283 */ "COPY", - /* 284 */ "DEFERRED", - /* 285 */ "DELIMITERS", - /* 286 */ "DETACH", - /* 287 */ "DIVIDE", - /* 288 */ "DOT", - /* 289 */ "EACH", - /* 290 */ "FAIL", - /* 291 */ "FILE", - /* 292 */ "FOR", - /* 293 */ "GLOB", - /* 294 */ "ID", - /* 295 */ "IMMEDIATE", - /* 296 */ "IMPORT", - /* 297 */ "INITIALLY", - /* 298 */ "INSTEAD", - /* 299 */ "ISNULL", - /* 300 */ "KEY", - /* 301 */ "MODULES", - /* 302 */ "NK_BITNOT", - /* 303 */ "NK_SEMI", - /* 304 */ "NOTNULL", - /* 305 */ "OF", - /* 306 */ "PLUS", - /* 307 */ "PRIVILEGE", - /* 308 */ "RAISE", - /* 309 */ "REPLACE", - /* 310 */ "RESTRICT", - /* 311 */ "ROW", - /* 312 */ "SEMI", - /* 313 */ "STAR", - /* 314 */ "STATEMENT", - /* 315 */ "STRING", - /* 316 */ "TIMES", - /* 317 */ "UPDATE", - /* 318 */ "VALUES", - /* 319 */ "VARIABLE", - /* 320 */ "VIEW", - /* 321 */ "WAL", - /* 322 */ "cmd", - /* 323 */ "account_options", - /* 324 */ "alter_account_options", - /* 325 */ "literal", - /* 326 */ "alter_account_option", - /* 327 */ "user_name", - /* 328 */ "sysinfo_opt", - /* 329 */ "privileges", - /* 330 */ "priv_level", - /* 331 */ "priv_type_list", - /* 332 */ "priv_type", - /* 333 */ "db_name", - /* 334 */ "topic_name", - /* 335 */ "dnode_endpoint", - /* 336 */ "force_opt", - /* 337 */ "not_exists_opt", - /* 338 */ "db_options", - /* 339 */ "exists_opt", - /* 340 */ "alter_db_options", - /* 341 */ "speed_opt", - /* 342 */ "integer_list", - /* 343 */ "variable_list", - /* 344 */ "retention_list", - /* 345 */ "alter_db_option", - /* 346 */ "retention", - /* 347 */ "full_table_name", - /* 348 */ "column_def_list", - /* 349 */ "tags_def_opt", - /* 350 */ "table_options", - /* 351 */ "multi_create_clause", - /* 352 */ "tags_def", - /* 353 */ "multi_drop_clause", - /* 354 */ "alter_table_clause", - /* 355 */ "alter_table_options", - /* 356 */ "column_name", - /* 357 */ "type_name", - /* 358 */ "signed_literal", - /* 359 */ "create_subtable_clause", - /* 360 */ "specific_cols_opt", - /* 361 */ "expression_list", - /* 362 */ "drop_table_clause", - /* 363 */ "col_name_list", - /* 364 */ "table_name", - /* 365 */ "column_def", - /* 366 */ "duration_list", - /* 367 */ "rollup_func_list", - /* 368 */ "alter_table_option", - /* 369 */ "duration_literal", - /* 370 */ "rollup_func_name", - /* 371 */ "function_name", - /* 372 */ "col_name", - /* 373 */ "db_name_cond_opt", - /* 374 */ "like_pattern_opt", - /* 375 */ "table_name_cond", - /* 376 */ "from_db_opt", - /* 377 */ "tag_list_opt", - /* 378 */ "tag_item", - /* 379 */ "column_alias", - /* 380 */ "index_options", - /* 381 */ "func_list", - /* 382 */ "sliding_opt", - /* 383 */ "sma_stream_opt", - /* 384 */ "func", - /* 385 */ "query_or_subquery", - /* 386 */ "cgroup_name", - /* 387 */ "analyze_opt", - /* 388 */ "explain_options", - /* 389 */ "agg_func_opt", - /* 390 */ "bufsize_opt", - /* 391 */ "stream_name", - /* 392 */ "stream_options", - /* 393 */ "subtable_opt", - /* 394 */ "expression", - /* 395 */ "dnode_list", - /* 396 */ "where_clause_opt", - /* 397 */ "signed", - /* 398 */ "literal_func", - /* 399 */ "literal_list", - /* 400 */ "table_alias", - /* 401 */ "expr_or_subquery", - /* 402 */ "pseudo_column", - /* 403 */ "column_reference", - /* 404 */ "function_expression", - /* 405 */ "case_when_expression", - /* 406 */ "star_func", - /* 407 */ "star_func_para_list", - /* 408 */ "noarg_func", - /* 409 */ "other_para_list", - /* 410 */ "star_func_para", - /* 411 */ "when_then_list", - /* 412 */ "case_when_else_opt", - /* 413 */ "common_expression", - /* 414 */ "when_then_expr", - /* 415 */ "predicate", - /* 416 */ "compare_op", - /* 417 */ "in_op", - /* 418 */ "in_predicate_value", - /* 419 */ "boolean_value_expression", - /* 420 */ "boolean_primary", - /* 421 */ "from_clause_opt", - /* 422 */ "table_reference_list", - /* 423 */ "table_reference", - /* 424 */ "table_primary", - /* 425 */ "joined_table", - /* 426 */ "alias_opt", - /* 427 */ "subquery", - /* 428 */ "parenthesized_joined_table", - /* 429 */ "join_type", - /* 430 */ "search_condition", - /* 431 */ "query_specification", - /* 432 */ "set_quantifier_opt", - /* 433 */ "select_list", - /* 434 */ "partition_by_clause_opt", - /* 435 */ "range_opt", - /* 436 */ "every_opt", - /* 437 */ "fill_opt", - /* 438 */ "twindow_clause_opt", - /* 439 */ "group_by_clause_opt", - /* 440 */ "having_clause_opt", - /* 441 */ "select_item", - /* 442 */ "partition_list", - /* 443 */ "partition_item", - /* 444 */ "fill_mode", - /* 445 */ "group_by_list", - /* 446 */ "query_expression", - /* 447 */ "query_simple", - /* 448 */ "order_by_clause_opt", - /* 449 */ "slimit_clause_opt", - /* 450 */ "limit_clause_opt", - /* 451 */ "union_query_expression", - /* 452 */ "query_simple_or_subquery", - /* 453 */ "sort_specification_list", - /* 454 */ "sort_specification", - /* 455 */ "ordering_specification_opt", - /* 456 */ "null_ordering_opt", + /* 252 */ "EVENT_WINDOW", + /* 253 */ "START", + /* 254 */ "SLIDING", + /* 255 */ "FILL", + /* 256 */ "VALUE", + /* 257 */ "NONE", + /* 258 */ "PREV", + /* 259 */ "LINEAR", + /* 260 */ "NEXT", + /* 261 */ "HAVING", + /* 262 */ "RANGE", + /* 263 */ "EVERY", + /* 264 */ "ORDER", + /* 265 */ "SLIMIT", + /* 266 */ "SOFFSET", + /* 267 */ "LIMIT", + /* 268 */ "OFFSET", + /* 269 */ "ASC", + /* 270 */ "NULLS", + /* 271 */ "ABORT", + /* 272 */ "AFTER", + /* 273 */ "ATTACH", + /* 274 */ "BEFORE", + /* 275 */ "BEGIN", + /* 276 */ "BITAND", + /* 277 */ "BITNOT", + /* 278 */ "BITOR", + /* 279 */ "BLOCKS", + /* 280 */ "CHANGE", + /* 281 */ "COMMA", + /* 282 */ "COMPACT", + /* 283 */ "CONCAT", + /* 284 */ "CONFLICT", + /* 285 */ "COPY", + /* 286 */ "DEFERRED", + /* 287 */ "DELIMITERS", + /* 288 */ "DETACH", + /* 289 */ "DIVIDE", + /* 290 */ "DOT", + /* 291 */ "EACH", + /* 292 */ "FAIL", + /* 293 */ "FILE", + /* 294 */ "FOR", + /* 295 */ "GLOB", + /* 296 */ "ID", + /* 297 */ "IMMEDIATE", + /* 298 */ "IMPORT", + /* 299 */ "INITIALLY", + /* 300 */ "INSTEAD", + /* 301 */ "ISNULL", + /* 302 */ "KEY", + /* 303 */ "MODULES", + /* 304 */ "NK_BITNOT", + /* 305 */ "NK_SEMI", + /* 306 */ "NOTNULL", + /* 307 */ "OF", + /* 308 */ "PLUS", + /* 309 */ "PRIVILEGE", + /* 310 */ "RAISE", + /* 311 */ "REPLACE", + /* 312 */ "RESTRICT", + /* 313 */ "ROW", + /* 314 */ "SEMI", + /* 315 */ "STAR", + /* 316 */ "STATEMENT", + /* 317 */ "STRING", + /* 318 */ "TIMES", + /* 319 */ "UPDATE", + /* 320 */ "VALUES", + /* 321 */ "VARIABLE", + /* 322 */ "VIEW", + /* 323 */ "WAL", + /* 324 */ "cmd", + /* 325 */ "account_options", + /* 326 */ "alter_account_options", + /* 327 */ "literal", + /* 328 */ "alter_account_option", + /* 329 */ "user_name", + /* 330 */ "sysinfo_opt", + /* 331 */ "privileges", + /* 332 */ "priv_level", + /* 333 */ "priv_type_list", + /* 334 */ "priv_type", + /* 335 */ "db_name", + /* 336 */ "topic_name", + /* 337 */ "dnode_endpoint", + /* 338 */ "force_opt", + /* 339 */ "not_exists_opt", + /* 340 */ "db_options", + /* 341 */ "exists_opt", + /* 342 */ "alter_db_options", + /* 343 */ "speed_opt", + /* 344 */ "integer_list", + /* 345 */ "variable_list", + /* 346 */ "retention_list", + /* 347 */ "alter_db_option", + /* 348 */ "retention", + /* 349 */ "full_table_name", + /* 350 */ "column_def_list", + /* 351 */ "tags_def_opt", + /* 352 */ "table_options", + /* 353 */ "multi_create_clause", + /* 354 */ "tags_def", + /* 355 */ "multi_drop_clause", + /* 356 */ "alter_table_clause", + /* 357 */ "alter_table_options", + /* 358 */ "column_name", + /* 359 */ "type_name", + /* 360 */ "signed_literal", + /* 361 */ "create_subtable_clause", + /* 362 */ "specific_cols_opt", + /* 363 */ "expression_list", + /* 364 */ "drop_table_clause", + /* 365 */ "col_name_list", + /* 366 */ "table_name", + /* 367 */ "column_def", + /* 368 */ "duration_list", + /* 369 */ "rollup_func_list", + /* 370 */ "alter_table_option", + /* 371 */ "duration_literal", + /* 372 */ "rollup_func_name", + /* 373 */ "function_name", + /* 374 */ "col_name", + /* 375 */ "db_name_cond_opt", + /* 376 */ "like_pattern_opt", + /* 377 */ "table_name_cond", + /* 378 */ "from_db_opt", + /* 379 */ "tag_list_opt", + /* 380 */ "tag_item", + /* 381 */ "column_alias", + /* 382 */ "index_options", + /* 383 */ "func_list", + /* 384 */ "sliding_opt", + /* 385 */ "sma_stream_opt", + /* 386 */ "func", + /* 387 */ "query_or_subquery", + /* 388 */ "cgroup_name", + /* 389 */ "analyze_opt", + /* 390 */ "explain_options", + /* 391 */ "agg_func_opt", + /* 392 */ "bufsize_opt", + /* 393 */ "stream_name", + /* 394 */ "stream_options", + /* 395 */ "subtable_opt", + /* 396 */ "expression", + /* 397 */ "dnode_list", + /* 398 */ "where_clause_opt", + /* 399 */ "signed", + /* 400 */ "literal_func", + /* 401 */ "literal_list", + /* 402 */ "table_alias", + /* 403 */ "expr_or_subquery", + /* 404 */ "pseudo_column", + /* 405 */ "column_reference", + /* 406 */ "function_expression", + /* 407 */ "case_when_expression", + /* 408 */ "star_func", + /* 409 */ "star_func_para_list", + /* 410 */ "noarg_func", + /* 411 */ "other_para_list", + /* 412 */ "star_func_para", + /* 413 */ "when_then_list", + /* 414 */ "case_when_else_opt", + /* 415 */ "common_expression", + /* 416 */ "when_then_expr", + /* 417 */ "predicate", + /* 418 */ "compare_op", + /* 419 */ "in_op", + /* 420 */ "in_predicate_value", + /* 421 */ "boolean_value_expression", + /* 422 */ "boolean_primary", + /* 423 */ "from_clause_opt", + /* 424 */ "table_reference_list", + /* 425 */ "table_reference", + /* 426 */ "table_primary", + /* 427 */ "joined_table", + /* 428 */ "alias_opt", + /* 429 */ "subquery", + /* 430 */ "parenthesized_joined_table", + /* 431 */ "join_type", + /* 432 */ "search_condition", + /* 433 */ "query_specification", + /* 434 */ "set_quantifier_opt", + /* 435 */ "select_list", + /* 436 */ "partition_by_clause_opt", + /* 437 */ "range_opt", + /* 438 */ "every_opt", + /* 439 */ "fill_opt", + /* 440 */ "twindow_clause_opt", + /* 441 */ "group_by_clause_opt", + /* 442 */ "having_clause_opt", + /* 443 */ "select_item", + /* 444 */ "partition_list", + /* 445 */ "partition_item", + /* 446 */ "fill_mode", + /* 447 */ "group_by_list", + /* 448 */ "query_expression", + /* 449 */ "query_simple", + /* 450 */ "order_by_clause_opt", + /* 451 */ "slimit_clause_opt", + /* 452 */ "limit_clause_opt", + /* 453 */ "union_query_expression", + /* 454 */ "query_simple_or_subquery", + /* 455 */ "sort_specification_list", + /* 456 */ "sort_specification", + /* 457 */ "ordering_specification_opt", + /* 458 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2285,57 +2309,58 @@ static const char *const yyRuleName[] = { /* 486 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", /* 487 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", /* 488 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 489 */ "sliding_opt ::=", - /* 490 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 491 */ "fill_opt ::=", - /* 492 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 493 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 494 */ "fill_mode ::= NONE", - /* 495 */ "fill_mode ::= PREV", - /* 496 */ "fill_mode ::= NULL", - /* 497 */ "fill_mode ::= LINEAR", - /* 498 */ "fill_mode ::= NEXT", - /* 499 */ "group_by_clause_opt ::=", - /* 500 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 501 */ "group_by_list ::= expr_or_subquery", - /* 502 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 503 */ "having_clause_opt ::=", - /* 504 */ "having_clause_opt ::= HAVING search_condition", - /* 505 */ "range_opt ::=", - /* 506 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 507 */ "every_opt ::=", - /* 508 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 509 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 510 */ "query_simple ::= query_specification", - /* 511 */ "query_simple ::= union_query_expression", - /* 512 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 513 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 514 */ "query_simple_or_subquery ::= query_simple", - /* 515 */ "query_simple_or_subquery ::= subquery", - /* 516 */ "query_or_subquery ::= query_expression", - /* 517 */ "query_or_subquery ::= subquery", - /* 518 */ "order_by_clause_opt ::=", - /* 519 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 520 */ "slimit_clause_opt ::=", - /* 521 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 522 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 523 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 524 */ "limit_clause_opt ::=", - /* 525 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 526 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 527 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 528 */ "subquery ::= NK_LP query_expression NK_RP", - /* 529 */ "subquery ::= NK_LP subquery NK_RP", - /* 530 */ "search_condition ::= common_expression", - /* 531 */ "sort_specification_list ::= sort_specification", - /* 532 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 533 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 534 */ "ordering_specification_opt ::=", - /* 535 */ "ordering_specification_opt ::= ASC", - /* 536 */ "ordering_specification_opt ::= DESC", - /* 537 */ "null_ordering_opt ::=", - /* 538 */ "null_ordering_opt ::= NULLS FIRST", - /* 539 */ "null_ordering_opt ::= NULLS LAST", + /* 489 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 490 */ "sliding_opt ::=", + /* 491 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 492 */ "fill_opt ::=", + /* 493 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 494 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 495 */ "fill_mode ::= NONE", + /* 496 */ "fill_mode ::= PREV", + /* 497 */ "fill_mode ::= NULL", + /* 498 */ "fill_mode ::= LINEAR", + /* 499 */ "fill_mode ::= NEXT", + /* 500 */ "group_by_clause_opt ::=", + /* 501 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 502 */ "group_by_list ::= expr_or_subquery", + /* 503 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 504 */ "having_clause_opt ::=", + /* 505 */ "having_clause_opt ::= HAVING search_condition", + /* 506 */ "range_opt ::=", + /* 507 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 508 */ "every_opt ::=", + /* 509 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 510 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 511 */ "query_simple ::= query_specification", + /* 512 */ "query_simple ::= union_query_expression", + /* 513 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 514 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 515 */ "query_simple_or_subquery ::= query_simple", + /* 516 */ "query_simple_or_subquery ::= subquery", + /* 517 */ "query_or_subquery ::= query_expression", + /* 518 */ "query_or_subquery ::= subquery", + /* 519 */ "order_by_clause_opt ::=", + /* 520 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 521 */ "slimit_clause_opt ::=", + /* 522 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 523 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 524 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 525 */ "limit_clause_opt ::=", + /* 526 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 527 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 528 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 529 */ "subquery ::= NK_LP query_expression NK_RP", + /* 530 */ "subquery ::= NK_LP subquery NK_RP", + /* 531 */ "search_condition ::= common_expression", + /* 532 */ "sort_specification_list ::= sort_specification", + /* 533 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 534 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 535 */ "ordering_specification_opt ::=", + /* 536 */ "ordering_specification_opt ::= ASC", + /* 537 */ "ordering_specification_opt ::= DESC", + /* 538 */ "null_ordering_opt ::=", + /* 539 */ "null_ordering_opt ::= NULLS FIRST", + /* 540 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2462,193 +2487,193 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 322: /* cmd */ - case 325: /* literal */ - case 338: /* db_options */ - case 340: /* alter_db_options */ - case 346: /* retention */ - case 347: /* full_table_name */ - case 350: /* table_options */ - case 354: /* alter_table_clause */ - case 355: /* alter_table_options */ - case 358: /* signed_literal */ - case 359: /* create_subtable_clause */ - case 362: /* drop_table_clause */ - case 365: /* column_def */ - case 369: /* duration_literal */ - case 370: /* rollup_func_name */ - case 372: /* col_name */ - case 373: /* db_name_cond_opt */ - case 374: /* like_pattern_opt */ - case 375: /* table_name_cond */ - case 376: /* from_db_opt */ - case 378: /* tag_item */ - case 380: /* index_options */ - case 382: /* sliding_opt */ - case 383: /* sma_stream_opt */ - case 384: /* func */ - case 385: /* query_or_subquery */ - case 388: /* explain_options */ - case 392: /* stream_options */ - case 393: /* subtable_opt */ - case 394: /* expression */ - case 396: /* where_clause_opt */ - case 397: /* signed */ - case 398: /* literal_func */ - case 401: /* expr_or_subquery */ - case 402: /* pseudo_column */ - case 403: /* column_reference */ - case 404: /* function_expression */ - case 405: /* case_when_expression */ - case 410: /* star_func_para */ - case 412: /* case_when_else_opt */ - case 413: /* common_expression */ - case 414: /* when_then_expr */ - case 415: /* predicate */ - case 418: /* in_predicate_value */ - case 419: /* boolean_value_expression */ - case 420: /* boolean_primary */ - case 421: /* from_clause_opt */ - case 422: /* table_reference_list */ - case 423: /* table_reference */ - case 424: /* table_primary */ - case 425: /* joined_table */ - case 427: /* subquery */ - case 428: /* parenthesized_joined_table */ - case 430: /* search_condition */ - case 431: /* query_specification */ - case 435: /* range_opt */ - case 436: /* every_opt */ - case 437: /* fill_opt */ - case 438: /* twindow_clause_opt */ - case 440: /* having_clause_opt */ - case 441: /* select_item */ - case 443: /* partition_item */ - case 446: /* query_expression */ - case 447: /* query_simple */ - case 449: /* slimit_clause_opt */ - case 450: /* limit_clause_opt */ - case 451: /* union_query_expression */ - case 452: /* query_simple_or_subquery */ - case 454: /* sort_specification */ + case 324: /* cmd */ + case 327: /* literal */ + case 340: /* db_options */ + case 342: /* alter_db_options */ + case 348: /* retention */ + case 349: /* full_table_name */ + case 352: /* table_options */ + case 356: /* alter_table_clause */ + case 357: /* alter_table_options */ + case 360: /* signed_literal */ + case 361: /* create_subtable_clause */ + case 364: /* drop_table_clause */ + case 367: /* column_def */ + case 371: /* duration_literal */ + case 372: /* rollup_func_name */ + case 374: /* col_name */ + case 375: /* db_name_cond_opt */ + case 376: /* like_pattern_opt */ + case 377: /* table_name_cond */ + case 378: /* from_db_opt */ + case 380: /* tag_item */ + case 382: /* index_options */ + case 384: /* sliding_opt */ + case 385: /* sma_stream_opt */ + case 386: /* func */ + case 387: /* query_or_subquery */ + case 390: /* explain_options */ + case 394: /* stream_options */ + case 395: /* subtable_opt */ + case 396: /* expression */ + case 398: /* where_clause_opt */ + case 399: /* signed */ + case 400: /* literal_func */ + case 403: /* expr_or_subquery */ + case 404: /* pseudo_column */ + case 405: /* column_reference */ + case 406: /* function_expression */ + case 407: /* case_when_expression */ + case 412: /* star_func_para */ + case 414: /* case_when_else_opt */ + case 415: /* common_expression */ + case 416: /* when_then_expr */ + case 417: /* predicate */ + case 420: /* in_predicate_value */ + case 421: /* boolean_value_expression */ + case 422: /* boolean_primary */ + case 423: /* from_clause_opt */ + case 424: /* table_reference_list */ + case 425: /* table_reference */ + case 426: /* table_primary */ + case 427: /* joined_table */ + case 429: /* subquery */ + case 430: /* parenthesized_joined_table */ + case 432: /* search_condition */ + case 433: /* query_specification */ + case 437: /* range_opt */ + case 438: /* every_opt */ + case 439: /* fill_opt */ + case 440: /* twindow_clause_opt */ + case 442: /* having_clause_opt */ + case 443: /* select_item */ + case 445: /* partition_item */ + case 448: /* query_expression */ + case 449: /* query_simple */ + case 451: /* slimit_clause_opt */ + case 452: /* limit_clause_opt */ + case 453: /* union_query_expression */ + case 454: /* query_simple_or_subquery */ + case 456: /* sort_specification */ { - nodesDestroyNode((yypminor->yy148)); + nodesDestroyNode((yypminor->yy74)); } break; - case 323: /* account_options */ - case 324: /* alter_account_options */ - case 326: /* alter_account_option */ - case 341: /* speed_opt */ - case 390: /* bufsize_opt */ + case 325: /* account_options */ + case 326: /* alter_account_options */ + case 328: /* alter_account_option */ + case 343: /* speed_opt */ + case 392: /* bufsize_opt */ { } break; - case 327: /* user_name */ - case 330: /* priv_level */ - case 333: /* db_name */ - case 334: /* topic_name */ - case 335: /* dnode_endpoint */ - case 356: /* column_name */ - case 364: /* table_name */ - case 371: /* function_name */ - case 379: /* column_alias */ - case 386: /* cgroup_name */ - case 391: /* stream_name */ - case 400: /* table_alias */ - case 406: /* star_func */ - case 408: /* noarg_func */ - case 426: /* alias_opt */ + case 329: /* user_name */ + case 332: /* priv_level */ + case 335: /* db_name */ + case 336: /* topic_name */ + case 337: /* dnode_endpoint */ + case 358: /* column_name */ + case 366: /* table_name */ + case 373: /* function_name */ + case 381: /* column_alias */ + case 388: /* cgroup_name */ + case 393: /* stream_name */ + case 402: /* table_alias */ + case 408: /* star_func */ + case 410: /* noarg_func */ + case 428: /* alias_opt */ { } break; - case 328: /* sysinfo_opt */ + case 330: /* sysinfo_opt */ { } break; - case 329: /* privileges */ - case 331: /* priv_type_list */ - case 332: /* priv_type */ + case 331: /* privileges */ + case 333: /* priv_type_list */ + case 334: /* priv_type */ { } break; - case 336: /* force_opt */ - case 337: /* not_exists_opt */ - case 339: /* exists_opt */ - case 387: /* analyze_opt */ - case 389: /* agg_func_opt */ - case 432: /* set_quantifier_opt */ + case 338: /* force_opt */ + case 339: /* not_exists_opt */ + case 341: /* exists_opt */ + case 389: /* analyze_opt */ + case 391: /* agg_func_opt */ + case 434: /* set_quantifier_opt */ { } break; - case 342: /* integer_list */ - case 343: /* variable_list */ - case 344: /* retention_list */ - case 348: /* column_def_list */ - case 349: /* tags_def_opt */ - case 351: /* multi_create_clause */ - case 352: /* tags_def */ - case 353: /* multi_drop_clause */ - case 360: /* specific_cols_opt */ - case 361: /* expression_list */ - case 363: /* col_name_list */ - case 366: /* duration_list */ - case 367: /* rollup_func_list */ - case 377: /* tag_list_opt */ - case 381: /* func_list */ - case 395: /* dnode_list */ - case 399: /* literal_list */ - case 407: /* star_func_para_list */ - case 409: /* other_para_list */ - case 411: /* when_then_list */ - case 433: /* select_list */ - case 434: /* partition_by_clause_opt */ - case 439: /* group_by_clause_opt */ - case 442: /* partition_list */ - case 445: /* group_by_list */ - case 448: /* order_by_clause_opt */ - case 453: /* sort_specification_list */ + case 344: /* integer_list */ + case 345: /* variable_list */ + case 346: /* retention_list */ + case 350: /* column_def_list */ + case 351: /* tags_def_opt */ + case 353: /* multi_create_clause */ + case 354: /* tags_def */ + case 355: /* multi_drop_clause */ + case 362: /* specific_cols_opt */ + case 363: /* expression_list */ + case 365: /* col_name_list */ + case 368: /* duration_list */ + case 369: /* rollup_func_list */ + case 379: /* tag_list_opt */ + case 383: /* func_list */ + case 397: /* dnode_list */ + case 401: /* literal_list */ + case 409: /* star_func_para_list */ + case 411: /* other_para_list */ + case 413: /* when_then_list */ + case 435: /* select_list */ + case 436: /* partition_by_clause_opt */ + case 441: /* group_by_clause_opt */ + case 444: /* partition_list */ + case 447: /* group_by_list */ + case 450: /* order_by_clause_opt */ + case 455: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy404)); + nodesDestroyList((yypminor->yy874)); } break; - case 345: /* alter_db_option */ - case 368: /* alter_table_option */ + case 347: /* alter_db_option */ + case 370: /* alter_table_option */ { } break; - case 357: /* type_name */ + case 359: /* type_name */ { } break; - case 416: /* compare_op */ - case 417: /* in_op */ + case 418: /* compare_op */ + case 419: /* in_op */ { } break; - case 429: /* join_type */ + case 431: /* join_type */ { } break; - case 444: /* fill_mode */ + case 446: /* fill_mode */ { } break; - case 455: /* ordering_specification_opt */ + case 457: /* ordering_specification_opt */ { } break; - case 456: /* null_ordering_opt */ + case 458: /* null_ordering_opt */ { } @@ -2947,546 +2972,547 @@ 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[] = { - { 322, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 322, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 323, 0 }, /* (2) account_options ::= */ - { 323, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 323, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 323, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 323, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 323, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 323, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 323, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 323, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 323, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 324, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 324, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 326, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 326, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 326, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 326, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 326, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 326, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 326, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 326, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 326, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 326, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 322, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ - { 322, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 322, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - { 322, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - { 322, -3 }, /* (28) cmd ::= DROP USER user_name */ - { 328, 0 }, /* (29) sysinfo_opt ::= */ - { 328, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */ - { 322, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */ - { 322, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - { 329, -1 }, /* (33) privileges ::= ALL */ - { 329, -1 }, /* (34) privileges ::= priv_type_list */ - { 329, -1 }, /* (35) privileges ::= SUBSCRIBE */ - { 331, -1 }, /* (36) priv_type_list ::= priv_type */ - { 331, -3 }, /* (37) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - { 332, -1 }, /* (38) priv_type ::= READ */ - { 332, -1 }, /* (39) priv_type ::= WRITE */ - { 330, -3 }, /* (40) priv_level ::= NK_STAR NK_DOT NK_STAR */ - { 330, -3 }, /* (41) priv_level ::= db_name NK_DOT NK_STAR */ - { 330, -1 }, /* (42) priv_level ::= topic_name */ - { 322, -3 }, /* (43) cmd ::= CREATE DNODE dnode_endpoint */ - { 322, -5 }, /* (44) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - { 322, -4 }, /* (45) cmd ::= DROP DNODE NK_INTEGER force_opt */ - { 322, -4 }, /* (46) cmd ::= DROP DNODE dnode_endpoint force_opt */ - { 322, -4 }, /* (47) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 322, -5 }, /* (48) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 322, -4 }, /* (49) cmd ::= ALTER ALL DNODES NK_STRING */ - { 322, -5 }, /* (50) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 335, -1 }, /* (51) dnode_endpoint ::= NK_STRING */ - { 335, -1 }, /* (52) dnode_endpoint ::= NK_ID */ - { 335, -1 }, /* (53) dnode_endpoint ::= NK_IPTOKEN */ - { 336, 0 }, /* (54) force_opt ::= */ - { 336, -1 }, /* (55) force_opt ::= FORCE */ - { 322, -3 }, /* (56) cmd ::= ALTER LOCAL NK_STRING */ - { 322, -4 }, /* (57) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 322, -5 }, /* (58) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 322, -5 }, /* (59) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 322, -5 }, /* (60) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - { 322, -5 }, /* (61) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - { 322, -5 }, /* (62) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - { 322, -5 }, /* (63) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - { 322, -5 }, /* (64) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - { 322, -5 }, /* (65) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - { 322, -5 }, /* (66) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 322, -4 }, /* (67) cmd ::= DROP DATABASE exists_opt db_name */ - { 322, -2 }, /* (68) cmd ::= USE db_name */ - { 322, -4 }, /* (69) cmd ::= ALTER DATABASE db_name alter_db_options */ - { 322, -3 }, /* (70) cmd ::= FLUSH DATABASE db_name */ - { 322, -4 }, /* (71) cmd ::= TRIM DATABASE db_name speed_opt */ - { 337, -3 }, /* (72) not_exists_opt ::= IF NOT EXISTS */ - { 337, 0 }, /* (73) not_exists_opt ::= */ - { 339, -2 }, /* (74) exists_opt ::= IF EXISTS */ - { 339, 0 }, /* (75) exists_opt ::= */ - { 338, 0 }, /* (76) db_options ::= */ - { 338, -3 }, /* (77) db_options ::= db_options BUFFER NK_INTEGER */ - { 338, -3 }, /* (78) db_options ::= db_options CACHEMODEL NK_STRING */ - { 338, -3 }, /* (79) db_options ::= db_options CACHESIZE NK_INTEGER */ - { 338, -3 }, /* (80) db_options ::= db_options COMP NK_INTEGER */ - { 338, -3 }, /* (81) db_options ::= db_options DURATION NK_INTEGER */ - { 338, -3 }, /* (82) db_options ::= db_options DURATION NK_VARIABLE */ - { 338, -3 }, /* (83) db_options ::= db_options MAXROWS NK_INTEGER */ - { 338, -3 }, /* (84) db_options ::= db_options MINROWS NK_INTEGER */ - { 338, -3 }, /* (85) db_options ::= db_options KEEP integer_list */ - { 338, -3 }, /* (86) db_options ::= db_options KEEP variable_list */ - { 338, -3 }, /* (87) db_options ::= db_options PAGES NK_INTEGER */ - { 338, -3 }, /* (88) db_options ::= db_options PAGESIZE NK_INTEGER */ - { 338, -3 }, /* (89) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - { 338, -3 }, /* (90) db_options ::= db_options PRECISION NK_STRING */ - { 338, -3 }, /* (91) db_options ::= db_options REPLICA NK_INTEGER */ - { 338, -3 }, /* (92) db_options ::= db_options STRICT NK_STRING */ - { 338, -3 }, /* (93) db_options ::= db_options VGROUPS NK_INTEGER */ - { 338, -3 }, /* (94) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - { 338, -3 }, /* (95) db_options ::= db_options RETENTIONS retention_list */ - { 338, -3 }, /* (96) db_options ::= db_options SCHEMALESS NK_INTEGER */ - { 338, -3 }, /* (97) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - { 338, -3 }, /* (98) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - { 338, -3 }, /* (99) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - { 338, -4 }, /* (100) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - { 338, -3 }, /* (101) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - { 338, -4 }, /* (102) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - { 338, -3 }, /* (103) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - { 338, -3 }, /* (104) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - { 338, -3 }, /* (105) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - { 338, -3 }, /* (106) db_options ::= db_options TABLE_PREFIX NK_INTEGER */ - { 338, -3 }, /* (107) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ - { 340, -1 }, /* (108) alter_db_options ::= alter_db_option */ - { 340, -2 }, /* (109) alter_db_options ::= alter_db_options alter_db_option */ - { 345, -2 }, /* (110) alter_db_option ::= BUFFER NK_INTEGER */ - { 345, -2 }, /* (111) alter_db_option ::= CACHEMODEL NK_STRING */ - { 345, -2 }, /* (112) alter_db_option ::= CACHESIZE NK_INTEGER */ - { 345, -2 }, /* (113) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - { 345, -2 }, /* (114) alter_db_option ::= KEEP integer_list */ - { 345, -2 }, /* (115) alter_db_option ::= KEEP variable_list */ - { 345, -2 }, /* (116) alter_db_option ::= PAGES NK_INTEGER */ - { 345, -2 }, /* (117) alter_db_option ::= REPLICA NK_INTEGER */ - { 345, -2 }, /* (118) alter_db_option ::= STRICT NK_STRING */ - { 345, -2 }, /* (119) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - { 345, -2 }, /* (120) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - { 342, -1 }, /* (121) integer_list ::= NK_INTEGER */ - { 342, -3 }, /* (122) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 343, -1 }, /* (123) variable_list ::= NK_VARIABLE */ - { 343, -3 }, /* (124) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 344, -1 }, /* (125) retention_list ::= retention */ - { 344, -3 }, /* (126) retention_list ::= retention_list NK_COMMA retention */ - { 346, -3 }, /* (127) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 341, 0 }, /* (128) speed_opt ::= */ - { 341, -2 }, /* (129) speed_opt ::= MAX_SPEED NK_INTEGER */ - { 322, -9 }, /* (130) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 322, -3 }, /* (131) cmd ::= CREATE TABLE multi_create_clause */ - { 322, -9 }, /* (132) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 322, -3 }, /* (133) cmd ::= DROP TABLE multi_drop_clause */ - { 322, -4 }, /* (134) cmd ::= DROP STABLE exists_opt full_table_name */ - { 322, -3 }, /* (135) cmd ::= ALTER TABLE alter_table_clause */ - { 322, -3 }, /* (136) cmd ::= ALTER STABLE alter_table_clause */ - { 354, -2 }, /* (137) alter_table_clause ::= full_table_name alter_table_options */ - { 354, -5 }, /* (138) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 354, -4 }, /* (139) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 354, -5 }, /* (140) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 354, -5 }, /* (141) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 354, -5 }, /* (142) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 354, -4 }, /* (143) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 354, -5 }, /* (144) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 354, -5 }, /* (145) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 354, -6 }, /* (146) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 351, -1 }, /* (147) multi_create_clause ::= create_subtable_clause */ - { 351, -2 }, /* (148) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 359, -10 }, /* (149) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ - { 353, -1 }, /* (150) multi_drop_clause ::= drop_table_clause */ - { 353, -2 }, /* (151) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 362, -2 }, /* (152) drop_table_clause ::= exists_opt full_table_name */ - { 360, 0 }, /* (153) specific_cols_opt ::= */ - { 360, -3 }, /* (154) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - { 347, -1 }, /* (155) full_table_name ::= table_name */ - { 347, -3 }, /* (156) full_table_name ::= db_name NK_DOT table_name */ - { 348, -1 }, /* (157) column_def_list ::= column_def */ - { 348, -3 }, /* (158) column_def_list ::= column_def_list NK_COMMA column_def */ - { 365, -2 }, /* (159) column_def ::= column_name type_name */ - { 365, -4 }, /* (160) column_def ::= column_name type_name COMMENT NK_STRING */ - { 357, -1 }, /* (161) type_name ::= BOOL */ - { 357, -1 }, /* (162) type_name ::= TINYINT */ - { 357, -1 }, /* (163) type_name ::= SMALLINT */ - { 357, -1 }, /* (164) type_name ::= INT */ - { 357, -1 }, /* (165) type_name ::= INTEGER */ - { 357, -1 }, /* (166) type_name ::= BIGINT */ - { 357, -1 }, /* (167) type_name ::= FLOAT */ - { 357, -1 }, /* (168) type_name ::= DOUBLE */ - { 357, -4 }, /* (169) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 357, -1 }, /* (170) type_name ::= TIMESTAMP */ - { 357, -4 }, /* (171) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 357, -2 }, /* (172) type_name ::= TINYINT UNSIGNED */ - { 357, -2 }, /* (173) type_name ::= SMALLINT UNSIGNED */ - { 357, -2 }, /* (174) type_name ::= INT UNSIGNED */ - { 357, -2 }, /* (175) type_name ::= BIGINT UNSIGNED */ - { 357, -1 }, /* (176) type_name ::= JSON */ - { 357, -4 }, /* (177) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 357, -1 }, /* (178) type_name ::= MEDIUMBLOB */ - { 357, -1 }, /* (179) type_name ::= BLOB */ - { 357, -4 }, /* (180) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 357, -1 }, /* (181) type_name ::= DECIMAL */ - { 357, -4 }, /* (182) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 357, -6 }, /* (183) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 349, 0 }, /* (184) tags_def_opt ::= */ - { 349, -1 }, /* (185) tags_def_opt ::= tags_def */ - { 352, -4 }, /* (186) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 350, 0 }, /* (187) table_options ::= */ - { 350, -3 }, /* (188) table_options ::= table_options COMMENT NK_STRING */ - { 350, -3 }, /* (189) table_options ::= table_options MAX_DELAY duration_list */ - { 350, -3 }, /* (190) table_options ::= table_options WATERMARK duration_list */ - { 350, -5 }, /* (191) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - { 350, -3 }, /* (192) table_options ::= table_options TTL NK_INTEGER */ - { 350, -5 }, /* (193) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 350, -3 }, /* (194) table_options ::= table_options DELETE_MARK duration_list */ - { 355, -1 }, /* (195) alter_table_options ::= alter_table_option */ - { 355, -2 }, /* (196) alter_table_options ::= alter_table_options alter_table_option */ - { 368, -2 }, /* (197) alter_table_option ::= COMMENT NK_STRING */ - { 368, -2 }, /* (198) alter_table_option ::= TTL NK_INTEGER */ - { 366, -1 }, /* (199) duration_list ::= duration_literal */ - { 366, -3 }, /* (200) duration_list ::= duration_list NK_COMMA duration_literal */ - { 367, -1 }, /* (201) rollup_func_list ::= rollup_func_name */ - { 367, -3 }, /* (202) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - { 370, -1 }, /* (203) rollup_func_name ::= function_name */ - { 370, -1 }, /* (204) rollup_func_name ::= FIRST */ - { 370, -1 }, /* (205) rollup_func_name ::= LAST */ - { 363, -1 }, /* (206) col_name_list ::= col_name */ - { 363, -3 }, /* (207) col_name_list ::= col_name_list NK_COMMA col_name */ - { 372, -1 }, /* (208) col_name ::= column_name */ - { 322, -2 }, /* (209) cmd ::= SHOW DNODES */ - { 322, -2 }, /* (210) cmd ::= SHOW USERS */ - { 322, -3 }, /* (211) cmd ::= SHOW USER PRIVILEGES */ - { 322, -2 }, /* (212) cmd ::= SHOW DATABASES */ - { 322, -4 }, /* (213) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 322, -4 }, /* (214) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 322, -3 }, /* (215) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 322, -2 }, /* (216) cmd ::= SHOW MNODES */ - { 322, -2 }, /* (217) cmd ::= SHOW QNODES */ - { 322, -2 }, /* (218) cmd ::= SHOW FUNCTIONS */ - { 322, -5 }, /* (219) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 322, -2 }, /* (220) cmd ::= SHOW STREAMS */ - { 322, -2 }, /* (221) cmd ::= SHOW ACCOUNTS */ - { 322, -2 }, /* (222) cmd ::= SHOW APPS */ - { 322, -2 }, /* (223) cmd ::= SHOW CONNECTIONS */ - { 322, -2 }, /* (224) cmd ::= SHOW LICENCES */ - { 322, -2 }, /* (225) cmd ::= SHOW GRANTS */ - { 322, -4 }, /* (226) cmd ::= SHOW CREATE DATABASE db_name */ - { 322, -4 }, /* (227) cmd ::= SHOW CREATE TABLE full_table_name */ - { 322, -4 }, /* (228) cmd ::= SHOW CREATE STABLE full_table_name */ - { 322, -2 }, /* (229) cmd ::= SHOW QUERIES */ - { 322, -2 }, /* (230) cmd ::= SHOW SCORES */ - { 322, -2 }, /* (231) cmd ::= SHOW TOPICS */ - { 322, -2 }, /* (232) cmd ::= SHOW VARIABLES */ - { 322, -3 }, /* (233) cmd ::= SHOW CLUSTER VARIABLES */ - { 322, -3 }, /* (234) cmd ::= SHOW LOCAL VARIABLES */ - { 322, -5 }, /* (235) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - { 322, -2 }, /* (236) cmd ::= SHOW BNODES */ - { 322, -2 }, /* (237) cmd ::= SHOW SNODES */ - { 322, -2 }, /* (238) cmd ::= SHOW CLUSTER */ - { 322, -2 }, /* (239) cmd ::= SHOW TRANSACTIONS */ - { 322, -4 }, /* (240) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - { 322, -2 }, /* (241) cmd ::= SHOW CONSUMERS */ - { 322, -2 }, /* (242) cmd ::= SHOW SUBSCRIPTIONS */ - { 322, -5 }, /* (243) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - { 322, -7 }, /* (244) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - { 322, -3 }, /* (245) cmd ::= SHOW VNODES NK_INTEGER */ - { 322, -3 }, /* (246) cmd ::= SHOW VNODES NK_STRING */ - { 373, 0 }, /* (247) db_name_cond_opt ::= */ - { 373, -2 }, /* (248) db_name_cond_opt ::= db_name NK_DOT */ - { 374, 0 }, /* (249) like_pattern_opt ::= */ - { 374, -2 }, /* (250) like_pattern_opt ::= LIKE NK_STRING */ - { 375, -1 }, /* (251) table_name_cond ::= table_name */ - { 376, 0 }, /* (252) from_db_opt ::= */ - { 376, -2 }, /* (253) from_db_opt ::= FROM db_name */ - { 377, 0 }, /* (254) tag_list_opt ::= */ - { 377, -1 }, /* (255) tag_list_opt ::= tag_item */ - { 377, -3 }, /* (256) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - { 378, -1 }, /* (257) tag_item ::= TBNAME */ - { 378, -1 }, /* (258) tag_item ::= QTAGS */ - { 378, -1 }, /* (259) tag_item ::= column_name */ - { 378, -2 }, /* (260) tag_item ::= column_name column_alias */ - { 378, -3 }, /* (261) tag_item ::= column_name AS column_alias */ - { 322, -8 }, /* (262) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ - { 322, -4 }, /* (263) cmd ::= DROP INDEX exists_opt full_table_name */ - { 380, -10 }, /* (264) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - { 380, -12 }, /* (265) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ - { 381, -1 }, /* (266) func_list ::= func */ - { 381, -3 }, /* (267) func_list ::= func_list NK_COMMA func */ - { 384, -4 }, /* (268) func ::= function_name NK_LP expression_list NK_RP */ - { 383, 0 }, /* (269) sma_stream_opt ::= */ - { 383, -3 }, /* (270) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - { 383, -3 }, /* (271) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - { 383, -3 }, /* (272) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - { 322, -6 }, /* (273) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - { 322, -7 }, /* (274) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 322, -9 }, /* (275) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ - { 322, -7 }, /* (276) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 322, -9 }, /* (277) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ - { 322, -4 }, /* (278) cmd ::= DROP TOPIC exists_opt topic_name */ - { 322, -7 }, /* (279) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 322, -2 }, /* (280) cmd ::= DESC full_table_name */ - { 322, -2 }, /* (281) cmd ::= DESCRIBE full_table_name */ - { 322, -3 }, /* (282) cmd ::= RESET QUERY CACHE */ - { 322, -4 }, /* (283) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - { 387, 0 }, /* (284) analyze_opt ::= */ - { 387, -1 }, /* (285) analyze_opt ::= ANALYZE */ - { 388, 0 }, /* (286) explain_options ::= */ - { 388, -3 }, /* (287) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 388, -3 }, /* (288) explain_options ::= explain_options RATIO NK_FLOAT */ - { 322, -10 }, /* (289) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 322, -4 }, /* (290) cmd ::= DROP FUNCTION exists_opt function_name */ - { 389, 0 }, /* (291) agg_func_opt ::= */ - { 389, -1 }, /* (292) agg_func_opt ::= AGGREGATE */ - { 390, 0 }, /* (293) bufsize_opt ::= */ - { 390, -2 }, /* (294) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 322, -11 }, /* (295) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ - { 322, -4 }, /* (296) cmd ::= DROP STREAM exists_opt stream_name */ - { 392, 0 }, /* (297) stream_options ::= */ - { 392, -3 }, /* (298) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 392, -3 }, /* (299) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 392, -4 }, /* (300) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - { 392, -3 }, /* (301) stream_options ::= stream_options WATERMARK duration_literal */ - { 392, -4 }, /* (302) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - { 392, -3 }, /* (303) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - { 393, 0 }, /* (304) subtable_opt ::= */ - { 393, -4 }, /* (305) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - { 322, -3 }, /* (306) cmd ::= KILL CONNECTION NK_INTEGER */ - { 322, -3 }, /* (307) cmd ::= KILL QUERY NK_STRING */ - { 322, -3 }, /* (308) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 322, -2 }, /* (309) cmd ::= BALANCE VGROUP */ - { 322, -4 }, /* (310) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 322, -4 }, /* (311) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 322, -3 }, /* (312) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 395, -2 }, /* (313) dnode_list ::= DNODE NK_INTEGER */ - { 395, -3 }, /* (314) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 322, -4 }, /* (315) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 322, -1 }, /* (316) cmd ::= query_or_subquery */ - { 322, -7 }, /* (317) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - { 322, -4 }, /* (318) cmd ::= INSERT INTO full_table_name query_or_subquery */ - { 325, -1 }, /* (319) literal ::= NK_INTEGER */ - { 325, -1 }, /* (320) literal ::= NK_FLOAT */ - { 325, -1 }, /* (321) literal ::= NK_STRING */ - { 325, -1 }, /* (322) literal ::= NK_BOOL */ - { 325, -2 }, /* (323) literal ::= TIMESTAMP NK_STRING */ - { 325, -1 }, /* (324) literal ::= duration_literal */ - { 325, -1 }, /* (325) literal ::= NULL */ - { 325, -1 }, /* (326) literal ::= NK_QUESTION */ - { 369, -1 }, /* (327) duration_literal ::= NK_VARIABLE */ - { 397, -1 }, /* (328) signed ::= NK_INTEGER */ - { 397, -2 }, /* (329) signed ::= NK_PLUS NK_INTEGER */ - { 397, -2 }, /* (330) signed ::= NK_MINUS NK_INTEGER */ - { 397, -1 }, /* (331) signed ::= NK_FLOAT */ - { 397, -2 }, /* (332) signed ::= NK_PLUS NK_FLOAT */ - { 397, -2 }, /* (333) signed ::= NK_MINUS NK_FLOAT */ - { 358, -1 }, /* (334) signed_literal ::= signed */ - { 358, -1 }, /* (335) signed_literal ::= NK_STRING */ - { 358, -1 }, /* (336) signed_literal ::= NK_BOOL */ - { 358, -2 }, /* (337) signed_literal ::= TIMESTAMP NK_STRING */ - { 358, -1 }, /* (338) signed_literal ::= duration_literal */ - { 358, -1 }, /* (339) signed_literal ::= NULL */ - { 358, -1 }, /* (340) signed_literal ::= literal_func */ - { 358, -1 }, /* (341) signed_literal ::= NK_QUESTION */ - { 399, -1 }, /* (342) literal_list ::= signed_literal */ - { 399, -3 }, /* (343) literal_list ::= literal_list NK_COMMA signed_literal */ - { 333, -1 }, /* (344) db_name ::= NK_ID */ - { 364, -1 }, /* (345) table_name ::= NK_ID */ - { 356, -1 }, /* (346) column_name ::= NK_ID */ - { 371, -1 }, /* (347) function_name ::= NK_ID */ - { 400, -1 }, /* (348) table_alias ::= NK_ID */ - { 379, -1 }, /* (349) column_alias ::= NK_ID */ - { 327, -1 }, /* (350) user_name ::= NK_ID */ - { 334, -1 }, /* (351) topic_name ::= NK_ID */ - { 391, -1 }, /* (352) stream_name ::= NK_ID */ - { 386, -1 }, /* (353) cgroup_name ::= NK_ID */ - { 401, -1 }, /* (354) expr_or_subquery ::= expression */ - { 394, -1 }, /* (355) expression ::= literal */ - { 394, -1 }, /* (356) expression ::= pseudo_column */ - { 394, -1 }, /* (357) expression ::= column_reference */ - { 394, -1 }, /* (358) expression ::= function_expression */ - { 394, -1 }, /* (359) expression ::= case_when_expression */ - { 394, -3 }, /* (360) expression ::= NK_LP expression NK_RP */ - { 394, -2 }, /* (361) expression ::= NK_PLUS expr_or_subquery */ - { 394, -2 }, /* (362) expression ::= NK_MINUS expr_or_subquery */ - { 394, -3 }, /* (363) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - { 394, -3 }, /* (364) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - { 394, -3 }, /* (365) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - { 394, -3 }, /* (366) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - { 394, -3 }, /* (367) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - { 394, -3 }, /* (368) expression ::= column_reference NK_ARROW NK_STRING */ - { 394, -3 }, /* (369) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - { 394, -3 }, /* (370) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - { 361, -1 }, /* (371) expression_list ::= expr_or_subquery */ - { 361, -3 }, /* (372) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - { 403, -1 }, /* (373) column_reference ::= column_name */ - { 403, -3 }, /* (374) column_reference ::= table_name NK_DOT column_name */ - { 402, -1 }, /* (375) pseudo_column ::= ROWTS */ - { 402, -1 }, /* (376) pseudo_column ::= TBNAME */ - { 402, -3 }, /* (377) pseudo_column ::= table_name NK_DOT TBNAME */ - { 402, -1 }, /* (378) pseudo_column ::= QSTART */ - { 402, -1 }, /* (379) pseudo_column ::= QEND */ - { 402, -1 }, /* (380) pseudo_column ::= QDURATION */ - { 402, -1 }, /* (381) pseudo_column ::= WSTART */ - { 402, -1 }, /* (382) pseudo_column ::= WEND */ - { 402, -1 }, /* (383) pseudo_column ::= WDURATION */ - { 402, -1 }, /* (384) pseudo_column ::= IROWTS */ - { 402, -1 }, /* (385) pseudo_column ::= QTAGS */ - { 404, -4 }, /* (386) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 404, -4 }, /* (387) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 404, -6 }, /* (388) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - { 404, -1 }, /* (389) function_expression ::= literal_func */ - { 398, -3 }, /* (390) literal_func ::= noarg_func NK_LP NK_RP */ - { 398, -1 }, /* (391) literal_func ::= NOW */ - { 408, -1 }, /* (392) noarg_func ::= NOW */ - { 408, -1 }, /* (393) noarg_func ::= TODAY */ - { 408, -1 }, /* (394) noarg_func ::= TIMEZONE */ - { 408, -1 }, /* (395) noarg_func ::= DATABASE */ - { 408, -1 }, /* (396) noarg_func ::= CLIENT_VERSION */ - { 408, -1 }, /* (397) noarg_func ::= SERVER_VERSION */ - { 408, -1 }, /* (398) noarg_func ::= SERVER_STATUS */ - { 408, -1 }, /* (399) noarg_func ::= CURRENT_USER */ - { 408, -1 }, /* (400) noarg_func ::= USER */ - { 406, -1 }, /* (401) star_func ::= COUNT */ - { 406, -1 }, /* (402) star_func ::= FIRST */ - { 406, -1 }, /* (403) star_func ::= LAST */ - { 406, -1 }, /* (404) star_func ::= LAST_ROW */ - { 407, -1 }, /* (405) star_func_para_list ::= NK_STAR */ - { 407, -1 }, /* (406) star_func_para_list ::= other_para_list */ - { 409, -1 }, /* (407) other_para_list ::= star_func_para */ - { 409, -3 }, /* (408) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 410, -1 }, /* (409) star_func_para ::= expr_or_subquery */ - { 410, -3 }, /* (410) star_func_para ::= table_name NK_DOT NK_STAR */ - { 405, -4 }, /* (411) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - { 405, -5 }, /* (412) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - { 411, -1 }, /* (413) when_then_list ::= when_then_expr */ - { 411, -2 }, /* (414) when_then_list ::= when_then_list when_then_expr */ - { 414, -4 }, /* (415) when_then_expr ::= WHEN common_expression THEN common_expression */ - { 412, 0 }, /* (416) case_when_else_opt ::= */ - { 412, -2 }, /* (417) case_when_else_opt ::= ELSE common_expression */ - { 415, -3 }, /* (418) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - { 415, -5 }, /* (419) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - { 415, -6 }, /* (420) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - { 415, -3 }, /* (421) predicate ::= expr_or_subquery IS NULL */ - { 415, -4 }, /* (422) predicate ::= expr_or_subquery IS NOT NULL */ - { 415, -3 }, /* (423) predicate ::= expr_or_subquery in_op in_predicate_value */ - { 416, -1 }, /* (424) compare_op ::= NK_LT */ - { 416, -1 }, /* (425) compare_op ::= NK_GT */ - { 416, -1 }, /* (426) compare_op ::= NK_LE */ - { 416, -1 }, /* (427) compare_op ::= NK_GE */ - { 416, -1 }, /* (428) compare_op ::= NK_NE */ - { 416, -1 }, /* (429) compare_op ::= NK_EQ */ - { 416, -1 }, /* (430) compare_op ::= LIKE */ - { 416, -2 }, /* (431) compare_op ::= NOT LIKE */ - { 416, -1 }, /* (432) compare_op ::= MATCH */ - { 416, -1 }, /* (433) compare_op ::= NMATCH */ - { 416, -1 }, /* (434) compare_op ::= CONTAINS */ - { 417, -1 }, /* (435) in_op ::= IN */ - { 417, -2 }, /* (436) in_op ::= NOT IN */ - { 418, -3 }, /* (437) in_predicate_value ::= NK_LP literal_list NK_RP */ - { 419, -1 }, /* (438) boolean_value_expression ::= boolean_primary */ - { 419, -2 }, /* (439) boolean_value_expression ::= NOT boolean_primary */ - { 419, -3 }, /* (440) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 419, -3 }, /* (441) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 420, -1 }, /* (442) boolean_primary ::= predicate */ - { 420, -3 }, /* (443) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 413, -1 }, /* (444) common_expression ::= expr_or_subquery */ - { 413, -1 }, /* (445) common_expression ::= boolean_value_expression */ - { 421, 0 }, /* (446) from_clause_opt ::= */ - { 421, -2 }, /* (447) from_clause_opt ::= FROM table_reference_list */ - { 422, -1 }, /* (448) table_reference_list ::= table_reference */ - { 422, -3 }, /* (449) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 423, -1 }, /* (450) table_reference ::= table_primary */ - { 423, -1 }, /* (451) table_reference ::= joined_table */ - { 424, -2 }, /* (452) table_primary ::= table_name alias_opt */ - { 424, -4 }, /* (453) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 424, -2 }, /* (454) table_primary ::= subquery alias_opt */ - { 424, -1 }, /* (455) table_primary ::= parenthesized_joined_table */ - { 426, 0 }, /* (456) alias_opt ::= */ - { 426, -1 }, /* (457) alias_opt ::= table_alias */ - { 426, -2 }, /* (458) alias_opt ::= AS table_alias */ - { 428, -3 }, /* (459) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 428, -3 }, /* (460) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 425, -6 }, /* (461) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 429, 0 }, /* (462) join_type ::= */ - { 429, -1 }, /* (463) join_type ::= INNER */ - { 431, -12 }, /* (464) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - { 432, 0 }, /* (465) set_quantifier_opt ::= */ - { 432, -1 }, /* (466) set_quantifier_opt ::= DISTINCT */ - { 432, -1 }, /* (467) set_quantifier_opt ::= ALL */ - { 433, -1 }, /* (468) select_list ::= select_item */ - { 433, -3 }, /* (469) select_list ::= select_list NK_COMMA select_item */ - { 441, -1 }, /* (470) select_item ::= NK_STAR */ - { 441, -1 }, /* (471) select_item ::= common_expression */ - { 441, -2 }, /* (472) select_item ::= common_expression column_alias */ - { 441, -3 }, /* (473) select_item ::= common_expression AS column_alias */ - { 441, -3 }, /* (474) select_item ::= table_name NK_DOT NK_STAR */ - { 396, 0 }, /* (475) where_clause_opt ::= */ - { 396, -2 }, /* (476) where_clause_opt ::= WHERE search_condition */ - { 434, 0 }, /* (477) partition_by_clause_opt ::= */ - { 434, -3 }, /* (478) partition_by_clause_opt ::= PARTITION BY partition_list */ - { 442, -1 }, /* (479) partition_list ::= partition_item */ - { 442, -3 }, /* (480) partition_list ::= partition_list NK_COMMA partition_item */ - { 443, -1 }, /* (481) partition_item ::= expr_or_subquery */ - { 443, -2 }, /* (482) partition_item ::= expr_or_subquery column_alias */ - { 443, -3 }, /* (483) partition_item ::= expr_or_subquery AS column_alias */ - { 438, 0 }, /* (484) twindow_clause_opt ::= */ - { 438, -6 }, /* (485) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 438, -4 }, /* (486) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - { 438, -6 }, /* (487) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 438, -8 }, /* (488) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 382, 0 }, /* (489) sliding_opt ::= */ - { 382, -4 }, /* (490) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 437, 0 }, /* (491) fill_opt ::= */ - { 437, -4 }, /* (492) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 437, -6 }, /* (493) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 444, -1 }, /* (494) fill_mode ::= NONE */ - { 444, -1 }, /* (495) fill_mode ::= PREV */ - { 444, -1 }, /* (496) fill_mode ::= NULL */ - { 444, -1 }, /* (497) fill_mode ::= LINEAR */ - { 444, -1 }, /* (498) fill_mode ::= NEXT */ - { 439, 0 }, /* (499) group_by_clause_opt ::= */ - { 439, -3 }, /* (500) group_by_clause_opt ::= GROUP BY group_by_list */ - { 445, -1 }, /* (501) group_by_list ::= expr_or_subquery */ - { 445, -3 }, /* (502) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - { 440, 0 }, /* (503) having_clause_opt ::= */ - { 440, -2 }, /* (504) having_clause_opt ::= HAVING search_condition */ - { 435, 0 }, /* (505) range_opt ::= */ - { 435, -6 }, /* (506) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - { 436, 0 }, /* (507) every_opt ::= */ - { 436, -4 }, /* (508) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - { 446, -4 }, /* (509) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 447, -1 }, /* (510) query_simple ::= query_specification */ - { 447, -1 }, /* (511) query_simple ::= union_query_expression */ - { 451, -4 }, /* (512) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - { 451, -3 }, /* (513) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - { 452, -1 }, /* (514) query_simple_or_subquery ::= query_simple */ - { 452, -1 }, /* (515) query_simple_or_subquery ::= subquery */ - { 385, -1 }, /* (516) query_or_subquery ::= query_expression */ - { 385, -1 }, /* (517) query_or_subquery ::= subquery */ - { 448, 0 }, /* (518) order_by_clause_opt ::= */ - { 448, -3 }, /* (519) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 449, 0 }, /* (520) slimit_clause_opt ::= */ - { 449, -2 }, /* (521) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 449, -4 }, /* (522) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 449, -4 }, /* (523) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 450, 0 }, /* (524) limit_clause_opt ::= */ - { 450, -2 }, /* (525) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 450, -4 }, /* (526) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 450, -4 }, /* (527) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 427, -3 }, /* (528) subquery ::= NK_LP query_expression NK_RP */ - { 427, -3 }, /* (529) subquery ::= NK_LP subquery NK_RP */ - { 430, -1 }, /* (530) search_condition ::= common_expression */ - { 453, -1 }, /* (531) sort_specification_list ::= sort_specification */ - { 453, -3 }, /* (532) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 454, -3 }, /* (533) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - { 455, 0 }, /* (534) ordering_specification_opt ::= */ - { 455, -1 }, /* (535) ordering_specification_opt ::= ASC */ - { 455, -1 }, /* (536) ordering_specification_opt ::= DESC */ - { 456, 0 }, /* (537) null_ordering_opt ::= */ - { 456, -2 }, /* (538) null_ordering_opt ::= NULLS FIRST */ - { 456, -2 }, /* (539) null_ordering_opt ::= NULLS LAST */ + { 324, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + { 324, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + { 325, 0 }, /* (2) account_options ::= */ + { 325, -3 }, /* (3) account_options ::= account_options PPS literal */ + { 325, -3 }, /* (4) account_options ::= account_options TSERIES literal */ + { 325, -3 }, /* (5) account_options ::= account_options STORAGE literal */ + { 325, -3 }, /* (6) account_options ::= account_options STREAMS literal */ + { 325, -3 }, /* (7) account_options ::= account_options QTIME literal */ + { 325, -3 }, /* (8) account_options ::= account_options DBS literal */ + { 325, -3 }, /* (9) account_options ::= account_options USERS literal */ + { 325, -3 }, /* (10) account_options ::= account_options CONNS literal */ + { 325, -3 }, /* (11) account_options ::= account_options STATE literal */ + { 326, -1 }, /* (12) alter_account_options ::= alter_account_option */ + { 326, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + { 328, -2 }, /* (14) alter_account_option ::= PASS literal */ + { 328, -2 }, /* (15) alter_account_option ::= PPS literal */ + { 328, -2 }, /* (16) alter_account_option ::= TSERIES literal */ + { 328, -2 }, /* (17) alter_account_option ::= STORAGE literal */ + { 328, -2 }, /* (18) alter_account_option ::= STREAMS literal */ + { 328, -2 }, /* (19) alter_account_option ::= QTIME literal */ + { 328, -2 }, /* (20) alter_account_option ::= DBS literal */ + { 328, -2 }, /* (21) alter_account_option ::= USERS literal */ + { 328, -2 }, /* (22) alter_account_option ::= CONNS literal */ + { 328, -2 }, /* (23) alter_account_option ::= STATE literal */ + { 324, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ + { 324, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + { 324, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + { 324, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + { 324, -3 }, /* (28) cmd ::= DROP USER user_name */ + { 330, 0 }, /* (29) sysinfo_opt ::= */ + { 330, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */ + { 324, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */ + { 324, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */ + { 331, -1 }, /* (33) privileges ::= ALL */ + { 331, -1 }, /* (34) privileges ::= priv_type_list */ + { 331, -1 }, /* (35) privileges ::= SUBSCRIBE */ + { 333, -1 }, /* (36) priv_type_list ::= priv_type */ + { 333, -3 }, /* (37) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + { 334, -1 }, /* (38) priv_type ::= READ */ + { 334, -1 }, /* (39) priv_type ::= WRITE */ + { 332, -3 }, /* (40) priv_level ::= NK_STAR NK_DOT NK_STAR */ + { 332, -3 }, /* (41) priv_level ::= db_name NK_DOT NK_STAR */ + { 332, -1 }, /* (42) priv_level ::= topic_name */ + { 324, -3 }, /* (43) cmd ::= CREATE DNODE dnode_endpoint */ + { 324, -5 }, /* (44) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + { 324, -4 }, /* (45) cmd ::= DROP DNODE NK_INTEGER force_opt */ + { 324, -4 }, /* (46) cmd ::= DROP DNODE dnode_endpoint force_opt */ + { 324, -4 }, /* (47) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + { 324, -5 }, /* (48) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + { 324, -4 }, /* (49) cmd ::= ALTER ALL DNODES NK_STRING */ + { 324, -5 }, /* (50) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + { 337, -1 }, /* (51) dnode_endpoint ::= NK_STRING */ + { 337, -1 }, /* (52) dnode_endpoint ::= NK_ID */ + { 337, -1 }, /* (53) dnode_endpoint ::= NK_IPTOKEN */ + { 338, 0 }, /* (54) force_opt ::= */ + { 338, -1 }, /* (55) force_opt ::= FORCE */ + { 324, -3 }, /* (56) cmd ::= ALTER LOCAL NK_STRING */ + { 324, -4 }, /* (57) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + { 324, -5 }, /* (58) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + { 324, -5 }, /* (59) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + { 324, -5 }, /* (60) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + { 324, -5 }, /* (61) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + { 324, -5 }, /* (62) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + { 324, -5 }, /* (63) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + { 324, -5 }, /* (64) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + { 324, -5 }, /* (65) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + { 324, -5 }, /* (66) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + { 324, -4 }, /* (67) cmd ::= DROP DATABASE exists_opt db_name */ + { 324, -2 }, /* (68) cmd ::= USE db_name */ + { 324, -4 }, /* (69) cmd ::= ALTER DATABASE db_name alter_db_options */ + { 324, -3 }, /* (70) cmd ::= FLUSH DATABASE db_name */ + { 324, -4 }, /* (71) cmd ::= TRIM DATABASE db_name speed_opt */ + { 339, -3 }, /* (72) not_exists_opt ::= IF NOT EXISTS */ + { 339, 0 }, /* (73) not_exists_opt ::= */ + { 341, -2 }, /* (74) exists_opt ::= IF EXISTS */ + { 341, 0 }, /* (75) exists_opt ::= */ + { 340, 0 }, /* (76) db_options ::= */ + { 340, -3 }, /* (77) db_options ::= db_options BUFFER NK_INTEGER */ + { 340, -3 }, /* (78) db_options ::= db_options CACHEMODEL NK_STRING */ + { 340, -3 }, /* (79) db_options ::= db_options CACHESIZE NK_INTEGER */ + { 340, -3 }, /* (80) db_options ::= db_options COMP NK_INTEGER */ + { 340, -3 }, /* (81) db_options ::= db_options DURATION NK_INTEGER */ + { 340, -3 }, /* (82) db_options ::= db_options DURATION NK_VARIABLE */ + { 340, -3 }, /* (83) db_options ::= db_options MAXROWS NK_INTEGER */ + { 340, -3 }, /* (84) db_options ::= db_options MINROWS NK_INTEGER */ + { 340, -3 }, /* (85) db_options ::= db_options KEEP integer_list */ + { 340, -3 }, /* (86) db_options ::= db_options KEEP variable_list */ + { 340, -3 }, /* (87) db_options ::= db_options PAGES NK_INTEGER */ + { 340, -3 }, /* (88) db_options ::= db_options PAGESIZE NK_INTEGER */ + { 340, -3 }, /* (89) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + { 340, -3 }, /* (90) db_options ::= db_options PRECISION NK_STRING */ + { 340, -3 }, /* (91) db_options ::= db_options REPLICA NK_INTEGER */ + { 340, -3 }, /* (92) db_options ::= db_options STRICT NK_STRING */ + { 340, -3 }, /* (93) db_options ::= db_options VGROUPS NK_INTEGER */ + { 340, -3 }, /* (94) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 340, -3 }, /* (95) db_options ::= db_options RETENTIONS retention_list */ + { 340, -3 }, /* (96) db_options ::= db_options SCHEMALESS NK_INTEGER */ + { 340, -3 }, /* (97) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + { 340, -3 }, /* (98) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + { 340, -3 }, /* (99) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + { 340, -4 }, /* (100) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + { 340, -3 }, /* (101) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + { 340, -4 }, /* (102) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + { 340, -3 }, /* (103) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + { 340, -3 }, /* (104) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + { 340, -3 }, /* (105) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + { 340, -3 }, /* (106) db_options ::= db_options TABLE_PREFIX NK_INTEGER */ + { 340, -3 }, /* (107) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ + { 342, -1 }, /* (108) alter_db_options ::= alter_db_option */ + { 342, -2 }, /* (109) alter_db_options ::= alter_db_options alter_db_option */ + { 347, -2 }, /* (110) alter_db_option ::= BUFFER NK_INTEGER */ + { 347, -2 }, /* (111) alter_db_option ::= CACHEMODEL NK_STRING */ + { 347, -2 }, /* (112) alter_db_option ::= CACHESIZE NK_INTEGER */ + { 347, -2 }, /* (113) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + { 347, -2 }, /* (114) alter_db_option ::= KEEP integer_list */ + { 347, -2 }, /* (115) alter_db_option ::= KEEP variable_list */ + { 347, -2 }, /* (116) alter_db_option ::= PAGES NK_INTEGER */ + { 347, -2 }, /* (117) alter_db_option ::= REPLICA NK_INTEGER */ + { 347, -2 }, /* (118) alter_db_option ::= STRICT NK_STRING */ + { 347, -2 }, /* (119) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + { 347, -2 }, /* (120) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + { 344, -1 }, /* (121) integer_list ::= NK_INTEGER */ + { 344, -3 }, /* (122) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 345, -1 }, /* (123) variable_list ::= NK_VARIABLE */ + { 345, -3 }, /* (124) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 346, -1 }, /* (125) retention_list ::= retention */ + { 346, -3 }, /* (126) retention_list ::= retention_list NK_COMMA retention */ + { 348, -3 }, /* (127) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 343, 0 }, /* (128) speed_opt ::= */ + { 343, -2 }, /* (129) speed_opt ::= MAX_SPEED NK_INTEGER */ + { 324, -9 }, /* (130) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 324, -3 }, /* (131) cmd ::= CREATE TABLE multi_create_clause */ + { 324, -9 }, /* (132) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 324, -3 }, /* (133) cmd ::= DROP TABLE multi_drop_clause */ + { 324, -4 }, /* (134) cmd ::= DROP STABLE exists_opt full_table_name */ + { 324, -3 }, /* (135) cmd ::= ALTER TABLE alter_table_clause */ + { 324, -3 }, /* (136) cmd ::= ALTER STABLE alter_table_clause */ + { 356, -2 }, /* (137) alter_table_clause ::= full_table_name alter_table_options */ + { 356, -5 }, /* (138) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 356, -4 }, /* (139) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 356, -5 }, /* (140) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 356, -5 }, /* (141) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 356, -5 }, /* (142) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 356, -4 }, /* (143) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 356, -5 }, /* (144) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 356, -5 }, /* (145) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 356, -6 }, /* (146) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 353, -1 }, /* (147) multi_create_clause ::= create_subtable_clause */ + { 353, -2 }, /* (148) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 361, -10 }, /* (149) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ + { 355, -1 }, /* (150) multi_drop_clause ::= drop_table_clause */ + { 355, -2 }, /* (151) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 364, -2 }, /* (152) drop_table_clause ::= exists_opt full_table_name */ + { 362, 0 }, /* (153) specific_cols_opt ::= */ + { 362, -3 }, /* (154) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + { 349, -1 }, /* (155) full_table_name ::= table_name */ + { 349, -3 }, /* (156) full_table_name ::= db_name NK_DOT table_name */ + { 350, -1 }, /* (157) column_def_list ::= column_def */ + { 350, -3 }, /* (158) column_def_list ::= column_def_list NK_COMMA column_def */ + { 367, -2 }, /* (159) column_def ::= column_name type_name */ + { 367, -4 }, /* (160) column_def ::= column_name type_name COMMENT NK_STRING */ + { 359, -1 }, /* (161) type_name ::= BOOL */ + { 359, -1 }, /* (162) type_name ::= TINYINT */ + { 359, -1 }, /* (163) type_name ::= SMALLINT */ + { 359, -1 }, /* (164) type_name ::= INT */ + { 359, -1 }, /* (165) type_name ::= INTEGER */ + { 359, -1 }, /* (166) type_name ::= BIGINT */ + { 359, -1 }, /* (167) type_name ::= FLOAT */ + { 359, -1 }, /* (168) type_name ::= DOUBLE */ + { 359, -4 }, /* (169) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 359, -1 }, /* (170) type_name ::= TIMESTAMP */ + { 359, -4 }, /* (171) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 359, -2 }, /* (172) type_name ::= TINYINT UNSIGNED */ + { 359, -2 }, /* (173) type_name ::= SMALLINT UNSIGNED */ + { 359, -2 }, /* (174) type_name ::= INT UNSIGNED */ + { 359, -2 }, /* (175) type_name ::= BIGINT UNSIGNED */ + { 359, -1 }, /* (176) type_name ::= JSON */ + { 359, -4 }, /* (177) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 359, -1 }, /* (178) type_name ::= MEDIUMBLOB */ + { 359, -1 }, /* (179) type_name ::= BLOB */ + { 359, -4 }, /* (180) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 359, -1 }, /* (181) type_name ::= DECIMAL */ + { 359, -4 }, /* (182) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 359, -6 }, /* (183) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 351, 0 }, /* (184) tags_def_opt ::= */ + { 351, -1 }, /* (185) tags_def_opt ::= tags_def */ + { 354, -4 }, /* (186) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 352, 0 }, /* (187) table_options ::= */ + { 352, -3 }, /* (188) table_options ::= table_options COMMENT NK_STRING */ + { 352, -3 }, /* (189) table_options ::= table_options MAX_DELAY duration_list */ + { 352, -3 }, /* (190) table_options ::= table_options WATERMARK duration_list */ + { 352, -5 }, /* (191) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + { 352, -3 }, /* (192) table_options ::= table_options TTL NK_INTEGER */ + { 352, -5 }, /* (193) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 352, -3 }, /* (194) table_options ::= table_options DELETE_MARK duration_list */ + { 357, -1 }, /* (195) alter_table_options ::= alter_table_option */ + { 357, -2 }, /* (196) alter_table_options ::= alter_table_options alter_table_option */ + { 370, -2 }, /* (197) alter_table_option ::= COMMENT NK_STRING */ + { 370, -2 }, /* (198) alter_table_option ::= TTL NK_INTEGER */ + { 368, -1 }, /* (199) duration_list ::= duration_literal */ + { 368, -3 }, /* (200) duration_list ::= duration_list NK_COMMA duration_literal */ + { 369, -1 }, /* (201) rollup_func_list ::= rollup_func_name */ + { 369, -3 }, /* (202) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + { 372, -1 }, /* (203) rollup_func_name ::= function_name */ + { 372, -1 }, /* (204) rollup_func_name ::= FIRST */ + { 372, -1 }, /* (205) rollup_func_name ::= LAST */ + { 365, -1 }, /* (206) col_name_list ::= col_name */ + { 365, -3 }, /* (207) col_name_list ::= col_name_list NK_COMMA col_name */ + { 374, -1 }, /* (208) col_name ::= column_name */ + { 324, -2 }, /* (209) cmd ::= SHOW DNODES */ + { 324, -2 }, /* (210) cmd ::= SHOW USERS */ + { 324, -3 }, /* (211) cmd ::= SHOW USER PRIVILEGES */ + { 324, -2 }, /* (212) cmd ::= SHOW DATABASES */ + { 324, -4 }, /* (213) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 324, -4 }, /* (214) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 324, -3 }, /* (215) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 324, -2 }, /* (216) cmd ::= SHOW MNODES */ + { 324, -2 }, /* (217) cmd ::= SHOW QNODES */ + { 324, -2 }, /* (218) cmd ::= SHOW FUNCTIONS */ + { 324, -5 }, /* (219) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 324, -2 }, /* (220) cmd ::= SHOW STREAMS */ + { 324, -2 }, /* (221) cmd ::= SHOW ACCOUNTS */ + { 324, -2 }, /* (222) cmd ::= SHOW APPS */ + { 324, -2 }, /* (223) cmd ::= SHOW CONNECTIONS */ + { 324, -2 }, /* (224) cmd ::= SHOW LICENCES */ + { 324, -2 }, /* (225) cmd ::= SHOW GRANTS */ + { 324, -4 }, /* (226) cmd ::= SHOW CREATE DATABASE db_name */ + { 324, -4 }, /* (227) cmd ::= SHOW CREATE TABLE full_table_name */ + { 324, -4 }, /* (228) cmd ::= SHOW CREATE STABLE full_table_name */ + { 324, -2 }, /* (229) cmd ::= SHOW QUERIES */ + { 324, -2 }, /* (230) cmd ::= SHOW SCORES */ + { 324, -2 }, /* (231) cmd ::= SHOW TOPICS */ + { 324, -2 }, /* (232) cmd ::= SHOW VARIABLES */ + { 324, -3 }, /* (233) cmd ::= SHOW CLUSTER VARIABLES */ + { 324, -3 }, /* (234) cmd ::= SHOW LOCAL VARIABLES */ + { 324, -5 }, /* (235) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + { 324, -2 }, /* (236) cmd ::= SHOW BNODES */ + { 324, -2 }, /* (237) cmd ::= SHOW SNODES */ + { 324, -2 }, /* (238) cmd ::= SHOW CLUSTER */ + { 324, -2 }, /* (239) cmd ::= SHOW TRANSACTIONS */ + { 324, -4 }, /* (240) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + { 324, -2 }, /* (241) cmd ::= SHOW CONSUMERS */ + { 324, -2 }, /* (242) cmd ::= SHOW SUBSCRIPTIONS */ + { 324, -5 }, /* (243) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + { 324, -7 }, /* (244) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + { 324, -3 }, /* (245) cmd ::= SHOW VNODES NK_INTEGER */ + { 324, -3 }, /* (246) cmd ::= SHOW VNODES NK_STRING */ + { 375, 0 }, /* (247) db_name_cond_opt ::= */ + { 375, -2 }, /* (248) db_name_cond_opt ::= db_name NK_DOT */ + { 376, 0 }, /* (249) like_pattern_opt ::= */ + { 376, -2 }, /* (250) like_pattern_opt ::= LIKE NK_STRING */ + { 377, -1 }, /* (251) table_name_cond ::= table_name */ + { 378, 0 }, /* (252) from_db_opt ::= */ + { 378, -2 }, /* (253) from_db_opt ::= FROM db_name */ + { 379, 0 }, /* (254) tag_list_opt ::= */ + { 379, -1 }, /* (255) tag_list_opt ::= tag_item */ + { 379, -3 }, /* (256) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + { 380, -1 }, /* (257) tag_item ::= TBNAME */ + { 380, -1 }, /* (258) tag_item ::= QTAGS */ + { 380, -1 }, /* (259) tag_item ::= column_name */ + { 380, -2 }, /* (260) tag_item ::= column_name column_alias */ + { 380, -3 }, /* (261) tag_item ::= column_name AS column_alias */ + { 324, -8 }, /* (262) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ + { 324, -4 }, /* (263) cmd ::= DROP INDEX exists_opt full_table_name */ + { 382, -10 }, /* (264) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + { 382, -12 }, /* (265) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + { 383, -1 }, /* (266) func_list ::= func */ + { 383, -3 }, /* (267) func_list ::= func_list NK_COMMA func */ + { 386, -4 }, /* (268) func ::= function_name NK_LP expression_list NK_RP */ + { 385, 0 }, /* (269) sma_stream_opt ::= */ + { 385, -3 }, /* (270) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + { 385, -3 }, /* (271) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + { 385, -3 }, /* (272) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + { 324, -6 }, /* (273) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + { 324, -7 }, /* (274) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 324, -9 }, /* (275) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + { 324, -7 }, /* (276) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 324, -9 }, /* (277) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + { 324, -4 }, /* (278) cmd ::= DROP TOPIC exists_opt topic_name */ + { 324, -7 }, /* (279) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 324, -2 }, /* (280) cmd ::= DESC full_table_name */ + { 324, -2 }, /* (281) cmd ::= DESCRIBE full_table_name */ + { 324, -3 }, /* (282) cmd ::= RESET QUERY CACHE */ + { 324, -4 }, /* (283) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + { 389, 0 }, /* (284) analyze_opt ::= */ + { 389, -1 }, /* (285) analyze_opt ::= ANALYZE */ + { 390, 0 }, /* (286) explain_options ::= */ + { 390, -3 }, /* (287) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 390, -3 }, /* (288) explain_options ::= explain_options RATIO NK_FLOAT */ + { 324, -10 }, /* (289) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 324, -4 }, /* (290) cmd ::= DROP FUNCTION exists_opt function_name */ + { 391, 0 }, /* (291) agg_func_opt ::= */ + { 391, -1 }, /* (292) agg_func_opt ::= AGGREGATE */ + { 392, 0 }, /* (293) bufsize_opt ::= */ + { 392, -2 }, /* (294) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 324, -11 }, /* (295) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ + { 324, -4 }, /* (296) cmd ::= DROP STREAM exists_opt stream_name */ + { 394, 0 }, /* (297) stream_options ::= */ + { 394, -3 }, /* (298) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 394, -3 }, /* (299) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 394, -4 }, /* (300) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + { 394, -3 }, /* (301) stream_options ::= stream_options WATERMARK duration_literal */ + { 394, -4 }, /* (302) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + { 394, -3 }, /* (303) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + { 395, 0 }, /* (304) subtable_opt ::= */ + { 395, -4 }, /* (305) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + { 324, -3 }, /* (306) cmd ::= KILL CONNECTION NK_INTEGER */ + { 324, -3 }, /* (307) cmd ::= KILL QUERY NK_STRING */ + { 324, -3 }, /* (308) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 324, -2 }, /* (309) cmd ::= BALANCE VGROUP */ + { 324, -4 }, /* (310) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 324, -4 }, /* (311) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 324, -3 }, /* (312) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 397, -2 }, /* (313) dnode_list ::= DNODE NK_INTEGER */ + { 397, -3 }, /* (314) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 324, -4 }, /* (315) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 324, -1 }, /* (316) cmd ::= query_or_subquery */ + { 324, -7 }, /* (317) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + { 324, -4 }, /* (318) cmd ::= INSERT INTO full_table_name query_or_subquery */ + { 327, -1 }, /* (319) literal ::= NK_INTEGER */ + { 327, -1 }, /* (320) literal ::= NK_FLOAT */ + { 327, -1 }, /* (321) literal ::= NK_STRING */ + { 327, -1 }, /* (322) literal ::= NK_BOOL */ + { 327, -2 }, /* (323) literal ::= TIMESTAMP NK_STRING */ + { 327, -1 }, /* (324) literal ::= duration_literal */ + { 327, -1 }, /* (325) literal ::= NULL */ + { 327, -1 }, /* (326) literal ::= NK_QUESTION */ + { 371, -1 }, /* (327) duration_literal ::= NK_VARIABLE */ + { 399, -1 }, /* (328) signed ::= NK_INTEGER */ + { 399, -2 }, /* (329) signed ::= NK_PLUS NK_INTEGER */ + { 399, -2 }, /* (330) signed ::= NK_MINUS NK_INTEGER */ + { 399, -1 }, /* (331) signed ::= NK_FLOAT */ + { 399, -2 }, /* (332) signed ::= NK_PLUS NK_FLOAT */ + { 399, -2 }, /* (333) signed ::= NK_MINUS NK_FLOAT */ + { 360, -1 }, /* (334) signed_literal ::= signed */ + { 360, -1 }, /* (335) signed_literal ::= NK_STRING */ + { 360, -1 }, /* (336) signed_literal ::= NK_BOOL */ + { 360, -2 }, /* (337) signed_literal ::= TIMESTAMP NK_STRING */ + { 360, -1 }, /* (338) signed_literal ::= duration_literal */ + { 360, -1 }, /* (339) signed_literal ::= NULL */ + { 360, -1 }, /* (340) signed_literal ::= literal_func */ + { 360, -1 }, /* (341) signed_literal ::= NK_QUESTION */ + { 401, -1 }, /* (342) literal_list ::= signed_literal */ + { 401, -3 }, /* (343) literal_list ::= literal_list NK_COMMA signed_literal */ + { 335, -1 }, /* (344) db_name ::= NK_ID */ + { 366, -1 }, /* (345) table_name ::= NK_ID */ + { 358, -1 }, /* (346) column_name ::= NK_ID */ + { 373, -1 }, /* (347) function_name ::= NK_ID */ + { 402, -1 }, /* (348) table_alias ::= NK_ID */ + { 381, -1 }, /* (349) column_alias ::= NK_ID */ + { 329, -1 }, /* (350) user_name ::= NK_ID */ + { 336, -1 }, /* (351) topic_name ::= NK_ID */ + { 393, -1 }, /* (352) stream_name ::= NK_ID */ + { 388, -1 }, /* (353) cgroup_name ::= NK_ID */ + { 403, -1 }, /* (354) expr_or_subquery ::= expression */ + { 396, -1 }, /* (355) expression ::= literal */ + { 396, -1 }, /* (356) expression ::= pseudo_column */ + { 396, -1 }, /* (357) expression ::= column_reference */ + { 396, -1 }, /* (358) expression ::= function_expression */ + { 396, -1 }, /* (359) expression ::= case_when_expression */ + { 396, -3 }, /* (360) expression ::= NK_LP expression NK_RP */ + { 396, -2 }, /* (361) expression ::= NK_PLUS expr_or_subquery */ + { 396, -2 }, /* (362) expression ::= NK_MINUS expr_or_subquery */ + { 396, -3 }, /* (363) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + { 396, -3 }, /* (364) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + { 396, -3 }, /* (365) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + { 396, -3 }, /* (366) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + { 396, -3 }, /* (367) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + { 396, -3 }, /* (368) expression ::= column_reference NK_ARROW NK_STRING */ + { 396, -3 }, /* (369) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + { 396, -3 }, /* (370) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + { 363, -1 }, /* (371) expression_list ::= expr_or_subquery */ + { 363, -3 }, /* (372) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + { 405, -1 }, /* (373) column_reference ::= column_name */ + { 405, -3 }, /* (374) column_reference ::= table_name NK_DOT column_name */ + { 404, -1 }, /* (375) pseudo_column ::= ROWTS */ + { 404, -1 }, /* (376) pseudo_column ::= TBNAME */ + { 404, -3 }, /* (377) pseudo_column ::= table_name NK_DOT TBNAME */ + { 404, -1 }, /* (378) pseudo_column ::= QSTART */ + { 404, -1 }, /* (379) pseudo_column ::= QEND */ + { 404, -1 }, /* (380) pseudo_column ::= QDURATION */ + { 404, -1 }, /* (381) pseudo_column ::= WSTART */ + { 404, -1 }, /* (382) pseudo_column ::= WEND */ + { 404, -1 }, /* (383) pseudo_column ::= WDURATION */ + { 404, -1 }, /* (384) pseudo_column ::= IROWTS */ + { 404, -1 }, /* (385) pseudo_column ::= QTAGS */ + { 406, -4 }, /* (386) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 406, -4 }, /* (387) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 406, -6 }, /* (388) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + { 406, -1 }, /* (389) function_expression ::= literal_func */ + { 400, -3 }, /* (390) literal_func ::= noarg_func NK_LP NK_RP */ + { 400, -1 }, /* (391) literal_func ::= NOW */ + { 410, -1 }, /* (392) noarg_func ::= NOW */ + { 410, -1 }, /* (393) noarg_func ::= TODAY */ + { 410, -1 }, /* (394) noarg_func ::= TIMEZONE */ + { 410, -1 }, /* (395) noarg_func ::= DATABASE */ + { 410, -1 }, /* (396) noarg_func ::= CLIENT_VERSION */ + { 410, -1 }, /* (397) noarg_func ::= SERVER_VERSION */ + { 410, -1 }, /* (398) noarg_func ::= SERVER_STATUS */ + { 410, -1 }, /* (399) noarg_func ::= CURRENT_USER */ + { 410, -1 }, /* (400) noarg_func ::= USER */ + { 408, -1 }, /* (401) star_func ::= COUNT */ + { 408, -1 }, /* (402) star_func ::= FIRST */ + { 408, -1 }, /* (403) star_func ::= LAST */ + { 408, -1 }, /* (404) star_func ::= LAST_ROW */ + { 409, -1 }, /* (405) star_func_para_list ::= NK_STAR */ + { 409, -1 }, /* (406) star_func_para_list ::= other_para_list */ + { 411, -1 }, /* (407) other_para_list ::= star_func_para */ + { 411, -3 }, /* (408) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 412, -1 }, /* (409) star_func_para ::= expr_or_subquery */ + { 412, -3 }, /* (410) star_func_para ::= table_name NK_DOT NK_STAR */ + { 407, -4 }, /* (411) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + { 407, -5 }, /* (412) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + { 413, -1 }, /* (413) when_then_list ::= when_then_expr */ + { 413, -2 }, /* (414) when_then_list ::= when_then_list when_then_expr */ + { 416, -4 }, /* (415) when_then_expr ::= WHEN common_expression THEN common_expression */ + { 414, 0 }, /* (416) case_when_else_opt ::= */ + { 414, -2 }, /* (417) case_when_else_opt ::= ELSE common_expression */ + { 417, -3 }, /* (418) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + { 417, -5 }, /* (419) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + { 417, -6 }, /* (420) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + { 417, -3 }, /* (421) predicate ::= expr_or_subquery IS NULL */ + { 417, -4 }, /* (422) predicate ::= expr_or_subquery IS NOT NULL */ + { 417, -3 }, /* (423) predicate ::= expr_or_subquery in_op in_predicate_value */ + { 418, -1 }, /* (424) compare_op ::= NK_LT */ + { 418, -1 }, /* (425) compare_op ::= NK_GT */ + { 418, -1 }, /* (426) compare_op ::= NK_LE */ + { 418, -1 }, /* (427) compare_op ::= NK_GE */ + { 418, -1 }, /* (428) compare_op ::= NK_NE */ + { 418, -1 }, /* (429) compare_op ::= NK_EQ */ + { 418, -1 }, /* (430) compare_op ::= LIKE */ + { 418, -2 }, /* (431) compare_op ::= NOT LIKE */ + { 418, -1 }, /* (432) compare_op ::= MATCH */ + { 418, -1 }, /* (433) compare_op ::= NMATCH */ + { 418, -1 }, /* (434) compare_op ::= CONTAINS */ + { 419, -1 }, /* (435) in_op ::= IN */ + { 419, -2 }, /* (436) in_op ::= NOT IN */ + { 420, -3 }, /* (437) in_predicate_value ::= NK_LP literal_list NK_RP */ + { 421, -1 }, /* (438) boolean_value_expression ::= boolean_primary */ + { 421, -2 }, /* (439) boolean_value_expression ::= NOT boolean_primary */ + { 421, -3 }, /* (440) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 421, -3 }, /* (441) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 422, -1 }, /* (442) boolean_primary ::= predicate */ + { 422, -3 }, /* (443) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 415, -1 }, /* (444) common_expression ::= expr_or_subquery */ + { 415, -1 }, /* (445) common_expression ::= boolean_value_expression */ + { 423, 0 }, /* (446) from_clause_opt ::= */ + { 423, -2 }, /* (447) from_clause_opt ::= FROM table_reference_list */ + { 424, -1 }, /* (448) table_reference_list ::= table_reference */ + { 424, -3 }, /* (449) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 425, -1 }, /* (450) table_reference ::= table_primary */ + { 425, -1 }, /* (451) table_reference ::= joined_table */ + { 426, -2 }, /* (452) table_primary ::= table_name alias_opt */ + { 426, -4 }, /* (453) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 426, -2 }, /* (454) table_primary ::= subquery alias_opt */ + { 426, -1 }, /* (455) table_primary ::= parenthesized_joined_table */ + { 428, 0 }, /* (456) alias_opt ::= */ + { 428, -1 }, /* (457) alias_opt ::= table_alias */ + { 428, -2 }, /* (458) alias_opt ::= AS table_alias */ + { 430, -3 }, /* (459) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 430, -3 }, /* (460) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 427, -6 }, /* (461) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 431, 0 }, /* (462) join_type ::= */ + { 431, -1 }, /* (463) join_type ::= INNER */ + { 433, -12 }, /* (464) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + { 434, 0 }, /* (465) set_quantifier_opt ::= */ + { 434, -1 }, /* (466) set_quantifier_opt ::= DISTINCT */ + { 434, -1 }, /* (467) set_quantifier_opt ::= ALL */ + { 435, -1 }, /* (468) select_list ::= select_item */ + { 435, -3 }, /* (469) select_list ::= select_list NK_COMMA select_item */ + { 443, -1 }, /* (470) select_item ::= NK_STAR */ + { 443, -1 }, /* (471) select_item ::= common_expression */ + { 443, -2 }, /* (472) select_item ::= common_expression column_alias */ + { 443, -3 }, /* (473) select_item ::= common_expression AS column_alias */ + { 443, -3 }, /* (474) select_item ::= table_name NK_DOT NK_STAR */ + { 398, 0 }, /* (475) where_clause_opt ::= */ + { 398, -2 }, /* (476) where_clause_opt ::= WHERE search_condition */ + { 436, 0 }, /* (477) partition_by_clause_opt ::= */ + { 436, -3 }, /* (478) partition_by_clause_opt ::= PARTITION BY partition_list */ + { 444, -1 }, /* (479) partition_list ::= partition_item */ + { 444, -3 }, /* (480) partition_list ::= partition_list NK_COMMA partition_item */ + { 445, -1 }, /* (481) partition_item ::= expr_or_subquery */ + { 445, -2 }, /* (482) partition_item ::= expr_or_subquery column_alias */ + { 445, -3 }, /* (483) partition_item ::= expr_or_subquery AS column_alias */ + { 440, 0 }, /* (484) twindow_clause_opt ::= */ + { 440, -6 }, /* (485) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 440, -4 }, /* (486) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + { 440, -6 }, /* (487) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 440, -8 }, /* (488) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 440, -7 }, /* (489) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + { 384, 0 }, /* (490) sliding_opt ::= */ + { 384, -4 }, /* (491) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 439, 0 }, /* (492) fill_opt ::= */ + { 439, -4 }, /* (493) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 439, -6 }, /* (494) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 446, -1 }, /* (495) fill_mode ::= NONE */ + { 446, -1 }, /* (496) fill_mode ::= PREV */ + { 446, -1 }, /* (497) fill_mode ::= NULL */ + { 446, -1 }, /* (498) fill_mode ::= LINEAR */ + { 446, -1 }, /* (499) fill_mode ::= NEXT */ + { 441, 0 }, /* (500) group_by_clause_opt ::= */ + { 441, -3 }, /* (501) group_by_clause_opt ::= GROUP BY group_by_list */ + { 447, -1 }, /* (502) group_by_list ::= expr_or_subquery */ + { 447, -3 }, /* (503) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + { 442, 0 }, /* (504) having_clause_opt ::= */ + { 442, -2 }, /* (505) having_clause_opt ::= HAVING search_condition */ + { 437, 0 }, /* (506) range_opt ::= */ + { 437, -6 }, /* (507) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + { 438, 0 }, /* (508) every_opt ::= */ + { 438, -4 }, /* (509) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + { 448, -4 }, /* (510) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 449, -1 }, /* (511) query_simple ::= query_specification */ + { 449, -1 }, /* (512) query_simple ::= union_query_expression */ + { 453, -4 }, /* (513) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + { 453, -3 }, /* (514) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + { 454, -1 }, /* (515) query_simple_or_subquery ::= query_simple */ + { 454, -1 }, /* (516) query_simple_or_subquery ::= subquery */ + { 387, -1 }, /* (517) query_or_subquery ::= query_expression */ + { 387, -1 }, /* (518) query_or_subquery ::= subquery */ + { 450, 0 }, /* (519) order_by_clause_opt ::= */ + { 450, -3 }, /* (520) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 451, 0 }, /* (521) slimit_clause_opt ::= */ + { 451, -2 }, /* (522) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 451, -4 }, /* (523) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 451, -4 }, /* (524) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 452, 0 }, /* (525) limit_clause_opt ::= */ + { 452, -2 }, /* (526) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 452, -4 }, /* (527) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 452, -4 }, /* (528) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 429, -3 }, /* (529) subquery ::= NK_LP query_expression NK_RP */ + { 429, -3 }, /* (530) subquery ::= NK_LP subquery NK_RP */ + { 432, -1 }, /* (531) search_condition ::= common_expression */ + { 455, -1 }, /* (532) sort_specification_list ::= sort_specification */ + { 455, -3 }, /* (533) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 456, -3 }, /* (534) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + { 457, 0 }, /* (535) ordering_specification_opt ::= */ + { 457, -1 }, /* (536) ordering_specification_opt ::= ASC */ + { 457, -1 }, /* (537) ordering_specification_opt ::= DESC */ + { 458, 0 }, /* (538) null_ordering_opt ::= */ + { 458, -2 }, /* (539) null_ordering_opt ::= NULLS FIRST */ + { 458, -2 }, /* (540) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3575,11 +3601,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,323,&yymsp[0].minor); + yy_destructor(yypParser,325,&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,324,&yymsp[0].minor); + yy_destructor(yypParser,326,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3593,20 +3619,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,323,&yymsp[-2].minor); +{ yy_destructor(yypParser,325,&yymsp[-2].minor); { } - yy_destructor(yypParser,325,&yymsp[0].minor); + yy_destructor(yypParser,327,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,326,&yymsp[0].minor); +{ yy_destructor(yypParser,328,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,324,&yymsp[-1].minor); +{ yy_destructor(yypParser,326,&yymsp[-1].minor); { } - yy_destructor(yypParser,326,&yymsp[0].minor); + yy_destructor(yypParser,328,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3620,80 +3646,80 @@ 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,325,&yymsp[0].minor); + yy_destructor(yypParser,327,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy199, &yymsp[-1].minor.yy0, yymsp[0].minor.yy33); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy317, &yymsp[-1].minor.yy0, yymsp[0].minor.yy449); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy199, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy199, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy199, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 28: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy199); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy317); } break; case 29: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy33 = 1; } +{ yymsp[1].minor.yy449 = 1; } break; case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy33 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy449 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 31: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy525, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy199); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy531, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); } break; case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy525, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy199); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy531, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); } break; case 33: /* privileges ::= ALL */ -{ yymsp[0].minor.yy525 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_ALL; } break; case 34: /* privileges ::= priv_type_list */ case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36); -{ yylhsminor.yy525 = yymsp[0].minor.yy525; } - yymsp[0].minor.yy525 = yylhsminor.yy525; +{ yylhsminor.yy531 = yymsp[0].minor.yy531; } + yymsp[0].minor.yy531 = yylhsminor.yy531; break; case 35: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy525 = PRIVILEGE_TYPE_SUBSCRIBE; } +{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy525 = yymsp[-2].minor.yy525 | yymsp[0].minor.yy525; } - yymsp[-2].minor.yy525 = yylhsminor.yy525; +{ yylhsminor.yy531 = yymsp[-2].minor.yy531 | yymsp[0].minor.yy531; } + yymsp[-2].minor.yy531 = yylhsminor.yy531; break; case 38: /* priv_type ::= READ */ -{ yymsp[0].minor.yy525 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_READ; } break; case 39: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy525 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_WRITE; } break; case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy199 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy199 = yylhsminor.yy199; +{ yylhsminor.yy317 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy317 = yylhsminor.yy317; break; case 41: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy199 = yymsp[-2].minor.yy199; } - yymsp[-2].minor.yy199 = yylhsminor.yy199; +{ yylhsminor.yy317 = yymsp[-2].minor.yy317; } + yymsp[-2].minor.yy317 = yylhsminor.yy317; break; case 42: /* priv_level ::= topic_name */ case 457: /* alias_opt ::= table_alias */ yytestcase(yyruleno==457); -{ yylhsminor.yy199 = yymsp[0].minor.yy199; } - yymsp[0].minor.yy199 = yylhsminor.yy199; +{ yylhsminor.yy317 = yymsp[0].minor.yy317; } + yymsp[0].minor.yy317 = yylhsminor.yy317; break; case 43: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy199, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy317, NULL); } break; case 44: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0); } break; case 45: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy397); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy335); } break; case 46: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy199, yymsp[0].minor.yy397); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy335); } break; case 47: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3733,8 +3759,8 @@ static YYACTIONTYPE yy_reduce( case 402: /* star_func ::= FIRST */ yytestcase(yyruleno==402); case 403: /* star_func ::= LAST */ yytestcase(yyruleno==403); case 404: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==404); -{ yylhsminor.yy199 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy199 = yylhsminor.yy199; +{ yylhsminor.yy317 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy317 = yylhsminor.yy317; break; case 54: /* force_opt ::= */ case 73: /* not_exists_opt ::= */ yytestcase(yyruleno==73); @@ -3742,13 +3768,13 @@ static YYACTIONTYPE yy_reduce( case 284: /* analyze_opt ::= */ yytestcase(yyruleno==284); case 291: /* agg_func_opt ::= */ yytestcase(yyruleno==291); case 465: /* set_quantifier_opt ::= */ yytestcase(yyruleno==465); -{ yymsp[1].minor.yy397 = false; } +{ yymsp[1].minor.yy335 = false; } break; case 55: /* force_opt ::= FORCE */ case 285: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==285); case 292: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==292); case 466: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==466); -{ yymsp[0].minor.yy397 = true; } +{ yymsp[0].minor.yy335 = true; } break; case 56: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3781,213 +3807,213 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 66: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy397, &yymsp[-1].minor.yy199, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy335, &yymsp[-1].minor.yy317, yymsp[0].minor.yy74); } break; case 67: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy397, &yymsp[0].minor.yy199); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } break; case 68: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy199); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy317); } break; case 69: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy199, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy74); } break; case 70: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy199); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy317); } break; case 71: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy199, yymsp[0].minor.yy706); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy856); } break; case 72: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy397 = true; } +{ yymsp[-2].minor.yy335 = true; } break; case 74: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy397 = true; } +{ yymsp[-1].minor.yy335 = true; } break; case 76: /* db_options ::= */ -{ yymsp[1].minor.yy148 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy74 = createDefaultDatabaseOptions(pCxt); } break; case 77: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 78: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 79: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 80: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 81: /* db_options ::= db_options DURATION NK_INTEGER */ case 82: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==82); -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 83: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 84: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 85: /* db_options ::= db_options KEEP integer_list */ case 86: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==86); -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_KEEP, yymsp[0].minor.yy404); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_KEEP, yymsp[0].minor.yy874); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 87: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 88: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 89: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 90: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 91: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 92: /* db_options ::= db_options STRICT NK_STRING */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 93: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 94: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 95: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_RETENTIONS, yymsp[0].minor.yy404); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_RETENTIONS, yymsp[0].minor.yy874); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 96: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 97: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 98: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 99: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 100: /* db_options ::= db_options WAL_RETENTION_PERIOD 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.yy148 = setDatabaseOption(pCxt, yymsp[-3].minor.yy148, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-3].minor.yy74, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 101: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 102: /* db_options ::= db_options WAL_RETENTION_SIZE 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.yy148 = setDatabaseOption(pCxt, yymsp[-3].minor.yy148, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-3].minor.yy74, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 103: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 104: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 105: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 106: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 107: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ -{ yylhsminor.yy148 = setDatabaseOption(pCxt, yymsp[-2].minor.yy148, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 108: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy148 = createAlterDatabaseOptions(pCxt); yylhsminor.yy148 = setAlterDatabaseOption(pCxt, yylhsminor.yy148, &yymsp[0].minor.yy123); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterDatabaseOptions(pCxt); yylhsminor.yy74 = setAlterDatabaseOption(pCxt, yylhsminor.yy74, &yymsp[0].minor.yy767); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 109: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy148 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy148, &yymsp[0].minor.yy123); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy74, &yymsp[0].minor.yy767); } + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 110: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy123.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy767.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 111: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy123.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy767.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 112: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy123.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy767.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 113: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy123.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy767.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 114: /* alter_db_option ::= KEEP integer_list */ case 115: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==115); -{ yymsp[-1].minor.yy123.type = DB_OPTION_KEEP; yymsp[-1].minor.yy123.pList = yymsp[0].minor.yy404; } +{ yymsp[-1].minor.yy767.type = DB_OPTION_KEEP; yymsp[-1].minor.yy767.pList = yymsp[0].minor.yy874; } break; case 116: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy123.type = DB_OPTION_PAGES; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy767.type = DB_OPTION_PAGES; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 117: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy123.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy767.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 118: /* alter_db_option ::= STRICT NK_STRING */ -{ yymsp[-1].minor.yy123.type = DB_OPTION_STRICT; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy767.type = DB_OPTION_STRICT; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 119: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy123.type = DB_OPTION_WAL; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy767.type = DB_OPTION_WAL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 120: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy123.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy767.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 121: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy404 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy404 = yylhsminor.yy404; +{ yylhsminor.yy874 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy874 = yylhsminor.yy874; break; case 122: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ case 314: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==314); -{ yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-2].minor.yy404, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy404 = yylhsminor.yy404; +{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy874 = yylhsminor.yy874; break; case 123: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy404 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy404 = yylhsminor.yy404; +{ yylhsminor.yy874 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy874 = yylhsminor.yy874; break; case 124: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-2].minor.yy404, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy404 = yylhsminor.yy404; +{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy874 = yylhsminor.yy874; break; case 125: /* retention_list ::= retention */ case 147: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==147); @@ -4002,9 +4028,9 @@ static YYACTIONTYPE yy_reduce( case 413: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==413); case 468: /* select_list ::= select_item */ yytestcase(yyruleno==468); case 479: /* partition_list ::= partition_item */ yytestcase(yyruleno==479); - case 531: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==531); -{ yylhsminor.yy404 = createNodeList(pCxt, yymsp[0].minor.yy148); } - yymsp[0].minor.yy404 = yylhsminor.yy404; + case 532: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==532); +{ yylhsminor.yy874 = createNodeList(pCxt, yymsp[0].minor.yy74); } + yymsp[0].minor.yy874 = yylhsminor.yy874; break; case 126: /* retention_list ::= retention_list NK_COMMA retention */ case 158: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==158); @@ -4016,267 +4042,267 @@ static YYACTIONTYPE yy_reduce( case 408: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==408); case 469: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==469); case 480: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==480); - case 532: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==532); -{ yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-2].minor.yy404, yymsp[0].minor.yy148); } - yymsp[-2].minor.yy404 = yylhsminor.yy404; + case 533: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==533); +{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); } + yymsp[-2].minor.yy874 = yylhsminor.yy874; break; case 127: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy148 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 128: /* speed_opt ::= */ case 293: /* bufsize_opt ::= */ yytestcase(yyruleno==293); -{ yymsp[1].minor.yy706 = 0; } +{ yymsp[1].minor.yy856 = 0; } break; case 129: /* speed_opt ::= MAX_SPEED NK_INTEGER */ case 294: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==294); -{ yymsp[-1].minor.yy706 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy856 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 130: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 132: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==132); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy397, yymsp[-5].minor.yy148, yymsp[-3].minor.yy404, yymsp[-1].minor.yy404, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy335, yymsp[-5].minor.yy74, yymsp[-3].minor.yy874, yymsp[-1].minor.yy874, yymsp[0].minor.yy74); } break; case 131: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy404); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy874); } break; case 133: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy404); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy874); } break; case 134: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy397, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); } break; case 135: /* cmd ::= ALTER TABLE alter_table_clause */ case 316: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==316); -{ pCxt->pRootNode = yymsp[0].minor.yy148; } +{ pCxt->pRootNode = yymsp[0].minor.yy74; } break; case 136: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy148); } +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy74); } break; case 137: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy148 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 138: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy148 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy199, yymsp[0].minor.yy530); } - yymsp[-4].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } + yymsp[-4].minor.yy74 = yylhsminor.yy74; break; case 139: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy148 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy148, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy199); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy74, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy317); } + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 140: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy148 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy199, yymsp[0].minor.yy530); } - yymsp[-4].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } + yymsp[-4].minor.yy74 = yylhsminor.yy74; break; case 141: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy148 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy199, &yymsp[0].minor.yy199); } - yymsp[-4].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); } + yymsp[-4].minor.yy74 = yylhsminor.yy74; break; case 142: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy148 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy199, yymsp[0].minor.yy530); } - yymsp[-4].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } + yymsp[-4].minor.yy74 = yylhsminor.yy74; break; case 143: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy148 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy148, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy199); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy74, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy317); } + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 144: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy148 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy199, yymsp[0].minor.yy530); } - yymsp[-4].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } + yymsp[-4].minor.yy74 = yylhsminor.yy74; break; case 145: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy148 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy199, &yymsp[0].minor.yy199); } - yymsp[-4].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); } + yymsp[-4].minor.yy74 = yylhsminor.yy74; break; case 146: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy148 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy148, &yymsp[-2].minor.yy199, yymsp[0].minor.yy148); } - yymsp[-5].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy74, &yymsp[-2].minor.yy317, yymsp[0].minor.yy74); } + yymsp[-5].minor.yy74 = yylhsminor.yy74; break; case 148: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 151: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==151); case 414: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==414); -{ yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-1].minor.yy404, yymsp[0].minor.yy148); } - yymsp[-1].minor.yy404 = yylhsminor.yy404; +{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-1].minor.yy874, yymsp[0].minor.yy74); } + yymsp[-1].minor.yy874 = yylhsminor.yy874; break; case 149: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ -{ yylhsminor.yy148 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy397, yymsp[-8].minor.yy148, yymsp[-6].minor.yy148, yymsp[-5].minor.yy404, yymsp[-2].minor.yy404, yymsp[0].minor.yy148); } - yymsp[-9].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy335, yymsp[-8].minor.yy74, yymsp[-6].minor.yy74, yymsp[-5].minor.yy874, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); } + yymsp[-9].minor.yy74 = yylhsminor.yy74; break; case 152: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy148 = createDropTableClause(pCxt, yymsp[-1].minor.yy397, yymsp[0].minor.yy148); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createDropTableClause(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); } + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 153: /* specific_cols_opt ::= */ case 184: /* tags_def_opt ::= */ yytestcase(yyruleno==184); case 254: /* tag_list_opt ::= */ yytestcase(yyruleno==254); case 477: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==477); - case 499: /* group_by_clause_opt ::= */ yytestcase(yyruleno==499); - case 518: /* order_by_clause_opt ::= */ yytestcase(yyruleno==518); -{ yymsp[1].minor.yy404 = NULL; } + case 500: /* group_by_clause_opt ::= */ yytestcase(yyruleno==500); + case 519: /* order_by_clause_opt ::= */ yytestcase(yyruleno==519); +{ yymsp[1].minor.yy874 = NULL; } break; case 154: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy404 = yymsp[-1].minor.yy404; } +{ yymsp[-2].minor.yy874 = yymsp[-1].minor.yy874; } break; case 155: /* full_table_name ::= table_name */ -{ yylhsminor.yy148 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy199, NULL); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy317, NULL); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 156: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy148 = createRealTableNode(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy199, NULL); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRealTableNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317, NULL); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 159: /* column_def ::= column_name type_name */ -{ yylhsminor.yy148 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy199, yymsp[0].minor.yy530, NULL); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898, NULL); } + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 160: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy148 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy199, yymsp[-2].minor.yy530, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy317, yymsp[-2].minor.yy898, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 161: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 162: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 163: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 164: /* type_name ::= INT */ case 165: /* type_name ::= INTEGER */ yytestcase(yyruleno==165); -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_INT); } break; case 166: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 167: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 168: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 169: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy530 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 170: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 171: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy530 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 172: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy530 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 173: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy530 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 174: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy530 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 175: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy530 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 176: /* type_name ::= JSON */ -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 177: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy530 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 178: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 179: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 180: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy530 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 181: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 182: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy530 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 183: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy530 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 185: /* tags_def_opt ::= tags_def */ case 406: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==406); -{ yylhsminor.yy404 = yymsp[0].minor.yy404; } - yymsp[0].minor.yy404 = yylhsminor.yy404; +{ yylhsminor.yy874 = yymsp[0].minor.yy874; } + yymsp[0].minor.yy874 = yylhsminor.yy874; break; case 186: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy404 = yymsp[-1].minor.yy404; } +{ yymsp[-3].minor.yy874 = yymsp[-1].minor.yy874; } break; case 187: /* table_options ::= */ -{ yymsp[1].minor.yy148 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy74 = createDefaultTableOptions(pCxt); } break; case 188: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy148 = setTableOption(pCxt, yymsp[-2].minor.yy148, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 189: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy148 = setTableOption(pCxt, yymsp[-2].minor.yy148, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy404); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy874); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 190: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy148 = setTableOption(pCxt, yymsp[-2].minor.yy148, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy404); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy874); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 191: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy148 = setTableOption(pCxt, yymsp[-4].minor.yy148, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy404); } - yymsp[-4].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-4].minor.yy74, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy874); } + yymsp[-4].minor.yy74 = yylhsminor.yy74; break; case 192: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy148 = setTableOption(pCxt, yymsp[-2].minor.yy148, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 193: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy148 = setTableOption(pCxt, yymsp[-4].minor.yy148, TABLE_OPTION_SMA, yymsp[-1].minor.yy404); } - yymsp[-4].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-4].minor.yy74, TABLE_OPTION_SMA, yymsp[-1].minor.yy874); } + yymsp[-4].minor.yy74 = yylhsminor.yy74; break; case 194: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy148 = setTableOption(pCxt, yymsp[-2].minor.yy148, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy404); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy874); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 195: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy148 = createAlterTableOptions(pCxt); yylhsminor.yy148 = setTableOption(pCxt, yylhsminor.yy148, yymsp[0].minor.yy123.type, &yymsp[0].minor.yy123.val); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createAlterTableOptions(pCxt); yylhsminor.yy74 = setTableOption(pCxt, yylhsminor.yy74, yymsp[0].minor.yy767.type, &yymsp[0].minor.yy767.val); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 196: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy148 = setTableOption(pCxt, yymsp[-1].minor.yy148, yymsp[0].minor.yy123.type, &yymsp[0].minor.yy123.val); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy767.type, &yymsp[0].minor.yy767.val); } + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 197: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy123.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy767.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 198: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy123.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy767.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 199: /* duration_list ::= duration_literal */ case 371: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==371); -{ yylhsminor.yy404 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy148)); } - yymsp[0].minor.yy404 = yylhsminor.yy404; +{ yylhsminor.yy874 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } + yymsp[0].minor.yy874 = yylhsminor.yy874; break; case 200: /* duration_list ::= duration_list NK_COMMA duration_literal */ case 372: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==372); -{ yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-2].minor.yy404, releaseRawExprNode(pCxt, yymsp[0].minor.yy148)); } - yymsp[-2].minor.yy404 = yylhsminor.yy404; +{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } + yymsp[-2].minor.yy874 = yylhsminor.yy874; break; case 203: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy148 = createFunctionNode(pCxt, &yymsp[0].minor.yy199, NULL); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[0].minor.yy317, NULL); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 204: /* rollup_func_name ::= FIRST */ case 205: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==205); case 258: /* tag_item ::= QTAGS */ yytestcase(yyruleno==258); -{ yylhsminor.yy148 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 208: /* col_name ::= column_name */ case 259: /* tag_item ::= column_name */ yytestcase(yyruleno==259); -{ yylhsminor.yy148 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy199); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy317); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 209: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } @@ -4291,13 +4317,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; case 213: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy148, yymsp[0].minor.yy148, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy74, yymsp[0].minor.yy74, OP_TYPE_LIKE); } break; case 214: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy148, yymsp[0].minor.yy148, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy74, yymsp[0].minor.yy74, OP_TYPE_LIKE); } break; case 215: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy148, NULL, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy74, NULL, OP_TYPE_LIKE); } break; case 216: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } @@ -4309,7 +4335,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; case 219: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy148, yymsp[-1].minor.yy148, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy74, yymsp[-1].minor.yy74, OP_TYPE_EQUAL); } break; case 220: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } @@ -4328,13 +4354,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; case 226: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy199); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy317); } break; case 227: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy74); } break; case 228: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy74); } break; case 229: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } @@ -4353,7 +4379,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; case 235: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy74); } break; case 236: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } @@ -4368,7 +4394,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; case 240: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy74); } break; case 241: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } @@ -4377,10 +4403,10 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; case 243: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy148, yymsp[-1].minor.yy148, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy74, yymsp[-1].minor.yy74, OP_TYPE_EQUAL); } break; case 244: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy148, yymsp[0].minor.yy148, yymsp[-3].minor.yy404); } +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74, yymsp[-3].minor.yy874); } break; case 245: /* cmd ::= SHOW VNODES NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } @@ -4390,11 +4416,11 @@ static YYACTIONTYPE yy_reduce( break; case 247: /* db_name_cond_opt ::= */ case 252: /* from_db_opt ::= */ yytestcase(yyruleno==252); -{ yymsp[1].minor.yy148 = createDefaultDatabaseCondValue(pCxt); } +{ yymsp[1].minor.yy74 = createDefaultDatabaseCondValue(pCxt); } break; case 248: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy148 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy199); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy317); } + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 249: /* like_pattern_opt ::= */ case 304: /* subtable_opt ::= */ yytestcase(yyruleno==304); @@ -4402,148 +4428,148 @@ static YYACTIONTYPE yy_reduce( case 446: /* from_clause_opt ::= */ yytestcase(yyruleno==446); case 475: /* where_clause_opt ::= */ yytestcase(yyruleno==475); case 484: /* twindow_clause_opt ::= */ yytestcase(yyruleno==484); - case 489: /* sliding_opt ::= */ yytestcase(yyruleno==489); - case 491: /* fill_opt ::= */ yytestcase(yyruleno==491); - case 503: /* having_clause_opt ::= */ yytestcase(yyruleno==503); - case 505: /* range_opt ::= */ yytestcase(yyruleno==505); - case 507: /* every_opt ::= */ yytestcase(yyruleno==507); - case 520: /* slimit_clause_opt ::= */ yytestcase(yyruleno==520); - case 524: /* limit_clause_opt ::= */ yytestcase(yyruleno==524); -{ yymsp[1].minor.yy148 = NULL; } + case 490: /* sliding_opt ::= */ yytestcase(yyruleno==490); + case 492: /* fill_opt ::= */ yytestcase(yyruleno==492); + case 504: /* having_clause_opt ::= */ yytestcase(yyruleno==504); + case 506: /* range_opt ::= */ yytestcase(yyruleno==506); + case 508: /* every_opt ::= */ yytestcase(yyruleno==508); + case 521: /* slimit_clause_opt ::= */ yytestcase(yyruleno==521); + case 525: /* limit_clause_opt ::= */ yytestcase(yyruleno==525); +{ yymsp[1].minor.yy74 = NULL; } break; case 250: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 251: /* table_name_cond ::= table_name */ -{ yylhsminor.yy148 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy199); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy317); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 253: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy148 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy199); } +{ yymsp[-1].minor.yy74 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy317); } break; case 257: /* tag_item ::= TBNAME */ -{ yylhsminor.yy148 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 260: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy148 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy199), &yymsp[0].minor.yy199); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy317), &yymsp[0].minor.yy317); } + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 261: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy148 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy199), &yymsp[0].minor.yy199); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy317), &yymsp[0].minor.yy317); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 262: /* cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy397, yymsp[-3].minor.yy148, yymsp[-1].minor.yy148, NULL, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy335, yymsp[-3].minor.yy74, yymsp[-1].minor.yy74, NULL, yymsp[0].minor.yy74); } break; case 263: /* cmd ::= DROP INDEX exists_opt full_table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy397, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); } break; case 264: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy148 = createIndexOption(pCxt, yymsp[-7].minor.yy404, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), NULL, yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } +{ yymsp[-9].minor.yy74 = createIndexOption(pCxt, yymsp[-7].minor.yy874, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), NULL, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } break; case 265: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-11].minor.yy148 = createIndexOption(pCxt, yymsp[-9].minor.yy404, releaseRawExprNode(pCxt, yymsp[-5].minor.yy148), releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } +{ yymsp[-11].minor.yy74 = createIndexOption(pCxt, yymsp[-9].minor.yy874, releaseRawExprNode(pCxt, yymsp[-5].minor.yy74), releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } break; case 268: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy148 = createFunctionNode(pCxt, &yymsp[-3].minor.yy199, yymsp[-1].minor.yy404); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[-3].minor.yy317, yymsp[-1].minor.yy874); } + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 269: /* sma_stream_opt ::= */ case 297: /* stream_options ::= */ yytestcase(yyruleno==297); -{ yymsp[1].minor.yy148 = createStreamOptions(pCxt); } +{ yymsp[1].minor.yy74 = createStreamOptions(pCxt); } break; case 270: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ case 301: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==301); -{ ((SStreamOptions*)yymsp[-2].minor.yy148)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); yylhsminor.yy148 = yymsp[-2].minor.yy148; } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 271: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy148)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); yylhsminor.yy148 = yymsp[-2].minor.yy148; } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 272: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy148)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); yylhsminor.yy148 = yymsp[-2].minor.yy148; } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 273: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy397, &yymsp[-2].minor.yy199, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy335, &yymsp[-2].minor.yy317, yymsp[0].minor.yy74); } break; case 274: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy397, &yymsp[-3].minor.yy199, &yymsp[0].minor.yy199, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy335, &yymsp[-3].minor.yy317, &yymsp[0].minor.yy317, false); } break; case 275: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy397, &yymsp[-5].minor.yy199, &yymsp[0].minor.yy199, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy335, &yymsp[-5].minor.yy317, &yymsp[0].minor.yy317, true); } break; case 276: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy397, &yymsp[-3].minor.yy199, yymsp[0].minor.yy148, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy335, &yymsp[-3].minor.yy317, yymsp[0].minor.yy74, false); } break; case 277: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy397, &yymsp[-5].minor.yy199, yymsp[0].minor.yy148, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy335, &yymsp[-5].minor.yy317, yymsp[0].minor.yy74, true); } break; case 278: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy397, &yymsp[0].minor.yy199); } +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } break; case 279: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy397, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy199); } +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy335, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); } break; case 280: /* cmd ::= DESC full_table_name */ case 281: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==281); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy74); } break; case 282: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; case 283: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy397, yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy335, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } break; case 286: /* explain_options ::= */ -{ yymsp[1].minor.yy148 = createDefaultExplainOptions(pCxt); } +{ yymsp[1].minor.yy74 = createDefaultExplainOptions(pCxt); } break; case 287: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy148 = setExplainVerbose(pCxt, yymsp[-2].minor.yy148, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setExplainVerbose(pCxt, yymsp[-2].minor.yy74, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 288: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy148 = setExplainRatio(pCxt, yymsp[-2].minor.yy148, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setExplainRatio(pCxt, yymsp[-2].minor.yy74, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 289: /* 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.yy397, yymsp[-8].minor.yy397, &yymsp[-5].minor.yy199, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy530, yymsp[0].minor.yy706); } +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy335, yymsp[-8].minor.yy335, &yymsp[-5].minor.yy317, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy898, yymsp[0].minor.yy856); } break; case 290: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy397, &yymsp[0].minor.yy199); } +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } break; case 295: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy397, &yymsp[-7].minor.yy199, yymsp[-4].minor.yy148, yymsp[-6].minor.yy148, yymsp[-3].minor.yy404, yymsp[-2].minor.yy148, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy335, &yymsp[-7].minor.yy317, yymsp[-4].minor.yy74, yymsp[-6].minor.yy74, yymsp[-3].minor.yy874, yymsp[-2].minor.yy74, yymsp[0].minor.yy74); } break; case 296: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy397, &yymsp[0].minor.yy199); } +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } break; case 298: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy148)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy148 = yymsp[-2].minor.yy148; } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ ((SStreamOptions*)yymsp[-2].minor.yy74)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy74 = yymsp[-2].minor.yy74; } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 299: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy148)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy148 = yymsp[-2].minor.yy148; } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ ((SStreamOptions*)yymsp[-2].minor.yy74)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy74 = yymsp[-2].minor.yy74; } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 300: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-3].minor.yy148)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy148)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); yylhsminor.yy148 = yymsp[-3].minor.yy148; } - yymsp[-3].minor.yy148 = yylhsminor.yy148; +{ ((SStreamOptions*)yymsp[-3].minor.yy74)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy74)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-3].minor.yy74; } + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 302: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ ((SStreamOptions*)yymsp[-3].minor.yy148)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy148 = yymsp[-3].minor.yy148; } - yymsp[-3].minor.yy148 = yylhsminor.yy148; +{ ((SStreamOptions*)yymsp[-3].minor.yy74)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy74 = yymsp[-3].minor.yy74; } + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 303: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ ((SStreamOptions*)yymsp[-2].minor.yy148)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy148 = yymsp[-2].minor.yy148; } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ ((SStreamOptions*)yymsp[-2].minor.yy74)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy74 = yymsp[-2].minor.yy74; } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 305: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 490: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==490); - case 508: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==508); -{ yymsp[-3].minor.yy148 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy148); } + case 491: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==491); + case 509: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==509); +{ yymsp[-3].minor.yy74 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy74); } break; case 306: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } @@ -4561,42 +4587,42 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 311: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy404); } +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy874); } break; case 312: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; case 313: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy404 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +{ yymsp[-1].minor.yy874 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; case 315: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } break; case 317: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy148, yymsp[-2].minor.yy404, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy74, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); } break; case 318: /* cmd ::= INSERT INTO full_table_name query_or_subquery */ -{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy148, NULL, yymsp[0].minor.yy148); } +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy74, NULL, yymsp[0].minor.yy74); } break; case 319: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 320: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 321: /* literal ::= NK_STRING */ -{ yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 322: /* literal ::= NK_BOOL */ -{ yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 323: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 324: /* literal ::= duration_literal */ case 334: /* signed_literal ::= signed */ yytestcase(yyruleno==334); @@ -4615,175 +4641,175 @@ static YYACTIONTYPE yy_reduce( case 450: /* table_reference ::= table_primary */ yytestcase(yyruleno==450); case 451: /* table_reference ::= joined_table */ yytestcase(yyruleno==451); case 455: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==455); - case 510: /* query_simple ::= query_specification */ yytestcase(yyruleno==510); - case 511: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==511); - case 514: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==514); - case 516: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==516); -{ yylhsminor.yy148 = yymsp[0].minor.yy148; } - yymsp[0].minor.yy148 = yylhsminor.yy148; + case 511: /* query_simple ::= query_specification */ yytestcase(yyruleno==511); + case 512: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==512); + case 515: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==515); + case 517: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==517); +{ yylhsminor.yy74 = yymsp[0].minor.yy74; } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 325: /* literal ::= NULL */ -{ yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 326: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 327: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 328: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 329: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; case 330: /* 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.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 331: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 332: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; case 333: /* 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.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 335: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 336: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 337: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 338: /* signed_literal ::= duration_literal */ case 340: /* signed_literal ::= literal_func */ yytestcase(yyruleno==340); case 409: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==409); case 471: /* select_item ::= common_expression */ yytestcase(yyruleno==471); case 481: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==481); - case 515: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==515); - case 517: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==517); - case 530: /* search_condition ::= common_expression */ yytestcase(yyruleno==530); -{ yylhsminor.yy148 = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); } - yymsp[0].minor.yy148 = yylhsminor.yy148; + case 516: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==516); + case 518: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==518); + case 531: /* search_condition ::= common_expression */ yytestcase(yyruleno==531); +{ yylhsminor.yy74 = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 339: /* signed_literal ::= NULL */ -{ yylhsminor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 341: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy148 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 360: /* expression ::= NK_LP expression NK_RP */ case 443: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==443); - case 529: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==529); -{ yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy148)); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + case 530: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==530); +{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 361: /* expression ::= NK_PLUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy148)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 362: /* expression ::= NK_MINUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy148), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy74), NULL)); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 363: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 364: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 365: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 366: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 367: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 368: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 369: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 370: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 373: /* column_reference ::= column_name */ -{ yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy199, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy199)); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy317, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy317)); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 374: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy199, createColumnNode(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy199)); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317, createColumnNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317)); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 375: /* pseudo_column ::= ROWTS */ case 376: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==376); @@ -4796,87 +4822,87 @@ static YYACTIONTYPE yy_reduce( case 384: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==384); case 385: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==385); case 391: /* literal_func ::= NOW */ yytestcase(yyruleno==391); -{ yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 377: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy199)))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy317)))); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 386: /* function_expression ::= function_name NK_LP expression_list NK_RP */ case 387: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==387); -{ yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy199, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy199, yymsp[-1].minor.yy404)); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy317, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy317, yymsp[-1].minor.yy874)); } + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 388: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -{ yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), yymsp[-1].minor.yy530)); } - yymsp[-5].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-1].minor.yy898)); } + yymsp[-5].minor.yy74 = yylhsminor.yy74; break; case 390: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy199, NULL)); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy317, NULL)); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 405: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy404 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy404 = yylhsminor.yy404; +{ yylhsminor.yy874 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy874 = yylhsminor.yy874; break; case 410: /* star_func_para ::= table_name NK_DOT NK_STAR */ case 474: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==474); -{ yylhsminor.yy148 = createColumnNode(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createColumnNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 411: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy404, yymsp[-1].minor.yy148)); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy874, yymsp[-1].minor.yy74)); } + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 412: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), yymsp[-2].minor.yy404, yymsp[-1].minor.yy148)); } - yymsp[-4].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-2].minor.yy874, yymsp[-1].minor.yy74)); } + yymsp[-4].minor.yy74 = yylhsminor.yy74; break; case 415: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy148 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148)); } +{ yymsp[-3].minor.yy74 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } break; case 417: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy148 = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); } +{ yymsp[-1].minor.yy74 = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); } break; case 418: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ case 423: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==423); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy20, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy20, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 419: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy148), releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy74), releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-4].minor.yy148 = yylhsminor.yy148; + yymsp[-4].minor.yy74 = yylhsminor.yy74; break; case 420: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy148), releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy74), releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-5].minor.yy148 = yylhsminor.yy148; + yymsp[-5].minor.yy74 = yylhsminor.yy74; break; case 421: /* predicate ::= expr_or_subquery IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), NULL)); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 422: /* predicate ::= expr_or_subquery IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), NULL)); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 424: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy20 = OP_TYPE_LOWER_THAN; } @@ -4918,205 +4944,208 @@ static YYACTIONTYPE yy_reduce( { yymsp[-1].minor.yy20 = OP_TYPE_NOT_IN; } break; case 437: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy404)); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy874)); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 439: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy148), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy74), NULL)); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 440: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 441: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); - yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); + yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 447: /* from_clause_opt ::= FROM table_reference_list */ case 476: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==476); - case 504: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==504); -{ yymsp[-1].minor.yy148 = yymsp[0].minor.yy148; } + case 505: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==505); +{ yymsp[-1].minor.yy74 = yymsp[0].minor.yy74; } break; case 449: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy148 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy148, yymsp[0].minor.yy148, NULL); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy74, yymsp[0].minor.yy74, NULL); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 452: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy148 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy199, &yymsp[0].minor.yy199); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); } + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 453: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy148 = createRealTableNode(pCxt, &yymsp[-3].minor.yy199, &yymsp[-1].minor.yy199, &yymsp[0].minor.yy199); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createRealTableNode(pCxt, &yymsp[-3].minor.yy317, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); } + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; case 454: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy148 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy148), &yymsp[0].minor.yy199); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74), &yymsp[0].minor.yy317); } + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 456: /* alias_opt ::= */ -{ yymsp[1].minor.yy199 = nil_token; } +{ yymsp[1].minor.yy317 = nil_token; } break; case 458: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy199 = yymsp[0].minor.yy199; } +{ yymsp[-1].minor.yy317 = yymsp[0].minor.yy317; } break; case 459: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ case 460: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==460); -{ yymsp[-2].minor.yy148 = yymsp[-1].minor.yy148; } +{ yymsp[-2].minor.yy74 = yymsp[-1].minor.yy74; } break; case 461: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy148 = createJoinTableNode(pCxt, yymsp[-4].minor.yy470, yymsp[-5].minor.yy148, yymsp[-2].minor.yy148, yymsp[0].minor.yy148); } - yymsp[-5].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createJoinTableNode(pCxt, yymsp[-4].minor.yy630, yymsp[-5].minor.yy74, yymsp[-2].minor.yy74, yymsp[0].minor.yy74); } + yymsp[-5].minor.yy74 = yylhsminor.yy74; break; case 462: /* join_type ::= */ -{ yymsp[1].minor.yy470 = JOIN_TYPE_INNER; } +{ yymsp[1].minor.yy630 = JOIN_TYPE_INNER; } break; case 463: /* join_type ::= INNER */ -{ yymsp[0].minor.yy470 = JOIN_TYPE_INNER; } +{ yymsp[0].minor.yy630 = JOIN_TYPE_INNER; } break; case 464: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-11].minor.yy148 = createSelectStmt(pCxt, yymsp[-10].minor.yy397, yymsp[-9].minor.yy404, yymsp[-8].minor.yy148); - yymsp[-11].minor.yy148 = addWhereClause(pCxt, yymsp[-11].minor.yy148, yymsp[-7].minor.yy148); - yymsp[-11].minor.yy148 = addPartitionByClause(pCxt, yymsp[-11].minor.yy148, yymsp[-6].minor.yy404); - yymsp[-11].minor.yy148 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy148, yymsp[-2].minor.yy148); - yymsp[-11].minor.yy148 = addGroupByClause(pCxt, yymsp[-11].minor.yy148, yymsp[-1].minor.yy404); - yymsp[-11].minor.yy148 = addHavingClause(pCxt, yymsp[-11].minor.yy148, yymsp[0].minor.yy148); - yymsp[-11].minor.yy148 = addRangeClause(pCxt, yymsp[-11].minor.yy148, yymsp[-5].minor.yy148); - yymsp[-11].minor.yy148 = addEveryClause(pCxt, yymsp[-11].minor.yy148, yymsp[-4].minor.yy148); - yymsp[-11].minor.yy148 = addFillClause(pCxt, yymsp[-11].minor.yy148, yymsp[-3].minor.yy148); + yymsp[-11].minor.yy74 = createSelectStmt(pCxt, yymsp[-10].minor.yy335, yymsp[-9].minor.yy874, yymsp[-8].minor.yy74); + yymsp[-11].minor.yy74 = addWhereClause(pCxt, yymsp[-11].minor.yy74, yymsp[-7].minor.yy74); + yymsp[-11].minor.yy74 = addPartitionByClause(pCxt, yymsp[-11].minor.yy74, yymsp[-6].minor.yy874); + yymsp[-11].minor.yy74 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy74, yymsp[-2].minor.yy74); + yymsp[-11].minor.yy74 = addGroupByClause(pCxt, yymsp[-11].minor.yy74, yymsp[-1].minor.yy874); + yymsp[-11].minor.yy74 = addHavingClause(pCxt, yymsp[-11].minor.yy74, yymsp[0].minor.yy74); + yymsp[-11].minor.yy74 = addRangeClause(pCxt, yymsp[-11].minor.yy74, yymsp[-5].minor.yy74); + yymsp[-11].minor.yy74 = addEveryClause(pCxt, yymsp[-11].minor.yy74, yymsp[-4].minor.yy74); + yymsp[-11].minor.yy74 = addFillClause(pCxt, yymsp[-11].minor.yy74, yymsp[-3].minor.yy74); } break; case 467: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy397 = false; } +{ yymsp[0].minor.yy335 = false; } break; case 470: /* select_item ::= NK_STAR */ -{ yylhsminor.yy148 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy74 = yylhsminor.yy74; break; case 472: /* select_item ::= common_expression column_alias */ case 482: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==482); -{ yylhsminor.yy148 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy148), &yymsp[0].minor.yy199); } - yymsp[-1].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74), &yymsp[0].minor.yy317); } + yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 473: /* select_item ::= common_expression AS column_alias */ case 483: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==483); -{ yylhsminor.yy148 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), &yymsp[0].minor.yy199); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; +{ yylhsminor.yy74 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), &yymsp[0].minor.yy317); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; case 478: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 500: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==500); - case 519: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==519); -{ yymsp[-2].minor.yy404 = yymsp[0].minor.yy404; } + case 501: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==501); + case 520: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==520); +{ yymsp[-2].minor.yy874 = yymsp[0].minor.yy874; } break; case 485: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy148 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), releaseRawExprNode(pCxt, yymsp[-1].minor.yy148)); } +{ yymsp[-5].minor.yy74 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } break; case 486: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy148 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy148)); } +{ yymsp[-3].minor.yy74 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } break; case 487: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy148 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), NULL, yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } +{ yymsp[-5].minor.yy74 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), NULL, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } break; case 488: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy148 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy148), releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } +{ yymsp[-7].minor.yy74 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy74), releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } break; - case 492: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy148 = createFillNode(pCxt, yymsp[-1].minor.yy334, NULL); } + case 489: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +{ yymsp[-6].minor.yy74 = createEventWindowNode(pCxt, yymsp[-3].minor.yy74, yymsp[0].minor.yy74); } break; - case 493: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy148 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy404)); } + case 493: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy74 = createFillNode(pCxt, yymsp[-1].minor.yy828, NULL); } break; - case 494: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy334 = FILL_MODE_NONE; } + case 494: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy74 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy874)); } break; - case 495: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy334 = FILL_MODE_PREV; } + case 495: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy828 = FILL_MODE_NONE; } break; - case 496: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy334 = FILL_MODE_NULL; } + case 496: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy828 = FILL_MODE_PREV; } break; - case 497: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy334 = FILL_MODE_LINEAR; } + case 497: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy828 = FILL_MODE_NULL; } break; - case 498: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy334 = FILL_MODE_NEXT; } + case 498: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy828 = FILL_MODE_LINEAR; } break; - case 501: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy404 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); } - yymsp[0].minor.yy404 = yylhsminor.yy404; + case 499: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy828 = FILL_MODE_NEXT; } break; - case 502: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-2].minor.yy404, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); } - yymsp[-2].minor.yy404 = yylhsminor.yy404; + case 502: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy874 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } + yymsp[0].minor.yy874 = yylhsminor.yy874; break; - case 506: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy148 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), releaseRawExprNode(pCxt, yymsp[-1].minor.yy148)); } + case 503: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } + yymsp[-2].minor.yy874 = yylhsminor.yy874; break; - case 509: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 507: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy74 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } + break; + case 510: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy148 = addOrderByClause(pCxt, yymsp[-3].minor.yy148, yymsp[-2].minor.yy404); - yylhsminor.yy148 = addSlimitClause(pCxt, yylhsminor.yy148, yymsp[-1].minor.yy148); - yylhsminor.yy148 = addLimitClause(pCxt, yylhsminor.yy148, yymsp[0].minor.yy148); + yylhsminor.yy74 = addOrderByClause(pCxt, yymsp[-3].minor.yy74, yymsp[-2].minor.yy874); + yylhsminor.yy74 = addSlimitClause(pCxt, yylhsminor.yy74, yymsp[-1].minor.yy74); + yylhsminor.yy74 = addLimitClause(pCxt, yylhsminor.yy74, yymsp[0].minor.yy74); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; - case 512: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy148 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy148, yymsp[0].minor.yy148); } - yymsp[-3].minor.yy148 = yylhsminor.yy148; + case 513: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy74 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy74, yymsp[0].minor.yy74); } + yymsp[-3].minor.yy74 = yylhsminor.yy74; break; - case 513: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy148 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy148, yymsp[0].minor.yy148); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + case 514: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy74 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy74, yymsp[0].minor.yy74); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 521: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 525: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==525); -{ yymsp[-1].minor.yy148 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 522: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 526: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==526); +{ yymsp[-1].minor.yy74 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 522: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 526: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==526); -{ yymsp[-3].minor.yy148 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 523: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 527: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==527); +{ yymsp[-3].minor.yy74 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 523: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 527: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==527); -{ yymsp[-3].minor.yy148 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 524: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 528: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==528); +{ yymsp[-3].minor.yy74 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 528: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy148); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + case 529: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy74); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 533: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy148 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), yymsp[-1].minor.yy898, yymsp[0].minor.yy499); } - yymsp[-2].minor.yy148 = yylhsminor.yy148; + case 534: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy74 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), yymsp[-1].minor.yy326, yymsp[0].minor.yy109); } + yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 534: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy898 = ORDER_ASC; } + case 535: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy326 = ORDER_ASC; } break; - case 535: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy898 = ORDER_ASC; } + case 536: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy326 = ORDER_ASC; } break; - case 536: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy898 = ORDER_DESC; } + case 537: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy326 = ORDER_DESC; } break; - case 537: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy499 = NULL_ORDER_DEFAULT; } + case 538: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy109 = NULL_ORDER_DEFAULT; } break; - case 538: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy499 = NULL_ORDER_FIRST; } + case 539: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy109 = NULL_ORDER_FIRST; } break; - case 539: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy499 = NULL_ORDER_LAST; } + case 540: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy109 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index b05c35452b..e8b18d4016 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -814,6 +814,35 @@ static int32_t createWindowLogicNodeByInterval(SLogicPlanContext* pCxt, SInterva return createWindowLogicNodeFinalize(pCxt, pSelect, pWindow, pLogicNode); } +static int32_t createWindowLogicNodeByEvent(SLogicPlanContext* pCxt, SEventWindowNode* pEvent, SSelectStmt* pSelect, + SLogicNode** pLogicNode) { + SWindowLogicNode* pWindow = (SWindowLogicNode*)nodesMakeNode(QUERY_NODE_LOGIC_PLAN_WINDOW); + if (NULL == pWindow) { + return TSDB_CODE_OUT_OF_MEMORY; + } + + pWindow->winType = WINDOW_TYPE_EVENT; + pWindow->node.groupAction = getGroupAction(pCxt, pSelect); + pWindow->node.requireDataOrder = + pCxt->pPlanCxt->streamQuery ? DATA_ORDER_LEVEL_IN_BLOCK : getRequireDataOrder(true, pSelect); + pWindow->node.resultDataOrder = + pCxt->pPlanCxt->streamQuery ? DATA_ORDER_LEVEL_GLOBAL : pWindow->node.requireDataOrder; + pWindow->pStartCond = nodesCloneNode(pEvent->pStartCond); + pWindow->pEndCond = nodesCloneNode(pEvent->pEndCond); + pWindow->pTspk = nodesCloneNode(pEvent->pCol); + if (NULL == pWindow->pStateExpr || NULL == pWindow->pTspk) { + nodesDestroyNode((SNode*)pWindow); + return TSDB_CODE_OUT_OF_MEMORY; + } + // rewrite the expression in subsequent clauses + int32_t code = rewriteExprForSelect(pWindow->pStateExpr, pSelect, SQL_CLAUSE_WINDOW); + if (TSDB_CODE_SUCCESS == code) { + code = createWindowLogicNodeFinalize(pCxt, pSelect, pWindow, pLogicNode); + } + + return code; +} + static int32_t createWindowLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect, SLogicNode** pLogicNode) { if (NULL == pSelect->pWindow) { return TSDB_CODE_SUCCESS; @@ -826,6 +855,8 @@ static int32_t createWindowLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSele return createWindowLogicNodeBySession(pCxt, (SSessionWindowNode*)pSelect->pWindow, pSelect, pLogicNode); case QUERY_NODE_INTERVAL_WINDOW: return createWindowLogicNodeByInterval(pCxt, (SIntervalWindowNode*)pSelect->pWindow, pSelect, pLogicNode); + case QUERY_NODE_EVENT_WINDOW: + return createWindowLogicNodeByEvent(pCxt, (SEventWindowNode*)pSelect->pWindow, pSelect, pLogicNode); default: break; } diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c index e5675310b5..78ae3c1c3b 100644 --- a/source/libs/planner/src/planPhysiCreater.c +++ b/source/libs/planner/src/planPhysiCreater.c @@ -1297,6 +1297,33 @@ static int32_t createStateWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pC return code; } +static int32_t createEventWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildren, + SWindowLogicNode* pWindowLogicNode, SPhysiNode** pPhyNode) { + SEventWinodwPhysiNode* pEvent = (SEventWinodwPhysiNode*)makePhysiNode( + pCxt, (SLogicNode*)pWindowLogicNode, + (pCxt->pPlanCxt->streamQuery ? QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT : QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT)); + if (NULL == pEvent) { + return TSDB_CODE_OUT_OF_MEMORY; + } + + SDataBlockDescNode* pChildTupe = (((SPhysiNode*)nodesListGetNode(pChildren, 0))->pOutputDataBlockDesc); + int32_t code = setNodeSlotId(pCxt, pChildTupe->dataBlockId, -1, pWindowLogicNode->pStartCond, &pEvent->pStartCond); + if (TSDB_CODE_SUCCESS == code) { + code = setNodeSlotId(pCxt, pChildTupe->dataBlockId, -1, pWindowLogicNode->pEndCond, &pEvent->pEndCond); + } + if (TSDB_CODE_SUCCESS == code) { + code = createWindowPhysiNodeFinalize(pCxt, pChildren, &pEvent->window, pWindowLogicNode); + } + + if (TSDB_CODE_SUCCESS == code) { + *pPhyNode = (SPhysiNode*)pEvent; + } else { + nodesDestroyNode((SNode*)pEvent); + } + + return code; +} + static int32_t createWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildren, SWindowLogicNode* pWindowLogicNode, SPhysiNode** pPhyNode) { switch (pWindowLogicNode->winType) { @@ -1306,6 +1333,8 @@ static int32_t createWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildr return createSessionWindowPhysiNode(pCxt, pChildren, pWindowLogicNode, pPhyNode); case WINDOW_TYPE_STATE: return createStateWindowPhysiNode(pCxt, pChildren, pWindowLogicNode, pPhyNode); + case WINDOW_TYPE_EVENT: + return createEventWindowPhysiNode(pCxt, pChildren, pWindowLogicNode, pPhyNode); default: break; } diff --git a/source/libs/planner/src/planSpliter.c b/source/libs/planner/src/planSpliter.c index f5782dc937..f6b1babf95 100644 --- a/source/libs/planner/src/planSpliter.c +++ b/source/libs/planner/src/planSpliter.c @@ -729,6 +729,18 @@ static int32_t stbSplSplitState(SSplitContext* pCxt, SStableSplitInfo* pInfo) { } } +static int32_t stbSplSplitEventForStream(SSplitContext* pCxt, SStableSplitInfo* pInfo) { + return TSDB_CODE_PLAN_INTERNAL_ERROR; +} + +static int32_t stbSplSplitEvent(SSplitContext* pCxt, SStableSplitInfo* pInfo) { + if (pCxt->pPlanCxt->streamQuery) { + return stbSplSplitEventForStream(pCxt, pInfo); + } else { + return stbSplSplitSessionOrStateForBatch(pCxt, pInfo); + } +} + static bool stbSplIsPartTableWinodw(SWindowLogicNode* pWindow) { return stbSplHasPartTbname(stbSplGetPartKeys((SLogicNode*)nodesListGetNode(pWindow->node.pChildren, 0))); } @@ -741,6 +753,8 @@ static int32_t stbSplSplitWindowForCrossTable(SSplitContext* pCxt, SStableSplitI return stbSplSplitSession(pCxt, pInfo); case WINDOW_TYPE_STATE: return stbSplSplitState(pCxt, pInfo); + case WINDOW_TYPE_EVENT: + return stbSplSplitEvent(pCxt, pInfo); default: break; } From 1138d8abb24368f618d20dcee8ce701b91f710d6 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 8 Dec 2022 10:33:26 +0800 Subject: [PATCH 04/97] enh: add table cached meta and vg new api --- include/libs/catalog/catalog.h | 2 ++ source/libs/catalog/src/catalog.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/include/libs/catalog/catalog.h b/include/libs/catalog/catalog.h index 6154882756..a95db86d3f 100644 --- a/include/libs/catalog/catalog.h +++ b/include/libs/catalog/catalog.h @@ -211,6 +211,8 @@ int32_t catalogGetCachedSTableMeta(SCatalog* pCtg, const SName* pTableName, STab int32_t catalogGetCachedTableHashVgroup(SCatalog* pCtg, const SName* pTableName, SVgroupInfo* pVgroup, bool* exists); +int32_t catalogGetCachedTableVgMeta(SCatalog* pCtg, const SName* pTableName, SVgroupInfo* pVgroup, STableMeta** pTableMeta); + /** * Force refresh DB's local cached vgroup info. * @param pCtg (input, got with catalogGetHandle) diff --git a/source/libs/catalog/src/catalog.c b/source/libs/catalog/src/catalog.c index 1b9bf7f99c..7e1269f0dc 100644 --- a/source/libs/catalog/src/catalog.c +++ b/source/libs/catalog/src/catalog.c @@ -1118,6 +1118,13 @@ int32_t catalogGetCachedTableHashVgroup(SCatalog* pCtg, const SName* pTableName, CTG_API_LEAVE(ctgGetTbHashVgroup(pCtg, NULL, pTableName, pVgroup, exists)); } +int32_t catalogGetCachedTableVgMeta(SCatalog* pCtg, const SName* pTableName, SVgroupInfo* pVgroup, STableMeta** pTableMeta) { + CTG_API_ENTER(); + + CTG_API_LEAVE(ctgGetTbHashVgroup(pCtg, NULL, pTableName, pVgroup, exists)); +} + + #if 0 int32_t catalogGetAllMeta(SCatalog* pCtg, SRequestConnInfo* pConn, const SCatalogReq* pReq, SMetaData* pRsp) { CTG_API_ENTER(); From 4aaa29bd4f5a17509e02895ff59d29b47da0a350 Mon Sep 17 00:00:00 2001 From: facetosea <25808407@qq.com> Date: Thu, 8 Dec 2022 10:50:35 +0800 Subject: [PATCH 05/97] fix:TD-20141 mac os type empty --- source/os/src/osSysinfo.c | 41 ++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/source/os/src/osSysinfo.c b/source/os/src/osSysinfo.c index 7ec1da0530..8b5e6c0e97 100644 --- a/source/os/src/osSysinfo.c +++ b/source/os/src/osSysinfo.c @@ -97,6 +97,7 @@ LONG WINAPI exceptionHandler(LPEXCEPTION_POINTERS exception); #include #include +#include #else @@ -275,34 +276,34 @@ int32_t taosGetEmail(char *email, int32_t maxLen) { #endif } + + int32_t taosGetOsReleaseName(char *releaseName, int32_t maxLen) { #ifdef WINDOWS snprintf(releaseName, maxLen, "Windows"); return 0; #elif defined(_TD_DARWIN_64) - char line[1024]; - size_t size = 0; - int32_t code = -1; + char osversion[32]; + size_t osversion_len = sizeof(osversion) - 1; + int osversion_name[] = { CTL_KERN, KERN_OSRELEASE }; - TdFilePtr pFile = taosOpenFile("/etc/os-release", TD_FILE_READ | TD_FILE_STREAM); - if (pFile == NULL) return false; - - while ((size = taosGetsFile(pFile, sizeof(line), line)) != -1) { - line[size - 1] = '\0'; - if (strncmp(line, "PRETTY_NAME", 11) == 0) { - const char *p = strchr(line, '=') + 1; - if (*p == '"') { - p++; - line[size - 2] = 0; - } - tstrncpy(releaseName, p, maxLen); - code = 0; - break; - } + if (sysctl(osversion_name, 2, osversion, &osversion_len, NULL, 0) == -1) { + return -1; } - taosCloseFile(&pFile); - return code; + uint32_t major, minor; + if (sscanf(osversion, "%u.%u", &major, &minor) != 2) { + return -1; + } + if (major >= 20) { + major -= 9; // macOS 11 and newer + sprintf(releaseName, "%u.%u", major, minor); + } else { + major -= 4; // macOS 10.1.1 and newer + sprintf(releaseName, "10.%d.%d", major, minor); + } + + return 0; #else char line[1024]; size_t size = 0; From fcfff59f86c4256065d2130be34bb85e18ce822f Mon Sep 17 00:00:00 2001 From: facetosea <25808407@qq.com> Date: Thu, 8 Dec 2022 11:13:57 +0800 Subject: [PATCH 06/97] fix:maxOS type --- source/os/src/osSysinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/os/src/osSysinfo.c b/source/os/src/osSysinfo.c index 8b5e6c0e97..5366c80405 100644 --- a/source/os/src/osSysinfo.c +++ b/source/os/src/osSysinfo.c @@ -297,10 +297,10 @@ int32_t taosGetOsReleaseName(char *releaseName, int32_t maxLen) { } if (major >= 20) { major -= 9; // macOS 11 and newer - sprintf(releaseName, "%u.%u", major, minor); + sprintf(releaseName, "macOS %u.%u", major, minor); } else { major -= 4; // macOS 10.1.1 and newer - sprintf(releaseName, "10.%d.%d", major, minor); + sprintf(releaseName, "macOS 10.%d.%d", major, minor); } return 0; From d5e3d750d1c4ce09294d31a42da1fd0107c2eb8b Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 8 Dec 2022 11:14:06 +0800 Subject: [PATCH 07/97] enh: merge getmetafromcache and getvgroupfromcache interface --- source/libs/parser/src/parInsertSql.c | 67 +++++++++++++++++++-------- 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index 59545d8fbc..13d040cb0c 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -563,7 +563,8 @@ static int32_t parseTagValue(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt static void buildCreateTbReq(SVnodeModifOpStmt* pStmt, STag* pTag, SArray* pTagName) { insBuildCreateTbReq(&pStmt->createTblReq, pStmt->targetTableName.tname, pTag, pStmt->pTableMeta->suid, - pStmt->usingTableName.tname, pTagName, pStmt->pTableMeta->tableInfo.numOfTags, TSDB_DEFAULT_TABLE_TTL); + pStmt->usingTableName.tname, pTagName, pStmt->pTableMeta->tableInfo.numOfTags, + TSDB_DEFAULT_TABLE_TTL); } static int32_t checkAndTrimValue(SToken* pToken, char* tmpTokenBuf, SMsgBuf* pMsgBuf) { @@ -829,6 +830,33 @@ static int32_t getTableVgroup(SParseContext* pCxt, SVnodeModifOpStmt* pStmt, boo return code; } +static int32_t getTableMetaAndVgroupImpl(SParseContext* pCxt, SVnodeModifOpStmt* pStmt, bool* pMissCache) { + SVgroupInfo vg; + bool exists = true; + int32_t code = catalogGetCachedTableHashVgroup(pCxt->pCatalog, &pStmt->targetTableName, &vg, &exists); + if (TSDB_CODE_SUCCESS == code) { + if (exists) { + code = taosHashPut(pStmt->pVgroupsHashObj, (const char*)&vg.vgId, sizeof(vg.vgId), (char*)&vg, sizeof(vg)); + } + *pMissCache = !exists; + } + return code; +} + +static int32_t getTableMetaAndVgroup(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, bool* pMissCache) { + SParseContext* pComCxt = pCxt->pComCxt; + int32_t code = TSDB_CODE_SUCCESS; + if (pComCxt->async) { + code = getTableMetaAndVgroupImpl(pComCxt->pCatalog, pStmt, pMissCache); + } else { + code = getTableMeta(pCxt, &pStmt->targetTableName, false, &pStmt->pTableMeta, pMissCache); + if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { + code = getTableVgroup(pCxt->pComCxt, pStmt, false, &pCxt->missCache); + } + } + return code; +} + static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { if (pCxt->forceUpdate) { pCxt->missCache = true; @@ -836,11 +864,14 @@ static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt } int32_t code = checkAuth(pCxt->pComCxt, &pStmt->targetTableName, &pCxt->missCache); + // if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { + // code = getTableMeta(pCxt, &pStmt->targetTableName, false, &pStmt->pTableMeta, &pCxt->missCache); + // } + // if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { + // code = getTableVgroup(pCxt->pComCxt, pStmt, false, &pCxt->missCache); + // } if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { - code = getTableMeta(pCxt, &pStmt->targetTableName, false, &pStmt->pTableMeta, &pCxt->missCache); - } - if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { - code = getTableVgroup(pCxt->pComCxt, pStmt, false, &pCxt->missCache); + code = getTableMetaAndVgroup(pCxt, pStmt, &pCxt->missCache); } return code; } @@ -933,11 +964,10 @@ static int32_t getTableDataBlocks(SInsertParseContext* pCxt, SVnodeModifOpStmt* if (pStmt->usingTableProcessing) { pStmt->pTableMeta->uid = 0; } - - return insGetDataBlockFromList(pStmt->pTableBlockHashObj, &uid, sizeof(pStmt->pTableMeta->uid), - TSDB_DEFAULT_PAYLOAD_SIZE, sizeof(SSubmitBlk), - getTableInfo(pStmt->pTableMeta).rowSize, pStmt->pTableMeta, pDataBuf, NULL, - &pStmt->createTblReq); + + return insGetDataBlockFromList( + pStmt->pTableBlockHashObj, &uid, sizeof(pStmt->pTableMeta->uid), TSDB_DEFAULT_PAYLOAD_SIZE, sizeof(SSubmitBlk), + getTableInfo(pStmt->pTableMeta).rowSize, pStmt->pTableMeta, pDataBuf, NULL, &pStmt->createTblReq); } char tbFName[TSDB_TABLE_FNAME_LEN]; tNameExtractFullName(&pStmt->targetTableName, tbFName); @@ -1540,8 +1570,9 @@ static int32_t setStmtInfo(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) memcpy(tags, &pCxt->tags, sizeof(pCxt->tags)); SStmtCallback* pStmtCb = pCxt->pComCxt->pStmtCb; - int32_t code = (*pStmtCb->setInfoFn)(pStmtCb->pStmt, pStmt->pTableMeta, tags, &pStmt->targetTableName, pStmt->usingTableProcessing, - pStmt->pVgroupsHashObj, pStmt->pTableBlockHashObj, pStmt->usingTableName.tname); + int32_t code = (*pStmtCb->setInfoFn)(pStmtCb->pStmt, pStmt->pTableMeta, tags, &pStmt->targetTableName, + pStmt->usingTableProcessing, pStmt->pVgroupsHashObj, pStmt->pTableBlockHashObj, + pStmt->usingTableName.tname); memset(&pCxt->tags, 0, sizeof(pCxt->tags)); pStmt->pVgroupsHashObj = NULL; @@ -1915,13 +1946,11 @@ static int32_t setNextStageInfo(SInsertParseContext* pCxt, SQuery* pQuery, SCata } int32_t parseInsertSql(SParseContext* pCxt, SQuery** pQuery, SCatalogReq* pCatalogReq, const SMetaData* pMetaData) { - SInsertParseContext context = { - .pComCxt = pCxt, - .msg = {.buf = pCxt->pMsg, .len = pCxt->msgLen}, - .missCache = false, - .usingDuplicateTable = false, - .forceUpdate = (NULL != pCatalogReq ? pCatalogReq->forceUpdate : false) - }; + SInsertParseContext context = {.pComCxt = pCxt, + .msg = {.buf = pCxt->pMsg, .len = pCxt->msgLen}, + .missCache = false, + .usingDuplicateTable = false, + .forceUpdate = (NULL != pCatalogReq ? pCatalogReq->forceUpdate : false)}; int32_t code = initInsertQuery(&context, pCatalogReq, pMetaData, pQuery); if (TSDB_CODE_SUCCESS == code) { From 89a6180a7cbab787696f435c8b6166498889384a Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 8 Dec 2022 13:18:11 +0800 Subject: [PATCH 08/97] enh: add retrieve cached table vgroup and meta api --- source/libs/catalog/inc/catalogInt.h | 3 + source/libs/catalog/src/catalog.c | 31 +++- source/libs/catalog/src/ctgCache.c | 214 +++++++++++++++++++-------- 3 files changed, 183 insertions(+), 65 deletions(-) diff --git a/source/libs/catalog/inc/catalogInt.h b/source/libs/catalog/inc/catalogInt.h index c435c46d46..0a43324a56 100644 --- a/source/libs/catalog/inc/catalogInt.h +++ b/source/libs/catalog/inc/catalogInt.h @@ -798,6 +798,9 @@ SName* ctgGetFetchName(SArray* pNames, SCtgFetch* pFetch); int32_t ctgdGetOneHandle(SCatalog **pHandle); int ctgVgInfoComp(const void* lp, const void* rp); int32_t ctgMakeVgArray(SDBVgInfo* dbInfo); +int32_t ctgAcquireVgMetaFromCache(SCatalog *pCtg, const char *dbFName, const char *tbName, SCtgDBCache **pDb, SCtgTbCache **pTb); +int32_t ctgCopyTbMeta(SCatalog *pCtg, SCtgTbMetaCtx *ctx, SCtgDBCache *dbCache, SCtgTbCache **pTb, STableMeta **pTableMeta, char* dbFName); +void ctgReleaseVgMetaToCache(SCatalog *pCtg, SCtgDBCache *dbCache, SCtgTbCache *pCache); extern SCatalogMgmt gCtgMgmt; extern SCtgDebug gCTGDebug; diff --git a/source/libs/catalog/src/catalog.c b/source/libs/catalog/src/catalog.c index 7e1269f0dc..23c39a7e3a 100644 --- a/source/libs/catalog/src/catalog.c +++ b/source/libs/catalog/src/catalog.c @@ -551,6 +551,35 @@ _return: CTG_RET(code); } +int32_t ctgGetCachedTbVgMeta(SCatalog* pCtg, const SName* pTableName, SVgroupInfo* pVgroup, STableMeta** pTableMeta) { + int32_t code = 0; + char db[TSDB_DB_FNAME_LEN] = {0}; + tNameGetFullDbName(pTableName, db); + SCtgDBCache *dbCache = NULL; + SCtgTbCache *tbCache = NULL; + + CTG_ERR_RET(ctgAcquireVgMetaFromCache(pCtg, db, pTableName->tname, &dbCache, &tbCache)); + + if (NULL == dbCache || NULL == tbCache) { + *pTableMeta = NULL; + return TSDB_CODE_SUCCESS; + } + + CTG_ERR_JRET(ctgGetVgInfoFromHashValue(pCtg, dbCache->vgCache.vgInfo, pTableName, pVgroup)); + + SCtgTbMetaCtx ctx = {0}; + ctx.pName = (SName*)pTableName; + ctx.flag = CTG_FLAG_UNKNOWN_STB; + CTG_ERR_JRET(ctgCopyTbMeta(pCtg, &ctx, dbCache, &tbCache, pTableMeta, db)); + +_return: + + ctgReleaseVgMetaToCache(pCtg, dbCache, tbCache); + + CTG_RET(code); +} + + int32_t ctgRemoveTbMeta(SCatalog* pCtg, SName* pTableName) { int32_t code = 0; @@ -1121,7 +1150,7 @@ int32_t catalogGetCachedTableHashVgroup(SCatalog* pCtg, const SName* pTableName, int32_t catalogGetCachedTableVgMeta(SCatalog* pCtg, const SName* pTableName, SVgroupInfo* pVgroup, STableMeta** pTableMeta) { CTG_API_ENTER(); - CTG_API_LEAVE(ctgGetTbHashVgroup(pCtg, NULL, pTableName, pVgroup, exists)); + CTG_API_LEAVE(ctgGetCachedTbVgMeta(pCtg, pTableName, pVgroup, pTableMeta)); } diff --git a/source/libs/catalog/src/ctgCache.c b/source/libs/catalog/src/ctgCache.c index f41058584f..4124202b03 100644 --- a/source/libs/catalog/src/ctgCache.c +++ b/source/libs/catalog/src/ctgCache.c @@ -151,6 +151,16 @@ void ctgReleaseTbIndexToCache(SCatalog *pCtg, SCtgDBCache *dbCache, SCtgTbCache } } +void ctgReleaseVgMetaToCache(SCatalog *pCtg, SCtgDBCache *dbCache, SCtgTbCache *pCache) { + if (pCache) { + CTG_UNLOCK(CTG_READ, &pCache->metaLock); + taosHashRelease(dbCache->tbCache, pCache); + } + + ctgRUnlockVgInfo(dbCache); + ctgReleaseDBCache(pCtg, dbCache); +} + int32_t ctgAcquireVgInfoFromCache(SCatalog *pCtg, const char *dbFName, SCtgDBCache **pCache) { SCtgDBCache *dbCache = NULL; ctgAcquireDBCache(pCtg, dbFName, &dbCache); @@ -226,6 +236,75 @@ _return: return TSDB_CODE_SUCCESS; } +int32_t ctgAcquireVgMetaFromCache(SCatalog *pCtg, const char *dbFName, const char *tbName, SCtgDBCache **pDb, SCtgTbCache **pTb) { + SCtgDBCache *dbCache = NULL; + SCtgTbCache *tbCache = NULL; + + ctgAcquireDBCache(pCtg, dbFName, &dbCache); + if (NULL == dbCache) { + ctgDebug("db %s not in cache", dbFName); + CTG_CACHE_STAT_INC(numOfVgMiss, 1); + goto _return; + } + + bool vgInCache = false; + ctgRLockVgInfo(pCtg, dbCache, &vgInCache); + if (!vgInCache) { + ctgDebug("vgInfo of db %s not in cache", dbFName); + CTG_CACHE_STAT_INC(numOfVgMiss, 1); + goto _return; + } + + *pDb = dbCache; + + CTG_CACHE_STAT_INC(numOfVgHit, 1); + + ctgDebug("Got db vgInfo from cache, dbFName:%s", dbFName); + + tbCache = taosHashAcquire(dbCache->tbCache, tbName, strlen(tbName)); + if (NULL == tbCache) { + ctgDebug("tb %s not in cache, dbFName:%s", tbName, dbFName); + CTG_CACHE_STAT_INC(numOfMetaMiss, 1); + goto _return; + } + + CTG_LOCK(CTG_READ, &tbCache->metaLock); + if (NULL == tbCache->pMeta) { + ctgDebug("tb %s meta not in cache, dbFName:%s", tbName, dbFName); + CTG_CACHE_STAT_INC(numOfMetaMiss, 1); + goto _return; + } + + *pTb = tbCache; + + ctgDebug("tb %s meta got in cache, dbFName:%s", tbName, dbFName); + + CTG_CACHE_STAT_INC(numOfMetaHit, 1); + + return TSDB_CODE_SUCCESS; + +_return: + + if (tbCache) { + CTG_UNLOCK(CTG_READ, &tbCache->metaLock); + taosHashRelease(dbCache->tbCache, tbCache); + } + + if (vgInCache) { + ctgRUnlockVgInfo(dbCache); + } + + if (dbCache) { + ctgReleaseDBCache(pCtg, dbCache); + } + + *pDb = NULL; + *pTb = NULL; + + return TSDB_CODE_SUCCESS; +} + + /* int32_t ctgAcquireStbMetaFromCache(SCatalog *pCtg, char *dbFName, uint64_t suid, SCtgDBCache **pDb, SCtgTbCache **pTb) { SCtgDBCache *dbCache = NULL; @@ -378,6 +457,76 @@ int32_t ctgTbMetaExistInCache(SCatalog *pCtg, char *dbFName, char *tbName, int32 return TSDB_CODE_SUCCESS; } +int32_t ctgCopyTbMeta(SCatalog *pCtg, SCtgTbMetaCtx *ctx, SCtgDBCache *dbCache, SCtgTbCache **pTb, STableMeta **pTableMeta, char* dbFName) { + SCtgTbCache *tbCache = *pTb; + STableMeta *tbMeta = tbCache->pMeta; + ctx->tbInfo.inCache = true; + ctx->tbInfo.dbId = dbCache->dbId; + ctx->tbInfo.suid = tbMeta->suid; + ctx->tbInfo.tbType = tbMeta->tableType; + + if (tbMeta->tableType != TSDB_CHILD_TABLE) { + int32_t metaSize = CTG_META_SIZE(tbMeta); + *pTableMeta = taosMemoryCalloc(1, metaSize); + if (NULL == *pTableMeta) { + CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + } + + memcpy(*pTableMeta, tbMeta, metaSize); + + ctgDebug("Got tb %s meta from cache, type:%d, dbFName:%s", ctx->pName->tname, tbMeta->tableType, dbFName); + return TSDB_CODE_SUCCESS; + } + + // PROCESS FOR CHILD TABLE + + int32_t metaSize = sizeof(SCTableMeta); + *pTableMeta = taosMemoryCalloc(1, metaSize); + if (NULL == *pTableMeta) { + CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + } + + memcpy(*pTableMeta, tbMeta, metaSize); + + //ctgReleaseTbMetaToCache(pCtg, dbCache, tbCache); + + if (tbCache) { + CTG_UNLOCK(CTG_READ, &tbCache->metaLock); + taosHashRelease(dbCache->tbCache, tbCache); + *pTb = NULL; + } + + ctgDebug("Got ctb %s meta from cache, will continue to get its stb meta, type:%d, dbFName:%s", ctx->pName->tname, + ctx->tbInfo.tbType, dbFName); + + ctgAcquireStbMetaFromCache(dbCache, pCtg, dbFName, ctx->tbInfo.suid, &tbCache); + if (NULL == tbCache) { + taosMemoryFreeClear(*pTableMeta); + ctgDebug("stb 0x%" PRIx64 " meta not in cache", ctx->tbInfo.suid); + return TSDB_CODE_SUCCESS; + } + + *pTb = tbCache; + + STableMeta *stbMeta = tbCache->pMeta; + if (stbMeta->suid != ctx->tbInfo.suid) { + ctgError("stb suid 0x%" PRIx64 " in stbCache mis-match, expected suid 0x%" PRIx64, stbMeta->suid, ctx->tbInfo.suid); + taosMemoryFreeClear(*pTableMeta); + CTG_ERR_RET(TSDB_CODE_CTG_INTERNAL_ERROR); + } + + metaSize = CTG_META_SIZE(stbMeta); + *pTableMeta = taosMemoryRealloc(*pTableMeta, metaSize); + if (NULL == *pTableMeta) { + CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + } + + memcpy(&(*pTableMeta)->sversion, &stbMeta->sversion, metaSize - sizeof(SCTableMeta)); + + return TSDB_CODE_SUCCESS; +} + + int32_t ctgReadTbMetaFromCache(SCatalog *pCtg, SCtgTbMetaCtx *ctx, STableMeta **pTableMeta) { int32_t code = 0; SCtgDBCache *dbCache = NULL; @@ -397,70 +546,7 @@ int32_t ctgReadTbMetaFromCache(SCatalog *pCtg, SCtgTbMetaCtx *ctx, STableMeta ** return TSDB_CODE_SUCCESS; } - STableMeta *tbMeta = tbCache->pMeta; - ctx->tbInfo.inCache = true; - ctx->tbInfo.dbId = dbCache->dbId; - ctx->tbInfo.suid = tbMeta->suid; - ctx->tbInfo.tbType = tbMeta->tableType; - - if (tbMeta->tableType != TSDB_CHILD_TABLE) { - int32_t metaSize = CTG_META_SIZE(tbMeta); - *pTableMeta = taosMemoryCalloc(1, metaSize); - if (NULL == *pTableMeta) { - ctgReleaseTbMetaToCache(pCtg, dbCache, tbCache); - CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); - } - - memcpy(*pTableMeta, tbMeta, metaSize); - - ctgReleaseTbMetaToCache(pCtg, dbCache, tbCache); - ctgDebug("Got tb %s meta from cache, type:%d, dbFName:%s", ctx->pName->tname, tbMeta->tableType, dbFName); - return TSDB_CODE_SUCCESS; - } - - // PROCESS FOR CHILD TABLE - - int32_t metaSize = sizeof(SCTableMeta); - *pTableMeta = taosMemoryCalloc(1, metaSize); - if (NULL == *pTableMeta) { - CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); - } - - memcpy(*pTableMeta, tbMeta, metaSize); - - //ctgReleaseTbMetaToCache(pCtg, dbCache, tbCache); - - if (tbCache) { - CTG_UNLOCK(CTG_READ, &tbCache->metaLock); - taosHashRelease(dbCache->tbCache, tbCache); - } - - ctgDebug("Got ctb %s meta from cache, will continue to get its stb meta, type:%d, dbFName:%s", ctx->pName->tname, - ctx->tbInfo.tbType, dbFName); - - ctgAcquireStbMetaFromCache(dbCache, pCtg, dbFName, ctx->tbInfo.suid, &tbCache); - if (NULL == tbCache) { - //ctgReleaseTbMetaToCache(pCtg, dbCache, tbCache); - taosMemoryFreeClear(*pTableMeta); - ctgDebug("stb 0x%" PRIx64 " meta not in cache", ctx->tbInfo.suid); - return TSDB_CODE_SUCCESS; - } - - STableMeta *stbMeta = tbCache->pMeta; - if (stbMeta->suid != ctx->tbInfo.suid) { - ctgReleaseTbMetaToCache(pCtg, dbCache, tbCache); - ctgError("stb suid 0x%" PRIx64 " in stbCache mis-match, expected suid 0x%" PRIx64, stbMeta->suid, ctx->tbInfo.suid); - CTG_ERR_JRET(TSDB_CODE_CTG_INTERNAL_ERROR); - } - - metaSize = CTG_META_SIZE(stbMeta); - *pTableMeta = taosMemoryRealloc(*pTableMeta, metaSize); - if (NULL == *pTableMeta) { - ctgReleaseTbMetaToCache(pCtg, dbCache, tbCache); - CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); - } - - memcpy(&(*pTableMeta)->sversion, &stbMeta->sversion, metaSize - sizeof(SCTableMeta)); + CTG_ERR_JRET(ctgCopyTbMeta(pCtg, ctx, dbCache, &tbCache, pTableMeta, dbFName)); ctgReleaseTbMetaToCache(pCtg, dbCache, tbCache); From 509ba087d2a2d807a16965d64ee544c00a56ecb0 Mon Sep 17 00:00:00 2001 From: xsren <285808407@qq.com> Date: Thu, 8 Dec 2022 13:51:31 +0800 Subject: [PATCH 09/97] fix:taos.dll export taosDatatype --- include/client/taos.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/client/taos.h b/include/client/taos.h index 69774b750f..379363c51d 100644 --- a/include/client/taos.h +++ b/include/client/taos.h @@ -149,7 +149,7 @@ DLL_EXPORT TAOS *taos_connect(const char *ip, const char *user, const char DLL_EXPORT TAOS *taos_connect_auth(const char *ip, const char *user, const char *auth, const char *db, uint16_t port); DLL_EXPORT void taos_close(TAOS *taos); -const char *taos_data_type(int type); +DLL_EXPORT const char *taos_data_type(int type); DLL_EXPORT TAOS_STMT *taos_stmt_init(TAOS *taos); DLL_EXPORT TAOS_STMT *taos_stmt_init_with_reqid(TAOS *taos, int64_t reqid); From 39d35538a3f9456d1a53a2151dc4c0d6791fe882 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 8 Dec 2022 13:53:16 +0800 Subject: [PATCH 10/97] fix: fix compile error --- source/libs/parser/src/parInsertSql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index 13d040cb0c..6f6c28e8b4 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -847,7 +847,7 @@ static int32_t getTableMetaAndVgroup(SInsertParseContext* pCxt, SVnodeModifOpStm SParseContext* pComCxt = pCxt->pComCxt; int32_t code = TSDB_CODE_SUCCESS; if (pComCxt->async) { - code = getTableMetaAndVgroupImpl(pComCxt->pCatalog, pStmt, pMissCache); + code = getTableMetaAndVgroupImpl(pComCxt, pStmt, pMissCache); } else { code = getTableMeta(pCxt, &pStmt->targetTableName, false, &pStmt->pTableMeta, pMissCache); if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { From da31f5e588f5e9202ceec97b4fec3a94b2090c2c Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Thu, 8 Dec 2022 13:54:41 +0800 Subject: [PATCH 11/97] fix: dismiss coverity issues --- source/dnode/vnode/src/meta/metaTable.c | 4 ++-- source/libs/tdb/inc/tdb.h | 2 ++ source/libs/tdb/src/db/tdbBtree.c | 4 ++++ source/libs/tdb/src/db/tdbPager.c | 9 ++++----- source/libs/tdb/src/db/tdbTxn.c | 5 +++++ 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/source/dnode/vnode/src/meta/metaTable.c b/source/dnode/vnode/src/meta/metaTable.c index 632675ee1d..722a93137c 100644 --- a/source/dnode/vnode/src/meta/metaTable.c +++ b/source/dnode/vnode/src/meta/metaTable.c @@ -549,8 +549,8 @@ int metaTtlDropTable(SMeta *pMeta, int64_t ttl, SArray *tbUids) { } static void metaBuildTtlIdxKey(STtlIdxKey *ttlKey, const SMetaEntry *pME) { - int64_t ttlDays; - int64_t ctime; + int64_t ttlDays = 0; + int64_t ctime = 0; if (pME->type == TSDB_CHILD_TABLE) { ctime = pME->ctbEntry.ctime; ttlDays = pME->ctbEntry.ttlDays; diff --git a/source/libs/tdb/inc/tdb.h b/source/libs/tdb/inc/tdb.h index c728e29641..10a99bb1fa 100644 --- a/source/libs/tdb/inc/tdb.h +++ b/source/libs/tdb/inc/tdb.h @@ -81,6 +81,8 @@ void tdbFree(void *); typedef struct hashset_st *hashset_t; +void hashset_destroy(hashset_t set); + struct STxn { int flags; int64_t txnId; diff --git a/source/libs/tdb/src/db/tdbBtree.c b/source/libs/tdb/src/db/tdbBtree.c index 8c62f89b64..5c1f264460 100644 --- a/source/libs/tdb/src/db/tdbBtree.c +++ b/source/libs/tdb/src/db/tdbBtree.c @@ -110,6 +110,7 @@ int tdbBtreeOpen(int keyLen, int valLen, SPager *pPager, char const *tbname, SPg ret = tdbBegin(pEnv, &txn, tdbDefaultMalloc, tdbDefaultFree, NULL, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); if (ret < 0) { + tdbOsFree(pBt); return -1; } @@ -119,6 +120,7 @@ int tdbBtreeOpen(int keyLen, int valLen, SPager *pPager, char const *tbname, SPg ret = tdbPagerFetchPage(pPager, &pgno, &pPage, tdbBtreeInitPage, &zArg, txn); if (ret < 0) { tdbAbort(pEnv, txn); + tdbOsFree(pBt); return -1; } @@ -126,6 +128,7 @@ int tdbBtreeOpen(int keyLen, int valLen, SPager *pPager, char const *tbname, SPg if (ret < 0) { tdbError("failed to write page since %s", terrstr()); tdbAbort(pEnv, txn); + tdbOsFree(pBt); return -1; } @@ -138,6 +141,7 @@ int tdbBtreeOpen(int keyLen, int valLen, SPager *pPager, char const *tbname, SPg ret = tdbTbInsert(pPager->pEnv->pMainDb, tbname, strlen(tbname) + 1, &pBt->info, sizeof(pBt->info), txn); if (ret < 0) { tdbAbort(pEnv, txn); + tdbOsFree(pBt); return -1; } } diff --git a/source/libs/tdb/src/db/tdbPager.c b/source/libs/tdb/src/db/tdbPager.c index f638ec25a3..e3d886b046 100644 --- a/source/libs/tdb/src/db/tdbPager.c +++ b/source/libs/tdb/src/db/tdbPager.c @@ -379,9 +379,6 @@ int tdbPagerPostCommit(SPager *pPager, TXN *pTxn) { return -1; } - if (pTxn->jPageSet) { - hashset_destroy(pTxn->jPageSet); - } // pPager->inTran = 0; return 0; @@ -549,8 +546,6 @@ int tdbPagerAbort(SPager *pPager, TXN *pTxn) { return -1; } - hashset_destroy(pTxn->jPageSet); - // pPager->inTran = 0; return 0; @@ -922,6 +917,8 @@ int tdbPagerRestoreJournals(SPager *pPager, SBTree *pBt) { char *name = tdbDirEntryBaseName(tdbGetDirEntryName(pDirEntry)); if (strncmp(TDB_MAINDB_NAME "-journal", name, 16) == 0) { if (tdbPagerRestore(pPager, pBt, name) < 0) { + tdbCloseDir(&pDir); + tdbError("failed to restore file due to %s. jFileName:%s", strerror(errno), name); return -1; } @@ -946,6 +943,8 @@ int tdbPagerRollback(SPager *pPager) { if (strncmp(TDB_MAINDB_NAME "-journal", name, 16) == 0) { if (tdbOsRemove(name) < 0 && errno != ENOENT) { + tdbCloseDir(&pDir); + tdbError("failed to remove file due to %s. jFileName:%s", strerror(errno), name); terrno = TAOS_SYSTEM_ERROR(errno); return -1; diff --git a/source/libs/tdb/src/db/tdbTxn.c b/source/libs/tdb/src/db/tdbTxn.c index 77c87d18f2..055d9c7f98 100644 --- a/source/libs/tdb/src/db/tdbTxn.c +++ b/source/libs/tdb/src/db/tdbTxn.c @@ -30,6 +30,11 @@ int tdbTxnOpen(TXN *pTxn, int64_t txnid, void *(*xMalloc)(void *, size_t), void int tdbTxnClose(TXN *pTxn) { if (pTxn) { + if (pTxn->jPageSet) { + hashset_destroy(pTxn->jPageSet); + pTxn->jPageSet = NULL; + } + tdbOsFree(pTxn); } From abd5c696f0465e087023875e5c30b795f96c4b55 Mon Sep 17 00:00:00 2001 From: Minghao Li Date: Thu, 8 Dec 2022 15:21:41 +0800 Subject: [PATCH 12/97] fix(sync): checkout NULL pointer --- source/libs/sync/src/syncMain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 2aaa13f95d..157829986e 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -1640,7 +1640,8 @@ void syncNodeBecomeLeader(SSyncNode* pSyncNode, const char* debugStr) { #endif // close receiver - if (snapshotReceiverIsStart(pSyncNode->pNewNodeReceiver)) { + if (pSyncNode != NULL && pSyncNode->pNewNodeReceiver != NULL && + snapshotReceiverIsStart(pSyncNode->pNewNodeReceiver)) { snapshotReceiverForceStop(pSyncNode->pNewNodeReceiver); } From 44b2cd1b7391dddde3fc9cfade17ff395d4cd237 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 8 Dec 2022 15:24:34 +0800 Subject: [PATCH 13/97] enh: merge getmetafromcache and getvgroupfromcache interface --- source/libs/parser/src/parInsertSql.c | 76 +++++++++++++++++++-------- 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index 6f6c28e8b4..60c7e0a8e9 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -832,13 +832,12 @@ static int32_t getTableVgroup(SParseContext* pCxt, SVnodeModifOpStmt* pStmt, boo static int32_t getTableMetaAndVgroupImpl(SParseContext* pCxt, SVnodeModifOpStmt* pStmt, bool* pMissCache) { SVgroupInfo vg; - bool exists = true; - int32_t code = catalogGetCachedTableHashVgroup(pCxt->pCatalog, &pStmt->targetTableName, &vg, &exists); + int32_t code = catalogGetCachedTableVgMeta(pCxt->pCatalog, &pStmt->targetTableName, &vg, &pStmt->pTableMeta); if (TSDB_CODE_SUCCESS == code) { - if (exists) { + if (NULL != pStmt->pTableMeta) { code = taosHashPut(pStmt->pVgroupsHashObj, (const char*)&vg.vgId, sizeof(vg.vgId), (char*)&vg, sizeof(vg)); } - *pMissCache = !exists; + *pMissCache = (NULL == pStmt->pTableMeta); } return code; } @@ -857,6 +856,18 @@ static int32_t getTableMetaAndVgroup(SInsertParseContext* pCxt, SVnodeModifOpStm return code; } +static int32_t collectUseTable(const SName* pName, SHashObj* pTable) { + char fullName[TSDB_TABLE_FNAME_LEN]; + tNameExtractFullName(pName, fullName); + return taosHashPut(pTable, fullName, strlen(fullName), pName, sizeof(SName)); +} + +static int32_t collectUseDatabase(const SName* pName, SHashObj* pDbs) { + char dbFName[TSDB_DB_FNAME_LEN] = {0}; + tNameGetFullDbName(pName, dbFName); + return taosHashPut(pDbs, dbFName, strlen(dbFName), dbFName, sizeof(dbFName)); +} + static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { if (pCxt->forceUpdate) { pCxt->missCache = true; @@ -864,15 +875,24 @@ static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt } int32_t code = checkAuth(pCxt->pComCxt, &pStmt->targetTableName, &pCxt->missCache); - // if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { - // code = getTableMeta(pCxt, &pStmt->targetTableName, false, &pStmt->pTableMeta, &pCxt->missCache); - // } - // if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { - // code = getTableVgroup(pCxt->pComCxt, pStmt, false, &pCxt->missCache); - // } +#if 0 + if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { + code = getTableMeta(pCxt, &pStmt->targetTableName, false, &pStmt->pTableMeta, &pCxt->missCache); + } + if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { + code = getTableVgroup(pCxt->pComCxt, pStmt, false, &pCxt->missCache); + } +#else if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { code = getTableMetaAndVgroup(pCxt, pStmt, &pCxt->missCache); } +#endif + if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { + code = collectUseDatabase(&pStmt->targetTableName, pStmt->pDbFNameHashObj); + } + if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { + code = collectUseTable(&pStmt->targetTableName, pStmt->pTableNameHashObj); + } return code; } @@ -1807,16 +1827,25 @@ static int32_t initInsertQuery(SInsertParseContext* pCxt, SCatalogReq* pCatalogR static int32_t setRefreshMate(SQuery* pQuery) { SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pQuery->pRoot; - SName* pTable = taosHashIterate(pStmt->pTableNameHashObj, NULL); - while (NULL != pTable) { - taosArrayPush(pQuery->pTableList, pTable); - pTable = taosHashIterate(pStmt->pTableNameHashObj, pTable); + + if (taosHashGetSize(pStmt->pTableNameHashObj) > 0) { + taosArrayDestroy(pQuery->pTableList); + pQuery->pTableList = taosArrayInit(taosHashGetSize(pStmt->pTableNameHashObj), sizeof(SName)); + SName* pTable = taosHashIterate(pStmt->pTableNameHashObj, NULL); + while (NULL != pTable) { + taosArrayPush(pQuery->pTableList, pTable); + pTable = taosHashIterate(pStmt->pTableNameHashObj, pTable); + } } - char* pDb = taosHashIterate(pStmt->pDbFNameHashObj, NULL); - while (NULL != pDb) { - taosArrayPush(pQuery->pDbList, pDb); - pDb = taosHashIterate(pStmt->pDbFNameHashObj, pDb); + if (taosHashGetSize(pStmt->pDbFNameHashObj) > 0) { + taosArrayDestroy(pQuery->pDbList); + pQuery->pDbList = taosArrayInit(taosHashGetSize(pStmt->pDbFNameHashObj), TSDB_DB_FNAME_LEN); + char* pDb = taosHashIterate(pStmt->pDbFNameHashObj, NULL); + while (NULL != pDb) { + taosArrayPush(pQuery->pDbList, pDb); + pDb = taosHashIterate(pStmt->pDbFNameHashObj, pDb); + } } return TSDB_CODE_SUCCESS; @@ -1930,16 +1959,17 @@ static int32_t buildInsertCatalogReq(SInsertParseContext* pCxt, SVnodeModifOpStm } static int32_t setNextStageInfo(SInsertParseContext* pCxt, SQuery* pQuery, SCatalogReq* pCatalogReq) { + SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pQuery->pRoot; if (pCxt->missCache) { - parserDebug("0x%" PRIx64 " %d rows have been inserted before cache miss", pCxt->pComCxt->requestId, - ((SVnodeModifOpStmt*)pQuery->pRoot)->totalRowsNum); + parserDebug("0x%" PRIx64 " %d rows of %d tables have been inserted before cache miss", pCxt->pComCxt->requestId, + pStmt->totalRowsNum, pStmt->totalTbNum); pQuery->execStage = QUERY_EXEC_STAGE_PARSE; - return buildInsertCatalogReq(pCxt, (SVnodeModifOpStmt*)pQuery->pRoot, pCatalogReq); + return buildInsertCatalogReq(pCxt, pStmt, pCatalogReq); } - parserDebug("0x%" PRIx64 " %d rows have been inserted", pCxt->pComCxt->requestId, - ((SVnodeModifOpStmt*)pQuery->pRoot)->totalRowsNum); + parserDebug("0x%" PRIx64 " %d rows of %d tables have been inserted", pCxt->pComCxt->requestId, pStmt->totalRowsNum, + pStmt->totalTbNum); pQuery->execStage = QUERY_EXEC_STAGE_SCHEDULE; return TSDB_CODE_SUCCESS; From b2b1eb748ac9358a4cf2531b657eee280a85081e Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 8 Dec 2022 15:31:20 +0800 Subject: [PATCH 14/97] update epset --- source/libs/transport/src/transCli.c | 29 ++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 50594f1a5a..6d6a6b6625 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1493,18 +1493,35 @@ FORCE_INLINE bool cliTryExtractEpSet(STransMsg* pResp, SEpSet* dst) { bool cliResetEpset(STransConnCtx* pCtx, STransMsg* pResp, bool hasEpSet) { bool noDelay = true; if (hasEpSet == false) { - // assert(pResp->contLen == 0); if (pResp->contLen == 0) { if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) { noDelay = false; } else { EPSET_FORWARD_INUSE(&pCtx->epSet); } - } else { - if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) { - noDelay = false; + } else if (pResp->contLen != 0) { + SEpSet epSet; + int32_t valid = tDeserializeSEpSet(pResp->pCont, pResp->contLen, &epSet); + if (valid < 0) { + tDebug("get invalid epset, epset equal, continue"); + if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) { + noDelay = false; + } else { + EPSET_FORWARD_INUSE(&pCtx->epSet); + } } else { - EPSET_FORWARD_INUSE(&pCtx->epSet); + if (!transEpSetIsEqual(&pCtx->epSet, &epSet)) { + tDebug("epset not equal, retry new epset"); + pCtx->epSet = epSet; + noDelay = false; + } else { + if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) { + noDelay = false; + } else { + tDebug("epset equal, continue"); + EPSET_FORWARD_INUSE(&pCtx->epSet); + } + } } } } else { @@ -1584,7 +1601,7 @@ bool cliGenRetryRule(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { addConnToPool(pThrd->pool, pConn); } else if (code == TSDB_CODE_SYN_RESTORING) { tTrace("code str %s, contlen:%d 0", tstrerror(code), pResp->contLen); - noDelay = cliResetEpset(pCtx, pResp, false); + noDelay = cliResetEpset(pCtx, pResp, true); addConnToPool(pThrd->pool, pConn); transFreeMsg(pResp->pCont); } else { From 6c9d6e2aa8d1ef6d64c001743085c4fdb7575b1d Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Wed, 7 Dec 2022 13:46:41 +0800 Subject: [PATCH 15/97] fix:read the deleted data --- source/dnode/vnode/src/tsdb/tsdbRead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index 3ec4f63c30..58fa24ad41 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -3129,7 +3129,7 @@ bool hasBeenDropped(const SArray* pDelList, int32_t* index, TSDBKEY* pKey, int32 return false; } else if (pKey->ts == last->ts) { TSDBKEY* prev = taosArrayGet(pDelList, num - 2); - return (prev->version >= pKey->version); + return (prev->version >= pKey->version && prev->version <= pVerRange->maxVer && prev->version >= pVerRange->minVer); } } else { TSDBKEY* pCurrent = taosArrayGet(pDelList, *index); From a70cb83c6517bec2718415c0b6ef09204ae9fd70 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 8 Dec 2022 15:48:16 +0800 Subject: [PATCH 16/97] fix: taosbenchmark fully use rest interface --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 4abd9e86a6..5ca2cacf57 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG ac69142 + GIT_TAG c86dda8 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From d19ffd8fca04f659aa3730f57516c143a3850b67 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 8 Dec 2022 16:05:38 +0800 Subject: [PATCH 17/97] fix: update taos-tools 7bb2495 --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 5ca2cacf57..1d96e69d53 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG c86dda8 + GIT_TAG 7bb2495 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From 23a3a69ddd26a092b30cef30e5bc0b9bb085e64d Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 8 Dec 2022 16:19:48 +0800 Subject: [PATCH 18/97] enh: merge getmetafromcache and getvgroupfromcache interface --- source/client/src/clientMain.c | 14 ++++++++++++-- source/libs/parser/src/parInsertSql.c | 14 ++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index f2dec7217f..5a0ab533d8 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -21,12 +21,12 @@ #include "os.h" #include "query.h" #include "scheduler.h" +#include "tdatablock.h" #include "tglobal.h" #include "tmsg.h" #include "tref.h" #include "trpc.h" #include "version.h" -#include "tdatablock.h" #define TSC_VAR_NOT_RELEASE 1 #define TSC_VAR_RELEASED 0 @@ -796,7 +796,8 @@ static void doAsyncQueryFromParse(SMetaData *pResultMeta, void *param, int32_t c SQuery *pQuery = pRequest->pQuery; pRequest->metric.ctgEnd = taosGetTimestampUs(); - qDebug("0x%" PRIx64 " start to continue parse, reqId:0x%" PRIx64 ", code:%s", pRequest->self, pRequest->requestId, tstrerror(code)); + qDebug("0x%" PRIx64 " start to continue parse, reqId:0x%" PRIx64 ", code:%s", pRequest->self, pRequest->requestId, + tstrerror(code)); if (code == TSDB_CODE_SUCCESS) { pWrapper->pCatalogReq->forceUpdate = false; @@ -930,6 +931,15 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) { tscError("0x%" PRIx64 " error happens, code:%d - %s, reqId:0x%" PRIx64, pRequest->self, code, tstrerror(code), pRequest->requestId); destorySqlCallbackWrapper(pWrapper); + + if (NEED_CLIENT_HANDLE_ERROR(code)) { + tscDebug("0x%" PRIx64 " client retry to handle the error, code:%d - %s, tryCount:%d, reqId:0x%" PRIx64, + pRequest->self, code, tstrerror(code), pRequest->retry, pRequest->requestId); + pRequest->prevCode = code; + doAsyncQuery(pRequest, true); + return; + } + terrno = code; pRequest->code = code; pRequest->body.queryFp(pRequest->body.param, pRequest, code); diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index 60c7e0a8e9..36420599b3 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -887,11 +887,11 @@ static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt code = getTableMetaAndVgroup(pCxt, pStmt, &pCxt->missCache); } #endif - if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { + if (TSDB_CODE_SUCCESS == code && !pCxt->pComCxt->async) { code = collectUseDatabase(&pStmt->targetTableName, pStmt->pDbFNameHashObj); - } - if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { - code = collectUseTable(&pStmt->targetTableName, pStmt->pTableNameHashObj); + if (TSDB_CODE_SUCCESS == code) { + code = collectUseTable(&pStmt->targetTableName, pStmt->pTableNameHashObj); + } } return code; } @@ -913,6 +913,12 @@ static int32_t getUsingTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt* if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { code = getTableVgroup(pCxt->pComCxt, pStmt, true, &pCxt->missCache); } + if (TSDB_CODE_SUCCESS == code && !pCxt->pComCxt->async) { + code = collectUseDatabase(&pStmt->usingTableName, pStmt->pDbFNameHashObj); + if (TSDB_CODE_SUCCESS == code) { + code = collectUseTable(&pStmt->usingTableName, pStmt->pTableNameHashObj); + } + } return code; } From 7e23e0b750e24c603eccb05f83cd0f8e0c8702ac Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 8 Dec 2022 16:31:39 +0800 Subject: [PATCH 19/97] fix: update taos-tools 3bb9bf9 --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 1d96e69d53..22fbdc35e8 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 7bb2495 + GIT_TAG 3bb9bf9 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From 46889e2dc10d53cf9f912d6dbb094eedbf576f22 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 8 Dec 2022 17:14:06 +0800 Subject: [PATCH 20/97] fix: avoid sync restore repeat called --- source/dnode/mnode/impl/src/mndSync.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndSync.c b/source/dnode/mnode/impl/src/mndSync.c index 7cba69ed50..4966fb7749 100644 --- a/source/dnode/mnode/impl/src/mndSync.c +++ b/source/dnode/mnode/impl/src/mndSync.c @@ -149,9 +149,13 @@ void mndRestoreFinish(const SSyncFSM *pFsm) { SMnode *pMnode = pFsm->data; if (!pMnode->deploy) { - mInfo("vgId:1, sync restore finished, and will handle outstanding transactions"); - mndTransPullup(pMnode); - mndSetRestored(pMnode, true); + if (pMnode->restored) { + mInfo("vgId:1, sync restore finished, and will handle outstanding transactions"); + mndTransPullup(pMnode); + mndSetRestored(pMnode, true); + } else { + mInfo("vgId:1, sync restore finished, repeat call"); + } } else { mInfo("vgId:1, sync restore finished"); } From 328b3e03e9c10cd352e5992eb5b7448b2eda0c9b Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 8 Dec 2022 17:15:10 +0800 Subject: [PATCH 21/97] fix: force update retry issue --- source/client/src/clientMain.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 5a0ab533d8..7fdb735a07 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -800,7 +800,7 @@ static void doAsyncQueryFromParse(SMetaData *pResultMeta, void *param, int32_t c tstrerror(code)); if (code == TSDB_CODE_SUCCESS) { - pWrapper->pCatalogReq->forceUpdate = false; + //pWrapper->pCatalogReq->forceUpdate = false; code = qContinueParseSql(pWrapper->pParseCtx, pWrapper->pCatalogReq, pResultMeta, pQuery); } @@ -881,6 +881,9 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) { if (pRequest->retry++ > REQUEST_TOTAL_EXEC_TIMES) { code = pRequest->prevCode; + terrno = code; + pRequest->body.queryFp(pRequest->body.param, pRequest, code); + return; } if (TSDB_CODE_SUCCESS == code) { From c0c98320f323b0c186e0cd3ea4ed50464f16b0f1 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Thu, 8 Dec 2022 17:14:17 +0800 Subject: [PATCH 22/97] enh: check topic privilege --- source/dnode/mnode/impl/src/mndConsumer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 76bff9a70f..373a653b51 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -555,6 +555,12 @@ static int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { } if (mndCheckDbPrivilegeByName(pMnode, pMsg->info.conn.user, MND_OPER_READ_DB, pTopic->db) != 0) { + mndReleaseTopic(pMnode, pTopic); + goto SUBSCRIBE_OVER; + } + + if (mndCheckTopicPrivilege(pMnode, pMsg->info.conn.user, MND_OPER_SUBSCRIBE, pTopic) != 0) { + mndReleaseTopic(pMnode, pTopic); goto SUBSCRIBE_OVER; } From 60d6a21a199c12173c2ad595e91d37702ef722bf Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 8 Dec 2022 17:30:00 +0800 Subject: [PATCH 23/97] fix: update taos-tools c86dda8 --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 22fbdc35e8..5ca2cacf57 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 3bb9bf9 + GIT_TAG c86dda8 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From a202b298534f61f4b29d2a9c93db17d9cb280a00 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 8 Dec 2022 17:37:35 +0800 Subject: [PATCH 24/97] fix: compile warn --- source/os/src/osDir.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/os/src/osDir.c b/source/os/src/osDir.c index 9175067568..331d241745 100644 --- a/source/os/src/osDir.c +++ b/source/os/src/osDir.c @@ -394,8 +394,8 @@ char *taosDirEntryBaseName(char *name) { char *pPoint = strrchr(name, '/'); if (pPoint != NULL) { if (*(pPoint + 1) == '\0') { - *pPoint = '\0'; - return taosDirEntryBaseName(name); + *pPoint = '\0'; + return taosDirEntryBaseName(name); } return pPoint + 1; } @@ -500,8 +500,9 @@ int32_t taosCloseDir(TdDirPtr *ppDir) { void taosGetCwd(char *buf, int32_t len) { #if !defined(WINDOWS) - (void)getcwd(buf, len - 1); + char *unused __attribute__((unused)); + unused = getcwd(buf, len - 1); #else - strncpy(buf, "not implemented on windows", len -1); + strncpy(buf, "not implemented on windows", len - 1); #endif } From 1b433cac0ca54bd079e223666406d5c441d3e967 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 8 Dec 2022 17:44:47 +0800 Subject: [PATCH 25/97] fix tsdb snapshot problem --- source/dnode/vnode/src/tsdb/tsdbSnapshot.c | 26 +++++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c index f4bdeeb387..3dcbe261ba 100644 --- a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c +++ b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c @@ -179,16 +179,14 @@ _err: return code; } -static SRowInfo* tsdbSnapGetRow(STsdbSnapReader* pReader) { return pReader->pIter ? &pReader->pIter->rInfo : NULL; } - static int32_t tsdbSnapNextRow(STsdbSnapReader* pReader) { int32_t code = 0; if (pReader->pIter) { - SFDataIter* pIter = pReader->pIter; - + SFDataIter* pIter = NULL; while (true) { _find_row: + pIter = pReader->pIter; for (pIter->iRow++; pIter->iRow < pIter->bData.nRow; pIter->iRow++) { int64_t rowVer = pIter->bData.aVersion[pIter->iRow]; @@ -224,6 +222,7 @@ static int32_t tsdbSnapNextRow(STsdbSnapReader* pReader) { } pReader->pIter = NULL; + break; } else if (pIter->type == SNAP_STT_FILE_ITER) { for (pIter->iSttBlk++; pIter->iSttBlk < taosArrayGetSize(pIter->aSttBlk); pIter->iSttBlk++) { SSttBlk* pSttBlk = (SSttBlk*)taosArrayGet(pIter->aSttBlk, pIter->iSttBlk); @@ -238,6 +237,7 @@ static int32_t tsdbSnapNextRow(STsdbSnapReader* pReader) { } pReader->pIter = NULL; + break; } else { ASSERT(0); } @@ -269,6 +269,20 @@ _err: return code; } +static SRowInfo* tsdbSnapGetRow(STsdbSnapReader* pReader) { + if (pReader->pIter) { + return &pReader->pIter->rInfo; + } else { + tsdbSnapNextRow(pReader); + + if (pReader->pIter) { + return &pReader->pIter->rInfo; + } else { + return NULL; + } + } +} + static int32_t tsdbSnapCmprData(STsdbSnapReader* pReader, uint8_t** ppData) { int32_t code = 0; @@ -1356,7 +1370,7 @@ _exit: taosMemoryFree(pWriter); } } else { - tsdbDebug("vgId:%d, tsdb snapshot writer open for %s succeed", TD_VID(pTsdb->pVnode), pTsdb->path); + tsdbInfo("vgId:%d %s done", TD_VID(pTsdb->pVnode), __func__); *ppWriter = pWriter; } return code; @@ -1421,7 +1435,7 @@ int32_t tsdbSnapWriterClose(STsdbSnapWriter** ppWriter, int8_t rollback) { for (int32_t iBuf = 0; iBuf < sizeof(pWriter->aBuf) / sizeof(uint8_t*); iBuf++) { tFree(pWriter->aBuf[iBuf]); } - tsdbInfo("vgId:%d, vnode snapshot tsdb writer close for %s", TD_VID(pWriter->pTsdb->pVnode), pWriter->pTsdb->path); + tsdbInfo("vgId:%d %s done", TD_VID(pWriter->pTsdb->pVnode), __func__); taosMemoryFree(pWriter); *ppWriter = NULL; return code; From fa8fb1e5b6060a2cc8a8930b36408edab5db4022 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 8 Dec 2022 17:50:29 +0800 Subject: [PATCH 26/97] fix: update taos-tools fe6566b --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 5ca2cacf57..60a5a48b0b 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG c86dda8 + GIT_TAG fe6566b SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From e0215d60ade47508c3dcaa1a17ad8609bb366bb2 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 8 Dec 2022 17:53:39 +0800 Subject: [PATCH 27/97] fix: set restored --- source/dnode/mnode/impl/src/mndSync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/src/mndSync.c b/source/dnode/mnode/impl/src/mndSync.c index 4966fb7749..10b1e36496 100644 --- a/source/dnode/mnode/impl/src/mndSync.c +++ b/source/dnode/mnode/impl/src/mndSync.c @@ -149,7 +149,7 @@ void mndRestoreFinish(const SSyncFSM *pFsm) { SMnode *pMnode = pFsm->data; if (!pMnode->deploy) { - if (pMnode->restored) { + if (!pMnode->restored) { mInfo("vgId:1, sync restore finished, and will handle outstanding transactions"); mndTransPullup(pMnode); mndSetRestored(pMnode, true); From 2dfbed6b6cb2b690d73c585f26ac7de8ebbfa5ea Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 8 Dec 2022 18:33:40 +0800 Subject: [PATCH 28/97] fix: update taos-tools 1b2cbd0 --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 60a5a48b0b..8561e0ff42 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG fe6566b + GIT_TAG 1b2cbd0 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From 68ff496113bd652b59ee1883e9f1d7ba36cbdbe3 Mon Sep 17 00:00:00 2001 From: xleili Date: Thu, 8 Dec 2022 19:01:30 +0800 Subject: [PATCH 29/97] fix(build):centos7 x64 makeinstall cannt write taod service to systemctl --- packaging/tools/make_install.sh | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/packaging/tools/make_install.sh b/packaging/tools/make_install.sh index 9034fd85f5..6a82322a12 100755 --- a/packaging/tools/make_install.sh +++ b/packaging/tools/make_install.sh @@ -497,27 +497,27 @@ function install_service_on_systemd() { taosd_service_config="${service_config_dir}/${serverName}.service" - ${csudo}bash -c "echo '[Unit]' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'Description=${productName} server service' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'After=network-online.target' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'Wants=network-online.target' >> ${taosd_service_config}" + ${csudo}bash -c "echo [Unit] >> ${taosd_service_config}" + ${csudo}bash -c "echo Description=${productName} server service >> ${taosd_service_config}" + ${csudo}bash -c "echo After=network-online.target >> ${taosd_service_config}" + ${csudo}bash -c "echo Wants=network-online.target >> ${taosd_service_config}" ${csudo}bash -c "echo >> ${taosd_service_config}" - ${csudo}bash -c "echo '[Service]' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'Type=simple' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'ExecStart=/usr/bin/${serverName}' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'ExecStartPre=${installDir}/bin/startPre.sh' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'TimeoutStopSec=1000000s' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'LimitNOFILE=infinity' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'LimitNPROC=infinity' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'LimitCORE=infinity' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'TimeoutStartSec=0' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'StandardOutput=null' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'Restart=always' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'StartLimitBurst=3' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'StartLimitInterval=60s' >> ${taosd_service_config}" + ${csudo}bash -c "echo [Service] >> ${taosd_service_config}" + ${csudo}bash -c "echo Type=simple >> ${taosd_service_config}" + ${csudo}bash -c "echo ExecStart=/usr/bin/${serverName} >> ${taosd_service_config}" + ${csudo}bash -c "echo ExecStartPre=${installDir}/bin/startPre.sh >> ${taosd_service_config}" + ${csudo}bash -c "echo TimeoutStopSec=1000000s >> ${taosd_service_config}" + ${csudo}bash -c "echo LimitNOFILE=infinity >> ${taosd_service_config}" + ${csudo}bash -c "echo LimitNPROC=infinity >> ${taosd_service_config}" + ${csudo}bash -c "echo LimitCORE=infinity >> ${taosd_service_config}" + ${csudo}bash -c "echo TimeoutStartSec=0 >> ${taosd_service_config}" + ${csudo}bash -c "echo StandardOutput=null >> ${taosd_service_config}" + ${csudo}bash -c "echo Restart=always >> ${taosd_service_config}" + ${csudo}bash -c "echo StartLimitBurst=3 >> ${taosd_service_config}" + ${csudo}bash -c "echo StartLimitInterval=60s >> ${taosd_service_config}" ${csudo}bash -c "echo >> ${taosd_service_config}" - ${csudo}bash -c "echo '[Install]' >> ${taosd_service_config}" - ${csudo}bash -c "echo 'WantedBy=multi-user.target' >> ${taosd_service_config}" + ${csudo}bash -c "echo [Install] >> ${taosd_service_config}" + ${csudo}bash -c "echo WantedBy=multi-user.target >> ${taosd_service_config}" ${csudo}systemctl enable ${serverName} } From bd047f8f393e734895a9045116646e85bbcf26b9 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 8 Dec 2022 19:51:38 +0800 Subject: [PATCH 30/97] fix: update taos-tools 4a4027c --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 8561e0ff42..7247200fe7 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 1b2cbd0 + GIT_TAG 4a4027c SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From 8fbe4b64a84baa5a0da597aee0be5efd0337c477 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 8 Dec 2022 20:26:06 +0800 Subject: [PATCH 31/97] fix: taos shell prompt for websocket (#18826) --- tools/shell/src/shellWebsocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/shell/src/shellWebsocket.c b/tools/shell/src/shellWebsocket.c index 94bb909e29..add3ccc51f 100644 --- a/tools/shell/src/shellWebsocket.c +++ b/tools/shell/src/shellWebsocket.c @@ -223,7 +223,7 @@ void shellRunSingleCommandWebsocketImp(char *command) { if (code == TSDB_CODE_WS_SEND_TIMEOUT || code == TSDB_CODE_WS_RECV_TIMEOUT) { fprintf(stderr, "Hint: use -t to increase the timeout in seconds\n"); } else if (code == TSDB_CODE_WS_INTERNAL_ERRO || code == TSDB_CODE_WS_CLOSED) { - fprintf(stderr, "TDengine server is down, will try to reconnect\n"); + fprintf(stderr, "TDengine server is disconnected, will try to reconnect\n"); shell.ws_conn = NULL; } ws_free_result(res); From ed6f542a3eefa757e53077f88d8f5a097a88b1c5 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 8 Dec 2022 21:18:36 +0800 Subject: [PATCH 32/97] TD-20975 --- source/dnode/mgmt/mgmt_dnode/src/dmHandle.c | 10 ++++++++-- source/libs/transport/src/transCli.c | 3 --- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index a7ad983b0c..39eeeb32ea 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -103,7 +103,12 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) { tSerializeSStatusReq(pHead, contLen, &req); tFreeSStatusReq(&req); - SRpcMsg rpcMsg = {.pCont = pHead, .contLen = contLen, .msgType = TDMT_MND_STATUS, .info.ahandle = (void *)0x9527}; + SRpcMsg rpcMsg = {.pCont = pHead, + .contLen = contLen, + .msgType = TDMT_MND_STATUS, + .info.ahandle = (void *)0x9527, + .info.refId = 0, + .info.noResp = 0}; SRpcMsg rpcRsp = {0}; dTrace("send status req to mnode, dnodeVer:%" PRId64 " statusSeq:%d", req.dnodeVer, req.statusSeq); @@ -150,7 +155,8 @@ static void dmGetServerRunStatus(SDnodeMgmt *pMgmt, SServerStatusRsp *pStatus) { SServerStatusRsp statusRsp = {0}; SMonMloadInfo minfo = {0}; (*pMgmt->getMnodeLoadsFp)(&minfo); - if (minfo.isMnode && (minfo.load.syncState == TAOS_SYNC_STATE_ERROR || minfo.load.syncState == TAOS_SYNC_STATE_OFFLINE)) { + if (minfo.isMnode && + (minfo.load.syncState == TAOS_SYNC_STATE_ERROR || minfo.load.syncState == TAOS_SYNC_STATE_OFFLINE)) { pStatus->statusCode = TSDB_SRV_STATUS_SERVICE_DEGRADED; snprintf(pStatus->details, sizeof(pStatus->details), "mnode sync state is %s", syncStr(minfo.load.syncState)); return; diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 6d6a6b6625..060d1d3a98 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1052,9 +1052,6 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { cliMayCvtFqdnToIp(&pCtx->epSet, &pThrd->cvtAddr); - char tbuf[256] = {0}; - EPSET_DEBUG_STR(&pCtx->epSet, tbuf); - if (!EPSET_IS_VALID(&pCtx->epSet)) { tError("invalid epset"); destroyCmsg(pMsg); From 24ee499670941c065b6aca12d778fbbd9c81a493 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 8 Dec 2022 21:38:08 +0800 Subject: [PATCH 33/97] fix: coredump --- source/dnode/vnode/src/tsdb/tsdbSnapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c index 3dcbe261ba..8be4904349 100644 --- a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c +++ b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c @@ -155,7 +155,7 @@ static int32_t tsdbSnapReadOpenFile(STsdbSnapReader* pReader) { if (rowVer >= pReader->sver && rowVer <= pReader->ever) { pIter->rInfo.suid = pIter->bData.suid; - pIter->rInfo.uid = pIter->bData.uid; + pIter->rInfo.uid = pIter->bData.uid ? pIter->bData.uid : pIter->bData.aUid[pIter->iRow]; pIter->rInfo.row = tsdbRowFromBlockData(&pIter->bData, pIter->iRow); goto _add_iter; } From bf48419dff643f26013a2216780fce08b79187a8 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 8 Dec 2022 22:18:08 +0800 Subject: [PATCH 34/97] change trim cron --- source/dnode/mgmt/mgmt_dnode/src/dmWorker.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c index 30ef7b9542..80c040a5e8 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c @@ -20,7 +20,9 @@ static void *dmStatusThreadFp(void *param) { SDnodeMgmt *pMgmt = param; int64_t lastTime = taosGetTimestampMs(); setThreadName("dnode-status"); - + + const static int16_t TRIM_FREQ = 30; + int32_t trimCount = 0; while (1) { taosMsleep(200); if (pMgmt->pData->dropped || pMgmt->pData->stopped) break; @@ -28,9 +30,13 @@ static void *dmStatusThreadFp(void *param) { int64_t curTime = taosGetTimestampMs(); float interval = (curTime - lastTime) / 1000.0f; if (interval >= tsStatusInterval) { - taosMemoryTrim(0); dmSendStatusReq(pMgmt); lastTime = curTime; + + trimCount = (trimCount + 1) % TRIM_FREQ; + if (trimCount == 0) { + taosMemoryTrim(0); + } } } From 617cd40541e07ad0305b385a6374562fdff6c7e7 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 8 Dec 2022 22:22:04 +0800 Subject: [PATCH 35/97] fix: fix ut case issue and crash issue --- source/libs/catalog/src/ctgCache.c | 2 +- source/libs/parser/test/mockCatalog.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/source/libs/catalog/src/ctgCache.c b/source/libs/catalog/src/ctgCache.c index 4124202b03..e8365a7633 100644 --- a/source/libs/catalog/src/ctgCache.c +++ b/source/libs/catalog/src/ctgCache.c @@ -239,6 +239,7 @@ _return: int32_t ctgAcquireVgMetaFromCache(SCatalog *pCtg, const char *dbFName, const char *tbName, SCtgDBCache **pDb, SCtgTbCache **pTb) { SCtgDBCache *dbCache = NULL; SCtgTbCache *tbCache = NULL; + bool vgInCache = false; ctgAcquireDBCache(pCtg, dbFName, &dbCache); if (NULL == dbCache) { @@ -247,7 +248,6 @@ int32_t ctgAcquireVgMetaFromCache(SCatalog *pCtg, const char *dbFName, const cha goto _return; } - bool vgInCache = false; ctgRLockVgInfo(pCtg, dbCache, &vgInCache); if (!vgInCache) { ctgDebug("vgInfo of db %s not in cache", dbFName); diff --git a/source/libs/parser/test/mockCatalog.cpp b/source/libs/parser/test/mockCatalog.cpp index cc51beb842..ae702ec02f 100644 --- a/source/libs/parser/test/mockCatalog.cpp +++ b/source/libs/parser/test/mockCatalog.cpp @@ -248,6 +248,13 @@ int32_t __catalogGetCachedTableHashVgroup(SCatalog* pCtg, const SName* pTableNam return code; } +int32_t __catalogGetCachedTableVgMeta(SCatalog* pCtg, const SName* pTableName, SVgroupInfo* pVgroup, STableMeta** pTableMeta) { + int32_t code = g_mockCatalogService->catalogGetTableMeta(pTableName, pTableMeta, true); + if (code) return code; + code = g_mockCatalogService->catalogGetTableHashVgroup(pTableName, pVgroup, true); + return code; +} + int32_t __catalogGetTableDistVgInfo(SCatalog* pCtg, SRequestConnInfo* pConn, const SName* pTableName, SArray** pVgList) { return g_mockCatalogService->catalogGetTableDistVgInfo(pTableName, pVgList); @@ -316,6 +323,7 @@ void initMetaDataEnv() { stub.set(catalogGetCachedSTableMeta, __catalogGetCachedTableMeta); stub.set(catalogGetTableHashVgroup, __catalogGetTableHashVgroup); stub.set(catalogGetCachedTableHashVgroup, __catalogGetCachedTableHashVgroup); + stub.set(catalogGetCachedTableVgMeta, __catalogGetCachedTableVgMeta); stub.set(catalogGetTableDistVgInfo, __catalogGetTableDistVgInfo); stub.set(catalogGetDBVgVersion, __catalogGetDBVgVersion); stub.set(catalogGetDBVgList, __catalogGetDBVgList); From 291750b9c34502235f0524429b1dd58782af7803 Mon Sep 17 00:00:00 2001 From: Minghao Li Date: Thu, 8 Dec 2022 22:34:08 +0800 Subject: [PATCH 36/97] fix(sync): snapshot problem --- source/libs/sync/src/syncMain.c | 2 +- source/libs/sync/src/syncSnapshot.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 90afec8b95..6fabab18cb 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -151,7 +151,7 @@ int32_t syncReconfig(int64_t rid, SSyncCfg* pNewCfg) { } syncNodeStartHeartbeatTimer(pSyncNode); - syncNodeReplicate(pSyncNode); + //syncNodeReplicate(pSyncNode); } syncNodeRelease(pSyncNode); diff --git a/source/libs/sync/src/syncSnapshot.c b/source/libs/sync/src/syncSnapshot.c index 42deb2c20a..540f40a4c0 100644 --- a/source/libs/sync/src/syncSnapshot.c +++ b/source/libs/sync/src/syncSnapshot.c @@ -345,6 +345,8 @@ bool snapshotReceiverIsStart(SSyncSnapshotReceiver *pReceiver) { return pReceive void snapshotReceiverForceStop(SSyncSnapshotReceiver *pReceiver) { // force close, abandon incomplete data if (pReceiver->pWriter != NULL) { + // event log + sRTrace(pReceiver, "snapshot receiver force stop"); int32_t ret = pReceiver->pSyncNode->pFsm->FpSnapshotStopWrite(pReceiver->pSyncNode->pFsm, pReceiver->pWriter, false, &(pReceiver->snapshot)); ASSERT(ret == 0); @@ -354,7 +356,7 @@ void snapshotReceiverForceStop(SSyncSnapshotReceiver *pReceiver) { pReceiver->start = false; // event log - sRTrace(pReceiver, "snapshot receiver force stop"); + // sRTrace(pReceiver, "snapshot receiver force stop"); } int32_t snapshotReceiverStartWriter(SSyncSnapshotReceiver *pReceiver, SyncSnapshotSend *pBeginMsg) { @@ -675,6 +677,7 @@ static int32_t syncNodeOnSnapshotEnd(SSyncNode *pSyncNode, SyncSnapshotSend *pMs sNTrace(pSyncNode, "snapshot receiver finish waitting for true time, now:%" PRId64 ", stime:%" PRId64, timeNow, pMsg->startTime); taosMsleep(10); + timeNow = taosGetTimestampMs(); } int32_t code = snapshotReceiverFinish(pReceiver, pMsg); From 43a349bc1ee48cf92c05227b3ef8a1d1706a5715 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Fri, 9 Dec 2022 07:12:57 +0800 Subject: [PATCH 37/97] fix: fix crash caused by null pointer --- source/libs/parser/src/parInsertSql.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index 36420599b3..ff0621c09e 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -1782,6 +1782,10 @@ static int32_t setVnodeModifOpStmt(SInsertParseContext* pCxt, SCatalogReq* pCata SVnodeModifOpStmt* pStmt) { clearCatalogReq(pCatalogReq); + if (NULL == pMetaData) { + return TSDB_CODE_SUCCESS; + } + if (pStmt->usingTableProcessing) { return getTableSchemaFromMetaData(pCxt, pMetaData, pStmt, true); } From 61ad2588cc4c514f7d3bd144a7d1120c8fb0b3d5 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Fri, 9 Dec 2022 08:56:01 +0800 Subject: [PATCH 38/97] fix: db release issue --- source/libs/catalog/inc/catalogInt.h | 2 +- source/libs/catalog/src/catalog.c | 2 +- source/libs/catalog/src/ctgCache.c | 16 ++++++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/source/libs/catalog/inc/catalogInt.h b/source/libs/catalog/inc/catalogInt.h index 0a43324a56..6e072a9630 100644 --- a/source/libs/catalog/inc/catalogInt.h +++ b/source/libs/catalog/inc/catalogInt.h @@ -799,7 +799,7 @@ int32_t ctgdGetOneHandle(SCatalog **pHandle); int ctgVgInfoComp(const void* lp, const void* rp); int32_t ctgMakeVgArray(SDBVgInfo* dbInfo); int32_t ctgAcquireVgMetaFromCache(SCatalog *pCtg, const char *dbFName, const char *tbName, SCtgDBCache **pDb, SCtgTbCache **pTb); -int32_t ctgCopyTbMeta(SCatalog *pCtg, SCtgTbMetaCtx *ctx, SCtgDBCache *dbCache, SCtgTbCache **pTb, STableMeta **pTableMeta, char* dbFName); +int32_t ctgCopyTbMeta(SCatalog *pCtg, SCtgTbMetaCtx *ctx, SCtgDBCache **pDb, SCtgTbCache **pTb, STableMeta **pTableMeta, char* dbFName); void ctgReleaseVgMetaToCache(SCatalog *pCtg, SCtgDBCache *dbCache, SCtgTbCache *pCache); extern SCatalogMgmt gCtgMgmt; diff --git a/source/libs/catalog/src/catalog.c b/source/libs/catalog/src/catalog.c index 23c39a7e3a..e9e0bae8d7 100644 --- a/source/libs/catalog/src/catalog.c +++ b/source/libs/catalog/src/catalog.c @@ -570,7 +570,7 @@ int32_t ctgGetCachedTbVgMeta(SCatalog* pCtg, const SName* pTableName, SVgroupInf SCtgTbMetaCtx ctx = {0}; ctx.pName = (SName*)pTableName; ctx.flag = CTG_FLAG_UNKNOWN_STB; - CTG_ERR_JRET(ctgCopyTbMeta(pCtg, &ctx, dbCache, &tbCache, pTableMeta, db)); + CTG_ERR_JRET(ctgCopyTbMeta(pCtg, &ctx, &dbCache, &tbCache, pTableMeta, db)); _return: diff --git a/source/libs/catalog/src/ctgCache.c b/source/libs/catalog/src/ctgCache.c index e8365a7633..47cb0ef559 100644 --- a/source/libs/catalog/src/ctgCache.c +++ b/source/libs/catalog/src/ctgCache.c @@ -130,7 +130,7 @@ void ctgReleaseVgInfoToCache(SCatalog *pCtg, SCtgDBCache *dbCache) { } void ctgReleaseTbMetaToCache(SCatalog *pCtg, SCtgDBCache *dbCache, SCtgTbCache *pCache) { - if (pCache) { + if (pCache && dbCache) { CTG_UNLOCK(CTG_READ, &pCache->metaLock); taosHashRelease(dbCache->tbCache, pCache); } @@ -152,13 +152,15 @@ void ctgReleaseTbIndexToCache(SCatalog *pCtg, SCtgDBCache *dbCache, SCtgTbCache } void ctgReleaseVgMetaToCache(SCatalog *pCtg, SCtgDBCache *dbCache, SCtgTbCache *pCache) { - if (pCache) { + if (pCache && dbCache) { CTG_UNLOCK(CTG_READ, &pCache->metaLock); taosHashRelease(dbCache->tbCache, pCache); } - ctgRUnlockVgInfo(dbCache); - ctgReleaseDBCache(pCtg, dbCache); + if (dbCache) { + ctgRUnlockVgInfo(dbCache); + ctgReleaseDBCache(pCtg, dbCache); + } } int32_t ctgAcquireVgInfoFromCache(SCatalog *pCtg, const char *dbFName, SCtgDBCache **pCache) { @@ -457,7 +459,8 @@ int32_t ctgTbMetaExistInCache(SCatalog *pCtg, char *dbFName, char *tbName, int32 return TSDB_CODE_SUCCESS; } -int32_t ctgCopyTbMeta(SCatalog *pCtg, SCtgTbMetaCtx *ctx, SCtgDBCache *dbCache, SCtgTbCache **pTb, STableMeta **pTableMeta, char* dbFName) { +int32_t ctgCopyTbMeta(SCatalog *pCtg, SCtgTbMetaCtx *ctx, SCtgDBCache **pDb, SCtgTbCache **pTb, STableMeta **pTableMeta, char* dbFName) { + SCtgDBCache *dbCache = *pDb; SCtgTbCache *tbCache = *pTb; STableMeta *tbMeta = tbCache->pMeta; ctx->tbInfo.inCache = true; @@ -502,6 +505,7 @@ int32_t ctgCopyTbMeta(SCatalog *pCtg, SCtgTbMetaCtx *ctx, SCtgDBCache *dbCache, ctgAcquireStbMetaFromCache(dbCache, pCtg, dbFName, ctx->tbInfo.suid, &tbCache); if (NULL == tbCache) { taosMemoryFreeClear(*pTableMeta); + *pDb = NULL; ctgDebug("stb 0x%" PRIx64 " meta not in cache", ctx->tbInfo.suid); return TSDB_CODE_SUCCESS; } @@ -546,7 +550,7 @@ int32_t ctgReadTbMetaFromCache(SCatalog *pCtg, SCtgTbMetaCtx *ctx, STableMeta ** return TSDB_CODE_SUCCESS; } - CTG_ERR_JRET(ctgCopyTbMeta(pCtg, ctx, dbCache, &tbCache, pTableMeta, dbFName)); + CTG_ERR_JRET(ctgCopyTbMeta(pCtg, ctx, &dbCache, &tbCache, pTableMeta, dbFName)); ctgReleaseTbMetaToCache(pCtg, dbCache, tbCache); From 13194bb1fe766e4d4466cf0a033b2d004cb20dff Mon Sep 17 00:00:00 2001 From: sunpeng Date: Fri, 9 Dec 2022 09:27:09 +0800 Subject: [PATCH 39/97] build: upgrade taosadapter version --- cmake/taosadapter_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taosadapter_CMakeLists.txt.in b/cmake/taosadapter_CMakeLists.txt.in index d702b9967e..75679a8ff5 100644 --- a/cmake/taosadapter_CMakeLists.txt.in +++ b/cmake/taosadapter_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taosadapter ExternalProject_Add(taosadapter GIT_REPOSITORY https://github.com/taosdata/taosadapter.git - GIT_TAG 0dfad5b + GIT_TAG 566540d SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From ecbc09663f565e649689f3ea5951afa0e7a9f335 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Fri, 9 Dec 2022 09:35:53 +0800 Subject: [PATCH 40/97] enh: tolerate exec error --- source/libs/stream/src/streamExec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index 6a83a9a4da..d20c2902f5 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -54,6 +54,7 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, const void* data, SArray* /*ASSERT(false);*/ qError("unexpected stream execution, stream %" PRId64 " task: %d, since %s", pTask->streamId, pTask->taskId, terrstr()); + continue; } if (output == NULL) { if (pItem->type == STREAM_INPUT__DATA_RETRIEVE) { From 1e51c1b49cc7bce6025f09460f4a6630eae9cf6d Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Fri, 9 Dec 2022 09:41:06 +0800 Subject: [PATCH 41/97] add debug log --- source/client/src/clientMain.c | 7 +++++-- source/client/src/clientTmq.c | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index f2dec7217f..8f029e6061 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -21,12 +21,12 @@ #include "os.h" #include "query.h" #include "scheduler.h" +#include "tdatablock.h" #include "tglobal.h" #include "tmsg.h" #include "tref.h" #include "trpc.h" #include "version.h" -#include "tdatablock.h" #define TSC_VAR_NOT_RELEASE 1 #define TSC_VAR_RELEASED 0 @@ -178,6 +178,8 @@ void taos_free_result(TAOS_RES *res) { return; } + tscDebug("taos free res %p", res); + if (TD_RES_QUERY(res)) { SRequestObj *pRequest = (SRequestObj *)res; tscDebug("0x%" PRIx64 " taos_free_result start to free query", pRequest->requestId); @@ -796,7 +798,8 @@ static void doAsyncQueryFromParse(SMetaData *pResultMeta, void *param, int32_t c SQuery *pQuery = pRequest->pQuery; pRequest->metric.ctgEnd = taosGetTimestampUs(); - qDebug("0x%" PRIx64 " start to continue parse, reqId:0x%" PRIx64 ", code:%s", pRequest->self, pRequest->requestId, tstrerror(code)); + qDebug("0x%" PRIx64 " start to continue parse, reqId:0x%" PRIx64 ", code:%s", pRequest->self, pRequest->requestId, + tstrerror(code)); if (code == TSDB_CODE_SUCCESS) { pWrapper->pCatalogReq->forceUpdate = false; diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 766a94caf1..db717a4e4e 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1215,6 +1215,8 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { taosMemoryFree(pMsg->pData); taosMemoryFree(pMsg->pEpSet); + tscDebug("consumer:%" PRId64 ", put poll res into mqueue %p", tmq->consumerId, pRspWrapper); + taosWriteQitem(tmq->mqueue, pRspWrapper); tsem_post(&tmq->rspSem); @@ -1664,6 +1666,8 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) { } } + tscDebug("consumer:%" PRId64 " handle rsp %p", tmq->consumerId, rspWrapper); + if (rspWrapper->tmqRspType == TMQ_MSG_TYPE__END_RSP) { taosFreeQitem(rspWrapper); terrno = TSDB_CODE_TQ_NO_COMMITTED_OFFSET; From 2e964f229ea13581109fdd641f9837ffc6cdacc3 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Fri, 9 Dec 2022 09:47:17 +0800 Subject: [PATCH 42/97] fix: fix error code passing issue --- source/client/src/clientMain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 7fdb735a07..29887115b9 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -882,6 +882,8 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) { if (pRequest->retry++ > REQUEST_TOTAL_EXEC_TIMES) { code = pRequest->prevCode; terrno = code; + pRequest->code = code; + tscDebug("call sync query cb with code: %s", tstrerror(code)); pRequest->body.queryFp(pRequest->body.param, pRequest, code); return; } From bb0c337e43e03fa75facba948bc48e13102d2ab0 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Fri, 9 Dec 2022 10:06:07 +0800 Subject: [PATCH 43/97] fix: client retry issue --- source/client/src/clientMain.c | 2 ++ source/libs/parser/src/parInsertSql.c | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 29887115b9..329d715aaf 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -936,6 +936,8 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) { tscError("0x%" PRIx64 " error happens, code:%d - %s, reqId:0x%" PRIx64, pRequest->self, code, tstrerror(code), pRequest->requestId); destorySqlCallbackWrapper(pWrapper); + qDestroyQuery(pRequest->pQuery); + pRequest->pQuery = NULL; if (NEED_CLIENT_HANDLE_ERROR(code)) { tscDebug("0x%" PRIx64 " client retry to handle the error, code:%d - %s, tryCount:%d, reqId:0x%" PRIx64, diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index ff0621c09e..36420599b3 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -1782,10 +1782,6 @@ static int32_t setVnodeModifOpStmt(SInsertParseContext* pCxt, SCatalogReq* pCata SVnodeModifOpStmt* pStmt) { clearCatalogReq(pCatalogReq); - if (NULL == pMetaData) { - return TSDB_CODE_SUCCESS; - } - if (pStmt->usingTableProcessing) { return getTableSchemaFromMetaData(pCxt, pMetaData, pStmt, true); } From c22fa53bc4fe6c0e6269eb153c48ddccf4891656 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Fri, 9 Dec 2022 10:10:31 +0800 Subject: [PATCH 44/97] fix: release lock and memory in exceptional cases --- source/dnode/vnode/src/tsdb/tsdbCache.c | 2 ++ source/libs/tdb/src/db/tdbPager.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 37fae4f709..5b09ce5eb6 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -953,6 +953,7 @@ static int32_t nextRowIterOpen(CacheNextRowIter *pIter, tb_uid_t uid, STsdb *pTs code = tsdbReadDelIdx(pDelFReader, pDelIdxArray); if (code) { + taosArrayDestroy(pDelIdxArray); tsdbDelFReaderClose(&pDelFReader); goto _err; } @@ -961,6 +962,7 @@ static int32_t nextRowIterOpen(CacheNextRowIter *pIter, tb_uid_t uid, STsdb *pTs code = getTableDelSkyline(pMem, pIMem, pDelFReader, delIdx, pIter->pSkyline); if (code) { + taosArrayDestroy(pDelIdxArray); tsdbDelFReaderClose(&pDelFReader); goto _err; } diff --git a/source/libs/tdb/src/db/tdbPager.c b/source/libs/tdb/src/db/tdbPager.c index e3d886b046..648e99d6a5 100644 --- a/source/libs/tdb/src/db/tdbPager.c +++ b/source/libs/tdb/src/db/tdbPager.c @@ -720,14 +720,16 @@ static int tdbPagerInitPage(SPager *pPager, SPage *pPage, int (*initPage)(SPage pgno = TDB_PAGE_PGNO(pPage); - tdbTrace("tdbttl init pager:%p, pgno:%d, loadPage:%d, size:%d", pPager, pgno, loadPage, pPager->dbOrigSize); + tdbTrace("tdb/pager:%p, pgno:%d, loadPage:%d, size:%d", pPager, pgno, loadPage, pPager->dbOrigSize); if (loadPage && pgno <= pPager->dbOrigSize) { init = 1; nRead = tdbOsPRead(pPager->fd, pPage->pData, pPage->pageSize, ((i64)pPage->pageSize) * (pgno - 1)); - tdbTrace("tdbttl pager:%p, pgno:%d, nRead:%" PRId64, pPager, pgno, nRead); + tdbTrace("tdb/pager:%p, pgno:%d, nRead:%" PRId64, pPager, pgno, nRead); if (nRead < pPage->pageSize) { ASSERT(0); + tdbError("tdb/pager:%p, pgno:%d, nRead:%" PRId64 "pgSize:%" PRId32, pPager, pgno, nRead, pPage->pageSize); + TDB_UNLOCK_PAGE(pPage); return -1; } } else { From 75f9728ab96f6145e23f5bc3360bee9046bac4a2 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 9 Dec 2022 10:43:12 +0800 Subject: [PATCH 45/97] fix: supportVnodes config is not in effect --- source/dnode/mnode/impl/src/mndVgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index a6e52caf1f..4a6f0d14da 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -507,7 +507,7 @@ static int32_t mndGetAvailableDnode(SMnode *pMnode, SDbObj *pDb, SVgObj *pVgroup for (int32_t v = 0; v < pVgroup->replica; ++v) { SVnodeGid *pVgid = &pVgroup->vnodeGid[v]; SDnodeObj *pDnode = taosArrayGet(pArray, v); - if (pDnode == NULL || pDnode->numOfVnodes > pDnode->numOfSupportVnodes) { + if (pDnode == NULL || pDnode->numOfVnodes >= pDnode->numOfSupportVnodes) { terrno = TSDB_CODE_MND_NO_ENOUGH_DNODES; return -1; } @@ -891,7 +891,7 @@ static int32_t mndAddVnodeToVgroup(SMnode *pMnode, STrans *pTrans, SVgObj *pVgro } if (used) continue; - if (pDnode == NULL || pDnode->numOfVnodes > pDnode->numOfSupportVnodes) { + if (pDnode == NULL || pDnode->numOfVnodes >= pDnode->numOfSupportVnodes) { terrno = TSDB_CODE_MND_NO_ENOUGH_DNODES; return -1; } From 06b0fefc385c94c0fba6ac578c796ede1e402747 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 9 Dec 2022 11:15:22 +0800 Subject: [PATCH 46/97] fix: check topic privilege only --- source/dnode/mnode/impl/src/mndConsumer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 373a653b51..8e2b17a963 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -554,10 +554,13 @@ static int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { goto SUBSCRIBE_OVER; } + // check topic only +#if 0 if (mndCheckDbPrivilegeByName(pMnode, pMsg->info.conn.user, MND_OPER_READ_DB, pTopic->db) != 0) { mndReleaseTopic(pMnode, pTopic); goto SUBSCRIBE_OVER; } +#endif if (mndCheckTopicPrivilege(pMnode, pMsg->info.conn.user, MND_OPER_SUBSCRIBE, pTopic) != 0) { mndReleaseTopic(pMnode, pTopic); From 0b1cef9b51e8a07d7649dcef065ca67d1804300d Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 9 Dec 2022 11:29:04 +0800 Subject: [PATCH 47/97] fix udfd crash --- source/libs/transport/src/transCli.c | 1 + source/libs/transport/src/transComm.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 060d1d3a98..bc0486bd4c 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -285,6 +285,7 @@ static void cliReleaseUnfinishedMsg(SCliConn* conn) { } destroyCmsg(msg); } + memset(conn->ctx, 0, sizeof(conn->ctx)); } bool cliMaySendCachedMsg(SCliConn* conn) { if (!transQueueEmpty(&conn->cliMsgs)) { diff --git a/source/libs/transport/src/transComm.c b/source/libs/transport/src/transComm.c index ad8d57c97a..09f9a78ab8 100644 --- a/source/libs/transport/src/transComm.c +++ b/source/libs/transport/src/transComm.c @@ -282,6 +282,9 @@ void transCtxCleanup(STransCtx* ctx) { } void transCtxMerge(STransCtx* dst, STransCtx* src) { + if (src->args == NULL || src->freeFunc == NULL) { + return; + } if (dst->args == NULL) { dst->args = src->args; dst->brokenVal = src->brokenVal; From 59c48d03962168aa58c12e0e68e7c16d67c2c265 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 9 Dec 2022 11:29:42 +0800 Subject: [PATCH 48/97] test: addjust cases --- tests/script/tsim/dnode/balance2.sim | 10 +++++----- tests/script/tsim/vnode/stable_balance_replica1.sim | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/script/tsim/dnode/balance2.sim b/tests/script/tsim/dnode/balance2.sim index f677d3925c..3f5a42d4d3 100644 --- a/tests/script/tsim/dnode/balance2.sim +++ b/tests/script/tsim/dnode/balance2.sim @@ -4,11 +4,11 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 system sh/deploy.sh -n dnode5 -i 5 -system sh/cfg.sh -n dnode1 -c supportVnodes -v 4 -system sh/cfg.sh -n dnode2 -c supportVnodes -v 4 -system sh/cfg.sh -n dnode3 -c supportVnodes -v 4 -system sh/cfg.sh -n dnode4 -c supportVnodes -v 4 -system sh/cfg.sh -n dnode5 -c supportVnodes -v 4 +system sh/cfg.sh -n dnode1 -c supportVnodes -v 5 +system sh/cfg.sh -n dnode2 -c supportVnodes -v 5 +system sh/cfg.sh -n dnode3 -c supportVnodes -v 5 +system sh/cfg.sh -n dnode4 -c supportVnodes -v 5 +system sh/cfg.sh -n dnode5 -c supportVnodes -v 5 print ========== step1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/tsim/vnode/stable_balance_replica1.sim b/tests/script/tsim/vnode/stable_balance_replica1.sim index f124979397..84190a3be0 100644 --- a/tests/script/tsim/vnode/stable_balance_replica1.sim +++ b/tests/script/tsim/vnode/stable_balance_replica1.sim @@ -3,10 +3,10 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c supportVnodes -v 4 -system sh/cfg.sh -n dnode2 -c supportVnodes -v 4 -system sh/cfg.sh -n dnode3 -c supportVnodes -v 4 -system sh/cfg.sh -n dnode4 -c supportVnodes -v 4 +system sh/cfg.sh -n dnode1 -c supportVnodes -v 5 +system sh/cfg.sh -n dnode2 -c supportVnodes -v 5 +system sh/cfg.sh -n dnode3 -c supportVnodes -v 5 +system sh/cfg.sh -n dnode4 -c supportVnodes -v 5 $dbPrefix = br1_db $tbPrefix = br1_tb From 8caca97568711ccff8e2b7eb6677bbd394f5b4ff Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Wed, 7 Dec 2022 18:50:35 +0800 Subject: [PATCH 49/97] feat:add delete mark for sma --- source/common/src/tdatablock.c | 4 +- source/libs/executor/src/timewindowoperator.c | 108 +++++++++++------- tests/script/tsim/stream/sliding.sim | 58 +++++++++- 3 files changed, 124 insertions(+), 46 deletions(-) diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index dfd0b68039..4f726ab194 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -1946,9 +1946,9 @@ char* dumpBlockData(SSDataBlock* pDataBlock, const char* flag, char** pDataBuf) int32_t len = 0; len += snprintf(dumpBuf + len, size - len, "===stream===%s|block type %d|child id %d|group id:%" PRIu64 "|uid:%" PRId64 - "|rows:%d|version:%" PRIu64 "\n", + "|rows:%d|version:%" PRIu64 "|cal start:%" PRIu64 "|cal end:%" PRIu64 "\n", flag, (int32_t)pDataBlock->info.type, pDataBlock->info.childId, pDataBlock->info.id.groupId, - pDataBlock->info.id.uid, pDataBlock->info.rows, pDataBlock->info.version); + pDataBlock->info.id.uid, pDataBlock->info.rows, pDataBlock->info.version, pDataBlock->info.calWin.skey, pDataBlock->info.calWin.ekey); if (len >= size - 1) return dumpBuf; for (int32_t j = 0; j < rows; j++) { diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index 6f1ab8ca65..2af551b832 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -23,6 +23,7 @@ #include "ttime.h" #define IS_FINAL_OP(op) ((op)->isFinal) +#define DEAULT_DELETE_MARK (1000LL * 60LL * 60LL * 24LL * 365LL * 10LL); typedef struct SSessionAggOperatorInfo { SOptrBasicInfo binfo; @@ -56,6 +57,7 @@ typedef enum SResultTsInterpType { typedef struct SPullWindowInfo { STimeWindow window; uint64_t groupId; + STimeWindow calWin; } SPullWindowInfo; typedef struct SOpenWindowInfo { @@ -793,17 +795,18 @@ int32_t comparePullWinKey(void* pKey, void* data, int32_t index) { SArray* res = (SArray*)data; SPullWindowInfo* pos = taosArrayGet(res, index); SPullWindowInfo* pData = (SPullWindowInfo*)pKey; - if (pData->window.skey == pos->window.skey) { - if (pData->groupId > pos->groupId) { - return 1; - } else if (pData->groupId < pos->groupId) { - return -1; - } - return 0; - } else if (pData->window.skey > pos->window.skey) { + if (pData->groupId > pos->groupId) { return 1; + } else if (pData->groupId < pos->groupId) { + return -1; } - return -1; + + if (pData->window.skey > pos->window.ekey) { + return 1; + } else if (pData->window.ekey < pos->window.skey) { + return -1; + } + return 0; } static int32_t savePullWindow(SPullWindowInfo* pPullInfo, SArray* pPullWins) { @@ -812,10 +815,16 @@ static int32_t savePullWindow(SPullWindowInfo* pPullInfo, SArray* pPullWins) { if (index == -1) { index = 0; } else { - if (comparePullWinKey(pPullInfo, pPullWins, index) > 0) { - index++; - } else { + int32_t code = comparePullWinKey(pPullInfo, pPullWins, index); + if (code == 0) { + SPullWindowInfo* pos = taosArrayGet(pPullWins ,index); + pos->window.skey = TMIN(pos->window.skey, pPullInfo->window.skey); + pos->window.ekey = TMAX(pos->window.ekey, pPullInfo->window.ekey); + pos->calWin.skey = TMIN(pos->calWin.skey, pPullInfo->calWin.skey); + pos->calWin.ekey = TMAX(pos->calWin.ekey, pPullInfo->calWin.ekey); return TSDB_CODE_SUCCESS; + } else if (code > 0 ){ + index++; } } if (taosArrayInsert(pPullWins, index, pPullInfo) == NULL) { @@ -2255,8 +2264,8 @@ static void doBuildPullDataBlock(SArray* array, int32_t* pIndex, SSDataBlock* pB colDataAppend(pStartTs, pBlock->info.rows, (const char*)&pWin->window.skey, false); colDataAppend(pEndTs, pBlock->info.rows, (const char*)&pWin->window.ekey, false); colDataAppend(pGroupId, pBlock->info.rows, (const char*)&pWin->groupId, false); - colDataAppend(pCalStartTs, pBlock->info.rows, (const char*)&pWin->window.skey, false); - colDataAppend(pCalEndTs, pBlock->info.rows, (const char*)&pWin->window.ekey, false); + colDataAppend(pCalStartTs, pBlock->info.rows, (const char*)&pWin->calWin.skey, false); + colDataAppend(pCalEndTs, pBlock->info.rows, (const char*)&pWin->calWin.ekey, false); pBlock->info.rows++; } if ((*pIndex) == size) { @@ -2266,27 +2275,33 @@ static void doBuildPullDataBlock(SArray* array, int32_t* pIndex, SSDataBlock* pB blockDataUpdateTsWindow(pBlock, 0); } -void processPullOver(SSDataBlock* pBlock, SHashObj* pMap) { +void processPullOver(SSDataBlock* pBlock, SHashObj* pMap, SInterval* pInterval) { SColumnInfoData* pStartCol = taosArrayGet(pBlock->pDataBlock, START_TS_COLUMN_INDEX); TSKEY* tsData = (TSKEY*)pStartCol->pData; + SColumnInfoData* pEndCol = taosArrayGet(pBlock->pDataBlock, END_TS_COLUMN_INDEX); + TSKEY* tsEndData = (TSKEY*)pEndCol->pData; SColumnInfoData* pGroupCol = taosArrayGet(pBlock->pDataBlock, GROUPID_COLUMN_INDEX); uint64_t* groupIdData = (uint64_t*)pGroupCol->pData; int32_t chId = getChildIndex(pBlock); for (int32_t i = 0; i < pBlock->info.rows; i++) { - SWinKey winRes = {.ts = tsData[i], .groupId = groupIdData[i]}; - void* chIds = taosHashGet(pMap, &winRes, sizeof(SWinKey)); - if (chIds) { - SArray* chArray = *(SArray**)chIds; - int32_t index = taosArraySearchIdx(chArray, &chId, compareInt32Val, TD_EQ); - if (index != -1) { - qDebug("===stream===window %" PRId64 " delete child id %d", winRes.ts, chId); - taosArrayRemove(chArray, index); - if (taosArrayGetSize(chArray) == 0) { - // pull data is over - taosArrayDestroy(chArray); - taosHashRemove(pMap, &winRes, sizeof(SWinKey)); + TSKEY winTs = tsData[i]; + while (winTs < tsEndData[i]) { + SWinKey winRes = {.ts = winTs, .groupId = groupIdData[i]}; + void* chIds = taosHashGet(pMap, &winRes, sizeof(SWinKey)); + if (chIds) { + SArray* chArray = *(SArray**)chIds; + int32_t index = taosArraySearchIdx(chArray, &chId, compareInt32Val, TD_EQ); + if (index != -1) { + qDebug("===stream===window %" PRId64 " delete child id %d", winRes.ts, chId); + taosArrayRemove(chArray, index); + if (taosArrayGetSize(chArray) == 0) { + // pull data is over + taosArrayDestroy(chArray); + taosHashRemove(pMap, &winRes, sizeof(SWinKey)); + } } } + winTs = taosTimeAdd(winTs, pInterval->sliding, pInterval->slidingUnit, pInterval->precision); } } } @@ -2299,12 +2314,13 @@ static void addRetriveWindow(SArray* wins, SStreamIntervalOperatorInfo* pInfo) { if (needDeleteWindowBuf(&nextWin, &pInfo->twAggSup) && !pInfo->ignoreExpiredData) { void* chIds = taosHashGet(pInfo->pPullDataMap, winKey, sizeof(SWinKey)); if (!chIds) { - SPullWindowInfo pull = {.window = nextWin, .groupId = winKey->groupId}; + SPullWindowInfo pull = {.window = nextWin, .groupId = winKey->groupId, .calWin.skey = nextWin.skey, .calWin.ekey = nextWin.skey}; // add pull data request - savePullWindow(&pull, pInfo->pPullWins); - int32_t size1 = taosArrayGetSize(pInfo->pChildren); - addPullWindow(pInfo->pPullDataMap, winKey, size1); - qDebug("===stream===prepare retrive for delete %" PRId64 ", size:%d", winKey->ts, size1); + if (savePullWindow(&pull, pInfo->pPullWins) == TSDB_CODE_SUCCESS) { + int32_t size1 = taosArrayGetSize(pInfo->pChildren); + addPullWindow(pInfo->pPullDataMap, winKey, size1); + qDebug("===stream===prepare retrive for delete %" PRId64 ", size:%d", winKey->ts, size1); + } } } } @@ -2374,12 +2390,13 @@ static void doStreamIntervalAggImpl(SOperatorInfo* pOperatorInfo, SSDataBlock* p }; void* chIds = taosHashGet(pInfo->pPullDataMap, &winRes, sizeof(SWinKey)); if (isDeletedStreamWindow(&nextWin, groupId, pInfo->pState, &pInfo->twAggSup) && !chIds) { - SPullWindowInfo pull = {.window = nextWin, .groupId = groupId}; + SPullWindowInfo pull = {.window = nextWin, .groupId = groupId, .calWin.skey = nextWin.skey, .calWin.ekey = nextWin.skey}; // add pull data request - savePullWindow(&pull, pInfo->pPullWins); - int32_t size = taosArrayGetSize(pInfo->pChildren); - addPullWindow(pInfo->pPullDataMap, &winRes, size); - qDebug("===stream===prepare retrive %" PRId64 ", size:%d", winRes.ts, size); + if (savePullWindow(&pull, pInfo->pPullWins) == TSDB_CODE_SUCCESS) { + int32_t size = taosArrayGetSize(pInfo->pChildren); + addPullWindow(pInfo->pPullDataMap, &winRes, size); + qDebug("===stream===prepare retrive %" PRId64 ", size:%d", winRes.ts, size); + } } else { int32_t index = -1; SArray* chArray = NULL; @@ -2560,7 +2577,7 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) { } continue; } else if (pBlock->info.type == STREAM_PULL_OVER && IS_FINAL_OP(pInfo)) { - processPullOver(pBlock, pInfo->pPullDataMap); + processPullOver(pBlock, pInfo->pPullDataMap, &pInfo->interval); continue; } @@ -2638,6 +2655,15 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) { return NULL; } +int64_t getDeleteMark(SIntervalPhysiNode* pIntervalPhyNode) { + if (pIntervalPhyNode->window.deleteMark <= 0) { + return DEAULT_DELETE_MARK; + } + int64_t deleteMark = TMAX(pIntervalPhyNode->window.deleteMark,pIntervalPhyNode->window.watermark); + deleteMark = TMAX(deleteMark, pIntervalPhyNode->interval); + return deleteMark; +} + SOperatorInfo* createStreamFinalIntervalOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo, int32_t numOfChild) { SIntervalPhysiNode* pIntervalPhyNode = (SIntervalPhysiNode*)pPhyNode; @@ -2659,9 +2685,7 @@ SOperatorInfo* createStreamFinalIntervalOperatorInfo(SOperatorInfo* downstream, .calTrigger = pIntervalPhyNode->window.triggerType, .maxTs = INT64_MIN, .minTs = INT64_MAX, - // for test 315360000000 - .deleteMark = 1000LL * 60LL * 60LL * 24LL * 365LL * 10LL, - // .deleteMark = INT64_MAX, + .deleteMark = getDeleteMark(pIntervalPhyNode), .deleteMarkSaved = 0, .calTriggerSaved = 0, }; @@ -4805,7 +4829,7 @@ SOperatorInfo* createStreamIntervalOperatorInfo(SOperatorInfo* downstream, SPhys .calTrigger = pIntervalPhyNode->window.triggerType, .maxTs = INT64_MIN, .minTs = INT64_MAX, - .deleteMark = INT64_MAX, + .deleteMark = getDeleteMark(pIntervalPhyNode), }; ASSERT(twAggSupp.calTrigger != STREAM_TRIGGER_MAX_DELAY); diff --git a/tests/script/tsim/stream/sliding.sim b/tests/script/tsim/stream/sliding.sim index 49e22db1b1..c9a1ddd922 100644 --- a/tests/script/tsim/stream/sliding.sim +++ b/tests/script/tsim/stream/sliding.sim @@ -461,7 +461,7 @@ sql insert into t2 values(1648791213004,4,10,10,4.1); $loop_count = 0 loop2: -sleep 100 +sleep 200 $loop_count = $loop_count + 1 if $loop_count == 10 then @@ -519,7 +519,7 @@ print step 6 $loop_count = 0 loop3: -# sleep 300 +sleep 300 $loop_count = $loop_count + 1 if $loop_count == 10 then @@ -618,6 +618,60 @@ if $data41 != 2 then goto loop4 endi +sql insert into t1 values(1648791343003,4,4,4,3.1); +sql insert into t1 values(1648791213004,4,5,5,4.1); + +loop5: +sleep 200 + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +sql select * from streamt3; + +# row 0 +if $rows != 7 then + print =====rows=$rows + goto loop5 +endi + +if $data01 != 4 then + print =====data01=$data01 + goto loop5 +endi + +if $data11 != 6 then + print =====data11=$data11 + goto loop5 +endi + +if $data21 != 4 then + print =====data21=$data21 + goto loop5 +endi + +if $data31 != 4 then + print =====data31=$data31 + goto loop5 +endi + +if $data41 != 2 then + print =====data41=$data41 + goto loop5 +endi + +if $data51 != 1 then + print =====data51=$data51 + goto loop5 +endi + +if $data61 != 1 then + print =====data61=$data61 + goto loop5 +endi + $loop_all = $loop_all + 1 print ============loop_all=$loop_all From 997241438245554f923902315a3ef1b62a575312 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 9 Dec 2022 12:25:24 +0800 Subject: [PATCH 50/97] test: temporarily disable go.sh test (#18845) --- tests/parallel_test/cases.task | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 28ba7ea60f..154eebb4de 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -1037,4 +1037,4 @@ ,,n,docs-examples-test,bash node.sh ,,n,docs-examples-test,bash csharp.sh ,,n,docs-examples-test,bash jdbc.sh -,,n,docs-examples-test,bash go.sh +#,,n,docs-examples-test,bash go.sh From dc0fc02da81825ef45c0029cdbdded375fd4a3ea Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 9 Dec 2022 12:26:02 +0800 Subject: [PATCH 51/97] Revert "fix(build):centos7 x64 makeinstall cannt write taod service to systemctl" (#18836) --- packaging/tools/make_install.sh | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/packaging/tools/make_install.sh b/packaging/tools/make_install.sh index 6a82322a12..9034fd85f5 100755 --- a/packaging/tools/make_install.sh +++ b/packaging/tools/make_install.sh @@ -497,27 +497,27 @@ function install_service_on_systemd() { taosd_service_config="${service_config_dir}/${serverName}.service" - ${csudo}bash -c "echo [Unit] >> ${taosd_service_config}" - ${csudo}bash -c "echo Description=${productName} server service >> ${taosd_service_config}" - ${csudo}bash -c "echo After=network-online.target >> ${taosd_service_config}" - ${csudo}bash -c "echo Wants=network-online.target >> ${taosd_service_config}" + ${csudo}bash -c "echo '[Unit]' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'Description=${productName} server service' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'After=network-online.target' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'Wants=network-online.target' >> ${taosd_service_config}" ${csudo}bash -c "echo >> ${taosd_service_config}" - ${csudo}bash -c "echo [Service] >> ${taosd_service_config}" - ${csudo}bash -c "echo Type=simple >> ${taosd_service_config}" - ${csudo}bash -c "echo ExecStart=/usr/bin/${serverName} >> ${taosd_service_config}" - ${csudo}bash -c "echo ExecStartPre=${installDir}/bin/startPre.sh >> ${taosd_service_config}" - ${csudo}bash -c "echo TimeoutStopSec=1000000s >> ${taosd_service_config}" - ${csudo}bash -c "echo LimitNOFILE=infinity >> ${taosd_service_config}" - ${csudo}bash -c "echo LimitNPROC=infinity >> ${taosd_service_config}" - ${csudo}bash -c "echo LimitCORE=infinity >> ${taosd_service_config}" - ${csudo}bash -c "echo TimeoutStartSec=0 >> ${taosd_service_config}" - ${csudo}bash -c "echo StandardOutput=null >> ${taosd_service_config}" - ${csudo}bash -c "echo Restart=always >> ${taosd_service_config}" - ${csudo}bash -c "echo StartLimitBurst=3 >> ${taosd_service_config}" - ${csudo}bash -c "echo StartLimitInterval=60s >> ${taosd_service_config}" + ${csudo}bash -c "echo '[Service]' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'Type=simple' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'ExecStart=/usr/bin/${serverName}' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'ExecStartPre=${installDir}/bin/startPre.sh' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'TimeoutStopSec=1000000s' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'LimitNOFILE=infinity' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'LimitNPROC=infinity' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'LimitCORE=infinity' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'TimeoutStartSec=0' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'StandardOutput=null' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'Restart=always' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'StartLimitBurst=3' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'StartLimitInterval=60s' >> ${taosd_service_config}" ${csudo}bash -c "echo >> ${taosd_service_config}" - ${csudo}bash -c "echo [Install] >> ${taosd_service_config}" - ${csudo}bash -c "echo WantedBy=multi-user.target >> ${taosd_service_config}" + ${csudo}bash -c "echo '[Install]' >> ${taosd_service_config}" + ${csudo}bash -c "echo 'WantedBy=multi-user.target' >> ${taosd_service_config}" ${csudo}systemctl enable ${serverName} } From 77829e2676fe58b28d2bc62970fb1c6fd14756d1 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 9 Dec 2022 13:23:52 +0800 Subject: [PATCH 52/97] exhandle mem leak --- source/libs/transport/src/transCli.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 060d1d3a98..a6a79ce9e8 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -589,6 +589,7 @@ static void addConnToPool(void* pool, SCliConn* conn) { } static int32_t allocConnRef(SCliConn* conn, bool update) { if (update) { + transReleaseExHandle(transGetRefMgt(), conn->refId); transRemoveExHandle(transGetRefMgt(), conn->refId); conn->refId = -1; } @@ -697,6 +698,7 @@ static void cliDestroyConn(SCliConn* conn, bool clear) { tTrace("%s conn %p remove from conn pool", CONN_GET_INST_LABEL(conn), conn); QUEUE_REMOVE(&conn->q); QUEUE_INIT(&conn->q); + transReleaseExHandle(transGetRefMgt(), conn->refId); transRemoveExHandle(transGetRefMgt(), conn->refId); conn->refId = -1; @@ -731,6 +733,7 @@ static void cliDestroy(uv_handle_t* handle) { conn->timer = NULL; } + transReleaseExHandle(transGetRefMgt(), conn->refId); transRemoveExHandle(transGetRefMgt(), conn->refId); taosMemoryFree(conn->ip); taosMemoryFree(conn->stream); From 52045c43ab3d0a683a5b8b514a0766a1f0a5e30b Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 9 Dec 2022 13:30:25 +0800 Subject: [PATCH 53/97] compile error --- source/libs/transport/src/transCli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index bc0486bd4c..879ff7c951 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -285,7 +285,7 @@ static void cliReleaseUnfinishedMsg(SCliConn* conn) { } destroyCmsg(msg); } - memset(conn->ctx, 0, sizeof(conn->ctx)); + memset(&conn->ctx, 0, sizeof(conn->ctx)); } bool cliMaySendCachedMsg(SCliConn* conn) { if (!transQueueEmpty(&conn->cliMsgs)) { From 5b8cc2234b249a0299262bbc8a791e65127ac5ef Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Fri, 9 Dec 2022 14:38:29 +0800 Subject: [PATCH 54/97] fix: mem leak --- source/client/src/clientMain.c | 16 +++++----- source/client/src/clientTmq.c | 57 +++++++++++++++++++++++++++------- 2 files changed, 54 insertions(+), 19 deletions(-) diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 8f029e6061..333cfa3dfd 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -186,10 +186,10 @@ void taos_free_result(TAOS_RES *res) { destroyRequest(pRequest); } else if (TD_RES_TMQ_METADATA(res)) { SMqTaosxRspObj *pRsp = (SMqTaosxRspObj *)res; - if (pRsp->rsp.blockData) taosArrayDestroyP(pRsp->rsp.blockData, taosMemoryFree); - if (pRsp->rsp.blockDataLen) taosArrayDestroy(pRsp->rsp.blockDataLen); - if (pRsp->rsp.withTbName) taosArrayDestroyP(pRsp->rsp.blockTbName, taosMemoryFree); - if (pRsp->rsp.withSchema) taosArrayDestroyP(pRsp->rsp.blockSchema, (FDelete)tDeleteSSchemaWrapper); + taosArrayDestroyP(pRsp->rsp.blockData, taosMemoryFree); + taosArrayDestroy(pRsp->rsp.blockDataLen); + taosArrayDestroyP(pRsp->rsp.blockTbName, taosMemoryFree); + taosArrayDestroyP(pRsp->rsp.blockSchema, (FDelete)tDeleteSSchemaWrapper); // taosx taosArrayDestroy(pRsp->rsp.createTableLen); taosArrayDestroyP(pRsp->rsp.createTableReq, taosMemoryFree); @@ -199,10 +199,10 @@ void taos_free_result(TAOS_RES *res) { taosMemoryFree(pRsp); } else if (TD_RES_TMQ(res)) { SMqRspObj *pRsp = (SMqRspObj *)res; - if (pRsp->rsp.blockData) taosArrayDestroyP(pRsp->rsp.blockData, taosMemoryFree); - if (pRsp->rsp.blockDataLen) taosArrayDestroy(pRsp->rsp.blockDataLen); - if (pRsp->rsp.withTbName) taosArrayDestroyP(pRsp->rsp.blockTbName, taosMemoryFree); - if (pRsp->rsp.withSchema) taosArrayDestroyP(pRsp->rsp.blockSchema, (FDelete)tDeleteSSchemaWrapper); + taosArrayDestroyP(pRsp->rsp.blockData, taosMemoryFree); + taosArrayDestroy(pRsp->rsp.blockDataLen); + taosArrayDestroyP(pRsp->rsp.blockTbName, taosMemoryFree); + taosArrayDestroyP(pRsp->rsp.blockSchema, (FDelete)tDeleteSSchemaWrapper); pRsp->resInfo.pRspMsg = NULL; doFreeReqResultInfo(&pRsp->resInfo); taosMemoryFree(pRsp); diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index db717a4e4e..4352ec69d3 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -814,24 +814,55 @@ int32_t tmqHandleAllDelayedTask(tmq_t* tmq) { return 0; } +static void tmqFreeRspWrapper(SMqRspWrapper* rspWrapper) { + if (rspWrapper->tmqRspType == TMQ_MSG_TYPE__END_RSP) { + // do nothing + } else if (rspWrapper->tmqRspType == TMQ_MSG_TYPE__EP_RSP) { + SMqAskEpRspWrapper* pEpRspWrapper = (SMqAskEpRspWrapper*)rspWrapper; + tDeleteSMqAskEpRsp(&pEpRspWrapper->msg); + } else if (rspWrapper->tmqRspType == TMQ_MSG_TYPE__POLL_RSP) { + SMqPollRspWrapper* pRsp = (SMqPollRspWrapper*)rspWrapper; + taosArrayDestroyP(pRsp->dataRsp.blockData, taosMemoryFree); + taosArrayDestroy(pRsp->dataRsp.blockDataLen); + taosArrayDestroyP(pRsp->dataRsp.blockTbName, taosMemoryFree); + taosArrayDestroyP(pRsp->dataRsp.blockSchema, (FDelete)tDeleteSSchemaWrapper); + } else if (rspWrapper->tmqRspType == TMQ_MSG_TYPE__POLL_META_RSP) { + SMqPollRspWrapper* pRsp = (SMqPollRspWrapper*)rspWrapper; + taosMemoryFree(pRsp->metaRsp.metaRsp); + } else if (rspWrapper->tmqRspType == TMQ_MSG_TYPE__TAOSX_RSP) { + SMqPollRspWrapper* pRsp = (SMqPollRspWrapper*)rspWrapper; + taosArrayDestroyP(pRsp->taosxRsp.blockData, taosMemoryFree); + taosArrayDestroy(pRsp->taosxRsp.blockDataLen); + taosArrayDestroyP(pRsp->taosxRsp.blockTbName, taosMemoryFree); + taosArrayDestroyP(pRsp->taosxRsp.blockSchema, (FDelete)tDeleteSSchemaWrapper); + // taosx + taosArrayDestroy(pRsp->taosxRsp.createTableLen); + taosArrayDestroyP(pRsp->taosxRsp.createTableReq, taosMemoryFree); + } +} + void tmqClearUnhandleMsg(tmq_t* tmq) { - SMqRspWrapper* msg = NULL; + SMqRspWrapper* rspWrapper = NULL; while (1) { - taosGetQitem(tmq->qall, (void**)&msg); - if (msg) - taosFreeQitem(msg); - else + taosGetQitem(tmq->qall, (void**)&rspWrapper); + if (rspWrapper) { + tmqFreeRspWrapper(rspWrapper); + taosFreeQitem(rspWrapper); + } else { break; + } } - msg = NULL; + rspWrapper = NULL; taosReadAllQitems(tmq->mqueue, tmq->qall); while (1) { - taosGetQitem(tmq->qall, (void**)&msg); - if (msg) - taosFreeQitem(msg); - else + taosGetQitem(tmq->qall, (void**)&rspWrapper); + if (rspWrapper) { + tmqFreeRspWrapper(rspWrapper); + taosFreeQitem(rspWrapper); + } else { break; + } } } @@ -1644,6 +1675,7 @@ int32_t tmqHandleNoPollRsp(tmq_t* tmq, SMqRspWrapper* rspWrapper, bool* pReset) tDeleteSMqAskEpRsp(rspMsg); *pReset = true; } else { + tmqFreeRspWrapper(rspWrapper); *pReset = false; } } else { @@ -1695,6 +1727,7 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) { } else { tscDebug("msg discard since epoch mismatch: msg epoch %d, consumer epoch %d", pollRspWrapper->dataRsp.head.epoch, consumerEpoch); + tmqFreeRspWrapper(rspWrapper); taosFreeQitem(pollRspWrapper); } } else if (rspWrapper->tmqRspType == TMQ_MSG_TYPE__POLL_META_RSP) { @@ -1713,6 +1746,7 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) { } else { tscDebug("msg discard since epoch mismatch: msg epoch %d, consumer epoch %d", pollRspWrapper->metaRsp.head.epoch, consumerEpoch); + tmqFreeRspWrapper(rspWrapper); taosFreeQitem(pollRspWrapper); } } else if (rspWrapper->tmqRspType == TMQ_MSG_TYPE__TAOSX_RSP) { @@ -1743,6 +1777,7 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) { } else { tscDebug("msg discard since epoch mismatch: msg epoch %d, consumer epoch %d", pollRspWrapper->taosxRsp.head.epoch, consumerEpoch); + tmqFreeRspWrapper(rspWrapper); taosFreeQitem(pollRspWrapper); } } else { @@ -1794,7 +1829,7 @@ TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) { while (1) { tmqHandleAllDelayedTask(tmq); if (tmqPollImpl(tmq, timeout) < 0) { - tscDebug("return since poll err"); + tscDebug("consumer:%" PRId64 " return since poll err", tmq->consumerId); /*return NULL;*/ } From e150913c7b18d63331c58c69b79a5ffb9b67e794 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 9 Dec 2022 17:08:51 +0800 Subject: [PATCH 55/97] change default sch value --- source/libs/qworker/inc/qwInt.h | 8 ++++---- source/libs/qworker/src/qwUtil.c | 11 +++++++++-- source/libs/qworker/src/qworker.c | 33 +++++++++++++++++-------------- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/source/libs/qworker/inc/qwInt.h b/source/libs/qworker/inc/qwInt.h index af361323a7..9d8fad6fea 100644 --- a/source/libs/qworker/inc/qwInt.h +++ b/source/libs/qworker/inc/qwInt.h @@ -31,7 +31,7 @@ extern "C" { #define QW_DEFAULT_SCHEDULER_NUMBER 100 #define QW_DEFAULT_TASK_NUMBER 10000 -#define QW_DEFAULT_SCH_TASK_NUMBER 10000 +#define QW_DEFAULT_SCH_TASK_NUMBER 3000 #define QW_DEFAULT_SHORT_RUN_TIMES 2 #define QW_DEFAULT_HEARTBEAT_MSEC 5000 #define QW_SCH_TIMEOUT_MSEC 180000 @@ -247,7 +247,7 @@ typedef struct SQWorkerMgmt { #define QW_ERR_RET(c) \ do { \ - int32_t _code = (c); \ + int32_t _code = (c); \ if (_code != TSDB_CODE_SUCCESS) { \ terrno = _code; \ return _code; \ @@ -255,7 +255,7 @@ typedef struct SQWorkerMgmt { } while (0) #define QW_RET(c) \ do { \ - int32_t _code = (c); \ + int32_t _code = (c); \ if (_code != TSDB_CODE_SUCCESS) { \ terrno = _code; \ } \ @@ -263,7 +263,7 @@ typedef struct SQWorkerMgmt { } while (0) #define QW_ERR_JRET(c) \ do { \ - code = (c); \ + code = (c); \ if (code != TSDB_CODE_SUCCESS) { \ terrno = code; \ goto _return; \ diff --git a/source/libs/qworker/src/qwUtil.c b/source/libs/qworker/src/qwUtil.c index ce3b493638..f3d073634d 100644 --- a/source/libs/qworker/src/qwUtil.c +++ b/source/libs/qworker/src/qwUtil.c @@ -281,7 +281,7 @@ void qwFreeTaskHandle(qTaskInfo_t *taskHandle) { int32_t qwKillTaskHandle(SQWTaskCtx *ctx, int32_t rspCode) { int32_t code = 0; - + // Note: free/kill may in RC qTaskInfo_t taskHandle = atomic_load_ptr(&ctx->taskHandle); if (taskHandle && atomic_val_compare_exchange_ptr(&ctx->taskHandle, taskHandle, NULL)) { @@ -463,6 +463,8 @@ void qwDestroyImpl(void *pMgmt) { int8_t nodeType = mgmt->nodeType; int32_t nodeId = mgmt->nodeId; + int32_t taskCount = 0; + int32_t schStatusCount = 0; qDebug("start to destroy qworker, type:%d, id:%d, handle:%p", nodeType, nodeId, mgmt); taosTmrStop(mgmt->hbTimer); @@ -472,6 +474,7 @@ void qwDestroyImpl(void *pMgmt) { uint64_t qId, tId; int32_t eId; void *pIter = taosHashIterate(mgmt->ctxHash, NULL); + while (pIter) { SQWTaskCtx *ctx = (SQWTaskCtx *)pIter; void *key = taosHashGetKey(pIter, NULL); @@ -480,6 +483,7 @@ void qwDestroyImpl(void *pMgmt) { qwFreeTaskCtx(ctx); QW_TASK_DLOG_E("task ctx freed"); pIter = taosHashIterate(mgmt->ctxHash, pIter); + taskCount++; } taosHashCleanup(mgmt->ctxHash); @@ -487,7 +491,9 @@ void qwDestroyImpl(void *pMgmt) { while (pIter) { SQWSchStatus *sch = (SQWSchStatus *)pIter; qwDestroySchStatus(sch); + pIter = taosHashIterate(mgmt->schHash, pIter); + schStatusCount++; } taosHashCleanup(mgmt->schHash); @@ -499,7 +505,8 @@ void qwDestroyImpl(void *pMgmt) { qwCloseRef(); - qDebug("qworker destroyed, type:%d, id:%d, handle:%p", nodeType, nodeId, mgmt); + qDebug("qworker destroyed, type:%d, id:%d, handle:%p, taskCount:%d, schStatusCount: %d", nodeType, nodeId, mgmt, + taskCount, schStatusCount); } int32_t qwOpenRef(void) { diff --git a/source/libs/qworker/src/qworker.c b/source/libs/qworker/src/qworker.c index c5db4105d7..81f73b1226 100644 --- a/source/libs/qworker/src/qworker.c +++ b/source/libs/qworker/src/qworker.c @@ -8,9 +8,9 @@ #include "qwMsg.h" #include "tcommon.h" #include "tdatablock.h" +#include "tglobal.h" #include "tmsg.h" #include "tname.h" -#include "tglobal.h" SQWorkerMgmt gQwMgmt = { .lock = 0, @@ -117,7 +117,7 @@ int32_t qwExecTask(QW_FPARAMS_DEF, SQWTaskCtx *ctx, bool *queryStop) { if (queryStop) { *queryStop = true; } - + return TSDB_CODE_SUCCESS; } @@ -275,7 +275,7 @@ int32_t qwGetQueryResFromSink(QW_FPARAMS_DEF, SQWTaskCtx *ctx, int32_t *dataLen, QW_ERR_RET(code); } - QW_TASK_DLOG("no more data in sink and query end, fetched blocks %d rows %"PRId64, pOutput->numOfBlocks, + QW_TASK_DLOG("no more data in sink and query end, fetched blocks %d rows %" PRId64, pOutput->numOfBlocks, pOutput->numOfRows); qwUpdateTaskStatus(QW_FPARAMS(), JOB_TASK_STATUS_SUCC); @@ -327,12 +327,14 @@ int32_t qwGetQueryResFromSink(QW_FPARAMS_DEF, SQWTaskCtx *ctx, int32_t *dataLen, } if (0 == ctx->level) { - QW_TASK_DLOG("task fetched blocks %d rows %"PRId64", level %d", pOutput->numOfBlocks, pOutput->numOfRows, ctx->level); + QW_TASK_DLOG("task fetched blocks %d rows %" PRId64 ", level %d", pOutput->numOfBlocks, pOutput->numOfRows, + ctx->level); break; } if (pOutput->numOfRows >= QW_MIN_RES_ROWS) { - QW_TASK_DLOG("task fetched blocks %d rows %" PRId64 " reaches the min rows", pOutput->numOfBlocks, pOutput->numOfRows); + QW_TASK_DLOG("task fetched blocks %d rows %" PRId64 " reaches the min rows", pOutput->numOfBlocks, + pOutput->numOfRows); break; } } @@ -538,7 +540,7 @@ _return: SQWMsg qwMsg = {.msgType = ctx->msgType, .connInfo = ctx->ctrlConnInfo}; qwDbgSimulateRedirect(&qwMsg, ctx, &rsped); qwDbgSimulateDead(QW_FPARAMS(), ctx, &rsped); - if (!rsped) { + if (!rsped) { qwSendQueryRsp(QW_FPARAMS(), input->msgType + 1, ctx, code, false); } } @@ -650,8 +652,8 @@ _return: code = qwHandlePostPhaseEvents(QW_FPARAMS(), QW_PHASE_POST_QUERY, &input, NULL); if (QUERY_RSP_POLICY_QUICK == tsQueryRspPolicy && ctx != NULL && QW_EVENT_RECEIVED(ctx, QW_EVENT_FETCH)) { - void *rsp = NULL; - int32_t dataLen = 0; + void *rsp = NULL; + int32_t dataLen = 0; SOutputData sOutput = {0}; if (qwGetQueryResFromSink(QW_FPARAMS(), ctx, &dataLen, &rsp, &sOutput)) { return TSDB_CODE_SUCCESS; @@ -671,8 +673,8 @@ _return: qwBuildAndSendFetchRsp(ctx->fetchType, &qwMsg->connInfo, rsp, dataLen, code); rsp = NULL; - QW_TASK_DLOG("fetch rsp send, handle:%p, code:%x - %s, dataLen:%d", qwMsg->connInfo.handle, code, - tstrerror(code), dataLen); + QW_TASK_DLOG("fetch rsp send, handle:%p, code:%x - %s, dataLen:%d", qwMsg->connInfo.handle, code, tstrerror(code), + dataLen); } } @@ -689,7 +691,7 @@ int32_t qwProcessCQuery(QW_FPARAMS_DEF, SQWMsg *qwMsg) { do { ctx = NULL; - + QW_ERR_JRET(qwHandlePrePhaseEvents(QW_FPARAMS(), QW_PHASE_PRE_CQUERY, &input, NULL)); QW_ERR_JRET(qwGetTaskCtx(QW_FPARAMS(), &ctx)); @@ -748,7 +750,8 @@ int32_t qwProcessCQuery(QW_FPARAMS_DEF, SQWMsg *qwMsg) { } QW_LOCK(QW_WRITE, &ctx->lock); - if ((queryStop && (0 == atomic_load_8((int8_t *)&ctx->queryContinue))) || code || 0 == atomic_load_8((int8_t *)&ctx->queryContinue)) { + if ((queryStop && (0 == atomic_load_8((int8_t *)&ctx->queryContinue))) || code || + 0 == atomic_load_8((int8_t *)&ctx->queryContinue)) { // Note: query is not running anymore QW_SET_PHASE(ctx, 0); QW_UNLOCK(QW_WRITE, &ctx->lock); @@ -1176,7 +1179,7 @@ void qWorkerStopAllTasks(void *qWorkerMgmt) { QW_DLOG("start to stop all tasks, taskNum:%d", taosHashGetSize(mgmt->ctxHash)); uint64_t qId, tId; - int32_t eId; + int32_t eId; void *pIter = taosHashIterate(mgmt->ctxHash, NULL); while (pIter) { SQWTaskCtx *ctx = (SQWTaskCtx *)pIter; @@ -1186,7 +1189,7 @@ void qWorkerStopAllTasks(void *qWorkerMgmt) { QW_LOCK(QW_WRITE, &ctx->lock); QW_TASK_DLOG_E("start to force stop task"); - + if (QW_EVENT_RECEIVED(ctx, QW_EVENT_DROP) || QW_EVENT_PROCESSED(ctx, QW_EVENT_DROP)) { QW_TASK_WLOG_E("task already dropping"); QW_UNLOCK(QW_WRITE, &ctx->lock); @@ -1194,7 +1197,7 @@ void qWorkerStopAllTasks(void *qWorkerMgmt) { pIter = taosHashIterate(mgmt->ctxHash, pIter); continue; } - + if (QW_QUERY_RUNNING(ctx)) { qwKillTaskHandle(ctx, TSDB_CODE_VND_STOPPED); } else if (!QW_EVENT_PROCESSED(ctx, QW_EVENT_DROP)) { From a6fff957958d328e582613b8be36110cb0175da0 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Fri, 9 Dec 2022 16:51:18 +0800 Subject: [PATCH 56/97] fix: close wal ref --- include/libs/wal/wal.h | 20 ++++++++++---------- source/dnode/vnode/src/tq/tq.c | 14 ++++++++++---- source/libs/wal/src/walMgmt.c | 1 + source/libs/wal/src/walRef.c | 7 +++++-- 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/include/libs/wal/wal.h b/include/libs/wal/wal.h index 8b9fc84334..a1ae1e429d 100644 --- a/include/libs/wal/wal.h +++ b/include/libs/wal/wal.h @@ -33,16 +33,16 @@ extern "C" { #define wTrace(...) { if (wDebugFlag & DEBUG_TRACE) { taosPrintLog("WAL ", DEBUG_TRACE, wDebugFlag, __VA_ARGS__); }} // clang-format on -#define WAL_PROTO_VER 0 -#define WAL_NOSUFFIX_LEN 20 -#define WAL_SUFFIX_AT (WAL_NOSUFFIX_LEN + 1) -#define WAL_LOG_SUFFIX "log" -#define WAL_INDEX_SUFFIX "idx" -#define WAL_REFRESH_MS 1000 -#define WAL_PATH_LEN (TSDB_FILENAME_LEN + 12) -#define WAL_FILE_LEN (WAL_PATH_LEN + 32) -#define WAL_MAGIC 0xFAFBFCFDF4F3F2F1ULL -#define WAL_SCAN_BUF_SIZE (1024 * 1024 * 3) +#define WAL_PROTO_VER 0 +#define WAL_NOSUFFIX_LEN 20 +#define WAL_SUFFIX_AT (WAL_NOSUFFIX_LEN + 1) +#define WAL_LOG_SUFFIX "log" +#define WAL_INDEX_SUFFIX "idx" +#define WAL_REFRESH_MS 1000 +#define WAL_PATH_LEN (TSDB_FILENAME_LEN + 12) +#define WAL_FILE_LEN (WAL_PATH_LEN + 32) +#define WAL_MAGIC 0xFAFBFCFDF4F3F2F1ULL +#define WAL_SCAN_BUF_SIZE (1024 * 1024 * 3) typedef enum { TAOS_WAL_WRITE = 1, diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 191fc1b49c..389c8013f9 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -725,9 +725,15 @@ int32_t tqProcessDeleteSubReq(STQ* pTq, int64_t version, char* msg, int32_t msgL } taosWUnLockLatch(&pTq->pushLock); - code = taosHashRemove(pTq->pHandle, pReq->subKey, strlen(pReq->subKey)); - if (code != 0) { - tqError("cannot process tq delete req %s, since no such handle", pReq->subKey); + STqHandle* pHandle = taosHashGet(pTq->pHandle, pReq->subKey, strlen(pReq->subKey)); + if (pHandle) { + if (pHandle->pRef) { + walCloseRef(pTq->pVnode->pWal, pHandle->pRef->refId); + } + code = taosHashRemove(pTq->pHandle, pReq->subKey, strlen(pReq->subKey)); + if (code != 0) { + tqError("cannot process tq delete req %s, since no such handle", pReq->subKey); + } } code = tqOffsetDelete(pTq->pOffsetStore, pReq->subKey); @@ -736,7 +742,7 @@ int32_t tqProcessDeleteSubReq(STQ* pTq, int64_t version, char* msg, int32_t msgL } if (tqMetaDeleteHandle(pTq, pReq->subKey) < 0) { - ASSERT(0); + tqError("cannot process tq delete req %s, since no such offset in tdb", pReq->subKey); } return 0; } diff --git a/source/libs/wal/src/walMgmt.c b/source/libs/wal/src/walMgmt.c index f53088fac6..702d05f576 100644 --- a/source/libs/wal/src/walMgmt.c +++ b/source/libs/wal/src/walMgmt.c @@ -223,6 +223,7 @@ void walClose(SWal *pWal) { taosMemoryFree(pRef); } taosHashCleanup(pWal->pRefHash); + pWal->pRefHash = NULL; taosThreadMutexUnlock(&pWal->mutex); taosRemoveRef(tsWal.refSetId, pWal->refId); diff --git a/source/libs/wal/src/walRef.c b/source/libs/wal/src/walRef.c index eae5d9f1a7..e86111109c 100644 --- a/source/libs/wal/src/walRef.c +++ b/source/libs/wal/src/walRef.c @@ -32,15 +32,18 @@ SWalRef *walOpenRef(SWal *pWal) { return pRef; } -#if 1 void walCloseRef(SWal *pWal, int64_t refId) { SWalRef **ppRef = taosHashGet(pWal->pRefHash, &refId, sizeof(int64_t)); if (ppRef == NULL) return; SWalRef *pRef = *ppRef; + if (pRef) { + wDebug("vgId:%d, wal close ref %" PRId64 ", refId %" PRId64, pWal->cfg.vgId, pRef->refVer, pRef->refId); + } else { + wDebug("vgId:%d, wal close ref null, refId %" PRId64, pWal->cfg.vgId, refId); + } taosHashRemove(pWal->pRefHash, &refId, sizeof(int64_t)); taosMemoryFree(pRef); } -#endif int32_t walRefVer(SWalRef *pRef, int64_t ver) { SWal *pWal = pRef->pWal; From 6f663c3035db3c9c828c2f7a3e33056eed9a5443 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 9 Dec 2022 17:21:27 +0800 Subject: [PATCH 57/97] release: build 3.0.2.0 --- cmake/cmake.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cmake.version b/cmake/cmake.version index 9faa7c75dd..b4084bd095 100644 --- a/cmake/cmake.version +++ b/cmake/cmake.version @@ -2,7 +2,7 @@ IF (DEFINED VERNUMBER) SET(TD_VER_NUMBER ${VERNUMBER}) ELSE () - SET(TD_VER_NUMBER "3.0.1.8") + SET(TD_VER_NUMBER "3.0.2.0") ENDIF () IF (DEFINED VERCOMPATIBLE) From fbc7c9cd530a207f28faa7dae9d4501024ff7832 Mon Sep 17 00:00:00 2001 From: huolibo Date: Fri, 9 Dec 2022 18:09:24 +0800 Subject: [PATCH 58/97] docs: add 3.0.3 & 2.0.42 version desc (#18856) --- docs/en/14-reference/03-connector/04-java.mdx | 2 + docs/zh/08-connector/14-java.mdx | 217 +++++++++--------- 2 files changed, 107 insertions(+), 112 deletions(-) diff --git a/docs/en/14-reference/03-connector/04-java.mdx b/docs/en/14-reference/03-connector/04-java.mdx index 7b3440ebac..c37738b3f8 100644 --- a/docs/en/14-reference/03-connector/04-java.mdx +++ b/docs/en/14-reference/03-connector/04-java.mdx @@ -878,8 +878,10 @@ The source code of the sample application is under `TDengine/examples/JDBC`: | taos-jdbcdriver version | major changes | | :---------------------: | :--------------------------------------------: | +| 3.0.3 | fix timestamp resolution error for REST connection in jdk17+ version | | 3.0.1 - 3.0.2 | fix the resultSet data is parsed incorrectly sometimes. 3.0.1 is compiled on JDK 11, you are advised to use 3.0.2 in the JDK 8 environment | | 3.0.0 | Support for TDengine 3.0 | +| 2.0.42 | fix wasNull interface return value in WebSocket connection | | 2.0.41 | fix decode method of username and password in REST connection | | 2.0.39 - 2.0.40 | Add REST connection/request timeout parameters | | 2.0.38 | JDBC REST connections add bulk pull function | diff --git a/docs/zh/08-connector/14-java.mdx b/docs/zh/08-connector/14-java.mdx index 1ee59d2df4..fc6dc57138 100644 --- a/docs/zh/08-connector/14-java.mdx +++ b/docs/zh/08-connector/14-java.mdx @@ -68,39 +68,38 @@ TDengine 目前支持时间戳、数字、字符、布尔类型,与 Java 对 ### 安装连接器 - + - 目前 taos-jdbcdriver 已经发布到 [Sonatype Repository](https://search.maven.org/artifact/com.taosdata.jdbc/taos-jdbcdriver) - 仓库,且各大仓库都已同步。 +目前 taos-jdbcdriver 已经发布到 [Sonatype Repository](https://search.maven.org/artifact/com.taosdata.jdbc/taos-jdbcdriver) 仓库,且各大仓库都已同步。 - - [sonatype](https://search.maven.org/artifact/com.taosdata.jdbc/taos-jdbcdriver) - - [mvnrepository](https://mvnrepository.com/artifact/com.taosdata.jdbc/taos-jdbcdriver) - - [maven.aliyun](https://maven.aliyun.com/mvn/search) +- [sonatype](https://search.maven.org/artifact/com.taosdata.jdbc/taos-jdbcdriver) +- [mvnrepository](https://mvnrepository.com/artifact/com.taosdata.jdbc/taos-jdbcdriver) +- [maven.aliyun](https://maven.aliyun.com/mvn/search) - Maven 项目中,在 pom.xml 中添加以下依赖: +Maven 项目中,在 pom.xml 中添加以下依赖: - ```xml-dtd - - com.taosdata.jdbc - taos-jdbcdriver - 3.0.0 - - ``` +```xml-dtd + + com.taosdata.jdbc + taos-jdbcdriver + 3.0.0 + +``` - - + + - 可以通过下载 TDengine 的源码,自己编译最新版本的 Java connector +可以通过下载 TDengine 的源码,自己编译最新版本的 Java connector - ```shell - git clone https://github.com/taosdata/taos-connector-jdbc.git - cd taos-connector-jdbc - mvn clean install -Dmaven.test.skip=true - ``` +```shell +git clone https://github.com/taosdata/taos-connector-jdbc.git +cd taos-connector-jdbc +mvn clean install -Dmaven.test.skip=true +``` - 编译后,在 target 目录下会产生 taos-jdbcdriver-3.0.*-dist.jar 的 jar 包,并自动将编译的 jar 文件放在本地的 Maven 仓库中。 +编译后,在 target 目录下会产生 taos-jdbcdriver-3.0.*-dist.jar 的 jar 包,并自动将编译的 jar 文件放在本地的 Maven 仓库中。 - + ## 建立连接 @@ -111,125 +110,117 @@ TDengine 的 JDBC URL 规范格式为: 对于建立连接,原生连接与 REST 连接有细微不同。 - + - ```java - Class.forName("com.taosdata.jdbc.TSDBDriver"); - String jdbcUrl = "jdbc:TAOS://taosdemo.com:6030/test?user=root&password=taosdata"; - Connection conn = DriverManager.getConnection(jdbcUrl); - ``` +```java +Class.forName("com.taosdata.jdbc.TSDBDriver"); +String jdbcUrl = "jdbc:TAOS://taosdemo.com:6030/test?user=root&password=taosdata"; +Connection conn = DriverManager.getConnection(jdbcUrl); +``` - 以上示例,使用了 JDBC 原生连接的 TSDBDriver,建立了到 hostname 为 taosdemo.com,端口为 6030(TDengine 的默认端口),数据库名为 test 的连接。这个 URL - 中指定用户名(user)为 root,密码(password)为 taosdata。 +以上示例,使用了 JDBC 原生连接的 TSDBDriver,建立了到 hostname 为 taosdemo.com,端口为 6030(TDengine 的默认端口),数据库名为 test 的连接。这个 URL +中指定用户名(user)为 root,密码(password)为 taosdata。 - **注意**:使用 JDBC 原生连接,taos-jdbcdriver 需要依赖客户端驱动(Linux 下是 libtaos.so;Windows 下是 taos.dll;macOS 下是 libtaos.dylib)。 +**注意**:使用 JDBC 原生连接,taos-jdbcdriver 需要依赖客户端驱动(Linux 下是 libtaos.so;Windows 下是 taos.dll;macOS 下是 libtaos.dylib)。 - url 中的配置参数如下: +url 中的配置参数如下: - - user:登录 TDengine 用户名,默认值 'root'。 - - password:用户登录密码,默认值 'taosdata'。 - - cfgdir:客户端配置文件目录路径,Linux OS 上默认值 `/etc/taos`,Windows OS 上默认值 `C:/TDengine/cfg`。 - - charset:客户端使用的字符集,默认值为系统字符集。 - - locale:客户端语言环境,默认值系统当前 locale。 - - timezone:客户端使用的时区,默认值为系统当前时区。 - - batchfetch: true:在执行查询时批量拉取结果集;false:逐行拉取结果集。默认值为:true。开启批量拉取同时获取一批数据在查询数据量较大时批量拉取可以有效的提升查询性能。 - - batchErrorIgnore:true:在执行 Statement 的 executeBatch 时,如果中间有一条 SQL 执行失败将继续执行下面的 SQL。false:不再执行失败 SQL - 后的任何语句。默认值为:false。 +- user:登录 TDengine 用户名,默认值 'root'。 +- password:用户登录密码,默认值 'taosdata'。 +- cfgdir:客户端配置文件目录路径,Linux OS 上默认值 `/etc/taos`,Windows OS 上默认值 `C:/TDengine/cfg`。 +- charset:客户端使用的字符集,默认值为系统字符集。 +- locale:客户端语言环境,默认值系统当前 locale。 +- timezone:客户端使用的时区,默认值为系统当前时区。 +- batchfetch: true:在执行查询时批量拉取结果集;false:逐行拉取结果集。默认值为:true。开启批量拉取同时获取一批数据在查询数据量较大时批量拉取可以有效的提升查询性能。 +- batchErrorIgnore:true:在执行 Statement 的 executeBatch 时,如果中间有一条 SQL 执行失败将继续执行下面的 SQL。false:不再执行失败 SQL 后的任何语句。默认值为:false。 - JDBC 原生连接的使用请参见[视频教程](https://www.taosdata.com/blog/2020/11/11/1955.html)。 +JDBC 原生连接的使用请参见[视频教程](https://www.taosdata.com/blog/2020/11/11/1955.html)。 - **使用 TDengine 客户端驱动配置文件建立连接 ** +**使用 TDengine 客户端驱动配置文件建立连接 ** - 当使用 JDBC 原生连接连接 TDengine 集群时,可以使用 TDengine 客户端驱动配置文件,在配置文件中指定集群的 firstEp、secondEp 等参数。如下所示: +当使用 JDBC 原生连接连接 TDengine 集群时,可以使用 TDengine 客户端驱动配置文件,在配置文件中指定集群的 firstEp、secondEp 等参数。如下所示: - 1. 在 Java 应用中不指定 hostname 和 port +1. 在 Java 应用中不指定 hostname 和 port - ```java - public Connection getConn() throws Exception{ - Class.forName("com.taosdata.jdbc.TSDBDriver"); - String jdbcUrl = "jdbc:TAOS://:/test?user=root&password=taosdata"; - Properties connProps = new Properties(); - connProps.setProperty(TSDBDriver.PROPERTY_KEY_CHARSET, "UTF-8"); - connProps.setProperty(TSDBDriver.PROPERTY_KEY_LOCALE, "en_US.UTF-8"); - connProps.setProperty(TSDBDriver.PROPERTY_KEY_TIME_ZONE, "UTC-8"); - Connection conn = DriverManager.getConnection(jdbcUrl, connProps); - return conn; - } - ``` +```java +public Connection getConn() throws Exception{ + Class.forName("com.taosdata.jdbc.TSDBDriver"); + String jdbcUrl = "jdbc:TAOS://:/test?user=root&password=taosdata"; + Properties connProps = new Properties(); + connProps.setProperty(TSDBDriver.PROPERTY_KEY_CHARSET, "UTF-8"); + connProps.setProperty(TSDBDriver.PROPERTY_KEY_LOCALE, "en_US.UTF-8"); + connProps.setProperty(TSDBDriver.PROPERTY_KEY_TIME_ZONE, "UTC-8"); + Connection conn = DriverManager.getConnection(jdbcUrl, connProps); + return conn; +} +``` - 2. 在配置文件中指定 firstEp 和 secondEp +2. 在配置文件中指定 firstEp 和 secondEp - ```shell - # first fully qualified domain name (FQDN) for TDengine system - firstEp cluster_node1:6030 +```shell +# first fully qualified domain name (FQDN) for TDengine system +firstEp cluster_node1:6030 - # second fully qualified domain name (FQDN) for TDengine system, for cluster only - secondEp cluster_node2:6030 +# second fully qualified domain name (FQDN) for TDengine system, for cluster only +secondEp cluster_node2:6030 - # default system charset - # charset UTF-8 +# default system charset +# charset UTF-8 - # system locale - # locale en_US.UTF-8 - ``` +# system locale +# locale en_US.UTF-8 +``` - 以上示例,jdbc 会使用客户端的配置文件,建立到 hostname 为 cluster_node1、端口为 6030、数据库名为 test 的连接。当集群中 firstEp 节点失效时,JDBC 会尝试使用 secondEp - 连接集群。 +以上示例,jdbc 会使用客户端的配置文件,建立到 hostname 为 cluster_node1、端口为 6030、数据库名为 test 的连接。当集群中 firstEp 节点失效时,JDBC 会尝试使用 secondEp 连接集群。 - TDengine 中,只要保证 firstEp 和 secondEp 中一个节点有效,就可以正常建立到集群的连接。 +TDengine 中,只要保证 firstEp 和 secondEp 中一个节点有效,就可以正常建立到集群的连接。 - > **注意**:这里的配置文件指的是调用 JDBC Connector 的应用程序所在机器上的配置文件,Linux OS 上默认值 /etc/taos/taos.cfg ,Windows OS 上默认值 - C://TDengine/cfg/taos.cfg。 +> **注意**:这里的配置文件指的是调用 JDBC Connector 的应用程序所在机器上的配置文件,Linux OS 上默认值 /etc/taos/taos.cfg ,Windows OS 上默认值 C://TDengine/cfg/taos.cfg。 - - + + - ```java - Class.forName("com.taosdata.jdbc.rs.RestfulDriver"); - String jdbcUrl = "jdbc:TAOS-RS://taosdemo.com:6041/test?user=root&password=taosdata"; - Connection conn = DriverManager.getConnection(jdbcUrl); - ``` +```java +Class.forName("com.taosdata.jdbc.rs.RestfulDriver"); +String jdbcUrl = "jdbc:TAOS-RS://taosdemo.com:6041/test?user=root&password=taosdata"; +Connection conn = DriverManager.getConnection(jdbcUrl); +``` - 以上示例,使用了 JDBC REST 连接的 RestfulDriver,建立了到 hostname 为 taosdemo.com,端口为 6041,数据库名为 test 的连接。这个 URL 中指定用户名(user)为 - root,密码(password)为 taosdata。 +以上示例,使用了 JDBC REST 连接的 RestfulDriver,建立了到 hostname 为 taosdemo.com,端口为 6041,数据库名为 test 的连接。这个 URL 中指定用户名(user)为 root,密码(password)为 taosdata。 - 使用 JDBC REST 连接,不需要依赖客户端驱动。与 JDBC 原生连接相比,仅需要: +使用 JDBC REST 连接,不需要依赖客户端驱动。与 JDBC 原生连接相比,仅需要: - 1. driverClass 指定为“com.taosdata.jdbc.rs.RestfulDriver”; - 2. jdbcUrl 以“jdbc:TAOS-RS://”开头; - 3. 使用 6041 作为连接端口。 +1. driverClass 指定为“com.taosdata.jdbc.rs.RestfulDriver”; +2. jdbcUrl 以“jdbc:TAOS-RS://”开头; +3. 使用 6041 作为连接端口。 - url 中的配置参数如下: +url 中的配置参数如下: - - user:登录 TDengine 用户名,默认值 'root'。 - - password:用户登录密码,默认值 'taosdata'。 - - batchfetch: true:在执行查询时批量拉取结果集;false:逐行拉取结果集。默认值为:false。逐行拉取结果集使用 HTTP 方式进行数据传输。JDBC REST - 连接支持批量拉取数据功能。taos-jdbcdriver 与 TDengine 之间通过 WebSocket 连接进行数据传输。相较于 HTTP,WebSocket 可以使 JDBC REST 连接支持大数据量查询,并提升查询性能。 - - charset: 当开启批量拉取数据时,指定解析字符串数据的字符集。 - - batchErrorIgnore:true:在执行 Statement 的 executeBatch 时,如果中间有一条 SQL 执行失败,继续执行下面的 SQL 了。false:不再执行失败 SQL - 后的任何语句。默认值为:false。 - - httpConnectTimeout: 连接超时时间,单位 ms, 默认值为 5000。 - - httpSocketTimeout: socket 超时时间,单位 ms,默认值为 5000。仅在 batchfetch 设置为 false 时生效。 - - messageWaitTimeout: 消息超时时间, 单位 ms, 默认值为 3000。 仅在 batchfetch 设置为 true 时生效。 - - useSSL: 连接中是否使用 SSL。 +- user:登录 TDengine 用户名,默认值 'root'。 +- password:用户登录密码,默认值 'taosdata'。 +- batchfetch: true:在执行查询时批量拉取结果集;false:逐行拉取结果集。默认值为:false。逐行拉取结果集使用 HTTP 方式进行数据传输。JDBC REST 连接支持批量拉取数据功能。taos-jdbcdriver 与 TDengine 之间通过 WebSocket 连接进行数据传输。相较于 HTTP,WebSocket 可以使 JDBC REST 连接支持大数据量查询,并提升查询性能。 +- charset: 当开启批量拉取数据时,指定解析字符串数据的字符集。 +- batchErrorIgnore:true:在执行 Statement 的 executeBatch 时,如果中间有一条 SQL 执行失败,继续执行下面的 SQL 了。false:不再执行失败 SQL 后的任何语句。默认值为:false。 +- httpConnectTimeout: 连接超时时间,单位 ms, 默认值为 5000。 +- httpSocketTimeout: socket 超时时间,单位 ms,默认值为 5000。仅在 batchfetch 设置为 false 时生效。 +- messageWaitTimeout: 消息超时时间, 单位 ms, 默认值为 3000。 仅在 batchfetch 设置为 true 时生效。 +- useSSL: 连接中是否使用 SSL。 - **注意**:部分配置项(比如:locale、timezone)在 REST 连接中不生效。 +**注意**:部分配置项(比如:locale、timezone)在 REST 连接中不生效。 - :::note +:::note - - 与原生连接方式不同,REST 接口是无状态的。在使用 JDBC REST 连接时,需要在 SQL 中指定表、超级表的数据库名称。例如: +- 与原生连接方式不同,REST 接口是无状态的。在使用 JDBC REST 连接时,需要在 SQL 中指定表、超级表的数据库名称。例如: - ```sql - INSERT INTO test.t1 USING test.weather (ts, temperature) TAGS('California.SanFrancisco') VALUES(now, 24.6); - ``` +```sql +INSERT INTO test.t1 USING test.weather (ts, temperature) TAGS('California.SanFrancisco') VALUES(now, 24.6); +``` - - 如果在 url 中指定了 dbname,那么,JDBC REST 连接会默认使用/rest/sql/dbname 作为 restful 请求的 url,在 SQL 中不需要指定 dbname。例如:url 为 - jdbc:TAOS-RS://127.0.0.1:6041/test,那么,可以执行 sql:insert into t1 using weather(ts, temperature) - tags('California.SanFrancisco') values(now, 24.6); +- 如果在 url 中指定了 dbname,那么,JDBC REST 连接会默认使用/rest/sql/dbname 作为 restful 请求的 url,在 SQL 中不需要指定 dbname。例如:url 为 jdbc:TAOS-RS://127.0.0.1:6041/test,那么,可以执行 sql:insert into t1 using weather(ts, temperature) tags('California.SanFrancisco') values(now, 24.6); - ::: +::: - + ### 指定 URL 和 Properties 获取连接 @@ -890,8 +881,10 @@ public static void main(String[] args) throws Exception { | taos-jdbcdriver 版本 | 主要变化 | | :------------------: | :----------------------------: | +| 3.0.3 | 修复 REST 连接在 jdk17+ 版本时间戳解析错误问题 | | 3.0.1 - 3.0.2 | 修复一些情况下结果集数据解析错误的问题。3.0.1 在 JDK 11 环境编译,JDK 8 环境下建议使用 3.0.2 版本 | | 3.0.0 | 支持 TDengine 3.0 | +| 2.0.42 | 修在 WebSocket 连接中 wasNull 接口返回值 | | 2.0.41 | 修正 REST 连接中用户名和密码转码方式 | | 2.0.39 - 2.0.40 | 增加 REST 连接/请求 超时设置 | | 2.0.38 | JDBC REST 连接增加批量拉取功能 | @@ -928,7 +921,7 @@ public static void main(String[] args) throws Exception { **原因**:taos-jdbcdriver 3.0.1 版本需要在 JDK 11+ 环境使用。 -**解决方法**: 更换 taos-jdbcdriver 3.0.2 版本。 +**解决方法**: 更换 taos-jdbcdriver 3.0.2+ 版本。 其它问题请参考 [FAQ](../../../train-faq/faq) From 44dc2564ebb13acf571867e4faf441da38ec222d Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 9 Dec 2022 21:07:03 +0800 Subject: [PATCH 59/97] fix(query): return with error code if the table does not exist during creating tsdbReader --- source/dnode/vnode/src/tsdb/tsdbRead.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index a4581f5472..9afc0ae7e8 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -3827,12 +3827,17 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, void* pTableL pReader->pSchema = metaGetTbTSchema(pReader->pTsdb->pVnode->pMeta, pReader->suid, -1, 1); if (pReader->pSchema == NULL) { tsdbError("failed to get table schema, suid:%" PRIu64 ", ver:-1, %s", pReader->suid, pReader->idStr); + // no valid error code set in metaGetTbTSchema, so let's set the error code here. + code = TSDB_CODE_PAR_TABLE_NOT_EXIST; + goto _err; } } else if (numOfTables > 0) { STableKeyInfo* pKey = pTableList; pReader->pSchema = metaGetTbTSchema(pReader->pTsdb->pVnode->pMeta, pKey->uid, -1, 1); if (pReader->pSchema == NULL) { tsdbError("failed to get table schema, uid:%" PRIu64 ", ver:-1, %s", pKey->uid, pReader->idStr); + code = TSDB_CODE_PAR_TABLE_NOT_EXIST; + goto _err; } } @@ -3840,7 +3845,7 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, void* pTableL updateBlockSMAInfo(pReader->pSchema, &pReader->suppInfo); } - STsdbReader* p = (pReader->innerReader[0] != NULL)? pReader->innerReader[0]:pReader; + STsdbReader* p = (pReader->innerReader[0] != NULL) ? pReader->innerReader[0] : pReader; pReader->status.pTableMap = createDataBlockScanInfo(p, &pReader->blockInfoBuf, pTableList, numOfTables); if (pReader->status.pTableMap == NULL) { tsdbReaderClose(p); @@ -3888,10 +3893,11 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, void* pTableL tsdbDebug("%p total numOfTable:%d in this query %s", pReader, numOfTables, pReader->idStr); return code; - _err: +_err: tsdbError("failed to create data reader, code:%s %s", tstrerror(code), idstr); + tsdbReaderClose(pReader); return code; - } +} void tsdbReaderClose(STsdbReader* pReader) { if (pReader == NULL) { From c5db51f484da4137ace02d8afbc28a2c7ba44803 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 9 Dec 2022 21:48:48 +0800 Subject: [PATCH 60/97] fix mem leak --- source/dnode/vnode/src/meta/metaCache.c | 38 ++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/source/dnode/vnode/src/meta/metaCache.c b/source/dnode/vnode/src/meta/metaCache.c index 0ed68dce95..84f3094b23 100644 --- a/source/dnode/vnode/src/meta/metaCache.c +++ b/source/dnode/vnode/src/meta/metaCache.c @@ -32,9 +32,9 @@ typedef struct SMetaStbStatsEntry { } SMetaStbStatsEntry; typedef struct STagFilterResEntry { - uint64_t suid; // uid for super table - SList list; // the linked list of md5 digest, extracted from the serialized tag query condition - uint32_t qTimes;// queried times for current super table + uint64_t suid; // uid for super table + SList list; // the linked list of md5 digest, extracted from the serialized tag query condition + uint32_t qTimes; // queried times for current super table } STagFilterResEntry; struct SMetaCache { @@ -126,13 +126,14 @@ int32_t metaCacheOpen(SMeta* pMeta) { goto _err2; } - pCache->sTagFilterResCache.pUidResCache = taosLRUCacheInit(5*1024*1024, -1, 0.5); + pCache->sTagFilterResCache.pUidResCache = taosLRUCacheInit(5 * 1024 * 1024, -1, 0.5); if (pCache->sTagFilterResCache.pUidResCache == NULL) { code = TSDB_CODE_OUT_OF_MEMORY; goto _err2; } - pCache->sTagFilterResCache.pTableEntry = taosHashInit(1024, taosGetDefaultHashFunction(TSDB_DATA_TYPE_VARCHAR), false, HASH_NO_LOCK); + pCache->sTagFilterResCache.pTableEntry = + taosHashInit(1024, taosGetDefaultHashFunction(TSDB_DATA_TYPE_VARCHAR), false, HASH_NO_LOCK); if (pCache->sTagFilterResCache.pTableEntry == NULL) { code = TSDB_CODE_OUT_OF_MEMORY; goto _err2; @@ -419,7 +420,8 @@ int32_t metaStatsCacheGet(SMeta* pMeta, int64_t uid, SMetaStbStats* pInfo) { return code; } -int32_t metaGetCachedTableUidList(SMeta* pMeta, tb_uid_t suid, const uint8_t* pKey, int32_t keyLen, SArray* pList1, bool* acquireRes) { +int32_t metaGetCachedTableUidList(SMeta* pMeta, tb_uid_t suid, const uint8_t* pKey, int32_t keyLen, SArray* pList1, + bool* acquireRes) { uint64_t* pBuf = pMeta->pCache->sTagFilterResCache.keyBuf; // generate the composed key for LRU cache @@ -428,8 +430,8 @@ int32_t metaGetCachedTableUidList(SMeta* pMeta, tb_uid_t suid, const uint8_t* pK pBuf[0] = suid; memcpy(&pBuf[1], pKey, keyLen); - int32_t len = keyLen + sizeof(uint64_t); - LRUHandle *pHandle = taosLRUCacheLookup(pCache, pBuf, len); + int32_t len = keyLen + sizeof(uint64_t); + LRUHandle* pHandle = taosLRUCacheLookup(pCache, pBuf, len); if (pHandle == NULL) { *acquireRes = 0; return TSDB_CODE_SUCCESS; @@ -439,7 +441,7 @@ int32_t metaGetCachedTableUidList(SMeta* pMeta, tb_uid_t suid, const uint8_t* pK *acquireRes = 1; const char* p = taosLRUCacheValue(pMeta->pCache->sTagFilterResCache.pUidResCache, pHandle); - int32_t size = *(int32_t*) p; + int32_t size = *(int32_t*)p; taosArrayAddBatch(pList1, p + sizeof(int32_t), size); (*pEntry)->qTimes += 1; @@ -467,12 +469,14 @@ int32_t metaGetCachedTableUidList(SMeta* pMeta, tb_uid_t suid, const uint8_t* pK // remove the keys, of which query uid lists have been replaced already. size_t s = taosArrayGetSize(pList); - for(int32_t i = 0; i < s; ++i) { + for (int32_t i = 0; i < s; ++i) { SListNode** p1 = taosArrayGet(pList, i); tdListPopNode(&(*pEntry)->list, *p1); } - (*pEntry)->qTimes = 0; // reset the query times + (*pEntry)->qTimes = 0; // reset the query times + + taosArrayDestroy(pList); } } @@ -487,7 +491,8 @@ static void freePayload(const void* key, size_t keyLen, void* value) { } // check both the payload size and selectivity ratio -int32_t metaUidFilterCachePut(SMeta* pMeta, uint64_t suid, const void* pKey, int32_t keyLen, void* pPayload, int32_t payloadLen, double selectivityRatio) { +int32_t metaUidFilterCachePut(SMeta* pMeta, uint64_t suid, const void* pKey, int32_t keyLen, void* pPayload, + int32_t payloadLen, double selectivityRatio) { if (selectivityRatio > tsSelectivityRatio) { metaDebug("vgId:%d, suid:%" PRIu64 " failed to add to uid list cache, due to selectivity ratio %.2f less than threshold %.2f", @@ -525,9 +530,10 @@ int32_t metaUidFilterCachePut(SMeta* pMeta, uint64_t suid, const void* pKey, int ASSERT(sizeof(uint64_t) + keyLen == 24); // add to cache. - taosLRUCacheInsert(pCache, pBuf, sizeof(uint64_t) + keyLen, pPayload, payloadLen, freePayload, NULL, TAOS_LRU_PRIORITY_LOW); - metaDebug("vgId:%d, suid:%"PRIu64" list cache added into cache, total:%d, tables:%d", TD_VID(pMeta->pVnode), - suid, (int32_t) taosLRUCacheGetUsage(pCache), taosHashGetSize(pTableEntry)); + taosLRUCacheInsert(pCache, pBuf, sizeof(uint64_t) + keyLen, pPayload, payloadLen, freePayload, NULL, + TAOS_LRU_PRIORITY_LOW); + metaDebug("vgId:%d, suid:%" PRIu64 " list cache added into cache, total:%d, tables:%d", TD_VID(pMeta->pVnode), suid, + (int32_t)taosLRUCacheGetUsage(pCache), taosHashGetSize(pTableEntry)); return TSDB_CODE_SUCCESS; } @@ -539,7 +545,7 @@ int32_t metaUidCacheClear(SMeta* pMeta, uint64_t suid) { return TSDB_CODE_SUCCESS; } - int32_t keyLen = sizeof(uint64_t) * 3; + int32_t keyLen = sizeof(uint64_t) * 3; uint64_t p[3] = {0}; p[0] = suid; From e7e34456fb4630a6c2eaad2a2159993f3e8f28fe Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 9 Dec 2022 22:25:26 +0800 Subject: [PATCH 61/97] fix mem leak --- source/dnode/vnode/src/meta/metaCache.c | 1 + source/libs/executor/src/groupoperator.c | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/source/dnode/vnode/src/meta/metaCache.c b/source/dnode/vnode/src/meta/metaCache.c index 84f3094b23..37dcec4f85 100644 --- a/source/dnode/vnode/src/meta/metaCache.c +++ b/source/dnode/vnode/src/meta/metaCache.c @@ -472,6 +472,7 @@ int32_t metaGetCachedTableUidList(SMeta* pMeta, tb_uid_t suid, const uint8_t* pK for (int32_t i = 0; i < s; ++i) { SListNode** p1 = taosArrayGet(pList, i); tdListPopNode(&(*pEntry)->list, *p1); + taosMemoryFree(*p1); } (*pEntry)->qTimes = 0; // reset the query times diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index 2cd1bd7dec..1a43ddecdd 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -314,7 +314,8 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) { } int32_t rowIndex = j - num; - applyAggFunctionOnPartialTuples(pTaskInfo, pCtx, NULL, rowIndex, num, pBlock->info.rows, pOperator->exprSupp.numOfExprs); + applyAggFunctionOnPartialTuples(pTaskInfo, pCtx, NULL, rowIndex, num, pBlock->info.rows, + pOperator->exprSupp.numOfExprs); // assign the group keys or user input constant values if required doAssignGroupKeys(pCtx, pOperator->exprSupp.numOfExprs, pBlock->info.rows, rowIndex); @@ -331,7 +332,8 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) { } int32_t rowIndex = pBlock->info.rows - num; - applyAggFunctionOnPartialTuples(pTaskInfo, pCtx, NULL, rowIndex, num, pBlock->info.rows, pOperator->exprSupp.numOfExprs); + applyAggFunctionOnPartialTuples(pTaskInfo, pCtx, NULL, rowIndex, num, pBlock->info.rows, + pOperator->exprSupp.numOfExprs); doAssignGroupKeys(pCtx, pOperator->exprSupp.numOfExprs, pBlock->info.rows, rowIndex); } } @@ -469,8 +471,8 @@ SOperatorInfo* createGroupOperatorInfo(SOperatorInfo* downstream, SAggPhysiNode* initResultRowInfo(&pInfo->binfo.resultRowInfo); setOperatorInfo(pOperator, "GroupbyAggOperator", 0, true, OP_NOT_OPENED, pInfo, pTaskInfo); - pOperator->fpSet = - createOperatorFpSet(optrDummyOpenFn, hashGroupbyAggregate, NULL, destroyGroupOperatorInfo, optrDefaultBufFn, NULL); + pOperator->fpSet = createOperatorFpSet(optrDummyOpenFn, hashGroupbyAggregate, NULL, destroyGroupOperatorInfo, + optrDefaultBufFn, NULL); code = appendDownstream(pOperator, &downstream, 1); if (code != TSDB_CODE_SUCCESS) { goto _error; @@ -776,6 +778,12 @@ static void destroyPartitionOperatorInfo(void* param) { taosArrayDestroy(pInfo->pGroupColVals); taosMemoryFree(pInfo->keyBuf); + + int32_t size = taosArrayGetSize(pInfo->sortedGroupArray); + for (int32_t i = 0; i < size; i++) { + SDataGroupInfo* pGp = taosArrayGet(pInfo->sortedGroupArray, i); + taosArrayDestroy(pGp->pPageList); + } taosArrayDestroy(pInfo->sortedGroupArray); void* pGroupIter = taosHashIterate(pInfo->pGroupSet, NULL); @@ -850,7 +858,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition pOperator->exprSupp.numOfExprs = numOfCols; pOperator->exprSupp.pExprInfo = pExprInfo; - pOperator->fpSet = createOperatorFpSet(optrDummyOpenFn, hashPartition, NULL, destroyPartitionOperatorInfo, optrDefaultBufFn, NULL); + pOperator->fpSet = + createOperatorFpSet(optrDummyOpenFn, hashPartition, NULL, destroyPartitionOperatorInfo, optrDefaultBufFn, NULL); code = appendDownstream(pOperator, &downstream, 1); return pOperator; @@ -1141,8 +1150,8 @@ SOperatorInfo* createStreamPartitionOperatorInfo(SOperatorInfo* downstream, SStr pInfo, pTaskInfo); pOperator->exprSupp.numOfExprs = numOfCols; pOperator->exprSupp.pExprInfo = pExprInfo; - pOperator->fpSet = - createOperatorFpSet(optrDummyOpenFn, doStreamHashPartition, NULL, destroyStreamPartitionOperatorInfo, optrDefaultBufFn, NULL); + pOperator->fpSet = createOperatorFpSet(optrDummyOpenFn, doStreamHashPartition, NULL, + destroyStreamPartitionOperatorInfo, optrDefaultBufFn, NULL); initParDownStream(downstream, &pInfo->partitionSup, &pInfo->scalarSup); code = appendDownstream(pOperator, &downstream, 1); From a57bdd481c93a73050ad1ac6b35b14f02450e31f Mon Sep 17 00:00:00 2001 From: xleili Date: Fri, 9 Dec 2022 22:49:22 +0800 Subject: [PATCH 62/97] docs:release 3.0.2.0 --- docs/en/28-releases/01-tdengine.md | 4 ++++ docs/en/28-releases/02-tools.md | 4 ++++ docs/zh/28-releases/01-tdengine.md | 5 ++++- docs/zh/28-releases/02-tools.md | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/en/28-releases/01-tdengine.md b/docs/en/28-releases/01-tdengine.md index 32bdc21e7c..e33970c407 100644 --- a/docs/en/28-releases/01-tdengine.md +++ b/docs/en/28-releases/01-tdengine.md @@ -10,6 +10,10 @@ For TDengine 2.x installation packages by version, please visit [here](https://w import Release from "/components/ReleaseV3"; +## 3.0.2.0 + + + ## 3.0.1.8 diff --git a/docs/en/28-releases/02-tools.md b/docs/en/28-releases/02-tools.md index 7126b5a997..f2212bb2d4 100644 --- a/docs/en/28-releases/02-tools.md +++ b/docs/en/28-releases/02-tools.md @@ -10,6 +10,10 @@ For other historical version installers, please visit [here](https://www.taosdat import Release from "/components/ReleaseV3"; +## 2.3.2 + + + ## 2.3.0 diff --git a/docs/zh/28-releases/01-tdengine.md b/docs/zh/28-releases/01-tdengine.md index 7ed9e0c5a0..0ea34829a5 100644 --- a/docs/zh/28-releases/01-tdengine.md +++ b/docs/zh/28-releases/01-tdengine.md @@ -10,11 +10,14 @@ TDengine 2.x 各版本安装包请访问[这里](https://www.taosdata.com/all-do import Release from "/components/ReleaseV3"; +## 3.0.2.0 + + + ## 3.0.1.8 - ## 3.0.1.7 diff --git a/docs/zh/28-releases/02-tools.md b/docs/zh/28-releases/02-tools.md index 67ca3fae67..6471826b50 100644 --- a/docs/zh/28-releases/02-tools.md +++ b/docs/zh/28-releases/02-tools.md @@ -10,6 +10,10 @@ taosTools 各版本安装包下载链接如下: import Release from "/components/ReleaseV3"; +## 2.3.2 + + + ## 2.3.0 From ab77b02813cf02d29899129e9725a0760ca4f20f Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sat, 10 Dec 2022 10:55:47 +0800 Subject: [PATCH 63/97] fix: donot print log while assert --- source/util/src/tlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/util/src/tlog.c b/source/util/src/tlog.c index 3825b91c6d..747187254f 100644 --- a/source/util/src/tlog.c +++ b/source/util/src/tlog.c @@ -801,7 +801,7 @@ bool taosAssert(bool condition, const char *file, int32_t line, const char *form taosPrintTrace(flags, level, dflag); if (tsAssert) { - taosCloseLog(); + // taosCloseLog(); taosMsleep(300); #ifdef NDEBUG From 3bce02438ff1ae9aef8bca81eea542d8fd606cd3 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 10 Dec 2022 11:12:54 +0800 Subject: [PATCH 64/97] TD-21115 --- source/libs/transport/src/transCli.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index f3f07ebbb9..03e3fb52c4 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1626,9 +1626,9 @@ bool cliGenRetryRule(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { pCtx->retryNextInterval = pCtx->retryMaxInterval; } - if (-1 != pCtx->retryMaxTimeout && taosGetTimestampMs() - pCtx->retryInitTimestamp >= pCtx->retryMaxTimeout) { - return false; - } + // if (-1 != pCtx->retryMaxTimeout && taosGetTimestampMs() - pCtx->retryInitTimestamp >= pCtx->retryMaxTimeout) { + // return false; + // } } else { pCtx->retryNextInterval = 0; pCtx->epsetRetryCnt++; From c1a68f7f3bfd4d2611c819009db260a554533045 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 10 Dec 2022 12:09:07 +0800 Subject: [PATCH 65/97] fix(query): remove invalid assert and fix the error in memcpy data. --- source/libs/executor/src/timesliceoperator.c | 27 +++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index 2374d80bbf..af3c44d032 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -96,13 +96,26 @@ static void doKeepLinearInfo(STimeSliceOperatorInfo* pSliceInfo, const SSDataBlo if (!pLinearInfo->isStartSet) { if (!colDataIsNull_s(pColInfoData, rowIndex)) { pLinearInfo->start.key = *(int64_t*)colDataGetData(pTsCol, rowIndex); - memcpy(pLinearInfo->start.val, colDataGetData(pColInfoData, rowIndex), pLinearInfo->bytes); + char* p = colDataGetData(pColInfoData, rowIndex); + if (IS_VAR_DATA_TYPE(pColInfoData->info.type)) { + ASSERT(varDataTLen(p) <= pColInfoData->info.bytes); + memcpy(pLinearInfo->start.val, p, varDataTLen(p)); + } else { + memcpy(pLinearInfo->start.val, p, pLinearInfo->bytes); + } } pLinearInfo->isStartSet = true; } else if (!pLinearInfo->isEndSet) { if (!colDataIsNull_s(pColInfoData, rowIndex)) { pLinearInfo->end.key = *(int64_t*)colDataGetData(pTsCol, rowIndex); - memcpy(pLinearInfo->end.val, colDataGetData(pColInfoData, rowIndex), pLinearInfo->bytes); + + char* p = colDataGetData(pColInfoData, rowIndex); + if (IS_VAR_DATA_TYPE(pColInfoData->info.type)) { + ASSERT(varDataTLen(p) <= pColInfoData->info.bytes); + memcpy(pLinearInfo->start.val, p, varDataTLen(p)); + } else { + memcpy(pLinearInfo->start.val, p, pLinearInfo->bytes); + } } pLinearInfo->isEndSet = true; } else { @@ -111,7 +124,15 @@ static void doKeepLinearInfo(STimeSliceOperatorInfo* pSliceInfo, const SSDataBlo if (!colDataIsNull_s(pColInfoData, rowIndex)) { pLinearInfo->end.key = *(int64_t*)colDataGetData(pTsCol, rowIndex); - memcpy(pLinearInfo->end.val, colDataGetData(pColInfoData, rowIndex), pLinearInfo->bytes); + + char* p = colDataGetData(pColInfoData, rowIndex); + if (IS_VAR_DATA_TYPE(pColInfoData->info.type)) { + ASSERT(varDataTLen(p) <= pColInfoData->info.bytes); + memcpy(pLinearInfo->start.val, p, varDataTLen(p)); + } else { + memcpy(pLinearInfo->start.val, p, pLinearInfo->bytes); + } + } else { pLinearInfo->end.key = INT64_MIN; } From 50b66df39f9348191be34ee378b94d90e415896a Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sat, 10 Dec 2022 14:02:57 +0800 Subject: [PATCH 66/97] fix: control rpc qitem memory --- include/util/tqueue.h | 3 ++- source/client/src/clientTmq.c | 12 ++++++------ source/dnode/mgmt/mgmt_mnode/src/mmWorker.c | 2 +- source/dnode/mgmt/mgmt_qnode/src/qmWorker.c | 2 +- source/dnode/mgmt/mgmt_snode/src/smWorker.c | 2 +- source/dnode/mgmt/mgmt_vnode/src/vmWorker.c | 2 +- source/dnode/mgmt/node_mgmt/src/dmTransport.c | 2 +- source/dnode/vnode/src/sma/smaRollup.c | 2 +- source/dnode/vnode/src/tq/tq.c | 4 ++-- source/libs/executor/src/dataDeleter.c | 2 +- source/libs/executor/src/dataDispatcher.c | 2 +- source/libs/stream/src/stream.c | 6 +++--- source/libs/stream/src/streamData.c | 6 +++--- source/libs/stream/src/streamExec.c | 4 ++-- source/libs/sync/test/sync_test_lib/src/syncIO.c | 6 +++--- source/libs/transport/test/svrBench.c | 2 +- source/util/src/tqueue.c | 10 ++++++---- 17 files changed, 36 insertions(+), 33 deletions(-) diff --git a/include/util/tqueue.h b/include/util/tqueue.h index 8b46bbd064..25a0019106 100644 --- a/include/util/tqueue.h +++ b/include/util/tqueue.h @@ -65,6 +65,7 @@ typedef struct STaosQnode { STaosQnode *next; STaosQueue *queue; int64_t timestamp; + int32_t dataSize; int32_t size; int8_t itype; int8_t reserved[3]; @@ -103,7 +104,7 @@ typedef struct STaosQall { STaosQueue *taosOpenQueue(); void taosCloseQueue(STaosQueue *queue); void taosSetQueueFp(STaosQueue *queue, FItem itemFp, FItems itemsFp); -void *taosAllocateQitem(int32_t size, EQItype itype); +void *taosAllocateQitem(int32_t size, EQItype itype, int32_t dataSize); void taosFreeQitem(void *pItem); void taosWriteQitem(STaosQueue *queue, void *pItem); int32_t taosReadQitem(STaosQueue *queue, void **ppItem); diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index db717a4e4e..f82e54515f 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -691,7 +691,7 @@ void tmqAssignAskEpTask(void* param, void* tmrId) { int64_t refId = *(int64_t*)param; tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId); if (tmq != NULL) { - int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM); + int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM, 0); *pTaskType = TMQ_DELAYED_TASK__ASK_EP; taosWriteQitem(tmq->delayedTask, pTaskType); tsem_post(&tmq->rspSem); @@ -703,7 +703,7 @@ void tmqAssignDelayedCommitTask(void* param, void* tmrId) { int64_t refId = *(int64_t*)param; tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId); if (tmq != NULL) { - int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM); + int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM, 0); *pTaskType = TMQ_DELAYED_TASK__COMMIT; taosWriteQitem(tmq->delayedTask, pTaskType); tsem_post(&tmq->rspSem); @@ -715,7 +715,7 @@ void tmqAssignDelayedReportTask(void* param, void* tmrId) { int64_t refId = *(int64_t*)param; tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId); if (tmq != NULL) { - int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM); + int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM, 0); *pTaskType = TMQ_DELAYED_TASK__REPORT; taosWriteQitem(tmq->delayedTask, pTaskType); tsem_post(&tmq->rspSem); @@ -1140,7 +1140,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { goto CREATE_MSG_FAIL; } if (code == TSDB_CODE_TQ_NO_COMMITTED_OFFSET) { - SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM); + SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM, 0); if (pRspWrapper == NULL) { tscWarn("msg discard from vgId:%d, epoch %d since out of memory", vgId, epoch); goto CREATE_MSG_FAIL; @@ -1173,7 +1173,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { // handle meta rsp int8_t rspType = ((SMqRspHead*)pMsg->pData)->mqMsgType; - SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM); + SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM, 0); if (pRspWrapper == NULL) { taosMemoryFree(pMsg->pData); taosMemoryFree(pMsg->pEpSet); @@ -1363,7 +1363,7 @@ int32_t tmqAskEpCb(void* param, SDataBuf* pMsg, int32_t code) { tmqUpdateEp(tmq, head->epoch, &rsp); tDeleteSMqAskEpRsp(&rsp); } else { - SMqAskEpRspWrapper* pWrapper = taosAllocateQitem(sizeof(SMqAskEpRspWrapper), DEF_QITEM); + SMqAskEpRspWrapper* pWrapper = taosAllocateQitem(sizeof(SMqAskEpRspWrapper), DEF_QITEM, 0); if (pWrapper == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; code = -1; diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c b/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c index 857fbcbce5..5d86e11c57 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c @@ -159,7 +159,7 @@ int32_t mmPutMsgToQueue(SMnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) { } if (pWorker == NULL) return -1; - SRpcMsg *pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM); + SRpcMsg *pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM, pRpc->contLen); if (pMsg == NULL) return -1; memcpy(pMsg, pRpc, sizeof(SRpcMsg)); pRpc->pCont = NULL; diff --git a/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c b/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c index 3e5ad65db7..579a4e2090 100644 --- a/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c +++ b/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c @@ -58,7 +58,7 @@ int32_t qmPutNodeMsgToFetchQueue(SQnodeMgmt *pMgmt, SRpcMsg *pMsg) { } int32_t qmPutRpcMsgToQueue(SQnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) { - SRpcMsg *pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM); + SRpcMsg *pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM, pRpc->contLen); if (pMsg == NULL) return -1; memcpy(pMsg, pRpc, sizeof(SRpcMsg)); pRpc->pCont = NULL; diff --git a/source/dnode/mgmt/mgmt_snode/src/smWorker.c b/source/dnode/mgmt/mgmt_snode/src/smWorker.c index 2e66aeae37..e1cc378396 100644 --- a/source/dnode/mgmt/mgmt_snode/src/smWorker.c +++ b/source/dnode/mgmt/mgmt_snode/src/smWorker.c @@ -130,7 +130,7 @@ void smStopWorker(SSnodeMgmt *pMgmt) { } int32_t smPutMsgToQueue(SSnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) { - SRpcMsg *pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM); + SRpcMsg *pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM, pRpc->contLen); if (pMsg == NULL) { rpcFreeCont(pRpc->pCont); pRpc->pCont = NULL; diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c index 08ea880b97..c48216ed7d 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c @@ -233,7 +233,7 @@ int32_t vmPutMsgToMgmtQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { } int32_t vmPutRpcMsgToQueue(SVnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) { - SRpcMsg *pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM); + SRpcMsg *pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM, pRpc->contLen); if (pMsg == NULL) { rpcFreeCont(pRpc->pCont); pRpc->pCont = NULL; diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c index 99f8bd002a..33646d6d67 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c +++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c @@ -141,7 +141,7 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) { } pRpc->info.wrapper = pWrapper; - pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM); + pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM, pRpc->contLen); if (pMsg == NULL) goto _OVER; memcpy(pMsg, pRpc, sizeof(SRpcMsg)); diff --git a/source/dnode/vnode/src/sma/smaRollup.c b/source/dnode/vnode/src/sma/smaRollup.c index 6bd2ae3435..ba99e5515d 100644 --- a/source/dnode/vnode/src/sma/smaRollup.c +++ b/source/dnode/vnode/src/sma/smaRollup.c @@ -763,7 +763,7 @@ static int32_t tdExecuteRSmaImplAsync(SSma *pSma, const void *pMsg, int32_t inpu tb_uid_t suid) { const SSubmitReq *pReq = (const SSubmitReq *)pMsg; - void *qItem = taosAllocateQitem(pReq->header.contLen, DEF_QITEM); + void *qItem = taosAllocateQitem(pReq->header.contLen, DEF_QITEM, 0); if (!qItem) { return TSDB_CODE_FAILED; } diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 191fc1b49c..af3137f7b9 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -1265,7 +1265,7 @@ int32_t tqProcessDelReq(STQ* pTq, void* pReq, int32_t len, int64_t ver) { qDebug("delete req enqueue stream task: %d, ver: %" PRId64, pTask->taskId, ver); if (!failed) { - SStreamRefDataBlock* pRefBlock = taosAllocateQitem(sizeof(SStreamRefDataBlock), DEF_QITEM); + SStreamRefDataBlock* pRefBlock = taosAllocateQitem(sizeof(SStreamRefDataBlock), DEF_QITEM, 0); pRefBlock->type = STREAM_INPUT__REF_DATA_BLOCK; pRefBlock->pBlock = pDelBlock; pRefBlock->dataRef = pRef; @@ -1297,7 +1297,7 @@ int32_t tqProcessDelReq(STQ* pTq, void* pReq, int32_t len, int64_t ver) { } #if 0 - SStreamDataBlock* pStreamBlock = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM); + SStreamDataBlock* pStreamBlock = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, 0); pStreamBlock->type = STREAM_INPUT__DATA_BLOCK; pStreamBlock->blocks = taosArrayInit(0, sizeof(SSDataBlock)); SSDataBlock block = {0}; diff --git a/source/libs/executor/src/dataDeleter.c b/source/libs/executor/src/dataDeleter.c index 12fb449238..eff7a5ef93 100644 --- a/source/libs/executor/src/dataDeleter.c +++ b/source/libs/executor/src/dataDeleter.c @@ -133,7 +133,7 @@ static int32_t getStatus(SDataDeleterHandle* pDeleter) { static int32_t putDataBlock(SDataSinkHandle* pHandle, const SInputData* pInput, bool* pContinue) { SDataDeleterHandle* pDeleter = (SDataDeleterHandle*)pHandle; - SDataDeleterBuf* pBuf = taosAllocateQitem(sizeof(SDataDeleterBuf), DEF_QITEM); + SDataDeleterBuf* pBuf = taosAllocateQitem(sizeof(SDataDeleterBuf), DEF_QITEM, 0); if (NULL == pBuf) { return TSDB_CODE_OUT_OF_MEMORY; } diff --git a/source/libs/executor/src/dataDispatcher.c b/source/libs/executor/src/dataDispatcher.c index c45226e02b..c2fa438c80 100644 --- a/source/libs/executor/src/dataDispatcher.c +++ b/source/libs/executor/src/dataDispatcher.c @@ -126,7 +126,7 @@ static int32_t getStatus(SDataDispatchHandle* pDispatcher) { static int32_t putDataBlock(SDataSinkHandle* pHandle, const SInputData* pInput, bool* pContinue) { SDataDispatchHandle* pDispatcher = (SDataDispatchHandle*)pHandle; - SDataDispatchBuf* pBuf = taosAllocateQitem(sizeof(SDataDispatchBuf), DEF_QITEM); + SDataDispatchBuf* pBuf = taosAllocateQitem(sizeof(SDataDispatchBuf), DEF_QITEM, 0); if (NULL == pBuf) { return TSDB_CODE_OUT_OF_MEMORY; } diff --git a/source/libs/stream/src/stream.c b/source/libs/stream/src/stream.c index 79549675a3..5b542dd54b 100644 --- a/source/libs/stream/src/stream.c +++ b/source/libs/stream/src/stream.c @@ -56,7 +56,7 @@ void streamSchedByTimer(void* param, void* tmrId) { } if (atomic_load_8(&pTask->triggerStatus) == TASK_TRIGGER_STATUS__ACTIVE) { - SStreamTrigger* trigger = taosAllocateQitem(sizeof(SStreamTrigger), DEF_QITEM); + SStreamTrigger* trigger = taosAllocateQitem(sizeof(SStreamTrigger), DEF_QITEM, 0); if (trigger == NULL) return; trigger->type = STREAM_INPUT__GET_RES; trigger->pBlock = taosMemoryCalloc(1, sizeof(SSDataBlock)); @@ -112,7 +112,7 @@ int32_t streamSchedExec(SStreamTask* pTask) { } int32_t streamTaskEnqueue(SStreamTask* pTask, const SStreamDispatchReq* pReq, SRpcMsg* pRsp) { - SStreamDataBlock* pData = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM); + SStreamDataBlock* pData = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, 0); int8_t status; // enqueue @@ -150,7 +150,7 @@ int32_t streamTaskEnqueue(SStreamTask* pTask, const SStreamDispatchReq* pReq, SR } int32_t streamTaskEnqueueRetrieve(SStreamTask* pTask, SStreamRetrieveReq* pReq, SRpcMsg* pRsp) { - SStreamDataBlock* pData = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM); + SStreamDataBlock* pData = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, 0); int8_t status = TASK_INPUT_STATUS__NORMAL; // enqueue diff --git a/source/libs/stream/src/streamData.c b/source/libs/stream/src/streamData.c index 2fea5b9eca..6cc684dddf 100644 --- a/source/libs/stream/src/streamData.c +++ b/source/libs/stream/src/streamData.c @@ -67,7 +67,7 @@ int32_t streamRetrieveReqToData(const SStreamRetrieveReq* pReq, SStreamDataBlock } SStreamDataSubmit* streamDataSubmitNew(SSubmitReq* pReq) { - SStreamDataSubmit* pDataSubmit = (SStreamDataSubmit*)taosAllocateQitem(sizeof(SStreamDataSubmit), DEF_QITEM); + SStreamDataSubmit* pDataSubmit = (SStreamDataSubmit*)taosAllocateQitem(sizeof(SStreamDataSubmit), DEF_QITEM, 0); if (pDataSubmit == NULL) return NULL; pDataSubmit->dataRef = (int32_t*)taosMemoryMalloc(sizeof(int32_t)); if (pDataSubmit->dataRef == NULL) goto FAIL; @@ -81,7 +81,7 @@ FAIL: } SStreamMergedSubmit* streamMergedSubmitNew() { - SStreamMergedSubmit* pMerged = (SStreamMergedSubmit*)taosAllocateQitem(sizeof(SStreamMergedSubmit), DEF_QITEM); + SStreamMergedSubmit* pMerged = (SStreamMergedSubmit*)taosAllocateQitem(sizeof(SStreamMergedSubmit), DEF_QITEM, 0); if (pMerged == NULL) return NULL; pMerged->reqs = taosArrayInit(0, sizeof(void*)); pMerged->dataRefs = taosArrayInit(0, sizeof(void*)); @@ -107,7 +107,7 @@ static FORCE_INLINE void streamDataSubmitRefInc(SStreamDataSubmit* pDataSubmit) } SStreamDataSubmit* streamSubmitRefClone(SStreamDataSubmit* pSubmit) { - SStreamDataSubmit* pSubmitClone = taosAllocateQitem(sizeof(SStreamDataSubmit), DEF_QITEM); + SStreamDataSubmit* pSubmitClone = taosAllocateQitem(sizeof(SStreamDataSubmit), DEF_QITEM, 0); if (pSubmitClone == NULL) { return NULL; } diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index d20c2902f5..20608a6cf3 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -127,7 +127,7 @@ int32_t streamScanExec(SStreamTask* pTask, int32_t batchSz) { taosArrayDestroy(pRes); break; } - SStreamDataBlock* qRes = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM); + SStreamDataBlock* qRes = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, 0); if (qRes == NULL) { taosArrayDestroyEx(pRes, (FDelete)blockDataFreeRes); terrno = TSDB_CODE_OUT_OF_MEMORY; @@ -235,7 +235,7 @@ int32_t streamExecForAll(SStreamTask* pTask) { qDebug("stream task %d exec end", pTask->taskId); if (taosArrayGetSize(pRes) != 0) { - SStreamDataBlock* qRes = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM); + SStreamDataBlock* qRes = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, 0); if (qRes == NULL) { taosArrayDestroyEx(pRes, (FDelete)blockDataFreeRes); streamFreeQitem(input); diff --git a/source/libs/sync/test/sync_test_lib/src/syncIO.c b/source/libs/sync/test/sync_test_lib/src/syncIO.c index 415fecd9f2..4b305f823f 100644 --- a/source/libs/sync/test/sync_test_lib/src/syncIO.c +++ b/source/libs/sync/test/sync_test_lib/src/syncIO.c @@ -97,7 +97,7 @@ int32_t syncIOEqMsg(const SMsgCb *msgcb, SRpcMsg *pMsg) { syncRpcMsgLog2(logBuf, pMsg); SRpcMsg *pTemp; - pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM); + pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM, 0); memcpy(pTemp, pMsg, sizeof(SRpcMsg)); STaosQueue *pMsgQ = gSyncIO->pMsgQ; @@ -381,7 +381,7 @@ static void syncIOProcessRequest(void *pParent, SRpcMsg *pMsg, SEpSet *pEpSet) { syncRpcMsgLog2((char *)"==syncIOProcessRequest==", pMsg); SSyncIO *io = pParent; SRpcMsg *pTemp; - pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM); + pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM, 0); memcpy(pTemp, pMsg, sizeof(SRpcMsg)); taosWriteQitem(io->pMsgQ, pTemp); } @@ -441,7 +441,7 @@ static void syncIOTickQ(void *param, void *tmrId) { SRpcMsg rpcMsg; syncPingReply2RpcMsg(pMsg, &rpcMsg); SRpcMsg *pTemp; - pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM); + pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM, 0); memcpy(pTemp, &rpcMsg, sizeof(SRpcMsg)); syncRpcMsgLog2((char *)"==syncIOTickQ==", &rpcMsg); taosWriteQitem(io->pMsgQ, pTemp); diff --git a/source/libs/transport/test/svrBench.c b/source/libs/transport/test/svrBench.c index 464559c1e0..4e2395b17b 100644 --- a/source/libs/transport/test/svrBench.c +++ b/source/libs/transport/test/svrBench.c @@ -128,7 +128,7 @@ void *processShellMsg(void *arg) { void processRequestMsg(void *pParent, SRpcMsg *pMsg, SEpSet *pEpSet) { SRpcMsg *pTemp; - pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM); + pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM, 0); memcpy(pTemp, pMsg, sizeof(SRpcMsg)); int32_t idx = balance % multiQ->numOfThread; diff --git a/source/util/src/tqueue.c b/source/util/src/tqueue.c index 0f992184b5..1079dff0bf 100644 --- a/source/util/src/tqueue.c +++ b/source/util/src/tqueue.c @@ -109,20 +109,22 @@ int64_t taosQueueMemorySize(STaosQueue *queue) { return memOfItems; } -void *taosAllocateQitem(int32_t size, EQItype itype) { +void *taosAllocateQitem(int32_t size, EQItype itype, int32_t dataSize) { STaosQnode *pNode = taosMemoryCalloc(1, sizeof(STaosQnode) + size); if (pNode == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; return NULL; } + pNode->dataSize = dataSize; pNode->size = size; pNode->itype = itype; pNode->timestamp = taosGetTimestampUs(); if (itype == RPC_QITEM) { - int64_t alloced = atomic_add_fetch_64(&tsRpcQueueMemoryUsed, size); + int64_t alloced = atomic_add_fetch_64(&tsRpcQueueMemoryUsed, size + dataSize); if (alloced > tsRpcQueueMemoryAllowed) { + uError("failed to alloc qitem, size:%d alloc:%" PRId64 " allowed:%" PRId64, size + dataSize, alloced, tsRpcQueueMemoryUsed); taosMemoryFree(pNode); terrno = TSDB_CODE_OUT_OF_RPC_MEMORY_QUEUE; return NULL; @@ -139,8 +141,8 @@ void taosFreeQitem(void *pItem) { if (pItem == NULL) return; STaosQnode *pNode = (STaosQnode *)((char *)pItem - sizeof(STaosQnode)); - if (pNode->itype > 0) { - int64_t alloced = atomic_sub_fetch_64(&tsRpcQueueMemoryUsed, pNode->size); + if (pNode->itype == RPC_QITEM) { + int64_t alloced = atomic_sub_fetch_64(&tsRpcQueueMemoryUsed, pNode->size + pNode->dataSize); uTrace("item:%p, node:%p is freed, alloc:%" PRId64, pItem, pNode, alloced); } else { uTrace("item:%p, node:%p is freed", pItem, pNode); From 7563ba2dfc064069a9316e1914f04f7d11b4210f Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 10 Dec 2022 14:07:34 +0800 Subject: [PATCH 67/97] fix(query): keep the correct value. --- source/libs/executor/src/timesliceoperator.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index af3c44d032..0886bfd859 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -49,10 +49,10 @@ static void doKeepPrevRows(STimeSliceOperatorInfo* pSliceInfo, const SSDataBlock if (!colDataIsNull_s(pColInfoData, rowIndex)) { pkey->isNull = false; char* val = colDataGetData(pColInfoData, rowIndex); - if (!IS_VAR_DATA_TYPE(pkey->type)) { - memcpy(pkey->pData, val, pkey->bytes); - } else { + if (IS_VAR_DATA_TYPE(pkey->type)) { memcpy(pkey->pData, val, varDataLen(val)); + } else { + memcpy(pkey->pData, val, pkey->bytes); } } else { pkey->isNull = true; @@ -112,9 +112,9 @@ static void doKeepLinearInfo(STimeSliceOperatorInfo* pSliceInfo, const SSDataBlo char* p = colDataGetData(pColInfoData, rowIndex); if (IS_VAR_DATA_TYPE(pColInfoData->info.type)) { ASSERT(varDataTLen(p) <= pColInfoData->info.bytes); - memcpy(pLinearInfo->start.val, p, varDataTLen(p)); + memcpy(pLinearInfo->end.val, p, varDataTLen(p)); } else { - memcpy(pLinearInfo->start.val, p, pLinearInfo->bytes); + memcpy(pLinearInfo->end.val, p, pLinearInfo->bytes); } } pLinearInfo->isEndSet = true; @@ -128,9 +128,9 @@ static void doKeepLinearInfo(STimeSliceOperatorInfo* pSliceInfo, const SSDataBlo char* p = colDataGetData(pColInfoData, rowIndex); if (IS_VAR_DATA_TYPE(pColInfoData->info.type)) { ASSERT(varDataTLen(p) <= pColInfoData->info.bytes); - memcpy(pLinearInfo->start.val, p, varDataTLen(p)); + memcpy(pLinearInfo->end.val, p, varDataTLen(p)); } else { - memcpy(pLinearInfo->start.val, p, pLinearInfo->bytes); + memcpy(pLinearInfo->end.val, p, pLinearInfo->bytes); } } else { From eeefd1a4b586cdded6fb38ad6b2715b2c5373656 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 10 Dec 2022 14:35:56 +0800 Subject: [PATCH 68/97] fix(query): does not return error code if queried table does not exists. --- source/dnode/vnode/src/tsdb/tsdbMergeTree.c | 2 +- source/dnode/vnode/src/tsdb/tsdbRead.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c index 01fbcf657f..ad264b8bb3 100644 --- a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c +++ b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c @@ -121,7 +121,7 @@ static SBlockData *loadLastBlock(SLDataIter *pIter, const char *idStr) { return &pInfo->blockData[1]; } - if (pIter->pSttBlk == NULL) { + if (pIter->pSttBlk == NULL || pInfo->pSchema == NULL) { return NULL; } diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index 9afc0ae7e8..a0334684a3 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -2790,7 +2790,8 @@ static int32_t doLoadLastBlockSequentially(STsdbReader* pReader) { while (1) { // load the last data block of current table STableBlockScanInfo* pScanInfo = *(STableBlockScanInfo**)pStatus->pTableIter; - bool hasVal = initLastBlockReader(pLastBlockReader, pScanInfo, pReader); + + bool hasVal = initLastBlockReader(pLastBlockReader, pScanInfo, pReader); if (!hasVal) { bool hasNexTable = moveToNextTable(pOrderedCheckInfo, pStatus); if (!hasNexTable) { @@ -3823,21 +3824,18 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, void* pTableL } // NOTE: the endVersion in pCond is the data version not schema version, so pCond->endVersion is not correct here. + // no valid error code set in metaGetTbTSchema, so let's set the error code here. + // we should proceed in case of tmq processing. if (pCond->suid != 0) { pReader->pSchema = metaGetTbTSchema(pReader->pTsdb->pVnode->pMeta, pReader->suid, -1, 1); if (pReader->pSchema == NULL) { tsdbError("failed to get table schema, suid:%" PRIu64 ", ver:-1, %s", pReader->suid, pReader->idStr); - // no valid error code set in metaGetTbTSchema, so let's set the error code here. - code = TSDB_CODE_PAR_TABLE_NOT_EXIST; - goto _err; } } else if (numOfTables > 0) { STableKeyInfo* pKey = pTableList; pReader->pSchema = metaGetTbTSchema(pReader->pTsdb->pVnode->pMeta, pKey->uid, -1, 1); if (pReader->pSchema == NULL) { tsdbError("failed to get table schema, uid:%" PRIu64 ", ver:-1, %s", pKey->uid, pReader->idStr); - code = TSDB_CODE_PAR_TABLE_NOT_EXIST; - goto _err; } } From 1aff3cceebb5163b21c96901ba240cfc0bd88ee7 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Sat, 10 Dec 2022 15:03:24 +0800 Subject: [PATCH 69/97] fix: show queries crash issue --- source/client/src/clientImpl.c | 5 +++-- source/dnode/mnode/impl/src/mndProfile.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index e6584f4a00..e26512d065 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -190,8 +190,9 @@ int32_t buildRequest(uint64_t connId, const char* sql, int sqlLen, void* param, (*pRequest)->body.param = param; STscObj* pTscObj = (*pRequest)->pTscObj; - if (taosHashPut(pTscObj->pRequests, &(*pRequest)->self, sizeof((*pRequest)->self), &(*pRequest)->self, - sizeof((*pRequest)->self))) { + int32_t err = taosHashPut(pTscObj->pRequests, &(*pRequest)->self, sizeof((*pRequest)->self), &(*pRequest)->self, + sizeof((*pRequest)->self)); + if (err) { tscError("%" PRId64 " failed to add to request container, reqId:0x%" PRIx64 ", conn:%" PRId64 ", %s", (*pRequest)->self, (*pRequest)->requestId, pTscObj->id, sql); diff --git a/source/dnode/mnode/impl/src/mndProfile.c b/source/dnode/mnode/impl/src/mndProfile.c index fe76ba31d7..ffc357b2e8 100644 --- a/source/dnode/mnode/impl/src/mndProfile.c +++ b/source/dnode/mnode/impl/src/mndProfile.c @@ -769,7 +769,7 @@ static int32_t mndRetrieveQueries(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *p } int32_t numOfQueries = taosArrayGetSize(pConn->pQueries); - for (int32_t i = 0; i < numOfQueries; ++i) { + for (int32_t i = 0; i < numOfQueries && numOfRows < rows; ++i) { SQueryDesc *pQuery = taosArrayGet(pConn->pQueries, i); cols = 0; From 652f51fec524eb93bd269f0996b6c06a3b660607 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sat, 10 Dec 2022 15:09:55 +0800 Subject: [PATCH 70/97] fix: control rpc qitem memory --- include/util/tqueue.h | 4 ++-- source/dnode/mgmt/mgmt_mnode/src/mmWorker.c | 2 +- source/dnode/mgmt/mgmt_qnode/src/qmWorker.c | 4 ++-- source/dnode/mgmt/mgmt_snode/src/smWorker.c | 4 ++-- source/dnode/mgmt/mgmt_vnode/src/vmWorker.c | 2 +- source/dnode/mgmt/node_mgmt/src/dmTransport.c | 2 +- source/util/src/tqueue.c | 6 ++++-- 7 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/util/tqueue.h b/include/util/tqueue.h index 25a0019106..1f6b205cdf 100644 --- a/include/util/tqueue.h +++ b/include/util/tqueue.h @@ -65,7 +65,7 @@ typedef struct STaosQnode { STaosQnode *next; STaosQueue *queue; int64_t timestamp; - int32_t dataSize; + int64_t dataSize; int32_t size; int8_t itype; int8_t reserved[3]; @@ -104,7 +104,7 @@ typedef struct STaosQall { STaosQueue *taosOpenQueue(); void taosCloseQueue(STaosQueue *queue); void taosSetQueueFp(STaosQueue *queue, FItem itemFp, FItems itemsFp); -void *taosAllocateQitem(int32_t size, EQItype itype, int32_t dataSize); +void *taosAllocateQitem(int32_t size, EQItype itype, int64_t dataSize); void taosFreeQitem(void *pItem); void taosWriteQitem(STaosQueue *queue, void *pItem); int32_t taosReadQitem(STaosQueue *queue, void **ppItem); diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c b/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c index 5d86e11c57..095857825d 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c @@ -164,7 +164,7 @@ int32_t mmPutMsgToQueue(SMnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) { memcpy(pMsg, pRpc, sizeof(SRpcMsg)); pRpc->pCont = NULL; - dTrace("msg:%p, is created and will put into %s queue, type:%s", pMsg, pWorker->name, TMSG_INFO(pRpc->msgType)); + dTrace("msg:%p, is created and will put into %s queue, type:%s len:%d", pMsg, pWorker->name, TMSG_INFO(pRpc->msgType), pRpc->contLen); int32_t code = mmPutMsgToWorker(pMgmt, pWorker, pMsg); if (code != 0) { dTrace("msg:%p, is freed", pMsg); diff --git a/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c b/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c index 579a4e2090..28da0f9c5f 100644 --- a/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c +++ b/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c @@ -65,12 +65,12 @@ int32_t qmPutRpcMsgToQueue(SQnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) { switch (qtype) { case QUERY_QUEUE: - dTrace("msg:%p, is created and will put into qnode-query queue", pMsg); + dTrace("msg:%p, is created and will put into qnode-query queue, len:%d", pMsg, pRpc->contLen); taosWriteQitem(pMgmt->queryWorker.queue, pMsg); return 0; case READ_QUEUE: case FETCH_QUEUE: - dTrace("msg:%p, is created and will put into qnode-fetch queue", pMsg); + dTrace("msg:%p, is created and will put into qnode-fetch queue, len:%d", pMsg, pRpc->contLen); taosWriteQitem(pMgmt->fetchWorker.queue, pMsg); return 0; default: diff --git a/source/dnode/mgmt/mgmt_snode/src/smWorker.c b/source/dnode/mgmt/mgmt_snode/src/smWorker.c index e1cc378396..9bd5be5201 100644 --- a/source/dnode/mgmt/mgmt_snode/src/smWorker.c +++ b/source/dnode/mgmt/mgmt_snode/src/smWorker.c @@ -139,8 +139,8 @@ int32_t smPutMsgToQueue(SSnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) { SSnode *pSnode = pMgmt->pSnode; if (pSnode == NULL) { - dError("msg:%p failed to put into snode queue since %s, type:%s qtype:%d", pMsg, terrstr(), - TMSG_INFO(pMsg->msgType), qtype); + dError("msg:%p failed to put into snode queue since %s, type:%s qtype:%d len:%d", pMsg, terrstr(), + TMSG_INFO(pMsg->msgType), qtype, pRpc->contLen); taosFreeQitem(pMsg); rpcFreeCont(pRpc->pCont); pRpc->pCont = NULL; diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c index c48216ed7d..7e3915f3d1 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c @@ -241,7 +241,7 @@ int32_t vmPutRpcMsgToQueue(SVnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) { } SMsgHead *pHead = pRpc->pCont; - dTrace("vgId:%d, msg:%p is created, type:%s", pHead->vgId, pMsg, TMSG_INFO(pRpc->msgType)); + dTrace("vgId:%d, msg:%p is created, type:%s len:%d", pHead->vgId, pMsg, TMSG_INFO(pRpc->msgType), pRpc->contLen); pHead->contLen = htonl(pHead->contLen); pHead->vgId = htonl(pHead->vgId); diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c index 33646d6d67..4fa09a46b7 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c +++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c @@ -145,7 +145,7 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) { if (pMsg == NULL) goto _OVER; memcpy(pMsg, pRpc, sizeof(SRpcMsg)); - dGTrace("msg:%p, is created, type:%s handle:%p", pMsg, TMSG_INFO(pRpc->msgType), pMsg->info.handle); + dGTrace("msg:%p, is created, type:%s handle:%p len:%d", pMsg, TMSG_INFO(pRpc->msgType), pMsg->info.handle, pRpc->contLen); code = dmProcessNodeMsg(pWrapper, pMsg); diff --git a/source/util/src/tqueue.c b/source/util/src/tqueue.c index 1079dff0bf..42b6358893 100644 --- a/source/util/src/tqueue.c +++ b/source/util/src/tqueue.c @@ -109,7 +109,7 @@ int64_t taosQueueMemorySize(STaosQueue *queue) { return memOfItems; } -void *taosAllocateQitem(int32_t size, EQItype itype, int32_t dataSize) { +void *taosAllocateQitem(int32_t size, EQItype itype, int64_t dataSize) { STaosQnode *pNode = taosMemoryCalloc(1, sizeof(STaosQnode) + size); if (pNode == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; @@ -124,7 +124,9 @@ void *taosAllocateQitem(int32_t size, EQItype itype, int32_t dataSize) { if (itype == RPC_QITEM) { int64_t alloced = atomic_add_fetch_64(&tsRpcQueueMemoryUsed, size + dataSize); if (alloced > tsRpcQueueMemoryAllowed) { - uError("failed to alloc qitem, size:%d alloc:%" PRId64 " allowed:%" PRId64, size + dataSize, alloced, tsRpcQueueMemoryUsed); + uError("failed to alloc qitem, size:%" PRId64 " alloc:%" PRId64 " allowed:%" PRId64, size + dataSize, alloced, + tsRpcQueueMemoryUsed); + atomic_sub_fetch_64(&tsRpcQueueMemoryUsed, size + dataSize); taosMemoryFree(pNode); terrno = TSDB_CODE_OUT_OF_RPC_MEMORY_QUEUE; return NULL; From f42c6260f0855c6380d9a158d0781340aa78d254 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Sat, 10 Dec 2022 18:55:14 +0800 Subject: [PATCH 71/97] doc: correct configuration parameters --- docs/zh/14-reference/12-config/index.md | 385 +++++++++++------------- 1 file changed, 173 insertions(+), 212 deletions(-) diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index 145c5eed93..c149621233 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -134,15 +134,6 @@ taos --dump-config | 取值范围 | 1-200000 | | 缺省值 | 30 | -### telemetryReporting - -| 属性 | 说明 | -| -------- | ---------------------------------------- | -| 适用范围 | 仅服务端适用 | -| 含义 | 是否允许 TDengine 采集和上报基本使用信息 | -| 取值范围 | 0:不允许 1:允许 | -| 缺省值 | 1 | - ## 查询相关 ### queryPolicy @@ -191,6 +182,33 @@ taos --dump-config | 取值范围 | 0 表示包含函数名,1 表示不包含函数名。 | | 缺省值 | 0 | +### countAlwaysReturnValue + +| 属性 | 说明 | +| -------- | -------------------------------- | +| 适用范围 | 仅服务端适用 | +| 含义 | count/hyperloglog函数在数据为空或者NULL的情况下是否返回值 | +| 取值范围 | 0:返回空行,1:返回 0 | +| 缺省值 | 1 | + +### minSlidingTime + +| 属性 | 说明 | +| -------- | -------------------------------- | +| 适用范围 | 仅服务端适用 | +| 含义 | sliding 的最小允许值 | +| 单位 | 同数据库时间单位 | +| 缺省值 | 1 | + +### minIntervalTime + +| 属性 | 说明 | +| -------- | -------------------------------- | +| 适用范围 | 仅服务端适用 | +| 含义 | interval窗口的最小允许值 | +| 单位 | 同数据库时间单位 | +| 缺省值 | 1 | + ## 区域相关 ### timezone @@ -306,12 +324,20 @@ charset 的有效值是 UTF-8。 | 含义 | 数据文件目录,所有的数据文件都将写入该目录 | | 缺省值 | /var/lib/taos | +### tempDir + +| 属性 | 说明 | +| -------- | ------------------------------------------ | +| 适用范围 | 仅服务端适用 | +| 含义 | 该参数指定所有系统运行过程中的临时文件生成的目录 | +| 缺省值 | /tmp | + ### minimalTmpDirGB | 属性 | 说明 | | -------- | ------------------------------------------------ | | 适用范围 | 服务端和客户端均适用 | -| 含义 | 当日志文件夹的磁盘大小小于该值时,停止写临时文件 | +| 含义 | tempDir 所指定的临时文件目录所需要保留的最小空间 | | 单位 | GB | | 缺省值 | 1.0 | @@ -320,7 +346,7 @@ charset 的有效值是 UTF-8。 | 属性 | 说明 | | -------- | ------------------------------------------------ | | 适用范围 | 仅服务端适用 | -| 含义 | 当日志文件夹的磁盘大小小于该值时,停止写时序数据 | +| 含义 | dataDir 指定的时序数据存储目录所需要保留的最小 | | 单位 | GB | | 缺省值 | 2.0 | @@ -335,27 +361,7 @@ charset 的有效值是 UTF-8。 | 取值范围 | 0-4096 | | 缺省值 | CPU 核数的 2 倍 | -## 时间相关 - -### statusInterval - -| 属性 | 说明 | -| -------- | --------------------------- | -| 适用范围 | 仅服务端适用 | -| 含义 | dnode 向 mnode 报告状态间隔 | -| 单位 | 秒 | -| 取值范围 | 1-10 | -| 缺省值 | 1 | - -### shellActivityTimer - -| 属性 | 说明 | -| -------- | --------------------------------- | -| 适用范围 | 服务端和客户端均适用 | -| 含义 | shell 客户端向 mnode 发送心跳间隔 | -| 单位 | 秒 | -| 取值范围 | 1-120 | -| 缺省值 | 3 | +## 时间相关 | ## 性能调优 @@ -367,28 +373,6 @@ charset 的有效值是 UTF-8。 | 含义 | 设置写入线程的最大数量 | | 缺省值 | | -## 压缩相关 - -### compressMsgSize - -| 属性 | 说明 | -| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| 适用范围 | 仅服务端适用 | -| 含义 | 客户端与服务器之间进行消息通讯过程中,对通讯的消息进行压缩的阈值。如果要压缩消息,建议设置为 64330 字节,即大于 64330 字节的消息体才进行压缩。 | -| 单位 | bytes | -| 取值范围 | `0 `表示对所有的消息均进行压缩 >0: 超过该值的消息才进行压缩 -1: 不压缩 | -| 缺省值 | -1 | - -### compressColData - -| 属性 | 说明 | -| -------- | --------------------------------------------------------------------------------------- | -| 适用范围 | 仅服务端适用 | -| 含义 | 客户端与服务器之间进行消息通讯过程中,对服务器端查询结果进行列压缩的阈值。 | -| 单位 | bytes | -| 取值范围 | 0: 对所有查询结果均进行压缩 >0: 查询结果中任意列大小超过该值的消息才进行压缩 -1: 不压缩 | -| 缺省值 | -1 | - ## 日志相关 ### logDir @@ -613,7 +597,7 @@ charset 的有效值是 UTF-8。 | 属性 | 说明 | | -------- | ------------------------- | | 适用范围 | 仅客户端适用 | -| 含义 | schemaless 自定义的子表名 | +| 含义 | schemaless 自定义的子表名的 key | | 类型 | 字符串 | | 缺省值 | 无 | @@ -656,7 +640,7 @@ charset 的有效值是 UTF-8。 | 取值范围 | 0: 不启动;1:启动 | | 缺省值 | 1 | -## 2.X 与 3.0 配置参数对比 +## 3.0 配置参数列表 :::note 对于 2.x 版本中适用但在 3.0 版本中废弃的参数,其当前行为会有特别说明 @@ -674,159 +658,136 @@ charset 的有效值是 UTF-8。 | 7 | monitorFqdn | 否 | 是 | | | 8 | monitorPort | 否 | 是 | | | 9 | monitorInterval | 是 | 是 | | -| 10 | monitorMaxLogs | 否 | 是 | | -| 11 | monitorComp | 否 | 是 | | -| 12 | telemetryReporting | 是 | 是 | | -| 13 | telemetryInterval | 否 | 是 | | -| 14 | telemetryServer | 否 | 是 | | -| 15 | telemetryPort | 否 | 是 | | -| 16 | queryPolicy | 否 | 是 | | -| 17 | querySmaOptimize | 否 | 是 | | -| 18 | queryRsmaTolerance | 否 | 是 | | -| 19 | queryBufferSize | 是 | 是 | | -| 20 | maxNumOfDistinctRes | 是 | 是 | | -| 21 | minSlidingTime | 是 | 是 | | -| 22 | minIntervalTime | 是 | 是 | | -| 23 | countAlwaysReturnValue | 是 | 是 | | -| 24 | dataDir | 是 | 是 | | -| 25 | minimalDataDirGB | 是 | 是 | | -| 26 | supportVnodes | 否 | 是 | | -| 27 | tempDir | 是 | 是 | | -| 28 | minimalTmpDirGB | 是 | 是 | | -| 29 | compressMsgSize | 是 | 是 | | -| 30 | compressColData | 是 | 是 | | -| 31 | smlChildTableName | 是 | 是 | | -| 32 | smlTagName | 是 | 是 | | -| 33 | smlDataFormat | 否 | 是 | | -| 34 | statusInterval | 是 | 是 | | -| 35 | shellActivityTimer | 是 | 是 | | -| 36 | transPullupInterval | 否 | 是 | | -| 37 | mqRebalanceInterval | 否 | 是 | | -| 38 | ttlUnit | 否 | 是 | | -| 39 | ttlPushInterval | 否 | 是 | | -| 40 | numOfTaskQueueThreads | 否 | 是 | | -| 41 | numOfRpcThreads | 否 | 是 | | -| 42 | numOfCommitThreads | 是 | 是 | | -| 43 | numOfMnodeReadThreads | 否 | 是 | | -| 44 | numOfVnodeQueryThreads | 否 | 是 | | -| 45 | numOfVnodeStreamThreads | 否 | 是 | | -| 46 | numOfVnodeFetchThreads | 否 | 是 | | -| 47 | numOfVnodeRsmaThreads | 否 | 是 | | -| 48 | numOfQnodeQueryThreads | 否 | 是 | | -| 49 | numOfQnodeFetchThreads | 否 | 是 | | -| 50 | numOfSnodeSharedThreads | 否 | 是 | | -| 51 | numOfSnodeUniqueThreads | 否 | 是 | | -| 52 | rpcQueueMemoryAllowed | 否 | 是 | | -| 53 | logDir | 是 | 是 | | -| 54 | minimalLogDirGB | 是 | 是 | | -| 55 | numOfLogLines | 是 | 是 | | -| 56 | asyncLog | 是 | 是 | | -| 57 | logKeepDays | 是 | 是 | | -| 60 | debugFlag | 是 | 是 | | -| 61 | tmrDebugFlag | 是 | 是 | | -| 62 | uDebugFlag | 是 | 是 | | -| 63 | rpcDebugFlag | 是 | 是 | | -| 64 | jniDebugFlag | 是 | 是 | | -| 65 | qDebugFlag | 是 | 是 | | -| 66 | cDebugFlag | 是 | 是 | | -| 67 | dDebugFlag | 是 | 是 | | -| 68 | vDebugFlag | 是 | 是 | | -| 69 | mDebugFlag | 是 | 是 | | -| 70 | wDebugFlag | 是 | 是 | | -| 71 | sDebugFlag | 是 | 是 | | -| 72 | tsdbDebugFlag | 是 | 是 | | -| 73 | tqDebugFlag | 否 | 是 | | -| 74 | fsDebugFlag | 是 | 是 | | -| 75 | udfDebugFlag | 否 | 是 | | -| 76 | smaDebugFlag | 否 | 是 | | -| 77 | idxDebugFlag | 否 | 是 | | -| 78 | tdbDebugFlag | 否 | 是 | | -| 79 | metaDebugFlag | 否 | 是 | | -| 80 | timezone | 是 | 是 | | -| 81 | locale | 是 | 是 | | -| 82 | charset | 是 | 是 | | -| 83 | udf | 是 | 是 | | -| 84 | enableCoreFile | 是 | 是 | | -| 85 | arbitrator | 是 | 否 | 通过 RAFT 协议选主 | -| 86 | numOfThreadsPerCore | 是 | 否 | 有其它参数设置多种线程池的大小 | -| 87 | numOfMnodes | 是 | 否 | 通过 create mnode 命令动态创建 mnode | -| 88 | vnodeBak | 是 | 否 | 3.0 行为未知 | -| 89 | balance | 是 | 否 | 负载均衡功能由 split/merge vgroups 实现 | -| 90 | balanceInterval | 是 | 否 | 随着 balance 参数失效 | -| 91 | offlineThreshold | 是 | 否 | 3.0 行为未知 | -| 92 | role | 是 | 否 | 由 supportVnode 决定是否能够创建 | -| 93 | dnodeNopLoop | 是 | 否 | 2.6 文档中未找到此参数 | -| 94 | keepTimeOffset | 是 | 否 | 2.6 文档中未找到此参数 | -| 95 | rpcTimer | 是 | 否 | 3.0 行为未知 | -| 96 | rpcMaxTime | 是 | 否 | 3.0 行为未知 | -| 97 | rpcForceTcp | 是 | 否 | 默认为 TCP | -| 98 | tcpConnTimeout | 是 | 否 | 3.0 行为未知 | -| 99 | syncCheckInterval | 是 | 否 | 3.0 行为未知 | -| 100 | maxTmrCtrl | 是 | 否 | 3.0 行为未知 | -| 101 | monitorReplica | 是 | 否 | 由 RAFT 协议管理多副本 | -| 102 | smlTagNullName | 是 | 否 | 3.0 行为未知 | -| 103 | keepColumnName | 是 | 否 | 3.0 行为未知 | -| 104 | ratioOfQueryCores | 是 | 否 | 由 线程池 相关配置参数决定 | -| 105 | maxStreamCompDelay | 是 | 否 | 3.0 行为未知 | -| 106 | maxFirstStreamCompDelay | 是 | 否 | 3.0 行为未知 | -| 107 | retryStreamCompDelay | 是 | 否 | 3.0 行为未知 | -| 108 | streamCompDelayRatio | 是 | 否 | 3.0 行为未知 | -| 109 | maxVgroupsPerDb | 是 | 否 | 由 create db 的参数 vgroups 指定实际 vgroups 数量 | -| 110 | maxTablesPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | -| 111 | minTablesPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | -| 112 | tableIncStepPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | -| 113 | cache | 是 | 否 | 由 buffer 代替 cache\*blocks | -| 114 | blocks | 是 | 否 | 由 buffer 代替 cache\*blocks | -| 115 | days | 是 | 否 | 由 create db 的参数 duration 取代 | -| 116 | keep | 是 | 否 | 由 create db 的参数 keep 取代 | -| 117 | minRows | 是 | 否 | 由 create db 的参数 minRows 取代 | -| 118 | maxRows | 是 | 否 | 由 create db 的参数 maxRows 取代 | -| 119 | quorum | 是 | 否 | 由 RAFT 协议决定 | -| 120 | comp | 是 | 否 | 由 create db 的参数 comp 取代 | -| 121 | walLevel | 是 | 否 | 由 create db 的参数 wal_level 取代 | -| 122 | fsync | 是 | 否 | 由 create db 的参数 wal_fsync_period 取代 | -| 123 | replica | 是 | 否 | 由 create db 的参数 replica 取代 | -| 124 | partitions | 是 | 否 | 3.0 行为未知 | -| 125 | update | 是 | 否 | 允许更新部分列 | -| 126 | cachelast | 是 | 否 | 由 create db 的参数 cacheModel 取代 | -| 127 | maxSQLLength | 是 | 否 | SQL 上限为 1MB,无需参数控制 | -| 128 | maxWildCardsLength | 是 | 否 | 3.0 行为未知 | -| 129 | maxRegexStringLen | 是 | 否 | 3.0 行为未知 | -| 130 | maxNumOfOrderedRes | 是 | 否 | 3.0 行为未知 | -| 131 | maxConnections | 是 | 否 | 取决于系统配置和系统处理能力,详见后面的 Note | -| 132 | mnodeEqualVnodeNum | 是 | 否 | 3.0 行为未知 | -| 133 | http | 是 | 否 | http 服务由 taosAdapter 提供 | -| 134 | httpEnableRecordSql | 是 | 否 | taosd 不提供 http 服务 | -| 135 | httpMaxThreads | 是 | 否 | taosd 不提供 http 服务 | -| 136 | restfulRowLimit | 是 | 否 | taosd 不提供 http 服务 | -| 137 | httpDbNameMandatory | 是 | 否 | taosd 不提供 http 服务 | -| 138 | httpKeepAlive | 是 | 否 | taosd 不提供 http 服务 | -| 139 | enableRecordSql | 是 | 否 | 3.0 行为未知 | -| 140 | maxBinaryDisplayWidth | 是 | 否 | 3.0 行为未知 | -| 141 | stream | 是 | 否 | 默认启用连续查询 | -| 142 | retrieveBlockingModel | 是 | 否 | 3.0 行为未知 | -| 143 | tsdbMetaCompactRatio | 是 | 否 | 3.0 行为未知 | -| 144 | defaultJSONStrType | 是 | 否 | 3.0 行为未知 | -| 145 | walFlushSize | 是 | 否 | 3.0 行为未知 | -| 146 | keepTimeOffset | 是 | 否 | 3.0 行为未知 | -| 147 | flowctrl | 是 | 否 | 3.0 行为未知 | -| 148 | slaveQuery | 是 | 否 | 3.0 行为未知: slave vnode 是否能够处理查询? | -| 149 | adjustMaster | 是 | 否 | 3.0 行为未知 | -| 150 | topicBinaryLen | 是 | 否 | 3.0 行为未知 | -| 151 | telegrafUseFieldNum | 是 | 否 | 3.0 行为未知 | -| 152 | deadLockKillQuery | 是 | 否 | 3.0 行为未知 | -| 153 | clientMerge | 是 | 否 | 3.0 行为未知 | -| 154 | sdbDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 155 | odbcDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 156 | httpDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 157 | monDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 158 | cqDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 159 | shortcutFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 160 | probeSeconds | 是 | 否 | 3.0 行为未知 | -| 161 | probeKillSeconds | 是 | 否 | 3.0 行为未知 | -| 162 | probeInterval | 是 | 否 | 3.0 行为未知 | -| 163 | lossyColumns | 是 | 否 | 3.0 行为未知 | -| 164 | fPrecision | 是 | 否 | 3.0 行为未知 | -| 165 | dPrecision | 是 | 否 | 3.0 行为未知 | -| 166 | maxRange | 是 | 否 | 3.0 行为未知 | -| 167 | range | 是 | 否 | 3.0 行为未知 | +| 10 | queryPolicy | 否 | 是 | | +| 11 | querySmaOptimize | 否 | 是 | | +| 12 | maxNumOfDistinctRes | 是 | 是 | | +| 13 | minSlidingTime | 是 | 是 | | +| 14 | minIntervalTime | 是 | 是 | | +| 15 | countAlwaysReturnValue | 是 | 是 | | +| 16 | dataDir | 是 | 是 | | +| 17 | minimalDataDirGB | 是 | 是 | | +| 18 | supportVnodes | 否 | 是 | | +| 19 | tempDir | 是 | 是 | | +| 20 | minimalTmpDirGB | 是 | 是 | | +| 21 | smlChildTableName | 是 | 是 | | +| 22 | smlTagName | 是 | 是 | | +| 23 | smlDataFormat | 否 | 是 | | +| 24 | statusInterval | 是 | 是 | | +| 25 | logDir | 是 | 是 | | +| 26 | minimalLogDirGB | 是 | 是 | | +| 27 | numOfLogLines | 是 | 是 | | +| 28 | asyncLog | 是 | 是 | | +| 29 | logKeepDays | 是 | 是 | | +| 30 | debugFlag | 是 | 是 | | +| 31 | tmrDebugFlag | 是 | 是 | | +| 32 | uDebugFlag | 是 | 是 | | +| 33 | rpcDebugFlag | 是 | 是 | | +| 34 | jniDebugFlag | 是 | 是 | | +| 35 | qDebugFlag | 是 | 是 | | +| 36 | cDebugFlag | 是 | 是 | | +| 37 | dDebugFlag | 是 | 是 | | +| 38 | vDebugFlag | 是 | 是 | | +| 39 | mDebugFlag | 是 | 是 | | +| 40 | wDebugFlag | 是 | 是 | | +| 41 | sDebugFlag | 是 | 是 | | +| 42 | tsdbDebugFlag | 是 | 是 | | +| 43 | tqDebugFlag | 否 | 是 | | +| 44 | fsDebugFlag | 是 | 是 | | +| 45 | udfDebugFlag | 否 | 是 | | +| 46 | smaDebugFlag | 否 | 是 | | +| 47 | idxDebugFlag | 否 | 是 | | +| 48 | tdbDebugFlag | 否 | 是 | | +| 49 | metaDebugFlag | 否 | 是 | | +| 50 | timezone | 是 | 是 | | +| 51 | locale | 是 | 是 | | +| 52 | charset | 是 | 是 | | +| 53 | udf | 是 | 是 | | +| 54 | enableCoreFile | 是 | 是 | | + +## 2.x->3.0 的废弃参数 + +| # | **参数** | **适用于 2.X ** | **适用于 3.0 ** | 3.0 版本的当前行为 | +| --- | :---------------------: | --------------- | --------------- | ------------------------------------------------- | +| 1 | arbitrator | 是 | 否 | 通过 RAFT 协议选主 | +| 2 | numOfThreadsPerCore | 是 | 否 | 有其它参数设置多种线程池的大小 | +| 3 | numOfMnodes | 是 | 否 | 通过 create mnode 命令动态创建 mnode | +| 4 | vnodeBak | 是 | 否 | 3.0 行为未知 | +| 5 | balance | 是 | 否 | 负载均衡功能由 split/merge vgroups 实现 | +| 6 | balanceInterval | 是 | 否 | 随着 balance 参数失效 | +| 7 | offlineThreshold | 是 | 否 | 3.0 行为未知 | +| 8 | role | 是 | 否 | 由 supportVnode 决定是否能够创建 | +| 9 | dnodeNopLoop | 是 | 否 | 2.6 文档中未找到此参数 | +| 10 | keepTimeOffset | 是 | 否 | 2.6 文档中未找到此参数 | +| 11 | rpcTimer | 是 | 否 | 3.0 行为未知 | +| 12 | rpcMaxTime | 是 | 否 | 3.0 行为未知 | +| 13 | rpcForceTcp | 是 | 否 | 默认为 TCP | +| 14 | tcpConnTimeout | 是 | 否 | 3.0 行为未知 | +| 15 | syncCheckInterval | 是 | 否 | 3.0 行为未知 | +| 16 | maxTmrCtrl | 是 | 否 | 3.0 行为未知 | +| 17 | monitorReplica | 是 | 否 | 由 RAFT 协议管理多副本 | +| 18 | smlTagNullName | 是 | 否 | 3.0 行为未知 | +| 19 | keepColumnName | 是 | 否 | 3.0 行为未知 | +| 20 | ratioOfQueryCores | 是 | 否 | 由 线程池 相关配置参数决定 | +| 21 | maxStreamCompDelay | 是 | 否 | 3.0 行为未知 | +| 22 | maxFirstStreamCompDelay | 是 | 否 | 3.0 行为未知 | +| 23 | retryStreamCompDelay | 是 | 否 | 3.0 行为未知 | +| 24 | streamCompDelayRatio | 是 | 否 | 3.0 行为未知 | +| 25 | maxVgroupsPerDb | 是 | 否 | 由 create db 的参数 vgroups 指定实际 vgroups 数量 | +| 26 | maxTablesPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | +| 27 | minTablesPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | +| 28 | tableIncStepPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | +| 29 | cache | 是 | 否 | 由 buffer 代替 cache\*blocks | +| 30 | blocks | 是 | 否 | 由 buffer 代替 cache\*blocks | +| 31 | days | 是 | 否 | 由 create db 的参数 duration 取代 | +| 32 | keep | 是 | 否 | 由 create db 的参数 keep 取代 | +| 33 | minRows | 是 | 否 | 由 create db 的参数 minRows 取代 | +| 34 | maxRows | 是 | 否 | 由 create db 的参数 maxRows 取代 | +| 35 | quorum | 是 | 否 | 由 RAFT 协议决定 | +| 36 | comp | 是 | 否 | 由 create db 的参数 comp 取代 | +| 37 | walLevel | 是 | 否 | 由 create db 的参数 wal_level 取代 | +| 38 | fsync | 是 | 否 | 由 create db 的参数 wal_fsync_period 取代 | +| 39 | replica | 是 | 否 | 由 create db 的参数 replica 取代 | +| 40 | partitions | 是 | 否 | 3.0 行为未知 | +| 41 | update | 是 | 否 | 允许更新部分列 | +| 42 | cachelast | 是 | 否 | 由 create db 的参数 cacheModel 取代 | +| 43 | maxSQLLength | 是 | 否 | SQL 上限为 1MB,无需参数控制 | +| 44 | maxWildCardsLength | 是 | 否 | 3.0 行为未知 | +| 45 | maxRegexStringLen | 是 | 否 | 3.0 行为未知 | +| 46 | maxNumOfOrderedRes | 是 | 否 | 3.0 行为未知 | +| 47 | maxConnections | 是 | 否 | 取决于系统配置和系统处理能力,详见后面的 Note | +| 48 | mnodeEqualVnodeNum | 是 | 否 | 3.0 行为未知 | +| 49 | http | 是 | 否 | http 服务由 taosAdapter 提供 | +| 50 | httpEnableRecordSql | 是 | 否 | taosd 不提供 http 服务 | +| 51 | httpMaxThreads | 是 | 否 | taosd 不提供 http 服务 | +| 52 | restfulRowLimit | 是 | 否 | taosd 不提供 http 服务 | +| 53 | httpDbNameMandatory | 是 | 否 | taosd 不提供 http 服务 | +| 54 | httpKeepAlive | 是 | 否 | taosd 不提供 http 服务 | +| 55 | enableRecordSql | 是 | 否 | 3.0 行为未知 | +| 56 | maxBinaryDisplayWidth | 是 | 否 | 3.0 行为未知 | +| 57 | stream | 是 | 否 | 默认启用连续查询 | +| 58 | retrieveBlockingModel | 是 | 否 | 3.0 行为未知 | +| 59 | tsdbMetaCompactRatio | 是 | 否 | 3.0 行为未知 | +| 60 | defaultJSONStrType | 是 | 否 | 3.0 行为未知 | +| 61 | walFlushSize | 是 | 否 | 3.0 行为未知 | +| 62 | keepTimeOffset | 是 | 否 | 3.0 行为未知 | +| 63 | flowctrl | 是 | 否 | 3.0 行为未知 | +| 64 | slaveQuery | 是 | 否 | 3.0 行为未知: slave vnode 是否能够处理查询? | +| 65 | adjustMaster | 是 | 否 | 3.0 行为未知 | +| 66 | topicBinaryLen | 是 | 否 | 3.0 行为未知 | +| 67 | telegrafUseFieldNum | 是 | 否 | 3.0 行为未知 | +| 68 | deadLockKillQuery | 是 | 否 | 3.0 行为未知 | +| 69 | clientMerge | 是 | 否 | 3.0 行为未知 | +| 70 | sdbDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 71 | odbcDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 72 | httpDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 73 | monDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 74 | cqDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 75 | shortcutFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 76 | probeSeconds | 是 | 否 | 3.0 行为未知 | +| 77 | probeKillSeconds | 是 | 否 | 3.0 行为未知 | +| 78 | probeInterval | 是 | 否 | 3.0 行为未知 | +| 79 | lossyColumns | 是 | 否 | 3.0 行为未知 | +| 80 | fPrecision | 是 | 否 | 3.0 行为未知 | +| 81 | dPrecision | 是 | 否 | 3.0 行为未知 | +| 82 | maxRange | 是 | 否 | 3.0 行为未知 | +| 83 | range | 是 | 否 | 3.0 行为未知 | From 7a387437e20b1c7444ac87de5936f13c11867c45 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Sat, 10 Dec 2022 19:09:45 +0800 Subject: [PATCH 72/97] doc: reorganize 3.0 configuration parameters --- docs/en/14-reference/12-config/index.md | 393 ++++++++++-------------- docs/zh/14-reference/12-config/index.md | 7 +- 2 files changed, 167 insertions(+), 233 deletions(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index bb5516ae70..a60cbe937d 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -153,11 +153,11 @@ The parameters described in this document by the effect that they have on the sy | Meaning | Execution policy for query statements | | Unit | None | | Default | 1 | -| Notes | 1: Run queries on vnodes and not on qnodes | +| Value Range | 1: Run queries on vnodes and not on qnodes 2: Run subtasks without scan operators on qnodes and subtasks with scan operators on vnodes. -3: Only run scan operators on vnodes; run all other operators on qnodes. +3: Only run scan operators on vnodes; run all other operators on qnodes. | ### querySmaOptimize @@ -173,6 +173,14 @@ The parameters described in this document by the effect that they have on the sy 1: Enable SMA indexing and perform queries from suitable statements on precomputation results.| +### countAlwaysReturnValue + +| Attribute | Description | +| -------- | -------------------------------- | +| Applicable | Server only | +| Meaning | count()/hyperloglog() return value or not if the result data is NULL | +| Vlue Range | 0:Return empty line,1:Return 0 | +| Default | 1 | ### maxNumOfDistinctRes @@ -307,6 +315,14 @@ The charset that takes effect is UTF-8. | Meaning | All data files are stored in this directory | | Default Value | /var/lib/taos | +### tempDir + +| Attribute | Description | +| -------- | ------------------------------------------ | +| Applicable | Server only | +| Meaning | The directory where to put all the temporary files generated during system running | +| Default | /tmp | + ### minimalTmpDirGB | Attribute | Description | @@ -336,63 +352,8 @@ The charset that takes effect is UTF-8. | Value Range | 0-4096 | | Default Value | 2x the CPU cores | -## Time Parameters -### statusInterval - -| Attribute | Description | -| -------- | --------------------------- | -| Applicable | Server Only | -| Meaning | the interval of dnode reporting status to mnode | -| Unit | second | -| Value Range | 1-10 | -| Default Value | 1 | - -### shellActivityTimer - -| Attribute | Description | -| -------- | --------------------------------- | -| Applicable | Server and Client | -| Meaning | The interval for TDengine CLI to send heartbeat to mnode | -| Unit | second | -| Value Range | 1-120 | -| Default Value | 3 | - -## Performance Optimization Parameters - -### numOfCommitThreads - -| Attribute | Description | -| -------- | ---------------------- | -| Applicable | Server Only | -| Meaning | Maximum of threads for committing to disk | -| Default Value | | - -## Compression Parameters - -### compressMsgSize - -| Attribute | Description | -| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Applicable | Server Only | -| Meaning | The threshold for message size to compress the message. | Set the value to 64330 bytes for good message compression. | -| Unit | bytes | -| Value Range | 0: already compress; >0: compress when message exceeds it; -1: always uncompress | -| Default Value | -1 | - -### compressColData - -| Attribute | Description | -| -------- | --------------------------------------------------------------------------------------- | -| Applicable | Server Only | -| Meaning | The threshold for size of column data to trigger compression for the query result | -| Unit | bytes | -| Value Range | 0: always compress; >0: only compress when the size of any column data exceeds the threshold; -1: always uncompress | -| Default Value | -1 | -| Default Value | -1 | -| Note | available from version 2.3.0.0 | | - -## Continuous Query Parameters | +## Continuous Query Parameters ### minSlidingTime @@ -686,172 +647,150 @@ To prevent system resource from being exhausted by multiple concurrent streams, | Value Range | 0: disable UDF; 1: enabled UDF | | Default Value | 1 | -## Parameter Comparison of TDengine 2.x and 3.0 -| # | **Parameter** | **In 2.x** | **In 3.0** | -| --- | :-----------------: | --------------- | --------------- | -| 1 | firstEp | Yes | Yes | -| 2 | secondEp | Yes | Yes | -| 3 | fqdn | Yes | Yes | -| 4 | serverPort | Yes | Yes | -| 5 | maxShellConns | Yes | Yes | -| 6 | monitor | Yes | Yes | -| 7 | monitorFqdn | No | Yes | -| 8 | monitorPort | No | Yes | -| 9 | monitorInterval | Yes | Yes | -| 10 | monitorMaxLogs | No | Yes | -| 11 | monitorComp | No | Yes | -| 12 | telemetryReporting | Yes | Yes | -| 13 | telemetryInterval | No | Yes | -| 14 | telemetryServer | No | Yes | -| 15 | telemetryPort | No | Yes | -| 16 | queryPolicy | No | Yes | -| 17 | querySmaOptimize | No | Yes | -| 18 | queryRsmaTolerance | No | Yes | -| 19 | queryBufferSize | Yes | Yes | -| 20 | maxNumOfDistinctRes | Yes | Yes | -| 21 | minSlidingTime | Yes | Yes | -| 22 | minIntervalTime | Yes | Yes | -| 23 | countAlwaysReturnValue | Yes | Yes | -| 24 | dataDir | Yes | Yes | -| 25 | minimalDataDirGB | Yes | Yes | -| 26 | supportVnodes | No | Yes | -| 27 | tempDir | Yes | Yes | -| 28 | minimalTmpDirGB | Yes | Yes | -| 29 | compressMsgSize | Yes | Yes | -| 30 | compressColData | Yes | Yes | -| 31 | smlChildTableName | Yes | Yes | -| 32 | smlTagName | Yes | Yes | -| 33 | smlDataFormat | No | Yes | -| 34 | statusInterval | Yes | Yes | -| 35 | shellActivityTimer | Yes | Yes | -| 36 | transPullupInterval | No | Yes | -| 37 | mqRebalanceInterval | No | Yes | -| 38 | ttlUnit | No | Yes | -| 39 | ttlPushInterval | No | Yes | -| 40 | numOfTaskQueueThreads | No | Yes | -| 41 | numOfRpcThreads | No | Yes | -| 42 | numOfCommitThreads | Yes | Yes | -| 43 | numOfMnodeReadThreads | No | Yes | -| 44 | numOfVnodeQueryThreads | No | Yes | -| 45 | numOfVnodeStreamThreads | No | Yes | -| 46 | numOfVnodeFetchThreads | No | Yes | -| 47 | numOfVnodeRsmaThreads | No | Yes | -| 48 | numOfQnodeQueryThreads | No | Yes | -| 49 | numOfQnodeFetchThreads | No | Yes | -| 50 | numOfSnodeSharedThreads | No | Yes | -| 51 | numOfSnodeUniqueThreads | No | Yes | -| 52 | rpcQueueMemoryAllowed | No | Yes | -| 53 | logDir | Yes | Yes | -| 54 | minimalLogDirGB | Yes | Yes | -| 55 | numOfLogLines | Yes | Yes | -| 56 | asyncLog | Yes | Yes | -| 57 | logKeepDays | Yes | Yes | -| 60 | debugFlag | Yes | Yes | -| 61 | tmrDebugFlag | Yes | Yes | -| 62 | uDebugFlag | Yes | Yes | -| 63 | rpcDebugFlag | Yes | Yes | -| 64 | jniDebugFlag | Yes | Yes | -| 65 | qDebugFlag | Yes | Yes | -| 66 | cDebugFlag | Yes | Yes | -| 67 | dDebugFlag | Yes | Yes | -| 68 | vDebugFlag | Yes | Yes | -| 69 | mDebugFlag | Yes | Yes | -| 70 | wDebugFlag | Yes | Yes | -| 71 | sDebugFlag | Yes | Yes | -| 72 | tsdbDebugFlag | Yes | Yes | -| 73 | tqDebugFlag | No | Yes | -| 74 | fsDebugFlag | Yes | Yes | -| 75 | udfDebugFlag | No | Yes | -| 76 | smaDebugFlag | No | Yes | -| 77 | idxDebugFlag | No | Yes | -| 78 | tdbDebugFlag | No | Yes | -| 79 | metaDebugFlag | No | Yes | -| 80 | timezone | Yes | Yes | -| 81 | locale | Yes | Yes | -| 82 | charset | Yes | Yes | -| 83 | udf | Yes | Yes | -| 84 | enableCoreFile | Yes | Yes | -| 85 | arbitrator | Yes | No | -| 86 | numOfThreadsPerCore | Yes | No | -| 87 | numOfMnodes | Yes | No | -| 88 | vnodeBak | Yes | No | -| 89 | balance | Yes | No | -| 90 | balanceInterval | Yes | No | -| 91 | offlineThreshold | Yes | No | -| 92 | role | Yes | No | -| 93 | dnodeNopLoop | Yes | No | -| 94 | keepTimeOffset | Yes | No | -| 95 | rpcTimer | Yes | No | -| 96 | rpcMaxTime | Yes | No | -| 97 | rpcForceTcp | Yes | No | -| 98 | tcpConnTimeout | Yes | No | -| 99 | syncCheckInterval | Yes | No | -| 100 | maxTmrCtrl | Yes | No | -| 101 | monitorReplica | Yes | No | -| 102 | smlTagNullName | Yes | No | -| 103 | keepColumnName | Yes | No | -| 104 | ratioOfQueryCores | Yes | No | -| 105 | maxStreamCompDelay | Yes | No | -| 106 | maxFirstStreamCompDelay | Yes | No | -| 107 | retryStreamCompDelay | Yes | No | -| 108 | streamCompDelayRatio | Yes | No | -| 109 | maxVgroupsPerDb | Yes | No | -| 110 | maxTablesPerVnode | Yes | No | -| 111 | minTablesPerVnode | Yes | No | -| 112 | tableIncStepPerVnode | Yes | No | -| 113 | cache | Yes | No | -| 114 | blocks | Yes | No | -| 115 | days | Yes | No | -| 116 | keep | Yes | No | -| 117 | minRows | Yes | No | -| 118 | maxRows | Yes | No | -| 119 | quorum | Yes | No | -| 120 | comp | Yes | No | -| 121 | walLevel | Yes | No | -| 122 | fsync | Yes | No | -| 123 | replica | Yes | No | -| 124 | partitions | Yes | No | -| 125 | quorum | Yes | No | -| 126 | update | Yes | No | -| 127 | cachelast | Yes | No | -| 128 | maxSQLLength | Yes | No | -| 129 | maxWildCardsLength | Yes | No | -| 130 | maxRegexStringLen | Yes | No | -| 131 | maxNumOfOrderedRes | Yes | No | -| 132 | maxConnections | Yes | No | -| 133 | mnodeEqualVnodeNum | Yes | No | -| 134 | http | Yes | No | -| 135 | httpEnableRecordSql | Yes | No | -| 136 | httpMaxThreads | Yes | No | -| 137 | restfulRowLimit | Yes | No | -| 138 | httpDbNameMandatory | Yes | No | -| 139 | httpKeepAlive | Yes | No | -| 140 | enableRecordSql | Yes | No | -| 141 | maxBinaryDisplayWidth | Yes | No | -| 142 | stream | Yes | No | -| 143 | retrieveBlockingModel | Yes | No | -| 144 | tsdbMetaCompactRatio | Yes | No | -| 145 | defaultJSONStrType | Yes | No | -| 146 | walFlushSize | Yes | No | -| 147 | keepTimeOffset | Yes | No | -| 148 | flowctrl | Yes | No | -| 149 | slaveQuery | Yes | No | -| 150 | adjustMaster | Yes | No | -| 151 | topicBinaryLen | Yes | No | -| 152 | telegrafUseFieldNum | Yes | No | -| 153 | deadLockKillQuery | Yes | No | -| 154 | clientMerge | Yes | No | -| 155 | sdbDebugFlag | Yes | No | -| 156 | odbcDebugFlag | Yes | No | -| 157 | httpDebugFlag | Yes | No | -| 158 | monDebugFlag | Yes | No | -| 159 | cqDebugFlag | Yes | No | -| 160 | shortcutFlag | Yes | No | -| 161 | probeSeconds | Yes | No | -| 162 | probeKillSeconds | Yes | No | -| 163 | probeInterval | Yes | No | -| 164 | lossyColumns | Yes | No | -| 165 | fPrecision | Yes | No | -| 166 | dPrecision | Yes | No | -| 167 | maxRange | Yes | No | -| 168 | range | Yes | No | + +## 3.0 Parameters + +| # | **参数** | **适用于 2.X ** | **适用于 3.0 ** | 3.0 版本的当前行为 | +| --- | :---------------------: | --------------- | --------------- | ------------------------------------------------- | +| 1 | firstEp | 是 | 是 | | +| 2 | secondEp | 是 | 是 | | +| 3 | fqdn | 是 | 是 | | +| 4 | serverPort | 是 | 是 | | +| 5 | maxShellConns | 是 | 是 | | +| 6 | monitor | 是 | 是 | | +| 7 | monitorFqdn | 否 | 是 | | +| 8 | monitorPort | 否 | 是 | | +| 9 | monitorInterval | 是 | 是 | | +| 10 | queryPolicy | 否 | 是 | | +| 11 | querySmaOptimize | 否 | 是 | | +| 12 | maxNumOfDistinctRes | 是 | 是 | | +| 13 | minSlidingTime | 是 | 是 | | +| 14 | minIntervalTime | 是 | 是 | | +| 15 | countAlwaysReturnValue | 是 | 是 | | +| 16 | dataDir | 是 | 是 | | +| 17 | minimalDataDirGB | 是 | 是 | | +| 18 | supportVnodes | 否 | 是 | | +| 19 | tempDir | 是 | 是 | | +| 20 | minimalTmpDirGB | 是 | 是 | | +| 21 | smlChildTableName | 是 | 是 | | +| 22 | smlTagName | 是 | 是 | | +| 23 | smlDataFormat | 否 | 是 | | +| 24 | statusInterval | 是 | 是 | | +| 25 | logDir | 是 | 是 | | +| 26 | minimalLogDirGB | 是 | 是 | | +| 27 | numOfLogLines | 是 | 是 | | +| 28 | asyncLog | 是 | 是 | | +| 29 | logKeepDays | 是 | 是 | | +| 30 | debugFlag | 是 | 是 | | +| 31 | tmrDebugFlag | 是 | 是 | | +| 32 | uDebugFlag | 是 | 是 | | +| 33 | rpcDebugFlag | 是 | 是 | | +| 34 | jniDebugFlag | 是 | 是 | | +| 35 | qDebugFlag | 是 | 是 | | +| 36 | cDebugFlag | 是 | 是 | | +| 37 | dDebugFlag | 是 | 是 | | +| 38 | vDebugFlag | 是 | 是 | | +| 39 | mDebugFlag | 是 | 是 | | +| 40 | wDebugFlag | 是 | 是 | | +| 41 | sDebugFlag | 是 | 是 | | +| 42 | tsdbDebugFlag | 是 | 是 | | +| 43 | tqDebugFlag | 否 | 是 | | +| 44 | fsDebugFlag | 是 | 是 | | +| 45 | udfDebugFlag | 否 | 是 | | +| 46 | smaDebugFlag | 否 | 是 | | +| 47 | idxDebugFlag | 否 | 是 | | +| 48 | tdbDebugFlag | 否 | 是 | | +| 49 | metaDebugFlag | 否 | 是 | | +| 50 | timezone | 是 | 是 | | +| 51 | locale | 是 | 是 | | +| 52 | charset | 是 | 是 | | +| 53 | udf | 是 | 是 | | +| 54 | enableCoreFile | 是 | 是 | | + +## Abandoned 2.x Parameters + +| # | **参数** | **适用于 2.X ** | **适用于 3.0 ** | 3.0 版本的当前行为 | +| --- | :---------------------: | --------------- | --------------- | ------------------------------------------------- | +| 1 | arbitrator | 是 | 否 | 通过 RAFT 协议选主 | +| 2 | numOfThreadsPerCore | 是 | 否 | 有其它参数设置多种线程池的大小 | +| 3 | numOfMnodes | 是 | 否 | 通过 create mnode 命令动态创建 mnode | +| 4 | vnodeBak | 是 | 否 | 3.0 行为未知 | +| 5 | balance | 是 | 否 | 负载均衡功能由 split/merge vgroups 实现 | +| 6 | balanceInterval | 是 | 否 | 随着 balance 参数失效 | +| 7 | offlineThreshold | 是 | 否 | 3.0 行为未知 | +| 8 | role | 是 | 否 | 由 supportVnode 决定是否能够创建 | +| 9 | dnodeNopLoop | 是 | 否 | 2.6 文档中未找到此参数 | +| 10 | keepTimeOffset | 是 | 否 | 2.6 文档中未找到此参数 | +| 11 | rpcTimer | 是 | 否 | 3.0 行为未知 | +| 12 | rpcMaxTime | 是 | 否 | 3.0 行为未知 | +| 13 | rpcForceTcp | 是 | 否 | 默认为 TCP | +| 14 | tcpConnTimeout | 是 | 否 | 3.0 行为未知 | +| 15 | syncCheckInterval | 是 | 否 | 3.0 行为未知 | +| 16 | maxTmrCtrl | 是 | 否 | 3.0 行为未知 | +| 17 | monitorReplica | 是 | 否 | 由 RAFT 协议管理多副本 | +| 18 | smlTagNullName | 是 | 否 | 3.0 行为未知 | +| 19 | keepColumnName | 是 | 否 | 3.0 行为未知 | +| 20 | ratioOfQueryCores | 是 | 否 | 由 线程池 相关配置参数决定 | +| 21 | maxStreamCompDelay | 是 | 否 | 3.0 行为未知 | +| 22 | maxFirstStreamCompDelay | 是 | 否 | 3.0 行为未知 | +| 23 | retryStreamCompDelay | 是 | 否 | 3.0 行为未知 | +| 24 | streamCompDelayRatio | 是 | 否 | 3.0 行为未知 | +| 25 | maxVgroupsPerDb | 是 | 否 | 由 create db 的参数 vgroups 指定实际 vgroups 数量 | +| 26 | maxTablesPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | +| 27 | minTablesPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | +| 28 | tableIncStepPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | +| 29 | cache | 是 | 否 | 由 buffer 代替 cache\*blocks | +| 30 | blocks | 是 | 否 | 由 buffer 代替 cache\*blocks | +| 31 | days | 是 | 否 | 由 create db 的参数 duration 取代 | +| 32 | keep | 是 | 否 | 由 create db 的参数 keep 取代 | +| 33 | minRows | 是 | 否 | 由 create db 的参数 minRows 取代 | +| 34 | maxRows | 是 | 否 | 由 create db 的参数 maxRows 取代 | +| 35 | quorum | 是 | 否 | 由 RAFT 协议决定 | +| 36 | comp | 是 | 否 | 由 create db 的参数 comp 取代 | +| 37 | walLevel | 是 | 否 | 由 create db 的参数 wal_level 取代 | +| 38 | fsync | 是 | 否 | 由 create db 的参数 wal_fsync_period 取代 | +| 39 | replica | 是 | 否 | 由 create db 的参数 replica 取代 | +| 40 | partitions | 是 | 否 | 3.0 行为未知 | +| 41 | update | 是 | 否 | 允许更新部分列 | +| 42 | cachelast | 是 | 否 | 由 create db 的参数 cacheModel 取代 | +| 43 | maxSQLLength | 是 | 否 | SQL 上限为 1MB,无需参数控制 | +| 44 | maxWildCardsLength | 是 | 否 | 3.0 行为未知 | +| 45 | maxRegexStringLen | 是 | 否 | 3.0 行为未知 | +| 46 | maxNumOfOrderedRes | 是 | 否 | 3.0 行为未知 | +| 47 | maxConnections | 是 | 否 | 取决于系统配置和系统处理能力,详见后面的 Note | +| 48 | mnodeEqualVnodeNum | 是 | 否 | 3.0 行为未知 | +| 49 | http | 是 | 否 | http 服务由 taosAdapter 提供 | +| 50 | httpEnableRecordSql | 是 | 否 | taosd 不提供 http 服务 | +| 51 | httpMaxThreads | 是 | 否 | taosd 不提供 http 服务 | +| 52 | restfulRowLimit | 是 | 否 | taosd 不提供 http 服务 | +| 53 | httpDbNameMandatory | 是 | 否 | taosd 不提供 http 服务 | +| 54 | httpKeepAlive | 是 | 否 | taosd 不提供 http 服务 | +| 55 | enableRecordSql | 是 | 否 | 3.0 行为未知 | +| 56 | maxBinaryDisplayWidth | 是 | 否 | 3.0 行为未知 | +| 57 | stream | 是 | 否 | 默认启用连续查询 | +| 58 | retrieveBlockingModel | 是 | 否 | 3.0 行为未知 | +| 59 | tsdbMetaCompactRatio | 是 | 否 | 3.0 行为未知 | +| 60 | defaultJSONStrType | 是 | 否 | 3.0 行为未知 | +| 61 | walFlushSize | 是 | 否 | 3.0 行为未知 | +| 62 | keepTimeOffset | 是 | 否 | 3.0 行为未知 | +| 63 | flowctrl | 是 | 否 | 3.0 行为未知 | +| 64 | slaveQuery | 是 | 否 | 3.0 行为未知: slave vnode 是否能够处理查询? | +| 65 | adjustMaster | 是 | 否 | 3.0 行为未知 | +| 66 | topicBinaryLen | 是 | 否 | 3.0 行为未知 | +| 67 | telegrafUseFieldNum | 是 | 否 | 3.0 行为未知 | +| 68 | deadLockKillQuery | 是 | 否 | 3.0 行为未知 | +| 69 | clientMerge | 是 | 否 | 3.0 行为未知 | +| 70 | sdbDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 71 | odbcDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 72 | httpDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 73 | monDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 74 | cqDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 75 | shortcutFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | +| 76 | probeSeconds | 是 | 否 | 3.0 行为未知 | +| 77 | probeKillSeconds | 是 | 否 | 3.0 行为未知 | +| 78 | probeInterval | 是 | 否 | 3.0 行为未知 | +| 79 | lossyColumns | 是 | 否 | 3.0 行为未知 | +| 80 | fPrecision | 是 | 否 | 3.0 行为未知 | +| 81 | dPrecision | 是 | 否 | 3.0 行为未知 | +| 82 | maxRange | 是 | 否 | 3.0 行为未知 | +| 83 | range | 是 | 否 | 3.0 行为未知 | diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index c149621233..3db2607955 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -640,12 +640,7 @@ charset 的有效值是 UTF-8。 | 取值范围 | 0: 不启动;1:启动 | | 缺省值 | 1 | -## 3.0 配置参数列表 - -:::note -对于 2.x 版本中适用但在 3.0 版本中废弃的参数,其当前行为会有特别说明 - -::: +## 3.0 中有效的配置参数列表 | # | **参数** | **适用于 2.X ** | **适用于 3.0 ** | 3.0 版本的当前行为 | | --- | :---------------------: | --------------- | --------------- | ------------------------------------------------- | From 3762e7d6c5d8f0c65fa3143fa6642365f9038a77 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Sat, 10 Dec 2022 19:14:00 +0800 Subject: [PATCH 73/97] doc: remove abandoned 2.x parameters from English version --- docs/en/14-reference/12-config/index.md | 88 ------------------------- 1 file changed, 88 deletions(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index a60cbe937d..56d773efea 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -706,91 +706,3 @@ To prevent system resource from being exhausted by multiple concurrent streams, | 52 | charset | 是 | 是 | | | 53 | udf | 是 | 是 | | | 54 | enableCoreFile | 是 | 是 | | - -## Abandoned 2.x Parameters - -| # | **参数** | **适用于 2.X ** | **适用于 3.0 ** | 3.0 版本的当前行为 | -| --- | :---------------------: | --------------- | --------------- | ------------------------------------------------- | -| 1 | arbitrator | 是 | 否 | 通过 RAFT 协议选主 | -| 2 | numOfThreadsPerCore | 是 | 否 | 有其它参数设置多种线程池的大小 | -| 3 | numOfMnodes | 是 | 否 | 通过 create mnode 命令动态创建 mnode | -| 4 | vnodeBak | 是 | 否 | 3.0 行为未知 | -| 5 | balance | 是 | 否 | 负载均衡功能由 split/merge vgroups 实现 | -| 6 | balanceInterval | 是 | 否 | 随着 balance 参数失效 | -| 7 | offlineThreshold | 是 | 否 | 3.0 行为未知 | -| 8 | role | 是 | 否 | 由 supportVnode 决定是否能够创建 | -| 9 | dnodeNopLoop | 是 | 否 | 2.6 文档中未找到此参数 | -| 10 | keepTimeOffset | 是 | 否 | 2.6 文档中未找到此参数 | -| 11 | rpcTimer | 是 | 否 | 3.0 行为未知 | -| 12 | rpcMaxTime | 是 | 否 | 3.0 行为未知 | -| 13 | rpcForceTcp | 是 | 否 | 默认为 TCP | -| 14 | tcpConnTimeout | 是 | 否 | 3.0 行为未知 | -| 15 | syncCheckInterval | 是 | 否 | 3.0 行为未知 | -| 16 | maxTmrCtrl | 是 | 否 | 3.0 行为未知 | -| 17 | monitorReplica | 是 | 否 | 由 RAFT 协议管理多副本 | -| 18 | smlTagNullName | 是 | 否 | 3.0 行为未知 | -| 19 | keepColumnName | 是 | 否 | 3.0 行为未知 | -| 20 | ratioOfQueryCores | 是 | 否 | 由 线程池 相关配置参数决定 | -| 21 | maxStreamCompDelay | 是 | 否 | 3.0 行为未知 | -| 22 | maxFirstStreamCompDelay | 是 | 否 | 3.0 行为未知 | -| 23 | retryStreamCompDelay | 是 | 否 | 3.0 行为未知 | -| 24 | streamCompDelayRatio | 是 | 否 | 3.0 行为未知 | -| 25 | maxVgroupsPerDb | 是 | 否 | 由 create db 的参数 vgroups 指定实际 vgroups 数量 | -| 26 | maxTablesPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | -| 27 | minTablesPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | -| 28 | tableIncStepPerVnode | 是 | 否 | DB 中的所有表近似平均分配到各个 vgroup | -| 29 | cache | 是 | 否 | 由 buffer 代替 cache\*blocks | -| 30 | blocks | 是 | 否 | 由 buffer 代替 cache\*blocks | -| 31 | days | 是 | 否 | 由 create db 的参数 duration 取代 | -| 32 | keep | 是 | 否 | 由 create db 的参数 keep 取代 | -| 33 | minRows | 是 | 否 | 由 create db 的参数 minRows 取代 | -| 34 | maxRows | 是 | 否 | 由 create db 的参数 maxRows 取代 | -| 35 | quorum | 是 | 否 | 由 RAFT 协议决定 | -| 36 | comp | 是 | 否 | 由 create db 的参数 comp 取代 | -| 37 | walLevel | 是 | 否 | 由 create db 的参数 wal_level 取代 | -| 38 | fsync | 是 | 否 | 由 create db 的参数 wal_fsync_period 取代 | -| 39 | replica | 是 | 否 | 由 create db 的参数 replica 取代 | -| 40 | partitions | 是 | 否 | 3.0 行为未知 | -| 41 | update | 是 | 否 | 允许更新部分列 | -| 42 | cachelast | 是 | 否 | 由 create db 的参数 cacheModel 取代 | -| 43 | maxSQLLength | 是 | 否 | SQL 上限为 1MB,无需参数控制 | -| 44 | maxWildCardsLength | 是 | 否 | 3.0 行为未知 | -| 45 | maxRegexStringLen | 是 | 否 | 3.0 行为未知 | -| 46 | maxNumOfOrderedRes | 是 | 否 | 3.0 行为未知 | -| 47 | maxConnections | 是 | 否 | 取决于系统配置和系统处理能力,详见后面的 Note | -| 48 | mnodeEqualVnodeNum | 是 | 否 | 3.0 行为未知 | -| 49 | http | 是 | 否 | http 服务由 taosAdapter 提供 | -| 50 | httpEnableRecordSql | 是 | 否 | taosd 不提供 http 服务 | -| 51 | httpMaxThreads | 是 | 否 | taosd 不提供 http 服务 | -| 52 | restfulRowLimit | 是 | 否 | taosd 不提供 http 服务 | -| 53 | httpDbNameMandatory | 是 | 否 | taosd 不提供 http 服务 | -| 54 | httpKeepAlive | 是 | 否 | taosd 不提供 http 服务 | -| 55 | enableRecordSql | 是 | 否 | 3.0 行为未知 | -| 56 | maxBinaryDisplayWidth | 是 | 否 | 3.0 行为未知 | -| 57 | stream | 是 | 否 | 默认启用连续查询 | -| 58 | retrieveBlockingModel | 是 | 否 | 3.0 行为未知 | -| 59 | tsdbMetaCompactRatio | 是 | 否 | 3.0 行为未知 | -| 60 | defaultJSONStrType | 是 | 否 | 3.0 行为未知 | -| 61 | walFlushSize | 是 | 否 | 3.0 行为未知 | -| 62 | keepTimeOffset | 是 | 否 | 3.0 行为未知 | -| 63 | flowctrl | 是 | 否 | 3.0 行为未知 | -| 64 | slaveQuery | 是 | 否 | 3.0 行为未知: slave vnode 是否能够处理查询? | -| 65 | adjustMaster | 是 | 否 | 3.0 行为未知 | -| 66 | topicBinaryLen | 是 | 否 | 3.0 行为未知 | -| 67 | telegrafUseFieldNum | 是 | 否 | 3.0 行为未知 | -| 68 | deadLockKillQuery | 是 | 否 | 3.0 行为未知 | -| 69 | clientMerge | 是 | 否 | 3.0 行为未知 | -| 70 | sdbDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 71 | odbcDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 72 | httpDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 73 | monDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 74 | cqDebugFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 75 | shortcutFlag | 是 | 否 | 参考 3.0 的 DebugFlag 系列参数 | -| 76 | probeSeconds | 是 | 否 | 3.0 行为未知 | -| 77 | probeKillSeconds | 是 | 否 | 3.0 行为未知 | -| 78 | probeInterval | 是 | 否 | 3.0 行为未知 | -| 79 | lossyColumns | 是 | 否 | 3.0 行为未知 | -| 80 | fPrecision | 是 | 否 | 3.0 行为未知 | -| 81 | dPrecision | 是 | 否 | 3.0 行为未知 | -| 82 | maxRange | 是 | 否 | 3.0 行为未知 | -| 83 | range | 是 | 否 | 3.0 行为未知 | From df4716a90a9443e044de3f2a8bddc94633794570 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Sat, 10 Dec 2022 19:15:42 +0800 Subject: [PATCH 74/97] doc: rephrase configuration parameters --- docs/en/14-reference/12-config/index.md | 110 ++++++++++++------------ 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index 56d773efea..39edffc4d0 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -650,59 +650,59 @@ To prevent system resource from being exhausted by multiple concurrent streams, ## 3.0 Parameters -| # | **参数** | **适用于 2.X ** | **适用于 3.0 ** | 3.0 版本的当前行为 | +| # | **参数** | **Applicable to 2.x ** | **Applicable to 3.0 ** | Current behavior in 3.0 | | --- | :---------------------: | --------------- | --------------- | ------------------------------------------------- | -| 1 | firstEp | 是 | 是 | | -| 2 | secondEp | 是 | 是 | | -| 3 | fqdn | 是 | 是 | | -| 4 | serverPort | 是 | 是 | | -| 5 | maxShellConns | 是 | 是 | | -| 6 | monitor | 是 | 是 | | -| 7 | monitorFqdn | 否 | 是 | | -| 8 | monitorPort | 否 | 是 | | -| 9 | monitorInterval | 是 | 是 | | -| 10 | queryPolicy | 否 | 是 | | -| 11 | querySmaOptimize | 否 | 是 | | -| 12 | maxNumOfDistinctRes | 是 | 是 | | -| 13 | minSlidingTime | 是 | 是 | | -| 14 | minIntervalTime | 是 | 是 | | -| 15 | countAlwaysReturnValue | 是 | 是 | | -| 16 | dataDir | 是 | 是 | | -| 17 | minimalDataDirGB | 是 | 是 | | -| 18 | supportVnodes | 否 | 是 | | -| 19 | tempDir | 是 | 是 | | -| 20 | minimalTmpDirGB | 是 | 是 | | -| 21 | smlChildTableName | 是 | 是 | | -| 22 | smlTagName | 是 | 是 | | -| 23 | smlDataFormat | 否 | 是 | | -| 24 | statusInterval | 是 | 是 | | -| 25 | logDir | 是 | 是 | | -| 26 | minimalLogDirGB | 是 | 是 | | -| 27 | numOfLogLines | 是 | 是 | | -| 28 | asyncLog | 是 | 是 | | -| 29 | logKeepDays | 是 | 是 | | -| 30 | debugFlag | 是 | 是 | | -| 31 | tmrDebugFlag | 是 | 是 | | -| 32 | uDebugFlag | 是 | 是 | | -| 33 | rpcDebugFlag | 是 | 是 | | -| 34 | jniDebugFlag | 是 | 是 | | -| 35 | qDebugFlag | 是 | 是 | | -| 36 | cDebugFlag | 是 | 是 | | -| 37 | dDebugFlag | 是 | 是 | | -| 38 | vDebugFlag | 是 | 是 | | -| 39 | mDebugFlag | 是 | 是 | | -| 40 | wDebugFlag | 是 | 是 | | -| 41 | sDebugFlag | 是 | 是 | | -| 42 | tsdbDebugFlag | 是 | 是 | | -| 43 | tqDebugFlag | 否 | 是 | | -| 44 | fsDebugFlag | 是 | 是 | | -| 45 | udfDebugFlag | 否 | 是 | | -| 46 | smaDebugFlag | 否 | 是 | | -| 47 | idxDebugFlag | 否 | 是 | | -| 48 | tdbDebugFlag | 否 | 是 | | -| 49 | metaDebugFlag | 否 | 是 | | -| 50 | timezone | 是 | 是 | | -| 51 | locale | 是 | 是 | | -| 52 | charset | 是 | 是 | | -| 53 | udf | 是 | 是 | | -| 54 | enableCoreFile | 是 | 是 | | +| 1 | firstEp | Yes | Yes | | +| 2 | secondEp | Yes | Yes | | +| 3 | fqdn | Yes | Yes | | +| 4 | serverPort | Yes | Yes | | +| 5 | maxShellConns | Yes | Yes | | +| 6 | monitor | Yes | Yes | | +| 7 | monitorFqdn | No | Yes | | +| 8 | monitorPort | No | Yes | | +| 9 | monitorInterval | Yes | Yes | | +| 10 | queryPolicy | No | Yes | | +| 11 | querySmaOptimize | No | Yes | | +| 12 | maxNumOfDistinctRes | Yes | Yes | | +| 13 | minSlidingTime | Yes | Yes | | +| 14 | minIntervalTime | Yes | Yes | | +| 15 | countAlwaysReturnValue | Yes | Yes | | +| 16 | dataDir | Yes | Yes | | +| 17 | minimalDataDirGB | Yes | Yes | | +| 18 | supportVnodes | No | Yes | | +| 19 | tempDir | Yes | Yes | | +| 20 | minimalTmpDirGB | Yes | Yes | | +| 21 | smlChildTableName | Yes | Yes | | +| 22 | smlTagName | Yes | Yes | | +| 23 | smlDataFormat | No | Yes | | +| 24 | statusInterval | Yes | Yes | | +| 25 | logDir | Yes | Yes | | +| 26 | minimalLogDirGB | Yes | Yes | | +| 27 | numOfLogLines | Yes | Yes | | +| 28 | asyncLog | Yes | Yes | | +| 29 | logKeepDays | Yes | Yes | | +| 30 | debugFlag | Yes | Yes | | +| 31 | tmrDebugFlag | Yes | Yes | | +| 32 | uDebugFlag | Yes | Yes | | +| 33 | rpcDebugFlag | Yes | Yes | | +| 34 | jniDebugFlag | Yes | Yes | | +| 35 | qDebugFlag | Yes | Yes | | +| 36 | cDebugFlag | Yes | Yes | | +| 37 | dDebugFlag | Yes | Yes | | +| 38 | vDebugFlag | Yes | Yes | | +| 39 | mDebugFlag | Yes | Yes | | +| 40 | wDebugFlag | Yes | Yes | | +| 41 | sDebugFlag | Yes | Yes | | +| 42 | tsdbDebugFlag | Yes | Yes | | +| 43 | tqDebugFlag | No | Yes | | +| 44 | fsDebugFlag | Yes | Yes | | +| 45 | udfDebugFlag | No | Yes | | +| 46 | smaDebugFlag | No | Yes | | +| 47 | idxDebugFlag | No | Yes | | +| 48 | tdbDebugFlag | No | Yes | | +| 49 | metaDebugFlag | No | Yes | | +| 50 | timezone | Yes | Yes | | +| 51 | locale | Yes | Yes | | +| 52 | charset | Yes | Yes | | +| 53 | udf | Yes | Yes | | +| 54 | enableCoreFile | Yes | Yes | | From 23f8209d2bd3068492785bb95d2e766a87cf30bf Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Mon, 12 Dec 2022 08:56:02 +0800 Subject: [PATCH 75/97] doc: remove minSlidingTime and minIntervalTime --- docs/en/14-reference/12-config/index.md | 30 ------------------------- docs/zh/14-reference/12-config/index.md | 20 ----------------- 2 files changed, 50 deletions(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index 39edffc4d0..7727a2f958 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -352,34 +352,6 @@ The charset that takes effect is UTF-8. | Value Range | 0-4096 | | Default Value | 2x the CPU cores | - -## Continuous Query Parameters - -### minSlidingTime - -| Attribute | Description | -| ------------- | -------------------------------------------------------- | -| Applicable | Server Only | -| Meaning | Minimum sliding time of time window | -| Unit | millisecond or microsecond , depending on time precision | -| Value Range | 10-1000000 | -| Default Value | 10 | - -### minIntervalTime - -| Attribute | Description | -| ------------- | --------------------------- | -| Applicable | Server Only | -| Meaning | Minimum size of time window | -| Unit | millisecond | -| Value Range | 1-1000000 | -| Default Value | 10 | - -:::info -To prevent system resource from being exhausted by multiple concurrent streams, a random delay is applied on each stream automatically. `maxFirstStreamCompDelay` is the maximum delay time before a continuous query is started the first time. `streamCompDelayRatio` is the ratio for calculating delay time, with the size of the time window as base. `maxStreamCompDelay` is the maximum delay time. The actual delay time is a random time not bigger than `maxStreamCompDelay`. If a continuous query fails, `retryStreamComDelay` is the delay time before retrying it, also not bigger than `maxStreamCompDelay`. - -::: - ## Log Parameters ### logDir @@ -664,8 +636,6 @@ To prevent system resource from being exhausted by multiple concurrent streams, | 10 | queryPolicy | No | Yes | | | 11 | querySmaOptimize | No | Yes | | | 12 | maxNumOfDistinctRes | Yes | Yes | | -| 13 | minSlidingTime | Yes | Yes | | -| 14 | minIntervalTime | Yes | Yes | | | 15 | countAlwaysReturnValue | Yes | Yes | | | 16 | dataDir | Yes | Yes | | | 17 | minimalDataDirGB | Yes | Yes | | diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index 3db2607955..a3dfdd4fab 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -191,24 +191,6 @@ taos --dump-config | 取值范围 | 0:返回空行,1:返回 0 | | 缺省值 | 1 | -### minSlidingTime - -| 属性 | 说明 | -| -------- | -------------------------------- | -| 适用范围 | 仅服务端适用 | -| 含义 | sliding 的最小允许值 | -| 单位 | 同数据库时间单位 | -| 缺省值 | 1 | - -### minIntervalTime - -| 属性 | 说明 | -| -------- | -------------------------------- | -| 适用范围 | 仅服务端适用 | -| 含义 | interval窗口的最小允许值 | -| 单位 | 同数据库时间单位 | -| 缺省值 | 1 | - ## 区域相关 ### timezone @@ -656,8 +638,6 @@ charset 的有效值是 UTF-8。 | 10 | queryPolicy | 否 | 是 | | | 11 | querySmaOptimize | 否 | 是 | | | 12 | maxNumOfDistinctRes | 是 | 是 | | -| 13 | minSlidingTime | 是 | 是 | | -| 14 | minIntervalTime | 是 | 是 | | | 15 | countAlwaysReturnValue | 是 | 是 | | | 16 | dataDir | 是 | 是 | | | 17 | minimalDataDirGB | 是 | 是 | | From 3c777c492d1aee1461e28bbfd55c3ae48f98b319 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 12 Dec 2022 10:20:03 +0800 Subject: [PATCH 76/97] fix: fix taosd crash caused by assert --- source/libs/executor/src/timesliceoperator.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index f7bee7d351..a82dc13318 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -91,11 +91,15 @@ static void doKeepLinearInfo(STimeSliceOperatorInfo* pSliceInfo, const SSDataBlo SColumnInfoData* pTsCol = taosArrayGet(pBlock->pDataBlock, pSliceInfo->tsCol.slotId); SFillLinearInfo* pLinearInfo = taosArrayGet(pSliceInfo->pLinearInfo, i); + + if (!IS_MATHABLE_TYPE(pColInfoData->info.type)) { + continue; + } + // null value is represented by using key = INT64_MIN for now. // TODO: optimize to ignore null values for linear interpolation. if (!pLinearInfo->isStartSet) { if (!colDataIsNull_s(pColInfoData, rowIndex)) { - ASSERT(IS_MATHABLE_TYPE(pColInfoData->info.type)); pLinearInfo->start.key = *(int64_t*)colDataGetData(pTsCol, rowIndex); char* p = colDataGetData(pColInfoData, rowIndex); From 31204b72cff54322655e9b2c44e29c0137e866e0 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Mon, 12 Dec 2022 10:51:00 +0800 Subject: [PATCH 77/97] doc: add compressMsgSize back --- docs/en/14-reference/12-config/index.md | 12 ++++++++++++ docs/zh/14-reference/12-config/index.md | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index 7727a2f958..5c09f4a340 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -598,6 +598,18 @@ The charset that takes effect is UTF-8. | Value Range | 0: not consistent; 1: consistent. | | Default | 1 | +## Compress Parameters + +### compressMsgSize + +| Attribute | Description | +| -------- | ----------------------------- | +| Applicable | Server only | +| Meaning | Whether RPC message is compressed | +| Value Range | -1: none message is compressed; 0: all messages are compressed; N (N>0): messages exceeding N bytes are compressed | +| Default | -1 | + + ## Other Parameters ### enableCoreFile diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index a3dfdd4fab..2e49cf7429 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -622,6 +622,17 @@ charset 的有效值是 UTF-8。 | 取值范围 | 0: 不启动;1:启动 | | 缺省值 | 1 | +## 压缩参数 + +### compressMsgSize + +| 属性 | 说明 | +| -------- | ----------------------------- | +| 适用于 | 仅服务端适用 | +| 含义 | 是否对 RPC 消息进行压缩 | +| 取值范围 | -1: 所有消息都不压缩; 0: 所有消息都压缩; N (N>0): 只有大于 N 个字节的消息才压缩 | +| 缺省值 | -1 | + ## 3.0 中有效的配置参数列表 | # | **参数** | **适用于 2.X ** | **适用于 3.0 ** | 3.0 版本的当前行为 | From fb362b5275d7971b0cf49f5dc75bab4dfa8e9ba3 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Mon, 12 Dec 2022 10:54:53 +0800 Subject: [PATCH 78/97] doc: rephrase compressMsgSize --- docs/en/14-reference/12-config/index.md | 2 +- docs/zh/14-reference/12-config/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index 5c09f4a340..b6bfa4bc7d 100644 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -604,7 +604,7 @@ The charset that takes effect is UTF-8. | Attribute | Description | | -------- | ----------------------------- | -| Applicable | Server only | +| Applicable | Both Client and Server side | | Meaning | Whether RPC message is compressed | | Value Range | -1: none message is compressed; 0: all messages are compressed; N (N>0): messages exceeding N bytes are compressed | | Default | -1 | diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index 2e49cf7429..bc62a536e5 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -628,7 +628,7 @@ charset 的有效值是 UTF-8。 | 属性 | 说明 | | -------- | ----------------------------- | -| 适用于 | 仅服务端适用 | +| 适用于 | 服务端和客户端均适用 | | 含义 | 是否对 RPC 消息进行压缩 | | 取值范围 | -1: 所有消息都不压缩; 0: 所有消息都压缩; N (N>0): 只有大于 N 个字节的消息才压缩 | | 缺省值 | -1 | From 60ca13e511751bac4e746515a79b911648184573 Mon Sep 17 00:00:00 2001 From: wade zhang <95411902+gccgdb1234@users.noreply.github.com> Date: Mon, 12 Dec 2022 10:57:49 +0800 Subject: [PATCH 79/97] Update 02-database.md --- docs/zh/12-taos-sql/02-database.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/zh/12-taos-sql/02-database.md b/docs/zh/12-taos-sql/02-database.md index 3918f240b4..232a6c7326 100644 --- a/docs/zh/12-taos-sql/02-database.md +++ b/docs/zh/12-taos-sql/02-database.md @@ -27,7 +27,6 @@ database_option: { | PRECISION {'ms' | 'us' | 'ns'} | REPLICA value | RETENTIONS ingestion_duration:keep_duration ... - | STRICT {'off' | 'on'} | WAL_LEVEL {1 | 2} | VGROUPS value | SINGLE_STABLE {0 | 1} @@ -61,9 +60,6 @@ database_option: { - PRECISION:数据库的时间戳精度。ms 表示毫秒,us 表示微秒,ns 表示纳秒,默认 ms 毫秒。 - REPLICA:表示数据库副本数,取值为 1 或 3,默认为 1。在集群中使用,副本数必须小于或等于 DNODE 的数目。 - RETENTIONS:表示数据的聚合周期和保存时长,如 RETENTIONS 15s:7d,1m:21d,15m:50d 表示数据原始采集周期为 15 秒,原始数据保存 7 天;按 1 分钟聚合的数据保存 21 天;按 15 分钟聚合的数据保存 50 天。目前支持且只支持三级存储周期。 -- STRICT:表示数据同步的一致性要求,默认为 off。 - - on 表示强一致,即运行标准的 raft 协议,半数提交返回成功。 - - off 表示弱一致,本地提交即返回成功。 - WAL_LEVEL:WAL 级别,默认为 1。 - 1:写 WAL,但不执行 fsync。 - 2:写 WAL,而且执行 fsync。 From b7f88c2f21e70b1acb3f8f227aa2df1a303e06e5 Mon Sep 17 00:00:00 2001 From: wade zhang <95411902+gccgdb1234@users.noreply.github.com> Date: Mon, 12 Dec 2022 10:58:21 +0800 Subject: [PATCH 80/97] Update 02-database.md --- docs/en/12-taos-sql/02-database.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/en/12-taos-sql/02-database.md b/docs/en/12-taos-sql/02-database.md index a12406fe43..0aec22fbc0 100644 --- a/docs/en/12-taos-sql/02-database.md +++ b/docs/en/12-taos-sql/02-database.md @@ -27,7 +27,6 @@ database_option: { | PRECISION {'ms' | 'us' | 'ns'} | REPLICA value | RETENTIONS ingestion_duration:keep_duration ... - | STRICT {'off' | 'on'} | WAL_LEVEL {1 | 2} | VGROUPS value | SINGLE_STABLE {0 | 1} @@ -61,9 +60,6 @@ database_option: { - PRECISION: specifies the precision at which a database records timestamps. Enter ms for milliseconds, us for microseconds, or ns for nanoseconds. The default value is ms. - REPLICA: specifies the number of replicas that are made of the database. Enter 1 or 3. The default value is 1. The value of the REPLICA parameter cannot exceed the number of dnodes in the cluster. - RETENTIONS: specifies the retention period for data aggregated at various intervals. For example, RETENTIONS 15s:7d,1m:21d,15m:50d indicates that data aggregated every 15 seconds is retained for 7 days, data aggregated every 1 minute is retained for 21 days, and data aggregated every 15 minutes is retained for 50 days. You must enter three aggregation intervals and corresponding retention periods. -- STRICT: specifies whether strong data consistency is enabled. The default value is off. - - on: Strong consistency is enabled and implemented through the Raft consensus algorithm. In this mode, an operation is considered successful once it is confirmed by half of the nodes in the cluster. - - off: Strong consistency is disabled. In this mode, an operation is considered successful when it is initiated by the local node. - WAL_LEVEL: specifies whether fsync is enabled. The default value is 1. - 1: WAL is enabled but fsync is disabled. - 2: WAL and fsync are both enabled. From ce94c88fca9640f36b1eb9d541c2337fe7057ed6 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 12 Dec 2022 11:36:52 +0800 Subject: [PATCH 81/97] fix: taosbenchmark rest insert mode in json (#18892) * fix: taosbenchmark rest mode in json * fix: update taos-tools bc27bd6 * fix: taosbenchmark support rest insert in json --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 7247200fe7..d468e0acd3 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 4a4027c + GIT_TAG 121c8a3 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From dc64bb5110f7a248cfec05a49ffe810c4b8fc332 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Mon, 12 Dec 2022 13:22:23 +0800 Subject: [PATCH 82/97] enh: shielding sql command 'alter database strict' --- source/libs/parser/inc/sql.y | 2 +- source/libs/parser/src/sql.c | 3790 +++++++++++++++++----------------- 2 files changed, 1893 insertions(+), 1899 deletions(-) diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index b060f7fc83..c85759446a 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -232,7 +232,7 @@ alter_db_option(A) ::= KEEP integer_list(B). alter_db_option(A) ::= KEEP variable_list(B). { A.type = DB_OPTION_KEEP; A.pList = B; } alter_db_option(A) ::= PAGES NK_INTEGER(B). { A.type = DB_OPTION_PAGES; A.val = B; } alter_db_option(A) ::= REPLICA NK_INTEGER(B). { A.type = DB_OPTION_REPLICA; A.val = B; } -alter_db_option(A) ::= STRICT NK_STRING(B). { A.type = DB_OPTION_STRICT; A.val = B; } +//alter_db_option(A) ::= STRICT NK_STRING(B). { A.type = DB_OPTION_STRICT; A.val = B; } alter_db_option(A) ::= WAL_LEVEL NK_INTEGER(B). { A.type = DB_OPTION_WAL; A.val = B; } alter_db_option(A) ::= STT_TRIGGER NK_INTEGER(B). { A.type = DB_OPTION_STT_TRIGGER; A.val = B; } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index b4d4a3457e..a83f85696a 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -139,17 +139,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 710 -#define YYNRULE 540 +#define YYNSTATE 709 +#define YYNRULE 539 #define YYNTOKEN 322 -#define YY_MAX_SHIFT 709 -#define YY_MIN_SHIFTREDUCE 1052 -#define YY_MAX_SHIFTREDUCE 1591 -#define YY_ERROR_ACTION 1592 -#define YY_ACCEPT_ACTION 1593 -#define YY_NO_ACTION 1594 -#define YY_MIN_REDUCE 1595 -#define YY_MAX_REDUCE 2134 +#define YY_MAX_SHIFT 708 +#define YY_MIN_SHIFTREDUCE 1050 +#define YY_MAX_SHIFTREDUCE 1588 +#define YY_ERROR_ACTION 1589 +#define YY_ACCEPT_ACTION 1590 +#define YY_NO_ACTION 1591 +#define YY_MIN_REDUCE 1592 +#define YY_MAX_REDUCE 2130 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -218,476 +218,476 @@ typedef union { *********** Begin parsing tables **********************************************/ #define YY_ACTTAB_COUNT (2410) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1950, 458, 157, 459, 1631, 566, 167, 1703, 467, 2105, - /* 10 */ 459, 1631, 43, 41, 1522, 365, 1651, 2110, 1796, 1798, - /* 20 */ 360, 2105, 1373, 1595, 565, 173, 598, 332, 1850, 2106, - /* 30 */ 567, 1968, 1741, 1452, 405, 1371, 1664, 2109, 514, 581, - /* 40 */ 52, 2106, 2108, 1933, 1919, 399, 614, 122, 121, 120, - /* 50 */ 119, 118, 117, 116, 115, 114, 464, 1750, 1447, 597, - /* 60 */ 36, 35, 460, 16, 42, 40, 39, 38, 37, 1949, - /* 70 */ 1379, 1929, 1935, 1984, 318, 597, 100, 1951, 618, 1953, - /* 80 */ 1954, 613, 608, 608, 258, 597, 1526, 546, 170, 1938, - /* 90 */ 2037, 2105, 1398, 476, 354, 2033, 12, 2052, 1462, 1950, - /* 100 */ 1933, 513, 512, 511, 1398, 1968, 2111, 173, 175, 128, - /* 110 */ 507, 2106, 567, 560, 506, 505, 2063, 158, 706, 1607, - /* 120 */ 504, 510, 58, 2049, 85, 561, 503, 598, 1929, 1935, - /* 130 */ 1968, 1398, 1085, 1454, 1455, 1104, 1593, 1103, 615, 608, - /* 140 */ 2110, 123, 1846, 1919, 2105, 614, 43, 41, 497, 1558, - /* 150 */ 210, 46, 559, 181, 360, 1727, 1373, 1399, 1750, 1950, - /* 160 */ 2109, 46, 1428, 1437, 2106, 2107, 1105, 1452, 1949, 1371, - /* 170 */ 598, 1087, 1984, 1090, 1091, 100, 1951, 618, 1953, 1954, - /* 180 */ 613, 1374, 608, 1372, 123, 134, 62, 141, 2008, 2037, - /* 190 */ 1968, 502, 1447, 354, 2033, 33, 274, 16, 581, 375, - /* 200 */ 1398, 1750, 652, 1919, 1379, 614, 1377, 1378, 1398, 1427, - /* 210 */ 1430, 1431, 1432, 1433, 1434, 1435, 1436, 610, 606, 1445, - /* 220 */ 1446, 1448, 1449, 1450, 1451, 1453, 1456, 2, 1949, 97, - /* 230 */ 12, 2110, 1984, 1950, 1429, 100, 1951, 618, 1953, 1954, - /* 240 */ 613, 546, 608, 132, 1397, 2105, 1429, 170, 1400, 2037, - /* 250 */ 556, 1742, 706, 354, 2033, 42, 40, 39, 38, 37, - /* 260 */ 2111, 173, 9, 650, 1968, 2106, 567, 1454, 1455, 1797, - /* 270 */ 1798, 176, 615, 1309, 1310, 2064, 58, 1919, 58, 614, - /* 280 */ 43, 41, 146, 145, 647, 646, 645, 143, 360, 1400, - /* 290 */ 1373, 58, 1399, 1950, 509, 508, 1428, 1437, 1618, 578, - /* 300 */ 176, 1452, 1949, 1371, 457, 598, 1984, 462, 1637, 100, - /* 310 */ 1951, 618, 1953, 1954, 613, 1374, 608, 1372, 225, 178, - /* 320 */ 643, 2012, 169, 2037, 1968, 1581, 1447, 354, 2033, 1483, - /* 330 */ 131, 16, 615, 562, 557, 1790, 1750, 1919, 1379, 614, - /* 340 */ 1377, 1378, 1919, 1427, 1430, 1431, 1432, 1433, 1434, 1435, - /* 350 */ 1436, 610, 606, 1445, 1446, 1448, 1449, 1450, 1451, 1453, - /* 360 */ 1456, 2, 1949, 9, 12, 1950, 1984, 677, 675, 100, - /* 370 */ 1951, 618, 1953, 1954, 613, 398, 608, 397, 82, 320, - /* 380 */ 58, 2125, 531, 2037, 529, 80, 706, 354, 2033, 255, - /* 390 */ 2045, 577, 257, 124, 576, 441, 1968, 2105, 2071, 127, - /* 400 */ 30, 1454, 1455, 541, 612, 1256, 1257, 406, 1745, 1919, - /* 410 */ 1488, 614, 565, 173, 43, 41, 1457, 2106, 567, 585, - /* 420 */ 407, 1379, 360, 1725, 1373, 176, 47, 176, 1846, 351, - /* 430 */ 1428, 1437, 1861, 257, 1949, 1452, 185, 1371, 1984, 183, - /* 440 */ 176, 310, 1951, 618, 1953, 1954, 613, 650, 608, 1374, - /* 450 */ 2003, 1372, 466, 189, 188, 462, 1637, 36, 35, 664, - /* 460 */ 1447, 42, 40, 39, 38, 37, 146, 145, 647, 646, - /* 470 */ 645, 143, 1379, 77, 1377, 1378, 76, 1427, 1430, 1431, - /* 480 */ 1432, 1433, 1434, 1435, 1436, 610, 606, 1445, 1446, 1448, - /* 490 */ 1449, 1450, 1451, 1453, 1456, 2, 598, 1617, 44, 598, - /* 500 */ 1739, 1950, 1803, 513, 512, 511, 1398, 598, 1803, 353, - /* 510 */ 403, 128, 507, 404, 1735, 364, 506, 505, 1801, 1616, - /* 520 */ 706, 413, 504, 510, 1801, 352, 363, 1750, 503, 176, - /* 530 */ 1750, 650, 1968, 155, 155, 1454, 1455, 1104, 1750, 1103, - /* 540 */ 615, 1919, 1752, 1752, 527, 1919, 1538, 614, 43, 41, - /* 550 */ 146, 145, 647, 646, 645, 143, 360, 525, 1373, 523, - /* 560 */ 1737, 1950, 598, 1919, 1428, 1437, 394, 1173, 1105, 1452, - /* 570 */ 1949, 1371, 598, 578, 1984, 176, 427, 100, 1951, 618, - /* 580 */ 1953, 1954, 613, 1374, 608, 1372, 428, 396, 392, 2010, - /* 590 */ 1733, 2037, 1968, 1750, 1447, 354, 2033, 226, 230, 9, - /* 600 */ 615, 7, 1175, 1750, 131, 1919, 1379, 614, 1377, 1378, - /* 610 */ 80, 1427, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 610, - /* 620 */ 606, 1445, 1446, 1448, 1449, 1450, 1451, 1453, 1456, 2, - /* 630 */ 1949, 167, 44, 1746, 1984, 366, 605, 100, 1951, 618, - /* 640 */ 1953, 1954, 613, 155, 608, 265, 266, 1615, 1429, 2125, - /* 650 */ 264, 2037, 1752, 1851, 706, 354, 2033, 1614, 1950, 1728, - /* 660 */ 1350, 1351, 580, 171, 2045, 2046, 2099, 129, 2050, 1454, - /* 670 */ 1455, 36, 35, 6, 29, 42, 40, 39, 38, 37, - /* 680 */ 36, 35, 43, 41, 42, 40, 39, 38, 37, 1968, - /* 690 */ 360, 1919, 1373, 91, 598, 598, 2077, 615, 1428, 1437, - /* 700 */ 1613, 1919, 1919, 1452, 614, 1371, 1803, 25, 474, 475, - /* 710 */ 39, 38, 37, 329, 600, 1743, 2009, 1374, 602, 1372, - /* 720 */ 2009, 476, 1801, 609, 155, 1750, 1750, 1949, 1447, 227, - /* 730 */ 1612, 1984, 1780, 1753, 159, 1951, 618, 1953, 1954, 613, - /* 740 */ 1379, 608, 1377, 1378, 1919, 1427, 1430, 1431, 1432, 1433, - /* 750 */ 1434, 1435, 1436, 610, 606, 1445, 1446, 1448, 1449, 1450, - /* 760 */ 1451, 1453, 1456, 2, 36, 35, 12, 1950, 42, 40, - /* 770 */ 39, 38, 37, 1846, 1919, 547, 2074, 566, 1548, 1473, - /* 780 */ 317, 2105, 1396, 2052, 187, 598, 642, 1611, 706, 435, - /* 790 */ 1610, 1609, 448, 1596, 1606, 447, 565, 173, 1968, 1747, - /* 800 */ 1726, 2106, 567, 1454, 1455, 1605, 615, 1608, 1604, 2048, - /* 810 */ 419, 1919, 449, 614, 113, 421, 1750, 112, 111, 110, - /* 820 */ 109, 108, 107, 106, 105, 104, 553, 1546, 1547, 1549, - /* 830 */ 1550, 1919, 1428, 1437, 1919, 1919, 532, 665, 1919, 1720, - /* 840 */ 1984, 598, 598, 306, 1951, 618, 1953, 1954, 613, 1919, - /* 850 */ 608, 1374, 1919, 1372, 1603, 139, 367, 333, 1661, 36, - /* 860 */ 35, 1519, 652, 42, 40, 39, 38, 37, 2109, 409, - /* 870 */ 1401, 1401, 1750, 1750, 2052, 1602, 1377, 1378, 1515, 1427, - /* 880 */ 1430, 1431, 1432, 1433, 1434, 1435, 1436, 610, 606, 1445, - /* 890 */ 1446, 1448, 1449, 1450, 1451, 1453, 1456, 2, 1919, 445, - /* 900 */ 2047, 1704, 440, 439, 438, 437, 434, 433, 432, 431, - /* 910 */ 430, 426, 425, 424, 423, 334, 416, 415, 414, 1919, - /* 920 */ 411, 410, 331, 683, 682, 681, 680, 370, 144, 679, - /* 930 */ 678, 135, 673, 672, 671, 670, 669, 668, 667, 666, - /* 940 */ 148, 662, 661, 660, 369, 368, 657, 656, 655, 654, - /* 950 */ 653, 156, 1601, 1600, 598, 1599, 294, 36, 35, 357, - /* 960 */ 356, 42, 40, 39, 38, 37, 1598, 1950, 542, 1387, - /* 970 */ 292, 66, 598, 133, 65, 644, 2008, 252, 1794, 1401, - /* 980 */ 1452, 51, 1380, 36, 35, 1750, 582, 42, 40, 39, - /* 990 */ 38, 37, 193, 454, 452, 585, 1919, 1919, 1968, 1919, - /* 1000 */ 11, 10, 337, 1750, 648, 1447, 615, 1794, 1862, 554, - /* 1010 */ 1919, 1919, 325, 614, 182, 235, 573, 1379, 1213, 640, - /* 1020 */ 639, 638, 1217, 637, 1219, 1220, 636, 1222, 633, 58, - /* 1030 */ 1228, 630, 1230, 1231, 627, 624, 1949, 209, 288, 598, - /* 1040 */ 1984, 1780, 1803, 100, 1951, 618, 1953, 1954, 613, 649, - /* 1050 */ 608, 584, 1794, 269, 1481, 2125, 216, 2037, 1802, 214, - /* 1060 */ 211, 354, 2033, 709, 338, 604, 336, 335, 99, 499, - /* 1070 */ 1750, 246, 2056, 501, 598, 162, 1906, 281, 1373, 1090, - /* 1080 */ 1091, 493, 489, 485, 481, 208, 2057, 1515, 593, 1833, - /* 1090 */ 598, 1371, 166, 546, 501, 500, 1495, 2105, 699, 695, - /* 1100 */ 691, 687, 279, 1518, 595, 1750, 74, 73, 402, 578, - /* 1110 */ 1482, 180, 2111, 173, 67, 570, 500, 2106, 567, 598, - /* 1120 */ 1382, 1750, 81, 234, 382, 206, 1379, 569, 1388, 316, - /* 1130 */ 1383, 1969, 390, 596, 388, 384, 380, 377, 374, 98, - /* 1140 */ 131, 48, 272, 3, 137, 1381, 125, 371, 1588, 60, - /* 1150 */ 1750, 1855, 113, 1391, 1393, 112, 111, 110, 109, 108, - /* 1160 */ 107, 106, 105, 104, 75, 606, 1445, 1446, 1448, 1449, - /* 1170 */ 1450, 1451, 239, 218, 706, 594, 217, 1950, 176, 45, - /* 1180 */ 598, 32, 358, 1476, 1477, 1478, 1479, 1480, 1484, 1485, - /* 1190 */ 1486, 1487, 205, 199, 275, 204, 1644, 1642, 472, 172, - /* 1200 */ 2045, 2046, 1545, 129, 2050, 1950, 220, 222, 1968, 219, - /* 1210 */ 221, 1750, 260, 262, 197, 50, 615, 140, 516, 519, - /* 1220 */ 545, 1919, 142, 614, 233, 241, 1590, 1591, 1940, 1344, - /* 1230 */ 96, 229, 1320, 11, 10, 1632, 1968, 1374, 574, 1372, - /* 1240 */ 93, 422, 1587, 144, 615, 1133, 1949, 658, 1950, 1919, - /* 1250 */ 1984, 614, 2067, 100, 1951, 618, 1953, 1954, 613, 60, - /* 1260 */ 608, 45, 1377, 1378, 83, 601, 267, 2037, 1385, 1153, - /* 1270 */ 590, 354, 2033, 1791, 1949, 271, 1950, 1942, 1984, 1968, - /* 1280 */ 1134, 101, 1951, 618, 1953, 1954, 613, 615, 608, 579, - /* 1290 */ 254, 31, 1919, 1384, 614, 2037, 1206, 36, 35, 2036, - /* 1300 */ 2033, 42, 40, 39, 38, 37, 251, 1968, 45, 622, - /* 1310 */ 1, 142, 1489, 4, 1438, 615, 144, 1949, 659, 1950, - /* 1320 */ 1919, 1984, 614, 1638, 101, 1951, 618, 1953, 1954, 613, - /* 1330 */ 376, 608, 126, 381, 330, 571, 142, 1950, 2037, 1337, - /* 1340 */ 1151, 282, 603, 2033, 186, 616, 408, 1401, 1856, 1984, - /* 1350 */ 1968, 443, 101, 1951, 618, 1953, 1954, 613, 612, 608, - /* 1360 */ 412, 287, 1234, 1919, 1238, 614, 2037, 417, 1968, 1245, - /* 1370 */ 324, 2033, 701, 1396, 429, 1848, 615, 436, 442, 444, - /* 1380 */ 1950, 1919, 190, 614, 450, 1243, 451, 453, 1949, 147, - /* 1390 */ 455, 1402, 1984, 518, 456, 310, 1951, 618, 1953, 1954, - /* 1400 */ 613, 611, 608, 599, 2002, 465, 1949, 1404, 528, 468, - /* 1410 */ 1984, 1968, 1403, 160, 1951, 618, 1953, 1954, 613, 615, - /* 1420 */ 608, 196, 224, 469, 1919, 198, 614, 1405, 1937, 470, - /* 1430 */ 201, 473, 471, 1950, 1107, 203, 477, 521, 1896, 1933, - /* 1440 */ 78, 1937, 515, 79, 496, 533, 498, 223, 494, 1949, - /* 1450 */ 207, 495, 1933, 1984, 1950, 102, 101, 1951, 618, 1953, - /* 1460 */ 1954, 613, 228, 608, 1968, 568, 2126, 1929, 1935, 343, - /* 1470 */ 2037, 319, 615, 535, 1740, 2034, 213, 1919, 608, 614, - /* 1480 */ 1929, 1935, 355, 373, 64, 1968, 1736, 63, 215, 149, - /* 1490 */ 1895, 608, 150, 615, 372, 1738, 1734, 151, 1919, 152, - /* 1500 */ 614, 536, 1949, 543, 283, 231, 1984, 550, 1950, 159, - /* 1510 */ 1951, 618, 1953, 1954, 613, 555, 608, 537, 540, 237, - /* 1520 */ 588, 2068, 578, 1949, 2078, 546, 552, 1984, 344, 2105, - /* 1530 */ 304, 1951, 618, 1953, 1954, 613, 546, 608, 240, 1968, - /* 1540 */ 2105, 558, 5, 551, 2111, 173, 564, 615, 548, 2106, - /* 1550 */ 567, 2075, 1919, 131, 614, 2111, 173, 549, 248, 2059, - /* 1560 */ 2106, 567, 1950, 36, 35, 245, 345, 42, 40, 39, - /* 1570 */ 38, 37, 250, 1515, 563, 575, 572, 1949, 130, 1950, - /* 1580 */ 2128, 1984, 249, 2083, 160, 1951, 618, 1953, 1954, 613, - /* 1590 */ 2082, 608, 163, 1968, 247, 1400, 583, 259, 349, 2104, - /* 1600 */ 253, 615, 2053, 348, 284, 1950, 1919, 586, 614, 587, - /* 1610 */ 1968, 1867, 174, 2045, 2046, 359, 129, 2050, 615, 591, - /* 1620 */ 1866, 1865, 350, 1919, 88, 614, 285, 592, 286, 57, - /* 1630 */ 90, 1949, 92, 1950, 1751, 1984, 1968, 2127, 311, 1951, - /* 1640 */ 618, 1953, 1954, 613, 615, 608, 2018, 1795, 1949, 1919, - /* 1650 */ 1721, 614, 1984, 289, 620, 311, 1951, 618, 1953, 1954, - /* 1660 */ 613, 278, 608, 702, 1968, 703, 705, 49, 298, 361, - /* 1670 */ 291, 312, 615, 313, 1949, 302, 1950, 1919, 1984, 614, - /* 1680 */ 293, 295, 1951, 618, 1953, 1954, 613, 1913, 608, 321, - /* 1690 */ 322, 1912, 1950, 71, 1911, 1910, 72, 1907, 378, 379, - /* 1700 */ 1365, 1366, 1949, 179, 383, 1905, 1984, 1968, 385, 311, - /* 1710 */ 1951, 618, 1953, 1954, 613, 615, 608, 386, 387, 154, - /* 1720 */ 1919, 1904, 614, 1968, 389, 1903, 1902, 391, 393, 1901, - /* 1730 */ 1340, 615, 1339, 395, 1878, 534, 1919, 1877, 614, 400, - /* 1740 */ 401, 1876, 1875, 1950, 1841, 1949, 1300, 1840, 1838, 1984, - /* 1750 */ 136, 1837, 296, 1951, 618, 1953, 1954, 613, 1836, 608, - /* 1760 */ 1839, 1949, 1835, 1834, 1832, 1984, 1831, 1830, 297, 1951, - /* 1770 */ 618, 1953, 1954, 613, 1968, 608, 184, 546, 418, 1829, - /* 1780 */ 420, 2105, 615, 1828, 1827, 1826, 1950, 1919, 1825, 614, - /* 1790 */ 1824, 1823, 1822, 1821, 1820, 1819, 2111, 173, 1818, 1817, - /* 1800 */ 1816, 2106, 567, 1950, 1815, 1814, 1813, 138, 1812, 1811, - /* 1810 */ 1810, 1809, 1949, 1808, 1807, 1806, 1984, 1968, 1302, 303, - /* 1820 */ 1951, 618, 1953, 1954, 613, 615, 608, 1805, 1804, 446, - /* 1830 */ 1919, 1666, 614, 191, 1968, 1665, 1181, 1663, 192, 1627, - /* 1840 */ 1093, 168, 615, 1092, 194, 1626, 69, 1919, 1891, 614, - /* 1850 */ 1939, 1885, 195, 1874, 1873, 1949, 1950, 70, 200, 1984, - /* 1860 */ 202, 1858, 307, 1951, 618, 1953, 1954, 613, 461, 608, - /* 1870 */ 463, 1729, 1949, 1950, 1662, 1660, 1984, 478, 479, 299, - /* 1880 */ 1951, 618, 1953, 1954, 613, 480, 608, 1968, 1126, 1658, - /* 1890 */ 482, 483, 1656, 486, 1654, 615, 484, 487, 488, 490, - /* 1900 */ 1919, 492, 614, 1641, 1968, 1640, 1623, 1731, 491, 1249, - /* 1910 */ 1730, 1250, 615, 1172, 1171, 1170, 1169, 1919, 1168, 614, - /* 1920 */ 212, 59, 1163, 1165, 1950, 1949, 674, 1652, 676, 1984, - /* 1930 */ 1164, 1162, 308, 1951, 618, 1953, 1954, 613, 339, 608, - /* 1940 */ 1645, 1950, 1949, 340, 1643, 341, 1984, 517, 520, 300, - /* 1950 */ 1951, 618, 1953, 1954, 613, 1968, 608, 1622, 1621, 522, - /* 1960 */ 524, 1620, 1357, 615, 526, 103, 1355, 1950, 1919, 1354, - /* 1970 */ 614, 530, 1968, 24, 1890, 1884, 1346, 538, 1872, 1870, - /* 1980 */ 615, 17, 14, 2110, 1950, 1919, 53, 614, 1560, 18, - /* 1990 */ 56, 243, 28, 1949, 26, 236, 539, 1984, 1968, 232, - /* 2000 */ 309, 1951, 618, 1953, 1954, 613, 615, 608, 342, 153, - /* 2010 */ 1949, 1919, 238, 614, 1984, 1968, 1544, 301, 1951, 618, - /* 2020 */ 1953, 1954, 613, 615, 608, 161, 544, 1537, 1919, 244, - /* 2030 */ 614, 242, 27, 1940, 84, 1950, 1949, 61, 19, 1575, - /* 2040 */ 1984, 1574, 346, 314, 1951, 618, 1953, 1954, 613, 1580, - /* 2050 */ 608, 1581, 1579, 1949, 1578, 347, 1512, 1984, 256, 1511, - /* 2060 */ 315, 1951, 618, 1953, 1954, 613, 1968, 608, 55, 164, - /* 2070 */ 1871, 1869, 1868, 20, 615, 589, 1857, 263, 1950, 1919, - /* 2080 */ 261, 614, 1542, 15, 54, 268, 86, 87, 89, 273, - /* 2090 */ 93, 270, 10, 21, 1950, 1464, 8, 1463, 1987, 1389, - /* 2100 */ 1442, 607, 165, 177, 1949, 1440, 34, 1474, 1984, 1968, - /* 2110 */ 1439, 1962, 1951, 618, 1953, 1954, 613, 615, 608, 13, - /* 2120 */ 1420, 22, 1919, 1412, 614, 1968, 617, 23, 619, 1235, - /* 2130 */ 621, 362, 623, 615, 1232, 625, 626, 628, 1919, 629, - /* 2140 */ 614, 1229, 1223, 631, 1221, 1950, 632, 1949, 634, 635, - /* 2150 */ 1227, 1984, 1212, 1226, 1961, 1951, 618, 1953, 1954, 613, - /* 2160 */ 641, 608, 94, 1949, 276, 95, 1225, 1984, 1244, 68, - /* 2170 */ 1960, 1951, 618, 1953, 1954, 613, 1968, 608, 1224, 1240, - /* 2180 */ 1124, 651, 1159, 1158, 615, 1157, 1156, 1155, 1950, 1919, - /* 2190 */ 1154, 614, 1179, 1152, 1150, 1149, 1148, 663, 277, 1146, - /* 2200 */ 1145, 1144, 1143, 1142, 1141, 1950, 1140, 1139, 1176, 1174, - /* 2210 */ 1136, 1135, 1132, 1131, 1949, 1130, 1659, 1129, 1984, 1968, - /* 2220 */ 684, 326, 1951, 618, 1953, 1954, 613, 615, 608, 686, - /* 2230 */ 1657, 685, 1919, 688, 614, 689, 1968, 1655, 690, 692, - /* 2240 */ 693, 694, 1653, 696, 615, 697, 698, 1639, 700, 1919, - /* 2250 */ 1082, 614, 1619, 280, 704, 708, 1375, 1949, 1950, 1594, - /* 2260 */ 290, 1984, 707, 1594, 327, 1951, 618, 1953, 1954, 613, - /* 2270 */ 1594, 608, 1594, 1594, 1949, 1950, 1594, 1594, 1984, 1594, - /* 2280 */ 1594, 323, 1951, 618, 1953, 1954, 613, 1594, 608, 1968, - /* 2290 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 615, 1594, 1594, - /* 2300 */ 1594, 1594, 1919, 1594, 614, 1594, 1968, 1594, 1594, 1594, - /* 2310 */ 1594, 1594, 1594, 1594, 615, 1594, 1594, 1594, 1594, 1919, - /* 2320 */ 1594, 614, 1594, 1594, 1594, 1594, 1950, 1949, 1594, 1594, - /* 2330 */ 1594, 1984, 1594, 1594, 328, 1951, 618, 1953, 1954, 613, - /* 2340 */ 1594, 608, 1594, 1594, 616, 1594, 1594, 1594, 1984, 1594, - /* 2350 */ 1594, 306, 1951, 618, 1953, 1954, 613, 1968, 608, 1594, - /* 2360 */ 1594, 1594, 1594, 1594, 1594, 615, 1594, 1594, 1594, 1594, - /* 2370 */ 1919, 1594, 614, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 2380 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 2390 */ 1594, 1594, 1594, 1594, 1594, 1949, 1594, 1594, 1594, 1984, - /* 2400 */ 1594, 1594, 305, 1951, 618, 1953, 1954, 613, 1594, 608, + /* 0 */ 1946, 458, 1735, 459, 1628, 565, 584, 33, 274, 2101, + /* 10 */ 158, 1799, 43, 41, 1519, 1700, 351, 2106, 329, 1857, + /* 20 */ 360, 2101, 1370, 1592, 564, 173, 597, 1797, 352, 2102, + /* 30 */ 566, 1964, 464, 1449, 167, 1368, 155, 2105, 460, 580, + /* 40 */ 52, 2102, 2104, 399, 1915, 1748, 613, 122, 121, 120, + /* 50 */ 119, 118, 117, 116, 115, 114, 1847, 1746, 1444, 227, + /* 60 */ 36, 35, 1776, 16, 42, 40, 39, 38, 37, 1945, + /* 70 */ 1376, 1799, 467, 1980, 459, 1628, 100, 1947, 617, 1949, + /* 80 */ 1950, 612, 565, 607, 596, 545, 2101, 1798, 170, 2101, + /* 90 */ 2033, 1615, 1737, 167, 354, 2029, 12, 58, 597, 1946, + /* 100 */ 1933, 564, 173, 1929, 2107, 173, 2102, 566, 175, 2102, + /* 110 */ 566, 1929, 123, 47, 332, 1846, 2059, 113, 705, 497, + /* 120 */ 112, 111, 110, 109, 108, 107, 106, 105, 104, 1746, + /* 130 */ 1964, 1925, 1931, 1451, 1452, 1915, 1590, 1799, 614, 1925, + /* 140 */ 1931, 343, 607, 1915, 353, 613, 43, 41, 476, 1555, + /* 150 */ 607, 62, 97, 1797, 360, 1723, 1370, 1396, 596, 1946, + /* 160 */ 46, 365, 1425, 1434, 1792, 1794, 132, 1449, 1945, 1368, + /* 170 */ 597, 1102, 1980, 1101, 1738, 100, 1947, 617, 1949, 1950, + /* 180 */ 612, 1371, 607, 1369, 178, 134, 210, 141, 2004, 2033, + /* 190 */ 1964, 258, 1444, 354, 2029, 1793, 1794, 16, 580, 375, + /* 200 */ 596, 1746, 1103, 1915, 1376, 613, 1374, 1375, 405, 1424, + /* 210 */ 1427, 1428, 1429, 1430, 1431, 1432, 1433, 609, 605, 1442, + /* 220 */ 1443, 1445, 1446, 1447, 1448, 1450, 1453, 2, 1945, 58, + /* 230 */ 12, 85, 1980, 1946, 225, 100, 1947, 617, 1949, 1950, + /* 240 */ 612, 545, 607, 58, 1395, 2101, 176, 170, 318, 2033, + /* 250 */ 1083, 80, 705, 354, 2029, 42, 40, 39, 38, 37, + /* 260 */ 2107, 173, 176, 649, 1964, 2102, 566, 1451, 1452, 560, + /* 270 */ 1253, 1254, 614, 1170, 1742, 2060, 46, 1915, 1395, 613, + /* 280 */ 43, 41, 146, 145, 646, 645, 644, 143, 360, 1085, + /* 290 */ 1370, 1088, 1089, 1946, 82, 320, 1425, 1434, 530, 577, + /* 300 */ 528, 1449, 1945, 1368, 597, 1102, 1980, 1101, 1172, 100, + /* 310 */ 1947, 617, 1949, 1950, 612, 1371, 607, 1369, 123, 58, + /* 320 */ 58, 2008, 1397, 2033, 1964, 502, 1444, 354, 2029, 169, + /* 330 */ 131, 16, 614, 1614, 1396, 1746, 1103, 1915, 1376, 613, + /* 340 */ 1374, 1375, 1786, 1424, 1427, 1428, 1429, 1430, 1431, 1432, + /* 350 */ 1433, 609, 605, 1442, 1443, 1445, 1446, 1447, 1448, 1450, + /* 360 */ 1453, 2, 1945, 9, 12, 1946, 1980, 526, 441, 100, + /* 370 */ 1947, 617, 1949, 1950, 612, 2106, 607, 1915, 176, 2101, + /* 380 */ 524, 2121, 522, 2033, 1613, 91, 705, 354, 2029, 255, + /* 390 */ 2041, 576, 176, 124, 575, 2105, 1964, 2101, 2067, 2102, + /* 400 */ 2103, 1451, 1452, 398, 611, 397, 2106, 1739, 157, 1915, + /* 410 */ 1604, 613, 564, 173, 43, 41, 1454, 2102, 566, 1395, + /* 420 */ 1306, 1307, 360, 1397, 1370, 176, 189, 188, 1915, 457, + /* 430 */ 1425, 1434, 462, 1634, 1945, 1449, 577, 1368, 1980, 1661, + /* 440 */ 597, 310, 1947, 617, 1949, 1950, 612, 2048, 607, 1371, + /* 450 */ 1999, 1369, 466, 1612, 403, 462, 1634, 36, 35, 1545, + /* 460 */ 1444, 42, 40, 39, 38, 37, 257, 131, 176, 176, + /* 470 */ 1611, 1746, 1376, 2045, 1374, 1375, 583, 1424, 1427, 1428, + /* 480 */ 1429, 1430, 1431, 1432, 1433, 609, 605, 1442, 1443, 1445, + /* 490 */ 1446, 1447, 1448, 1450, 1453, 2, 133, 1915, 44, 2004, + /* 500 */ 1578, 1946, 1370, 555, 512, 511, 510, 552, 1543, 1544, + /* 510 */ 1546, 1547, 128, 506, 1915, 1368, 651, 505, 545, 1610, + /* 520 */ 705, 1398, 2101, 504, 509, 579, 171, 2041, 2042, 503, + /* 530 */ 129, 2046, 1964, 508, 507, 1451, 1452, 2107, 173, 226, + /* 540 */ 614, 597, 2102, 566, 1799, 1915, 1535, 613, 43, 41, + /* 550 */ 1376, 364, 80, 676, 674, 404, 360, 1609, 1370, 597, + /* 560 */ 1797, 1946, 597, 1915, 1425, 1434, 127, 257, 1394, 1449, + /* 570 */ 1945, 1368, 1746, 413, 1980, 1741, 427, 100, 1947, 617, + /* 580 */ 1949, 1950, 612, 1371, 607, 1369, 561, 556, 642, 2006, + /* 590 */ 1746, 2033, 1964, 1746, 1444, 354, 2029, 1480, 705, 1842, + /* 600 */ 614, 1915, 1347, 1348, 9, 1915, 1376, 613, 1374, 1375, + /* 610 */ 181, 1424, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 609, + /* 620 */ 605, 1442, 1443, 1445, 1446, 1447, 1448, 1450, 1453, 2, + /* 630 */ 1945, 517, 44, 597, 1980, 144, 597, 100, 1947, 617, + /* 640 */ 1949, 1950, 612, 597, 607, 597, 527, 428, 597, 2121, + /* 650 */ 474, 2033, 1608, 1902, 705, 354, 2029, 475, 1946, 1743, + /* 660 */ 224, 1371, 139, 1369, 1746, 182, 2095, 1746, 30, 1451, + /* 670 */ 1452, 1724, 1607, 1964, 1746, 520, 1746, 597, 1485, 1746, + /* 680 */ 514, 559, 43, 41, 185, 223, 1374, 1375, 51, 1964, + /* 690 */ 360, 541, 1370, 1376, 1523, 597, 1915, 614, 1425, 1434, + /* 700 */ 1395, 382, 1915, 1449, 613, 1368, 36, 35, 1746, 581, + /* 710 */ 42, 40, 39, 38, 37, 363, 1915, 1371, 1398, 1369, + /* 720 */ 558, 77, 64, 155, 76, 63, 1746, 1945, 1444, 663, + /* 730 */ 1606, 1980, 1748, 476, 159, 1947, 617, 1949, 1950, 612, + /* 740 */ 1376, 607, 1374, 1375, 1731, 1424, 1427, 1428, 1429, 1430, + /* 750 */ 1431, 1432, 1433, 609, 605, 1442, 1443, 1445, 1446, 1447, + /* 760 */ 1448, 1450, 1453, 2, 36, 35, 12, 1946, 42, 40, + /* 770 */ 39, 38, 37, 366, 1915, 546, 2070, 597, 265, 266, + /* 780 */ 317, 155, 1393, 264, 599, 597, 2005, 501, 705, 435, + /* 790 */ 1748, 269, 448, 1593, 9, 447, 7, 1603, 1964, 592, + /* 800 */ 25, 1722, 288, 1451, 1452, 1776, 614, 649, 1746, 500, + /* 810 */ 419, 1915, 449, 613, 113, 421, 1746, 112, 111, 110, + /* 820 */ 109, 108, 107, 106, 105, 104, 146, 145, 646, 645, + /* 830 */ 644, 143, 1425, 1434, 394, 597, 531, 39, 38, 37, + /* 840 */ 1980, 1915, 1426, 306, 1947, 617, 1949, 1950, 612, 594, + /* 850 */ 607, 1371, 1733, 1369, 1602, 396, 392, 333, 1658, 1459, + /* 860 */ 2105, 29, 235, 651, 1729, 1395, 1746, 36, 35, 409, + /* 870 */ 230, 42, 40, 39, 38, 37, 1374, 1375, 608, 1424, + /* 880 */ 1427, 1428, 1429, 1430, 1431, 1432, 1433, 609, 605, 1442, + /* 890 */ 1443, 1445, 1446, 1447, 1448, 1450, 1453, 2, 1915, 445, + /* 900 */ 1088, 1089, 440, 439, 438, 437, 434, 433, 432, 431, + /* 910 */ 430, 426, 425, 424, 423, 334, 416, 415, 414, 1516, + /* 920 */ 411, 410, 331, 682, 681, 680, 679, 370, 1601, 678, + /* 930 */ 677, 135, 672, 671, 670, 669, 668, 667, 666, 665, + /* 940 */ 148, 661, 660, 659, 369, 368, 656, 655, 654, 653, + /* 950 */ 652, 156, 597, 1600, 641, 584, 294, 36, 35, 357, + /* 960 */ 356, 42, 40, 39, 38, 37, 595, 1946, 1858, 1384, + /* 970 */ 292, 66, 1915, 597, 65, 6, 512, 511, 510, 601, + /* 980 */ 1449, 2005, 1377, 1746, 128, 506, 1721, 275, 2048, 505, + /* 990 */ 2048, 155, 193, 454, 452, 504, 509, 1915, 1964, 1934, + /* 1000 */ 1749, 503, 337, 1398, 1746, 1444, 614, 1426, 11, 10, + /* 1010 */ 1929, 1915, 325, 613, 2044, 1599, 2043, 1376, 1210, 639, + /* 1020 */ 638, 637, 1214, 636, 1216, 1217, 635, 1219, 632, 58, + /* 1030 */ 1225, 629, 1227, 1228, 626, 623, 1945, 572, 1925, 1931, + /* 1040 */ 1980, 569, 1598, 100, 1947, 617, 1949, 1950, 612, 607, + /* 1050 */ 607, 540, 1597, 1596, 1478, 2121, 597, 2033, 1829, 1915, + /* 1060 */ 211, 354, 2029, 708, 338, 603, 336, 335, 99, 499, + /* 1070 */ 367, 643, 2052, 501, 1790, 162, 1595, 281, 1842, 1842, + /* 1080 */ 1395, 493, 489, 485, 481, 208, 1915, 1746, 647, 183, + /* 1090 */ 187, 1790, 166, 1605, 649, 500, 1915, 1915, 698, 694, + /* 1100 */ 690, 686, 279, 664, 1492, 1716, 74, 73, 402, 648, + /* 1110 */ 1479, 180, 1790, 146, 145, 646, 645, 644, 143, 568, + /* 1120 */ 1915, 48, 81, 3, 67, 206, 2053, 1512, 1385, 316, + /* 1130 */ 1380, 1701, 390, 406, 388, 384, 380, 377, 374, 98, + /* 1140 */ 1648, 137, 272, 125, 2073, 31, 407, 234, 577, 1587, + /* 1150 */ 1588, 36, 35, 1388, 1390, 42, 40, 39, 38, 37, + /* 1160 */ 60, 1515, 513, 11, 10, 605, 1442, 1443, 1445, 1446, + /* 1170 */ 1447, 1448, 1641, 216, 75, 593, 214, 1946, 176, 131, + /* 1180 */ 1512, 32, 358, 1473, 1474, 1475, 1476, 1477, 1481, 1482, + /* 1190 */ 1483, 1484, 205, 199, 515, 204, 36, 35, 472, 239, + /* 1200 */ 42, 40, 39, 38, 37, 1946, 218, 252, 1964, 217, + /* 1210 */ 422, 1639, 260, 1542, 197, 220, 614, 222, 219, 1379, + /* 1220 */ 221, 1915, 1426, 613, 233, 50, 1378, 553, 209, 1341, + /* 1230 */ 544, 229, 604, 518, 1131, 96, 1964, 45, 172, 2041, + /* 1240 */ 2042, 246, 129, 2046, 614, 93, 1945, 373, 1946, 1915, + /* 1250 */ 1980, 613, 241, 100, 1947, 617, 1949, 1950, 612, 573, + /* 1260 */ 607, 570, 1936, 262, 83, 600, 1965, 2033, 1851, 1132, + /* 1270 */ 140, 354, 2029, 371, 1945, 1629, 1946, 45, 1980, 1964, + /* 1280 */ 1787, 101, 1947, 617, 1949, 1950, 612, 614, 607, 545, + /* 1290 */ 1317, 142, 1915, 2101, 613, 2033, 657, 36, 35, 2032, + /* 1300 */ 2029, 42, 40, 39, 38, 37, 2063, 1964, 2107, 173, + /* 1310 */ 578, 1938, 254, 2102, 566, 614, 267, 1945, 1151, 1946, + /* 1320 */ 1915, 1980, 613, 589, 101, 1947, 617, 1949, 1950, 612, + /* 1330 */ 1435, 607, 144, 1, 60, 1635, 45, 1946, 2033, 251, + /* 1340 */ 658, 4, 602, 2029, 271, 615, 577, 381, 376, 1980, + /* 1350 */ 1964, 330, 101, 1947, 617, 1949, 1950, 612, 611, 607, + /* 1360 */ 1334, 1585, 1149, 1915, 282, 613, 2033, 1382, 1964, 1398, + /* 1370 */ 324, 2029, 621, 186, 1381, 1470, 614, 131, 408, 1852, + /* 1380 */ 1946, 1915, 1933, 613, 700, 1203, 412, 1486, 1945, 287, + /* 1390 */ 142, 144, 1980, 1929, 417, 310, 1947, 617, 1949, 1950, + /* 1400 */ 612, 610, 607, 598, 1998, 443, 1945, 1393, 429, 1844, + /* 1410 */ 1980, 1964, 436, 160, 1947, 617, 1949, 1950, 612, 614, + /* 1420 */ 607, 1925, 1931, 355, 1915, 1231, 613, 126, 142, 451, + /* 1430 */ 442, 444, 607, 1946, 450, 190, 174, 2041, 2042, 1399, + /* 1440 */ 129, 2046, 1401, 1235, 1242, 453, 455, 456, 465, 1945, + /* 1450 */ 468, 469, 1400, 1980, 1946, 1584, 101, 1947, 617, 1949, + /* 1460 */ 1950, 612, 196, 607, 1964, 567, 2122, 198, 470, 1402, + /* 1470 */ 2033, 471, 614, 1105, 201, 2030, 473, 1915, 496, 613, + /* 1480 */ 1240, 147, 477, 203, 78, 1964, 79, 207, 494, 495, + /* 1490 */ 103, 1892, 498, 614, 372, 1891, 532, 1736, 1915, 535, + /* 1500 */ 613, 319, 1945, 534, 228, 283, 1980, 549, 1946, 159, + /* 1510 */ 1947, 617, 1949, 1950, 612, 213, 607, 1732, 542, 215, + /* 1520 */ 149, 150, 536, 1945, 1734, 539, 1730, 1980, 554, 151, + /* 1530 */ 304, 1947, 617, 1949, 1950, 612, 545, 607, 152, 1964, + /* 1540 */ 2101, 231, 2079, 587, 551, 5, 563, 614, 344, 557, + /* 1550 */ 2064, 2071, 1915, 548, 613, 2107, 173, 2074, 237, 240, + /* 1560 */ 2102, 566, 1946, 36, 35, 2055, 245, 42, 40, 39, + /* 1570 */ 38, 37, 550, 247, 562, 345, 1512, 1945, 547, 1946, + /* 1580 */ 2124, 1980, 574, 2078, 160, 1947, 617, 1949, 1950, 612, + /* 1590 */ 249, 607, 250, 1964, 130, 163, 571, 1397, 349, 582, + /* 1600 */ 2100, 614, 2049, 348, 259, 1946, 1915, 284, 613, 253, + /* 1610 */ 1964, 585, 586, 285, 1863, 359, 590, 1862, 614, 1861, + /* 1620 */ 350, 248, 88, 1915, 286, 613, 591, 1747, 57, 92, + /* 1630 */ 2014, 1945, 90, 1946, 619, 1980, 1964, 2123, 311, 1947, + /* 1640 */ 617, 1949, 1950, 612, 614, 607, 1791, 289, 1945, 1915, + /* 1650 */ 1717, 613, 1980, 278, 701, 311, 1947, 617, 1949, 1950, + /* 1660 */ 612, 704, 607, 313, 1964, 702, 49, 321, 298, 361, + /* 1670 */ 322, 312, 614, 302, 1945, 293, 1946, 1915, 1980, 613, + /* 1680 */ 291, 295, 1947, 617, 1949, 1950, 612, 1909, 607, 1908, + /* 1690 */ 71, 1907, 1946, 1906, 72, 1903, 378, 379, 1362, 1363, + /* 1700 */ 179, 383, 1945, 1901, 385, 386, 1980, 1964, 387, 311, + /* 1710 */ 1947, 617, 1949, 1950, 612, 614, 607, 1900, 389, 154, + /* 1720 */ 1915, 1899, 613, 1964, 1898, 391, 393, 1897, 1337, 395, + /* 1730 */ 1336, 614, 1874, 1873, 400, 533, 1915, 401, 613, 1872, + /* 1740 */ 1871, 1837, 1836, 1946, 1297, 1945, 1834, 136, 1833, 1980, + /* 1750 */ 1832, 1835, 296, 1947, 617, 1949, 1950, 612, 1831, 607, + /* 1760 */ 1830, 1945, 1828, 1827, 1826, 1980, 184, 1825, 297, 1947, + /* 1770 */ 617, 1949, 1950, 612, 1964, 607, 420, 545, 418, 1824, + /* 1780 */ 1823, 2101, 614, 1822, 1821, 1820, 1946, 1915, 1819, 613, + /* 1790 */ 1818, 1817, 1816, 1815, 1814, 1813, 2107, 173, 1812, 1811, + /* 1800 */ 1810, 2102, 566, 1946, 1809, 1808, 1807, 138, 1806, 1805, + /* 1810 */ 1804, 1299, 1945, 1803, 1802, 446, 1980, 1964, 1801, 303, + /* 1820 */ 1947, 617, 1949, 1950, 612, 614, 607, 1800, 1663, 191, + /* 1830 */ 1915, 1178, 613, 1662, 1964, 192, 1660, 1624, 1091, 194, + /* 1840 */ 69, 1623, 614, 1090, 1887, 1881, 168, 1915, 1870, 613, + /* 1850 */ 1935, 1869, 195, 202, 461, 1945, 1946, 1854, 463, 1980, + /* 1860 */ 70, 200, 307, 1947, 617, 1949, 1950, 612, 1725, 607, + /* 1870 */ 1659, 1657, 1945, 1946, 478, 1655, 1980, 480, 479, 299, + /* 1880 */ 1947, 617, 1949, 1950, 612, 482, 607, 1964, 483, 1124, + /* 1890 */ 1653, 484, 488, 486, 487, 614, 1651, 490, 492, 1638, + /* 1900 */ 1915, 1637, 613, 491, 1964, 1620, 1727, 1247, 1246, 1726, + /* 1910 */ 673, 1169, 614, 1168, 1167, 1161, 1166, 1915, 675, 613, + /* 1920 */ 59, 1649, 212, 1163, 1946, 1945, 1162, 1160, 1642, 1980, + /* 1930 */ 339, 1640, 308, 1947, 617, 1949, 1950, 612, 340, 607, + /* 1940 */ 341, 1946, 1945, 1619, 516, 519, 1980, 521, 1618, 300, + /* 1950 */ 1947, 617, 1949, 1950, 612, 1964, 607, 523, 1617, 525, + /* 1960 */ 102, 1352, 1351, 614, 1354, 529, 1886, 1946, 1915, 24, + /* 1970 */ 613, 1343, 1964, 1880, 537, 1868, 1866, 2106, 17, 14, + /* 1980 */ 614, 53, 232, 26, 1946, 1915, 1557, 613, 56, 243, + /* 1990 */ 538, 236, 61, 1945, 238, 342, 161, 1980, 1964, 1541, + /* 2000 */ 309, 1947, 617, 1949, 1950, 612, 614, 607, 1534, 242, + /* 2010 */ 1945, 1915, 543, 613, 1980, 1964, 153, 301, 1947, 617, + /* 2020 */ 1949, 1950, 612, 614, 607, 27, 244, 1936, 1915, 28, + /* 2030 */ 613, 84, 19, 1572, 1571, 1946, 1945, 346, 1577, 1578, + /* 2040 */ 1980, 1576, 1575, 314, 1947, 617, 1949, 1950, 612, 347, + /* 2050 */ 607, 1509, 1508, 1945, 55, 256, 164, 1980, 1867, 1865, + /* 2060 */ 315, 1947, 617, 1949, 1950, 612, 1964, 607, 1864, 261, + /* 2070 */ 588, 1853, 18, 20, 614, 1539, 87, 263, 1946, 1915, + /* 2080 */ 268, 613, 86, 15, 270, 273, 54, 89, 93, 21, + /* 2090 */ 8, 10, 1461, 1460, 1946, 1386, 1983, 165, 177, 1417, + /* 2100 */ 1439, 606, 618, 1224, 1945, 620, 616, 34, 1980, 1964, + /* 2110 */ 1471, 1958, 1947, 617, 1949, 1950, 612, 614, 607, 1437, + /* 2120 */ 1436, 13, 1915, 22, 613, 1964, 1409, 23, 362, 1232, + /* 2130 */ 622, 624, 1229, 614, 627, 625, 630, 1226, 1915, 628, + /* 2140 */ 613, 1220, 631, 633, 1218, 1946, 1223, 1945, 634, 1209, + /* 2150 */ 1222, 1980, 94, 1221, 1957, 1947, 617, 1949, 1950, 612, + /* 2160 */ 276, 607, 640, 1945, 1241, 95, 1237, 1980, 68, 1122, + /* 2170 */ 1956, 1947, 617, 1949, 1950, 612, 1964, 607, 650, 1176, + /* 2180 */ 1157, 1156, 1155, 1154, 614, 1153, 1152, 1150, 1946, 1915, + /* 2190 */ 1148, 613, 1147, 1146, 1144, 662, 1143, 277, 1142, 1141, + /* 2200 */ 1140, 1139, 1138, 1137, 1173, 1946, 1171, 1134, 1133, 1130, + /* 2210 */ 1129, 1128, 1127, 1656, 1945, 683, 1654, 684, 1980, 1964, + /* 2220 */ 685, 326, 1947, 617, 1949, 1950, 612, 614, 607, 687, + /* 2230 */ 688, 689, 1915, 1652, 613, 691, 1964, 693, 692, 1650, + /* 2240 */ 695, 696, 697, 1636, 614, 699, 1080, 1616, 280, 1915, + /* 2250 */ 703, 613, 1372, 290, 1591, 706, 707, 1945, 1946, 1591, + /* 2260 */ 1591, 1980, 1591, 1591, 327, 1947, 617, 1949, 1950, 612, + /* 2270 */ 1591, 607, 1591, 1591, 1945, 1946, 1591, 1591, 1980, 1591, + /* 2280 */ 1591, 323, 1947, 617, 1949, 1950, 612, 1591, 607, 1964, + /* 2290 */ 1591, 1591, 1591, 1591, 1591, 1591, 1591, 614, 1591, 1591, + /* 2300 */ 1591, 1591, 1915, 1591, 613, 1591, 1964, 1591, 1591, 1591, + /* 2310 */ 1591, 1591, 1591, 1591, 614, 1591, 1591, 1591, 1591, 1915, + /* 2320 */ 1591, 613, 1591, 1591, 1591, 1591, 1946, 1945, 1591, 1591, + /* 2330 */ 1591, 1980, 1591, 1591, 328, 1947, 617, 1949, 1950, 612, + /* 2340 */ 1591, 607, 1591, 1591, 615, 1591, 1591, 1591, 1980, 1591, + /* 2350 */ 1591, 306, 1947, 617, 1949, 1950, 612, 1964, 607, 1591, + /* 2360 */ 1591, 1591, 1591, 1591, 1591, 614, 1591, 1591, 1591, 1591, + /* 2370 */ 1915, 1591, 613, 1591, 1591, 1591, 1591, 1591, 1591, 1591, + /* 2380 */ 1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591, 1591, + /* 2390 */ 1591, 1591, 1591, 1591, 1591, 1945, 1591, 1591, 1591, 1980, + /* 2400 */ 1591, 1591, 305, 1947, 617, 1949, 1950, 612, 1591, 607, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 325, 329, 340, 331, 332, 427, 356, 345, 329, 431, - /* 10 */ 331, 332, 12, 13, 14, 367, 0, 427, 370, 371, - /* 20 */ 20, 431, 22, 0, 446, 447, 333, 377, 378, 451, - /* 30 */ 452, 356, 358, 33, 333, 35, 0, 447, 22, 364, - /* 40 */ 347, 451, 452, 369, 369, 385, 371, 24, 25, 26, - /* 50 */ 27, 28, 29, 30, 31, 32, 14, 364, 58, 20, - /* 60 */ 8, 9, 20, 63, 12, 13, 14, 15, 16, 394, - /* 70 */ 70, 397, 398, 398, 373, 20, 401, 402, 403, 404, - /* 80 */ 405, 406, 408, 408, 58, 20, 14, 427, 413, 358, - /* 90 */ 415, 431, 20, 62, 419, 420, 96, 400, 14, 325, - /* 100 */ 369, 65, 66, 67, 20, 356, 446, 447, 433, 73, - /* 110 */ 74, 451, 452, 364, 78, 79, 441, 324, 118, 326, - /* 120 */ 84, 85, 96, 426, 98, 20, 90, 333, 397, 398, - /* 130 */ 356, 20, 4, 133, 134, 20, 322, 22, 364, 408, - /* 140 */ 427, 347, 364, 369, 431, 371, 12, 13, 354, 97, - /* 150 */ 35, 96, 403, 375, 20, 0, 22, 20, 364, 325, - /* 160 */ 447, 96, 162, 163, 451, 452, 51, 33, 394, 35, - /* 170 */ 333, 43, 398, 45, 46, 401, 402, 403, 404, 405, - /* 180 */ 406, 181, 408, 183, 347, 411, 4, 413, 414, 415, - /* 190 */ 356, 354, 58, 419, 420, 416, 417, 63, 364, 385, - /* 200 */ 20, 364, 62, 369, 70, 371, 206, 207, 20, 209, + /* 0 */ 325, 329, 357, 331, 332, 427, 371, 416, 417, 431, + /* 10 */ 340, 356, 12, 13, 14, 345, 381, 427, 363, 384, + /* 20 */ 20, 431, 22, 0, 446, 447, 333, 372, 348, 451, + /* 30 */ 452, 356, 14, 33, 356, 35, 356, 447, 20, 364, + /* 40 */ 347, 451, 452, 385, 369, 365, 371, 24, 25, 26, + /* 50 */ 27, 28, 29, 30, 31, 32, 378, 364, 58, 349, + /* 60 */ 8, 9, 352, 63, 12, 13, 14, 15, 16, 394, + /* 70 */ 70, 356, 329, 398, 331, 332, 401, 402, 403, 404, + /* 80 */ 405, 406, 427, 408, 20, 427, 431, 372, 413, 431, + /* 90 */ 415, 325, 358, 356, 419, 420, 96, 96, 333, 325, + /* 100 */ 358, 446, 447, 369, 446, 447, 451, 452, 433, 451, + /* 110 */ 452, 369, 347, 96, 377, 378, 441, 21, 118, 354, + /* 120 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 364, + /* 130 */ 356, 397, 398, 133, 134, 369, 322, 356, 364, 397, + /* 140 */ 398, 399, 408, 369, 363, 371, 12, 13, 62, 97, + /* 150 */ 408, 4, 337, 372, 20, 0, 22, 20, 20, 325, + /* 160 */ 96, 367, 162, 163, 370, 371, 351, 33, 394, 35, + /* 170 */ 333, 20, 398, 22, 359, 401, 402, 403, 404, 405, + /* 180 */ 406, 181, 408, 183, 347, 411, 35, 413, 414, 415, + /* 190 */ 356, 58, 58, 419, 420, 370, 371, 63, 364, 385, + /* 200 */ 20, 364, 51, 369, 70, 371, 206, 207, 333, 209, /* 210 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 394, 337, - /* 230 */ 96, 3, 398, 325, 162, 401, 402, 403, 404, 405, - /* 240 */ 406, 427, 408, 351, 20, 431, 162, 413, 20, 415, - /* 250 */ 167, 359, 118, 419, 420, 12, 13, 14, 15, 16, - /* 260 */ 446, 447, 229, 108, 356, 451, 452, 133, 134, 370, - /* 270 */ 371, 245, 364, 162, 163, 441, 96, 369, 96, 371, - /* 280 */ 12, 13, 127, 128, 129, 130, 131, 132, 20, 20, - /* 290 */ 22, 96, 20, 325, 342, 343, 162, 163, 325, 333, - /* 300 */ 245, 33, 394, 35, 330, 333, 398, 333, 334, 401, - /* 310 */ 402, 403, 404, 405, 406, 181, 408, 183, 128, 347, - /* 320 */ 107, 413, 355, 415, 356, 97, 58, 419, 420, 161, - /* 330 */ 364, 63, 364, 250, 251, 368, 364, 369, 70, 371, - /* 340 */ 206, 207, 369, 209, 210, 211, 212, 213, 214, 215, + /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 394, 96, + /* 230 */ 96, 98, 398, 325, 128, 401, 402, 403, 404, 405, + /* 240 */ 406, 427, 408, 96, 20, 431, 245, 413, 373, 415, + /* 250 */ 4, 339, 118, 419, 420, 12, 13, 14, 15, 16, + /* 260 */ 446, 447, 245, 108, 356, 451, 452, 133, 134, 20, + /* 270 */ 133, 134, 364, 35, 362, 441, 96, 369, 20, 371, + /* 280 */ 12, 13, 127, 128, 129, 130, 131, 132, 20, 43, + /* 290 */ 22, 45, 46, 325, 188, 189, 162, 163, 192, 333, + /* 300 */ 194, 33, 394, 35, 333, 20, 398, 22, 70, 401, + /* 310 */ 402, 403, 404, 405, 406, 181, 408, 183, 347, 96, + /* 320 */ 96, 413, 20, 415, 356, 354, 58, 419, 420, 355, + /* 330 */ 364, 63, 364, 325, 20, 364, 51, 369, 70, 371, + /* 340 */ 206, 207, 368, 209, 210, 211, 212, 213, 214, 215, /* 350 */ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - /* 360 */ 226, 227, 394, 229, 96, 325, 398, 342, 343, 401, - /* 370 */ 402, 403, 404, 405, 406, 180, 408, 182, 188, 189, - /* 380 */ 96, 413, 192, 415, 194, 339, 118, 419, 420, 423, - /* 390 */ 424, 425, 164, 427, 428, 80, 356, 431, 430, 353, - /* 400 */ 232, 133, 134, 389, 364, 133, 134, 22, 362, 369, - /* 410 */ 242, 371, 446, 447, 12, 13, 14, 451, 452, 371, - /* 420 */ 35, 70, 20, 0, 22, 245, 96, 245, 364, 381, - /* 430 */ 162, 163, 384, 164, 394, 33, 58, 35, 398, 375, - /* 440 */ 245, 401, 402, 403, 404, 405, 406, 108, 408, 181, - /* 450 */ 410, 183, 330, 138, 139, 333, 334, 8, 9, 70, - /* 460 */ 58, 12, 13, 14, 15, 16, 127, 128, 129, 130, - /* 470 */ 131, 132, 70, 95, 206, 207, 98, 209, 210, 211, + /* 360 */ 226, 227, 394, 229, 96, 325, 398, 21, 80, 401, + /* 370 */ 402, 403, 404, 405, 406, 427, 408, 369, 245, 431, + /* 380 */ 34, 413, 36, 415, 325, 337, 118, 419, 420, 423, + /* 390 */ 424, 425, 245, 427, 428, 447, 356, 431, 430, 451, + /* 400 */ 452, 133, 134, 180, 364, 182, 3, 359, 324, 369, + /* 410 */ 326, 371, 446, 447, 12, 13, 14, 451, 452, 20, + /* 420 */ 162, 163, 20, 20, 22, 245, 138, 139, 369, 330, + /* 430 */ 162, 163, 333, 334, 394, 33, 333, 35, 398, 0, + /* 440 */ 333, 401, 402, 403, 404, 405, 406, 400, 408, 181, + /* 450 */ 410, 183, 330, 325, 347, 333, 334, 8, 9, 206, + /* 460 */ 58, 12, 13, 14, 15, 16, 164, 364, 245, 245, + /* 470 */ 325, 364, 70, 426, 206, 207, 385, 209, 210, 211, /* 480 */ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - /* 490 */ 222, 223, 224, 225, 226, 227, 333, 325, 96, 333, - /* 500 */ 357, 325, 356, 65, 66, 67, 20, 333, 356, 363, - /* 510 */ 347, 73, 74, 347, 357, 363, 78, 79, 372, 325, - /* 520 */ 118, 347, 84, 85, 372, 348, 348, 364, 90, 245, - /* 530 */ 364, 108, 356, 356, 356, 133, 134, 20, 364, 22, - /* 540 */ 364, 369, 365, 365, 21, 369, 97, 371, 12, 13, - /* 550 */ 127, 128, 129, 130, 131, 132, 20, 34, 22, 36, - /* 560 */ 357, 325, 333, 369, 162, 163, 176, 35, 51, 33, - /* 570 */ 394, 35, 333, 333, 398, 245, 347, 401, 402, 403, - /* 580 */ 404, 405, 406, 181, 408, 183, 347, 197, 198, 413, - /* 590 */ 357, 415, 356, 364, 58, 419, 420, 127, 357, 229, - /* 600 */ 364, 231, 70, 364, 364, 369, 70, 371, 206, 207, - /* 610 */ 339, 209, 210, 211, 212, 213, 214, 215, 216, 217, + /* 490 */ 222, 223, 224, 225, 226, 227, 411, 369, 96, 414, + /* 500 */ 97, 325, 22, 167, 65, 66, 67, 254, 255, 256, + /* 510 */ 257, 258, 73, 74, 369, 35, 62, 78, 427, 325, + /* 520 */ 118, 20, 431, 84, 85, 422, 423, 424, 425, 90, + /* 530 */ 427, 428, 356, 342, 343, 133, 134, 446, 447, 127, + /* 540 */ 364, 333, 451, 452, 356, 369, 97, 371, 12, 13, + /* 550 */ 70, 363, 339, 342, 343, 347, 20, 325, 22, 333, + /* 560 */ 372, 325, 333, 369, 162, 163, 353, 164, 20, 33, + /* 570 */ 394, 35, 364, 347, 398, 362, 347, 401, 402, 403, + /* 580 */ 404, 405, 406, 181, 408, 183, 250, 251, 107, 413, + /* 590 */ 364, 415, 356, 364, 58, 419, 420, 161, 118, 364, + /* 600 */ 364, 369, 190, 191, 229, 369, 70, 371, 206, 207, + /* 610 */ 375, 209, 210, 211, 212, 213, 214, 215, 216, 217, /* 620 */ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - /* 630 */ 394, 356, 96, 362, 398, 348, 63, 401, 402, 403, - /* 640 */ 404, 405, 406, 356, 408, 127, 128, 325, 162, 413, - /* 650 */ 132, 415, 365, 378, 118, 419, 420, 325, 325, 0, - /* 660 */ 190, 191, 422, 423, 424, 425, 430, 427, 428, 133, - /* 670 */ 134, 8, 9, 39, 2, 12, 13, 14, 15, 16, - /* 680 */ 8, 9, 12, 13, 12, 13, 14, 15, 16, 356, - /* 690 */ 20, 369, 22, 337, 333, 333, 379, 364, 162, 163, - /* 700 */ 325, 369, 369, 33, 371, 35, 356, 44, 347, 347, - /* 710 */ 14, 15, 16, 363, 412, 359, 414, 181, 412, 183, - /* 720 */ 414, 62, 372, 357, 356, 364, 364, 394, 58, 349, - /* 730 */ 325, 398, 352, 365, 401, 402, 403, 404, 405, 406, - /* 740 */ 70, 408, 206, 207, 369, 209, 210, 211, 212, 213, + /* 630 */ 394, 4, 96, 333, 398, 44, 333, 401, 402, 403, + /* 640 */ 404, 405, 406, 333, 408, 333, 19, 347, 333, 413, + /* 650 */ 347, 415, 325, 0, 118, 419, 420, 347, 325, 347, + /* 660 */ 33, 181, 347, 183, 364, 164, 430, 364, 232, 133, + /* 670 */ 134, 0, 325, 356, 364, 48, 364, 333, 242, 364, + /* 680 */ 53, 364, 12, 13, 58, 58, 206, 207, 97, 356, + /* 690 */ 20, 347, 22, 70, 14, 333, 369, 364, 162, 163, + /* 700 */ 20, 48, 369, 33, 371, 35, 8, 9, 364, 347, + /* 710 */ 12, 13, 14, 15, 16, 348, 369, 181, 20, 183, + /* 720 */ 403, 95, 95, 356, 98, 98, 364, 394, 58, 70, + /* 730 */ 325, 398, 365, 62, 401, 402, 403, 404, 405, 406, + /* 740 */ 70, 408, 206, 207, 357, 209, 210, 211, 212, 213, /* 750 */ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, /* 760 */ 224, 225, 226, 227, 8, 9, 96, 325, 12, 13, - /* 770 */ 14, 15, 16, 364, 369, 442, 443, 427, 206, 206, - /* 780 */ 18, 431, 20, 400, 375, 333, 357, 325, 118, 27, - /* 790 */ 325, 325, 30, 0, 325, 33, 446, 447, 356, 347, - /* 800 */ 0, 451, 452, 133, 134, 325, 364, 326, 325, 426, + /* 770 */ 14, 15, 16, 348, 369, 442, 443, 333, 127, 128, + /* 780 */ 18, 356, 20, 132, 412, 333, 414, 108, 118, 27, + /* 790 */ 365, 347, 30, 0, 229, 33, 231, 325, 356, 347, + /* 800 */ 44, 0, 349, 133, 134, 352, 364, 108, 364, 130, /* 810 */ 48, 369, 50, 371, 21, 53, 364, 24, 25, 26, - /* 820 */ 27, 28, 29, 30, 31, 32, 254, 255, 256, 257, - /* 830 */ 258, 369, 162, 163, 369, 369, 394, 344, 369, 346, - /* 840 */ 398, 333, 333, 401, 402, 403, 404, 405, 406, 369, - /* 850 */ 408, 181, 369, 183, 325, 347, 347, 95, 0, 8, - /* 860 */ 9, 4, 62, 12, 13, 14, 15, 16, 3, 107, - /* 870 */ 20, 20, 364, 364, 400, 325, 206, 207, 244, 209, + /* 820 */ 27, 28, 29, 30, 31, 32, 127, 128, 129, 130, + /* 830 */ 131, 132, 162, 163, 176, 333, 394, 14, 15, 16, + /* 840 */ 398, 369, 162, 401, 402, 403, 404, 405, 406, 347, + /* 850 */ 408, 181, 357, 183, 325, 197, 198, 95, 0, 14, + /* 860 */ 3, 2, 164, 62, 357, 20, 364, 8, 9, 107, + /* 870 */ 357, 12, 13, 14, 15, 16, 206, 207, 357, 209, /* 880 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, /* 890 */ 220, 221, 222, 223, 224, 225, 226, 227, 369, 137, - /* 900 */ 426, 345, 140, 141, 142, 143, 144, 145, 146, 147, - /* 910 */ 148, 149, 150, 151, 152, 153, 154, 155, 156, 369, - /* 920 */ 158, 159, 160, 65, 66, 67, 68, 69, 44, 71, + /* 900 */ 45, 46, 140, 141, 142, 143, 144, 145, 146, 147, + /* 910 */ 148, 149, 150, 151, 152, 153, 154, 155, 156, 4, + /* 920 */ 158, 159, 160, 65, 66, 67, 68, 69, 325, 71, /* 930 */ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, /* 940 */ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - /* 950 */ 92, 18, 325, 325, 333, 325, 23, 8, 9, 12, - /* 960 */ 13, 12, 13, 14, 15, 16, 325, 325, 347, 22, - /* 970 */ 37, 38, 333, 411, 41, 366, 414, 455, 369, 20, - /* 980 */ 33, 97, 35, 8, 9, 364, 347, 12, 13, 14, - /* 990 */ 15, 16, 59, 60, 61, 371, 369, 369, 356, 369, - /* 1000 */ 1, 2, 37, 364, 366, 58, 364, 369, 384, 444, - /* 1010 */ 369, 369, 63, 371, 164, 164, 44, 70, 109, 110, + /* 950 */ 92, 18, 333, 325, 357, 371, 23, 8, 9, 12, + /* 960 */ 13, 12, 13, 14, 15, 16, 347, 325, 384, 22, + /* 970 */ 37, 38, 369, 333, 41, 39, 65, 66, 67, 412, + /* 980 */ 33, 414, 35, 364, 73, 74, 0, 347, 400, 78, + /* 990 */ 400, 356, 59, 60, 61, 84, 85, 369, 356, 358, + /* 1000 */ 365, 90, 37, 20, 364, 58, 364, 162, 1, 2, + /* 1010 */ 369, 369, 63, 371, 426, 325, 426, 70, 109, 110, /* 1020 */ 111, 112, 113, 114, 115, 116, 117, 118, 119, 96, - /* 1030 */ 121, 122, 123, 124, 125, 126, 394, 335, 349, 333, - /* 1040 */ 398, 352, 356, 401, 402, 403, 404, 405, 406, 366, - /* 1050 */ 408, 385, 369, 347, 105, 413, 100, 415, 372, 103, + /* 1030 */ 121, 122, 123, 124, 125, 126, 394, 44, 397, 398, + /* 1040 */ 398, 44, 325, 401, 402, 403, 404, 405, 406, 408, + /* 1050 */ 408, 389, 325, 325, 105, 413, 333, 415, 0, 369, /* 1060 */ 33, 419, 420, 19, 99, 118, 101, 102, 135, 104, - /* 1070 */ 364, 438, 430, 108, 333, 48, 0, 33, 22, 45, - /* 1080 */ 46, 54, 55, 56, 57, 58, 243, 244, 347, 0, - /* 1090 */ 333, 35, 48, 427, 108, 130, 97, 431, 54, 55, - /* 1100 */ 56, 57, 58, 246, 347, 364, 173, 174, 175, 333, - /* 1110 */ 161, 178, 446, 447, 107, 44, 130, 451, 452, 333, - /* 1120 */ 35, 364, 95, 164, 48, 98, 70, 262, 181, 196, - /* 1130 */ 183, 356, 199, 347, 201, 202, 203, 204, 205, 95, - /* 1140 */ 364, 42, 98, 44, 42, 35, 44, 335, 173, 44, - /* 1150 */ 364, 379, 21, 206, 207, 24, 25, 26, 27, 28, - /* 1160 */ 29, 30, 31, 32, 157, 218, 219, 220, 221, 222, - /* 1170 */ 223, 224, 44, 100, 118, 131, 103, 325, 245, 44, - /* 1180 */ 333, 232, 233, 234, 235, 236, 237, 238, 239, 240, - /* 1190 */ 241, 242, 165, 166, 347, 168, 0, 0, 171, 423, - /* 1200 */ 424, 425, 97, 427, 428, 325, 100, 100, 356, 103, - /* 1210 */ 103, 364, 168, 44, 187, 164, 364, 44, 22, 22, - /* 1220 */ 169, 369, 44, 371, 58, 97, 133, 134, 47, 185, - /* 1230 */ 96, 187, 97, 1, 2, 332, 356, 181, 266, 183, - /* 1240 */ 106, 152, 267, 44, 364, 35, 394, 13, 325, 369, - /* 1250 */ 398, 371, 379, 401, 402, 403, 404, 405, 406, 44, - /* 1260 */ 408, 44, 206, 207, 98, 413, 97, 415, 183, 35, - /* 1270 */ 97, 419, 420, 368, 394, 97, 325, 96, 398, 356, - /* 1280 */ 70, 401, 402, 403, 404, 405, 406, 364, 408, 429, - /* 1290 */ 448, 2, 369, 183, 371, 415, 97, 8, 9, 419, - /* 1300 */ 420, 12, 13, 14, 15, 16, 421, 356, 44, 44, - /* 1310 */ 432, 44, 97, 247, 97, 364, 44, 394, 13, 325, - /* 1320 */ 369, 398, 371, 0, 401, 402, 403, 404, 405, 406, - /* 1330 */ 396, 408, 44, 48, 395, 264, 44, 325, 415, 179, - /* 1340 */ 35, 387, 419, 420, 42, 394, 376, 20, 379, 398, - /* 1350 */ 356, 161, 401, 402, 403, 404, 405, 406, 364, 408, - /* 1360 */ 376, 97, 97, 369, 97, 371, 415, 374, 356, 97, - /* 1370 */ 419, 420, 49, 20, 333, 333, 364, 376, 374, 374, - /* 1380 */ 325, 369, 333, 371, 94, 97, 341, 333, 394, 97, - /* 1390 */ 333, 20, 398, 4, 327, 401, 402, 403, 404, 405, - /* 1400 */ 406, 407, 408, 409, 410, 327, 394, 20, 19, 391, - /* 1410 */ 398, 356, 20, 401, 402, 403, 404, 405, 406, 364, - /* 1420 */ 408, 339, 33, 371, 369, 339, 371, 20, 358, 334, - /* 1430 */ 339, 334, 386, 325, 52, 339, 333, 48, 369, 369, - /* 1440 */ 339, 358, 53, 339, 327, 195, 356, 58, 336, 394, - /* 1450 */ 339, 336, 369, 398, 325, 333, 401, 402, 403, 404, - /* 1460 */ 405, 406, 337, 408, 356, 453, 454, 397, 398, 399, - /* 1470 */ 415, 327, 364, 393, 356, 420, 356, 369, 408, 371, - /* 1480 */ 397, 398, 399, 385, 95, 356, 356, 98, 356, 356, - /* 1490 */ 369, 408, 356, 364, 385, 356, 356, 356, 369, 356, - /* 1500 */ 371, 186, 394, 333, 391, 337, 398, 369, 325, 401, - /* 1510 */ 402, 403, 404, 405, 406, 253, 408, 390, 371, 382, - /* 1520 */ 252, 379, 333, 394, 379, 427, 369, 398, 369, 431, - /* 1530 */ 401, 402, 403, 404, 405, 406, 427, 408, 382, 356, - /* 1540 */ 431, 369, 259, 261, 446, 447, 172, 364, 248, 451, - /* 1550 */ 452, 443, 369, 364, 371, 446, 447, 260, 435, 440, - /* 1560 */ 451, 452, 325, 8, 9, 439, 268, 12, 13, 14, - /* 1570 */ 15, 16, 396, 244, 445, 265, 263, 394, 364, 325, - /* 1580 */ 456, 398, 434, 437, 401, 402, 403, 404, 405, 406, - /* 1590 */ 437, 408, 437, 356, 436, 20, 333, 337, 361, 450, - /* 1600 */ 449, 364, 400, 334, 382, 325, 369, 369, 371, 369, - /* 1610 */ 356, 369, 423, 424, 425, 361, 427, 428, 364, 166, - /* 1620 */ 369, 369, 369, 369, 337, 371, 382, 380, 352, 96, - /* 1630 */ 337, 394, 96, 325, 364, 398, 356, 454, 401, 402, - /* 1640 */ 403, 404, 405, 406, 364, 408, 418, 369, 394, 369, - /* 1650 */ 346, 371, 398, 333, 360, 401, 402, 403, 404, 405, - /* 1660 */ 406, 337, 408, 36, 356, 328, 327, 388, 350, 361, - /* 1670 */ 338, 350, 364, 392, 394, 350, 325, 369, 398, 371, - /* 1680 */ 323, 401, 402, 403, 404, 405, 406, 0, 408, 383, - /* 1690 */ 383, 0, 325, 188, 0, 0, 42, 0, 35, 200, - /* 1700 */ 35, 35, 394, 35, 200, 0, 398, 356, 35, 401, - /* 1710 */ 402, 403, 404, 405, 406, 364, 408, 35, 200, 164, - /* 1720 */ 369, 0, 371, 356, 200, 0, 0, 35, 22, 0, - /* 1730 */ 183, 364, 181, 35, 0, 385, 369, 0, 371, 177, - /* 1740 */ 176, 0, 0, 325, 0, 394, 47, 0, 0, 398, - /* 1750 */ 42, 0, 401, 402, 403, 404, 405, 406, 0, 408, - /* 1760 */ 0, 394, 0, 0, 0, 398, 0, 0, 401, 402, + /* 1070 */ 347, 366, 430, 108, 369, 48, 325, 33, 364, 364, + /* 1080 */ 20, 54, 55, 56, 57, 58, 369, 364, 366, 375, + /* 1090 */ 375, 369, 48, 326, 108, 130, 369, 369, 54, 55, + /* 1100 */ 56, 57, 58, 344, 97, 346, 173, 174, 175, 366, + /* 1110 */ 161, 178, 369, 127, 128, 129, 130, 131, 132, 262, + /* 1120 */ 369, 42, 95, 44, 107, 98, 243, 244, 181, 196, + /* 1130 */ 183, 345, 199, 22, 201, 202, 203, 204, 205, 95, + /* 1140 */ 0, 42, 98, 44, 379, 2, 35, 164, 333, 133, + /* 1150 */ 134, 8, 9, 206, 207, 12, 13, 14, 15, 16, + /* 1160 */ 44, 246, 22, 1, 2, 218, 219, 220, 221, 222, + /* 1170 */ 223, 224, 0, 100, 157, 131, 103, 325, 245, 364, + /* 1180 */ 244, 232, 233, 234, 235, 236, 237, 238, 239, 240, + /* 1190 */ 241, 242, 165, 166, 22, 168, 8, 9, 171, 44, + /* 1200 */ 12, 13, 14, 15, 16, 325, 100, 455, 356, 103, + /* 1210 */ 152, 0, 168, 97, 187, 100, 364, 100, 103, 35, + /* 1220 */ 103, 369, 162, 371, 58, 164, 35, 444, 335, 185, + /* 1230 */ 169, 187, 63, 22, 35, 96, 356, 44, 423, 424, + /* 1240 */ 425, 438, 427, 428, 364, 106, 394, 385, 325, 369, + /* 1250 */ 398, 371, 97, 401, 402, 403, 404, 405, 406, 266, + /* 1260 */ 408, 264, 47, 44, 98, 413, 356, 415, 379, 70, + /* 1270 */ 44, 419, 420, 335, 394, 332, 325, 44, 398, 356, + /* 1280 */ 368, 401, 402, 403, 404, 405, 406, 364, 408, 427, + /* 1290 */ 97, 44, 369, 431, 371, 415, 13, 8, 9, 419, + /* 1300 */ 420, 12, 13, 14, 15, 16, 379, 356, 446, 447, + /* 1310 */ 429, 96, 448, 451, 452, 364, 97, 394, 35, 325, + /* 1320 */ 369, 398, 371, 97, 401, 402, 403, 404, 405, 406, + /* 1330 */ 97, 408, 44, 432, 44, 0, 44, 325, 415, 421, + /* 1340 */ 13, 247, 419, 420, 97, 394, 333, 48, 396, 398, + /* 1350 */ 356, 395, 401, 402, 403, 404, 405, 406, 364, 408, + /* 1360 */ 179, 173, 35, 369, 387, 371, 415, 183, 356, 20, + /* 1370 */ 419, 420, 44, 42, 183, 206, 364, 364, 376, 379, + /* 1380 */ 325, 369, 358, 371, 49, 97, 376, 97, 394, 97, + /* 1390 */ 44, 44, 398, 369, 374, 401, 402, 403, 404, 405, + /* 1400 */ 406, 407, 408, 409, 410, 161, 394, 20, 333, 333, + /* 1410 */ 398, 356, 376, 401, 402, 403, 404, 405, 406, 364, + /* 1420 */ 408, 397, 398, 399, 369, 97, 371, 44, 44, 341, + /* 1430 */ 374, 374, 408, 325, 94, 333, 423, 424, 425, 20, + /* 1440 */ 427, 428, 20, 97, 97, 333, 333, 327, 327, 394, + /* 1450 */ 391, 371, 20, 398, 325, 267, 401, 402, 403, 404, + /* 1460 */ 405, 406, 339, 408, 356, 453, 454, 339, 334, 20, + /* 1470 */ 415, 386, 364, 52, 339, 420, 334, 369, 327, 371, + /* 1480 */ 97, 97, 333, 339, 339, 356, 339, 339, 336, 336, + /* 1490 */ 333, 369, 356, 364, 385, 369, 195, 356, 369, 186, + /* 1500 */ 371, 327, 394, 393, 337, 391, 398, 369, 325, 401, + /* 1510 */ 402, 403, 404, 405, 406, 356, 408, 356, 333, 356, + /* 1520 */ 356, 356, 390, 394, 356, 371, 356, 398, 253, 356, + /* 1530 */ 401, 402, 403, 404, 405, 406, 427, 408, 356, 356, + /* 1540 */ 431, 337, 437, 252, 369, 259, 172, 364, 369, 369, + /* 1550 */ 379, 443, 369, 260, 371, 446, 447, 379, 382, 382, + /* 1560 */ 451, 452, 325, 8, 9, 440, 439, 12, 13, 14, + /* 1570 */ 15, 16, 261, 436, 445, 268, 244, 394, 248, 325, + /* 1580 */ 456, 398, 265, 437, 401, 402, 403, 404, 405, 406, + /* 1590 */ 434, 408, 396, 356, 364, 437, 263, 20, 361, 333, + /* 1600 */ 450, 364, 400, 334, 337, 325, 369, 382, 371, 449, + /* 1610 */ 356, 369, 369, 382, 369, 361, 166, 369, 364, 369, + /* 1620 */ 369, 435, 337, 369, 352, 371, 380, 364, 96, 96, + /* 1630 */ 418, 394, 337, 325, 360, 398, 356, 454, 401, 402, + /* 1640 */ 403, 404, 405, 406, 364, 408, 369, 333, 394, 369, + /* 1650 */ 346, 371, 398, 337, 36, 401, 402, 403, 404, 405, + /* 1660 */ 406, 327, 408, 392, 356, 328, 388, 383, 350, 361, + /* 1670 */ 383, 350, 364, 350, 394, 323, 325, 369, 398, 371, + /* 1680 */ 338, 401, 402, 403, 404, 405, 406, 0, 408, 0, + /* 1690 */ 188, 0, 325, 0, 42, 0, 35, 200, 35, 35, + /* 1700 */ 35, 200, 394, 0, 35, 35, 398, 356, 200, 401, + /* 1710 */ 402, 403, 404, 405, 406, 364, 408, 0, 200, 164, + /* 1720 */ 369, 0, 371, 356, 0, 35, 22, 0, 183, 35, + /* 1730 */ 181, 364, 0, 0, 177, 385, 369, 176, 371, 0, + /* 1740 */ 0, 0, 0, 325, 47, 394, 0, 42, 0, 398, + /* 1750 */ 0, 0, 401, 402, 403, 404, 405, 406, 0, 408, + /* 1760 */ 0, 394, 0, 0, 0, 398, 152, 0, 401, 402, /* 1770 */ 403, 404, 405, 406, 356, 408, 152, 427, 35, 0, - /* 1780 */ 152, 431, 364, 0, 0, 0, 325, 369, 0, 371, + /* 1780 */ 0, 431, 364, 0, 0, 0, 325, 369, 0, 371, /* 1790 */ 0, 0, 0, 0, 0, 0, 446, 447, 0, 0, /* 1800 */ 0, 451, 452, 325, 0, 0, 0, 42, 0, 0, - /* 1810 */ 0, 0, 394, 0, 0, 0, 398, 356, 22, 401, - /* 1820 */ 402, 403, 404, 405, 406, 364, 408, 0, 0, 136, - /* 1830 */ 369, 0, 371, 58, 356, 0, 35, 0, 58, 0, - /* 1840 */ 14, 44, 364, 14, 42, 0, 39, 369, 0, 371, - /* 1850 */ 47, 0, 40, 0, 0, 394, 325, 39, 39, 398, - /* 1860 */ 172, 0, 401, 402, 403, 404, 405, 406, 47, 408, - /* 1870 */ 47, 0, 394, 325, 0, 0, 398, 35, 48, 401, - /* 1880 */ 402, 403, 404, 405, 406, 39, 408, 356, 64, 0, - /* 1890 */ 35, 48, 0, 35, 0, 364, 39, 48, 39, 35, - /* 1900 */ 369, 39, 371, 0, 356, 0, 0, 0, 48, 22, - /* 1910 */ 0, 35, 364, 35, 35, 22, 35, 369, 35, 371, - /* 1920 */ 103, 105, 22, 35, 325, 394, 44, 0, 44, 398, - /* 1930 */ 35, 35, 401, 402, 403, 404, 405, 406, 22, 408, - /* 1940 */ 0, 325, 394, 22, 0, 22, 398, 50, 35, 401, - /* 1950 */ 402, 403, 404, 405, 406, 356, 408, 0, 0, 35, - /* 1960 */ 35, 0, 97, 364, 22, 20, 35, 325, 369, 35, - /* 1970 */ 371, 193, 356, 96, 0, 0, 35, 22, 0, 0, - /* 1980 */ 364, 44, 249, 3, 325, 369, 164, 371, 97, 249, - /* 1990 */ 44, 44, 44, 394, 96, 96, 164, 398, 356, 166, - /* 2000 */ 401, 402, 403, 404, 405, 406, 364, 408, 164, 184, - /* 2010 */ 394, 369, 97, 371, 398, 356, 97, 401, 402, 403, - /* 2020 */ 404, 405, 406, 364, 408, 96, 170, 97, 369, 47, - /* 2030 */ 371, 96, 96, 47, 96, 325, 394, 3, 44, 35, - /* 2040 */ 398, 35, 35, 401, 402, 403, 404, 405, 406, 97, - /* 2050 */ 408, 97, 35, 394, 35, 35, 97, 398, 47, 97, - /* 2060 */ 401, 402, 403, 404, 405, 406, 356, 408, 44, 47, - /* 2070 */ 0, 0, 0, 96, 364, 167, 0, 96, 325, 369, - /* 2080 */ 97, 371, 97, 249, 243, 96, 96, 39, 96, 47, - /* 2090 */ 106, 165, 2, 44, 325, 228, 230, 228, 96, 22, - /* 2100 */ 97, 96, 47, 47, 394, 97, 96, 206, 398, 356, - /* 2110 */ 97, 401, 402, 403, 404, 405, 406, 364, 408, 96, - /* 2120 */ 22, 96, 369, 97, 371, 356, 208, 96, 107, 97, - /* 2130 */ 35, 35, 96, 364, 97, 35, 96, 35, 369, 96, - /* 2140 */ 371, 97, 97, 35, 97, 325, 96, 394, 35, 96, - /* 2150 */ 120, 398, 22, 120, 401, 402, 403, 404, 405, 406, - /* 2160 */ 108, 408, 96, 394, 44, 96, 120, 398, 35, 96, - /* 2170 */ 401, 402, 403, 404, 405, 406, 356, 408, 120, 22, - /* 2180 */ 64, 63, 35, 35, 364, 35, 35, 35, 325, 369, - /* 2190 */ 35, 371, 70, 35, 35, 35, 35, 93, 44, 35, - /* 2200 */ 35, 22, 35, 22, 35, 325, 35, 35, 70, 35, - /* 2210 */ 35, 35, 35, 35, 394, 22, 0, 35, 398, 356, - /* 2220 */ 35, 401, 402, 403, 404, 405, 406, 364, 408, 39, - /* 2230 */ 0, 48, 369, 35, 371, 48, 356, 0, 39, 35, - /* 2240 */ 48, 39, 0, 35, 364, 48, 39, 0, 35, 369, - /* 2250 */ 35, 371, 0, 22, 21, 20, 22, 394, 325, 457, - /* 2260 */ 22, 398, 21, 457, 401, 402, 403, 404, 405, 406, + /* 1810 */ 0, 22, 394, 0, 0, 136, 398, 356, 0, 401, + /* 1820 */ 402, 403, 404, 405, 406, 364, 408, 0, 0, 58, + /* 1830 */ 369, 35, 371, 0, 356, 58, 0, 0, 14, 42, + /* 1840 */ 39, 0, 364, 14, 0, 0, 44, 369, 0, 371, + /* 1850 */ 47, 0, 40, 172, 47, 394, 325, 0, 47, 398, + /* 1860 */ 39, 39, 401, 402, 403, 404, 405, 406, 0, 408, + /* 1870 */ 0, 0, 394, 325, 35, 0, 398, 39, 48, 401, + /* 1880 */ 402, 403, 404, 405, 406, 35, 408, 356, 48, 64, + /* 1890 */ 0, 39, 39, 35, 48, 364, 0, 35, 39, 0, + /* 1900 */ 369, 0, 371, 48, 356, 0, 0, 35, 22, 0, + /* 1910 */ 44, 35, 364, 35, 35, 22, 35, 369, 44, 371, + /* 1920 */ 105, 0, 103, 35, 325, 394, 35, 35, 0, 398, + /* 1930 */ 22, 0, 401, 402, 403, 404, 405, 406, 22, 408, + /* 1940 */ 22, 325, 394, 0, 50, 35, 398, 35, 0, 401, + /* 1950 */ 402, 403, 404, 405, 406, 356, 408, 35, 0, 22, + /* 1960 */ 20, 35, 35, 364, 97, 193, 0, 325, 369, 96, + /* 1970 */ 371, 35, 356, 0, 22, 0, 0, 3, 44, 249, + /* 1980 */ 364, 164, 166, 96, 325, 369, 97, 371, 44, 44, + /* 1990 */ 164, 96, 3, 394, 97, 164, 96, 398, 356, 97, + /* 2000 */ 401, 402, 403, 404, 405, 406, 364, 408, 97, 96, + /* 2010 */ 394, 369, 170, 371, 398, 356, 184, 401, 402, 403, + /* 2020 */ 404, 405, 406, 364, 408, 96, 47, 47, 369, 44, + /* 2030 */ 371, 96, 44, 35, 35, 325, 394, 35, 97, 97, + /* 2040 */ 398, 35, 35, 401, 402, 403, 404, 405, 406, 35, + /* 2050 */ 408, 97, 97, 394, 44, 47, 47, 398, 0, 0, + /* 2060 */ 401, 402, 403, 404, 405, 406, 356, 408, 0, 97, + /* 2070 */ 167, 0, 249, 96, 364, 97, 39, 96, 325, 369, + /* 2080 */ 96, 371, 96, 249, 165, 47, 243, 96, 106, 44, + /* 2090 */ 230, 2, 228, 228, 325, 22, 96, 47, 47, 22, + /* 2100 */ 97, 96, 107, 120, 394, 35, 208, 96, 398, 356, + /* 2110 */ 206, 401, 402, 403, 404, 405, 406, 364, 408, 97, + /* 2120 */ 97, 96, 369, 96, 371, 356, 97, 96, 35, 97, + /* 2130 */ 96, 35, 97, 364, 35, 96, 35, 97, 369, 96, + /* 2140 */ 371, 97, 96, 35, 97, 325, 120, 394, 96, 22, + /* 2150 */ 120, 398, 96, 120, 401, 402, 403, 404, 405, 406, + /* 2160 */ 44, 408, 108, 394, 35, 96, 22, 398, 96, 64, + /* 2170 */ 401, 402, 403, 404, 405, 406, 356, 408, 63, 70, + /* 2180 */ 35, 35, 35, 35, 364, 35, 35, 35, 325, 369, + /* 2190 */ 35, 371, 35, 35, 35, 93, 35, 44, 22, 35, + /* 2200 */ 22, 35, 35, 35, 70, 325, 35, 35, 35, 35, + /* 2210 */ 35, 22, 35, 0, 394, 35, 0, 48, 398, 356, + /* 2220 */ 39, 401, 402, 403, 404, 405, 406, 364, 408, 35, + /* 2230 */ 48, 39, 369, 0, 371, 35, 356, 39, 48, 0, + /* 2240 */ 35, 48, 39, 0, 364, 35, 35, 0, 22, 369, + /* 2250 */ 21, 371, 22, 22, 457, 21, 20, 394, 325, 457, + /* 2260 */ 457, 398, 457, 457, 401, 402, 403, 404, 405, 406, /* 2270 */ 457, 408, 457, 457, 394, 325, 457, 457, 398, 457, /* 2280 */ 457, 401, 402, 403, 404, 405, 406, 457, 408, 356, /* 2290 */ 457, 457, 457, 457, 457, 457, 457, 364, 457, 457, @@ -718,84 +718,83 @@ static const YYCODETYPE yy_lookahead[] = { /* 2540 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, /* 2550 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, /* 2560 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2570 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, - /* 2580 */ 457, 457, 457, 457, 457, + /* 2570 */ 457, 457, 457, 457, 457, 457, 457, 457, 457, }; -#define YY_SHIFT_COUNT (709) +#define YY_SHIFT_COUNT (708) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2252) +#define YY_SHIFT_MAX (2247) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 933, 0, 134, 0, 268, 268, 268, 268, 268, 268, /* 10 */ 268, 268, 268, 402, 536, 536, 670, 536, 536, 536, /* 20 */ 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, /* 30 */ 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, - /* 40 */ 536, 536, 536, 536, 536, 536, 55, 180, 65, 195, - /* 50 */ 26, 284, 330, 284, 65, 65, 947, 947, 284, 947, - /* 60 */ 947, 182, 284, 39, 39, 128, 128, 111, 272, 42, - /* 70 */ 42, 39, 39, 39, 39, 39, 39, 39, 39, 39, - /* 80 */ 39, 31, 39, 39, 105, 39, 137, 39, 39, 188, - /* 90 */ 39, 39, 188, 39, 188, 188, 188, 39, 140, 762, - /* 100 */ 949, 949, 438, 1131, 1056, 1056, 1056, 1056, 1056, 1056, - /* 110 */ 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, - /* 120 */ 1056, 1056, 1056, 965, 228, 111, 272, 659, 532, 269, - /* 130 */ 269, 269, 800, 370, 370, 532, 224, 224, 224, 213, - /* 140 */ 137, 33, 188, 351, 188, 351, 351, 213, 389, 909, - /* 150 */ 909, 909, 909, 909, 909, 909, 1044, 36, 793, 851, - /* 160 */ 975, 572, 115, 83, 72, 84, 517, 850, 1034, 986, - /* 170 */ 959, 843, 634, 865, 843, 1099, 857, 486, 1066, 1285, - /* 180 */ 1160, 1302, 1327, 1302, 1190, 1353, 1353, 1302, 1190, 1190, - /* 190 */ 1290, 1353, 1353, 1353, 1371, 1371, 1387, 31, 137, 31, - /* 200 */ 1392, 1407, 31, 1392, 31, 31, 31, 1353, 31, 1382, - /* 210 */ 1382, 1371, 188, 188, 188, 188, 188, 188, 188, 188, - /* 220 */ 188, 188, 188, 1353, 1371, 351, 351, 1250, 1387, 140, - /* 230 */ 1315, 137, 140, 1353, 1327, 1327, 351, 1262, 1268, 351, - /* 240 */ 1262, 1268, 351, 351, 188, 1283, 1374, 1262, 1282, 1297, - /* 250 */ 1300, 1066, 1298, 1310, 1313, 1329, 224, 1575, 1353, 1392, - /* 260 */ 140, 1268, 351, 351, 351, 351, 351, 1268, 351, 1453, - /* 270 */ 140, 213, 140, 224, 1533, 1536, 351, 389, 1353, 140, - /* 280 */ 1627, 1371, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, - /* 290 */ 2410, 858, 1027, 23, 1389, 52, 663, 449, 155, 672, - /* 300 */ 1289, 1555, 423, 756, 756, 756, 756, 756, 756, 756, - /* 310 */ 756, 756, 339, 190, 243, 243, 390, 378, 315, 523, - /* 320 */ 470, 518, 518, 696, 999, 168, 696, 696, 696, 884, - /* 330 */ 1076, 385, 1102, 1007, 1089, 956, 1073, 1106, 1107, 16, - /* 340 */ 1196, 1197, 1166, 1105, 1128, 1093, 1071, 972, 1051, 1135, - /* 350 */ 1169, 1173, 1178, 1199, 1232, 1215, 1085, 1110, 573, 1217, - /* 360 */ 1181, 1264, 1265, 1267, 1272, 1288, 1292, 1134, 1234, 1305, - /* 370 */ 1210, 1323, 1687, 1691, 1505, 1694, 1695, 1654, 1697, 1663, - /* 380 */ 1499, 1665, 1666, 1668, 1504, 1705, 1673, 1682, 1518, 1721, - /* 390 */ 1524, 1725, 1692, 1726, 1706, 1729, 1698, 1547, 1551, 1734, - /* 400 */ 1737, 1562, 1564, 1741, 1742, 1699, 1744, 1747, 1748, 1708, - /* 410 */ 1751, 1758, 1760, 1762, 1763, 1764, 1766, 1767, 1624, 1743, - /* 420 */ 1779, 1628, 1783, 1784, 1785, 1788, 1790, 1791, 1792, 1793, - /* 430 */ 1794, 1795, 1798, 1799, 1800, 1804, 1805, 1765, 1806, 1808, - /* 440 */ 1809, 1810, 1811, 1796, 1813, 1814, 1815, 1693, 1827, 1828, - /* 450 */ 1801, 1831, 1775, 1835, 1780, 1837, 1839, 1802, 1807, 1797, - /* 460 */ 1803, 1826, 1821, 1829, 1823, 1845, 1812, 1818, 1848, 1851, - /* 470 */ 1853, 1819, 1688, 1854, 1861, 1871, 1824, 1874, 1875, 1842, - /* 480 */ 1830, 1846, 1889, 1855, 1843, 1857, 1892, 1858, 1849, 1859, - /* 490 */ 1894, 1864, 1860, 1862, 1903, 1905, 1906, 1907, 1816, 1817, - /* 500 */ 1876, 1887, 1910, 1878, 1879, 1893, 1881, 1883, 1882, 1884, - /* 510 */ 1888, 1895, 1900, 1896, 1927, 1916, 1940, 1921, 1897, 1944, - /* 520 */ 1923, 1913, 1957, 1924, 1958, 1925, 1961, 1942, 1945, 1931, - /* 530 */ 1934, 1778, 1865, 1877, 1974, 1822, 1941, 1975, 1825, 1955, - /* 540 */ 1832, 1833, 1978, 1979, 1844, 1856, 1980, 1937, 1733, 1898, - /* 550 */ 1891, 1899, 1915, 1946, 1919, 1929, 1935, 1936, 1930, 1947, - /* 560 */ 1982, 1986, 1938, 1948, 1740, 1952, 1954, 2034, 1994, 1834, - /* 570 */ 2004, 2006, 2007, 2017, 2019, 2020, 1959, 1962, 2011, 1841, - /* 580 */ 2024, 2022, 2070, 2071, 2072, 1977, 1983, 1985, 1981, 1989, - /* 590 */ 1908, 1990, 2076, 2048, 1926, 1992, 1984, 1803, 2042, 2049, - /* 600 */ 1867, 1866, 1869, 2090, 2077, 1901, 2002, 2003, 2005, 2008, - /* 610 */ 2010, 2013, 2055, 2023, 2025, 2056, 2026, 2098, 1918, 2031, - /* 620 */ 2021, 2032, 2095, 2096, 2036, 2037, 2100, 2040, 2044, 2102, - /* 630 */ 2043, 2045, 2108, 2050, 2047, 2113, 2053, 2030, 2033, 2046, - /* 640 */ 2058, 2130, 2052, 2066, 2120, 2069, 2133, 2073, 2120, 2120, - /* 650 */ 2157, 2116, 2118, 2147, 2148, 2150, 2151, 2152, 2155, 2158, - /* 660 */ 2159, 2160, 2161, 2122, 2104, 2154, 2164, 2165, 2179, 2167, - /* 670 */ 2181, 2169, 2171, 2172, 2138, 1882, 2174, 1884, 2175, 2176, - /* 680 */ 2177, 2178, 2193, 2182, 2216, 2185, 2183, 2190, 2230, 2198, - /* 690 */ 2187, 2199, 2237, 2204, 2192, 2202, 2242, 2208, 2197, 2207, - /* 700 */ 2247, 2213, 2215, 2252, 2231, 2233, 2234, 2238, 2241, 2235, + /* 40 */ 536, 536, 536, 536, 536, 536, 180, 224, 64, 223, + /* 50 */ 133, 1, 17, 1, 64, 64, 947, 947, 1, 947, + /* 60 */ 947, 147, 1, 138, 138, 246, 246, 258, 137, 18, + /* 70 */ 18, 138, 138, 138, 138, 138, 138, 138, 138, 138, + /* 80 */ 138, 86, 138, 138, 249, 138, 314, 138, 138, 399, + /* 90 */ 138, 138, 399, 138, 399, 399, 399, 138, 454, 762, + /* 100 */ 949, 949, 96, 911, 480, 480, 480, 480, 480, 480, + /* 110 */ 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + /* 120 */ 480, 480, 480, 965, 403, 258, 137, 671, 238, 302, + /* 130 */ 302, 302, 801, 565, 565, 238, 548, 548, 548, 481, + /* 140 */ 314, 375, 399, 623, 399, 623, 623, 481, 659, 909, + /* 150 */ 909, 909, 909, 909, 909, 909, 1044, 793, 439, 698, + /* 160 */ 1188, 253, 151, 336, 680, 845, 285, 501, 855, 679, + /* 170 */ 983, 883, 936, 857, 883, 1079, 915, 1060, 1094, 1299, + /* 180 */ 1181, 1331, 1349, 1331, 1244, 1387, 1387, 1331, 1244, 1244, + /* 190 */ 1340, 1387, 1387, 1387, 1419, 1419, 1422, 86, 314, 86, + /* 200 */ 1432, 1449, 86, 1432, 86, 86, 86, 1387, 86, 1421, + /* 210 */ 1421, 1419, 399, 399, 399, 399, 399, 399, 399, 399, + /* 220 */ 399, 399, 399, 1387, 1419, 623, 623, 1301, 1422, 454, + /* 230 */ 1313, 314, 454, 1387, 1349, 1349, 623, 1275, 1291, 623, + /* 240 */ 1275, 1291, 623, 623, 399, 1286, 1374, 1275, 1311, 1293, + /* 250 */ 1330, 1094, 1307, 1317, 1333, 1332, 548, 1577, 1387, 1432, + /* 260 */ 454, 1291, 623, 623, 623, 623, 623, 1291, 623, 1450, + /* 270 */ 454, 481, 454, 548, 1532, 1533, 623, 659, 1387, 454, + /* 280 */ 1618, 1419, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2410, + /* 290 */ 2410, 858, 1027, 23, 627, 52, 756, 449, 155, 859, + /* 300 */ 1143, 1555, 986, 1289, 1289, 1289, 1289, 1289, 1289, 1289, + /* 310 */ 1289, 1289, 699, 106, 243, 243, 658, 626, 288, 346, + /* 320 */ 412, 651, 651, 823, 1007, 436, 823, 823, 823, 591, + /* 330 */ 653, 1111, 1099, 1017, 1058, 1073, 1106, 1115, 1117, 1140, + /* 340 */ 1172, 1211, 1166, 1116, 1155, 1016, 997, 993, 1061, 1193, + /* 350 */ 1219, 1226, 1247, 1288, 1162, 1290, 1184, 1191, 1169, 1233, + /* 360 */ 1215, 1292, 1328, 1346, 1347, 1383, 1384, 1139, 1283, 1327, + /* 370 */ 1199, 1335, 1687, 1689, 1502, 1691, 1693, 1652, 1695, 1661, + /* 380 */ 1497, 1663, 1664, 1665, 1501, 1703, 1669, 1670, 1508, 1717, + /* 390 */ 1518, 1721, 1690, 1724, 1704, 1727, 1694, 1545, 1549, 1732, + /* 400 */ 1733, 1557, 1561, 1739, 1740, 1697, 1741, 1742, 1746, 1705, + /* 410 */ 1748, 1750, 1751, 1758, 1760, 1762, 1763, 1764, 1614, 1743, + /* 420 */ 1767, 1624, 1779, 1780, 1783, 1784, 1785, 1788, 1790, 1791, + /* 430 */ 1792, 1793, 1794, 1795, 1798, 1799, 1800, 1765, 1804, 1805, + /* 440 */ 1806, 1808, 1809, 1789, 1810, 1813, 1814, 1679, 1818, 1827, + /* 450 */ 1796, 1828, 1771, 1833, 1777, 1836, 1837, 1797, 1801, 1802, + /* 460 */ 1803, 1824, 1807, 1829, 1811, 1841, 1812, 1821, 1844, 1845, + /* 470 */ 1848, 1822, 1681, 1851, 1857, 1868, 1825, 1870, 1871, 1839, + /* 480 */ 1830, 1838, 1875, 1850, 1840, 1852, 1890, 1858, 1846, 1853, + /* 490 */ 1896, 1862, 1855, 1859, 1899, 1901, 1905, 1906, 1815, 1819, + /* 500 */ 1872, 1886, 1909, 1876, 1878, 1879, 1881, 1866, 1874, 1888, + /* 510 */ 1891, 1893, 1892, 1921, 1908, 1928, 1916, 1894, 1931, 1918, + /* 520 */ 1910, 1943, 1912, 1948, 1922, 1958, 1937, 1940, 1926, 1927, + /* 530 */ 1772, 1867, 1873, 1966, 1817, 1936, 1973, 1832, 1952, 1826, + /* 540 */ 1816, 1975, 1976, 1831, 1842, 1974, 1934, 1730, 1887, 1889, + /* 550 */ 1895, 1897, 1944, 1902, 1900, 1913, 1929, 1911, 1945, 1979, + /* 560 */ 1980, 1935, 1985, 1823, 1941, 1942, 1989, 1988, 1834, 1998, + /* 570 */ 1999, 2002, 2006, 2007, 2014, 1954, 1955, 2008, 1843, 2010, + /* 580 */ 2009, 2058, 2059, 2068, 1977, 1972, 1978, 1981, 1984, 1903, + /* 590 */ 1986, 2071, 2037, 1919, 1991, 1982, 1803, 2038, 2045, 1864, + /* 600 */ 1860, 1865, 2089, 2073, 1904, 2000, 2003, 2005, 2022, 2011, + /* 610 */ 2023, 2050, 2025, 2027, 2051, 2029, 2077, 1898, 2031, 1995, + /* 620 */ 2032, 2070, 2093, 2034, 2035, 2096, 2039, 2040, 2099, 2043, + /* 630 */ 2044, 2101, 2046, 2047, 2108, 2052, 1983, 2026, 2030, 2033, + /* 640 */ 2127, 2054, 2056, 2116, 2069, 2129, 2072, 2116, 2116, 2144, + /* 650 */ 2105, 2115, 2145, 2146, 2147, 2148, 2150, 2151, 2152, 2155, + /* 660 */ 2157, 2158, 2109, 2102, 2153, 2159, 2161, 2176, 2164, 2178, + /* 670 */ 2166, 2167, 2168, 2134, 1866, 2171, 1874, 2172, 2173, 2174, + /* 680 */ 2175, 2189, 2177, 2213, 2180, 2169, 2181, 2216, 2194, 2182, + /* 690 */ 2192, 2233, 2200, 2190, 2198, 2239, 2205, 2193, 2203, 2243, + /* 700 */ 2210, 2211, 2247, 2226, 2229, 2230, 2231, 2234, 2236, }; #define YY_REDUCE_COUNT (290) #define YY_REDUCE_MIN (-422) @@ -805,105 +804,105 @@ static const short yy_reduce_ofst[] = { /* 10 */ 880, 923, 951, 994, 333, 1012, 1055, 1108, 1129, 1183, /* 20 */ 1237, 40, 1254, 1308, 442, 1280, 1351, 1367, 1418, 1461, /* 30 */ 1478, 1531, 1548, 1599, 1616, 1642, 1659, 1710, 1753, 1769, - /* 40 */ 1820, 1863, 1880, 1933, 1950, 2001, -34, 350, 240, -340, - /* 50 */ 666, 1098, 1109, 1350, 776, 1189, 1070, 1083, -422, -326, - /* 60 */ -269, -410, -287, -206, -163, -328, -321, -350, -352, -26, - /* 70 */ 122, -307, -28, 163, 166, 174, 229, 239, 361, 362, - /* 80 */ 452, 46, 508, 621, -251, 639, 48, 706, 741, 177, - /* 90 */ 757, 786, 146, 847, 178, 152, 287, 509, -108, -299, - /* 100 */ -221, -221, -338, -207, -27, 172, 194, 322, 332, 375, - /* 110 */ 405, 462, 465, 466, 469, 480, 483, 529, 550, 627, - /* 120 */ 628, 630, 641, -33, -303, 275, -101, 271, -48, -303, - /* 130 */ 383, 474, 356, 302, 306, 25, -222, 64, 409, 380, - /* 140 */ 624, 562, 368, 609, 686, 638, 683, 689, 493, 143, - /* 150 */ 157, 203, 233, 241, 366, 429, 14, 556, 481, 317, - /* 160 */ 522, 565, 702, 633, 775, 775, 812, 772, 903, 905, - /* 170 */ 873, 860, 860, 842, 860, 885, 878, 775, 934, 939, - /* 180 */ 954, 970, 969, 984, 993, 1041, 1042, 1001, 1004, 1005, - /* 190 */ 1045, 1049, 1054, 1057, 1067, 1078, 1018, 1082, 1052, 1086, - /* 200 */ 1095, 1046, 1091, 1097, 1096, 1101, 1104, 1103, 1111, 1112, - /* 210 */ 1115, 1117, 1090, 1118, 1120, 1130, 1132, 1133, 1136, 1139, - /* 220 */ 1140, 1141, 1143, 1122, 1144, 1069, 1121, 1080, 1113, 1125, - /* 230 */ 1127, 1147, 1168, 1170, 1142, 1145, 1138, 1146, 1137, 1157, - /* 240 */ 1153, 1156, 1159, 1172, 775, 1119, 1126, 1155, 1158, 1123, - /* 250 */ 1148, 1176, 1124, 1149, 1151, 860, 1214, 1202, 1263, 1269, - /* 260 */ 1260, 1222, 1238, 1240, 1242, 1251, 1252, 1244, 1253, 1247, - /* 270 */ 1287, 1276, 1293, 1270, 1228, 1294, 1278, 1304, 1320, 1324, - /* 280 */ 1337, 1339, 1279, 1281, 1306, 1307, 1318, 1321, 1325, 1332, - /* 290 */ 1357, + /* 40 */ 1820, 1863, 1880, 1933, 1950, 2001, -34, -345, 103, -342, + /* 50 */ 91, 862, 1109, 1350, 815, 1013, -258, 1024, -422, -266, + /* 60 */ 641, -410, -52, -235, -29, -328, -257, -263, -206, 99, + /* 70 */ 122, -307, -163, 107, 208, 226, 229, 300, 303, 310, + /* 80 */ 312, 213, 315, 344, 317, 362, -365, 444, 452, -320, + /* 90 */ 502, 619, -219, 640, 367, 188, 425, 723, -185, -125, + /* 100 */ -409, -409, 84, -330, -234, 8, 59, 128, 145, 194, + /* 110 */ 232, 327, 347, 405, 472, 529, 603, 628, 690, 717, + /* 120 */ 727, 728, 751, -26, 47, -322, -175, -88, 191, 47, + /* 130 */ 588, 590, 48, 372, 567, 211, 235, 714, 715, -290, + /* 140 */ 584, 85, 635, 705, -285, 722, 743, 453, 759, -355, + /* 150 */ 387, 495, 507, 513, 521, 597, 662, 767, 786, 765, + /* 160 */ 752, 783, 893, 803, 910, 910, 938, 889, 943, 912, + /* 170 */ 927, 881, 881, 864, 881, 918, 901, 910, 952, 956, + /* 180 */ 977, 1002, 1000, 1010, 1020, 1075, 1076, 1036, 1056, 1057, + /* 190 */ 1088, 1102, 1112, 1113, 1120, 1121, 1059, 1123, 1080, 1128, + /* 200 */ 1134, 1085, 1135, 1142, 1144, 1145, 1147, 1149, 1148, 1152, + /* 210 */ 1153, 1151, 1136, 1141, 1159, 1161, 1163, 1164, 1165, 1168, + /* 220 */ 1170, 1173, 1182, 1157, 1174, 1122, 1126, 1110, 1114, 1167, + /* 230 */ 1132, 1154, 1204, 1185, 1171, 1178, 1138, 1105, 1176, 1175, + /* 240 */ 1146, 1177, 1179, 1180, 910, 1125, 1127, 1158, 1137, 1186, + /* 250 */ 1156, 1196, 1124, 1150, 1160, 881, 1230, 1202, 1266, 1269, + /* 260 */ 1267, 1225, 1242, 1243, 1245, 1248, 1250, 1231, 1251, 1246, + /* 270 */ 1285, 1272, 1295, 1263, 1212, 1274, 1277, 1304, 1314, 1316, + /* 280 */ 1337, 1334, 1278, 1271, 1284, 1287, 1318, 1321, 1323, 1342, + /* 290 */ 1352, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 10 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 20 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 30 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 40 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 50 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 60 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1849, 1592, 1592, - /* 70 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 80 */ 1592, 1670, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 90 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1668, 1842, - /* 100 */ 2039, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 110 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 120 */ 1592, 1592, 1592, 1592, 2051, 1592, 1592, 1670, 1592, 2051, - /* 130 */ 2051, 2051, 1668, 2011, 2011, 1592, 1592, 1592, 1592, 1779, - /* 140 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1779, 1592, 1592, - /* 150 */ 1592, 1592, 1592, 1592, 1592, 1592, 1886, 1592, 1592, 2076, - /* 160 */ 2129, 1592, 1592, 2079, 1592, 1592, 1592, 1854, 1592, 1732, - /* 170 */ 2066, 2043, 2057, 2113, 2044, 2041, 2060, 1592, 2070, 1592, - /* 180 */ 1879, 1847, 1592, 1847, 1844, 1592, 1592, 1847, 1844, 1844, - /* 190 */ 1723, 1592, 1592, 1592, 1592, 1592, 1592, 1670, 1592, 1670, - /* 200 */ 1592, 1592, 1670, 1592, 1670, 1670, 1670, 1592, 1670, 1649, - /* 210 */ 1649, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 220 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1899, 1592, 1668, - /* 230 */ 1888, 1592, 1668, 1592, 1592, 1592, 1592, 2086, 2084, 1592, - /* 240 */ 2086, 2084, 1592, 1592, 1592, 2098, 2094, 2086, 2102, 2100, - /* 250 */ 2072, 2070, 2132, 2119, 2115, 2057, 1592, 1592, 1592, 1592, - /* 260 */ 1668, 2084, 1592, 1592, 1592, 1592, 1592, 2084, 1592, 1592, - /* 270 */ 1668, 1592, 1668, 1592, 1592, 1748, 1592, 1592, 1592, 1668, - /* 280 */ 1624, 1592, 1881, 1892, 1864, 1864, 1782, 1782, 1782, 1671, - /* 290 */ 1597, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 300 */ 1592, 1592, 1592, 2097, 2096, 1967, 1592, 2015, 2014, 2013, - /* 310 */ 2004, 1966, 1744, 1592, 1965, 1964, 1592, 1592, 1592, 1592, - /* 320 */ 1592, 1860, 1859, 1958, 1592, 1592, 1959, 1957, 1956, 1592, - /* 330 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 340 */ 1592, 1592, 1592, 1592, 1592, 1592, 2116, 2120, 1592, 1592, - /* 350 */ 1592, 1592, 1592, 1592, 2040, 1592, 1592, 1592, 1592, 1592, - /* 360 */ 1941, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 370 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 380 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 390 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 400 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 410 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 420 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 430 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 440 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 450 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1629, - /* 460 */ 1946, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 470 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 480 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 490 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 500 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1710, 1709, - /* 510 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 520 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 530 */ 1592, 1592, 1949, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 540 */ 1592, 1592, 1592, 1592, 1592, 1592, 2112, 2073, 1592, 1592, - /* 550 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 560 */ 1592, 1941, 1592, 2095, 1592, 1592, 2110, 1592, 2114, 1592, - /* 570 */ 1592, 1592, 1592, 1592, 1592, 1592, 2050, 2046, 1592, 1592, - /* 580 */ 2042, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 590 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1940, 1592, 2001, - /* 600 */ 1592, 1592, 1592, 2035, 1592, 1592, 1986, 1592, 1592, 1592, - /* 610 */ 1592, 1592, 1592, 1592, 1592, 1592, 1949, 1592, 1952, 1592, - /* 620 */ 1592, 1592, 1592, 1592, 1776, 1592, 1592, 1592, 1592, 1592, - /* 630 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1761, 1759, 1758, - /* 640 */ 1757, 1592, 1754, 1592, 1789, 1592, 1592, 1592, 1785, 1784, - /* 650 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 660 */ 1592, 1592, 1592, 1592, 1592, 1690, 1592, 1592, 1592, 1592, - /* 670 */ 1592, 1592, 1592, 1592, 1592, 1681, 1592, 1680, 1592, 1592, - /* 680 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 690 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, - /* 700 */ 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592, + /* 0 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 10 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 20 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 30 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 40 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 50 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 60 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1845, 1589, 1589, + /* 70 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 80 */ 1589, 1667, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 90 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1665, 1838, + /* 100 */ 2035, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 110 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 120 */ 1589, 1589, 1589, 1589, 2047, 1589, 1589, 1667, 1589, 2047, + /* 130 */ 2047, 2047, 1665, 2007, 2007, 1589, 1589, 1589, 1589, 1775, + /* 140 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1775, 1589, 1589, + /* 150 */ 1589, 1589, 1589, 1589, 1589, 1589, 1882, 1589, 1589, 2072, + /* 160 */ 2125, 1589, 1589, 2075, 1589, 1589, 1589, 1850, 1589, 1728, + /* 170 */ 2062, 2039, 2053, 2109, 2040, 2037, 2056, 1589, 2066, 1589, + /* 180 */ 1875, 1843, 1589, 1843, 1840, 1589, 1589, 1843, 1840, 1840, + /* 190 */ 1719, 1589, 1589, 1589, 1589, 1589, 1589, 1667, 1589, 1667, + /* 200 */ 1589, 1589, 1667, 1589, 1667, 1667, 1667, 1589, 1667, 1646, + /* 210 */ 1646, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 220 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1895, 1589, 1665, + /* 230 */ 1884, 1589, 1665, 1589, 1589, 1589, 1589, 2082, 2080, 1589, + /* 240 */ 2082, 2080, 1589, 1589, 1589, 2094, 2090, 2082, 2098, 2096, + /* 250 */ 2068, 2066, 2128, 2115, 2111, 2053, 1589, 1589, 1589, 1589, + /* 260 */ 1665, 2080, 1589, 1589, 1589, 1589, 1589, 2080, 1589, 1589, + /* 270 */ 1665, 1589, 1665, 1589, 1589, 1744, 1589, 1589, 1589, 1665, + /* 280 */ 1621, 1589, 1877, 1888, 1860, 1860, 1778, 1778, 1778, 1668, + /* 290 */ 1594, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 300 */ 1589, 1589, 1589, 2093, 2092, 1963, 1589, 2011, 2010, 2009, + /* 310 */ 2000, 1962, 1740, 1589, 1961, 1960, 1589, 1589, 1589, 1589, + /* 320 */ 1589, 1856, 1855, 1954, 1589, 1589, 1955, 1953, 1952, 1589, + /* 330 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 340 */ 1589, 1589, 1589, 1589, 1589, 1589, 2112, 2116, 1589, 1589, + /* 350 */ 1589, 1589, 1589, 1589, 2036, 1589, 1589, 1589, 1589, 1589, + /* 360 */ 1937, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 370 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 380 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 390 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 400 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 410 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 420 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 430 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 440 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 450 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1626, + /* 460 */ 1942, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 470 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 480 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 490 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 500 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1707, 1706, 1589, + /* 510 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 520 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 530 */ 1589, 1945, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 540 */ 1589, 1589, 1589, 1589, 1589, 2108, 2069, 1589, 1589, 1589, + /* 550 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 560 */ 1937, 1589, 2091, 1589, 1589, 2106, 1589, 2110, 1589, 1589, + /* 570 */ 1589, 1589, 1589, 1589, 1589, 2046, 2042, 1589, 1589, 2038, + /* 580 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 590 */ 1589, 1589, 1589, 1589, 1589, 1589, 1936, 1589, 1997, 1589, + /* 600 */ 1589, 1589, 2031, 1589, 1589, 1982, 1589, 1589, 1589, 1589, + /* 610 */ 1589, 1589, 1589, 1589, 1589, 1945, 1589, 1948, 1589, 1589, + /* 620 */ 1589, 1589, 1589, 1772, 1589, 1589, 1589, 1589, 1589, 1589, + /* 630 */ 1589, 1589, 1589, 1589, 1589, 1589, 1757, 1755, 1754, 1753, + /* 640 */ 1589, 1750, 1589, 1785, 1589, 1589, 1589, 1781, 1780, 1589, + /* 650 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 660 */ 1589, 1589, 1589, 1589, 1687, 1589, 1589, 1589, 1589, 1589, + /* 670 */ 1589, 1589, 1589, 1589, 1678, 1589, 1677, 1589, 1589, 1589, + /* 680 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 690 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, + /* 700 */ 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, 1589, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1914,428 +1913,427 @@ static const char *const yyRuleName[] = { /* 115 */ "alter_db_option ::= KEEP variable_list", /* 116 */ "alter_db_option ::= PAGES NK_INTEGER", /* 117 */ "alter_db_option ::= REPLICA NK_INTEGER", - /* 118 */ "alter_db_option ::= STRICT NK_STRING", - /* 119 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", - /* 120 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", - /* 121 */ "integer_list ::= NK_INTEGER", - /* 122 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", - /* 123 */ "variable_list ::= NK_VARIABLE", - /* 124 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", - /* 125 */ "retention_list ::= retention", - /* 126 */ "retention_list ::= retention_list NK_COMMA retention", - /* 127 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", - /* 128 */ "speed_opt ::=", - /* 129 */ "speed_opt ::= MAX_SPEED NK_INTEGER", - /* 130 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 131 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 132 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 133 */ "cmd ::= DROP TABLE multi_drop_clause", - /* 134 */ "cmd ::= DROP STABLE exists_opt full_table_name", - /* 135 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 136 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 137 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 138 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", - /* 139 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 140 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 141 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 142 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 143 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 144 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 145 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 146 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", - /* 147 */ "multi_create_clause ::= create_subtable_clause", - /* 148 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 149 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options", - /* 150 */ "multi_drop_clause ::= drop_table_clause", - /* 151 */ "multi_drop_clause ::= multi_drop_clause drop_table_clause", - /* 152 */ "drop_table_clause ::= exists_opt full_table_name", - /* 153 */ "specific_cols_opt ::=", - /* 154 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 155 */ "full_table_name ::= table_name", - /* 156 */ "full_table_name ::= db_name NK_DOT table_name", - /* 157 */ "column_def_list ::= column_def", - /* 158 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 159 */ "column_def ::= column_name type_name", - /* 160 */ "column_def ::= column_name type_name COMMENT NK_STRING", - /* 161 */ "type_name ::= BOOL", - /* 162 */ "type_name ::= TINYINT", - /* 163 */ "type_name ::= SMALLINT", - /* 164 */ "type_name ::= INT", - /* 165 */ "type_name ::= INTEGER", - /* 166 */ "type_name ::= BIGINT", - /* 167 */ "type_name ::= FLOAT", - /* 168 */ "type_name ::= DOUBLE", - /* 169 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 170 */ "type_name ::= TIMESTAMP", - /* 171 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 172 */ "type_name ::= TINYINT UNSIGNED", - /* 173 */ "type_name ::= SMALLINT UNSIGNED", - /* 174 */ "type_name ::= INT UNSIGNED", - /* 175 */ "type_name ::= BIGINT UNSIGNED", - /* 176 */ "type_name ::= JSON", - /* 177 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 178 */ "type_name ::= MEDIUMBLOB", - /* 179 */ "type_name ::= BLOB", - /* 180 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 181 */ "type_name ::= DECIMAL", - /* 182 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 183 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 184 */ "tags_def_opt ::=", - /* 185 */ "tags_def_opt ::= tags_def", - /* 186 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", - /* 187 */ "table_options ::=", - /* 188 */ "table_options ::= table_options COMMENT NK_STRING", - /* 189 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 190 */ "table_options ::= table_options WATERMARK duration_list", - /* 191 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 192 */ "table_options ::= table_options TTL NK_INTEGER", - /* 193 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 194 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 195 */ "alter_table_options ::= alter_table_option", - /* 196 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 197 */ "alter_table_option ::= COMMENT NK_STRING", - /* 198 */ "alter_table_option ::= TTL NK_INTEGER", - /* 199 */ "duration_list ::= duration_literal", - /* 200 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 201 */ "rollup_func_list ::= rollup_func_name", - /* 202 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 203 */ "rollup_func_name ::= function_name", - /* 204 */ "rollup_func_name ::= FIRST", - /* 205 */ "rollup_func_name ::= LAST", - /* 206 */ "col_name_list ::= col_name", - /* 207 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 208 */ "col_name ::= column_name", - /* 209 */ "cmd ::= SHOW DNODES", - /* 210 */ "cmd ::= SHOW USERS", - /* 211 */ "cmd ::= SHOW USER PRIVILEGES", - /* 212 */ "cmd ::= SHOW DATABASES", - /* 213 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", - /* 214 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 215 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 216 */ "cmd ::= SHOW MNODES", - /* 217 */ "cmd ::= SHOW QNODES", - /* 218 */ "cmd ::= SHOW FUNCTIONS", - /* 219 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 220 */ "cmd ::= SHOW STREAMS", - /* 221 */ "cmd ::= SHOW ACCOUNTS", - /* 222 */ "cmd ::= SHOW APPS", - /* 223 */ "cmd ::= SHOW CONNECTIONS", - /* 224 */ "cmd ::= SHOW LICENCES", - /* 225 */ "cmd ::= SHOW GRANTS", - /* 226 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 227 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 228 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 229 */ "cmd ::= SHOW QUERIES", - /* 230 */ "cmd ::= SHOW SCORES", - /* 231 */ "cmd ::= SHOW TOPICS", - /* 232 */ "cmd ::= SHOW VARIABLES", - /* 233 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 234 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 235 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 236 */ "cmd ::= SHOW BNODES", - /* 237 */ "cmd ::= SHOW SNODES", - /* 238 */ "cmd ::= SHOW CLUSTER", - /* 239 */ "cmd ::= SHOW TRANSACTIONS", - /* 240 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 241 */ "cmd ::= SHOW CONSUMERS", - /* 242 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 243 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 244 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 245 */ "cmd ::= SHOW VNODES NK_INTEGER", - /* 246 */ "cmd ::= SHOW VNODES NK_STRING", - /* 247 */ "db_name_cond_opt ::=", - /* 248 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 249 */ "like_pattern_opt ::=", - /* 250 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 251 */ "table_name_cond ::= table_name", - /* 252 */ "from_db_opt ::=", - /* 253 */ "from_db_opt ::= FROM db_name", - /* 254 */ "tag_list_opt ::=", - /* 255 */ "tag_list_opt ::= tag_item", - /* 256 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 257 */ "tag_item ::= TBNAME", - /* 258 */ "tag_item ::= QTAGS", - /* 259 */ "tag_item ::= column_name", - /* 260 */ "tag_item ::= column_name column_alias", - /* 261 */ "tag_item ::= column_name AS column_alias", - /* 262 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options", - /* 263 */ "cmd ::= DROP INDEX exists_opt full_table_name", - /* 264 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 265 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt", - /* 266 */ "func_list ::= func", - /* 267 */ "func_list ::= func_list NK_COMMA func", - /* 268 */ "func ::= function_name NK_LP expression_list NK_RP", - /* 269 */ "sma_stream_opt ::=", - /* 270 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 271 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 272 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 273 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 274 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", - /* 275 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", - /* 276 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", - /* 277 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", - /* 278 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 279 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 280 */ "cmd ::= DESC full_table_name", - /* 281 */ "cmd ::= DESCRIBE full_table_name", - /* 282 */ "cmd ::= RESET QUERY CACHE", - /* 283 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 284 */ "analyze_opt ::=", - /* 285 */ "analyze_opt ::= ANALYZE", - /* 286 */ "explain_options ::=", - /* 287 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 288 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 289 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 290 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 291 */ "agg_func_opt ::=", - /* 292 */ "agg_func_opt ::= AGGREGATE", - /* 293 */ "bufsize_opt ::=", - /* 294 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 295 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery", - /* 296 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 297 */ "stream_options ::=", - /* 298 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 299 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 300 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 301 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 302 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 303 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 304 */ "subtable_opt ::=", - /* 305 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 306 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 307 */ "cmd ::= KILL QUERY NK_STRING", - /* 308 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 309 */ "cmd ::= BALANCE VGROUP", - /* 310 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 311 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 312 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 313 */ "dnode_list ::= DNODE NK_INTEGER", - /* 314 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 315 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 316 */ "cmd ::= query_or_subquery", - /* 317 */ "cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 318 */ "cmd ::= INSERT INTO full_table_name query_or_subquery", - /* 319 */ "literal ::= NK_INTEGER", - /* 320 */ "literal ::= NK_FLOAT", - /* 321 */ "literal ::= NK_STRING", - /* 322 */ "literal ::= NK_BOOL", - /* 323 */ "literal ::= TIMESTAMP NK_STRING", - /* 324 */ "literal ::= duration_literal", - /* 325 */ "literal ::= NULL", - /* 326 */ "literal ::= NK_QUESTION", - /* 327 */ "duration_literal ::= NK_VARIABLE", - /* 328 */ "signed ::= NK_INTEGER", - /* 329 */ "signed ::= NK_PLUS NK_INTEGER", - /* 330 */ "signed ::= NK_MINUS NK_INTEGER", - /* 331 */ "signed ::= NK_FLOAT", - /* 332 */ "signed ::= NK_PLUS NK_FLOAT", - /* 333 */ "signed ::= NK_MINUS NK_FLOAT", - /* 334 */ "signed_literal ::= signed", - /* 335 */ "signed_literal ::= NK_STRING", - /* 336 */ "signed_literal ::= NK_BOOL", - /* 337 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 338 */ "signed_literal ::= duration_literal", - /* 339 */ "signed_literal ::= NULL", - /* 340 */ "signed_literal ::= literal_func", - /* 341 */ "signed_literal ::= NK_QUESTION", - /* 342 */ "literal_list ::= signed_literal", - /* 343 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 344 */ "db_name ::= NK_ID", - /* 345 */ "table_name ::= NK_ID", - /* 346 */ "column_name ::= NK_ID", - /* 347 */ "function_name ::= NK_ID", - /* 348 */ "table_alias ::= NK_ID", - /* 349 */ "column_alias ::= NK_ID", - /* 350 */ "user_name ::= NK_ID", - /* 351 */ "topic_name ::= NK_ID", - /* 352 */ "stream_name ::= NK_ID", - /* 353 */ "cgroup_name ::= NK_ID", - /* 354 */ "expr_or_subquery ::= expression", - /* 355 */ "expression ::= literal", - /* 356 */ "expression ::= pseudo_column", - /* 357 */ "expression ::= column_reference", - /* 358 */ "expression ::= function_expression", - /* 359 */ "expression ::= case_when_expression", - /* 360 */ "expression ::= NK_LP expression NK_RP", - /* 361 */ "expression ::= NK_PLUS expr_or_subquery", - /* 362 */ "expression ::= NK_MINUS expr_or_subquery", - /* 363 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 364 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 365 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 366 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 367 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 368 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 369 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 370 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 371 */ "expression_list ::= expr_or_subquery", - /* 372 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 373 */ "column_reference ::= column_name", - /* 374 */ "column_reference ::= table_name NK_DOT column_name", - /* 375 */ "pseudo_column ::= ROWTS", - /* 376 */ "pseudo_column ::= TBNAME", - /* 377 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 378 */ "pseudo_column ::= QSTART", - /* 379 */ "pseudo_column ::= QEND", - /* 380 */ "pseudo_column ::= QDURATION", - /* 381 */ "pseudo_column ::= WSTART", - /* 382 */ "pseudo_column ::= WEND", - /* 383 */ "pseudo_column ::= WDURATION", - /* 384 */ "pseudo_column ::= IROWTS", - /* 385 */ "pseudo_column ::= QTAGS", - /* 386 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 387 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 388 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 389 */ "function_expression ::= literal_func", - /* 390 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 391 */ "literal_func ::= NOW", - /* 392 */ "noarg_func ::= NOW", - /* 393 */ "noarg_func ::= TODAY", - /* 394 */ "noarg_func ::= TIMEZONE", - /* 395 */ "noarg_func ::= DATABASE", - /* 396 */ "noarg_func ::= CLIENT_VERSION", - /* 397 */ "noarg_func ::= SERVER_VERSION", - /* 398 */ "noarg_func ::= SERVER_STATUS", - /* 399 */ "noarg_func ::= CURRENT_USER", - /* 400 */ "noarg_func ::= USER", - /* 401 */ "star_func ::= COUNT", - /* 402 */ "star_func ::= FIRST", - /* 403 */ "star_func ::= LAST", - /* 404 */ "star_func ::= LAST_ROW", - /* 405 */ "star_func_para_list ::= NK_STAR", - /* 406 */ "star_func_para_list ::= other_para_list", - /* 407 */ "other_para_list ::= star_func_para", - /* 408 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 409 */ "star_func_para ::= expr_or_subquery", - /* 410 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 411 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 412 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 413 */ "when_then_list ::= when_then_expr", - /* 414 */ "when_then_list ::= when_then_list when_then_expr", - /* 415 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 416 */ "case_when_else_opt ::=", - /* 417 */ "case_when_else_opt ::= ELSE common_expression", - /* 418 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 419 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 420 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 421 */ "predicate ::= expr_or_subquery IS NULL", - /* 422 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 423 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 424 */ "compare_op ::= NK_LT", - /* 425 */ "compare_op ::= NK_GT", - /* 426 */ "compare_op ::= NK_LE", - /* 427 */ "compare_op ::= NK_GE", - /* 428 */ "compare_op ::= NK_NE", - /* 429 */ "compare_op ::= NK_EQ", - /* 430 */ "compare_op ::= LIKE", - /* 431 */ "compare_op ::= NOT LIKE", - /* 432 */ "compare_op ::= MATCH", - /* 433 */ "compare_op ::= NMATCH", - /* 434 */ "compare_op ::= CONTAINS", - /* 435 */ "in_op ::= IN", - /* 436 */ "in_op ::= NOT IN", - /* 437 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 438 */ "boolean_value_expression ::= boolean_primary", - /* 439 */ "boolean_value_expression ::= NOT boolean_primary", - /* 440 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 441 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 442 */ "boolean_primary ::= predicate", - /* 443 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 444 */ "common_expression ::= expr_or_subquery", - /* 445 */ "common_expression ::= boolean_value_expression", - /* 446 */ "from_clause_opt ::=", - /* 447 */ "from_clause_opt ::= FROM table_reference_list", - /* 448 */ "table_reference_list ::= table_reference", - /* 449 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 450 */ "table_reference ::= table_primary", - /* 451 */ "table_reference ::= joined_table", - /* 452 */ "table_primary ::= table_name alias_opt", - /* 453 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 454 */ "table_primary ::= subquery alias_opt", - /* 455 */ "table_primary ::= parenthesized_joined_table", - /* 456 */ "alias_opt ::=", - /* 457 */ "alias_opt ::= table_alias", - /* 458 */ "alias_opt ::= AS table_alias", - /* 459 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 460 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 461 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 462 */ "join_type ::=", - /* 463 */ "join_type ::= INNER", - /* 464 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 465 */ "set_quantifier_opt ::=", - /* 466 */ "set_quantifier_opt ::= DISTINCT", - /* 467 */ "set_quantifier_opt ::= ALL", - /* 468 */ "select_list ::= select_item", - /* 469 */ "select_list ::= select_list NK_COMMA select_item", - /* 470 */ "select_item ::= NK_STAR", - /* 471 */ "select_item ::= common_expression", - /* 472 */ "select_item ::= common_expression column_alias", - /* 473 */ "select_item ::= common_expression AS column_alias", - /* 474 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 475 */ "where_clause_opt ::=", - /* 476 */ "where_clause_opt ::= WHERE search_condition", - /* 477 */ "partition_by_clause_opt ::=", - /* 478 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 479 */ "partition_list ::= partition_item", - /* 480 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 481 */ "partition_item ::= expr_or_subquery", - /* 482 */ "partition_item ::= expr_or_subquery column_alias", - /* 483 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 484 */ "twindow_clause_opt ::=", - /* 485 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 486 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 487 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 488 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 489 */ "sliding_opt ::=", - /* 490 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 491 */ "fill_opt ::=", - /* 492 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 493 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 494 */ "fill_mode ::= NONE", - /* 495 */ "fill_mode ::= PREV", - /* 496 */ "fill_mode ::= NULL", - /* 497 */ "fill_mode ::= LINEAR", - /* 498 */ "fill_mode ::= NEXT", - /* 499 */ "group_by_clause_opt ::=", - /* 500 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 501 */ "group_by_list ::= expr_or_subquery", - /* 502 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 503 */ "having_clause_opt ::=", - /* 504 */ "having_clause_opt ::= HAVING search_condition", - /* 505 */ "range_opt ::=", - /* 506 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 507 */ "every_opt ::=", - /* 508 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 509 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 510 */ "query_simple ::= query_specification", - /* 511 */ "query_simple ::= union_query_expression", - /* 512 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 513 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 514 */ "query_simple_or_subquery ::= query_simple", - /* 515 */ "query_simple_or_subquery ::= subquery", - /* 516 */ "query_or_subquery ::= query_expression", - /* 517 */ "query_or_subquery ::= subquery", - /* 518 */ "order_by_clause_opt ::=", - /* 519 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 520 */ "slimit_clause_opt ::=", - /* 521 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 522 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 523 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 524 */ "limit_clause_opt ::=", - /* 525 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 526 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 527 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 528 */ "subquery ::= NK_LP query_expression NK_RP", - /* 529 */ "subquery ::= NK_LP subquery NK_RP", - /* 530 */ "search_condition ::= common_expression", - /* 531 */ "sort_specification_list ::= sort_specification", - /* 532 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 533 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 534 */ "ordering_specification_opt ::=", - /* 535 */ "ordering_specification_opt ::= ASC", - /* 536 */ "ordering_specification_opt ::= DESC", - /* 537 */ "null_ordering_opt ::=", - /* 538 */ "null_ordering_opt ::= NULLS FIRST", - /* 539 */ "null_ordering_opt ::= NULLS LAST", + /* 118 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", + /* 119 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", + /* 120 */ "integer_list ::= NK_INTEGER", + /* 121 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", + /* 122 */ "variable_list ::= NK_VARIABLE", + /* 123 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", + /* 124 */ "retention_list ::= retention", + /* 125 */ "retention_list ::= retention_list NK_COMMA retention", + /* 126 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", + /* 127 */ "speed_opt ::=", + /* 128 */ "speed_opt ::= MAX_SPEED NK_INTEGER", + /* 129 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 130 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 131 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 132 */ "cmd ::= DROP TABLE multi_drop_clause", + /* 133 */ "cmd ::= DROP STABLE exists_opt full_table_name", + /* 134 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 135 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 136 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 137 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", + /* 138 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 139 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 140 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 141 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 142 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 143 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 144 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 145 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", + /* 146 */ "multi_create_clause ::= create_subtable_clause", + /* 147 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 148 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options", + /* 149 */ "multi_drop_clause ::= drop_table_clause", + /* 150 */ "multi_drop_clause ::= multi_drop_clause drop_table_clause", + /* 151 */ "drop_table_clause ::= exists_opt full_table_name", + /* 152 */ "specific_cols_opt ::=", + /* 153 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 154 */ "full_table_name ::= table_name", + /* 155 */ "full_table_name ::= db_name NK_DOT table_name", + /* 156 */ "column_def_list ::= column_def", + /* 157 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 158 */ "column_def ::= column_name type_name", + /* 159 */ "column_def ::= column_name type_name COMMENT NK_STRING", + /* 160 */ "type_name ::= BOOL", + /* 161 */ "type_name ::= TINYINT", + /* 162 */ "type_name ::= SMALLINT", + /* 163 */ "type_name ::= INT", + /* 164 */ "type_name ::= INTEGER", + /* 165 */ "type_name ::= BIGINT", + /* 166 */ "type_name ::= FLOAT", + /* 167 */ "type_name ::= DOUBLE", + /* 168 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 169 */ "type_name ::= TIMESTAMP", + /* 170 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 171 */ "type_name ::= TINYINT UNSIGNED", + /* 172 */ "type_name ::= SMALLINT UNSIGNED", + /* 173 */ "type_name ::= INT UNSIGNED", + /* 174 */ "type_name ::= BIGINT UNSIGNED", + /* 175 */ "type_name ::= JSON", + /* 176 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 177 */ "type_name ::= MEDIUMBLOB", + /* 178 */ "type_name ::= BLOB", + /* 179 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 180 */ "type_name ::= DECIMAL", + /* 181 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 182 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 183 */ "tags_def_opt ::=", + /* 184 */ "tags_def_opt ::= tags_def", + /* 185 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", + /* 186 */ "table_options ::=", + /* 187 */ "table_options ::= table_options COMMENT NK_STRING", + /* 188 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 189 */ "table_options ::= table_options WATERMARK duration_list", + /* 190 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 191 */ "table_options ::= table_options TTL NK_INTEGER", + /* 192 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 193 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 194 */ "alter_table_options ::= alter_table_option", + /* 195 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 196 */ "alter_table_option ::= COMMENT NK_STRING", + /* 197 */ "alter_table_option ::= TTL NK_INTEGER", + /* 198 */ "duration_list ::= duration_literal", + /* 199 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 200 */ "rollup_func_list ::= rollup_func_name", + /* 201 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 202 */ "rollup_func_name ::= function_name", + /* 203 */ "rollup_func_name ::= FIRST", + /* 204 */ "rollup_func_name ::= LAST", + /* 205 */ "col_name_list ::= col_name", + /* 206 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 207 */ "col_name ::= column_name", + /* 208 */ "cmd ::= SHOW DNODES", + /* 209 */ "cmd ::= SHOW USERS", + /* 210 */ "cmd ::= SHOW USER PRIVILEGES", + /* 211 */ "cmd ::= SHOW DATABASES", + /* 212 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", + /* 213 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 214 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 215 */ "cmd ::= SHOW MNODES", + /* 216 */ "cmd ::= SHOW QNODES", + /* 217 */ "cmd ::= SHOW FUNCTIONS", + /* 218 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 219 */ "cmd ::= SHOW STREAMS", + /* 220 */ "cmd ::= SHOW ACCOUNTS", + /* 221 */ "cmd ::= SHOW APPS", + /* 222 */ "cmd ::= SHOW CONNECTIONS", + /* 223 */ "cmd ::= SHOW LICENCES", + /* 224 */ "cmd ::= SHOW GRANTS", + /* 225 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 226 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 227 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 228 */ "cmd ::= SHOW QUERIES", + /* 229 */ "cmd ::= SHOW SCORES", + /* 230 */ "cmd ::= SHOW TOPICS", + /* 231 */ "cmd ::= SHOW VARIABLES", + /* 232 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 233 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 234 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 235 */ "cmd ::= SHOW BNODES", + /* 236 */ "cmd ::= SHOW SNODES", + /* 237 */ "cmd ::= SHOW CLUSTER", + /* 238 */ "cmd ::= SHOW TRANSACTIONS", + /* 239 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 240 */ "cmd ::= SHOW CONSUMERS", + /* 241 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 242 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 243 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 244 */ "cmd ::= SHOW VNODES NK_INTEGER", + /* 245 */ "cmd ::= SHOW VNODES NK_STRING", + /* 246 */ "db_name_cond_opt ::=", + /* 247 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 248 */ "like_pattern_opt ::=", + /* 249 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 250 */ "table_name_cond ::= table_name", + /* 251 */ "from_db_opt ::=", + /* 252 */ "from_db_opt ::= FROM db_name", + /* 253 */ "tag_list_opt ::=", + /* 254 */ "tag_list_opt ::= tag_item", + /* 255 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 256 */ "tag_item ::= TBNAME", + /* 257 */ "tag_item ::= QTAGS", + /* 258 */ "tag_item ::= column_name", + /* 259 */ "tag_item ::= column_name column_alias", + /* 260 */ "tag_item ::= column_name AS column_alias", + /* 261 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options", + /* 262 */ "cmd ::= DROP INDEX exists_opt full_table_name", + /* 263 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 264 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt", + /* 265 */ "func_list ::= func", + /* 266 */ "func_list ::= func_list NK_COMMA func", + /* 267 */ "func ::= function_name NK_LP expression_list NK_RP", + /* 268 */ "sma_stream_opt ::=", + /* 269 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 270 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 271 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 272 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 273 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", + /* 274 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", + /* 275 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", + /* 276 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", + /* 277 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 278 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 279 */ "cmd ::= DESC full_table_name", + /* 280 */ "cmd ::= DESCRIBE full_table_name", + /* 281 */ "cmd ::= RESET QUERY CACHE", + /* 282 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 283 */ "analyze_opt ::=", + /* 284 */ "analyze_opt ::= ANALYZE", + /* 285 */ "explain_options ::=", + /* 286 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 287 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 288 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 289 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 290 */ "agg_func_opt ::=", + /* 291 */ "agg_func_opt ::= AGGREGATE", + /* 292 */ "bufsize_opt ::=", + /* 293 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 294 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery", + /* 295 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 296 */ "stream_options ::=", + /* 297 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 298 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 299 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 300 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 301 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 302 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 303 */ "subtable_opt ::=", + /* 304 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 305 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 306 */ "cmd ::= KILL QUERY NK_STRING", + /* 307 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 308 */ "cmd ::= BALANCE VGROUP", + /* 309 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 310 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 311 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 312 */ "dnode_list ::= DNODE NK_INTEGER", + /* 313 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 314 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 315 */ "cmd ::= query_or_subquery", + /* 316 */ "cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 317 */ "cmd ::= INSERT INTO full_table_name query_or_subquery", + /* 318 */ "literal ::= NK_INTEGER", + /* 319 */ "literal ::= NK_FLOAT", + /* 320 */ "literal ::= NK_STRING", + /* 321 */ "literal ::= NK_BOOL", + /* 322 */ "literal ::= TIMESTAMP NK_STRING", + /* 323 */ "literal ::= duration_literal", + /* 324 */ "literal ::= NULL", + /* 325 */ "literal ::= NK_QUESTION", + /* 326 */ "duration_literal ::= NK_VARIABLE", + /* 327 */ "signed ::= NK_INTEGER", + /* 328 */ "signed ::= NK_PLUS NK_INTEGER", + /* 329 */ "signed ::= NK_MINUS NK_INTEGER", + /* 330 */ "signed ::= NK_FLOAT", + /* 331 */ "signed ::= NK_PLUS NK_FLOAT", + /* 332 */ "signed ::= NK_MINUS NK_FLOAT", + /* 333 */ "signed_literal ::= signed", + /* 334 */ "signed_literal ::= NK_STRING", + /* 335 */ "signed_literal ::= NK_BOOL", + /* 336 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 337 */ "signed_literal ::= duration_literal", + /* 338 */ "signed_literal ::= NULL", + /* 339 */ "signed_literal ::= literal_func", + /* 340 */ "signed_literal ::= NK_QUESTION", + /* 341 */ "literal_list ::= signed_literal", + /* 342 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 343 */ "db_name ::= NK_ID", + /* 344 */ "table_name ::= NK_ID", + /* 345 */ "column_name ::= NK_ID", + /* 346 */ "function_name ::= NK_ID", + /* 347 */ "table_alias ::= NK_ID", + /* 348 */ "column_alias ::= NK_ID", + /* 349 */ "user_name ::= NK_ID", + /* 350 */ "topic_name ::= NK_ID", + /* 351 */ "stream_name ::= NK_ID", + /* 352 */ "cgroup_name ::= NK_ID", + /* 353 */ "expr_or_subquery ::= expression", + /* 354 */ "expression ::= literal", + /* 355 */ "expression ::= pseudo_column", + /* 356 */ "expression ::= column_reference", + /* 357 */ "expression ::= function_expression", + /* 358 */ "expression ::= case_when_expression", + /* 359 */ "expression ::= NK_LP expression NK_RP", + /* 360 */ "expression ::= NK_PLUS expr_or_subquery", + /* 361 */ "expression ::= NK_MINUS expr_or_subquery", + /* 362 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 363 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 364 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 365 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 366 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 367 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 368 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 369 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 370 */ "expression_list ::= expr_or_subquery", + /* 371 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 372 */ "column_reference ::= column_name", + /* 373 */ "column_reference ::= table_name NK_DOT column_name", + /* 374 */ "pseudo_column ::= ROWTS", + /* 375 */ "pseudo_column ::= TBNAME", + /* 376 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 377 */ "pseudo_column ::= QSTART", + /* 378 */ "pseudo_column ::= QEND", + /* 379 */ "pseudo_column ::= QDURATION", + /* 380 */ "pseudo_column ::= WSTART", + /* 381 */ "pseudo_column ::= WEND", + /* 382 */ "pseudo_column ::= WDURATION", + /* 383 */ "pseudo_column ::= IROWTS", + /* 384 */ "pseudo_column ::= QTAGS", + /* 385 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 386 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 387 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 388 */ "function_expression ::= literal_func", + /* 389 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 390 */ "literal_func ::= NOW", + /* 391 */ "noarg_func ::= NOW", + /* 392 */ "noarg_func ::= TODAY", + /* 393 */ "noarg_func ::= TIMEZONE", + /* 394 */ "noarg_func ::= DATABASE", + /* 395 */ "noarg_func ::= CLIENT_VERSION", + /* 396 */ "noarg_func ::= SERVER_VERSION", + /* 397 */ "noarg_func ::= SERVER_STATUS", + /* 398 */ "noarg_func ::= CURRENT_USER", + /* 399 */ "noarg_func ::= USER", + /* 400 */ "star_func ::= COUNT", + /* 401 */ "star_func ::= FIRST", + /* 402 */ "star_func ::= LAST", + /* 403 */ "star_func ::= LAST_ROW", + /* 404 */ "star_func_para_list ::= NK_STAR", + /* 405 */ "star_func_para_list ::= other_para_list", + /* 406 */ "other_para_list ::= star_func_para", + /* 407 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 408 */ "star_func_para ::= expr_or_subquery", + /* 409 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 410 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 411 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 412 */ "when_then_list ::= when_then_expr", + /* 413 */ "when_then_list ::= when_then_list when_then_expr", + /* 414 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 415 */ "case_when_else_opt ::=", + /* 416 */ "case_when_else_opt ::= ELSE common_expression", + /* 417 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 418 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 419 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 420 */ "predicate ::= expr_or_subquery IS NULL", + /* 421 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 422 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 423 */ "compare_op ::= NK_LT", + /* 424 */ "compare_op ::= NK_GT", + /* 425 */ "compare_op ::= NK_LE", + /* 426 */ "compare_op ::= NK_GE", + /* 427 */ "compare_op ::= NK_NE", + /* 428 */ "compare_op ::= NK_EQ", + /* 429 */ "compare_op ::= LIKE", + /* 430 */ "compare_op ::= NOT LIKE", + /* 431 */ "compare_op ::= MATCH", + /* 432 */ "compare_op ::= NMATCH", + /* 433 */ "compare_op ::= CONTAINS", + /* 434 */ "in_op ::= IN", + /* 435 */ "in_op ::= NOT IN", + /* 436 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 437 */ "boolean_value_expression ::= boolean_primary", + /* 438 */ "boolean_value_expression ::= NOT boolean_primary", + /* 439 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 440 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 441 */ "boolean_primary ::= predicate", + /* 442 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 443 */ "common_expression ::= expr_or_subquery", + /* 444 */ "common_expression ::= boolean_value_expression", + /* 445 */ "from_clause_opt ::=", + /* 446 */ "from_clause_opt ::= FROM table_reference_list", + /* 447 */ "table_reference_list ::= table_reference", + /* 448 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 449 */ "table_reference ::= table_primary", + /* 450 */ "table_reference ::= joined_table", + /* 451 */ "table_primary ::= table_name alias_opt", + /* 452 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 453 */ "table_primary ::= subquery alias_opt", + /* 454 */ "table_primary ::= parenthesized_joined_table", + /* 455 */ "alias_opt ::=", + /* 456 */ "alias_opt ::= table_alias", + /* 457 */ "alias_opt ::= AS table_alias", + /* 458 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 459 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 460 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 461 */ "join_type ::=", + /* 462 */ "join_type ::= INNER", + /* 463 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 464 */ "set_quantifier_opt ::=", + /* 465 */ "set_quantifier_opt ::= DISTINCT", + /* 466 */ "set_quantifier_opt ::= ALL", + /* 467 */ "select_list ::= select_item", + /* 468 */ "select_list ::= select_list NK_COMMA select_item", + /* 469 */ "select_item ::= NK_STAR", + /* 470 */ "select_item ::= common_expression", + /* 471 */ "select_item ::= common_expression column_alias", + /* 472 */ "select_item ::= common_expression AS column_alias", + /* 473 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 474 */ "where_clause_opt ::=", + /* 475 */ "where_clause_opt ::= WHERE search_condition", + /* 476 */ "partition_by_clause_opt ::=", + /* 477 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 478 */ "partition_list ::= partition_item", + /* 479 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 480 */ "partition_item ::= expr_or_subquery", + /* 481 */ "partition_item ::= expr_or_subquery column_alias", + /* 482 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 483 */ "twindow_clause_opt ::=", + /* 484 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 485 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 486 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 487 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 488 */ "sliding_opt ::=", + /* 489 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 490 */ "fill_opt ::=", + /* 491 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 492 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 493 */ "fill_mode ::= NONE", + /* 494 */ "fill_mode ::= PREV", + /* 495 */ "fill_mode ::= NULL", + /* 496 */ "fill_mode ::= LINEAR", + /* 497 */ "fill_mode ::= NEXT", + /* 498 */ "group_by_clause_opt ::=", + /* 499 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 500 */ "group_by_list ::= expr_or_subquery", + /* 501 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 502 */ "having_clause_opt ::=", + /* 503 */ "having_clause_opt ::= HAVING search_condition", + /* 504 */ "range_opt ::=", + /* 505 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 506 */ "every_opt ::=", + /* 507 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 508 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 509 */ "query_simple ::= query_specification", + /* 510 */ "query_simple ::= union_query_expression", + /* 511 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 512 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 513 */ "query_simple_or_subquery ::= query_simple", + /* 514 */ "query_simple_or_subquery ::= subquery", + /* 515 */ "query_or_subquery ::= query_expression", + /* 516 */ "query_or_subquery ::= subquery", + /* 517 */ "order_by_clause_opt ::=", + /* 518 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 519 */ "slimit_clause_opt ::=", + /* 520 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 521 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 522 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 523 */ "limit_clause_opt ::=", + /* 524 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 525 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 526 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 527 */ "subquery ::= NK_LP query_expression NK_RP", + /* 528 */ "subquery ::= NK_LP subquery NK_RP", + /* 529 */ "search_condition ::= common_expression", + /* 530 */ "sort_specification_list ::= sort_specification", + /* 531 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 532 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 533 */ "ordering_specification_opt ::=", + /* 534 */ "ordering_specification_opt ::= ASC", + /* 535 */ "ordering_specification_opt ::= DESC", + /* 536 */ "null_ordering_opt ::=", + /* 537 */ "null_ordering_opt ::= NULLS FIRST", + /* 538 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -3065,428 +3063,427 @@ static const struct { { 345, -2 }, /* (115) alter_db_option ::= KEEP variable_list */ { 345, -2 }, /* (116) alter_db_option ::= PAGES NK_INTEGER */ { 345, -2 }, /* (117) alter_db_option ::= REPLICA NK_INTEGER */ - { 345, -2 }, /* (118) alter_db_option ::= STRICT NK_STRING */ - { 345, -2 }, /* (119) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - { 345, -2 }, /* (120) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - { 342, -1 }, /* (121) integer_list ::= NK_INTEGER */ - { 342, -3 }, /* (122) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 343, -1 }, /* (123) variable_list ::= NK_VARIABLE */ - { 343, -3 }, /* (124) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 344, -1 }, /* (125) retention_list ::= retention */ - { 344, -3 }, /* (126) retention_list ::= retention_list NK_COMMA retention */ - { 346, -3 }, /* (127) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 341, 0 }, /* (128) speed_opt ::= */ - { 341, -2 }, /* (129) speed_opt ::= MAX_SPEED NK_INTEGER */ - { 322, -9 }, /* (130) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 322, -3 }, /* (131) cmd ::= CREATE TABLE multi_create_clause */ - { 322, -9 }, /* (132) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 322, -3 }, /* (133) cmd ::= DROP TABLE multi_drop_clause */ - { 322, -4 }, /* (134) cmd ::= DROP STABLE exists_opt full_table_name */ - { 322, -3 }, /* (135) cmd ::= ALTER TABLE alter_table_clause */ - { 322, -3 }, /* (136) cmd ::= ALTER STABLE alter_table_clause */ - { 354, -2 }, /* (137) alter_table_clause ::= full_table_name alter_table_options */ - { 354, -5 }, /* (138) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 354, -4 }, /* (139) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 354, -5 }, /* (140) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 354, -5 }, /* (141) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 354, -5 }, /* (142) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 354, -4 }, /* (143) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 354, -5 }, /* (144) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 354, -5 }, /* (145) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 354, -6 }, /* (146) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 351, -1 }, /* (147) multi_create_clause ::= create_subtable_clause */ - { 351, -2 }, /* (148) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 359, -10 }, /* (149) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ - { 353, -1 }, /* (150) multi_drop_clause ::= drop_table_clause */ - { 353, -2 }, /* (151) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 362, -2 }, /* (152) drop_table_clause ::= exists_opt full_table_name */ - { 360, 0 }, /* (153) specific_cols_opt ::= */ - { 360, -3 }, /* (154) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - { 347, -1 }, /* (155) full_table_name ::= table_name */ - { 347, -3 }, /* (156) full_table_name ::= db_name NK_DOT table_name */ - { 348, -1 }, /* (157) column_def_list ::= column_def */ - { 348, -3 }, /* (158) column_def_list ::= column_def_list NK_COMMA column_def */ - { 365, -2 }, /* (159) column_def ::= column_name type_name */ - { 365, -4 }, /* (160) column_def ::= column_name type_name COMMENT NK_STRING */ - { 357, -1 }, /* (161) type_name ::= BOOL */ - { 357, -1 }, /* (162) type_name ::= TINYINT */ - { 357, -1 }, /* (163) type_name ::= SMALLINT */ - { 357, -1 }, /* (164) type_name ::= INT */ - { 357, -1 }, /* (165) type_name ::= INTEGER */ - { 357, -1 }, /* (166) type_name ::= BIGINT */ - { 357, -1 }, /* (167) type_name ::= FLOAT */ - { 357, -1 }, /* (168) type_name ::= DOUBLE */ - { 357, -4 }, /* (169) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 357, -1 }, /* (170) type_name ::= TIMESTAMP */ - { 357, -4 }, /* (171) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 357, -2 }, /* (172) type_name ::= TINYINT UNSIGNED */ - { 357, -2 }, /* (173) type_name ::= SMALLINT UNSIGNED */ - { 357, -2 }, /* (174) type_name ::= INT UNSIGNED */ - { 357, -2 }, /* (175) type_name ::= BIGINT UNSIGNED */ - { 357, -1 }, /* (176) type_name ::= JSON */ - { 357, -4 }, /* (177) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 357, -1 }, /* (178) type_name ::= MEDIUMBLOB */ - { 357, -1 }, /* (179) type_name ::= BLOB */ - { 357, -4 }, /* (180) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 357, -1 }, /* (181) type_name ::= DECIMAL */ - { 357, -4 }, /* (182) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 357, -6 }, /* (183) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 349, 0 }, /* (184) tags_def_opt ::= */ - { 349, -1 }, /* (185) tags_def_opt ::= tags_def */ - { 352, -4 }, /* (186) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 350, 0 }, /* (187) table_options ::= */ - { 350, -3 }, /* (188) table_options ::= table_options COMMENT NK_STRING */ - { 350, -3 }, /* (189) table_options ::= table_options MAX_DELAY duration_list */ - { 350, -3 }, /* (190) table_options ::= table_options WATERMARK duration_list */ - { 350, -5 }, /* (191) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - { 350, -3 }, /* (192) table_options ::= table_options TTL NK_INTEGER */ - { 350, -5 }, /* (193) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 350, -3 }, /* (194) table_options ::= table_options DELETE_MARK duration_list */ - { 355, -1 }, /* (195) alter_table_options ::= alter_table_option */ - { 355, -2 }, /* (196) alter_table_options ::= alter_table_options alter_table_option */ - { 368, -2 }, /* (197) alter_table_option ::= COMMENT NK_STRING */ - { 368, -2 }, /* (198) alter_table_option ::= TTL NK_INTEGER */ - { 366, -1 }, /* (199) duration_list ::= duration_literal */ - { 366, -3 }, /* (200) duration_list ::= duration_list NK_COMMA duration_literal */ - { 367, -1 }, /* (201) rollup_func_list ::= rollup_func_name */ - { 367, -3 }, /* (202) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - { 370, -1 }, /* (203) rollup_func_name ::= function_name */ - { 370, -1 }, /* (204) rollup_func_name ::= FIRST */ - { 370, -1 }, /* (205) rollup_func_name ::= LAST */ - { 363, -1 }, /* (206) col_name_list ::= col_name */ - { 363, -3 }, /* (207) col_name_list ::= col_name_list NK_COMMA col_name */ - { 372, -1 }, /* (208) col_name ::= column_name */ - { 322, -2 }, /* (209) cmd ::= SHOW DNODES */ - { 322, -2 }, /* (210) cmd ::= SHOW USERS */ - { 322, -3 }, /* (211) cmd ::= SHOW USER PRIVILEGES */ - { 322, -2 }, /* (212) cmd ::= SHOW DATABASES */ - { 322, -4 }, /* (213) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 322, -4 }, /* (214) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 322, -3 }, /* (215) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 322, -2 }, /* (216) cmd ::= SHOW MNODES */ - { 322, -2 }, /* (217) cmd ::= SHOW QNODES */ - { 322, -2 }, /* (218) cmd ::= SHOW FUNCTIONS */ - { 322, -5 }, /* (219) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 322, -2 }, /* (220) cmd ::= SHOW STREAMS */ - { 322, -2 }, /* (221) cmd ::= SHOW ACCOUNTS */ - { 322, -2 }, /* (222) cmd ::= SHOW APPS */ - { 322, -2 }, /* (223) cmd ::= SHOW CONNECTIONS */ - { 322, -2 }, /* (224) cmd ::= SHOW LICENCES */ - { 322, -2 }, /* (225) cmd ::= SHOW GRANTS */ - { 322, -4 }, /* (226) cmd ::= SHOW CREATE DATABASE db_name */ - { 322, -4 }, /* (227) cmd ::= SHOW CREATE TABLE full_table_name */ - { 322, -4 }, /* (228) cmd ::= SHOW CREATE STABLE full_table_name */ - { 322, -2 }, /* (229) cmd ::= SHOW QUERIES */ - { 322, -2 }, /* (230) cmd ::= SHOW SCORES */ - { 322, -2 }, /* (231) cmd ::= SHOW TOPICS */ - { 322, -2 }, /* (232) cmd ::= SHOW VARIABLES */ - { 322, -3 }, /* (233) cmd ::= SHOW CLUSTER VARIABLES */ - { 322, -3 }, /* (234) cmd ::= SHOW LOCAL VARIABLES */ - { 322, -5 }, /* (235) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - { 322, -2 }, /* (236) cmd ::= SHOW BNODES */ - { 322, -2 }, /* (237) cmd ::= SHOW SNODES */ - { 322, -2 }, /* (238) cmd ::= SHOW CLUSTER */ - { 322, -2 }, /* (239) cmd ::= SHOW TRANSACTIONS */ - { 322, -4 }, /* (240) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - { 322, -2 }, /* (241) cmd ::= SHOW CONSUMERS */ - { 322, -2 }, /* (242) cmd ::= SHOW SUBSCRIPTIONS */ - { 322, -5 }, /* (243) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - { 322, -7 }, /* (244) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - { 322, -3 }, /* (245) cmd ::= SHOW VNODES NK_INTEGER */ - { 322, -3 }, /* (246) cmd ::= SHOW VNODES NK_STRING */ - { 373, 0 }, /* (247) db_name_cond_opt ::= */ - { 373, -2 }, /* (248) db_name_cond_opt ::= db_name NK_DOT */ - { 374, 0 }, /* (249) like_pattern_opt ::= */ - { 374, -2 }, /* (250) like_pattern_opt ::= LIKE NK_STRING */ - { 375, -1 }, /* (251) table_name_cond ::= table_name */ - { 376, 0 }, /* (252) from_db_opt ::= */ - { 376, -2 }, /* (253) from_db_opt ::= FROM db_name */ - { 377, 0 }, /* (254) tag_list_opt ::= */ - { 377, -1 }, /* (255) tag_list_opt ::= tag_item */ - { 377, -3 }, /* (256) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - { 378, -1 }, /* (257) tag_item ::= TBNAME */ - { 378, -1 }, /* (258) tag_item ::= QTAGS */ - { 378, -1 }, /* (259) tag_item ::= column_name */ - { 378, -2 }, /* (260) tag_item ::= column_name column_alias */ - { 378, -3 }, /* (261) tag_item ::= column_name AS column_alias */ - { 322, -8 }, /* (262) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ - { 322, -4 }, /* (263) cmd ::= DROP INDEX exists_opt full_table_name */ - { 380, -10 }, /* (264) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - { 380, -12 }, /* (265) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ - { 381, -1 }, /* (266) func_list ::= func */ - { 381, -3 }, /* (267) func_list ::= func_list NK_COMMA func */ - { 384, -4 }, /* (268) func ::= function_name NK_LP expression_list NK_RP */ - { 383, 0 }, /* (269) sma_stream_opt ::= */ - { 383, -3 }, /* (270) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - { 383, -3 }, /* (271) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - { 383, -3 }, /* (272) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - { 322, -6 }, /* (273) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - { 322, -7 }, /* (274) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 322, -9 }, /* (275) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ - { 322, -7 }, /* (276) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 322, -9 }, /* (277) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ - { 322, -4 }, /* (278) cmd ::= DROP TOPIC exists_opt topic_name */ - { 322, -7 }, /* (279) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 322, -2 }, /* (280) cmd ::= DESC full_table_name */ - { 322, -2 }, /* (281) cmd ::= DESCRIBE full_table_name */ - { 322, -3 }, /* (282) cmd ::= RESET QUERY CACHE */ - { 322, -4 }, /* (283) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - { 387, 0 }, /* (284) analyze_opt ::= */ - { 387, -1 }, /* (285) analyze_opt ::= ANALYZE */ - { 388, 0 }, /* (286) explain_options ::= */ - { 388, -3 }, /* (287) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 388, -3 }, /* (288) explain_options ::= explain_options RATIO NK_FLOAT */ - { 322, -10 }, /* (289) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 322, -4 }, /* (290) cmd ::= DROP FUNCTION exists_opt function_name */ - { 389, 0 }, /* (291) agg_func_opt ::= */ - { 389, -1 }, /* (292) agg_func_opt ::= AGGREGATE */ - { 390, 0 }, /* (293) bufsize_opt ::= */ - { 390, -2 }, /* (294) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 322, -11 }, /* (295) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ - { 322, -4 }, /* (296) cmd ::= DROP STREAM exists_opt stream_name */ - { 392, 0 }, /* (297) stream_options ::= */ - { 392, -3 }, /* (298) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 392, -3 }, /* (299) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 392, -4 }, /* (300) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - { 392, -3 }, /* (301) stream_options ::= stream_options WATERMARK duration_literal */ - { 392, -4 }, /* (302) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - { 392, -3 }, /* (303) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - { 393, 0 }, /* (304) subtable_opt ::= */ - { 393, -4 }, /* (305) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - { 322, -3 }, /* (306) cmd ::= KILL CONNECTION NK_INTEGER */ - { 322, -3 }, /* (307) cmd ::= KILL QUERY NK_STRING */ - { 322, -3 }, /* (308) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 322, -2 }, /* (309) cmd ::= BALANCE VGROUP */ - { 322, -4 }, /* (310) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 322, -4 }, /* (311) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 322, -3 }, /* (312) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 395, -2 }, /* (313) dnode_list ::= DNODE NK_INTEGER */ - { 395, -3 }, /* (314) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 322, -4 }, /* (315) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 322, -1 }, /* (316) cmd ::= query_or_subquery */ - { 322, -7 }, /* (317) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - { 322, -4 }, /* (318) cmd ::= INSERT INTO full_table_name query_or_subquery */ - { 325, -1 }, /* (319) literal ::= NK_INTEGER */ - { 325, -1 }, /* (320) literal ::= NK_FLOAT */ - { 325, -1 }, /* (321) literal ::= NK_STRING */ - { 325, -1 }, /* (322) literal ::= NK_BOOL */ - { 325, -2 }, /* (323) literal ::= TIMESTAMP NK_STRING */ - { 325, -1 }, /* (324) literal ::= duration_literal */ - { 325, -1 }, /* (325) literal ::= NULL */ - { 325, -1 }, /* (326) literal ::= NK_QUESTION */ - { 369, -1 }, /* (327) duration_literal ::= NK_VARIABLE */ - { 397, -1 }, /* (328) signed ::= NK_INTEGER */ - { 397, -2 }, /* (329) signed ::= NK_PLUS NK_INTEGER */ - { 397, -2 }, /* (330) signed ::= NK_MINUS NK_INTEGER */ - { 397, -1 }, /* (331) signed ::= NK_FLOAT */ - { 397, -2 }, /* (332) signed ::= NK_PLUS NK_FLOAT */ - { 397, -2 }, /* (333) signed ::= NK_MINUS NK_FLOAT */ - { 358, -1 }, /* (334) signed_literal ::= signed */ - { 358, -1 }, /* (335) signed_literal ::= NK_STRING */ - { 358, -1 }, /* (336) signed_literal ::= NK_BOOL */ - { 358, -2 }, /* (337) signed_literal ::= TIMESTAMP NK_STRING */ - { 358, -1 }, /* (338) signed_literal ::= duration_literal */ - { 358, -1 }, /* (339) signed_literal ::= NULL */ - { 358, -1 }, /* (340) signed_literal ::= literal_func */ - { 358, -1 }, /* (341) signed_literal ::= NK_QUESTION */ - { 399, -1 }, /* (342) literal_list ::= signed_literal */ - { 399, -3 }, /* (343) literal_list ::= literal_list NK_COMMA signed_literal */ - { 333, -1 }, /* (344) db_name ::= NK_ID */ - { 364, -1 }, /* (345) table_name ::= NK_ID */ - { 356, -1 }, /* (346) column_name ::= NK_ID */ - { 371, -1 }, /* (347) function_name ::= NK_ID */ - { 400, -1 }, /* (348) table_alias ::= NK_ID */ - { 379, -1 }, /* (349) column_alias ::= NK_ID */ - { 327, -1 }, /* (350) user_name ::= NK_ID */ - { 334, -1 }, /* (351) topic_name ::= NK_ID */ - { 391, -1 }, /* (352) stream_name ::= NK_ID */ - { 386, -1 }, /* (353) cgroup_name ::= NK_ID */ - { 401, -1 }, /* (354) expr_or_subquery ::= expression */ - { 394, -1 }, /* (355) expression ::= literal */ - { 394, -1 }, /* (356) expression ::= pseudo_column */ - { 394, -1 }, /* (357) expression ::= column_reference */ - { 394, -1 }, /* (358) expression ::= function_expression */ - { 394, -1 }, /* (359) expression ::= case_when_expression */ - { 394, -3 }, /* (360) expression ::= NK_LP expression NK_RP */ - { 394, -2 }, /* (361) expression ::= NK_PLUS expr_or_subquery */ - { 394, -2 }, /* (362) expression ::= NK_MINUS expr_or_subquery */ - { 394, -3 }, /* (363) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - { 394, -3 }, /* (364) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - { 394, -3 }, /* (365) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - { 394, -3 }, /* (366) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - { 394, -3 }, /* (367) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - { 394, -3 }, /* (368) expression ::= column_reference NK_ARROW NK_STRING */ - { 394, -3 }, /* (369) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - { 394, -3 }, /* (370) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - { 361, -1 }, /* (371) expression_list ::= expr_or_subquery */ - { 361, -3 }, /* (372) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - { 403, -1 }, /* (373) column_reference ::= column_name */ - { 403, -3 }, /* (374) column_reference ::= table_name NK_DOT column_name */ - { 402, -1 }, /* (375) pseudo_column ::= ROWTS */ - { 402, -1 }, /* (376) pseudo_column ::= TBNAME */ - { 402, -3 }, /* (377) pseudo_column ::= table_name NK_DOT TBNAME */ - { 402, -1 }, /* (378) pseudo_column ::= QSTART */ - { 402, -1 }, /* (379) pseudo_column ::= QEND */ - { 402, -1 }, /* (380) pseudo_column ::= QDURATION */ - { 402, -1 }, /* (381) pseudo_column ::= WSTART */ - { 402, -1 }, /* (382) pseudo_column ::= WEND */ - { 402, -1 }, /* (383) pseudo_column ::= WDURATION */ - { 402, -1 }, /* (384) pseudo_column ::= IROWTS */ - { 402, -1 }, /* (385) pseudo_column ::= QTAGS */ - { 404, -4 }, /* (386) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 404, -4 }, /* (387) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 404, -6 }, /* (388) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - { 404, -1 }, /* (389) function_expression ::= literal_func */ - { 398, -3 }, /* (390) literal_func ::= noarg_func NK_LP NK_RP */ - { 398, -1 }, /* (391) literal_func ::= NOW */ - { 408, -1 }, /* (392) noarg_func ::= NOW */ - { 408, -1 }, /* (393) noarg_func ::= TODAY */ - { 408, -1 }, /* (394) noarg_func ::= TIMEZONE */ - { 408, -1 }, /* (395) noarg_func ::= DATABASE */ - { 408, -1 }, /* (396) noarg_func ::= CLIENT_VERSION */ - { 408, -1 }, /* (397) noarg_func ::= SERVER_VERSION */ - { 408, -1 }, /* (398) noarg_func ::= SERVER_STATUS */ - { 408, -1 }, /* (399) noarg_func ::= CURRENT_USER */ - { 408, -1 }, /* (400) noarg_func ::= USER */ - { 406, -1 }, /* (401) star_func ::= COUNT */ - { 406, -1 }, /* (402) star_func ::= FIRST */ - { 406, -1 }, /* (403) star_func ::= LAST */ - { 406, -1 }, /* (404) star_func ::= LAST_ROW */ - { 407, -1 }, /* (405) star_func_para_list ::= NK_STAR */ - { 407, -1 }, /* (406) star_func_para_list ::= other_para_list */ - { 409, -1 }, /* (407) other_para_list ::= star_func_para */ - { 409, -3 }, /* (408) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 410, -1 }, /* (409) star_func_para ::= expr_or_subquery */ - { 410, -3 }, /* (410) star_func_para ::= table_name NK_DOT NK_STAR */ - { 405, -4 }, /* (411) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - { 405, -5 }, /* (412) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - { 411, -1 }, /* (413) when_then_list ::= when_then_expr */ - { 411, -2 }, /* (414) when_then_list ::= when_then_list when_then_expr */ - { 414, -4 }, /* (415) when_then_expr ::= WHEN common_expression THEN common_expression */ - { 412, 0 }, /* (416) case_when_else_opt ::= */ - { 412, -2 }, /* (417) case_when_else_opt ::= ELSE common_expression */ - { 415, -3 }, /* (418) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - { 415, -5 }, /* (419) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - { 415, -6 }, /* (420) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - { 415, -3 }, /* (421) predicate ::= expr_or_subquery IS NULL */ - { 415, -4 }, /* (422) predicate ::= expr_or_subquery IS NOT NULL */ - { 415, -3 }, /* (423) predicate ::= expr_or_subquery in_op in_predicate_value */ - { 416, -1 }, /* (424) compare_op ::= NK_LT */ - { 416, -1 }, /* (425) compare_op ::= NK_GT */ - { 416, -1 }, /* (426) compare_op ::= NK_LE */ - { 416, -1 }, /* (427) compare_op ::= NK_GE */ - { 416, -1 }, /* (428) compare_op ::= NK_NE */ - { 416, -1 }, /* (429) compare_op ::= NK_EQ */ - { 416, -1 }, /* (430) compare_op ::= LIKE */ - { 416, -2 }, /* (431) compare_op ::= NOT LIKE */ - { 416, -1 }, /* (432) compare_op ::= MATCH */ - { 416, -1 }, /* (433) compare_op ::= NMATCH */ - { 416, -1 }, /* (434) compare_op ::= CONTAINS */ - { 417, -1 }, /* (435) in_op ::= IN */ - { 417, -2 }, /* (436) in_op ::= NOT IN */ - { 418, -3 }, /* (437) in_predicate_value ::= NK_LP literal_list NK_RP */ - { 419, -1 }, /* (438) boolean_value_expression ::= boolean_primary */ - { 419, -2 }, /* (439) boolean_value_expression ::= NOT boolean_primary */ - { 419, -3 }, /* (440) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 419, -3 }, /* (441) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 420, -1 }, /* (442) boolean_primary ::= predicate */ - { 420, -3 }, /* (443) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 413, -1 }, /* (444) common_expression ::= expr_or_subquery */ - { 413, -1 }, /* (445) common_expression ::= boolean_value_expression */ - { 421, 0 }, /* (446) from_clause_opt ::= */ - { 421, -2 }, /* (447) from_clause_opt ::= FROM table_reference_list */ - { 422, -1 }, /* (448) table_reference_list ::= table_reference */ - { 422, -3 }, /* (449) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 423, -1 }, /* (450) table_reference ::= table_primary */ - { 423, -1 }, /* (451) table_reference ::= joined_table */ - { 424, -2 }, /* (452) table_primary ::= table_name alias_opt */ - { 424, -4 }, /* (453) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 424, -2 }, /* (454) table_primary ::= subquery alias_opt */ - { 424, -1 }, /* (455) table_primary ::= parenthesized_joined_table */ - { 426, 0 }, /* (456) alias_opt ::= */ - { 426, -1 }, /* (457) alias_opt ::= table_alias */ - { 426, -2 }, /* (458) alias_opt ::= AS table_alias */ - { 428, -3 }, /* (459) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 428, -3 }, /* (460) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 425, -6 }, /* (461) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 429, 0 }, /* (462) join_type ::= */ - { 429, -1 }, /* (463) join_type ::= INNER */ - { 431, -12 }, /* (464) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - { 432, 0 }, /* (465) set_quantifier_opt ::= */ - { 432, -1 }, /* (466) set_quantifier_opt ::= DISTINCT */ - { 432, -1 }, /* (467) set_quantifier_opt ::= ALL */ - { 433, -1 }, /* (468) select_list ::= select_item */ - { 433, -3 }, /* (469) select_list ::= select_list NK_COMMA select_item */ - { 441, -1 }, /* (470) select_item ::= NK_STAR */ - { 441, -1 }, /* (471) select_item ::= common_expression */ - { 441, -2 }, /* (472) select_item ::= common_expression column_alias */ - { 441, -3 }, /* (473) select_item ::= common_expression AS column_alias */ - { 441, -3 }, /* (474) select_item ::= table_name NK_DOT NK_STAR */ - { 396, 0 }, /* (475) where_clause_opt ::= */ - { 396, -2 }, /* (476) where_clause_opt ::= WHERE search_condition */ - { 434, 0 }, /* (477) partition_by_clause_opt ::= */ - { 434, -3 }, /* (478) partition_by_clause_opt ::= PARTITION BY partition_list */ - { 442, -1 }, /* (479) partition_list ::= partition_item */ - { 442, -3 }, /* (480) partition_list ::= partition_list NK_COMMA partition_item */ - { 443, -1 }, /* (481) partition_item ::= expr_or_subquery */ - { 443, -2 }, /* (482) partition_item ::= expr_or_subquery column_alias */ - { 443, -3 }, /* (483) partition_item ::= expr_or_subquery AS column_alias */ - { 438, 0 }, /* (484) twindow_clause_opt ::= */ - { 438, -6 }, /* (485) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 438, -4 }, /* (486) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - { 438, -6 }, /* (487) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 438, -8 }, /* (488) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 382, 0 }, /* (489) sliding_opt ::= */ - { 382, -4 }, /* (490) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 437, 0 }, /* (491) fill_opt ::= */ - { 437, -4 }, /* (492) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 437, -6 }, /* (493) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 444, -1 }, /* (494) fill_mode ::= NONE */ - { 444, -1 }, /* (495) fill_mode ::= PREV */ - { 444, -1 }, /* (496) fill_mode ::= NULL */ - { 444, -1 }, /* (497) fill_mode ::= LINEAR */ - { 444, -1 }, /* (498) fill_mode ::= NEXT */ - { 439, 0 }, /* (499) group_by_clause_opt ::= */ - { 439, -3 }, /* (500) group_by_clause_opt ::= GROUP BY group_by_list */ - { 445, -1 }, /* (501) group_by_list ::= expr_or_subquery */ - { 445, -3 }, /* (502) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - { 440, 0 }, /* (503) having_clause_opt ::= */ - { 440, -2 }, /* (504) having_clause_opt ::= HAVING search_condition */ - { 435, 0 }, /* (505) range_opt ::= */ - { 435, -6 }, /* (506) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - { 436, 0 }, /* (507) every_opt ::= */ - { 436, -4 }, /* (508) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - { 446, -4 }, /* (509) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 447, -1 }, /* (510) query_simple ::= query_specification */ - { 447, -1 }, /* (511) query_simple ::= union_query_expression */ - { 451, -4 }, /* (512) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - { 451, -3 }, /* (513) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - { 452, -1 }, /* (514) query_simple_or_subquery ::= query_simple */ - { 452, -1 }, /* (515) query_simple_or_subquery ::= subquery */ - { 385, -1 }, /* (516) query_or_subquery ::= query_expression */ - { 385, -1 }, /* (517) query_or_subquery ::= subquery */ - { 448, 0 }, /* (518) order_by_clause_opt ::= */ - { 448, -3 }, /* (519) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 449, 0 }, /* (520) slimit_clause_opt ::= */ - { 449, -2 }, /* (521) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 449, -4 }, /* (522) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 449, -4 }, /* (523) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 450, 0 }, /* (524) limit_clause_opt ::= */ - { 450, -2 }, /* (525) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 450, -4 }, /* (526) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 450, -4 }, /* (527) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 427, -3 }, /* (528) subquery ::= NK_LP query_expression NK_RP */ - { 427, -3 }, /* (529) subquery ::= NK_LP subquery NK_RP */ - { 430, -1 }, /* (530) search_condition ::= common_expression */ - { 453, -1 }, /* (531) sort_specification_list ::= sort_specification */ - { 453, -3 }, /* (532) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 454, -3 }, /* (533) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - { 455, 0 }, /* (534) ordering_specification_opt ::= */ - { 455, -1 }, /* (535) ordering_specification_opt ::= ASC */ - { 455, -1 }, /* (536) ordering_specification_opt ::= DESC */ - { 456, 0 }, /* (537) null_ordering_opt ::= */ - { 456, -2 }, /* (538) null_ordering_opt ::= NULLS FIRST */ - { 456, -2 }, /* (539) null_ordering_opt ::= NULLS LAST */ + { 345, -2 }, /* (118) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + { 345, -2 }, /* (119) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + { 342, -1 }, /* (120) integer_list ::= NK_INTEGER */ + { 342, -3 }, /* (121) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 343, -1 }, /* (122) variable_list ::= NK_VARIABLE */ + { 343, -3 }, /* (123) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 344, -1 }, /* (124) retention_list ::= retention */ + { 344, -3 }, /* (125) retention_list ::= retention_list NK_COMMA retention */ + { 346, -3 }, /* (126) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 341, 0 }, /* (127) speed_opt ::= */ + { 341, -2 }, /* (128) speed_opt ::= MAX_SPEED NK_INTEGER */ + { 322, -9 }, /* (129) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 322, -3 }, /* (130) cmd ::= CREATE TABLE multi_create_clause */ + { 322, -9 }, /* (131) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 322, -3 }, /* (132) cmd ::= DROP TABLE multi_drop_clause */ + { 322, -4 }, /* (133) cmd ::= DROP STABLE exists_opt full_table_name */ + { 322, -3 }, /* (134) cmd ::= ALTER TABLE alter_table_clause */ + { 322, -3 }, /* (135) cmd ::= ALTER STABLE alter_table_clause */ + { 354, -2 }, /* (136) alter_table_clause ::= full_table_name alter_table_options */ + { 354, -5 }, /* (137) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 354, -4 }, /* (138) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 354, -5 }, /* (139) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 354, -5 }, /* (140) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 354, -5 }, /* (141) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 354, -4 }, /* (142) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 354, -5 }, /* (143) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 354, -5 }, /* (144) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 354, -6 }, /* (145) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 351, -1 }, /* (146) multi_create_clause ::= create_subtable_clause */ + { 351, -2 }, /* (147) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 359, -10 }, /* (148) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ + { 353, -1 }, /* (149) multi_drop_clause ::= drop_table_clause */ + { 353, -2 }, /* (150) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 362, -2 }, /* (151) drop_table_clause ::= exists_opt full_table_name */ + { 360, 0 }, /* (152) specific_cols_opt ::= */ + { 360, -3 }, /* (153) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + { 347, -1 }, /* (154) full_table_name ::= table_name */ + { 347, -3 }, /* (155) full_table_name ::= db_name NK_DOT table_name */ + { 348, -1 }, /* (156) column_def_list ::= column_def */ + { 348, -3 }, /* (157) column_def_list ::= column_def_list NK_COMMA column_def */ + { 365, -2 }, /* (158) column_def ::= column_name type_name */ + { 365, -4 }, /* (159) column_def ::= column_name type_name COMMENT NK_STRING */ + { 357, -1 }, /* (160) type_name ::= BOOL */ + { 357, -1 }, /* (161) type_name ::= TINYINT */ + { 357, -1 }, /* (162) type_name ::= SMALLINT */ + { 357, -1 }, /* (163) type_name ::= INT */ + { 357, -1 }, /* (164) type_name ::= INTEGER */ + { 357, -1 }, /* (165) type_name ::= BIGINT */ + { 357, -1 }, /* (166) type_name ::= FLOAT */ + { 357, -1 }, /* (167) type_name ::= DOUBLE */ + { 357, -4 }, /* (168) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 357, -1 }, /* (169) type_name ::= TIMESTAMP */ + { 357, -4 }, /* (170) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 357, -2 }, /* (171) type_name ::= TINYINT UNSIGNED */ + { 357, -2 }, /* (172) type_name ::= SMALLINT UNSIGNED */ + { 357, -2 }, /* (173) type_name ::= INT UNSIGNED */ + { 357, -2 }, /* (174) type_name ::= BIGINT UNSIGNED */ + { 357, -1 }, /* (175) type_name ::= JSON */ + { 357, -4 }, /* (176) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 357, -1 }, /* (177) type_name ::= MEDIUMBLOB */ + { 357, -1 }, /* (178) type_name ::= BLOB */ + { 357, -4 }, /* (179) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 357, -1 }, /* (180) type_name ::= DECIMAL */ + { 357, -4 }, /* (181) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 357, -6 }, /* (182) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 349, 0 }, /* (183) tags_def_opt ::= */ + { 349, -1 }, /* (184) tags_def_opt ::= tags_def */ + { 352, -4 }, /* (185) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 350, 0 }, /* (186) table_options ::= */ + { 350, -3 }, /* (187) table_options ::= table_options COMMENT NK_STRING */ + { 350, -3 }, /* (188) table_options ::= table_options MAX_DELAY duration_list */ + { 350, -3 }, /* (189) table_options ::= table_options WATERMARK duration_list */ + { 350, -5 }, /* (190) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + { 350, -3 }, /* (191) table_options ::= table_options TTL NK_INTEGER */ + { 350, -5 }, /* (192) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 350, -3 }, /* (193) table_options ::= table_options DELETE_MARK duration_list */ + { 355, -1 }, /* (194) alter_table_options ::= alter_table_option */ + { 355, -2 }, /* (195) alter_table_options ::= alter_table_options alter_table_option */ + { 368, -2 }, /* (196) alter_table_option ::= COMMENT NK_STRING */ + { 368, -2 }, /* (197) alter_table_option ::= TTL NK_INTEGER */ + { 366, -1 }, /* (198) duration_list ::= duration_literal */ + { 366, -3 }, /* (199) duration_list ::= duration_list NK_COMMA duration_literal */ + { 367, -1 }, /* (200) rollup_func_list ::= rollup_func_name */ + { 367, -3 }, /* (201) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + { 370, -1 }, /* (202) rollup_func_name ::= function_name */ + { 370, -1 }, /* (203) rollup_func_name ::= FIRST */ + { 370, -1 }, /* (204) rollup_func_name ::= LAST */ + { 363, -1 }, /* (205) col_name_list ::= col_name */ + { 363, -3 }, /* (206) col_name_list ::= col_name_list NK_COMMA col_name */ + { 372, -1 }, /* (207) col_name ::= column_name */ + { 322, -2 }, /* (208) cmd ::= SHOW DNODES */ + { 322, -2 }, /* (209) cmd ::= SHOW USERS */ + { 322, -3 }, /* (210) cmd ::= SHOW USER PRIVILEGES */ + { 322, -2 }, /* (211) cmd ::= SHOW DATABASES */ + { 322, -4 }, /* (212) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 322, -4 }, /* (213) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 322, -3 }, /* (214) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 322, -2 }, /* (215) cmd ::= SHOW MNODES */ + { 322, -2 }, /* (216) cmd ::= SHOW QNODES */ + { 322, -2 }, /* (217) cmd ::= SHOW FUNCTIONS */ + { 322, -5 }, /* (218) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 322, -2 }, /* (219) cmd ::= SHOW STREAMS */ + { 322, -2 }, /* (220) cmd ::= SHOW ACCOUNTS */ + { 322, -2 }, /* (221) cmd ::= SHOW APPS */ + { 322, -2 }, /* (222) cmd ::= SHOW CONNECTIONS */ + { 322, -2 }, /* (223) cmd ::= SHOW LICENCES */ + { 322, -2 }, /* (224) cmd ::= SHOW GRANTS */ + { 322, -4 }, /* (225) cmd ::= SHOW CREATE DATABASE db_name */ + { 322, -4 }, /* (226) cmd ::= SHOW CREATE TABLE full_table_name */ + { 322, -4 }, /* (227) cmd ::= SHOW CREATE STABLE full_table_name */ + { 322, -2 }, /* (228) cmd ::= SHOW QUERIES */ + { 322, -2 }, /* (229) cmd ::= SHOW SCORES */ + { 322, -2 }, /* (230) cmd ::= SHOW TOPICS */ + { 322, -2 }, /* (231) cmd ::= SHOW VARIABLES */ + { 322, -3 }, /* (232) cmd ::= SHOW CLUSTER VARIABLES */ + { 322, -3 }, /* (233) cmd ::= SHOW LOCAL VARIABLES */ + { 322, -5 }, /* (234) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + { 322, -2 }, /* (235) cmd ::= SHOW BNODES */ + { 322, -2 }, /* (236) cmd ::= SHOW SNODES */ + { 322, -2 }, /* (237) cmd ::= SHOW CLUSTER */ + { 322, -2 }, /* (238) cmd ::= SHOW TRANSACTIONS */ + { 322, -4 }, /* (239) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + { 322, -2 }, /* (240) cmd ::= SHOW CONSUMERS */ + { 322, -2 }, /* (241) cmd ::= SHOW SUBSCRIPTIONS */ + { 322, -5 }, /* (242) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + { 322, -7 }, /* (243) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + { 322, -3 }, /* (244) cmd ::= SHOW VNODES NK_INTEGER */ + { 322, -3 }, /* (245) cmd ::= SHOW VNODES NK_STRING */ + { 373, 0 }, /* (246) db_name_cond_opt ::= */ + { 373, -2 }, /* (247) db_name_cond_opt ::= db_name NK_DOT */ + { 374, 0 }, /* (248) like_pattern_opt ::= */ + { 374, -2 }, /* (249) like_pattern_opt ::= LIKE NK_STRING */ + { 375, -1 }, /* (250) table_name_cond ::= table_name */ + { 376, 0 }, /* (251) from_db_opt ::= */ + { 376, -2 }, /* (252) from_db_opt ::= FROM db_name */ + { 377, 0 }, /* (253) tag_list_opt ::= */ + { 377, -1 }, /* (254) tag_list_opt ::= tag_item */ + { 377, -3 }, /* (255) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + { 378, -1 }, /* (256) tag_item ::= TBNAME */ + { 378, -1 }, /* (257) tag_item ::= QTAGS */ + { 378, -1 }, /* (258) tag_item ::= column_name */ + { 378, -2 }, /* (259) tag_item ::= column_name column_alias */ + { 378, -3 }, /* (260) tag_item ::= column_name AS column_alias */ + { 322, -8 }, /* (261) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ + { 322, -4 }, /* (262) cmd ::= DROP INDEX exists_opt full_table_name */ + { 380, -10 }, /* (263) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + { 380, -12 }, /* (264) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + { 381, -1 }, /* (265) func_list ::= func */ + { 381, -3 }, /* (266) func_list ::= func_list NK_COMMA func */ + { 384, -4 }, /* (267) func ::= function_name NK_LP expression_list NK_RP */ + { 383, 0 }, /* (268) sma_stream_opt ::= */ + { 383, -3 }, /* (269) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + { 383, -3 }, /* (270) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + { 383, -3 }, /* (271) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + { 322, -6 }, /* (272) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + { 322, -7 }, /* (273) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 322, -9 }, /* (274) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + { 322, -7 }, /* (275) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 322, -9 }, /* (276) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + { 322, -4 }, /* (277) cmd ::= DROP TOPIC exists_opt topic_name */ + { 322, -7 }, /* (278) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 322, -2 }, /* (279) cmd ::= DESC full_table_name */ + { 322, -2 }, /* (280) cmd ::= DESCRIBE full_table_name */ + { 322, -3 }, /* (281) cmd ::= RESET QUERY CACHE */ + { 322, -4 }, /* (282) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + { 387, 0 }, /* (283) analyze_opt ::= */ + { 387, -1 }, /* (284) analyze_opt ::= ANALYZE */ + { 388, 0 }, /* (285) explain_options ::= */ + { 388, -3 }, /* (286) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 388, -3 }, /* (287) explain_options ::= explain_options RATIO NK_FLOAT */ + { 322, -10 }, /* (288) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 322, -4 }, /* (289) cmd ::= DROP FUNCTION exists_opt function_name */ + { 389, 0 }, /* (290) agg_func_opt ::= */ + { 389, -1 }, /* (291) agg_func_opt ::= AGGREGATE */ + { 390, 0 }, /* (292) bufsize_opt ::= */ + { 390, -2 }, /* (293) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 322, -11 }, /* (294) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ + { 322, -4 }, /* (295) cmd ::= DROP STREAM exists_opt stream_name */ + { 392, 0 }, /* (296) stream_options ::= */ + { 392, -3 }, /* (297) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 392, -3 }, /* (298) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 392, -4 }, /* (299) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + { 392, -3 }, /* (300) stream_options ::= stream_options WATERMARK duration_literal */ + { 392, -4 }, /* (301) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + { 392, -3 }, /* (302) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + { 393, 0 }, /* (303) subtable_opt ::= */ + { 393, -4 }, /* (304) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + { 322, -3 }, /* (305) cmd ::= KILL CONNECTION NK_INTEGER */ + { 322, -3 }, /* (306) cmd ::= KILL QUERY NK_STRING */ + { 322, -3 }, /* (307) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 322, -2 }, /* (308) cmd ::= BALANCE VGROUP */ + { 322, -4 }, /* (309) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 322, -4 }, /* (310) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 322, -3 }, /* (311) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 395, -2 }, /* (312) dnode_list ::= DNODE NK_INTEGER */ + { 395, -3 }, /* (313) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 322, -4 }, /* (314) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 322, -1 }, /* (315) cmd ::= query_or_subquery */ + { 322, -7 }, /* (316) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + { 322, -4 }, /* (317) cmd ::= INSERT INTO full_table_name query_or_subquery */ + { 325, -1 }, /* (318) literal ::= NK_INTEGER */ + { 325, -1 }, /* (319) literal ::= NK_FLOAT */ + { 325, -1 }, /* (320) literal ::= NK_STRING */ + { 325, -1 }, /* (321) literal ::= NK_BOOL */ + { 325, -2 }, /* (322) literal ::= TIMESTAMP NK_STRING */ + { 325, -1 }, /* (323) literal ::= duration_literal */ + { 325, -1 }, /* (324) literal ::= NULL */ + { 325, -1 }, /* (325) literal ::= NK_QUESTION */ + { 369, -1 }, /* (326) duration_literal ::= NK_VARIABLE */ + { 397, -1 }, /* (327) signed ::= NK_INTEGER */ + { 397, -2 }, /* (328) signed ::= NK_PLUS NK_INTEGER */ + { 397, -2 }, /* (329) signed ::= NK_MINUS NK_INTEGER */ + { 397, -1 }, /* (330) signed ::= NK_FLOAT */ + { 397, -2 }, /* (331) signed ::= NK_PLUS NK_FLOAT */ + { 397, -2 }, /* (332) signed ::= NK_MINUS NK_FLOAT */ + { 358, -1 }, /* (333) signed_literal ::= signed */ + { 358, -1 }, /* (334) signed_literal ::= NK_STRING */ + { 358, -1 }, /* (335) signed_literal ::= NK_BOOL */ + { 358, -2 }, /* (336) signed_literal ::= TIMESTAMP NK_STRING */ + { 358, -1 }, /* (337) signed_literal ::= duration_literal */ + { 358, -1 }, /* (338) signed_literal ::= NULL */ + { 358, -1 }, /* (339) signed_literal ::= literal_func */ + { 358, -1 }, /* (340) signed_literal ::= NK_QUESTION */ + { 399, -1 }, /* (341) literal_list ::= signed_literal */ + { 399, -3 }, /* (342) literal_list ::= literal_list NK_COMMA signed_literal */ + { 333, -1 }, /* (343) db_name ::= NK_ID */ + { 364, -1 }, /* (344) table_name ::= NK_ID */ + { 356, -1 }, /* (345) column_name ::= NK_ID */ + { 371, -1 }, /* (346) function_name ::= NK_ID */ + { 400, -1 }, /* (347) table_alias ::= NK_ID */ + { 379, -1 }, /* (348) column_alias ::= NK_ID */ + { 327, -1 }, /* (349) user_name ::= NK_ID */ + { 334, -1 }, /* (350) topic_name ::= NK_ID */ + { 391, -1 }, /* (351) stream_name ::= NK_ID */ + { 386, -1 }, /* (352) cgroup_name ::= NK_ID */ + { 401, -1 }, /* (353) expr_or_subquery ::= expression */ + { 394, -1 }, /* (354) expression ::= literal */ + { 394, -1 }, /* (355) expression ::= pseudo_column */ + { 394, -1 }, /* (356) expression ::= column_reference */ + { 394, -1 }, /* (357) expression ::= function_expression */ + { 394, -1 }, /* (358) expression ::= case_when_expression */ + { 394, -3 }, /* (359) expression ::= NK_LP expression NK_RP */ + { 394, -2 }, /* (360) expression ::= NK_PLUS expr_or_subquery */ + { 394, -2 }, /* (361) expression ::= NK_MINUS expr_or_subquery */ + { 394, -3 }, /* (362) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + { 394, -3 }, /* (363) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + { 394, -3 }, /* (364) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + { 394, -3 }, /* (365) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + { 394, -3 }, /* (366) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + { 394, -3 }, /* (367) expression ::= column_reference NK_ARROW NK_STRING */ + { 394, -3 }, /* (368) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + { 394, -3 }, /* (369) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + { 361, -1 }, /* (370) expression_list ::= expr_or_subquery */ + { 361, -3 }, /* (371) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + { 403, -1 }, /* (372) column_reference ::= column_name */ + { 403, -3 }, /* (373) column_reference ::= table_name NK_DOT column_name */ + { 402, -1 }, /* (374) pseudo_column ::= ROWTS */ + { 402, -1 }, /* (375) pseudo_column ::= TBNAME */ + { 402, -3 }, /* (376) pseudo_column ::= table_name NK_DOT TBNAME */ + { 402, -1 }, /* (377) pseudo_column ::= QSTART */ + { 402, -1 }, /* (378) pseudo_column ::= QEND */ + { 402, -1 }, /* (379) pseudo_column ::= QDURATION */ + { 402, -1 }, /* (380) pseudo_column ::= WSTART */ + { 402, -1 }, /* (381) pseudo_column ::= WEND */ + { 402, -1 }, /* (382) pseudo_column ::= WDURATION */ + { 402, -1 }, /* (383) pseudo_column ::= IROWTS */ + { 402, -1 }, /* (384) pseudo_column ::= QTAGS */ + { 404, -4 }, /* (385) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 404, -4 }, /* (386) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 404, -6 }, /* (387) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + { 404, -1 }, /* (388) function_expression ::= literal_func */ + { 398, -3 }, /* (389) literal_func ::= noarg_func NK_LP NK_RP */ + { 398, -1 }, /* (390) literal_func ::= NOW */ + { 408, -1 }, /* (391) noarg_func ::= NOW */ + { 408, -1 }, /* (392) noarg_func ::= TODAY */ + { 408, -1 }, /* (393) noarg_func ::= TIMEZONE */ + { 408, -1 }, /* (394) noarg_func ::= DATABASE */ + { 408, -1 }, /* (395) noarg_func ::= CLIENT_VERSION */ + { 408, -1 }, /* (396) noarg_func ::= SERVER_VERSION */ + { 408, -1 }, /* (397) noarg_func ::= SERVER_STATUS */ + { 408, -1 }, /* (398) noarg_func ::= CURRENT_USER */ + { 408, -1 }, /* (399) noarg_func ::= USER */ + { 406, -1 }, /* (400) star_func ::= COUNT */ + { 406, -1 }, /* (401) star_func ::= FIRST */ + { 406, -1 }, /* (402) star_func ::= LAST */ + { 406, -1 }, /* (403) star_func ::= LAST_ROW */ + { 407, -1 }, /* (404) star_func_para_list ::= NK_STAR */ + { 407, -1 }, /* (405) star_func_para_list ::= other_para_list */ + { 409, -1 }, /* (406) other_para_list ::= star_func_para */ + { 409, -3 }, /* (407) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 410, -1 }, /* (408) star_func_para ::= expr_or_subquery */ + { 410, -3 }, /* (409) star_func_para ::= table_name NK_DOT NK_STAR */ + { 405, -4 }, /* (410) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + { 405, -5 }, /* (411) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + { 411, -1 }, /* (412) when_then_list ::= when_then_expr */ + { 411, -2 }, /* (413) when_then_list ::= when_then_list when_then_expr */ + { 414, -4 }, /* (414) when_then_expr ::= WHEN common_expression THEN common_expression */ + { 412, 0 }, /* (415) case_when_else_opt ::= */ + { 412, -2 }, /* (416) case_when_else_opt ::= ELSE common_expression */ + { 415, -3 }, /* (417) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + { 415, -5 }, /* (418) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + { 415, -6 }, /* (419) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + { 415, -3 }, /* (420) predicate ::= expr_or_subquery IS NULL */ + { 415, -4 }, /* (421) predicate ::= expr_or_subquery IS NOT NULL */ + { 415, -3 }, /* (422) predicate ::= expr_or_subquery in_op in_predicate_value */ + { 416, -1 }, /* (423) compare_op ::= NK_LT */ + { 416, -1 }, /* (424) compare_op ::= NK_GT */ + { 416, -1 }, /* (425) compare_op ::= NK_LE */ + { 416, -1 }, /* (426) compare_op ::= NK_GE */ + { 416, -1 }, /* (427) compare_op ::= NK_NE */ + { 416, -1 }, /* (428) compare_op ::= NK_EQ */ + { 416, -1 }, /* (429) compare_op ::= LIKE */ + { 416, -2 }, /* (430) compare_op ::= NOT LIKE */ + { 416, -1 }, /* (431) compare_op ::= MATCH */ + { 416, -1 }, /* (432) compare_op ::= NMATCH */ + { 416, -1 }, /* (433) compare_op ::= CONTAINS */ + { 417, -1 }, /* (434) in_op ::= IN */ + { 417, -2 }, /* (435) in_op ::= NOT IN */ + { 418, -3 }, /* (436) in_predicate_value ::= NK_LP literal_list NK_RP */ + { 419, -1 }, /* (437) boolean_value_expression ::= boolean_primary */ + { 419, -2 }, /* (438) boolean_value_expression ::= NOT boolean_primary */ + { 419, -3 }, /* (439) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 419, -3 }, /* (440) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 420, -1 }, /* (441) boolean_primary ::= predicate */ + { 420, -3 }, /* (442) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 413, -1 }, /* (443) common_expression ::= expr_or_subquery */ + { 413, -1 }, /* (444) common_expression ::= boolean_value_expression */ + { 421, 0 }, /* (445) from_clause_opt ::= */ + { 421, -2 }, /* (446) from_clause_opt ::= FROM table_reference_list */ + { 422, -1 }, /* (447) table_reference_list ::= table_reference */ + { 422, -3 }, /* (448) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 423, -1 }, /* (449) table_reference ::= table_primary */ + { 423, -1 }, /* (450) table_reference ::= joined_table */ + { 424, -2 }, /* (451) table_primary ::= table_name alias_opt */ + { 424, -4 }, /* (452) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 424, -2 }, /* (453) table_primary ::= subquery alias_opt */ + { 424, -1 }, /* (454) table_primary ::= parenthesized_joined_table */ + { 426, 0 }, /* (455) alias_opt ::= */ + { 426, -1 }, /* (456) alias_opt ::= table_alias */ + { 426, -2 }, /* (457) alias_opt ::= AS table_alias */ + { 428, -3 }, /* (458) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 428, -3 }, /* (459) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 425, -6 }, /* (460) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 429, 0 }, /* (461) join_type ::= */ + { 429, -1 }, /* (462) join_type ::= INNER */ + { 431, -12 }, /* (463) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + { 432, 0 }, /* (464) set_quantifier_opt ::= */ + { 432, -1 }, /* (465) set_quantifier_opt ::= DISTINCT */ + { 432, -1 }, /* (466) set_quantifier_opt ::= ALL */ + { 433, -1 }, /* (467) select_list ::= select_item */ + { 433, -3 }, /* (468) select_list ::= select_list NK_COMMA select_item */ + { 441, -1 }, /* (469) select_item ::= NK_STAR */ + { 441, -1 }, /* (470) select_item ::= common_expression */ + { 441, -2 }, /* (471) select_item ::= common_expression column_alias */ + { 441, -3 }, /* (472) select_item ::= common_expression AS column_alias */ + { 441, -3 }, /* (473) select_item ::= table_name NK_DOT NK_STAR */ + { 396, 0 }, /* (474) where_clause_opt ::= */ + { 396, -2 }, /* (475) where_clause_opt ::= WHERE search_condition */ + { 434, 0 }, /* (476) partition_by_clause_opt ::= */ + { 434, -3 }, /* (477) partition_by_clause_opt ::= PARTITION BY partition_list */ + { 442, -1 }, /* (478) partition_list ::= partition_item */ + { 442, -3 }, /* (479) partition_list ::= partition_list NK_COMMA partition_item */ + { 443, -1 }, /* (480) partition_item ::= expr_or_subquery */ + { 443, -2 }, /* (481) partition_item ::= expr_or_subquery column_alias */ + { 443, -3 }, /* (482) partition_item ::= expr_or_subquery AS column_alias */ + { 438, 0 }, /* (483) twindow_clause_opt ::= */ + { 438, -6 }, /* (484) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 438, -4 }, /* (485) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + { 438, -6 }, /* (486) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 438, -8 }, /* (487) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 382, 0 }, /* (488) sliding_opt ::= */ + { 382, -4 }, /* (489) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 437, 0 }, /* (490) fill_opt ::= */ + { 437, -4 }, /* (491) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 437, -6 }, /* (492) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 444, -1 }, /* (493) fill_mode ::= NONE */ + { 444, -1 }, /* (494) fill_mode ::= PREV */ + { 444, -1 }, /* (495) fill_mode ::= NULL */ + { 444, -1 }, /* (496) fill_mode ::= LINEAR */ + { 444, -1 }, /* (497) fill_mode ::= NEXT */ + { 439, 0 }, /* (498) group_by_clause_opt ::= */ + { 439, -3 }, /* (499) group_by_clause_opt ::= GROUP BY group_by_list */ + { 445, -1 }, /* (500) group_by_list ::= expr_or_subquery */ + { 445, -3 }, /* (501) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + { 440, 0 }, /* (502) having_clause_opt ::= */ + { 440, -2 }, /* (503) having_clause_opt ::= HAVING search_condition */ + { 435, 0 }, /* (504) range_opt ::= */ + { 435, -6 }, /* (505) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + { 436, 0 }, /* (506) every_opt ::= */ + { 436, -4 }, /* (507) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + { 446, -4 }, /* (508) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 447, -1 }, /* (509) query_simple ::= query_specification */ + { 447, -1 }, /* (510) query_simple ::= union_query_expression */ + { 451, -4 }, /* (511) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + { 451, -3 }, /* (512) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + { 452, -1 }, /* (513) query_simple_or_subquery ::= query_simple */ + { 452, -1 }, /* (514) query_simple_or_subquery ::= subquery */ + { 385, -1 }, /* (515) query_or_subquery ::= query_expression */ + { 385, -1 }, /* (516) query_or_subquery ::= subquery */ + { 448, 0 }, /* (517) order_by_clause_opt ::= */ + { 448, -3 }, /* (518) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 449, 0 }, /* (519) slimit_clause_opt ::= */ + { 449, -2 }, /* (520) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 449, -4 }, /* (521) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 449, -4 }, /* (522) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 450, 0 }, /* (523) limit_clause_opt ::= */ + { 450, -2 }, /* (524) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 450, -4 }, /* (525) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 450, -4 }, /* (526) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 427, -3 }, /* (527) subquery ::= NK_LP query_expression NK_RP */ + { 427, -3 }, /* (528) subquery ::= NK_LP subquery NK_RP */ + { 430, -1 }, /* (529) search_condition ::= common_expression */ + { 453, -1 }, /* (530) sort_specification_list ::= sort_specification */ + { 453, -3 }, /* (531) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 454, -3 }, /* (532) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + { 455, 0 }, /* (533) ordering_specification_opt ::= */ + { 455, -1 }, /* (534) ordering_specification_opt ::= ASC */ + { 455, -1 }, /* (535) ordering_specification_opt ::= DESC */ + { 456, 0 }, /* (536) null_ordering_opt ::= */ + { 456, -2 }, /* (537) null_ordering_opt ::= NULLS FIRST */ + { 456, -2 }, /* (538) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3679,7 +3676,7 @@ static YYACTIONTYPE yy_reduce( yymsp[-2].minor.yy199 = yylhsminor.yy199; break; case 42: /* priv_level ::= topic_name */ - case 457: /* alias_opt ::= table_alias */ yytestcase(yyruleno==457); + case 456: /* alias_opt ::= table_alias */ yytestcase(yyruleno==456); { yylhsminor.yy199 = yymsp[0].minor.yy199; } yymsp[0].minor.yy199 = yylhsminor.yy199; break; @@ -3710,44 +3707,44 @@ static YYACTIONTYPE yy_reduce( case 51: /* dnode_endpoint ::= NK_STRING */ case 52: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==52); case 53: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==53); - case 344: /* db_name ::= NK_ID */ yytestcase(yyruleno==344); - case 345: /* table_name ::= NK_ID */ yytestcase(yyruleno==345); - case 346: /* column_name ::= NK_ID */ yytestcase(yyruleno==346); - case 347: /* function_name ::= NK_ID */ yytestcase(yyruleno==347); - case 348: /* table_alias ::= NK_ID */ yytestcase(yyruleno==348); - case 349: /* column_alias ::= NK_ID */ yytestcase(yyruleno==349); - case 350: /* user_name ::= NK_ID */ yytestcase(yyruleno==350); - case 351: /* topic_name ::= NK_ID */ yytestcase(yyruleno==351); - case 352: /* stream_name ::= NK_ID */ yytestcase(yyruleno==352); - case 353: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==353); - case 392: /* noarg_func ::= NOW */ yytestcase(yyruleno==392); - case 393: /* noarg_func ::= TODAY */ yytestcase(yyruleno==393); - case 394: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==394); - case 395: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==395); - case 396: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==396); - case 397: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==397); - case 398: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==398); - case 399: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==399); - case 400: /* noarg_func ::= USER */ yytestcase(yyruleno==400); - case 401: /* star_func ::= COUNT */ yytestcase(yyruleno==401); - case 402: /* star_func ::= FIRST */ yytestcase(yyruleno==402); - case 403: /* star_func ::= LAST */ yytestcase(yyruleno==403); - case 404: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==404); + case 343: /* db_name ::= NK_ID */ yytestcase(yyruleno==343); + case 344: /* table_name ::= NK_ID */ yytestcase(yyruleno==344); + case 345: /* column_name ::= NK_ID */ yytestcase(yyruleno==345); + case 346: /* function_name ::= NK_ID */ yytestcase(yyruleno==346); + case 347: /* table_alias ::= NK_ID */ yytestcase(yyruleno==347); + case 348: /* column_alias ::= NK_ID */ yytestcase(yyruleno==348); + case 349: /* user_name ::= NK_ID */ yytestcase(yyruleno==349); + case 350: /* topic_name ::= NK_ID */ yytestcase(yyruleno==350); + case 351: /* stream_name ::= NK_ID */ yytestcase(yyruleno==351); + case 352: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==352); + case 391: /* noarg_func ::= NOW */ yytestcase(yyruleno==391); + case 392: /* noarg_func ::= TODAY */ yytestcase(yyruleno==392); + case 393: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==393); + case 394: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==394); + case 395: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==395); + case 396: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==396); + case 397: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==397); + case 398: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==398); + case 399: /* noarg_func ::= USER */ yytestcase(yyruleno==399); + case 400: /* star_func ::= COUNT */ yytestcase(yyruleno==400); + case 401: /* star_func ::= FIRST */ yytestcase(yyruleno==401); + case 402: /* star_func ::= LAST */ yytestcase(yyruleno==402); + case 403: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==403); { yylhsminor.yy199 = yymsp[0].minor.yy0; } yymsp[0].minor.yy199 = yylhsminor.yy199; break; case 54: /* force_opt ::= */ case 73: /* not_exists_opt ::= */ yytestcase(yyruleno==73); case 75: /* exists_opt ::= */ yytestcase(yyruleno==75); - case 284: /* analyze_opt ::= */ yytestcase(yyruleno==284); - case 291: /* agg_func_opt ::= */ yytestcase(yyruleno==291); - case 465: /* set_quantifier_opt ::= */ yytestcase(yyruleno==465); + case 283: /* analyze_opt ::= */ yytestcase(yyruleno==283); + case 290: /* agg_func_opt ::= */ yytestcase(yyruleno==290); + case 464: /* set_quantifier_opt ::= */ yytestcase(yyruleno==464); { yymsp[1].minor.yy397 = false; } break; case 55: /* force_opt ::= FORCE */ - case 285: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==285); - case 292: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==292); - case 466: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==466); + case 284: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==284); + case 291: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==291); + case 465: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==465); { yymsp[0].minor.yy397 = true; } break; case 56: /* cmd ::= ALTER LOCAL NK_STRING */ @@ -3963,685 +3960,682 @@ static YYACTIONTYPE yy_reduce( case 117: /* alter_db_option ::= REPLICA NK_INTEGER */ { yymsp[-1].minor.yy123.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } break; - case 118: /* alter_db_option ::= STRICT NK_STRING */ -{ yymsp[-1].minor.yy123.type = DB_OPTION_STRICT; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } - break; - case 119: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ + case 118: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ { yymsp[-1].minor.yy123.type = DB_OPTION_WAL; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } break; - case 120: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ + case 119: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ { yymsp[-1].minor.yy123.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } break; - case 121: /* integer_list ::= NK_INTEGER */ + case 120: /* integer_list ::= NK_INTEGER */ { yylhsminor.yy404 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy404 = yylhsminor.yy404; break; - case 122: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 314: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==314); + case 121: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ + case 313: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==313); { yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-2].minor.yy404, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy404 = yylhsminor.yy404; break; - case 123: /* variable_list ::= NK_VARIABLE */ + case 122: /* variable_list ::= NK_VARIABLE */ { yylhsminor.yy404 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy404 = yylhsminor.yy404; break; - case 124: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + case 123: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ { yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-2].minor.yy404, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy404 = yylhsminor.yy404; break; - case 125: /* retention_list ::= retention */ - case 147: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==147); - case 150: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==150); - case 157: /* column_def_list ::= column_def */ yytestcase(yyruleno==157); - case 201: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==201); - case 206: /* col_name_list ::= col_name */ yytestcase(yyruleno==206); - case 255: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==255); - case 266: /* func_list ::= func */ yytestcase(yyruleno==266); - case 342: /* literal_list ::= signed_literal */ yytestcase(yyruleno==342); - case 407: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==407); - case 413: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==413); - case 468: /* select_list ::= select_item */ yytestcase(yyruleno==468); - case 479: /* partition_list ::= partition_item */ yytestcase(yyruleno==479); - case 531: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==531); + case 124: /* retention_list ::= retention */ + case 146: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==146); + case 149: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==149); + case 156: /* column_def_list ::= column_def */ yytestcase(yyruleno==156); + case 200: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==200); + case 205: /* col_name_list ::= col_name */ yytestcase(yyruleno==205); + case 254: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==254); + case 265: /* func_list ::= func */ yytestcase(yyruleno==265); + case 341: /* literal_list ::= signed_literal */ yytestcase(yyruleno==341); + case 406: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==406); + case 412: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==412); + case 467: /* select_list ::= select_item */ yytestcase(yyruleno==467); + case 478: /* partition_list ::= partition_item */ yytestcase(yyruleno==478); + case 530: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==530); { yylhsminor.yy404 = createNodeList(pCxt, yymsp[0].minor.yy148); } yymsp[0].minor.yy404 = yylhsminor.yy404; break; - case 126: /* retention_list ::= retention_list NK_COMMA retention */ - case 158: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==158); - case 202: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==202); - case 207: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==207); - case 256: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==256); - case 267: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==267); - case 343: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==343); - case 408: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==408); - case 469: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==469); - case 480: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==480); - case 532: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==532); + case 125: /* retention_list ::= retention_list NK_COMMA retention */ + case 157: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==157); + case 201: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==201); + case 206: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==206); + case 255: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==255); + case 266: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==266); + case 342: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==342); + case 407: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==407); + case 468: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==468); + case 479: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==479); + case 531: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==531); { yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-2].minor.yy404, yymsp[0].minor.yy148); } yymsp[-2].minor.yy404 = yylhsminor.yy404; break; - case 127: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + case 126: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ { yylhsminor.yy148 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 128: /* speed_opt ::= */ - case 293: /* bufsize_opt ::= */ yytestcase(yyruleno==293); + case 127: /* speed_opt ::= */ + case 292: /* bufsize_opt ::= */ yytestcase(yyruleno==292); { yymsp[1].minor.yy706 = 0; } break; - case 129: /* speed_opt ::= MAX_SPEED NK_INTEGER */ - case 294: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==294); + case 128: /* speed_opt ::= MAX_SPEED NK_INTEGER */ + case 293: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==293); { yymsp[-1].minor.yy706 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 130: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 132: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==132); + case 129: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + case 131: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==131); { pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy397, yymsp[-5].minor.yy148, yymsp[-3].minor.yy404, yymsp[-1].minor.yy404, yymsp[0].minor.yy148); } break; - case 131: /* cmd ::= CREATE TABLE multi_create_clause */ + case 130: /* cmd ::= CREATE TABLE multi_create_clause */ { pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy404); } break; - case 133: /* cmd ::= DROP TABLE multi_drop_clause */ + case 132: /* cmd ::= DROP TABLE multi_drop_clause */ { pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy404); } break; - case 134: /* cmd ::= DROP STABLE exists_opt full_table_name */ + case 133: /* cmd ::= DROP STABLE exists_opt full_table_name */ { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy397, yymsp[0].minor.yy148); } break; - case 135: /* cmd ::= ALTER TABLE alter_table_clause */ - case 316: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==316); + case 134: /* cmd ::= ALTER TABLE alter_table_clause */ + case 315: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==315); { pCxt->pRootNode = yymsp[0].minor.yy148; } break; - case 136: /* cmd ::= ALTER STABLE alter_table_clause */ + case 135: /* cmd ::= ALTER STABLE alter_table_clause */ { pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy148); } break; - case 137: /* alter_table_clause ::= full_table_name alter_table_options */ + case 136: /* alter_table_clause ::= full_table_name alter_table_options */ { yylhsminor.yy148 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 138: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + case 137: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ { yylhsminor.yy148 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy199, yymsp[0].minor.yy530); } yymsp[-4].minor.yy148 = yylhsminor.yy148; break; - case 139: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ + case 138: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ { yylhsminor.yy148 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy148, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy199); } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 140: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + case 139: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ { yylhsminor.yy148 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy199, yymsp[0].minor.yy530); } yymsp[-4].minor.yy148 = yylhsminor.yy148; break; - case 141: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + case 140: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ { yylhsminor.yy148 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy199, &yymsp[0].minor.yy199); } yymsp[-4].minor.yy148 = yylhsminor.yy148; break; - case 142: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + case 141: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ { yylhsminor.yy148 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy199, yymsp[0].minor.yy530); } yymsp[-4].minor.yy148 = yylhsminor.yy148; break; - case 143: /* alter_table_clause ::= full_table_name DROP TAG column_name */ + case 142: /* alter_table_clause ::= full_table_name DROP TAG column_name */ { yylhsminor.yy148 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy148, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy199); } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 144: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + case 143: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ { yylhsminor.yy148 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy199, yymsp[0].minor.yy530); } yymsp[-4].minor.yy148 = yylhsminor.yy148; break; - case 145: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + case 144: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ { yylhsminor.yy148 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy148, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy199, &yymsp[0].minor.yy199); } yymsp[-4].minor.yy148 = yylhsminor.yy148; break; - case 146: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + case 145: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ { yylhsminor.yy148 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy148, &yymsp[-2].minor.yy199, yymsp[0].minor.yy148); } yymsp[-5].minor.yy148 = yylhsminor.yy148; break; - case 148: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 151: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==151); - case 414: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==414); + case 147: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 150: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==150); + case 413: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==413); { yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-1].minor.yy404, yymsp[0].minor.yy148); } yymsp[-1].minor.yy404 = yylhsminor.yy404; break; - case 149: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ + case 148: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ { yylhsminor.yy148 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy397, yymsp[-8].minor.yy148, yymsp[-6].minor.yy148, yymsp[-5].minor.yy404, yymsp[-2].minor.yy404, yymsp[0].minor.yy148); } yymsp[-9].minor.yy148 = yylhsminor.yy148; break; - case 152: /* drop_table_clause ::= exists_opt full_table_name */ + case 151: /* drop_table_clause ::= exists_opt full_table_name */ { yylhsminor.yy148 = createDropTableClause(pCxt, yymsp[-1].minor.yy397, yymsp[0].minor.yy148); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 153: /* specific_cols_opt ::= */ - case 184: /* tags_def_opt ::= */ yytestcase(yyruleno==184); - case 254: /* tag_list_opt ::= */ yytestcase(yyruleno==254); - case 477: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==477); - case 499: /* group_by_clause_opt ::= */ yytestcase(yyruleno==499); - case 518: /* order_by_clause_opt ::= */ yytestcase(yyruleno==518); + case 152: /* specific_cols_opt ::= */ + case 183: /* tags_def_opt ::= */ yytestcase(yyruleno==183); + case 253: /* tag_list_opt ::= */ yytestcase(yyruleno==253); + case 476: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==476); + case 498: /* group_by_clause_opt ::= */ yytestcase(yyruleno==498); + case 517: /* order_by_clause_opt ::= */ yytestcase(yyruleno==517); { yymsp[1].minor.yy404 = NULL; } break; - case 154: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 153: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ { yymsp[-2].minor.yy404 = yymsp[-1].minor.yy404; } break; - case 155: /* full_table_name ::= table_name */ + case 154: /* full_table_name ::= table_name */ { yylhsminor.yy148 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy199, NULL); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 156: /* full_table_name ::= db_name NK_DOT table_name */ + case 155: /* full_table_name ::= db_name NK_DOT table_name */ { yylhsminor.yy148 = createRealTableNode(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy199, NULL); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 159: /* column_def ::= column_name type_name */ + case 158: /* column_def ::= column_name type_name */ { yylhsminor.yy148 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy199, yymsp[0].minor.yy530, NULL); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 160: /* column_def ::= column_name type_name COMMENT NK_STRING */ + case 159: /* column_def ::= column_name type_name COMMENT NK_STRING */ { yylhsminor.yy148 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy199, yymsp[-2].minor.yy530, &yymsp[0].minor.yy0); } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 161: /* type_name ::= BOOL */ + case 160: /* type_name ::= BOOL */ { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_BOOL); } break; - case 162: /* type_name ::= TINYINT */ + case 161: /* type_name ::= TINYINT */ { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; - case 163: /* type_name ::= SMALLINT */ + case 162: /* type_name ::= SMALLINT */ { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; - case 164: /* type_name ::= INT */ - case 165: /* type_name ::= INTEGER */ yytestcase(yyruleno==165); + case 163: /* type_name ::= INT */ + case 164: /* type_name ::= INTEGER */ yytestcase(yyruleno==164); { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_INT); } break; - case 166: /* type_name ::= BIGINT */ + case 165: /* type_name ::= BIGINT */ { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; - case 167: /* type_name ::= FLOAT */ + case 166: /* type_name ::= FLOAT */ { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; - case 168: /* type_name ::= DOUBLE */ + case 167: /* type_name ::= DOUBLE */ { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; - case 169: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + case 168: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy530 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; - case 170: /* type_name ::= TIMESTAMP */ + case 169: /* type_name ::= TIMESTAMP */ { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; - case 171: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + case 170: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy530 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; - case 172: /* type_name ::= TINYINT UNSIGNED */ + case 171: /* type_name ::= TINYINT UNSIGNED */ { yymsp[-1].minor.yy530 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; - case 173: /* type_name ::= SMALLINT UNSIGNED */ + case 172: /* type_name ::= SMALLINT UNSIGNED */ { yymsp[-1].minor.yy530 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; - case 174: /* type_name ::= INT UNSIGNED */ + case 173: /* type_name ::= INT UNSIGNED */ { yymsp[-1].minor.yy530 = createDataType(TSDB_DATA_TYPE_UINT); } break; - case 175: /* type_name ::= BIGINT UNSIGNED */ + case 174: /* type_name ::= BIGINT UNSIGNED */ { yymsp[-1].minor.yy530 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; - case 176: /* type_name ::= JSON */ + case 175: /* type_name ::= JSON */ { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_JSON); } break; - case 177: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + case 176: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy530 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; - case 178: /* type_name ::= MEDIUMBLOB */ + case 177: /* type_name ::= MEDIUMBLOB */ { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; - case 179: /* type_name ::= BLOB */ + case 178: /* type_name ::= BLOB */ { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_BLOB); } break; - case 180: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + case 179: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy530 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; - case 181: /* type_name ::= DECIMAL */ + case 180: /* type_name ::= DECIMAL */ { yymsp[0].minor.yy530 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 182: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + case 181: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy530 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 183: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + case 182: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy530 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 185: /* tags_def_opt ::= tags_def */ - case 406: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==406); + case 184: /* tags_def_opt ::= tags_def */ + case 405: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==405); { yylhsminor.yy404 = yymsp[0].minor.yy404; } yymsp[0].minor.yy404 = yylhsminor.yy404; break; - case 186: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ + case 185: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ { yymsp[-3].minor.yy404 = yymsp[-1].minor.yy404; } break; - case 187: /* table_options ::= */ + case 186: /* table_options ::= */ { yymsp[1].minor.yy148 = createDefaultTableOptions(pCxt); } break; - case 188: /* table_options ::= table_options COMMENT NK_STRING */ + case 187: /* table_options ::= table_options COMMENT NK_STRING */ { yylhsminor.yy148 = setTableOption(pCxt, yymsp[-2].minor.yy148, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 189: /* table_options ::= table_options MAX_DELAY duration_list */ + case 188: /* table_options ::= table_options MAX_DELAY duration_list */ { yylhsminor.yy148 = setTableOption(pCxt, yymsp[-2].minor.yy148, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy404); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 190: /* table_options ::= table_options WATERMARK duration_list */ + case 189: /* table_options ::= table_options WATERMARK duration_list */ { yylhsminor.yy148 = setTableOption(pCxt, yymsp[-2].minor.yy148, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy404); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 191: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + case 190: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ { yylhsminor.yy148 = setTableOption(pCxt, yymsp[-4].minor.yy148, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy404); } yymsp[-4].minor.yy148 = yylhsminor.yy148; break; - case 192: /* table_options ::= table_options TTL NK_INTEGER */ + case 191: /* table_options ::= table_options TTL NK_INTEGER */ { yylhsminor.yy148 = setTableOption(pCxt, yymsp[-2].minor.yy148, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 193: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + case 192: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { yylhsminor.yy148 = setTableOption(pCxt, yymsp[-4].minor.yy148, TABLE_OPTION_SMA, yymsp[-1].minor.yy404); } yymsp[-4].minor.yy148 = yylhsminor.yy148; break; - case 194: /* table_options ::= table_options DELETE_MARK duration_list */ + case 193: /* table_options ::= table_options DELETE_MARK duration_list */ { yylhsminor.yy148 = setTableOption(pCxt, yymsp[-2].minor.yy148, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy404); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 195: /* alter_table_options ::= alter_table_option */ + case 194: /* alter_table_options ::= alter_table_option */ { yylhsminor.yy148 = createAlterTableOptions(pCxt); yylhsminor.yy148 = setTableOption(pCxt, yylhsminor.yy148, yymsp[0].minor.yy123.type, &yymsp[0].minor.yy123.val); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 196: /* alter_table_options ::= alter_table_options alter_table_option */ + case 195: /* alter_table_options ::= alter_table_options alter_table_option */ { yylhsminor.yy148 = setTableOption(pCxt, yymsp[-1].minor.yy148, yymsp[0].minor.yy123.type, &yymsp[0].minor.yy123.val); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 197: /* alter_table_option ::= COMMENT NK_STRING */ + case 196: /* alter_table_option ::= COMMENT NK_STRING */ { yymsp[-1].minor.yy123.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } break; - case 198: /* alter_table_option ::= TTL NK_INTEGER */ + case 197: /* alter_table_option ::= TTL NK_INTEGER */ { yymsp[-1].minor.yy123.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy123.val = yymsp[0].minor.yy0; } break; - case 199: /* duration_list ::= duration_literal */ - case 371: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==371); + case 198: /* duration_list ::= duration_literal */ + case 370: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==370); { yylhsminor.yy404 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy148)); } yymsp[0].minor.yy404 = yylhsminor.yy404; break; - case 200: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 372: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==372); + case 199: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 371: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==371); { yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-2].minor.yy404, releaseRawExprNode(pCxt, yymsp[0].minor.yy148)); } yymsp[-2].minor.yy404 = yylhsminor.yy404; break; - case 203: /* rollup_func_name ::= function_name */ + case 202: /* rollup_func_name ::= function_name */ { yylhsminor.yy148 = createFunctionNode(pCxt, &yymsp[0].minor.yy199, NULL); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 204: /* rollup_func_name ::= FIRST */ - case 205: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==205); - case 258: /* tag_item ::= QTAGS */ yytestcase(yyruleno==258); + case 203: /* rollup_func_name ::= FIRST */ + case 204: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==204); + case 257: /* tag_item ::= QTAGS */ yytestcase(yyruleno==257); { yylhsminor.yy148 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 208: /* col_name ::= column_name */ - case 259: /* tag_item ::= column_name */ yytestcase(yyruleno==259); + case 207: /* col_name ::= column_name */ + case 258: /* tag_item ::= column_name */ yytestcase(yyruleno==258); { yylhsminor.yy148 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy199); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 209: /* cmd ::= SHOW DNODES */ + case 208: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } break; - case 210: /* cmd ::= SHOW USERS */ + case 209: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } break; - case 211: /* cmd ::= SHOW USER PRIVILEGES */ + case 210: /* cmd ::= SHOW USER PRIVILEGES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } break; - case 212: /* cmd ::= SHOW DATABASES */ + case 211: /* cmd ::= SHOW DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; - case 213: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + case 212: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy148, yymsp[0].minor.yy148, OP_TYPE_LIKE); } break; - case 214: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + case 213: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy148, yymsp[0].minor.yy148, OP_TYPE_LIKE); } break; - case 215: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ + case 214: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy148, NULL, OP_TYPE_LIKE); } break; - case 216: /* cmd ::= SHOW MNODES */ + case 215: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } break; - case 217: /* cmd ::= SHOW QNODES */ + case 216: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } break; - case 218: /* cmd ::= SHOW FUNCTIONS */ + case 217: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; - case 219: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + case 218: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy148, yymsp[-1].minor.yy148, OP_TYPE_EQUAL); } break; - case 220: /* cmd ::= SHOW STREAMS */ + case 219: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } break; - case 221: /* cmd ::= SHOW ACCOUNTS */ + case 220: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 222: /* cmd ::= SHOW APPS */ + case 221: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } break; - case 223: /* cmd ::= SHOW CONNECTIONS */ + case 222: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } break; - case 224: /* cmd ::= SHOW LICENCES */ - case 225: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==225); + case 223: /* cmd ::= SHOW LICENCES */ + case 224: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==224); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; - case 226: /* cmd ::= SHOW CREATE DATABASE db_name */ + case 225: /* cmd ::= SHOW CREATE DATABASE db_name */ { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy199); } break; - case 227: /* cmd ::= SHOW CREATE TABLE full_table_name */ + case 226: /* cmd ::= SHOW CREATE TABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy148); } break; - case 228: /* cmd ::= SHOW CREATE STABLE full_table_name */ + case 227: /* cmd ::= SHOW CREATE STABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy148); } break; - case 229: /* cmd ::= SHOW QUERIES */ + case 228: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; - case 230: /* cmd ::= SHOW SCORES */ + case 229: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; - case 231: /* cmd ::= SHOW TOPICS */ + case 230: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; - case 232: /* cmd ::= SHOW VARIABLES */ - case 233: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==233); + case 231: /* cmd ::= SHOW VARIABLES */ + case 232: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==232); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } break; - case 234: /* cmd ::= SHOW LOCAL VARIABLES */ + case 233: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; - case 235: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + case 234: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ { pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy148); } break; - case 236: /* cmd ::= SHOW BNODES */ + case 235: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; - case 237: /* cmd ::= SHOW SNODES */ + case 236: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; - case 238: /* cmd ::= SHOW CLUSTER */ + case 237: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; - case 239: /* cmd ::= SHOW TRANSACTIONS */ + case 238: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 240: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + case 239: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ { pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy148); } break; - case 241: /* cmd ::= SHOW CONSUMERS */ + case 240: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } break; - case 242: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 241: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; - case 243: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + case 242: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy148, yymsp[-1].minor.yy148, OP_TYPE_EQUAL); } break; - case 244: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + case 243: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy148, yymsp[0].minor.yy148, yymsp[-3].minor.yy404); } break; - case 245: /* cmd ::= SHOW VNODES NK_INTEGER */ + case 244: /* cmd ::= SHOW VNODES NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 246: /* cmd ::= SHOW VNODES NK_STRING */ + case 245: /* cmd ::= SHOW VNODES NK_STRING */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); } break; - case 247: /* db_name_cond_opt ::= */ - case 252: /* from_db_opt ::= */ yytestcase(yyruleno==252); + case 246: /* db_name_cond_opt ::= */ + case 251: /* from_db_opt ::= */ yytestcase(yyruleno==251); { yymsp[1].minor.yy148 = createDefaultDatabaseCondValue(pCxt); } break; - case 248: /* db_name_cond_opt ::= db_name NK_DOT */ + case 247: /* db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy148 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy199); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 249: /* like_pattern_opt ::= */ - case 304: /* subtable_opt ::= */ yytestcase(yyruleno==304); - case 416: /* case_when_else_opt ::= */ yytestcase(yyruleno==416); - case 446: /* from_clause_opt ::= */ yytestcase(yyruleno==446); - case 475: /* where_clause_opt ::= */ yytestcase(yyruleno==475); - case 484: /* twindow_clause_opt ::= */ yytestcase(yyruleno==484); - case 489: /* sliding_opt ::= */ yytestcase(yyruleno==489); - case 491: /* fill_opt ::= */ yytestcase(yyruleno==491); - case 503: /* having_clause_opt ::= */ yytestcase(yyruleno==503); - case 505: /* range_opt ::= */ yytestcase(yyruleno==505); - case 507: /* every_opt ::= */ yytestcase(yyruleno==507); - case 520: /* slimit_clause_opt ::= */ yytestcase(yyruleno==520); - case 524: /* limit_clause_opt ::= */ yytestcase(yyruleno==524); + case 248: /* like_pattern_opt ::= */ + case 303: /* subtable_opt ::= */ yytestcase(yyruleno==303); + case 415: /* case_when_else_opt ::= */ yytestcase(yyruleno==415); + case 445: /* from_clause_opt ::= */ yytestcase(yyruleno==445); + case 474: /* where_clause_opt ::= */ yytestcase(yyruleno==474); + case 483: /* twindow_clause_opt ::= */ yytestcase(yyruleno==483); + case 488: /* sliding_opt ::= */ yytestcase(yyruleno==488); + case 490: /* fill_opt ::= */ yytestcase(yyruleno==490); + case 502: /* having_clause_opt ::= */ yytestcase(yyruleno==502); + case 504: /* range_opt ::= */ yytestcase(yyruleno==504); + case 506: /* every_opt ::= */ yytestcase(yyruleno==506); + case 519: /* slimit_clause_opt ::= */ yytestcase(yyruleno==519); + case 523: /* limit_clause_opt ::= */ yytestcase(yyruleno==523); { yymsp[1].minor.yy148 = NULL; } break; - case 250: /* like_pattern_opt ::= LIKE NK_STRING */ + case 249: /* like_pattern_opt ::= LIKE NK_STRING */ { yymsp[-1].minor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 251: /* table_name_cond ::= table_name */ + case 250: /* table_name_cond ::= table_name */ { yylhsminor.yy148 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy199); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 253: /* from_db_opt ::= FROM db_name */ + case 252: /* from_db_opt ::= FROM db_name */ { yymsp[-1].minor.yy148 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy199); } break; - case 257: /* tag_item ::= TBNAME */ + case 256: /* tag_item ::= TBNAME */ { yylhsminor.yy148 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 260: /* tag_item ::= column_name column_alias */ + case 259: /* tag_item ::= column_name column_alias */ { yylhsminor.yy148 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy199), &yymsp[0].minor.yy199); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 261: /* tag_item ::= column_name AS column_alias */ + case 260: /* tag_item ::= column_name AS column_alias */ { yylhsminor.yy148 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy199), &yymsp[0].minor.yy199); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 262: /* cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ + case 261: /* cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy397, yymsp[-3].minor.yy148, yymsp[-1].minor.yy148, NULL, yymsp[0].minor.yy148); } break; - case 263: /* cmd ::= DROP INDEX exists_opt full_table_name */ + case 262: /* cmd ::= DROP INDEX exists_opt full_table_name */ { pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy397, yymsp[0].minor.yy148); } break; - case 264: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + case 263: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ { yymsp[-9].minor.yy148 = createIndexOption(pCxt, yymsp[-7].minor.yy404, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), NULL, yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } break; - case 265: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + case 264: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ { yymsp[-11].minor.yy148 = createIndexOption(pCxt, yymsp[-9].minor.yy404, releaseRawExprNode(pCxt, yymsp[-5].minor.yy148), releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } break; - case 268: /* func ::= function_name NK_LP expression_list NK_RP */ + case 267: /* func ::= function_name NK_LP expression_list NK_RP */ { yylhsminor.yy148 = createFunctionNode(pCxt, &yymsp[-3].minor.yy199, yymsp[-1].minor.yy404); } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 269: /* sma_stream_opt ::= */ - case 297: /* stream_options ::= */ yytestcase(yyruleno==297); + case 268: /* sma_stream_opt ::= */ + case 296: /* stream_options ::= */ yytestcase(yyruleno==296); { yymsp[1].minor.yy148 = createStreamOptions(pCxt); } break; - case 270: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - case 301: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==301); + case 269: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + case 300: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==300); { ((SStreamOptions*)yymsp[-2].minor.yy148)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); yylhsminor.yy148 = yymsp[-2].minor.yy148; } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 271: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + case 270: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy148)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); yylhsminor.yy148 = yymsp[-2].minor.yy148; } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 272: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + case 271: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy148)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); yylhsminor.yy148 = yymsp[-2].minor.yy148; } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 273: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + case 272: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ { pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy397, &yymsp[-2].minor.yy199, yymsp[0].minor.yy148); } break; - case 274: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + case 273: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy397, &yymsp[-3].minor.yy199, &yymsp[0].minor.yy199, false); } break; - case 275: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + case 274: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy397, &yymsp[-5].minor.yy199, &yymsp[0].minor.yy199, true); } break; - case 276: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + case 275: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy397, &yymsp[-3].minor.yy199, yymsp[0].minor.yy148, false); } break; - case 277: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + case 276: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy397, &yymsp[-5].minor.yy199, yymsp[0].minor.yy148, true); } break; - case 278: /* cmd ::= DROP TOPIC exists_opt topic_name */ + case 277: /* cmd ::= DROP TOPIC exists_opt topic_name */ { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy397, &yymsp[0].minor.yy199); } break; - case 279: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + case 278: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ { pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy397, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy199); } break; - case 280: /* cmd ::= DESC full_table_name */ - case 281: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==281); + case 279: /* cmd ::= DESC full_table_name */ + case 280: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==280); { pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy148); } break; - case 282: /* cmd ::= RESET QUERY CACHE */ + case 281: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 283: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 282: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ { pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy397, yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } break; - case 286: /* explain_options ::= */ + case 285: /* explain_options ::= */ { yymsp[1].minor.yy148 = createDefaultExplainOptions(pCxt); } break; - case 287: /* explain_options ::= explain_options VERBOSE NK_BOOL */ + case 286: /* explain_options ::= explain_options VERBOSE NK_BOOL */ { yylhsminor.yy148 = setExplainVerbose(pCxt, yymsp[-2].minor.yy148, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 288: /* explain_options ::= explain_options RATIO NK_FLOAT */ + case 287: /* explain_options ::= explain_options RATIO NK_FLOAT */ { yylhsminor.yy148 = setExplainRatio(pCxt, yymsp[-2].minor.yy148, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 289: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + case 288: /* 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.yy397, yymsp[-8].minor.yy397, &yymsp[-5].minor.yy199, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy530, yymsp[0].minor.yy706); } break; - case 290: /* cmd ::= DROP FUNCTION exists_opt function_name */ + case 289: /* cmd ::= DROP FUNCTION exists_opt function_name */ { pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy397, &yymsp[0].minor.yy199); } break; - case 295: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ + case 294: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ { pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy397, &yymsp[-7].minor.yy199, yymsp[-4].minor.yy148, yymsp[-6].minor.yy148, yymsp[-3].minor.yy404, yymsp[-2].minor.yy148, yymsp[0].minor.yy148); } break; - case 296: /* cmd ::= DROP STREAM exists_opt stream_name */ + case 295: /* cmd ::= DROP STREAM exists_opt stream_name */ { pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy397, &yymsp[0].minor.yy199); } break; - case 298: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 297: /* stream_options ::= stream_options TRIGGER AT_ONCE */ { ((SStreamOptions*)yymsp[-2].minor.yy148)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy148 = yymsp[-2].minor.yy148; } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 299: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + case 298: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ { ((SStreamOptions*)yymsp[-2].minor.yy148)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy148 = yymsp[-2].minor.yy148; } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 300: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + case 299: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ { ((SStreamOptions*)yymsp[-3].minor.yy148)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy148)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); yylhsminor.yy148 = yymsp[-3].minor.yy148; } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 302: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + case 301: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ { ((SStreamOptions*)yymsp[-3].minor.yy148)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy148 = yymsp[-3].minor.yy148; } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 303: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + case 302: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ { ((SStreamOptions*)yymsp[-2].minor.yy148)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy148 = yymsp[-2].minor.yy148; } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 305: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 490: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==490); - case 508: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==508); + case 304: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 489: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==489); + case 507: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==507); { yymsp[-3].minor.yy148 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy148); } break; - case 306: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 305: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 307: /* cmd ::= KILL QUERY NK_STRING */ + case 306: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 308: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 307: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 309: /* cmd ::= BALANCE VGROUP */ + case 308: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 310: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 309: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 311: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + case 310: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy404); } break; - case 312: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 311: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 313: /* dnode_list ::= DNODE NK_INTEGER */ + case 312: /* dnode_list ::= DNODE NK_INTEGER */ { yymsp[-1].minor.yy404 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 315: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ + case 314: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ { pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } break; - case 317: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + case 316: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ { pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy148, yymsp[-2].minor.yy404, yymsp[0].minor.yy148); } break; - case 318: /* cmd ::= INSERT INTO full_table_name query_or_subquery */ + case 317: /* cmd ::= INSERT INTO full_table_name query_or_subquery */ { pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy148, NULL, yymsp[0].minor.yy148); } break; - case 319: /* literal ::= NK_INTEGER */ + case 318: /* literal ::= NK_INTEGER */ { yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 320: /* literal ::= NK_FLOAT */ + case 319: /* literal ::= NK_FLOAT */ { yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 321: /* literal ::= NK_STRING */ + case 320: /* literal ::= NK_STRING */ { yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 322: /* literal ::= NK_BOOL */ + case 321: /* literal ::= NK_BOOL */ { yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 323: /* literal ::= TIMESTAMP NK_STRING */ + case 322: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 324: /* literal ::= duration_literal */ - case 334: /* signed_literal ::= signed */ yytestcase(yyruleno==334); - case 354: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==354); - case 355: /* expression ::= literal */ yytestcase(yyruleno==355); - case 356: /* expression ::= pseudo_column */ yytestcase(yyruleno==356); - case 357: /* expression ::= column_reference */ yytestcase(yyruleno==357); - case 358: /* expression ::= function_expression */ yytestcase(yyruleno==358); - case 359: /* expression ::= case_when_expression */ yytestcase(yyruleno==359); - case 389: /* function_expression ::= literal_func */ yytestcase(yyruleno==389); - case 438: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==438); - case 442: /* boolean_primary ::= predicate */ yytestcase(yyruleno==442); - case 444: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==444); - case 445: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==445); - case 448: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==448); - case 450: /* table_reference ::= table_primary */ yytestcase(yyruleno==450); - case 451: /* table_reference ::= joined_table */ yytestcase(yyruleno==451); - case 455: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==455); - case 510: /* query_simple ::= query_specification */ yytestcase(yyruleno==510); - case 511: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==511); - case 514: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==514); - case 516: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==516); + case 323: /* literal ::= duration_literal */ + case 333: /* signed_literal ::= signed */ yytestcase(yyruleno==333); + case 353: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==353); + case 354: /* expression ::= literal */ yytestcase(yyruleno==354); + case 355: /* expression ::= pseudo_column */ yytestcase(yyruleno==355); + case 356: /* expression ::= column_reference */ yytestcase(yyruleno==356); + case 357: /* expression ::= function_expression */ yytestcase(yyruleno==357); + case 358: /* expression ::= case_when_expression */ yytestcase(yyruleno==358); + case 388: /* function_expression ::= literal_func */ yytestcase(yyruleno==388); + case 437: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==437); + case 441: /* boolean_primary ::= predicate */ yytestcase(yyruleno==441); + case 443: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==443); + case 444: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==444); + case 447: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==447); + case 449: /* table_reference ::= table_primary */ yytestcase(yyruleno==449); + case 450: /* table_reference ::= joined_table */ yytestcase(yyruleno==450); + case 454: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==454); + case 509: /* query_simple ::= query_specification */ yytestcase(yyruleno==509); + case 510: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==510); + case 513: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==513); + case 515: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==515); { yylhsminor.yy148 = yymsp[0].minor.yy148; } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 325: /* literal ::= NULL */ + case 324: /* literal ::= NULL */ { yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 326: /* literal ::= NK_QUESTION */ + case 325: /* literal ::= NK_QUESTION */ { yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 327: /* duration_literal ::= NK_VARIABLE */ + case 326: /* duration_literal ::= NK_VARIABLE */ { yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 328: /* signed ::= NK_INTEGER */ + case 327: /* signed ::= NK_INTEGER */ { yylhsminor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 329: /* signed ::= NK_PLUS NK_INTEGER */ + case 328: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 330: /* signed ::= NK_MINUS NK_INTEGER */ + case 329: /* 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; @@ -4649,14 +4643,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 331: /* signed ::= NK_FLOAT */ + case 330: /* signed ::= NK_FLOAT */ { yylhsminor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 332: /* signed ::= NK_PLUS NK_FLOAT */ + case 331: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 333: /* signed ::= NK_MINUS NK_FLOAT */ + case 332: /* 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; @@ -4664,57 +4658,57 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 335: /* signed_literal ::= NK_STRING */ + case 334: /* signed_literal ::= NK_STRING */ { yylhsminor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 336: /* signed_literal ::= NK_BOOL */ + case 335: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 337: /* signed_literal ::= TIMESTAMP NK_STRING */ + case 336: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 338: /* signed_literal ::= duration_literal */ - case 340: /* signed_literal ::= literal_func */ yytestcase(yyruleno==340); - case 409: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==409); - case 471: /* select_item ::= common_expression */ yytestcase(yyruleno==471); - case 481: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==481); - case 515: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==515); - case 517: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==517); - case 530: /* search_condition ::= common_expression */ yytestcase(yyruleno==530); + case 337: /* signed_literal ::= duration_literal */ + case 339: /* signed_literal ::= literal_func */ yytestcase(yyruleno==339); + case 408: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==408); + case 470: /* select_item ::= common_expression */ yytestcase(yyruleno==470); + case 480: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==480); + case 514: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==514); + case 516: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==516); + case 529: /* search_condition ::= common_expression */ yytestcase(yyruleno==529); { yylhsminor.yy148 = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 339: /* signed_literal ::= NULL */ + case 338: /* signed_literal ::= NULL */ { yylhsminor.yy148 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 341: /* signed_literal ::= NK_QUESTION */ + case 340: /* signed_literal ::= NK_QUESTION */ { yylhsminor.yy148 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 360: /* expression ::= NK_LP expression NK_RP */ - case 443: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==443); - case 529: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==529); + case 359: /* expression ::= NK_LP expression NK_RP */ + case 442: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==442); + case 528: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==528); { yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy148)); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 361: /* expression ::= NK_PLUS expr_or_subquery */ + case 360: /* expression ::= NK_PLUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy148)); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 362: /* expression ::= NK_MINUS expr_or_subquery */ + case 361: /* expression ::= NK_MINUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy148), NULL)); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 363: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 362: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4722,7 +4716,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 364: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 363: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4730,7 +4724,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 365: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 364: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4738,7 +4732,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 366: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 365: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4746,7 +4740,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 367: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 366: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4754,14 +4748,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 368: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 367: /* expression ::= column_reference NK_ARROW NK_STRING */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 369: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 368: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4769,7 +4763,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 370: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 369: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4777,70 +4771,70 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 373: /* column_reference ::= column_name */ + case 372: /* column_reference ::= column_name */ { yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy199, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy199)); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 374: /* column_reference ::= table_name NK_DOT column_name */ + case 373: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy199, createColumnNode(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy199)); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 375: /* pseudo_column ::= ROWTS */ - case 376: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==376); - case 378: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==378); - case 379: /* pseudo_column ::= QEND */ yytestcase(yyruleno==379); - case 380: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==380); - case 381: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==381); - case 382: /* pseudo_column ::= WEND */ yytestcase(yyruleno==382); - case 383: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==383); - case 384: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==384); - case 385: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==385); - case 391: /* literal_func ::= NOW */ yytestcase(yyruleno==391); + case 374: /* pseudo_column ::= ROWTS */ + case 375: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==375); + case 377: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==377); + case 378: /* pseudo_column ::= QEND */ yytestcase(yyruleno==378); + case 379: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==379); + case 380: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==380); + case 381: /* pseudo_column ::= WEND */ yytestcase(yyruleno==381); + case 382: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==382); + case 383: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==383); + case 384: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==384); + case 390: /* literal_func ::= NOW */ yytestcase(yyruleno==390); { yylhsminor.yy148 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 377: /* pseudo_column ::= table_name NK_DOT TBNAME */ + case 376: /* pseudo_column ::= table_name NK_DOT TBNAME */ { yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy199)))); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 386: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 387: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==387); + case 385: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 386: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==386); { yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy199, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy199, yymsp[-1].minor.yy404)); } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 388: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 387: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ { yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), yymsp[-1].minor.yy530)); } yymsp[-5].minor.yy148 = yylhsminor.yy148; break; - case 390: /* literal_func ::= noarg_func NK_LP NK_RP */ + case 389: /* literal_func ::= noarg_func NK_LP NK_RP */ { yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy199, NULL)); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 405: /* star_func_para_list ::= NK_STAR */ + case 404: /* star_func_para_list ::= NK_STAR */ { yylhsminor.yy404 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy404 = yylhsminor.yy404; break; - case 410: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 474: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==474); + case 409: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 473: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==473); { yylhsminor.yy148 = createColumnNode(pCxt, &yymsp[-2].minor.yy199, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 411: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ + case 410: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ { yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy404, yymsp[-1].minor.yy148)); } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 412: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + case 411: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ { yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), yymsp[-2].minor.yy404, yymsp[-1].minor.yy148)); } yymsp[-4].minor.yy148 = yylhsminor.yy148; break; - case 415: /* when_then_expr ::= WHEN common_expression THEN common_expression */ + case 414: /* when_then_expr ::= WHEN common_expression THEN common_expression */ { yymsp[-3].minor.yy148 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), releaseRawExprNode(pCxt, yymsp[0].minor.yy148)); } break; - case 417: /* case_when_else_opt ::= ELSE common_expression */ + case 416: /* case_when_else_opt ::= ELSE common_expression */ { yymsp[-1].minor.yy148 = releaseRawExprNode(pCxt, yymsp[0].minor.yy148); } break; - case 418: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 423: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==423); + case 417: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 422: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==422); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4848,7 +4842,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 419: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 418: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4856,7 +4850,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-4].minor.yy148 = yylhsminor.yy148; break; - case 420: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 419: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4864,71 +4858,71 @@ static YYACTIONTYPE yy_reduce( } yymsp[-5].minor.yy148 = yylhsminor.yy148; break; - case 421: /* predicate ::= expr_or_subquery IS NULL */ + case 420: /* predicate ::= expr_or_subquery IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), NULL)); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 422: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 421: /* predicate ::= expr_or_subquery IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy148); yylhsminor.yy148 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), NULL)); } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 424: /* compare_op ::= NK_LT */ + case 423: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy20 = OP_TYPE_LOWER_THAN; } break; - case 425: /* compare_op ::= NK_GT */ + case 424: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy20 = OP_TYPE_GREATER_THAN; } break; - case 426: /* compare_op ::= NK_LE */ + case 425: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy20 = OP_TYPE_LOWER_EQUAL; } break; - case 427: /* compare_op ::= NK_GE */ + case 426: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy20 = OP_TYPE_GREATER_EQUAL; } break; - case 428: /* compare_op ::= NK_NE */ + case 427: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy20 = OP_TYPE_NOT_EQUAL; } break; - case 429: /* compare_op ::= NK_EQ */ + case 428: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy20 = OP_TYPE_EQUAL; } break; - case 430: /* compare_op ::= LIKE */ + case 429: /* compare_op ::= LIKE */ { yymsp[0].minor.yy20 = OP_TYPE_LIKE; } break; - case 431: /* compare_op ::= NOT LIKE */ + case 430: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy20 = OP_TYPE_NOT_LIKE; } break; - case 432: /* compare_op ::= MATCH */ + case 431: /* compare_op ::= MATCH */ { yymsp[0].minor.yy20 = OP_TYPE_MATCH; } break; - case 433: /* compare_op ::= NMATCH */ + case 432: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy20 = OP_TYPE_NMATCH; } break; - case 434: /* compare_op ::= CONTAINS */ + case 433: /* compare_op ::= CONTAINS */ { yymsp[0].minor.yy20 = OP_TYPE_JSON_CONTAINS; } break; - case 435: /* in_op ::= IN */ + case 434: /* in_op ::= IN */ { yymsp[0].minor.yy20 = OP_TYPE_IN; } break; - case 436: /* in_op ::= NOT IN */ + case 435: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy20 = OP_TYPE_NOT_IN; } break; - case 437: /* in_predicate_value ::= NK_LP literal_list NK_RP */ + case 436: /* in_predicate_value ::= NK_LP literal_list NK_RP */ { yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy404)); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 439: /* boolean_value_expression ::= NOT boolean_primary */ + case 438: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy148), NULL)); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 440: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 439: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4936,7 +4930,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 441: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 440: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy148); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy148); @@ -4944,48 +4938,48 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 447: /* from_clause_opt ::= FROM table_reference_list */ - case 476: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==476); - case 504: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==504); + case 446: /* from_clause_opt ::= FROM table_reference_list */ + case 475: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==475); + case 503: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==503); { yymsp[-1].minor.yy148 = yymsp[0].minor.yy148; } break; - case 449: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ + case 448: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy148 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy148, yymsp[0].minor.yy148, NULL); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 452: /* table_primary ::= table_name alias_opt */ + case 451: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy148 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy199, &yymsp[0].minor.yy199); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 453: /* table_primary ::= db_name NK_DOT table_name alias_opt */ + case 452: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy148 = createRealTableNode(pCxt, &yymsp[-3].minor.yy199, &yymsp[-1].minor.yy199, &yymsp[0].minor.yy199); } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 454: /* table_primary ::= subquery alias_opt */ + case 453: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy148 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy148), &yymsp[0].minor.yy199); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 456: /* alias_opt ::= */ + case 455: /* alias_opt ::= */ { yymsp[1].minor.yy199 = nil_token; } break; - case 458: /* alias_opt ::= AS table_alias */ + case 457: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy199 = yymsp[0].minor.yy199; } break; - case 459: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 460: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==460); + case 458: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 459: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==459); { yymsp[-2].minor.yy148 = yymsp[-1].minor.yy148; } break; - case 461: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + case 460: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { yylhsminor.yy148 = createJoinTableNode(pCxt, yymsp[-4].minor.yy470, yymsp[-5].minor.yy148, yymsp[-2].minor.yy148, yymsp[0].minor.yy148); } yymsp[-5].minor.yy148 = yylhsminor.yy148; break; - case 462: /* join_type ::= */ + case 461: /* join_type ::= */ { yymsp[1].minor.yy470 = JOIN_TYPE_INNER; } break; - case 463: /* join_type ::= INNER */ + case 462: /* join_type ::= INNER */ { yymsp[0].minor.yy470 = JOIN_TYPE_INNER; } break; - case 464: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 463: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { yymsp[-11].minor.yy148 = createSelectStmt(pCxt, yymsp[-10].minor.yy397, yymsp[-9].minor.yy404, yymsp[-8].minor.yy148); yymsp[-11].minor.yy148 = addWhereClause(pCxt, yymsp[-11].minor.yy148, yymsp[-7].minor.yy148); @@ -4998,73 +4992,73 @@ static YYACTIONTYPE yy_reduce( yymsp[-11].minor.yy148 = addFillClause(pCxt, yymsp[-11].minor.yy148, yymsp[-3].minor.yy148); } break; - case 467: /* set_quantifier_opt ::= ALL */ + case 466: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy397 = false; } break; - case 470: /* select_item ::= NK_STAR */ + case 469: /* select_item ::= NK_STAR */ { yylhsminor.yy148 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy148 = yylhsminor.yy148; break; - case 472: /* select_item ::= common_expression column_alias */ - case 482: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==482); + case 471: /* select_item ::= common_expression column_alias */ + case 481: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==481); { yylhsminor.yy148 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy148), &yymsp[0].minor.yy199); } yymsp[-1].minor.yy148 = yylhsminor.yy148; break; - case 473: /* select_item ::= common_expression AS column_alias */ - case 483: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==483); + case 472: /* select_item ::= common_expression AS column_alias */ + case 482: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==482); { yylhsminor.yy148 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), &yymsp[0].minor.yy199); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 478: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 500: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==500); - case 519: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==519); + case 477: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 499: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==499); + case 518: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==518); { yymsp[-2].minor.yy404 = yymsp[0].minor.yy404; } break; - case 485: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + case 484: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ { yymsp[-5].minor.yy148 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), releaseRawExprNode(pCxt, yymsp[-1].minor.yy148)); } break; - case 486: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + case 485: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy148 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy148)); } break; - case 487: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + case 486: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy148 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), NULL, yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } break; - case 488: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + case 487: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-7].minor.yy148 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy148), releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), yymsp[-1].minor.yy148, yymsp[0].minor.yy148); } break; - case 492: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ + case 491: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy148 = createFillNode(pCxt, yymsp[-1].minor.yy334, NULL); } break; - case 493: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + case 492: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ { yymsp[-5].minor.yy148 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy404)); } break; - case 494: /* fill_mode ::= NONE */ + case 493: /* fill_mode ::= NONE */ { yymsp[0].minor.yy334 = FILL_MODE_NONE; } break; - case 495: /* fill_mode ::= PREV */ + case 494: /* fill_mode ::= PREV */ { yymsp[0].minor.yy334 = FILL_MODE_PREV; } break; - case 496: /* fill_mode ::= NULL */ + case 495: /* fill_mode ::= NULL */ { yymsp[0].minor.yy334 = FILL_MODE_NULL; } break; - case 497: /* fill_mode ::= LINEAR */ + case 496: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy334 = FILL_MODE_LINEAR; } break; - case 498: /* fill_mode ::= NEXT */ + case 497: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy334 = FILL_MODE_NEXT; } break; - case 501: /* group_by_list ::= expr_or_subquery */ + case 500: /* group_by_list ::= expr_or_subquery */ { yylhsminor.yy404 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); } yymsp[0].minor.yy404 = yylhsminor.yy404; break; - case 502: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + case 501: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ { yylhsminor.yy404 = addNodeToList(pCxt, yymsp[-2].minor.yy404, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy148))); } yymsp[-2].minor.yy404 = yylhsminor.yy404; break; - case 506: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + case 505: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ { yymsp[-5].minor.yy148 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy148), releaseRawExprNode(pCxt, yymsp[-1].minor.yy148)); } break; - case 509: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 508: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy148 = addOrderByClause(pCxt, yymsp[-3].minor.yy148, yymsp[-2].minor.yy404); yylhsminor.yy148 = addSlimitClause(pCxt, yylhsminor.yy148, yymsp[-1].minor.yy148); @@ -5072,50 +5066,50 @@ static YYACTIONTYPE yy_reduce( } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 512: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + case 511: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ { yylhsminor.yy148 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy148, yymsp[0].minor.yy148); } yymsp[-3].minor.yy148 = yylhsminor.yy148; break; - case 513: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + case 512: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ { yylhsminor.yy148 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy148, yymsp[0].minor.yy148); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 521: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 525: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==525); + case 520: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 524: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==524); { yymsp[-1].minor.yy148 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 522: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 526: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==526); + case 521: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 525: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==525); { yymsp[-3].minor.yy148 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 523: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 527: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==527); + case 522: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 526: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==526); { yymsp[-3].minor.yy148 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 528: /* subquery ::= NK_LP query_expression NK_RP */ + case 527: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy148 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy148); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 533: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + case 532: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ { yylhsminor.yy148 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy148), yymsp[-1].minor.yy898, yymsp[0].minor.yy499); } yymsp[-2].minor.yy148 = yylhsminor.yy148; break; - case 534: /* ordering_specification_opt ::= */ + case 533: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy898 = ORDER_ASC; } break; - case 535: /* ordering_specification_opt ::= ASC */ + case 534: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy898 = ORDER_ASC; } break; - case 536: /* ordering_specification_opt ::= DESC */ + case 535: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy898 = ORDER_DESC; } break; - case 537: /* null_ordering_opt ::= */ + case 536: /* null_ordering_opt ::= */ { yymsp[1].minor.yy499 = NULL_ORDER_DEFAULT; } break; - case 538: /* null_ordering_opt ::= NULLS FIRST */ + case 537: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy499 = NULL_ORDER_FIRST; } break; - case 539: /* null_ordering_opt ::= NULLS LAST */ + case 538: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy499 = NULL_ORDER_LAST; } break; default: From 55fd615de841685490009edff5ab0296dc39c50c Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Mon, 12 Dec 2022 16:19:04 +0800 Subject: [PATCH 83/97] fix: disk full recovery issue --- source/dnode/mgmt/node_mgmt/src/dmNodes.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/dnode/mgmt/node_mgmt/src/dmNodes.c b/source/dnode/mgmt/node_mgmt/src/dmNodes.c index 6893e486bb..981797834a 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmNodes.c +++ b/source/dnode/mgmt/node_mgmt/src/dmNodes.c @@ -149,10 +149,13 @@ int32_t dmRunDnode(SDnode *pDnode) { return 0; } - if (count == 0) osUpdate(); - - count %= 10; - count++; + if (count == 10) { + osUpdate(); + count = 0; + } else { + count++; + } + taosMsleep(100); } } From 71587df60347ff76ee29b5aa74ef31f73df9a195 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 12 Dec 2022 17:34:32 +0800 Subject: [PATCH 84/97] enh: topic privilege --- source/dnode/mnode/impl/src/mndConsumer.c | 8 -- tests/parallel_test/cases.task | 1 + tests/script/tsim/user/privilege_topic.sim | 156 +++++++++++++++++++++ 3 files changed, 157 insertions(+), 8 deletions(-) create mode 100644 tests/script/tsim/user/privilege_topic.sim diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 8e2b17a963..37e2c35225 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -554,14 +554,6 @@ static int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { goto SUBSCRIBE_OVER; } - // check topic only -#if 0 - if (mndCheckDbPrivilegeByName(pMnode, pMsg->info.conn.user, MND_OPER_READ_DB, pTopic->db) != 0) { - mndReleaseTopic(pMnode, pTopic); - goto SUBSCRIBE_OVER; - } -#endif - if (mndCheckTopicPrivilege(pMnode, pMsg->info.conn.user, MND_OPER_SUBSCRIBE, pTopic) != 0) { mndReleaseTopic(pMnode, pTopic); goto SUBSCRIBE_OVER; diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 154eebb4de..4cbba106ba 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -10,6 +10,7 @@ ,,y,script,./test.sh -f tsim/user/password.sim ,,y,script,./test.sh -f tsim/user/privilege_db.sim ,,y,script,./test.sh -f tsim/user/privilege_sysinfo.sim +,,y,script,./test.sh -f tsim/user/privilege_topic.sim ,,y,script,./test.sh -f tsim/db/alter_option.sim ,,y,script,./test.sh -f tsim/db/alter_replica_13.sim ,,y,script,./test.sh -f tsim/db/alter_replica_31.sim diff --git a/tests/script/tsim/user/privilege_topic.sim b/tests/script/tsim/user/privilege_topic.sim new file mode 100644 index 0000000000..9ce5bebec3 --- /dev/null +++ b/tests/script/tsim/user/privilege_topic.sim @@ -0,0 +1,156 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/exec.sh -n dnode1 -s start +sql connect + +print =============== create db +sql create database root_d1 vgroups 1; +sql create database root_d2 vgroups 1; +sql create database root_d3 vgroups 1; + +sql show user privileges +if $rows != 1 then + return -1 +endi +if $data(root)[1] != all then + return -1 +endi +if $data(root)[2] != all then + return -1 +endi + +print =============== create users +sql create user user1 PASS 'taosdata' +sql create user user2 PASS 'taosdata' +sql create user user3 PASS 'taosdata' +sql create user user4 PASS 'taosdata' +sql create user user5 PASS 'taosdata' +sql create user user6 PASS 'taosdata' +sql alter user user1 sysinfo 0 + +sql select * from information_schema.ins_users +if $rows != 7 then + return -1 +endi + +sql GRANT read ON root_d1.* to user1; +sql GRANT write ON root_d2.* to user2; +sql GRANT read ON root_d3.* to user3; +sql GRANT write ON root_d3.* to user3; + +sql show user privileges +if $rows != 5 then + return -1 +endi +if $data(user1)[1] != read then + return -1 +endi +if $data(user1)[2] != root_d1 then + return -1 +endi +if $data(user2)[1] != write then + return -1 +endi +if $data(user2)[2] != root_d2 then + return -1 +endi + +print =============== create topis +sql use root_d1 +sql create table root_d1_stb (ts timestamp, i int) tags (j int) +sql create topic root_d1_topic1 as select ts, i from root_d1_stb +sql create topic root_d1_topic2 as select ts, i from root_d1_stb +sql create topic root_d1_topic3 as select ts, i from root_d1_stb +sql create topic root_d1_topic4 as select ts, i from root_d1_stb + +sql show user privileges +if $rows != 5 then + return -1 +endi + +sql GRANT subscribe ON root_d1_topic1 TO user4 +sql GRANT subscribe ON root_d1_topic2 TO user5 +sql GRANT subscribe ON root_d1_topic3 TO user6 +sql show user privileges +if $rows != 8 then + return -1 +endi + +if $data(user4)[1] != subscribe then + return -1 +endi +if $data(user4)[2] != root_d1_topic1 then + return -1 +endi +if $data(user5)[1] != subscribe then + return -1 +endi +if $data(user5)[2] != root_d1_topic2 then + return -1 +endi +if $data(user6)[1] != subscribe then + return -1 +endi +if $data(user6)[2] != root_d1_topic3 then + return -1 +endi + +sql REVOKE subscribe ON root_d1_topic3 from user6 +sql show user privileges +if $rows != 7 then + return -1 +endi +if $data(user4)[1] != subscribe then + return -1 +endi +if $data(user4)[2] != root_d1_topic1 then + return -1 +endi +if $data(user5)[1] != subscribe then + return -1 +endi +if $data(user5)[2] != root_d1_topic2 then + return -1 +endi + +print =============== repeat revoke/grant or invalid revoke/grant +sql GRANT subscribe ON root_d1_topic1 to user4 +sql GRANT subscribe ON root_d1_topic2 to user4 +sql GRANT subscribe ON root_d1_topic3 to user4 +sql GRANT subscribe ON root_d1_topic1 to user5 +sql GRANT subscribe ON root_d1_topic2 to user5 +sql GRANT subscribe ON root_d1_topic3 to user5 +sql GRANT subscribe ON root_d1_topic1 to user6 +sql GRANT subscribe ON root_d1_topic2 to user6 +sql GRANT subscribe ON root_d1_topic3 to user6 +sql REVOKE subscribe ON root_d1_topic1 from user4 +sql REVOKE subscribe ON root_d1_topic2 from user4 +sql REVOKE subscribe ON root_d1_topic3 from user4 +sql REVOKE subscribe ON root_d1_topic1 from user5 +sql REVOKE subscribe ON root_d1_topic2 from user5 +sql REVOKE subscribe ON root_d1_topic3 from user5 +sql REVOKE subscribe ON root_d1_topic1 from user6 +sql REVOKE subscribe ON root_d1_topic2 from user6 +sql REVOKE subscribe ON root_d1_topic3 from user6 + +print =============== invalid revoke/grant +sql_error GRANT subscribe ON root_d1_topicx from user5 +sql_error REVOKE subscribe ON root_d1_topicx from user5 + +print =============== check +sql GRANT subscribe ON root_d1_topic1 TO user4 +sql GRANT subscribe ON root_d1_topic2 TO user5 +sql GRANT subscribe ON root_d1_topic3 TO user6 +sql show user privileges +if $rows != 8 then + return -1 +endi + +print =============== re connect +print user u1 login +sql close +sql connect user1 + +sql_error show user privileges + +system sh/exec.sh -n dnode1 -s stop -x SIGINT From b03e3a81342ba6381d347817e0e6e988a0e7448b Mon Sep 17 00:00:00 2001 From: xinsheng Ren <285808407@qq.com> Date: Tue, 13 Dec 2022 10:57:48 +0800 Subject: [PATCH 85/97] FIX:TS-2258-mac cpuinfo has an extra enter character (#18916) * FIX:TS-2258-mac cpuinfo has an extra enter character * fix:TS-2258_static_check Co-authored-by: facetosea <25808407@qq.com> --- source/os/src/osSysinfo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/os/src/osSysinfo.c b/source/os/src/osSysinfo.c index 89b84ad395..eb989d6957 100644 --- a/source/os/src/osSysinfo.c +++ b/source/os/src/osSysinfo.c @@ -354,6 +354,10 @@ int32_t taosGetCpuInfo(char *cpuModel, int32_t maxLen, float *numOfCores) { code = 0; done |= 1; } + int endPos = strlen(cpuModel)-1; + if (cpuModel[endPos] == '\n') { + cpuModel[endPos] = '\0'; + } taosCloseCmd(&pCmd); pCmd = taosOpenCmd("sysctl -n machdep.cpu.core_count"); From 105558b1820781252b9852a2445419eb921f5ae4 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Tue, 13 Dec 2022 11:10:25 +0800 Subject: [PATCH 86/97] test: remove compatibility test from coverage test --- tests/script/coverage_test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/script/coverage_test.sh b/tests/script/coverage_test.sh index 3983f533da..b395047a1c 100755 --- a/tests/script/coverage_test.sh +++ b/tests/script/coverage_test.sh @@ -122,6 +122,9 @@ function runSimCases() { function runPythonCases() { echo "=== Run python cases ===" + + cd $TDENGINE_DIR/tests/parallel_test + sed -i '/compatibility.py/d' cases.task cd $TDENGINE_DIR/tests/system-test runCasesOneByOne ../parallel_test/cases.task system-test From 2f9753c540943f5343224077144dc60f0ccdd834 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 13 Dec 2022 14:18:03 +0800 Subject: [PATCH 87/97] event window query --- include/common/ttokendef.h | 142 +++++++++++---------- include/libs/nodes/plannodes.h | 2 + source/libs/nodes/src/nodesCloneFuncs.c | 2 + source/libs/nodes/src/nodesCodeFuncs.c | 41 ++++++ source/libs/nodes/src/nodesMsgFuncs.c | 48 +++++++ source/libs/nodes/src/nodesUtilFuncs.c | 12 ++ source/libs/parser/src/parTokenizer.c | 4 +- source/libs/planner/src/planLogicCreater.c | 10 +- source/libs/planner/src/planUtil.c | 11 ++ source/libs/planner/test/planEventTest.cpp | 33 +++++ 10 files changed, 226 insertions(+), 79 deletions(-) create mode 100644 source/libs/planner/test/planEventTest.cpp diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index fc630cfdc0..a09c87eea8 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -267,76 +267,78 @@ #define TK_BY 249 #define TK_SESSION 250 #define TK_STATE_WINDOW 251 -#define TK_SLIDING 252 -#define TK_FILL 253 -#define TK_VALUE 254 -#define TK_NONE 255 -#define TK_PREV 256 -#define TK_LINEAR 257 -#define TK_NEXT 258 -#define TK_HAVING 259 -#define TK_RANGE 260 -#define TK_EVERY 261 -#define TK_ORDER 262 -#define TK_SLIMIT 263 -#define TK_SOFFSET 264 -#define TK_LIMIT 265 -#define TK_OFFSET 266 -#define TK_ASC 267 -#define TK_NULLS 268 -#define TK_ABORT 269 -#define TK_AFTER 270 -#define TK_ATTACH 271 -#define TK_BEFORE 272 -#define TK_BEGIN 273 -#define TK_BITAND 274 -#define TK_BITNOT 275 -#define TK_BITOR 276 -#define TK_BLOCKS 277 -#define TK_CHANGE 278 -#define TK_COMMA 279 -#define TK_COMPACT 280 -#define TK_CONCAT 281 -#define TK_CONFLICT 282 -#define TK_COPY 283 -#define TK_DEFERRED 284 -#define TK_DELIMITERS 285 -#define TK_DETACH 286 -#define TK_DIVIDE 287 -#define TK_DOT 288 -#define TK_EACH 289 -#define TK_FAIL 290 -#define TK_FILE 291 -#define TK_FOR 292 -#define TK_GLOB 293 -#define TK_ID 294 -#define TK_IMMEDIATE 295 -#define TK_IMPORT 296 -#define TK_INITIALLY 297 -#define TK_INSTEAD 298 -#define TK_ISNULL 299 -#define TK_KEY 300 -#define TK_MODULES 301 -#define TK_NK_BITNOT 302 -#define TK_NK_SEMI 303 -#define TK_NOTNULL 304 -#define TK_OF 305 -#define TK_PLUS 306 -#define TK_PRIVILEGE 307 -#define TK_RAISE 308 -#define TK_REPLACE 309 -#define TK_RESTRICT 310 -#define TK_ROW 311 -#define TK_SEMI 312 -#define TK_STAR 313 -#define TK_STATEMENT 314 -#define TK_STRING 315 -#define TK_TIMES 316 -#define TK_UPDATE 317 -#define TK_VALUES 318 -#define TK_VARIABLE 319 -#define TK_VIEW 320 -#define TK_WAL 321 +#define TK_EVENT_WINDOW 252 +#define TK_START 253 +#define TK_SLIDING 254 +#define TK_FILL 255 +#define TK_VALUE 256 +#define TK_NONE 257 +#define TK_PREV 258 +#define TK_LINEAR 259 +#define TK_NEXT 260 +#define TK_HAVING 261 +#define TK_RANGE 262 +#define TK_EVERY 263 +#define TK_ORDER 264 +#define TK_SLIMIT 265 +#define TK_SOFFSET 266 +#define TK_LIMIT 267 +#define TK_OFFSET 268 +#define TK_ASC 269 +#define TK_NULLS 270 +#define TK_ABORT 271 +#define TK_AFTER 272 +#define TK_ATTACH 273 +#define TK_BEFORE 274 +#define TK_BEGIN 275 +#define TK_BITAND 276 +#define TK_BITNOT 277 +#define TK_BITOR 278 +#define TK_BLOCKS 279 +#define TK_CHANGE 280 +#define TK_COMMA 281 +#define TK_COMPACT 282 +#define TK_CONCAT 283 +#define TK_CONFLICT 284 +#define TK_COPY 285 +#define TK_DEFERRED 286 +#define TK_DELIMITERS 287 +#define TK_DETACH 288 +#define TK_DIVIDE 289 +#define TK_DOT 290 +#define TK_EACH 291 +#define TK_FAIL 292 +#define TK_FILE 293 +#define TK_FOR 294 +#define TK_GLOB 295 +#define TK_ID 296 +#define TK_IMMEDIATE 297 +#define TK_IMPORT 298 +#define TK_INITIALLY 299 +#define TK_INSTEAD 300 +#define TK_ISNULL 301 +#define TK_KEY 302 +#define TK_MODULES 303 +#define TK_NK_BITNOT 304 +#define TK_NK_SEMI 305 +#define TK_NOTNULL 306 +#define TK_OF 307 +#define TK_PLUS 308 +#define TK_PRIVILEGE 309 +#define TK_RAISE 310 +#define TK_REPLACE 311 +#define TK_RESTRICT 312 +#define TK_ROW 313 +#define TK_SEMI 314 +#define TK_STAR 315 +#define TK_STATEMENT 316 +#define TK_STRING 317 +#define TK_TIMES 318 +#define TK_UPDATE 319 +#define TK_VALUES 320 +#define TK_VARIABLE 321 +#define TK_VIEW 322 +#define TK_WAL 323 #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h index 0a2d76d097..6f700c75ed 100644 --- a/include/libs/nodes/plannodes.h +++ b/include/libs/nodes/plannodes.h @@ -511,6 +511,8 @@ typedef struct SEventWinodwPhysiNode { SNode* pEndCond; } SEventWinodwPhysiNode; +typedef SEventWinodwPhysiNode SStreamEventWinodwPhysiNode; + typedef struct SSortPhysiNode { SPhysiNode node; SNodeList* pExprs; // these are expression list of order_by_clause and parameter expression of aggregate function diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c index cfbab6c652..aab018c879 100644 --- a/source/libs/nodes/src/nodesCloneFuncs.c +++ b/source/libs/nodes/src/nodesCloneFuncs.c @@ -469,6 +469,8 @@ static int32_t logicWindowCopy(const SWindowLogicNode* pSrc, SWindowLogicNode* p CLONE_NODE_FIELD(pTspk); CLONE_NODE_FIELD(pTsEnd); CLONE_NODE_FIELD(pStateExpr); + CLONE_NODE_FIELD(pStartCond); + CLONE_NODE_FIELD(pEndCond); COPY_SCALAR_FIELD(triggerType); COPY_SCALAR_FIELD(watermark); COPY_SCALAR_FIELD(deleteMark); diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 0f9b3247e1..38884a37e0 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -235,6 +235,10 @@ const char* nodesNodeName(ENodeType type) { return "PhysiLastRowScan"; case QUERY_NODE_PHYSICAL_PLAN_TABLE_COUNT_SCAN: return "PhysiTableCountScan"; + case QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT: + return "PhysiMergeEventWindow"; + case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: + return "PhysiStreamEventWindow"; case QUERY_NODE_PHYSICAL_PLAN_PROJECT: return "PhysiProject"; case QUERY_NODE_PHYSICAL_PLAN_MERGE_JOIN: @@ -2274,6 +2278,37 @@ static int32_t jsonToPhysiStateWindowNode(const SJson* pJson, void* pObj) { return code; } +static const char* jkEventWindowPhysiPlanStartCond = "StartCond"; +static const char* jkEventWindowPhysiPlanEndCond = "EndCond"; + +static int32_t physiEventWindowNodeToJson(const void* pObj, SJson* pJson) { + const SEventWinodwPhysiNode* pNode = (const SEventWinodwPhysiNode*)pObj; + + int32_t code = physiWindowNodeToJson(pObj, pJson); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkEventWindowPhysiPlanStartCond, nodeToJson, pNode->pStartCond); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkEventWindowPhysiPlanEndCond, nodeToJson, pNode->pEndCond); + } + + return code; +} + +static int32_t jsonToPhysiEventWindowNode(const SJson* pJson, void* pObj) { + SEventWinodwPhysiNode* pNode = (SEventWinodwPhysiNode*)pObj; + + int32_t code = jsonToPhysiWindowNode(pJson, pObj); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkEventWindowPhysiPlanStartCond, &pNode->pStartCond); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkEventWindowPhysiPlanEndCond, &pNode->pEndCond); + } + + return code; +} + static const char* jkPartitionPhysiPlanExprs = "Exprs"; static const char* jkPartitionPhysiPlanPartitionKeys = "PartitionKeys"; static const char* jkPartitionPhysiPlanTargets = "Targets"; @@ -4746,6 +4781,9 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { case QUERY_NODE_PHYSICAL_PLAN_MERGE_STATE: case QUERY_NODE_PHYSICAL_PLAN_STREAM_STATE: return physiStateWindowNodeToJson(pObj, pJson); + case QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT: + case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: + return physiEventWindowNodeToJson(pObj, pJson); case QUERY_NODE_PHYSICAL_PLAN_PARTITION: return physiPartitionNodeToJson(pObj, pJson); case QUERY_NODE_PHYSICAL_PLAN_STREAM_PARTITION: @@ -4907,6 +4945,9 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { case QUERY_NODE_PHYSICAL_PLAN_MERGE_STATE: case QUERY_NODE_PHYSICAL_PLAN_STREAM_STATE: return jsonToPhysiStateWindowNode(pJson, pObj); + case QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT: + case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: + return jsonToPhysiEventWindowNode(pJson, pObj); case QUERY_NODE_PHYSICAL_PLAN_PARTITION: return jsonToPhysiPartitionNode(pJson, pObj); case QUERY_NODE_PHYSICAL_PLAN_STREAM_PARTITION: diff --git a/source/libs/nodes/src/nodesMsgFuncs.c b/source/libs/nodes/src/nodesMsgFuncs.c index cc9cb31d18..cb441053ce 100644 --- a/source/libs/nodes/src/nodesMsgFuncs.c +++ b/source/libs/nodes/src/nodesMsgFuncs.c @@ -2927,6 +2927,46 @@ static int32_t msgToPhysiStateWindowNode(STlvDecoder* pDecoder, void* pObj) { return code; } +enum { PHY_EVENT_CODE_WINDOW = 1, PHY_EVENT_CODE_START_COND, PHY_EVENT_CODE_END_COND }; + +static int32_t physiEventWindowNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { + const SEventWinodwPhysiNode* pNode = (const SEventWinodwPhysiNode*)pObj; + + int32_t code = tlvEncodeObj(pEncoder, PHY_EVENT_CODE_WINDOW, physiWindowNodeToMsg, &pNode->window); + if (TSDB_CODE_SUCCESS == code) { + code = tlvEncodeObj(pEncoder, PHY_EVENT_CODE_START_COND, nodeToMsg, pNode->pStartCond); + } + if (TSDB_CODE_SUCCESS == code) { + code = tlvEncodeObj(pEncoder, PHY_EVENT_CODE_END_COND, nodeToMsg, pNode->pEndCond); + } + + return code; +} + +static int32_t msgToPhysiEventWindowNode(STlvDecoder* pDecoder, void* pObj) { + SEventWinodwPhysiNode* pNode = (SEventWinodwPhysiNode*)pObj; + + int32_t code = TSDB_CODE_SUCCESS; + STlv* pTlv = NULL; + tlvForEach(pDecoder, pTlv, code) { + switch (pTlv->type) { + case PHY_EVENT_CODE_WINDOW: + code = tlvDecodeObjFromTlv(pTlv, msgToPhysiWindowNode, &pNode->window); + break; + case PHY_EVENT_CODE_START_COND: + code = msgToNodeFromTlv(pTlv, (void**)&pNode->pStartCond); + break; + case PHY_EVENT_CODE_END_COND: + code = msgToNodeFromTlv(pTlv, (void**)&pNode->pEndCond); + break; + default: + break; + } + } + + return code; +} + enum { PHY_PARTITION_CODE_BASE_NODE = 1, PHY_PARTITION_CODE_EXPR, PHY_PARTITION_CODE_KEYS, PHY_PARTITION_CODE_TARGETS }; static int32_t physiPartitionNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { @@ -3698,6 +3738,10 @@ static int32_t specificNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { case QUERY_NODE_PHYSICAL_PLAN_STREAM_STATE: code = physiStateWindowNodeToMsg(pObj, pEncoder); break; + case QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT: + case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: + code = physiEventWindowNodeToMsg(pObj, pEncoder); + break; case QUERY_NODE_PHYSICAL_PLAN_PARTITION: code = physiPartitionNodeToMsg(pObj, pEncoder); break; @@ -3837,6 +3881,10 @@ static int32_t msgToSpecificNode(STlvDecoder* pDecoder, void* pObj) { case QUERY_NODE_PHYSICAL_PLAN_STREAM_STATE: code = msgToPhysiStateWindowNode(pDecoder, pObj); break; + case QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT: + case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: + code = msgToPhysiEventWindowNode(pDecoder, pObj); + break; case QUERY_NODE_PHYSICAL_PLAN_PARTITION: code = msgToPhysiPartitionNode(pDecoder, pObj); break; diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 2f04375191..7980c58dcf 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -537,6 +537,10 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SStateWinodwPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_STREAM_STATE: return makeNode(type, sizeof(SStreamStateWinodwPhysiNode)); + case QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT: + return makeNode(type, sizeof(SEventWinodwPhysiNode)); + case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: + return makeNode(type, sizeof(SStreamEventWinodwPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_PARTITION: return makeNode(type, sizeof(SPartitionPhysiNode)); case QUERY_NODE_PHYSICAL_PLAN_STREAM_PARTITION: @@ -1241,6 +1245,14 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode(pPhyNode->pStateKey); break; } + case QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT: + case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: { + SEventWinodwPhysiNode* pPhyNode = (SEventWinodwPhysiNode*)pNode; + destroyWinodwPhysiNode((SWinodwPhysiNode*)pPhyNode); + nodesDestroyNode(pPhyNode->pStartCond); + nodesDestroyNode(pPhyNode->pEndCond); + break; + } case QUERY_NODE_PHYSICAL_PLAN_PARTITION: { destroyPartitionPhysiNode((SPartitionPhysiNode*)pNode); break; diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index e62b2f0f5a..1f9e4e9ab1 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -90,6 +90,7 @@ static SKeyword keywordTable[] = { {"EXISTS", TK_EXISTS}, {"EXPIRED", TK_EXPIRED}, {"EXPLAIN", TK_EXPLAIN}, + {"EVENT_WINDOW", TK_EVENT_WINDOW}, {"EVERY", TK_EVERY}, {"FILE", TK_FILE}, {"FILL", TK_FILL}, @@ -195,15 +196,16 @@ static SKeyword keywordTable[] = { {"SNODES", TK_SNODES}, {"SOFFSET", TK_SOFFSET}, {"SPLIT", TK_SPLIT}, - {"STT_TRIGGER", TK_STT_TRIGGER}, {"STABLE", TK_STABLE}, {"STABLES", TK_STABLES}, + {"START", TK_START}, {"STATE", TK_STATE}, {"STATE_WINDOW", TK_STATE_WINDOW}, {"STORAGE", TK_STORAGE}, {"STREAM", TK_STREAM}, {"STREAMS", TK_STREAMS}, {"STRICT", TK_STRICT}, + {"STT_TRIGGER", TK_STT_TRIGGER}, {"SUBSCRIBE", TK_SUBSCRIBE}, {"SUBSCRIPTIONS", TK_SUBSCRIPTIONS}, {"SUBTABLE", TK_SUBTABLE}, diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index e8b18d4016..205c70e0df 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -830,17 +830,11 @@ static int32_t createWindowLogicNodeByEvent(SLogicPlanContext* pCxt, SEventWindo pWindow->pStartCond = nodesCloneNode(pEvent->pStartCond); pWindow->pEndCond = nodesCloneNode(pEvent->pEndCond); pWindow->pTspk = nodesCloneNode(pEvent->pCol); - if (NULL == pWindow->pStateExpr || NULL == pWindow->pTspk) { + if (NULL == pWindow->pStartCond || NULL == pWindow->pEndCond || NULL == pWindow->pTspk) { nodesDestroyNode((SNode*)pWindow); return TSDB_CODE_OUT_OF_MEMORY; } - // rewrite the expression in subsequent clauses - int32_t code = rewriteExprForSelect(pWindow->pStateExpr, pSelect, SQL_CLAUSE_WINDOW); - if (TSDB_CODE_SUCCESS == code) { - code = createWindowLogicNodeFinalize(pCxt, pSelect, pWindow, pLogicNode); - } - - return code; + return createWindowLogicNodeFinalize(pCxt, pSelect, pWindow, pLogicNode); } static int32_t createWindowLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect, SLogicNode** pLogicNode) { diff --git a/source/libs/planner/src/planUtil.c b/source/libs/planner/src/planUtil.c index a13e959a36..72931413cc 100644 --- a/source/libs/planner/src/planUtil.c +++ b/source/libs/planner/src/planUtil.c @@ -197,6 +197,15 @@ static int32_t adjustStateDataRequirement(SWindowLogicNode* pWindow, EDataOrderL return TSDB_CODE_SUCCESS; } +static int32_t adjustEventDataRequirement(SWindowLogicNode* pWindow, EDataOrderLevel requirement) { + if (requirement <= pWindow->node.resultDataOrder) { + return TSDB_CODE_SUCCESS; + } + pWindow->node.resultDataOrder = requirement; + pWindow->node.requireDataOrder = requirement; + return TSDB_CODE_SUCCESS; +} + static int32_t adjustWindowDataRequirement(SWindowLogicNode* pWindow, EDataOrderLevel requirement) { switch (pWindow->winType) { case WINDOW_TYPE_INTERVAL: @@ -205,6 +214,8 @@ static int32_t adjustWindowDataRequirement(SWindowLogicNode* pWindow, EDataOrder return adjustSessionDataRequirement(pWindow, requirement); case WINDOW_TYPE_STATE: return adjustStateDataRequirement(pWindow, requirement); + case WINDOW_TYPE_EVENT: + return adjustEventDataRequirement(pWindow, requirement); default: break; } diff --git a/source/libs/planner/test/planEventTest.cpp b/source/libs/planner/test/planEventTest.cpp new file mode 100644 index 0000000000..c4db145998 --- /dev/null +++ b/source/libs/planner/test/planEventTest.cpp @@ -0,0 +1,33 @@ +/* + * 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 "planTestUtil.h" +#include "planner.h" + +using namespace std; + +class PlanEventTest : public PlannerTestBase {}; + +TEST_F(PlanEventTest, basic) { + useDb("root", "test"); + + run("SELECT COUNT(*) FROM t1 EVENT_WINDOW START WITH c1 > 10 END WITH c2 = 'abc'"); +} + +TEST_F(PlanEventTest, stable) { + useDb("root", "test"); + + run("SELECT COUNT(*) FROM st1 EVENT_WINDOW START WITH c1 > 10 END WITH c2 = 'abc'"); +} From b426fc899bb2d34aa91d18dd15440af37bf7b054 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 13 Dec 2022 16:24:30 +0800 Subject: [PATCH 88/97] docs: fix taosdump download link for 3.0 (#18930) --- docs/en/14-reference/06-taosdump.md | 2 +- docs/zh/14-reference/06-taosdump.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/14-reference/06-taosdump.md b/docs/en/14-reference/06-taosdump.md index e73441a96b..e88f069be9 100644 --- a/docs/en/14-reference/06-taosdump.md +++ b/docs/en/14-reference/06-taosdump.md @@ -19,7 +19,7 @@ Users should not use taosdump to back up raw data, environment settings, hardwar There are two ways to install taosdump: -- Install the taosTools official installer. Please find taosTools from [All download links](https://www.tdengine.com/all-downloads) page and download and install it. +- Install the taosTools official installer. Please find taosTools from [Release History](https://docs.taosdata.com/releases/tdengine/) page and download and install it. - Compile taos-tools separately and install it. Please refer to the [taos-tools](https://github.com/taosdata/taos-tools) repository for details. diff --git a/docs/zh/14-reference/06-taosdump.md b/docs/zh/14-reference/06-taosdump.md index 625499a949..534fca1e03 100644 --- a/docs/zh/14-reference/06-taosdump.md +++ b/docs/zh/14-reference/06-taosdump.md @@ -22,7 +22,7 @@ taosdump 是一个逻辑备份工具,它不应被用于备份任何原始数 taosdump 有两种安装方式: -- 安装 taosTools 官方安装包, 请从[所有下载链接](https://www.taosdata.com/all-downloads)页面找到 taosTools 并下载安装。 +- 安装 taosTools 官方安装包, 请从[发布历史页面](https://docs.taosdata.com/releases/tdengine/)页面找到 taosTools 并下载安装。 - 单独编译 taos-tools 并安装, 详情请参考 [taos-tools](https://github.com/taosdata/taos-tools) 仓库。 From 363070b7230544ac75543a5e0b79e4a1044c9dd3 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 13 Dec 2022 16:30:34 +0800 Subject: [PATCH 89/97] feat: event window query --- tests/script/tsim/stream/state0.sim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/script/tsim/stream/state0.sim b/tests/script/tsim/stream/state0.sim index 7c922658c9..ea7528b1cb 100644 --- a/tests/script/tsim/stream/state0.sim +++ b/tests/script/tsim/stream/state0.sim @@ -552,7 +552,7 @@ sql use test4; sql create table st (ts timestamp, c1 tinyint, c2 smallint) tags (t1 tinyint) ; sql create table t1 using st tags (-81) ; sql create table t2 using st tags (-81) ; -sql create stream if not exists streams4 trigger window_close into streamt4 as select _wstart AS start, min(c1),count(c1) from t1 state_window(c1); +sql create stream if not exists streams4 trigger window_close into streamt4 as select _wstart AS startts, min(c1),count(c1) from t1 state_window(c1); sql insert into t1 (ts, c1) values (1668073288209, 11); sql insert into t1 (ts, c1) values (1668073288210, 11); @@ -567,7 +567,7 @@ loop7: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then @@ -606,7 +606,7 @@ loop8: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then @@ -640,7 +640,7 @@ loop8: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then @@ -679,7 +679,7 @@ loop9: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then From a9435746a2eeb225eb31304ba8174c9cfa98459a Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 13 Dec 2022 17:47:29 +0800 Subject: [PATCH 90/97] docs: taosbenchmark retry (#18931) * docs: taosbenchmark support keey-trying and trying-interval * docs: taosbenchmark retry --- docs/en/14-reference/05-taosbenchmark.md | 10 ++++++++++ docs/zh/14-reference/05-taosbenchmark.md | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/docs/en/14-reference/05-taosbenchmark.md b/docs/en/14-reference/05-taosbenchmark.md index 6e08671e34..19feeb6740 100644 --- a/docs/en/14-reference/05-taosbenchmark.md +++ b/docs/en/14-reference/05-taosbenchmark.md @@ -204,6 +204,12 @@ taosBenchmark -A INT,DOUBLE,NCHAR,BINARY\(16\) - **-a/--replica ** : Specify the number of replicas when creating the database. The default value is 1. +- **-k/--keep-trying ** : + Keep trying if failed to insert, default is no. Available with v3.0.9+. + +- **-z/--trying-interval ** : + Specify interval between keep trying insert. Valid value is a postive number. Only valid when keep trying be enabled. Available with v3.0.9+. + - **-V/--version** : Show version information only. Users should not use it with other parameters. @@ -231,6 +237,10 @@ The parameters listed in this section apply to all function modes. `filetype` must be set to `insert` in the insertion scenario. See [General Configuration Parameters](#General Configuration Parameters) +- ** keep_trying ** : Keep trying if failed to insert, default is no. Available with v3.0.9+. + +- ** trying_interval ** : Specify interval between keep trying insert. Valid value is a postive number. Only valid when keep trying be enabled. Available with v3.0.9+. + #### Database related configuration parameters The parameters related to database creation are configured in `dbinfo` in the json configuration file, as follows. The other parameters correspond to the database parameters specified when `create database` in [../../taos-sql/database]. diff --git a/docs/zh/14-reference/05-taosbenchmark.md b/docs/zh/14-reference/05-taosbenchmark.md index 76dd5f12d8..9091e71d1f 100644 --- a/docs/zh/14-reference/05-taosbenchmark.md +++ b/docs/zh/14-reference/05-taosbenchmark.md @@ -204,6 +204,10 @@ taosBenchmark -A INT,DOUBLE,NCHAR,BINARY\(16\) - **-a/--replica ** : 创建数据库时指定其副本数,默认值为 1 。 +- ** -k/--keep-trying ** : 失败后进行重试的次数,默认不重试。需使用 v3.0.9 以上版本。 + +- ** -z/--trying-interval ** : 失败重试间隔时间,单位为毫秒,仅在 -k 指定重试后有效。需使用 v3.0.9 以上版本。 + - **-V/--version** : 显示版本信息并退出。不能与其它参数混用。 @@ -231,6 +235,10 @@ taosBenchmark -A INT,DOUBLE,NCHAR,BINARY\(16\) 插入场景下 `filetype` 必须设置为 `insert`,该参数及其它通用参数详见[通用配置参数](#通用配置参数) +- ** keep_trying ** : 失败后进行重试的次数,默认不重试。需使用 v3.0.9 以上版本。 + +- ** trying_interval ** : 失败重试间隔时间,单位为毫秒,仅在 keep_trying 指定重试后有效。需使用 v3.0.9 以上版本。 + #### 数据库相关配置参数 创建数据库时的相关参数在 json 配置文件中的 `dbinfo` 中配置,个别具体参数如下。其余参数均与 TDengine 中 `create database` 时所指定的数据库参数相对应,详见[../../taos-sql/database] From 748d5de38f68dae6926cea4a8b2db644919e82a6 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 13 Dec 2022 17:56:01 +0800 Subject: [PATCH 91/97] docs: fix tools download link (#18932) * docs: fix taosdump download link for 3.0 * docs: fix tools download link --- docs/en/14-reference/06-taosdump.md | 2 +- docs/zh/14-reference/06-taosdump.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/14-reference/06-taosdump.md b/docs/en/14-reference/06-taosdump.md index e88f069be9..9c63b4dc03 100644 --- a/docs/en/14-reference/06-taosdump.md +++ b/docs/en/14-reference/06-taosdump.md @@ -19,7 +19,7 @@ Users should not use taosdump to back up raw data, environment settings, hardwar There are two ways to install taosdump: -- Install the taosTools official installer. Please find taosTools from [Release History](https://docs.taosdata.com/releases/tdengine/) page and download and install it. +- Install the taosTools official installer. Please find taosTools from [Release History](https://docs.taosdata.com/releases/tools/) page and download and install it. - Compile taos-tools separately and install it. Please refer to the [taos-tools](https://github.com/taosdata/taos-tools) repository for details. diff --git a/docs/zh/14-reference/06-taosdump.md b/docs/zh/14-reference/06-taosdump.md index 534fca1e03..8a031d1473 100644 --- a/docs/zh/14-reference/06-taosdump.md +++ b/docs/zh/14-reference/06-taosdump.md @@ -22,7 +22,7 @@ taosdump 是一个逻辑备份工具,它不应被用于备份任何原始数 taosdump 有两种安装方式: -- 安装 taosTools 官方安装包, 请从[发布历史页面](https://docs.taosdata.com/releases/tdengine/)页面找到 taosTools 并下载安装。 +- 安装 taosTools 官方安装包, 请从[发布历史页面](https://docs.taosdata.com/releases/tools/)页面找到 taosTools 并下载安装。 - 单独编译 taos-tools 并安装, 详情请参考 [taos-tools](https://github.com/taosdata/taos-tools) 仓库。 From 99d997012a4b3dcf29d6a99c344adc5372c2d35c Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 13 Dec 2022 20:12:35 +0800 Subject: [PATCH 92/97] feat: event window query --- tests/system-test/0-others/taosdShell.py | 2 +- tests/system-test/1-insert/database_pre_suf.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/system-test/0-others/taosdShell.py b/tests/system-test/0-others/taosdShell.py index 7ad7e4d0ef..2125b5eebe 100644 --- a/tests/system-test/0-others/taosdShell.py +++ b/tests/system-test/0-others/taosdShell.py @@ -136,7 +136,7 @@ class TDTestCase: tdSql.query("use source_db") tdSql.query("create table if not exists source_db.stb (ts timestamp, k int) tags (a int);") tdSql.query("create table source_db.ct1 using source_db.stb tags(1000);create table source_db.ct2 using source_db.stb tags(2000);create table source_db.ct3 using source_db.stb tags(3000);") - tdSql.query("create stream s1 into source_db.output_stb as select _wstart AS start, min(k), max(k), sum(k) from source_db.stb interval(10m);") + tdSql.query("create stream s1 into source_db.output_stb as select _wstart AS startts, min(k), max(k), sum(k) from source_db.stb interval(10m);") #TD-19944 -Q=3 diff --git a/tests/system-test/1-insert/database_pre_suf.py b/tests/system-test/1-insert/database_pre_suf.py index 862edbdde9..488dfebff5 100755 --- a/tests/system-test/1-insert/database_pre_suf.py +++ b/tests/system-test/1-insert/database_pre_suf.py @@ -108,7 +108,7 @@ class TDTestCase: # create stream - tdSql.execute('''create stream current_stream into stream_max_stable_1 as select _wstart as start, _wend as wend, max(q_int) as max_int, min(q_bigint) as min_int from stable_1 where ts is not null interval (5s);''') + tdSql.execute('''create stream current_stream into stream_max_stable_1 as select _wstart as startts, _wend as wend, max(q_int) as max_int, min(q_bigint) as min_int from stable_1 where ts is not null interval (5s);''') # insert data for i in range(num_random*n): @@ -187,20 +187,20 @@ class TDTestCase: sleep(5) # stream data check - tdSql.query("select start,wend,max_int from stream_max_stable_1 ;") + tdSql.query("select startts,wend,max_int from stream_max_stable_1 ;") tdSql.checkRows(20) tdSql.query("select sum(max_int) from stream_max_stable_1 ;") stream_data_1 = tdSql.queryResult[0][0] tdSql.query("select sum(min_int) from stream_max_stable_1 ;") stream_data_2 = tdSql.queryResult[0][0] - tdSql.query("select sum(max_int),sum(min_int) from (select _wstart as start, _wend as wend, max(q_int) as max_int, min(q_bigint) as min_int from stable_1 where ts is not null interval (5s));") + tdSql.query("select sum(max_int),sum(min_int) from (select _wstart as startts, _wend as wend, max(q_int) as max_int, min(q_bigint) as min_int from stable_1 where ts is not null interval (5s));") sql_data_1 = tdSql.queryResult[0][0] sql_data_2 = tdSql.queryResult[0][1] self.stream_value_check(stream_data_1,sql_data_1) self.stream_value_check(stream_data_2,sql_data_2) - tdSql.query("select sum(max_int),sum(min_int) from (select _wstart as start, _wend as wend, max(q_int) as max_int, min(q_bigint) as min_int from stable_1 interval (5s));") + tdSql.query("select sum(max_int),sum(min_int) from (select _wstart as startts, _wend as wend, max(q_int) as max_int, min(q_bigint) as min_int from stable_1 interval (5s));") sql_data_1 = tdSql.queryResult[0][0] sql_data_2 = tdSql.queryResult[0][1] From 5dee5afadfaad1524babf12bc8770897a0aa0d11 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 14 Dec 2022 11:03:12 +0800 Subject: [PATCH 93/97] fix: taos shell show reconnect after tried twice (#18934) * fix: taos shell prompt for websocket * fix: show disconnected after retry twice --- tools/shell/src/shellWebsocket.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/shell/src/shellWebsocket.c b/tools/shell/src/shellWebsocket.c index add3ccc51f..ebcd6b9002 100644 --- a/tools/shell/src/shellWebsocket.c +++ b/tools/shell/src/shellWebsocket.c @@ -223,11 +223,14 @@ void shellRunSingleCommandWebsocketImp(char *command) { if (code == TSDB_CODE_WS_SEND_TIMEOUT || code == TSDB_CODE_WS_RECV_TIMEOUT) { fprintf(stderr, "Hint: use -t to increase the timeout in seconds\n"); } else if (code == TSDB_CODE_WS_INTERNAL_ERRO || code == TSDB_CODE_WS_CLOSED) { - fprintf(stderr, "TDengine server is disconnected, will try to reconnect\n"); shell.ws_conn = NULL; } ws_free_result(res); - if (reconnectNum == 0) continue; + if (reconnectNum == 0) { + continue; + } else { + fprintf(stderr, "TDengine server is disconnected, will try to reconnect\n"); + } return; } break; From c2fc3a4bbb9c295b8708de2c71832034dd858b26 Mon Sep 17 00:00:00 2001 From: WANG MINGMING Date: Wed, 14 Dec 2022 14:51:11 +0800 Subject: [PATCH 94/97] Update 50-opentsdb-json.mdx --- docs/zh/07-develop/03-insert-data/50-opentsdb-json.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/zh/07-develop/03-insert-data/50-opentsdb-json.mdx b/docs/zh/07-develop/03-insert-data/50-opentsdb-json.mdx index 89818409c5..e1fd3dacc8 100644 --- a/docs/zh/07-develop/03-insert-data/50-opentsdb-json.mdx +++ b/docs/zh/07-develop/03-insert-data/50-opentsdb-json.mdx @@ -47,7 +47,6 @@ OpenTSDB JSON 格式协议采用一个 JSON 字符串表示一行或多行数据 :::note - 对于 JSON 格式协议,TDengine 并不会自动把所有标签转成 NCHAR 类型, 字符串将将转为 NCHAR 类型, 数值将同样转换为 DOUBLE 类型。 -- TDengine 只接收 JSON **数组格式**的字符串,即使一行数据也需要转换成数组形式。 - 默认生成的子表名是根据规则生成的唯一 ID 值。用户也可以通过在 taos.cfg 里配置 smlChildTableName 参数来指定某个标签值作为子表名。该标签值应该具有全局唯一性。举例如下:假设有个标签名为tname, 配置 smlChildTableName=tname, 插入数据为 `"tags": { "host": "web02","dc": "lga","tname":"cpu1"}` 则创建的子表名为 cpu1。注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。 ::: From 7720e501dafa42c54f5feb7e6394667308de1d0c Mon Sep 17 00:00:00 2001 From: WANG MINGMING Date: Wed, 14 Dec 2022 14:52:07 +0800 Subject: [PATCH 95/97] Update 50-opentsdb-json.mdx --- docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx b/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx index 7a3ac6bad3..214580c179 100644 --- a/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx +++ b/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx @@ -47,7 +47,6 @@ Please refer to [OpenTSDB HTTP API](http://opentsdb.net/docs/build/html/api_http :::note - In JSON protocol, strings will be converted to NCHAR type and numeric values will be converted to double type. -- Only data in array format is accepted and so an array must be used even if there is only one row. - The child table name is created automatically in a rule to guarantee its uniqueness. But you can configure `smlChildTableName` in taos.cfg to specify a tag value as the table names if the tag value is unique globally. For example, if a tag is called `tname` and you set `smlChildTableName=tname` in taos.cfg, when you insert `st,tname=cpu1,t1=4 c1=3 1626006833639000000`, the child table `cpu1` will be automatically created. Note that if multiple rows have the same tname but different tag_set values, the tag_set of the first row is used to create the table and the others are ignored. ::: From 86c50d5181c2d72cb24ad30159f7968539aaf2e0 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 15 Dec 2022 20:43:35 +0800 Subject: [PATCH 96/97] fix: taos shell ws take timing with null inputed (#18957) --- tools/shell/src/shellWebsocket.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/shell/src/shellWebsocket.c b/tools/shell/src/shellWebsocket.c index ebcd6b9002..bbb127b128 100644 --- a/tools/shell/src/shellWebsocket.c +++ b/tools/shell/src/shellWebsocket.c @@ -37,7 +37,9 @@ static int horizontalPrintWebsocket(WS_RES* wres, double* execute_time) { const void* data = NULL; int rows; ws_fetch_block(wres, &data, &rows); - *execute_time += (double)(ws_take_timing(wres)/1E6); + if (wres) { + *execute_time += (double)(ws_take_timing(wres)/1E6); + } if (!rows) { return 0; } @@ -77,7 +79,9 @@ static int verticalPrintWebsocket(WS_RES* wres, double* pexecute_time) { int rows = 0; const void* data = NULL; ws_fetch_block(wres, &data, &rows); - *pexecute_time += (double)(ws_take_timing(wres)/1E6); + if (wres) { + *pexecute_time += (double)(ws_take_timing(wres)/1E6); + } if (!rows) { return 0; } @@ -129,7 +133,9 @@ static int dumpWebsocketToFile(const char* fname, WS_RES* wres, double* pexecute int rows = 0; const void* data = NULL; ws_fetch_block(wres, &data, &rows); - *pexecute_time += (double)(ws_take_timing(wres)/1E6); + if (wres) { + *pexecute_time += (double)(ws_take_timing(wres)/1E6); + } if (!rows) { taosCloseFile(&pFile); return 0; @@ -236,7 +242,10 @@ void shellRunSingleCommandWebsocketImp(char *command) { break; } - double execute_time = ws_take_timing(res)/1E6; + double execute_time = 0; + if (res) { + execute_time = ws_take_timing(res)/1E6; + } if (shellRegexMatch(command, "^\\s*use\\s+[a-zA-Z0-9_]+\\s*;\\s*$", REG_EXTENDED | REG_ICASE)) { fprintf(stdout, "Database changed.\r\n\r\n"); From 876dff899c4cbf765e8681ea1119682b9cc236aa Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 16 Dec 2022 10:58:15 +0800 Subject: [PATCH 97/97] fix: taosbenchmark min max delay (#18967) * fix: taosbenchmark delay array overflow * fix: update taos-tools eebd42e * fix: taosbenchmark delay list update taos-tools ad6ae3c --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index d468e0acd3..71f42db14e 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 121c8a3 + GIT_TAG ad6ae3c SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE