diff --git a/cmake/taosadapter_CMakeLists.txt.in b/cmake/taosadapter_CMakeLists.txt.in
index 1a2f5d396f..16444c07f2 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 05fb2ff
+ GIT_TAG be729ab
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter"
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
diff --git a/docs/en/07-develop/01-connect/_connect_cs.mdx b/docs/en/07-develop/01-connect/_connect_cs.mdx
index 77fe269945..b81f49b2f0 100644
--- a/docs/en/07-develop/01-connect/_connect_cs.mdx
+++ b/docs/en/07-develop/01-connect/_connect_cs.mdx
@@ -2,7 +2,6 @@
{{#include docs/examples/csharp/connect/Program.cs}}
```
-:::info
-C# connector supports only native connection for now.
-
-:::
+```csharp title="WebSocket Connection"
+{{#include docs/examples/csharp/wsConnect/Program.cs}}
+```
diff --git a/docs/en/14-reference/03-connector/06-rust.mdx b/docs/en/14-reference/03-connector/06-rust.mdx
index 530287e2a4..edc3016cde 100644
--- a/docs/en/14-reference/03-connector/06-rust.mdx
+++ b/docs/en/14-reference/03-connector/06-rust.mdx
@@ -116,7 +116,7 @@ The parameters are described as follows:
- **protocol**: Specify which connection method to use. For example, `taos+ws://localhost:6041` uses Websocket to establish connections.
- **username/password**: Username and password used to create connections.
- **host/port**: Specifies the server and port to establish a connection. If you do not specify a hostname or port, native connections default to `localhost:6030` and Websocket connections default to `localhost:6041`.
-- **database**: Specify the default database to connect to.
+- **database**: Specify the default database to connect to. It's optional.
- **params**:Optional parameters.
A sample DSN description string is as follows:
diff --git a/docs/en/14-reference/03-connector/09-csharp.mdx b/docs/en/14-reference/03-connector/09-csharp.mdx
index c51c542c26..87a10e17ca 100644
--- a/docs/en/14-reference/03-connector/09-csharp.mdx
+++ b/docs/en/14-reference/03-connector/09-csharp.mdx
@@ -17,7 +17,7 @@ import CSAsyncQuery from "../../07-develop/04-query-data/_cs_async.mdx"
`TDengine.Connector` is a C# language connector provided by TDengine that allows C# developers to develop C# applications that access TDengine cluster data.
-The `TDengine.Connector` connector supports connect to TDengine instances via the TDengine client driver (taosc), providing data writing, querying, subscription, schemaless writing, bind interface, etc. The `TDengine.Connector` currently does not provide a REST connection interface. Developers can write their RESTful application by referring to the [REST API](/reference/rest-api/) documentation.
+The `TDengine.Connector` connector supports connect to TDengine instances via the TDengine client driver (taosc), providing data writing, querying, subscription, schemaless writing, bind interface, etc.The `TDengine.Connector` also supports WebSocket and developers can build connection through DSN, which supports data writing, querying, and parameter binding, etc.
This article describes how to install `TDengine.Connector` in a Linux or Windows environment and connect to TDengine clusters via `TDengine.Connector` to perform basic operations such as data writing and querying.
@@ -35,6 +35,10 @@ Please refer to [version support list](/reference/connector#version-support)
## Supported features
+
+
+
+
1. Connection Management
2. General Query
3. Continuous Query
@@ -42,6 +46,18 @@ Please refer to [version support list](/reference/connector#version-support)
5. Subscription
6. Schemaless
+
+
+
+
+1. Connection Management
+2. General Query
+3. Continuous Query
+4. Parameter Binding
+
+
+
+
## Installation Steps
### Pre-installation preparation
@@ -74,11 +90,17 @@ cp -r src/ myProject
cd myProject
dotnet add exmaple.csproj reference src/TDengine.csproj
```
+
## Establish a Connection
+
+
+
+
+
``` csharp
using TDengineDriver;
@@ -112,14 +134,62 @@ namespace TDengineExample
```
+
+
+
+
+The structure of the DSN description string is as follows:
+
+```text
+[]://[[:@]:][/][?=[&=]]
+|------------|---|-----------|-----------|------|------|------------|-----------------------|
+| protocol | | username | password | host | port | database | params |
+```
+
+The parameters are described as follows:
+
+* **protocol**: Specify which connection method to use (support http/ws). For example, `ws://localhost:6041` uses Websocket to establish connections.
+* **username/password**: Username and password used to create connections.
+* **host/port**: Specifies the server and port to establish a connection. Websocket connections default to `localhost:6041`.
+* **database**: Specify the default database to connect to. It's optional.
+* **params**:Optional parameters.
+
+A sample DSN description string is as follows:
+
+```text
+ws://localhost:6041/test
+```
+
+``` csharp
+{{#include docs/examples/csharp/wsConnect/Program.cs}}
+```
+
+
+
+
## Usage examples
### Write data
#### SQL Write
+
+
+
+
+
+
+
+
+```csharp
+{{#include docs/examples/csharp/wsInsert/Program.cs}}
+```
+
+
+
+
#### InfluxDB line protocol write
@@ -132,12 +202,48 @@ namespace TDengineExample
+#### Parameter Binding
+
+
+
+
+
+``` csharp
+{{#include docs/examples/csharp/stmtInsert/Program.cs}}
+```
+
+
+
+
+
+```csharp
+{{#include docs/examples/csharp/wsStmt/Program.cs}}
+```
+
+
+
+
### Query data
#### Synchronous Query
+
+
+
+
+
+
+
+
+```csharp
+{{#include docs/examples/csharp/wsQuery/Program.cs}}
+```
+
+
+
+
#### Asynchronous query
@@ -145,18 +251,21 @@ namespace TDengineExample
### More sample programs
|Sample program |Sample program description |
-|--------------------------------------------------------------------------------------------------------------------|------------ --------------------------------|
+|--------------------------------------------------------------------------------------------------------------------|--------------------------------------------|
| [CURD](https://github.com/taosdata/taos-connector-dotnet/blob/3.0/examples/Query/Query.cs) | Table creation, data insertion, and query examples with TDengine.Connector |
| [JSON Tag](https://github.com/taosdata/taos-connector-dotnet/blob/3.0/examples/JSONTag) | Writing and querying JSON tag data with TDengine Connector |
| [stmt](https://github.com/taosdata/taos-connector-dotnet/tree/3.0/examples/Stmt) | Parameter binding with TDengine Connector |
| [schemaless](https://github.com/taosdata/taos-connector-dotnet/blob/3.0/examples/schemaless) | Schemaless writes with TDengine Connector |
| [async query](https://github.com/taosdata/taos-connector-dotnet/blob/3.0/examples/AsyncQuery/QueryAsync.cs) | Asynchronous queries with TDengine Connector |
-| [TMQ](https://github.com/taosdata/taos-connector-dotnet/blob/3.0/examples/TMQ/TMQ.cs) | Data subscription with TDengine Connector |
+| [Subscription](https://github.com/taosdata/taos-connector-dotnet/blob/3.0/examples/TMQ/TMQ.cs) | Subscription example with TDengine Connector |
+| [Basic WebSocket Usage](https://github.com/taosdata/taos-connector-dotnet/blob/5a4a7cd0dbcda114447cdc6d0c6dedd8e84a52da/examples/WS/WebSocketSample.cs) | WebSocket basic data in and out with TDengine connector |
+| [WebSocket Parameter Binding](https://github.com/taosdata/taos-connector-dotnet/blob/5a4a7cd0dbcda114447cdc6d0c6dedd8e84a52da/examples/WS/WebSocketSTMT.cs) | WebSocket parameter binding example |
## Important update records
| TDengine.Connector | Description |
|--------------------|--------------------------------|
+| 3.0.1 | Support WebSocket and Cloud,With function query, insert, and parameter binding|
| 3.0.0 | Supports TDengine 3.0.0.0. TDengine 2.x is not supported. Added `TDengine.Impl.GetData()` interface to deserialize query results. |
| 1.0.7 | Fixed TDengine.Query() memory leak. |
| 1.0.6 | Fix schemaless bug in 1.0.4 and 1.0.5. |
diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md
index 02921c3f6a..5ab6f59454 100644
--- a/docs/en/14-reference/12-config/index.md
+++ b/docs/en/14-reference/12-config/index.md
@@ -164,7 +164,7 @@ The parameters described in this document by the effect that they have on the sy
| Attribute | Description |
| -------- | -------------------- |
| Applicable | Client only |
-| 含义 | SMA index optimization policy |
+| Meaning | SMA index optimization policy |
| Unit | None |
| Default Value | 0 |
| Notes |
@@ -325,7 +325,7 @@ The charset that takes effect is UTF-8.
| Applicable | Server Only |
| Meaning | Maximum number of vnodes per dnode |
| Value Range | 0-4096 |
-| Default Value | 256 |
+| Default Value | 2x the CPU cores |
## Time Parameters
@@ -697,152 +697,154 @@ To prevent system resource from being exhausted by multiple concurrent streams,
| 15 | telemetryPort | No | Yes |
| 16 | queryPolicy | No | Yes |
| 17 | querySmaOptimize | No | Yes |
-| 18 | queryBufferSize | Yes | Yes |
-| 19 | maxNumOfDistinctRes | Yes | Yes |
-| 20 | minSlidingTime | Yes | Yes |
-| 21 | minIntervalTime | Yes | Yes |
-| 22 | countAlwaysReturnValue | Yes | Yes |
-| 23 | dataDir | Yes | Yes |
-| 24 | minimalDataDirGB | Yes | Yes |
-| 25 | supportVnodes | No | Yes |
-| 26 | tempDir | Yes | Yes |
-| 27 | minimalTmpDirGB | Yes | Yes |
-| 28 | compressMsgSize | Yes | Yes |
-| 29 | compressColData | Yes | Yes |
-| 30 | smlChildTableName | Yes | Yes |
-| 31 | smlTagName | Yes | Yes |
-| 32 | smlDataFormat | No | Yes |
-| 33 | statusInterval | Yes | Yes |
-| 34 | shellActivityTimer | Yes | Yes |
-| 35 | transPullupInterval | No | Yes |
-| 36 | mqRebalanceInterval | No | Yes |
-| 37 | ttlUnit | No | Yes |
-| 38 | ttlPushInterval | No | Yes |
-| 39 | numOfTaskQueueThreads | No | Yes |
-| 40 | numOfRpcThreads | No | Yes |
-| 41 | numOfCommitThreads | Yes | Yes |
-| 42 | numOfMnodeReadThreads | No | Yes |
-| 43 | numOfVnodeQueryThreads | No | Yes |
-| 44 | numOfVnodeStreamThreads | No | Yes |
-| 45 | numOfVnodeFetchThreads | No | Yes |
-| 46 | numOfVnodeWriteThreads | No | Yes |
-| 47 | numOfVnodeSyncThreads | 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 |
-| 58 | debugFlag | Yes | Yes |
-| 59 | tmrDebugFlag | Yes | Yes |
-| 60 | uDebugFlag | Yes | Yes |
-| 61 | rpcDebugFlag | Yes | Yes |
-| 62 | jniDebugFlag | Yes | Yes |
-| 63 | qDebugFlag | Yes | Yes |
-| 64 | cDebugFlag | Yes | Yes |
-| 65 | dDebugFlag | Yes | Yes |
-| 66 | vDebugFlag | Yes | Yes |
-| 67 | mDebugFlag | Yes | Yes |
-| 68 | wDebugFlag | Yes | Yes |
-| 69 | sDebugFlag | Yes | Yes |
-| 70 | tsdbDebugFlag | Yes | Yes |
-| 71 | tqDebugFlag | No | Yes |
-| 72 | fsDebugFlag | Yes | Yes |
-| 73 | udfDebugFlag | No | Yes |
-| 74 | smaDebugFlag | No | Yes |
-| 75 | idxDebugFlag | No | Yes |
-| 76 | tdbDebugFlag | No | Yes |
-| 77 | metaDebugFlag | No | Yes |
-| 78 | timezone | Yes | Yes |
-| 79 | locale | Yes | Yes |
-| 80 | charset | Yes | Yes |
-| 81 | udf | Yes | Yes |
-| 82 | enableCoreFile | Yes | Yes |
-| 83 | arbitrator | Yes | No |
-| 84 | numOfThreadsPerCore | Yes | No |
-| 85 | numOfMnodes | Yes | No |
-| 86 | vnodeBak | Yes | No |
-| 87 | balance | Yes | No |
-| 88 | balanceInterval | Yes | No |
-| 89 | offlineThreshold | Yes | No |
-| 90 | role | Yes | No |
-| 91 | dnodeNopLoop | Yes | No |
-| 92 | keepTimeOffset | Yes | No |
-| 93 | rpcTimer | Yes | No |
-| 94 | rpcMaxTime | Yes | No |
-| 95 | rpcForceTcp | Yes | No |
-| 96 | tcpConnTimeout | Yes | No |
-| 97 | syncCheckInterval | Yes | No |
-| 98 | maxTmrCtrl | Yes | No |
-| 99 | monitorReplica | Yes | No |
-| 100 | smlTagNullName | Yes | No |
-| 101 | keepColumnName | Yes | No |
-| 102 | ratioOfQueryCores | Yes | No |
-| 103 | maxStreamCompDelay | Yes | No |
-| 104 | maxFirstStreamCompDelay | Yes | No |
-| 105 | retryStreamCompDelay | Yes | No |
-| 106 | streamCompDelayRatio | Yes | No |
-| 107 | maxVgroupsPerDb | Yes | No |
-| 108 | maxTablesPerVnode | Yes | No |
-| 109 | minTablesPerVnode | Yes | No |
-| 110 | tableIncStepPerVnode | Yes | No |
-| 111 | cache | Yes | No |
-| 112 | blocks | Yes | No |
-| 113 | days | Yes | No |
-| 114 | keep | Yes | No |
-| 115 | minRows | Yes | No |
-| 116 | maxRows | Yes | No |
-| 117 | quorum | Yes | No |
-| 118 | comp | Yes | No |
-| 119 | walLevel | Yes | No |
-| 120 | fsync | Yes | No |
-| 121 | replica | Yes | No |
-| 122 | partitions | Yes | No |
-| 123 | quorum | Yes | No |
-| 124 | update | Yes | No |
-| 125 | cachelast | Yes | No |
-| 126 | maxSQLLength | Yes | No |
-| 127 | maxWildCardsLength | Yes | No |
-| 128 | maxRegexStringLen | Yes | No |
-| 129 | maxNumOfOrderedRes | Yes | No |
-| 130 | maxConnections | Yes | No |
-| 131 | mnodeEqualVnodeNum | Yes | No |
-| 132 | http | Yes | No |
-| 133 | httpEnableRecordSql | Yes | No |
-| 134 | httpMaxThreads | Yes | No |
-| 135 | restfulRowLimit | Yes | No |
-| 136 | httpDbNameMandatory | Yes | No |
-| 137 | httpKeepAlive | Yes | No |
-| 138 | enableRecordSql | Yes | No |
-| 139 | maxBinaryDisplayWidth | Yes | No |
-| 140 | stream | Yes | No |
-| 141 | retrieveBlockingModel | Yes | No |
-| 142 | tsdbMetaCompactRatio | Yes | No |
-| 143 | defaultJSONStrType | Yes | No |
-| 144 | walFlushSize | Yes | No |
-| 145 | keepTimeOffset | Yes | No |
-| 146 | flowctrl | Yes | No |
-| 147 | slaveQuery | Yes | No |
-| 148 | adjustMaster | Yes | No |
-| 149 | topicBinaryLen | Yes | No |
-| 150 | telegrafUseFieldNum | Yes | No |
-| 151 | deadLockKillQuery | Yes | No |
-| 152 | clientMerge | Yes | No |
-| 153 | sdbDebugFlag | Yes | No |
-| 154 | odbcDebugFlag | Yes | No |
-| 155 | httpDebugFlag | Yes | No |
-| 156 | monDebugFlag | Yes | No |
-| 157 | cqDebugFlag | Yes | No |
-| 158 | shortcutFlag | Yes | No |
-| 159 | probeSeconds | Yes | No |
-| 160 | probeKillSeconds | Yes | No |
-| 161 | probeInterval | Yes | No |
-| 162 | lossyColumns | Yes | No |
-| 163 | fPrecision | Yes | No |
-| 164 | dPrecision | Yes | No |
-| 165 | maxRange | Yes | No |
-| 166 | range | Yes | No |
+| 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 | numOfVnodeWriteThreads | No | Yes |
+| 48 | numOfVnodeSyncThreads | No | Yes |
+| 49 | numOfVnodeRsmaThreads | No | Yes |
+| 50 | numOfQnodeQueryThreads | No | Yes |
+| 51 | numOfQnodeFetchThreads | No | Yes |
+| 52 | numOfSnodeSharedThreads | No | Yes |
+| 53 | numOfSnodeUniqueThreads | No | Yes |
+| 54 | rpcQueueMemoryAllowed | No | Yes |
+| 55 | logDir | Yes | Yes |
+| 56 | minimalLogDirGB | Yes | Yes |
+| 57 | numOfLogLines | Yes | Yes |
+| 58 | asyncLog | Yes | Yes |
+| 59 | 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 |
diff --git a/docs/zh/08-connector/26-rust.mdx b/docs/zh/08-connector/26-rust.mdx
index b838e5c5a2..f6b99beed3 100644
--- a/docs/zh/08-connector/26-rust.mdx
+++ b/docs/zh/08-connector/26-rust.mdx
@@ -116,7 +116,7 @@ DSN 描述字符串基本结构如下:
- **protocol**: 显示指定以何种方式建立连接,例如:`taos+ws://localhost:6041` 指定以 Websocket 方式建立连接。
- **username/password**: 用于创建连接的用户名及密码。
- **host/port**: 指定创建连接的服务器及端口,当不指定服务器地址及端口时(`taos://`),原生连接默认为 `localhost:6030`,Websocket 连接默认为 `localhost:6041` 。
-- **database**: 指定默认连接的数据库名。
+- **database**: 指定默认连接的数据库名,可选参数。
- **params**:其他可选参数。
一个完整的 DSN 描述字符串示例如下:
diff --git a/docs/zh/08-connector/40-csharp.mdx b/docs/zh/08-connector/40-csharp.mdx
index f78fd9e3d9..e99f41ae9c 100644
--- a/docs/zh/08-connector/40-csharp.mdx
+++ b/docs/zh/08-connector/40-csharp.mdx
@@ -154,7 +154,7 @@ namespace TDengineExample
* **host/port**: 指定创建连接的服务器及端口,WebSocket 连接默认为 `localhost:6041` 。
-* **database**: 指定默认连接的数据库名。
+* **database**: 指定默认连接的数据库名,可选参数。
* **params**:其他可选参数。
diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md
index 7b31e10572..179a3c6df0 100644
--- a/docs/zh/14-reference/12-config/index.md
+++ b/docs/zh/14-reference/12-config/index.md
@@ -325,7 +325,7 @@ charset 的有效值是 UTF-8。
| 适用范围 | 仅服务端适用 |
| 含义 | dnode 支持的最大 vnode 数目 |
| 取值范围 | 0-4096 |
-| 缺省值 | 256 |
+| 缺省值 | CPU 核数的 2 倍 |
## 时间相关
@@ -668,153 +668,154 @@ charset 的有效值是 UTF-8。
| 15 | telemetryPort | 否 | 是 |
| 16 | queryPolicy | 否 | 是 |
| 17 | querySmaOptimize | 否 | 是 |
-| 18 | queryBufferSize | 是 | 是 |
-| 19 | maxNumOfDistinctRes | 是 | 是 |
-| 20 | minSlidingTime | 是 | 是 |
-| 21 | minIntervalTime | 是 | 是 |
-| 22 | countAlwaysReturnValue | 是 | 是 |
-| 23 | dataDir | 是 | 是 |
-| 24 | minimalDataDirGB | 是 | 是 |
-| 25 | supportVnodes | 否 | 是 |
-| 26 | tempDir | 是 | 是 |
-| 27 | minimalTmpDirGB | 是 | 是 |
-| 28 | compressMsgSize | 是 | 是 |
-| 29 | compressColData | 是 | 是 |
-| 30 | smlChildTableName | 是 | 是 |
-| 31 | smlTagName | 是 | 是 |
-| 32 | smlDataFormat | 否 | 是 |
-| 33 | statusInterval | 是 | 是 |
-| 34 | shellActivityTimer | 是 | 是 |
-| 35 | transPullupInterval | 否 | 是 |
-| 36 | mqRebalanceInterval | 否 | 是 |
-| 37 | ttlUnit | 否 | 是 |
-| 38 | ttlPushInterval | 否 | 是 |
-| 39 | numOfTaskQueueThreads | 否 | 是 |
-| 40 | numOfRpcThreads | 否 | 是 |
-| 41 | numOfCommitThreads | 是 | 是 |
-| 42 | numOfMnodeReadThreads | 否 | 是 |
-| 43 | numOfVnodeQueryThreads | 否 | 是 |
-| 44 | numOfVnodeStreamThreads | 否 | 是 |
-| 45 | numOfVnodeFetchThreads | 否 | 是 |
-| 46 | numOfVnodeWriteThreads | 否 | 是 |
-| 47 | numOfVnodeSyncThreads | 否 | 是 |
-| 48 | numOfVnodeRsmaThreads | 否 | 是 |
-| 49 | numOfQnodeQueryThreads | 否 | 是 |
-| 50 | numOfQnodeFetchThreads | 否 | 是 |
-| 51 | numOfSnodeSharedThreads | 否 | 是 |
-| 52 | numOfSnodeUniqueThreads | 否 | 是 |
-| 53 | rpcQueueMemoryAllowed | 否 | 是 |
-| 54 | logDir | 是 | 是 |
-| 55 | minimalLogDirGB | 是 | 是 |
-| 56 | numOfLogLines | 是 | 是 |
-| 57 | asyncLog | 是 | 是 |
-| 58 | logKeepDays | 是 | 是 |
-| 59 | debugFlag | 是 | 是 |
-| 60 | tmrDebugFlag | 是 | 是 |
-| 61 | uDebugFlag | 是 | 是 |
-| 62 | rpcDebugFlag | 是 | 是 |
-| 63 | jniDebugFlag | 是 | 是 |
-| 64 | qDebugFlag | 是 | 是 |
-| 65 | cDebugFlag | 是 | 是 |
-| 66 | dDebugFlag | 是 | 是 |
-| 67 | vDebugFlag | 是 | 是 |
-| 68 | mDebugFlag | 是 | 是 |
-| 69 | wDebugFlag | 是 | 是 |
-| 70 | sDebugFlag | 是 | 是 |
-| 71 | tsdbDebugFlag | 是 | 是 |
-| 72 | tqDebugFlag | 否 | 是 |
-| 73 | fsDebugFlag | 是 | 是 |
-| 74 | udfDebugFlag | 否 | 是 |
-| 75 | smaDebugFlag | 否 | 是 |
-| 76 | idxDebugFlag | 否 | 是 |
-| 77 | tdbDebugFlag | 否 | 是 |
-| 78 | metaDebugFlag | 否 | 是 |
-| 79 | timezone | 是 | 是 |
-| 80 | locale | 是 | 是 |
-| 81 | charset | 是 | 是 |
-| 82 | udf | 是 | 是 |
-| 83 | enableCoreFile | 是 | 是 |
-| 84 | arbitrator | 是 | 否 |
-| 85 | numOfThreadsPerCore | 是 | 否 |
-| 86 | numOfMnodes | 是 | 否 |
-| 87 | vnodeBak | 是 | 否 |
-| 88 | balance | 是 | 否 |
-| 89 | balanceInterval | 是 | 否 |
-| 90 | offlineThreshold | 是 | 否 |
-| 91 | role | 是 | 否 |
-| 92 | dnodeNopLoop | 是 | 否 |
-| 93 | keepTimeOffset | 是 | 否 |
-| 94 | rpcTimer | 是 | 否 |
-| 95 | rpcMaxTime | 是 | 否 |
-| 96 | rpcForceTcp | 是 | 否 |
-| 97 | tcpConnTimeout | 是 | 否 |
-| 98 | syncCheckInterval | 是 | 否 |
-| 99 | maxTmrCtrl | 是 | 否 |
-| 100 | monitorReplica | 是 | 否 |
-| 101 | smlTagNullName | 是 | 否 |
-| 102 | keepColumnName | 是 | 否 |
-| 103 | ratioOfQueryCores | 是 | 否 |
-| 104 | maxStreamCompDelay | 是 | 否 |
-| 105 | maxFirstStreamCompDelay | 是 | 否 |
-| 106 | retryStreamCompDelay | 是 | 否 |
-| 107 | streamCompDelayRatio | 是 | 否 |
-| 108 | maxVgroupsPerDb | 是 | 否 |
-| 109 | maxTablesPerVnode | 是 | 否 |
-| 110 | minTablesPerVnode | 是 | 否 |
-| 111 | tableIncStepPerVnode | 是 | 否 |
-| 112 | cache | 是 | 否 |
-| 113 | blocks | 是 | 否 |
-| 114 | days | 是 | 否 |
-| 115 | keep | 是 | 否 |
-| 116 | minRows | 是 | 否 |
-| 117 | maxRows | 是 | 否 |
-| 118 | quorum | 是 | 否 |
-| 119 | comp | 是 | 否 |
-| 120 | walLevel | 是 | 否 |
-| 121 | fsync | 是 | 否 |
-| 122 | replica | 是 | 否 |
-| 123 | partitions | 是 | 否 |
-| 124 | quorum | 是 | 否 |
-| 125 | update | 是 | 否 |
-| 126 | cachelast | 是 | 否 |
-| 127 | maxSQLLength | 是 | 否 |
-| 128 | maxWildCardsLength | 是 | 否 |
-| 129 | maxRegexStringLen | 是 | 否 |
-| 130 | maxNumOfOrderedRes | 是 | 否 |
-| 131 | maxConnections | 是 | 否 |
-| 132 | mnodeEqualVnodeNum | 是 | 否 |
-| 133 | http | 是 | 否 |
-| 134 | httpEnableRecordSql | 是 | 否 |
-| 135 | httpMaxThreads | 是 | 否 |
-| 136 | restfulRowLimit | 是 | 否 |
-| 137 | httpDbNameMandatory | 是 | 否 |
-| 138 | httpKeepAlive | 是 | 否 |
-| 139 | enableRecordSql | 是 | 否 |
-| 140 | maxBinaryDisplayWidth | 是 | 否 |
-| 141 | stream | 是 | 否 |
-| 142 | retrieveBlockingModel | 是 | 否 |
-| 143 | tsdbMetaCompactRatio | 是 | 否 |
-| 144 | defaultJSONStrType | 是 | 否 |
-| 145 | walFlushSize | 是 | 否 |
-| 146 | keepTimeOffset | 是 | 否 |
-| 147 | flowctrl | 是 | 否 |
-| 148 | slaveQuery | 是 | 否 |
-| 149 | adjustMaster | 是 | 否 |
-| 150 | topicBinaryLen | 是 | 否 |
-| 151 | telegrafUseFieldNum | 是 | 否 |
-| 152 | deadLockKillQuery | 是 | 否 |
-| 153 | clientMerge | 是 | 否 |
-| 154 | sdbDebugFlag | 是 | 否 |
-| 155 | odbcDebugFlag | 是 | 否 |
-| 156 | httpDebugFlag | 是 | 否 |
-| 157 | monDebugFlag | 是 | 否 |
-| 158 | cqDebugFlag | 是 | 否 |
-| 159 | shortcutFlag | 是 | 否 |
-| 160 | probeSeconds | 是 | 否 |
-| 161 | probeKillSeconds | 是 | 否 |
-| 162 | probeInterval | 是 | 否 |
-| 163 | lossyColumns | 是 | 否 |
-| 164 | fPrecision | 是 | 否 |
-| 165 | dPrecision | 是 | 否 |
-| 166 | maxRange | 是 | 否 |
-| 167 | range | 是 | 否 |
+| 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 | numOfVnodeWriteThreads | 否 | 是 |
+| 48 | numOfVnodeSyncThreads | 否 | 是 |
+| 49 | numOfVnodeRsmaThreads | 否 | 是 |
+| 50 | numOfQnodeQueryThreads | 否 | 是 |
+| 51 | numOfQnodeFetchThreads | 否 | 是 |
+| 52 | numOfSnodeSharedThreads | 否 | 是 |
+| 53 | numOfSnodeUniqueThreads | 否 | 是 |
+| 54 | rpcQueueMemoryAllowed | 否 | 是 |
+| 55 | logDir | 是 | 是 |
+| 56 | minimalLogDirGB | 是 | 是 |
+| 57 | numOfLogLines | 是 | 是 |
+| 58 | asyncLog | 是 | 是 |
+| 59 | 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 | 是 | 否 |
+| 86 | numOfThreadsPerCore | 是 | 否 |
+| 87 | numOfMnodes | 是 | 否 |
+| 88 | vnodeBak | 是 | 否 |
+| 89 | balance | 是 | 否 |
+| 90 | balanceInterval | 是 | 否 |
+| 91 | offlineThreshold | 是 | 否 |
+| 92 | role | 是 | 否 |
+| 93 | dnodeNopLoop | 是 | 否 |
+| 94 | keepTimeOffset | 是 | 否 |
+| 95 | rpcTimer | 是 | 否 |
+| 96 | rpcMaxTime | 是 | 否 |
+| 97 | rpcForceTcp | 是 | 否 |
+| 98 | tcpConnTimeout | 是 | 否 |
+| 99 | syncCheckInterval | 是 | 否 |
+| 100 | maxTmrCtrl | 是 | 否 |
+| 101 | monitorReplica | 是 | 否 |
+| 102 | smlTagNullName | 是 | 否 |
+| 103 | keepColumnName | 是 | 否 |
+| 104 | ratioOfQueryCores | 是 | 否 |
+| 105 | maxStreamCompDelay | 是 | 否 |
+| 106 | maxFirstStreamCompDelay | 是 | 否 |
+| 107 | retryStreamCompDelay | 是 | 否 |
+| 108 | streamCompDelayRatio | 是 | 否 |
+| 109 | maxVgroupsPerDb | 是 | 否 |
+| 110 | maxTablesPerVnode | 是 | 否 |
+| 111 | minTablesPerVnode | 是 | 否 |
+| 112 | tableIncStepPerVnode | 是 | 否 |
+| 113 | cache | 是 | 否 |
+| 114 | blocks | 是 | 否 |
+| 115 | days | 是 | 否 |
+| 116 | keep | 是 | 否 |
+| 117 | minRows | 是 | 否 |
+| 118 | maxRows | 是 | 否 |
+| 119 | quorum | 是 | 否 |
+| 120 | comp | 是 | 否 |
+| 121 | walLevel | 是 | 否 |
+| 122 | fsync | 是 | 否 |
+| 123 | replica | 是 | 否 |
+| 124 | partitions | 是 | 否 |
+| 125 | quorum | 是 | 否 |
+| 126 | update | 是 | 否 |
+| 127 | cachelast | 是 | 否 |
+| 128 | maxSQLLength | 是 | 否 |
+| 129 | maxWildCardsLength | 是 | 否 |
+| 130 | maxRegexStringLen | 是 | 否 |
+| 131 | maxNumOfOrderedRes | 是 | 否 |
+| 132 | maxConnections | 是 | 否 |
+| 133 | mnodeEqualVnodeNum | 是 | 否 |
+| 134 | http | 是 | 否 |
+| 135 | httpEnableRecordSql | 是 | 否 |
+| 136 | httpMaxThreads | 是 | 否 |
+| 137 | restfulRowLimit | 是 | 否 |
+| 138 | httpDbNameMandatory | 是 | 否 |
+| 139 | httpKeepAlive | 是 | 否 |
+| 140 | enableRecordSql | 是 | 否 |
+| 141 | maxBinaryDisplayWidth | 是 | 否 |
+| 142 | stream | 是 | 否 |
+| 143 | retrieveBlockingModel | 是 | 否 |
+| 144 | tsdbMetaCompactRatio | 是 | 否 |
+| 145 | defaultJSONStrType | 是 | 否 |
+| 146 | walFlushSize | 是 | 否 |
+| 147 | keepTimeOffset | 是 | 否 |
+| 148 | flowctrl | 是 | 否 |
+| 149 | slaveQuery | 是 | 否 |
+| 150 | adjustMaster | 是 | 否 |
+| 151 | topicBinaryLen | 是 | 否 |
+| 152 | telegrafUseFieldNum | 是 | 否 |
+| 153 | deadLockKillQuery | 是 | 否 |
+| 154 | clientMerge | 是 | 否 |
+| 155 | sdbDebugFlag | 是 | 否 |
+| 156 | odbcDebugFlag | 是 | 否 |
+| 157 | httpDebugFlag | 是 | 否 |
+| 158 | monDebugFlag | 是 | 否 |
+| 159 | cqDebugFlag | 是 | 否 |
+| 160 | shortcutFlag | 是 | 否 |
+| 161 | probeSeconds | 是 | 否 |
+| 162 | probeKillSeconds | 是 | 否 |
+| 163 | probeInterval | 是 | 否 |
+| 164 | lossyColumns | 是 | 否 |
+| 165 | fPrecision | 是 | 否 |
+| 166 | dPrecision | 是 | 否 |
+| 167 | maxRange | 是 | 否 |
+| 168 | range | 是 | 否 |
diff --git a/include/common/tglobal.h b/include/common/tglobal.h
index 33c4daac4b..9b69bec5b3 100644
--- a/include/common/tglobal.h
+++ b/include/common/tglobal.h
@@ -94,6 +94,7 @@ extern int64_t tsQueryBufferSizeBytes; // maximum allowed usage buffer size in
// query client
extern int32_t tsQueryPolicy;
extern int32_t tsQuerySmaOptimize;
+extern int32_t tsQueryRsmaTolerance;
extern bool tsQueryPlannerTrace;
extern int32_t tsQueryNodeChunkSize;
extern bool tsQueryUseNodeAllocator;
diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h
index 3e170d5098..0111b03aac 100644
--- a/include/common/ttokendef.h
+++ b/include/common/ttokendef.h
@@ -234,96 +234,100 @@
#define TK_CURRENT_USER 216
#define TK_COUNT 217
#define TK_LAST_ROW 218
-#define TK_BETWEEN 219
-#define TK_IS 220
-#define TK_NK_LT 221
-#define TK_NK_GT 222
-#define TK_NK_LE 223
-#define TK_NK_GE 224
-#define TK_NK_NE 225
-#define TK_MATCH 226
-#define TK_NMATCH 227
-#define TK_CONTAINS 228
-#define TK_IN 229
-#define TK_JOIN 230
-#define TK_INNER 231
-#define TK_SELECT 232
-#define TK_DISTINCT 233
-#define TK_WHERE 234
-#define TK_PARTITION 235
-#define TK_BY 236
-#define TK_SESSION 237
-#define TK_STATE_WINDOW 238
-#define TK_SLIDING 239
-#define TK_FILL 240
-#define TK_VALUE 241
-#define TK_NONE 242
-#define TK_PREV 243
-#define TK_LINEAR 244
-#define TK_NEXT 245
-#define TK_HAVING 246
-#define TK_RANGE 247
-#define TK_EVERY 248
-#define TK_ORDER 249
-#define TK_SLIMIT 250
-#define TK_SOFFSET 251
-#define TK_LIMIT 252
-#define TK_OFFSET 253
-#define TK_ASC 254
-#define TK_NULLS 255
-#define TK_ABORT 256
-#define TK_AFTER 257
-#define TK_ATTACH 258
-#define TK_BEFORE 259
-#define TK_BEGIN 260
-#define TK_BITAND 261
-#define TK_BITNOT 262
-#define TK_BITOR 263
-#define TK_BLOCKS 264
-#define TK_CHANGE 265
-#define TK_COMMA 266
-#define TK_COMPACT 267
-#define TK_CONCAT 268
-#define TK_CONFLICT 269
-#define TK_COPY 270
-#define TK_DEFERRED 271
-#define TK_DELIMITERS 272
-#define TK_DETACH 273
-#define TK_DIVIDE 274
-#define TK_DOT 275
-#define TK_EACH 276
-#define TK_END 277
-#define TK_FAIL 278
-#define TK_FILE 279
-#define TK_FOR 280
-#define TK_GLOB 281
-#define TK_ID 282
-#define TK_IMMEDIATE 283
-#define TK_IMPORT 284
-#define TK_INITIALLY 285
-#define TK_INSTEAD 286
-#define TK_ISNULL 287
-#define TK_KEY 288
-#define TK_NK_BITNOT 289
-#define TK_NK_SEMI 290
-#define TK_NOTNULL 291
-#define TK_OF 292
-#define TK_PLUS 293
-#define TK_PRIVILEGE 294
-#define TK_RAISE 295
-#define TK_REPLACE 296
-#define TK_RESTRICT 297
-#define TK_ROW 298
-#define TK_SEMI 299
-#define TK_STAR 300
-#define TK_STATEMENT 301
-#define TK_STRING 302
-#define TK_TIMES 303
-#define TK_UPDATE 304
-#define TK_VALUES 305
-#define TK_VARIABLE 306
-#define TK_VIEW 307
-#define TK_WAL 308
+#define TK_CASE 219
+#define TK_END 220
+#define TK_WHEN 221
+#define TK_THEN 222
+#define TK_ELSE 223
+#define TK_BETWEEN 224
+#define TK_IS 225
+#define TK_NK_LT 226
+#define TK_NK_GT 227
+#define TK_NK_LE 228
+#define TK_NK_GE 229
+#define TK_NK_NE 230
+#define TK_MATCH 231
+#define TK_NMATCH 232
+#define TK_CONTAINS 233
+#define TK_IN 234
+#define TK_JOIN 235
+#define TK_INNER 236
+#define TK_SELECT 237
+#define TK_DISTINCT 238
+#define TK_WHERE 239
+#define TK_PARTITION 240
+#define TK_BY 241
+#define TK_SESSION 242
+#define TK_STATE_WINDOW 243
+#define TK_SLIDING 244
+#define TK_FILL 245
+#define TK_VALUE 246
+#define TK_NONE 247
+#define TK_PREV 248
+#define TK_LINEAR 249
+#define TK_NEXT 250
+#define TK_HAVING 251
+#define TK_RANGE 252
+#define TK_EVERY 253
+#define TK_ORDER 254
+#define TK_SLIMIT 255
+#define TK_SOFFSET 256
+#define TK_LIMIT 257
+#define TK_OFFSET 258
+#define TK_ASC 259
+#define TK_NULLS 260
+#define TK_ABORT 261
+#define TK_AFTER 262
+#define TK_ATTACH 263
+#define TK_BEFORE 264
+#define TK_BEGIN 265
+#define TK_BITAND 266
+#define TK_BITNOT 267
+#define TK_BITOR 268
+#define TK_BLOCKS 269
+#define TK_CHANGE 270
+#define TK_COMMA 271
+#define TK_COMPACT 272
+#define TK_CONCAT 273
+#define TK_CONFLICT 274
+#define TK_COPY 275
+#define TK_DEFERRED 276
+#define TK_DELIMITERS 277
+#define TK_DETACH 278
+#define TK_DIVIDE 279
+#define TK_DOT 280
+#define TK_EACH 281
+#define TK_FAIL 282
+#define TK_FILE 283
+#define TK_FOR 284
+#define TK_GLOB 285
+#define TK_ID 286
+#define TK_IMMEDIATE 287
+#define TK_IMPORT 288
+#define TK_INITIALLY 289
+#define TK_INSTEAD 290
+#define TK_ISNULL 291
+#define TK_KEY 292
+#define TK_NK_BITNOT 293
+#define TK_NK_SEMI 294
+#define TK_NOTNULL 295
+#define TK_OF 296
+#define TK_PLUS 297
+#define TK_PRIVILEGE 298
+#define TK_RAISE 299
+#define TK_REPLACE 300
+#define TK_RESTRICT 301
+#define TK_ROW 302
+#define TK_SEMI 303
+#define TK_STAR 304
+#define TK_STATEMENT 305
+#define TK_STRING 306
+#define TK_TIMES 307
+#define TK_UPDATE 308
+#define TK_VALUES 309
+#define TK_VARIABLE 310
+#define TK_VIEW 311
+#define TK_WAL 312
#define TK_NK_SPACE 300
#define TK_NK_COMMENT 301
diff --git a/include/libs/function/function.h b/include/libs/function/function.h
index 65ddc180d6..60c7b18367 100644
--- a/include/libs/function/function.h
+++ b/include/libs/function/function.h
@@ -78,7 +78,6 @@ enum {
MAIN_SCAN = 0x0u,
REVERSE_SCAN = 0x1u, // todo remove it
REPEAT_SCAN = 0x2u, // repeat scan belongs to the master scan
- MERGE_STAGE = 0x20u,
};
typedef struct SPoint1 {
@@ -156,11 +155,6 @@ typedef struct SqlFunctionCtx {
char udfName[TSDB_FUNC_NAME_LEN];
} SqlFunctionCtx;
-enum {
- TEXPR_BINARYEXPR_NODE = 0x1,
- TEXPR_UNARYEXPR_NODE = 0x2,
-};
-
typedef struct tExprNode {
int32_t nodeType;
union {
@@ -182,8 +176,9 @@ struct SScalarParam {
SColumnInfoData *columnData;
SHashObj *pHashFilter;
int32_t hashValueType;
- void *param; // other parameter, such as meta handle from vnode, to extract table name/tag value
+ void *param; // other parameter, such as meta handle from vnode, to extract table name/tag value
int32_t numOfRows;
+ int32_t numOfQualified; // number of qualified elements in the final results
};
void cleanupResultRowEntry(struct SResultRowEntryInfo *pCell);
@@ -201,8 +196,6 @@ int32_t taosGetLinearInterpolationVal(SPoint *point, int32_t outputType, SPoint
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// udf api
-struct SUdfInfo;
-
/**
* create udfd proxy, called once in process that call doSetupUdf/callUdfxxx/doTeardownUdf
* @return error code
@@ -226,6 +219,7 @@ int32_t udfStartUdfd(int32_t startDnodeId);
* @return
*/
int32_t udfStopUdfd();
+
#ifdef __cplusplus
}
#endif
diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h
index 634dae9ec5..301e11fd17 100644
--- a/include/libs/nodes/nodes.h
+++ b/include/libs/nodes/nodes.h
@@ -103,6 +103,8 @@ typedef enum ENodeType {
QUERY_NODE_STREAM_OPTIONS,
QUERY_NODE_LEFT_VALUE,
QUERY_NODE_COLUMN_REF,
+ QUERY_NODE_WHEN_THEN,
+ QUERY_NODE_CASE_WHEN,
// Statement nodes are used in parser and planner module.
QUERY_NODE_SET_OPERATOR = 100,
diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h
index 1e86a04775..31d67a85a7 100644
--- a/include/libs/nodes/plannodes.h
+++ b/include/libs/nodes/plannodes.h
@@ -165,7 +165,8 @@ typedef struct SVnodeModifyLogicNode {
typedef struct SExchangeLogicNode {
SLogicNode node;
- int32_t srcGroupId;
+ int32_t srcStartGroupId;
+ int32_t srcEndGroupId;
} SExchangeLogicNode;
typedef struct SMergeLogicNode {
@@ -399,7 +400,10 @@ typedef struct SDownstreamSourceNode {
typedef struct SExchangePhysiNode {
SPhysiNode node;
- int32_t srcGroupId; // group id of datasource suplans
+ // for set operators, there will be multiple execution groups under one exchange, and the ids of these execution
+ // groups are consecutive
+ int32_t srcStartGroupId;
+ int32_t srcEndGroupId;
bool singleChannel;
SNodeList* pSrcEndPoints; // element is SDownstreamSource, scheduler fill by calling qSetSuplanExecutionNode
} SExchangePhysiNode;
diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h
index e90c994e8f..9b150159fd 100644
--- a/include/libs/nodes/querynodes.h
+++ b/include/libs/nodes/querynodes.h
@@ -241,6 +241,19 @@ typedef struct SFillNode {
STimeWindow timeRange;
} SFillNode;
+typedef struct SWhenThenNode {
+ SExprNode node; // QUERY_NODE_WHEN_THEN
+ SNode* pWhen;
+ SNode* pThen;
+} SWhenThenNode;
+
+typedef struct SCaseWhenNode {
+ SExprNode node; // QUERY_NODE_CASE_WHEN
+ SNode* pCase;
+ SNode* pElse;
+ SNodeList* pWhenThenList;
+} SCaseWhenNode;
+
typedef struct SSelectStmt {
ENodeType type; // QUERY_NODE_SELECT_STMT
bool isDistinct;
diff --git a/include/libs/scalar/filter.h b/include/libs/scalar/filter.h
index 1f1d9dea93..e02b4a6172 100644
--- a/include/libs/scalar/filter.h
+++ b/include/libs/scalar/filter.h
@@ -31,13 +31,17 @@ enum {
FLT_OPTION_NEED_UNIQE = 4,
};
+#define FILTER_RESULT_ALL_QUALIFIED 0x1
+#define FILTER_RESULT_NONE_QUALIFIED 0x2
+#define FILTER_RESULT_PARTIAL_QUALIFIED 0x3
+
typedef struct SFilterColumnParam {
int32_t numOfCols;
SArray *pDataBlock;
} SFilterColumnParam;
extern int32_t filterInitFromNode(SNode *pNode, SFilterInfo **pinfo, uint32_t options);
-extern bool filterExecute(SFilterInfo *info, SSDataBlock *pSrc, int8_t **p, SColumnDataAgg *statis, int16_t numOfCols);
+extern bool filterExecute(SFilterInfo *info, SSDataBlock *pSrc, SColumnInfoData** p, SColumnDataAgg *statis, int16_t numOfCols, int32_t* pFilterResStatus);
extern int32_t filterSetDataFromSlotId(SFilterInfo *info, void *param);
extern int32_t filterSetDataFromColId(SFilterInfo *info, void *param);
extern int32_t filterGetTimeRange(SNode *pNode, STimeWindow *win, bool *isStrict);
diff --git a/include/util/taoserror.h b/include/util/taoserror.h
index 840e7309fe..837d0c6303 100644
--- a/include/util/taoserror.h
+++ b/include/util/taoserror.h
@@ -552,7 +552,6 @@ int32_t* taosGetErrno();
#define TSDB_CODE_PAR_VALUE_TOO_LONG TAOS_DEF_ERROR_CODE(0, 0x2653)
#define TSDB_CODE_PAR_INVALID_DELETE_WHERE TAOS_DEF_ERROR_CODE(0, 0x2655)
#define TSDB_CODE_PAR_INVALID_REDISTRIBUTE_VG TAOS_DEF_ERROR_CODE(0, 0x2656)
-
#define TSDB_CODE_PAR_FILL_NOT_ALLOWED_FUNC TAOS_DEF_ERROR_CODE(0, 0x2657)
#define TSDB_CODE_PAR_INVALID_WINDOW_PC TAOS_DEF_ERROR_CODE(0, 0x2658)
#define TSDB_CODE_PAR_WINDOW_NOT_ALLOWED_FUNC TAOS_DEF_ERROR_CODE(0, 0x2659)
@@ -565,6 +564,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_PAR_INVALID_SELECTED_EXPR TAOS_DEF_ERROR_CODE(0, 0x2661)
#define TSDB_CODE_PAR_GET_META_ERROR TAOS_DEF_ERROR_CODE(0, 0x2662)
#define TSDB_CODE_PAR_NOT_UNIQUE_TABLE_ALIAS TAOS_DEF_ERROR_CODE(0, 0x2663)
+#define TSDB_CODE_PAR_NOT_SUPPORT_JOIN TAOS_DEF_ERROR_CODE(0, 0x2664)
#define TSDB_CODE_PAR_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x26FF)
//planner
diff --git a/include/util/tdef.h b/include/util/tdef.h
index 840a2671fa..0c7c2ea3a3 100644
--- a/include/util/tdef.h
+++ b/include/util/tdef.h
@@ -225,7 +225,8 @@ typedef enum ELogicConditionType {
#define TSDB_APP_NAME_LEN TSDB_UNI_LEN
#define TSDB_TB_COMMENT_LEN 1025
-#define TSDB_QUERY_ID_LEN 26
+#define TSDB_QUERY_ID_LEN 26
+#define TSDB_TRANS_OPER_LEN 16
/**
* In some scenarios uint16_t (0~65535) is used to store the row len.
diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c
index ef19eba7fe..034f78e5f6 100644
--- a/source/client/src/clientImpl.c
+++ b/source/client/src/clientImpl.c
@@ -695,6 +695,8 @@ int32_t scheduleQuery(SRequestObj* pRequest, SQueryPlan* pDag, SArray* pNodeList
};
int32_t code = schedulerExecJob(&req, &pRequest->body.queryJob);
+
+ destroyQueryExecRes(&pRequest->body.resInfo.execRes);
memcpy(&pRequest->body.resInfo.execRes, &res, sizeof(res));
if (code != TSDB_CODE_SUCCESS) {
diff --git a/source/common/src/systable.c b/source/common/src/systable.c
index 25abd65b40..a45f7b2913 100644
--- a/source/common/src/systable.c
+++ b/source/common/src/systable.c
@@ -227,6 +227,7 @@ static const SSysDbTableSchema transSchema[] = {
{.name = "id", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false},
{.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false},
{.name = "stage", .bytes = TSDB_TRANS_STAGE_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false},
+ {.name = "oper", .bytes = TSDB_TRANS_OPER_LEN, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false},
{.name = "db", .bytes = SYSTABLE_SCH_DB_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false},
{.name = "stable", .bytes = SYSTABLE_SCH_TABLE_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false},
{.name = "failed_times", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false},
diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c
index d080456db8..09f5d4b4b2 100644
--- a/source/common/src/tglobal.c
+++ b/source/common/src/tglobal.c
@@ -58,7 +58,7 @@ int32_t tsNumOfMnodeFetchThreads = 1;
int32_t tsNumOfMnodeReadThreads = 1;
int32_t tsNumOfVnodeQueryThreads = 4;
int32_t tsNumOfVnodeStreamThreads = 2;
-int32_t tsNumOfVnodeFetchThreads = 4;
+int32_t tsNumOfVnodeFetchThreads = 1;
int32_t tsNumOfVnodeWriteThreads = 2;
int32_t tsNumOfVnodeSyncThreads = 2;
int32_t tsNumOfVnodeRsmaThreads = 2;
@@ -91,6 +91,7 @@ bool tsSmlDataFormat =
// query
int32_t tsQueryPolicy = 1;
int32_t tsQuerySmaOptimize = 0;
+int32_t tsQueryRsmaTolerance = 1000; // the tolerance time (ms) to judge from which level to query rsma data.
bool tsQueryPlannerTrace = false;
int32_t tsQueryNodeChunkSize = 32 * 1024;
bool tsQueryUseNodeAllocator = true;
@@ -164,8 +165,8 @@ int32_t tsMqRebalanceInterval = 2;
int32_t tsTtlUnit = 86400;
int32_t tsTtlPushInterval = 86400;
int32_t tsGrantHBInterval = 60;
-int32_t tsUptimeInterval = 300; // seconds
-char tsUdfdResFuncs[1024] = ""; // udfd resident funcs that teardown when udfd exits
+int32_t tsUptimeInterval = 300; // seconds
+char tsUdfdResFuncs[1024] = ""; // udfd resident funcs that teardown when udfd exits
#ifndef _STORAGE
int32_t taosSetTfsCfg(SConfig *pCfg) {
@@ -370,9 +371,8 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
tsNumOfVnodeStreamThreads = TMAX(tsNumOfVnodeStreamThreads, 4);
if (cfgAddInt32(pCfg, "numOfVnodeStreamThreads", tsNumOfVnodeStreamThreads, 4, 1024, 0) != 0) return -1;
- tsNumOfVnodeFetchThreads = tsNumOfCores / 4;
- tsNumOfVnodeFetchThreads = TMAX(tsNumOfVnodeFetchThreads, 4);
- if (cfgAddInt32(pCfg, "numOfVnodeFetchThreads", tsNumOfVnodeFetchThreads, 4, 1024, 0) != 0) return -1;
+ tsNumOfVnodeFetchThreads = 1;
+ if (cfgAddInt32(pCfg, "numOfVnodeFetchThreads", tsNumOfVnodeFetchThreads, 1, 1024, 0) != 0) return -1;
tsNumOfVnodeWriteThreads = tsNumOfCores;
tsNumOfVnodeWriteThreads = TMAX(tsNumOfVnodeWriteThreads, 1);
@@ -424,6 +424,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
if (cfgAddInt32(pCfg, "ttlUnit", tsTtlUnit, 1, 86400 * 365, 1) != 0) return -1;
if (cfgAddInt32(pCfg, "ttlPushInterval", tsTtlPushInterval, 1, 100000, 1) != 0) return -1;
if (cfgAddInt32(pCfg, "uptimeInterval", tsUptimeInterval, 1, 100000, 1) != 0) return -1;
+ if (cfgAddInt32(pCfg, "queryRsmaTolerance", tsQueryRsmaTolerance, 0, 900000, 0) != 0) return -1;
if (cfgAddBool(pCfg, "udf", tsStartUdfd, 0) != 0) return -1;
if (cfgAddString(pCfg, "udfdResFuncs", tsUdfdResFuncs, 0) != 0) return -1;
@@ -723,6 +724,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
tsTtlUnit = cfgGetItem(pCfg, "ttlUnit")->i32;
tsTtlPushInterval = cfgGetItem(pCfg, "ttlPushInterval")->i32;
tsUptimeInterval = cfgGetItem(pCfg, "uptimeInterval")->i32;
+ tsQueryRsmaTolerance = cfgGetItem(pCfg, "queryRsmaTolerance")->i32;
tsStartUdfd = cfgGetItem(pCfg, "udf")->bval;
tstrncpy(tsUdfdResFuncs, cfgGetItem(pCfg, "udfdResFuncs")->str, sizeof(tsUdfdResFuncs));
@@ -989,6 +991,8 @@ int32_t taosSetCfg(SConfig *pCfg, char *name) {
tsQueryNodeChunkSize = cfgGetItem(pCfg, "queryNodeChunkSize")->i32;
} else if (strcasecmp("queryUseNodeAllocator", name) == 0) {
tsQueryUseNodeAllocator = cfgGetItem(pCfg, "queryUseNodeAllocator")->bval;
+ } else if (strcasecmp("queryRsmaTolerance", name) == 0) {
+ tsQueryRsmaTolerance = cfgGetItem(pCfg, "queryRsmaTolerance")->i32;
}
break;
}
diff --git a/source/dnode/mgmt/mgmt_vnode/inc/vmInt.h b/source/dnode/mgmt/mgmt_vnode/inc/vmInt.h
index ebbb9fa5d4..30f5483198 100644
--- a/source/dnode/mgmt/mgmt_vnode/inc/vmInt.h
+++ b/source/dnode/mgmt/mgmt_vnode/inc/vmInt.h
@@ -74,6 +74,7 @@ typedef struct {
TdThread thread;
SVnodeMgmt *pMgmt;
SWrapperCfg *pCfgs;
+ SVnodeObj **ppVnodes;
} SVnodeThread;
// vmInt.c
diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c
index 1f981cc9e0..f0c43d8b36 100644
--- a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c
+++ b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c
@@ -218,14 +218,14 @@ static void vmCloseVnodes(SVnodeMgmt *pMgmt) {
dInfo("start to close all vnodes");
int32_t numOfVnodes = 0;
- SVnodeObj **pVnodes = vmGetVnodeListFromHash(pMgmt, &numOfVnodes);
+ SVnodeObj **ppVnodes = vmGetVnodeListFromHash(pMgmt, &numOfVnodes);
for (int32_t i = 0; i < numOfVnodes; ++i) {
- vmCloseVnode(pMgmt, pVnodes[i]);
+ vmCloseVnode(pMgmt, ppVnodes[i]);
}
- if (pVnodes != NULL) {
- taosMemoryFree(pVnodes);
+ if (ppVnodes != NULL) {
+ taosMemoryFree(ppVnodes);
}
if (pMgmt->hash != NULL) {
@@ -331,22 +331,92 @@ static int32_t vmRequire(const SMgmtInputOpt *pInput, bool *required) {
return 0;
}
-static int32_t vmStart(SVnodeMgmt *pMgmt) {
- int32_t numOfVnodes = 0;
- SVnodeObj **pVnodes = vmGetVnodeListFromHash(pMgmt, &numOfVnodes);
+static void *vmRestoreVnodeInThread(void *param) {
+ SVnodeThread *pThread = param;
+ SVnodeMgmt *pMgmt = pThread->pMgmt;
- for (int32_t i = 0; i < numOfVnodes; ++i) {
- SVnodeObj *pVnode = pVnodes[i];
- vnodeStart(pVnode->pImpl);
+ dInfo("thread:%d, start to restore %d vnodes", pThread->threadIndex, pThread->vnodeNum);
+ setThreadName("restore-vnodes");
+
+ for (int32_t v = 0; v < pThread->vnodeNum; ++v) {
+ SVnodeObj *pVnode = pThread->ppVnodes[v];
+
+ char stepDesc[TSDB_STEP_DESC_LEN] = {0};
+ snprintf(stepDesc, TSDB_STEP_DESC_LEN, "vgId:%d, start to restore, %d of %d have been restored", pVnode->vgId,
+ pMgmt->state.openVnodes, pMgmt->state.totalVnodes);
+ tmsgReportStartup("vnode-restore", stepDesc);
+
+ int32_t code = vnodeStart(pVnode->pImpl);
+ if (code != 0) {
+ dError("vgId:%d, failed to restore vnode by thread:%d", pVnode->vgId, pThread->threadIndex);
+ pThread->failed++;
+ } else {
+ dDebug("vgId:%d, is restored by thread:%d", pVnode->vgId, pThread->threadIndex);
+ pThread->opened++;
+ atomic_add_fetch_32(&pMgmt->state.openVnodes, 1);
+ }
}
+ dInfo("thread:%d, numOfVnodes:%d, restored:%d failed:%d", pThread->threadIndex, pThread->vnodeNum, pThread->opened,
+ pThread->failed);
+ return NULL;
+}
+
+static int32_t vmStartVnodes(SVnodeMgmt *pMgmt) {
+ int32_t numOfVnodes = 0;
+ SVnodeObj **ppVnodes = vmGetVnodeListFromHash(pMgmt, &numOfVnodes);
+
+ int32_t threadNum = tsNumOfCores / 2;
+ if (threadNum < 1) threadNum = 1;
+ int32_t vnodesPerThread = numOfVnodes / threadNum + 1;
+
+ SVnodeThread *threads = taosMemoryCalloc(threadNum, sizeof(SVnodeThread));
+ for (int32_t t = 0; t < threadNum; ++t) {
+ threads[t].threadIndex = t;
+ threads[t].pMgmt = pMgmt;
+ threads[t].ppVnodes = taosMemoryCalloc(vnodesPerThread, sizeof(SVnode *));
+ }
+
+ for (int32_t v = 0; v < numOfVnodes; ++v) {
+ int32_t t = v % threadNum;
+ SVnodeThread *pThread = &threads[t];
+ pThread->ppVnodes[pThread->vnodeNum++] = ppVnodes[v];
+ }
+
+ pMgmt->state.openVnodes = 0;
+ dInfo("restore %d vnodes with %d threads", numOfVnodes, threadNum);
+
+ for (int32_t t = 0; t < threadNum; ++t) {
+ SVnodeThread *pThread = &threads[t];
+ if (pThread->vnodeNum == 0) continue;
+
+ TdThreadAttr thAttr;
+ taosThreadAttrInit(&thAttr);
+ taosThreadAttrSetDetachState(&thAttr, PTHREAD_CREATE_JOINABLE);
+ if (taosThreadCreate(&pThread->thread, &thAttr, vmRestoreVnodeInThread, pThread) != 0) {
+ dError("thread:%d, failed to create thread to restore vnode since %s", pThread->threadIndex, strerror(errno));
+ }
+
+ taosThreadAttrDestroy(&thAttr);
+ }
+
+ for (int32_t t = 0; t < threadNum; ++t) {
+ SVnodeThread *pThread = &threads[t];
+ if (pThread->vnodeNum > 0 && taosCheckPthreadValid(pThread->thread)) {
+ taosThreadJoin(pThread->thread, NULL);
+ taosThreadClear(&pThread->thread);
+ }
+ taosMemoryFree(pThread->ppVnodes);
+ }
+ taosMemoryFree(threads);
+
for (int32_t i = 0; i < numOfVnodes; ++i) {
- SVnodeObj *pVnode = pVnodes[i];
+ SVnodeObj *pVnode = ppVnodes[i];
vmReleaseVnode(pMgmt, pVnode);
}
- if (pVnodes != NULL) {
- taosMemoryFree(pVnodes);
+ if (ppVnodes != NULL) {
+ taosMemoryFree(ppVnodes);
}
return 0;
@@ -360,7 +430,7 @@ SMgmtFunc vmGetMgmtFunc() {
SMgmtFunc mgmtFunc = {0};
mgmtFunc.openFp = vmInit;
mgmtFunc.closeFp = (NodeCloseFp)vmCleanup;
- mgmtFunc.startFp = (NodeStartFp)vmStart;
+ mgmtFunc.startFp = (NodeStartFp)vmStartVnodes;
mgmtFunc.stopFp = (NodeStopFp)vmStop;
mgmtFunc.requiredFp = vmRequire;
mgmtFunc.getHandlesFp = vmGetMsgHandles;
diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h
index 537c9ca834..c3d03a6c5e 100644
--- a/source/dnode/mnode/impl/inc/mndDef.h
+++ b/source/dnode/mnode/impl/inc/mndDef.h
@@ -171,6 +171,7 @@ typedef struct {
int32_t stopFunc;
int32_t paramLen;
void* param;
+ char opername[TSDB_TRANS_OPER_LEN];
SArray* pRpcArray;
} STrans;
diff --git a/source/dnode/mnode/impl/inc/mndTrans.h b/source/dnode/mnode/impl/inc/mndTrans.h
index 36d056a941..2372fa30e5 100644
--- a/source/dnode/mnode/impl/inc/mndTrans.h
+++ b/source/dnode/mnode/impl/inc/mndTrans.h
@@ -61,7 +61,8 @@ void mndCleanupTrans(SMnode *pMnode);
STrans *mndAcquireTrans(SMnode *pMnode, int32_t transId);
void mndReleaseTrans(SMnode *pMnode, STrans *pTrans);
-STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict, const SRpcMsg *pReq);
+STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict, const SRpcMsg *pReq,
+ const char *opername);
void mndTransDrop(STrans *pTrans);
int32_t mndTransAppendRedolog(STrans *pTrans, SSdbRaw *pRaw);
int32_t mndTransAppendUndolog(STrans *pTrans, SSdbRaw *pRaw);
diff --git a/source/dnode/mnode/impl/src/mndAcct.c b/source/dnode/mnode/impl/src/mndAcct.c
index 33f0bb7a34..e0713e1570 100644
--- a/source/dnode/mnode/impl/src/mndAcct.c
+++ b/source/dnode/mnode/impl/src/mndAcct.c
@@ -81,7 +81,7 @@ static int32_t mndCreateDefaultAcct(SMnode *pMnode) {
mDebug("acct:%s, will be created when deploying, raw:%p", acctObj.acct, pRaw);
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, NULL);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, NULL, "create-acct");
if (pTrans == NULL) {
mError("acct:%s, failed to create since %s", acctObj.acct, terrstr());
return -1;
diff --git a/source/dnode/mnode/impl/src/mndBnode.c b/source/dnode/mnode/impl/src/mndBnode.c
index aafcd19992..6cabf6d57a 100644
--- a/source/dnode/mnode/impl/src/mndBnode.c
+++ b/source/dnode/mnode/impl/src/mndBnode.c
@@ -246,7 +246,7 @@ static int32_t mndCreateBnode(SMnode *pMnode, SRpcMsg *pReq, SDnodeObj *pDnode,
bnodeObj.createdTime = taosGetTimestampMs();
bnodeObj.updateTime = bnodeObj.createdTime;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "create-bnode");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to create bnode:%d", pTrans->id, pCreate->dnodeId);
@@ -354,7 +354,7 @@ static int32_t mndSetDropBnodeRedoActions(STrans *pTrans, SDnodeObj *pDnode, SBn
static int32_t mndDropBnode(SMnode *pMnode, SRpcMsg *pReq, SBnodeObj *pObj) {
int32_t code = -1;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pReq, "drop-bnode");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to drop bnode:%d", pTrans->id, pObj->id);
diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c
index 7d633f90bd..5ba39b4f1a 100644
--- a/source/dnode/mnode/impl/src/mndCluster.c
+++ b/source/dnode/mnode/impl/src/mndCluster.c
@@ -235,7 +235,7 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) {
mDebug("cluster:%" PRId64 ", will be created when deploying, raw:%p", clusterObj.id, pRaw);
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, NULL);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, NULL, "create-cluster");
if (pTrans == NULL) {
mError("cluster:%" PRId64 ", failed to create since %s", clusterObj.id, terrstr());
return -1;
@@ -316,7 +316,7 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) {
}
mTrace("update cluster uptime to %" PRId64, clusterObj.upTime);
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "update-uptime");
if (pTrans == NULL) return -1;
SSdbRaw *pCommitRaw = mndClusterActionEncode(&clusterObj);
diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c
index cdfa208665..e0dbc26122 100644
--- a/source/dnode/mnode/impl/src/mndConsumer.c
+++ b/source/dnode/mnode/impl/src/mndConsumer.c
@@ -109,7 +109,7 @@ static int32_t mndProcessConsumerLostMsg(SRpcMsg *pMsg) {
mndReleaseConsumer(pMnode, pConsumer);
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pMsg);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pMsg, "lost-csm");
if (pTrans == NULL) goto FAIL;
if (mndSetConsumerCommitLogs(pMnode, pTrans, pConsumerNew) != 0) goto FAIL;
if (mndTransPrepare(pMnode, pTrans) != 0) goto FAIL;
@@ -142,7 +142,7 @@ static int32_t mndProcessConsumerRecoverMsg(SRpcMsg *pMsg) {
mndReleaseConsumer(pMnode, pConsumer);
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pMsg);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pMsg, "recover-csm");
if (pTrans == NULL) goto FAIL;
if (mndSetConsumerCommitLogs(pMnode, pTrans, pConsumerNew) != 0) goto FAIL;
if (mndTransPrepare(pMnode, pTrans) != 0) goto FAIL;
@@ -465,7 +465,7 @@ static int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
int32_t newTopicNum = taosArrayGetSize(newSub);
// check topic existance
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pMsg);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pMsg, "subscribe");
if (pTrans == NULL) goto SUBSCRIBE_OVER;
for (int32_t i = 0; i < newTopicNum; i++) {
diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c
index d42ba1f7ff..39ec3484db 100644
--- a/source/dnode/mnode/impl/src/mndDb.c
+++ b/source/dnode/mnode/impl/src/mndDb.c
@@ -541,7 +541,7 @@ static int32_t mndCreateDb(SMnode *pMnode, SRpcMsg *pReq, SCreateDbReq *pCreate,
}
int32_t code = -1;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB, pReq, "create-db");
if (pTrans == NULL) goto _OVER;
// mndTransSetSerial(pTrans);
mDebug("trans:%d, used to create db:%s", pTrans->id, pCreate->db);
@@ -773,7 +773,7 @@ static int32_t mndSetAlterDbRedoActions(SMnode *pMnode, STrans *pTrans, SDbObj *
}
static int32_t mndAlterDb(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pOld, SDbObj *pNew) {
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB, pReq, "alter-db");
if (pTrans == NULL) return -1;
mDebug("trans:%d, used to alter db:%s", pTrans->id, pOld->name);
@@ -1027,7 +1027,7 @@ static int32_t mndBuildDropDbRsp(SDbObj *pDb, int32_t *pRspLen, void **ppRsp, bo
static int32_t mndDropDb(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb) {
int32_t code = -1;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB, pReq, "drop-db");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to drop db:%s", pTrans->id, pDb->name);
diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c
index 26b4080d14..c6fdf23023 100644
--- a/source/dnode/mnode/impl/src/mndDnode.c
+++ b/source/dnode/mnode/impl/src/mndDnode.c
@@ -104,7 +104,7 @@ static int32_t mndCreateDefaultDnode(SMnode *pMnode) {
memcpy(&dnodeObj.fqdn, tsLocalFqdn, TSDB_FQDN_LEN);
snprintf(dnodeObj.ep, TSDB_EP_LEN, "%s:%u", dnodeObj.fqdn, dnodeObj.port);
- pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, NULL);
+ pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, NULL, "create-dnode");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to create dnode:%s on first deploy", pTrans->id, dnodeObj.ep);
@@ -488,7 +488,7 @@ static int32_t mndCreateDnode(SMnode *pMnode, SRpcMsg *pReq, SCreateDnodeReq *pC
memcpy(dnodeObj.fqdn, pCreate->fqdn, TSDB_FQDN_LEN);
snprintf(dnodeObj.ep, TSDB_EP_LEN, "%s:%u", dnodeObj.fqdn, dnodeObj.port);
- pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_GLOBAL, pReq);
+ pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_GLOBAL, pReq, "create-dnode");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to create dnode:%s", pTrans->id, dnodeObj.ep);
@@ -667,7 +667,7 @@ static int32_t mndDropDnode(SMnode *pMnode, SRpcMsg *pReq, SDnodeObj *pDnode, SM
SSdbRaw *pRaw = NULL;
STrans *pTrans = NULL;
- pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq);
+ pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq, "drop-dnode");
if (pTrans == NULL) goto _OVER;
mndTransSetSerial(pTrans);
mInfo("trans:%d, used to drop dnode:%d", pTrans->id, pDnode->id);
diff --git a/source/dnode/mnode/impl/src/mndFunc.c b/source/dnode/mnode/impl/src/mndFunc.c
index e6f4b48524..429d840202 100644
--- a/source/dnode/mnode/impl/src/mndFunc.c
+++ b/source/dnode/mnode/impl/src/mndFunc.c
@@ -219,7 +219,7 @@ static int32_t mndCreateFunc(SMnode *pMnode, SRpcMsg *pReq, SCreateFuncReq *pCre
}
memcpy(func.pCode, pCreate->pCode, func.codeSize);
- pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq);
+ pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "create-func");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to create func:%s", pTrans->id, pCreate->name);
@@ -249,7 +249,7 @@ _OVER:
static int32_t mndDropFunc(SMnode *pMnode, SRpcMsg *pReq, SFuncObj *pFunc) {
int32_t code = -1;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "drop-func");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to drop user:%s", pTrans->id, pFunc->name);
diff --git a/source/dnode/mnode/impl/src/mndMnode.c b/source/dnode/mnode/impl/src/mndMnode.c
index 71bda4d4f3..a41f958c0f 100644
--- a/source/dnode/mnode/impl/src/mndMnode.c
+++ b/source/dnode/mnode/impl/src/mndMnode.c
@@ -91,7 +91,7 @@ static int32_t mndCreateDefaultMnode(SMnode *pMnode) {
mInfo("mnode:%d, will be created when deploying, raw:%p", mnodeObj.id, pRaw);
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, NULL);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, NULL, "create-mnode");
if (pTrans == NULL) {
mError("mnode:%d, failed to create since %s", mnodeObj.id, terrstr());
return -1;
@@ -362,7 +362,7 @@ static int32_t mndCreateMnode(SMnode *pMnode, SRpcMsg *pReq, SDnodeObj *pDnode,
mnodeObj.createdTime = taosGetTimestampMs();
mnodeObj.updateTime = mnodeObj.createdTime;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq, "create-mnode");
if (pTrans == NULL) goto _OVER;
mndTransSetSerial(pTrans);
mInfo("trans:%d, used to create mnode:%d", pTrans->id, pCreate->dnodeId);
@@ -571,7 +571,7 @@ static int32_t mndDropMnode(SMnode *pMnode, SRpcMsg *pReq, SMnodeObj *pObj) {
int32_t code = -1;
STrans *pTrans = NULL;
- pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq);
+ pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq, "drop-mnode");
if (pTrans == NULL) goto _OVER;
mndTransSetSerial(pTrans);
mInfo("trans:%d, used to drop mnode:%d", pTrans->id, pObj->id);
diff --git a/source/dnode/mnode/impl/src/mndOffset.c b/source/dnode/mnode/impl/src/mndOffset.c
index 037a46345f..797aa88670 100644
--- a/source/dnode/mnode/impl/src/mndOffset.c
+++ b/source/dnode/mnode/impl/src/mndOffset.c
@@ -181,7 +181,7 @@ static int32_t mndProcessCommitOffsetReq(SRpcMsg *pMsg) {
tDecodeSMqCMCommitOffsetReq(&decoder, &commitOffsetReq);
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pMsg);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pMsg, "commit-offset");
for (int32_t i = 0; i < commitOffsetReq.num; i++) {
SMqOffset *pOffset = &commitOffsetReq.offsets[i];
diff --git a/source/dnode/mnode/impl/src/mndQnode.c b/source/dnode/mnode/impl/src/mndQnode.c
index f057f6190d..cd6e91b154 100644
--- a/source/dnode/mnode/impl/src/mndQnode.c
+++ b/source/dnode/mnode/impl/src/mndQnode.c
@@ -248,7 +248,7 @@ static int32_t mndCreateQnode(SMnode *pMnode, SRpcMsg *pReq, SDnodeObj *pDnode,
qnodeObj.createdTime = taosGetTimestampMs();
qnodeObj.updateTime = qnodeObj.createdTime;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "create-qnode");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to create qnode:%d", pTrans->id, pCreate->dnodeId);
@@ -364,7 +364,7 @@ int32_t mndSetDropQnodeInfoToTrans(SMnode *pMnode, STrans *pTrans, SQnodeObj *pO
static int32_t mndDropQnode(SMnode *pMnode, SRpcMsg *pReq, SQnodeObj *pObj) {
int32_t code = -1;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pReq, "drop-qnode");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to drop qnode:%d", pTrans->id, pObj->id);
diff --git a/source/dnode/mnode/impl/src/mndSma.c b/source/dnode/mnode/impl/src/mndSma.c
index 8638cc5118..3fdd3995f9 100644
--- a/source/dnode/mnode/impl/src/mndSma.c
+++ b/source/dnode/mnode/impl/src/mndSma.c
@@ -587,7 +587,7 @@ static int32_t mndCreateSma(SMnode *pMnode, SRpcMsg *pReq, SMCreateSmaReq *pCrea
nodesDestroyNode((SNode *)pPlan);
int32_t code = -1;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB, pReq, "create-sma");
if (pTrans == NULL) goto _OVER;
mndTransSetDbName(pTrans, pDb->name, NULL);
mndTransSetSerial(pTrans);
@@ -799,7 +799,7 @@ static int32_t mndDropSma(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SSmaObj *p
pStb = mndAcquireStb(pMnode, pSma->stb);
if (pStb == NULL) goto _OVER;
- pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB, pReq);
+ pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB, pReq, "drop-sma");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to drop sma:%s", pTrans->id, pSma->name);
diff --git a/source/dnode/mnode/impl/src/mndSnode.c b/source/dnode/mnode/impl/src/mndSnode.c
index d18a233d29..5f4231aa6a 100644
--- a/source/dnode/mnode/impl/src/mndSnode.c
+++ b/source/dnode/mnode/impl/src/mndSnode.c
@@ -253,7 +253,7 @@ static int32_t mndCreateSnode(SMnode *pMnode, SRpcMsg *pReq, SDnodeObj *pDnode,
snodeObj.createdTime = taosGetTimestampMs();
snodeObj.updateTime = snodeObj.createdTime;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "create-snode");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to create snode:%d", pTrans->id, pCreate->dnodeId);
@@ -375,7 +375,7 @@ int32_t mndSetDropSnodeInfoToTrans(SMnode *pMnode, STrans *pTrans, SSnodeObj *pO
static int32_t mndDropSnode(SMnode *pMnode, SRpcMsg *pReq, SSnodeObj *pObj) {
int32_t code = -1;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pReq, "drop-snode");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to drop snode:%d", pTrans->id, pObj->id);
diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c
index 8719f9f8f0..ecb24becba 100644
--- a/source/dnode/mnode/impl/src/mndStb.c
+++ b/source/dnode/mnode/impl/src/mndStb.c
@@ -800,7 +800,7 @@ static int32_t mndCreateStb(SMnode *pMnode, SRpcMsg *pReq, SMCreateStbReq *pCrea
SStbObj stbObj = {0};
int32_t code = -1;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pReq, "create-stb");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to create stb:%s", pTrans->id, pCreate->name);
@@ -1843,7 +1843,7 @@ _OVER:
static int32_t mndAlterStbImp(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SStbObj *pStb, bool needRsp,
void *alterOriData, int32_t alterOriDataLen) {
int32_t code = -1;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB_INSIDE, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB_INSIDE, pReq, "alter-stb");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to alter stb:%s", pTrans->id, pStb->name);
@@ -2042,7 +2042,7 @@ static int32_t mndSetDropStbRedoActions(SMnode *pMnode, STrans *pTrans, SDbObj *
static int32_t mndDropStb(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SStbObj *pStb) {
int32_t code = -1;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB_INSIDE, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_DB_INSIDE, pReq, "drop-stb");
if (pTrans == NULL) goto _OVER;
mDebug("trans:%d, used to drop stb:%s", pTrans->id, pStb->name);
diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c
index 515d5987b9..a039b54b80 100644
--- a/source/dnode/mnode/impl/src/mndStream.c
+++ b/source/dnode/mnode/impl/src/mndStream.c
@@ -666,7 +666,7 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) {
goto _OVER;
}
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pReq, "create-stream");
if (pTrans == NULL) {
mError("stream:%s, failed to create since %s", createStreamReq.name, terrstr());
goto _OVER;
@@ -759,7 +759,7 @@ static int32_t mndProcessDropStreamReq(SRpcMsg *pReq) {
return -1;
}
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pReq, "drop-stream");
if (pTrans == NULL) {
mError("stream:%s, failed to drop since %s", dropReq.name, terrstr());
sdbRelease(pMnode->pSdb, pStream);
diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c
index 3a3bf36594..43eae3f60c 100644
--- a/source/dnode/mnode/impl/src/mndSubscribe.c
+++ b/source/dnode/mnode/impl/src/mndSubscribe.c
@@ -441,7 +441,7 @@ static int32_t mndDoRebalance(SMnode *pMnode, const SMqRebInputObj *pInput, SMqR
}
static int32_t mndPersistRebResult(SMnode *pMnode, SRpcMsg *pMsg, const SMqRebOutputObj *pOutput) {
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pMsg);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pMsg, "persist-reb");
mndTransSetDbName(pTrans, pOutput->pSub->dbName, NULL);
if (pTrans == NULL) return -1;
@@ -674,7 +674,7 @@ static int32_t mndProcessDropCgroupReq(SRpcMsg *pReq) {
return -1;
}
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "drop-cgroup");
if (pTrans == NULL) {
mError("cgroup: %s on topic:%s, failed to drop since %s", dropReq.cgroup, dropReq.topic, terrstr());
mndReleaseSubscribe(pMnode, pSub);
diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c
index b24d7067bc..8fe2d1af15 100644
--- a/source/dnode/mnode/impl/src/mndTopic.c
+++ b/source/dnode/mnode/impl/src/mndTopic.c
@@ -440,7 +440,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq *
/*topicObj.withTbName = 1;*/
/*topicObj.withSchema = 1;*/
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "create-topic");
if (pTrans == NULL) {
mError("topic:%s, failed to create since %s", pCreate->name, terrstr());
taosMemoryFreeClear(topicObj.ast);
@@ -663,7 +663,7 @@ static int32_t mndProcessDropTopicReq(SRpcMsg *pReq) {
return -1;
}
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pReq, "drop-topic");
mndTransSetDbName(pTrans, pTopic->db, NULL);
if (pTrans == NULL) {
mError("topic:%s, failed to drop since %s", pTopic->name, terrstr());
diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c
index 8d42cdcfd6..9d918e2abd 100644
--- a/source/dnode/mnode/impl/src/mndTrans.c
+++ b/source/dnode/mnode/impl/src/mndTrans.c
@@ -25,7 +25,7 @@
#define TRANS_VER_NUMBER 1
#define TRANS_ARRAY_SIZE 8
-#define TRANS_RESERVE_SIZE 64
+#define TRANS_RESERVE_SIZE 48
static SSdbRaw *mndTransActionEncode(STrans *pTrans);
static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw);
@@ -223,6 +223,7 @@ static SSdbRaw *mndTransActionEncode(STrans *pTrans) {
SDB_SET_BINARY(pRaw, dataPos, pTrans->param, pTrans->paramLen, _OVER)
}
+ SDB_SET_BINARY(pRaw, dataPos, pTrans->opername, TSDB_TRANS_OPER_LEN, _OVER)
SDB_SET_RESERVE(pRaw, dataPos, TRANS_RESERVE_SIZE, _OVER)
SDB_SET_DATALEN(pRaw, dataPos, _OVER)
@@ -305,6 +306,7 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) {
if (pTrans->commitActions == NULL) goto _OVER;
for (int32_t i = 0; i < redoActionNum; ++i) {
+ memset(&action, 0, sizeof(action));
SDB_GET_INT32(pRaw, dataPos, &action.id, _OVER)
SDB_GET_INT32(pRaw, dataPos, &action.errCode, _OVER)
SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER)
@@ -340,6 +342,7 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) {
}
for (int32_t i = 0; i < undoActionNum; ++i) {
+ memset(&action, 0, sizeof(action));
SDB_GET_INT32(pRaw, dataPos, &action.id, _OVER)
SDB_GET_INT32(pRaw, dataPos, &action.errCode, _OVER)
SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER)
@@ -375,6 +378,7 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) {
}
for (int32_t i = 0; i < commitActionNum; ++i) {
+ memset(&action, 0, sizeof(action));
SDB_GET_INT32(pRaw, dataPos, &action.id, _OVER)
SDB_GET_INT32(pRaw, dataPos, &action.errCode, _OVER)
SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER)
@@ -417,6 +421,7 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) {
SDB_GET_BINARY(pRaw, dataPos, pTrans->param, pTrans->paramLen, _OVER);
}
+ SDB_GET_BINARY(pRaw, dataPos, pTrans->opername, TSDB_TRANS_OPER_LEN, _OVER);
SDB_GET_RESERVE(pRaw, dataPos, TRANS_RESERVE_SIZE, _OVER)
terrno = 0;
@@ -455,6 +460,20 @@ static const char *mndTransStr(ETrnStage stage) {
}
}
+static void mndSetTransLastAction(STrans *pTrans, STransAction *pAction) {
+ if (pAction != NULL) {
+ pTrans->lastAction = pAction->id;
+ pTrans->lastMsgType = pAction->msgType;
+ pTrans->lastEpset = pAction->epSet;
+ pTrans->lastErrorNo = pAction->errCode;
+ } else {
+ pTrans->lastAction = 0;
+ pTrans->lastMsgType = 0;
+ memset(&pTrans->lastEpset, 0, sizeof(pTrans->lastEpset));
+ pTrans->lastErrorNo = 0;
+ }
+}
+
static void mndTransTestStartFunc(SMnode *pMnode, void *param, int32_t paramLen) {
mInfo("test trans start, param:%s, len:%d", (char *)param, paramLen);
}
@@ -582,7 +601,8 @@ void mndReleaseTrans(SMnode *pMnode, STrans *pTrans) {
sdbRelease(pSdb, pTrans);
}
-STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict, const SRpcMsg *pReq) {
+STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict, const SRpcMsg *pReq,
+ const char *opername) {
STrans *pTrans = taosMemoryCalloc(1, sizeof(STrans));
if (pTrans == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
@@ -590,6 +610,10 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict,
return NULL;
}
+ if (opername != NULL) {
+ tstrncpy(pTrans->opername, opername, TSDB_TRANS_OPER_LEN);
+ }
+
pTrans->id = sdbGetMaxId(pMnode->pSdb, SDB_TRANS);
pTrans->stage = TRN_STAGE_PREPARE;
pTrans->policy = policy;
@@ -1037,18 +1061,12 @@ static int32_t mndTransWriteSingleLog(SMnode *pMnode, STrans *pTrans, STransActi
mInfo("trans:%d, %s:%d write to sdb, type:%s status:%s", pTrans->id, mndTransStr(pAction->stage), pAction->id,
sdbTableName(pAction->pRaw->type), sdbStatusName(pAction->pRaw->status));
- pTrans->lastAction = pAction->id;
- pTrans->lastMsgType = pAction->msgType;
- pTrans->lastEpset = pAction->epSet;
- pTrans->lastErrorNo = 0;
+ mndSetTransLastAction(pTrans, pAction);
} else {
pAction->errCode = (terrno != 0) ? terrno : code;
mError("trans:%d, %s:%d failed to write sdb since %s, type:%s status:%s", pTrans->id, mndTransStr(pAction->stage),
pAction->id, terrstr(), sdbTableName(pAction->pRaw->type), sdbStatusName(pAction->pRaw->status));
- pTrans->lastAction = pAction->id;
- pTrans->lastMsgType = pAction->msgType;
- pTrans->lastEpset = pAction->epSet;
- pTrans->lastErrorNo = pAction->errCode;
+ mndSetTransLastAction(pTrans, pAction);
}
return code;
@@ -1082,15 +1100,10 @@ static int32_t mndTransSendSingleMsg(SMnode *pMnode, STrans *pTrans, STransActio
if (code == 0) {
pAction->msgSent = 1;
pAction->msgReceived = 0;
- pAction->errCode = 0;
+ pAction->errCode = TSDB_CODE_ACTION_IN_PROGRESS;
mInfo("trans:%d, %s:%d is sent, %s", pTrans->id, mndTransStr(pAction->stage), pAction->id, detail);
- pTrans->lastAction = pAction->id;
- pTrans->lastMsgType = pAction->msgType;
- pTrans->lastEpset = pAction->epSet;
- if (pTrans->lastErrorNo == 0) {
- pTrans->lastErrorNo = TSDB_CODE_ACTION_IN_PROGRESS;
- }
+ mndSetTransLastAction(pTrans, pAction);
} else {
pAction->msgSent = 0;
pAction->msgReceived = 0;
@@ -1098,10 +1111,7 @@ static int32_t mndTransSendSingleMsg(SMnode *pMnode, STrans *pTrans, STransActio
mError("trans:%d, %s:%d not send since %s, %s", pTrans->id, mndTransStr(pAction->stage), pAction->id, terrstr(),
detail);
- pTrans->lastAction = pAction->id;
- pTrans->lastMsgType = pAction->msgType;
- pTrans->lastEpset = pAction->epSet;
- pTrans->lastErrorNo = pAction->errCode;
+ mndSetTransLastAction(pTrans, pAction);
}
return code;
@@ -1112,10 +1122,7 @@ static int32_t mndTransExecNullMsg(SMnode *pMnode, STrans *pTrans, STransAction
pAction->errCode = 0;
mInfo("trans:%d, %s:%d confirm action executed", pTrans->id, mndTransStr(pAction->stage), pAction->id);
- pTrans->lastAction = pAction->id;
- pTrans->lastMsgType = pAction->msgType;
- pTrans->lastEpset = pAction->epSet;
- pTrans->lastErrorNo = 0;
+ mndSetTransLastAction(pTrans, pAction);
return 0;
}
@@ -1161,25 +1168,19 @@ static int32_t mndTransExecuteActions(SMnode *pMnode, STrans *pTrans, SArray *pA
errCode = pAction->errCode;
pErrAction = pAction;
}
+ } else {
+ pErrAction = pAction;
}
}
+ mndSetTransLastAction(pTrans, pErrAction);
+
if (numOfExecuted == numOfActions) {
if (errCode == 0) {
- pTrans->lastAction = 0;
- pTrans->lastMsgType = 0;
- memset(&pTrans->lastEpset, 0, sizeof(pTrans->lastEpset));
- pTrans->lastErrorNo = 0;
mInfo("trans:%d, all %d actions execute successfully", pTrans->id, numOfActions);
return 0;
} else {
mError("trans:%d, all %d actions executed, code:0x%x", pTrans->id, numOfActions, errCode & 0XFFFF);
- if (pErrAction != NULL) {
- pTrans->lastAction = pErrAction->id;
- pTrans->lastMsgType = pErrAction->msgType;
- pTrans->lastEpset = pErrAction->epSet;
- pTrans->lastErrorNo = pErrAction->errCode;
- }
mndTransResetActions(pMnode, pTrans, pArray);
terrno = errCode;
return errCode;
@@ -1220,6 +1221,8 @@ static int32_t mndTransExecuteRedoActionsSerial(SMnode *pMnode, STrans *pTrans)
if (numOfActions == 0) return code;
if (pTrans->redoActionPos >= numOfActions) return code;
+ mInfo("trans:%d, execute %d actions serial", pTrans->id, numOfActions);
+
for (int32_t action = pTrans->redoActionPos; action < numOfActions; ++action) {
STransAction *pAction = taosArrayGet(pTrans->redoActions, pTrans->redoActionPos);
@@ -1248,16 +1251,8 @@ static int32_t mndTransExecuteRedoActionsSerial(SMnode *pMnode, STrans *pTrans)
if (code == 0) {
pTrans->failedTimes = 0;
- pTrans->lastAction = action;
- pTrans->lastMsgType = 0;
- pTrans->lastErrorNo = 0;
- memset(&pTrans->lastEpset, 0, sizeof(pTrans->lastEpset));
- } else {
- pTrans->lastAction = action;
- pTrans->lastMsgType = pAction->msgType;
- pTrans->lastErrorNo = code;
- pTrans->lastEpset = pAction->epSet;
}
+ mndSetTransLastAction(pTrans, pAction);
if (mndCannotExecuteTransAction(pMnode)) break;
@@ -1599,6 +1594,11 @@ static int32_t mndRetrieveTrans(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
colDataAppend(pColInfo, numOfRows, (const char *)stage, false);
+ char opername[TSDB_TRANS_OPER_LEN + VARSTR_HEADER_SIZE] = {0};
+ STR_WITH_MAXSIZE_TO_VARSTR(opername, pTrans->opername, pShow->pMeta->pSchemas[cols].bytes);
+ pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
+ colDataAppend(pColInfo, numOfRows, (const char *)opername, false);
+
char dbname[TSDB_DB_NAME_LEN + VARSTR_HEADER_SIZE] = {0};
STR_WITH_MAXSIZE_TO_VARSTR(dbname, mndGetDbStr(pTrans->dbname), pShow->pMeta->pSchemas[cols].bytes);
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c
index 5da119bb30..c4adb03e21 100644
--- a/source/dnode/mnode/impl/src/mndUser.c
+++ b/source/dnode/mnode/impl/src/mndUser.c
@@ -81,7 +81,7 @@ static int32_t mndCreateDefaultUser(SMnode *pMnode, char *acct, char *user, char
mDebug("user:%s, will be created when deploying, raw:%p", userObj.user, pRaw);
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, NULL);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, NULL, "create-user");
if (pTrans == NULL) {
mError("user:%s, failed to create since %s", userObj.user, terrstr());
return -1;
@@ -299,7 +299,7 @@ static int32_t mndCreateUser(SMnode *pMnode, char *acct, SCreateUserReq *pCreate
userObj.sysInfo = pCreate->sysInfo;
userObj.enable = pCreate->enable;
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "create-user");
if (pTrans == NULL) {
mError("user:%s, failed to create since %s", pCreate->user, terrstr());
return -1;
@@ -383,7 +383,7 @@ _OVER:
}
static int32_t mndAlterUser(SMnode *pMnode, SUserObj *pOld, SUserObj *pNew, SRpcMsg *pReq) {
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "alter-user");
if (pTrans == NULL) {
mError("user:%s, failed to alter since %s", pOld->user, terrstr());
return -1;
@@ -598,7 +598,7 @@ _OVER:
}
static int32_t mndDropUser(SMnode *pMnode, SRpcMsg *pReq, SUserObj *pUser) {
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "drop-user");
if (pTrans == NULL) {
mError("user:%s, failed to drop since %s", pUser->user, terrstr());
return -1;
diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c
index a95bdef323..cc9ed5f9ba 100644
--- a/source/dnode/mnode/impl/src/mndVgroup.c
+++ b/source/dnode/mnode/impl/src/mndVgroup.c
@@ -1223,7 +1223,7 @@ static int32_t mndRedistributeVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb,
SSdbRaw *pRaw = NULL;
STrans *pTrans = NULL;
- pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq);
+ pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq, "red-vgroup");
if (pTrans == NULL) goto _OVER;
mndTransSetSerial(pTrans);
mDebug("trans:%d, used to redistribute vgroup, vgId:%d", pTrans->id, pVgroup->vgId);
@@ -1606,7 +1606,7 @@ static int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj
STrans *pTrans = NULL;
SArray *pArray = mndBuildDnodesArray(pMnode, 0);
- pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq);
+ pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq, "split-vgroup");
if (pTrans == NULL) goto _OVER;
mndTransSetSerial(pTrans);
mDebug("trans:%d, used to split vgroup, vgId:%d", pTrans->id, pVgroup->vgId);
@@ -1774,7 +1774,7 @@ static int32_t mndBalanceVgroup(SMnode *pMnode, SRpcMsg *pReq, SArray *pArray) {
pBalancedVgroups = taosHashInit(16, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), false, HASH_NO_LOCK);
if (pBalancedVgroups == NULL) goto _OVER;
- pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq);
+ pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq, "balance-vgroup");
if (pTrans == NULL) goto _OVER;
mndTransSetSerial(pTrans);
mDebug("trans:%d, used to balance vgroup", pTrans->id);
diff --git a/source/dnode/mnode/impl/test/trans/trans2.cpp b/source/dnode/mnode/impl/test/trans/trans2.cpp
index aee8aa2748..60be7cfbc0 100644
--- a/source/dnode/mnode/impl/test/trans/trans2.cpp
+++ b/source/dnode/mnode/impl/test/trans/trans2.cpp
@@ -115,7 +115,7 @@ class MndTestTrans2 : public ::testing::Test {
userObj.superUser = 1;
SRpcMsg rpcMsg = {0};
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, conflict, &rpcMsg);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, conflict, &rpcMsg, "");
SSdbRaw *pRedoRaw = mndUserActionEncode(&userObj);
mndTransAppendRedolog(pTrans, pRedoRaw);
sdbSetRawStatus(pRedoRaw, SDB_STATUS_READY);
@@ -148,7 +148,7 @@ class MndTestTrans2 : public ::testing::Test {
userObj.superUser = 1;
SRpcMsg rpcMsg = {0};
- STrans *pTrans = mndTransCreate(pMnode, policy, conflict, &rpcMsg);
+ STrans *pTrans = mndTransCreate(pMnode, policy, conflict, &rpcMsg, "");
SSdbRaw *pRedoRaw = mndUserActionEncode(&userObj);
mndTransAppendRedolog(pTrans, pRedoRaw);
sdbSetRawStatus(pRedoRaw, SDB_STATUS_READY);
@@ -220,7 +220,7 @@ class MndTestTrans2 : public ::testing::Test {
userObj.superUser = 1;
SRpcMsg rpcMsg = {0};
- STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, &rpcMsg);
+ STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, &rpcMsg, "");
SSdbRaw *pRedoRaw = mndUserActionEncode(&userObj);
mndTransAppendRedolog(pTrans, pRedoRaw);
sdbSetRawStatus(pRedoRaw, SDB_STATUS_READY);
diff --git a/source/dnode/vnode/src/sma/smaCommit.c b/source/dnode/vnode/src/sma/smaCommit.c
index 07ec7d0694..2b44cdcef1 100644
--- a/source/dnode/vnode/src/sma/smaCommit.c
+++ b/source/dnode/vnode/src/sma/smaCommit.c
@@ -295,12 +295,17 @@ static int32_t tdProcessRSmaAsyncPreCommitImpl(SSma *pSma) {
}
/**
- * @brief step 3: consume the SubmitReq in buffer
+ * @brief step 3: commit should wait for all SubmitReq in buffer be consumed
* 1) This is high cost task and should not put in asyncPreCommit originally.
* 2) But, if put in asyncCommit, would trigger taskInfo cloning frequently.
*/
- if (tdRSmaProcessExecImpl(pSma, RSMA_EXEC_COMMIT) < 0) {
- return TSDB_CODE_FAILED;
+ nLoops = 0;
+ while (atomic_load_64(&pRSmaStat->nBufItems) > 0) {
+ ++nLoops;
+ if (nLoops > 1000) {
+ sched_yield();
+ nLoops = 0;
+ }
}
smaInfo("vgId:%d, rsma commit, wait for all items to be consumed, TID:%p", SMA_VID(pSma),
diff --git a/source/dnode/vnode/src/sma/smaEnv.c b/source/dnode/vnode/src/sma/smaEnv.c
index b870ea1b62..ccf4ebb39f 100644
--- a/source/dnode/vnode/src/sma/smaEnv.c
+++ b/source/dnode/vnode/src/sma/smaEnv.c
@@ -278,7 +278,6 @@ static void tdDestroyRSmaStat(void *pRSmaStat) {
smaDebug("vgId:%d, destroy rsma stat %p", SMA_VID(pSma), pRSmaStat);
// step 1: set rsma trigger stat cancelled
atomic_store_8(RSMA_TRIGGER_STAT(pStat), TASK_TRIGGER_STAT_CANCELLED);
- tsem_destroy(&(pStat->notEmpty));
// step 2: destroy the rsma info and associated fetch tasks
taosHashCleanup(RSMA_INFO_HASH(pStat));
@@ -306,6 +305,7 @@ static void tdDestroyRSmaStat(void *pRSmaStat) {
tdRSmaFSClose(RSMA_FS(pStat));
// step 6: free pStat
+ tsem_destroy(&(pStat->notEmpty));
taosMemoryFreeClear(pStat);
}
}
diff --git a/source/dnode/vnode/src/sma/smaFS.c b/source/dnode/vnode/src/sma/smaFS.c
index 8e8611f0e8..a5f4e8d2e8 100644
--- a/source/dnode/vnode/src/sma/smaFS.c
+++ b/source/dnode/vnode/src/sma/smaFS.c
@@ -150,6 +150,8 @@ static int32_t tdFetchQTaskInfoFiles(SSma *pSma, int64_t version, SArray **outpu
regex_t regex;
int code = 0;
+ terrno = TSDB_CODE_SUCCESS;
+
tdGetVndDirName(TD_VID(pVnode), tfsGetPrimaryPath(pVnode->pTfs), VNODE_RSMA_DIR, true, dir);
if (!taosCheckExistFile(dir)) {
diff --git a/source/dnode/vnode/src/sma/smaRollup.c b/source/dnode/vnode/src/sma/smaRollup.c
index 412def646f..c6ec31cc21 100644
--- a/source/dnode/vnode/src/sma/smaRollup.c
+++ b/source/dnode/vnode/src/sma/smaRollup.c
@@ -1906,7 +1906,7 @@ int32_t tdRSmaProcessExecImpl(SSma *pSma, ERsmaExecType type) {
while (true) {
// step 1: rsma exec - consume data in buffer queue for all suids
- if (type == RSMA_EXEC_OVERFLOW || type == RSMA_EXEC_COMMIT) {
+ if (type == RSMA_EXEC_OVERFLOW) {
void *pIter = NULL;
while ((pIter = taosHashIterate(infoHash, pIter))) {
SRSmaInfo *pInfo = *(SRSmaInfo **)pIter;
@@ -1962,42 +1962,7 @@ int32_t tdRSmaProcessExecImpl(SSma *pSma, ERsmaExecType type) {
atomic_val_compare_exchange_8(&pInfo->assigned, 1, 0);
}
}
- if (type == RSMA_EXEC_COMMIT) {
- if (atomic_load_64(&pRSmaStat->nBufItems) <= 0) {
- break;
- } else {
- // commit should wait for all items be consumed
- continue;
- }
- }
- }
-#if 0
- else if (type == RSMA_EXEC_COMMIT) {
- while (pIter) {
- SRSmaInfo *pInfo = *(SRSmaInfo **)pIter;
- if (taosQueueItemSize(pInfo->iQueue)) {
- if (atomic_val_compare_exchange_8(&pInfo->assigned, 0, 1) == 0) {
- taosReadAllQitems(pInfo->iQueue, pInfo->iQall); // queue has mutex lock
- int32_t qallItemSize = taosQallItemSize(pInfo->iQall);
- if (qallItemSize > 0) {
- atomic_fetch_sub_64(&pRSmaStat->nBufItems, qallItemSize);
- nIdle = 0;
-
- // batch exec
- tdRSmaBatchExec(pSma, pInfo, pInfo->qall, pSubmitArr, type);
- }
-
- // tdRSmaFetchAllResult(pSma, pInfo, pSubmitArr);
- atomic_val_compare_exchange_8(&pInfo->assigned, 1, 0);
- }
- }
- ASSERT(taosQueueItemSize(pInfo->iQueue) == 0);
- pIter = taosHashIterate(infoHash, pIter);
- }
- break;
- }
-#endif
- else {
+ } else {
ASSERT(0);
}
diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c
index 29217e29a4..76f3c1b12d 100644
--- a/source/dnode/vnode/src/tq/tq.c
+++ b/source/dnode/vnode/src/tq/tq.c
@@ -479,6 +479,9 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) {
tqInitDataRsp(&dataRsp, pReq, pHandle->execHandle.subType);
tqScanData(pTq, pHandle, &dataRsp, &fetchOffsetNew);
+#if 1
+
+#endif
if (tqSendDataRsp(pTq, pMsg, pReq, &dataRsp) < 0) {
code = -1;
}
diff --git a/source/dnode/vnode/src/tq/tqMeta.c b/source/dnode/vnode/src/tq/tqMeta.c
index 62f8debccb..c55e1059cf 100644
--- a/source/dnode/vnode/src/tq/tqMeta.c
+++ b/source/dnode/vnode/src/tq/tqMeta.c
@@ -25,17 +25,17 @@ int32_t tEncodeSTqHandle(SEncoder* pEncoder, const STqHandle* pHandle) {
if (tEncodeI8(pEncoder, pHandle->execHandle.subType) < 0) return -1;
if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) {
if (tEncodeCStr(pEncoder, pHandle->execHandle.execCol.qmsg) < 0) return -1;
- } else if(pHandle->execHandle.subType == TOPIC_SUB_TYPE__DB){
+ } else if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__DB) {
int32_t size = taosHashGetSize(pHandle->execHandle.execDb.pFilterOutTbUid);
if (tEncodeI32(pEncoder, size) < 0) return -1;
- void *pIter = NULL;
+ void* pIter = NULL;
pIter = taosHashIterate(pHandle->execHandle.execDb.pFilterOutTbUid, pIter);
- while(pIter){
- int64_t *tbUid = (int64_t *)taosHashGetKey(pIter, NULL);
+ while (pIter) {
+ int64_t* tbUid = (int64_t*)taosHashGetKey(pIter, NULL);
if (tEncodeI64(pEncoder, *tbUid) < 0) return -1;
pIter = taosHashIterate(pHandle->execHandle.execDb.pFilterOutTbUid, pIter);
}
- } else if(pHandle->execHandle.subType == TOPIC_SUB_TYPE__TABLE){
+ } else if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__TABLE) {
if (tEncodeI64(pEncoder, pHandle->execHandle.execTb.suid) < 0) return -1;
}
tEndEncode(pEncoder);
@@ -52,17 +52,17 @@ int32_t tDecodeSTqHandle(SDecoder* pDecoder, STqHandle* pHandle) {
if (tDecodeI8(pDecoder, &pHandle->execHandle.subType) < 0) return -1;
if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) {
if (tDecodeCStrAlloc(pDecoder, &pHandle->execHandle.execCol.qmsg) < 0) return -1;
- }else if(pHandle->execHandle.subType == TOPIC_SUB_TYPE__DB){
+ } else if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__DB) {
pHandle->execHandle.execDb.pFilterOutTbUid =
taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_NO_LOCK);
int32_t size = 0;
if (tDecodeI32(pDecoder, &size) < 0) return -1;
- for(int32_t i = 0; i < size; i++){
+ for (int32_t i = 0; i < size; i++) {
int64_t tbUid = 0;
if (tDecodeI64(pDecoder, &tbUid) < 0) return -1;
taosHashPut(pHandle->execHandle.execDb.pFilterOutTbUid, &tbUid, sizeof(int64_t), NULL, 0);
}
- } else if(pHandle->execHandle.subType == TOPIC_SUB_TYPE__TABLE){
+ } else if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__TABLE) {
if (tDecodeI64(pDecoder, &pHandle->execHandle.execTb.suid) < 0) return -1;
}
tEndDecode(pDecoder);
@@ -117,7 +117,7 @@ int32_t tqMetaSaveCheckInfo(STQ* pTq, const char* key, const void* value, int32_
return -1;
}
- if (tdbTbUpsert(pTq->pExecStore, key, strlen(key), value, vLen, &txn) < 0) {
+ if (tdbTbUpsert(pTq->pCheckStore, key, strlen(key), value, vLen, &txn) < 0) {
return -1;
}
@@ -284,7 +284,6 @@ int32_t tqMetaRestoreHandle(STQ* pTq) {
};
if (handle.execHandle.subType == TOPIC_SUB_TYPE__COLUMN) {
-
handle.execHandle.task = qCreateQueueExecTaskInfo(
handle.execHandle.execCol.qmsg, &reader, &handle.execHandle.numOfCols, &handle.execHandle.pSchemaWrapper);
ASSERT(handle.execHandle.task);
@@ -297,9 +296,9 @@ int32_t tqMetaRestoreHandle(STQ* pTq) {
handle.pWalReader = walOpenReader(pTq->pVnode->pWal, NULL);
handle.execHandle.pExecReader = tqOpenReader(pTq->pVnode);
- buildSnapContext(reader.meta, reader.version, 0, handle.execHandle.subType, handle.fetchMeta, (SSnapContext **)(&reader.sContext));
- handle.execHandle.task =
- qCreateQueueExecTaskInfo(NULL, &reader, NULL, NULL);
+ buildSnapContext(reader.meta, reader.version, 0, handle.execHandle.subType, handle.fetchMeta,
+ (SSnapContext**)(&reader.sContext));
+ handle.execHandle.task = qCreateQueueExecTaskInfo(NULL, &reader, NULL, NULL);
} else if (handle.execHandle.subType == TOPIC_SUB_TYPE__TABLE) {
handle.pWalReader = walOpenReader(pTq->pVnode->pWal, NULL);
@@ -314,9 +313,9 @@ int32_t tqMetaRestoreHandle(STQ* pTq) {
tqReaderSetTbUidList(handle.execHandle.pExecReader, tbUidList);
taosArrayDestroy(tbUidList);
- buildSnapContext(reader.meta, reader.version, handle.execHandle.execTb.suid, handle.execHandle.subType, handle.fetchMeta, (SSnapContext **)(&reader.sContext));
- handle.execHandle.task =
- qCreateQueueExecTaskInfo(NULL, &reader, NULL, NULL);
+ buildSnapContext(reader.meta, reader.version, handle.execHandle.execTb.suid, handle.execHandle.subType,
+ handle.fetchMeta, (SSnapContext**)(&reader.sContext));
+ handle.execHandle.task = qCreateQueueExecTaskInfo(NULL, &reader, NULL, NULL);
}
tqDebug("tq restore %s consumer %" PRId64 " vgId:%d", handle.subKey, handle.consumerId, TD_VID(pTq->pVnode));
taosHashPut(pTq->pHandle, pKey, kLen, &handle, sizeof(STqHandle));
diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c
index 14dbfbd63e..ca6f6346a6 100644
--- a/source/dnode/vnode/src/tsdb/tsdbRead.c
+++ b/source/dnode/vnode/src/tsdb/tsdbRead.c
@@ -193,6 +193,8 @@ static int64_t getCurrentKeyInLastBlock(SLastBlockReader* pLastBlockReader
static bool hasDataInLastBlock(SLastBlockReader* pLastBlockReader);
static int32_t doBuildDataBlock(STsdbReader* pReader);
static TSDBKEY getCurrentKeyInBuf(STableBlockScanInfo* pScanInfo, STsdbReader* pReader);
+static bool hasDataInFileBlock(const SBlockData* pBlockData, const SFileBlockDumpInfo* pDumpInfo);
+static bool hasDataInLastBlock(SLastBlockReader* pLastBlockReader);
static bool outOfTimeWindow(int64_t ts, STimeWindow* pWindow) { return (ts > pWindow->ekey) || (ts < pWindow->skey); }
@@ -893,7 +895,7 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn
if (pData->cid < pColData->info.colId) {
colIndex += 1;
} else if (pData->cid == pColData->info.colId) {
- if (pData->flag == HAS_NONE || pData->flag == HAS_NULL) {
+ if (pData->flag == HAS_NONE || pData->flag == HAS_NULL || pData->flag == (HAS_NULL|HAS_NONE)) {
colDataAppendNNULL(pColData, 0, remain);
} else {
if (IS_NUMERIC_TYPE(pColData->info.type) && asc) {
@@ -1537,7 +1539,7 @@ static int32_t doMergeBufAndFileRows(STsdbReader* pReader, STableBlockScanInfo*
minKey = k.ts;
}
- if (minKey > key && pBlockData->nRow > 0) {
+ if (minKey > key && hasDataInFileBlock(pBlockData, pDumpInfo)) {
minKey = key;
}
} else {
@@ -1550,7 +1552,7 @@ static int32_t doMergeBufAndFileRows(STsdbReader* pReader, STableBlockScanInfo*
minKey = k.ts;
}
- if (minKey < key && pBlockData->nRow > 0) {
+ if (minKey < key && hasDataInFileBlock(pBlockData, pDumpInfo)) {
minKey = key;
}
}
@@ -1688,7 +1690,7 @@ static int32_t mergeFileBlockAndLastBlock(STsdbReader* pReader, SLastBlockReader
STableBlockScanInfo* pBlockScanInfo, SBlockData* pBlockData) {
SFileBlockDumpInfo* pDumpInfo = &pReader->status.fBlockDumpInfo;
- if (pBlockData->nRow > 0) {
+ if (hasDataInFileBlock(pBlockData, pDumpInfo)) {
// no last block available, only data block exists
if (!hasDataInLastBlock(pLastBlockReader)) {
return mergeRowsInFileBlocks(pBlockData, pBlockScanInfo, key, pReader);
@@ -1753,7 +1755,7 @@ static int32_t doMergeMultiLevelRows(STsdbReader* pReader, STableBlockScanInfo*
tsLast = getCurrentKeyInLastBlock(pLastBlockReader);
}
- int64_t key = pBlockData->aTSKEY[pDumpInfo->rowIndex];
+ int64_t key = hasDataInFileBlock(pBlockData, pDumpInfo)? pBlockData->aTSKEY[pDumpInfo->rowIndex]:INT64_MIN;
TSDBKEY k = TSDBROW_KEY(pRow);
TSDBKEY ik = TSDBROW_KEY(piRow);
@@ -1769,7 +1771,7 @@ static int32_t doMergeMultiLevelRows(STsdbReader* pReader, STableBlockScanInfo*
minKey = ik.ts;
}
- if (minKey > key && pBlockData->nRow > 0) {
+ if (minKey > key && hasDataInFileBlock(pBlockData, pDumpInfo)) {
minKey = key;
}
@@ -1786,7 +1788,7 @@ static int32_t doMergeMultiLevelRows(STsdbReader* pReader, STableBlockScanInfo*
minKey = ik.ts;
}
- if (minKey < key && pBlockData->nRow > 0) {
+ if (minKey < key && hasDataInFileBlock(pBlockData, pDumpInfo)) {
minKey = key;
}
@@ -2021,6 +2023,13 @@ static int64_t getCurrentKeyInLastBlock(SLastBlockReader* pLastBlockReader) {
}
static bool hasDataInLastBlock(SLastBlockReader* pLastBlockReader) { return pLastBlockReader->mergeTree.pIter != NULL; }
+bool hasDataInFileBlock(const SBlockData* pBlockData, const SFileBlockDumpInfo* pDumpInfo) {
+ if (pBlockData->nRow > 0) {
+ ASSERT(pBlockData->nRow == pDumpInfo->totalRows);
+ }
+
+ return pBlockData->nRow > 0 && (!pDumpInfo->allDumped);
+}
int32_t mergeRowsInFileBlocks(SBlockData* pBlockData, STableBlockScanInfo* pBlockScanInfo, int64_t key,
STsdbReader* pReader) {
@@ -2052,7 +2061,7 @@ static int32_t buildComposedDataBlockImpl(STsdbReader* pReader, STableBlockScanI
SBlockData* pBlockData, SLastBlockReader* pLastBlockReader) {
SFileBlockDumpInfo* pDumpInfo = &pReader->status.fBlockDumpInfo;
- int64_t key = (pBlockData->nRow > 0) ? pBlockData->aTSKEY[pDumpInfo->rowIndex] : INT64_MIN;
+ int64_t key = (pBlockData->nRow > 0 && (!pDumpInfo->allDumped)) ? pBlockData->aTSKEY[pDumpInfo->rowIndex] : INT64_MIN;
if (pBlockScanInfo->iter.hasVal && pBlockScanInfo->iiter.hasVal) {
return doMergeMultiLevelRows(pReader, pBlockScanInfo, pBlockData, pLastBlockReader);
} else {
@@ -2664,8 +2673,11 @@ static STsdb* getTsdbByRetentions(SVnode* pVnode, TSKEY winSKey, SRetention* ret
int8_t* pLevel) {
if (VND_IS_RSMA(pVnode)) {
int8_t level = 0;
- int64_t now = taosGetTimestamp(pVnode->config.tsdbCfg.precision);
- int64_t offset = TSDB_TICK_PER_SECOND(pVnode->config.tsdbCfg.precision);
+ int8_t precision = pVnode->config.tsdbCfg.precision;
+ int64_t now = taosGetTimestamp(precision);
+ int64_t offset = tsQueryRsmaTolerance * ((precision == TSDB_TIME_PRECISION_MILLI) ? 1
+ : (precision == TSDB_TIME_PRECISION_MICRO) ? 1000
+ : 1000000);
for (int8_t i = 0; i < TSDB_RETENTION_MAX; ++i) {
SRetention* pRetention = retentions + level;
@@ -3290,9 +3302,31 @@ void* tsdbGetIvtIdx(SMeta* pMeta) {
uint64_t getReaderMaxVersion(STsdbReader* pReader) { return pReader->verRange.maxVer; }
+
+static int32_t doOpenReaderImpl(STsdbReader* pReader) {
+ SDataBlockIter* pBlockIter = &pReader->status.blockIter;
+
+ initFilesetIterator(&pReader->status.fileIter, pReader->pReadSnap->fs.aDFileSet, pReader);
+ resetDataBlockIterator(&pReader->status.blockIter, pReader->order);
+
+ // no data in files, let's try buffer in memory
+ if (pReader->status.fileIter.numOfFiles == 0) {
+ pReader->status.loadFromFile = false;
+ return TSDB_CODE_SUCCESS;
+ } else {
+ return initForFirstBlockInFile(pReader, pBlockIter);
+ }
+}
+
// ====================================== EXPOSED APIs ======================================
int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, SArray* pTableList, STsdbReader** ppReader,
const char* idstr) {
+ STimeWindow window = pCond->twindows;
+ if (pCond->type == TIMEWINDOW_RANGE_EXTERNAL) {
+ pCond->twindows.skey += 1;
+ pCond->twindows.ekey -= 1;
+ }
+
int32_t code = tsdbReaderCreate(pVnode, pCond, ppReader, 4096, idstr);
if (code != TSDB_CODE_SUCCESS) {
goto _err;
@@ -3300,21 +3334,20 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, SArray* pTabl
// check for query time window
STsdbReader* pReader = *ppReader;
- if (isEmptyQueryTimeWindow(&pReader->window)) {
+ if (isEmptyQueryTimeWindow(&pReader->window) && pCond->type == TIMEWINDOW_RANGE_CONTAINED) {
tsdbDebug("%p query window not overlaps with the data set, no result returned, %s", pReader, pReader->idStr);
return TSDB_CODE_SUCCESS;
}
if (pCond->type == TIMEWINDOW_RANGE_EXTERNAL) {
// update the SQueryTableDataCond to create inner reader
- STimeWindow w = pCond->twindows;
- int32_t order = pCond->order;
+ int32_t order = pCond->order;
if (order == TSDB_ORDER_ASC) {
- pCond->twindows.ekey = pCond->twindows.skey;
+ pCond->twindows.ekey = window.skey;
pCond->twindows.skey = INT64_MIN;
pCond->order = TSDB_ORDER_DESC;
} else {
- pCond->twindows.skey = pCond->twindows.ekey;
+ pCond->twindows.skey = window.ekey;
pCond->twindows.ekey = INT64_MAX;
pCond->order = TSDB_ORDER_ASC;
}
@@ -3326,12 +3359,14 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, SArray* pTabl
}
if (order == TSDB_ORDER_ASC) {
- pCond->twindows.skey = w.ekey;
+ pCond->twindows.skey = window.ekey;
pCond->twindows.ekey = INT64_MAX;
} else {
pCond->twindows.skey = INT64_MIN;
- pCond->twindows.ekey = w.ekey;
+ pCond->twindows.ekey = window.ekey;
}
+ pCond->order = order;
+
code = tsdbReaderCreate(pVnode, pCond, &pReader->innerReader[1], 1, idstr);
if (code != TSDB_CODE_SUCCESS) {
goto _err;
@@ -3340,20 +3375,22 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, SArray* pTabl
// NOTE: the endVersion in pCond is the data version not schema version, so pCond->endVersion is not correct here.
if (pCond->suid != 0) {
- pReader->pSchema = metaGetTbTSchema(pReader->pTsdb->pVnode->pMeta, pReader->suid, /*pCond->endVersion*/ -1);
+ pReader->pSchema = metaGetTbTSchema(pReader->pTsdb->pVnode->pMeta, pReader->suid, -1);
if (pReader->pSchema == NULL) {
tsdbError("failed to get table schema, suid:%"PRIu64", ver:%"PRId64" , %s", pReader->suid, -1, pReader->idStr);
}
} else if (taosArrayGetSize(pTableList) > 0) {
STableKeyInfo* pKey = taosArrayGet(pTableList, 0);
- pReader->pSchema = metaGetTbTSchema(pReader->pTsdb->pVnode->pMeta, pKey->uid, /*pCond->endVersion*/ -1);
+ pReader->pSchema = metaGetTbTSchema(pReader->pTsdb->pVnode->pMeta, pKey->uid, -1);
if (pReader->pSchema == NULL) {
tsdbError("failed to get table schema, uid:%"PRIu64", ver:%"PRId64" , %s", pKey->uid, -1, pReader->idStr);
}
}
+ STsdbReader* p = pReader->innerReader[0] != NULL? pReader->innerReader[0]:pReader;
+
int32_t numOfTables = taosArrayGetSize(pTableList);
- pReader->status.pTableMap = createDataBlockScanInfo(pReader, pTableList->pData, numOfTables);
+ pReader->status.pTableMap = createDataBlockScanInfo(p, pTableList->pData, numOfTables);
if (pReader->status.pTableMap == NULL) {
tsdbReaderClose(pReader);
*ppReader = NULL;
@@ -3368,40 +3405,36 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, SArray* pTabl
}
if (pReader->type == TIMEWINDOW_RANGE_CONTAINED) {
- SDataBlockIter* pBlockIter = &pReader->status.blockIter;
-
- initFilesetIterator(&pReader->status.fileIter, pReader->pReadSnap->fs.aDFileSet, pReader);
- resetDataBlockIterator(&pReader->status.blockIter, pReader->order);
-
- // no data in files, let's try buffer in memory
- if (pReader->status.fileIter.numOfFiles == 0) {
- pReader->status.loadFromFile = false;
- } else {
- code = initForFirstBlockInFile(pReader, pBlockIter);
- if (code != TSDB_CODE_SUCCESS) {
- return code;
- }
+ code = doOpenReaderImpl(pReader);
+ if (code != TSDB_CODE_SUCCESS) {
+ return code;
}
} else {
- STsdbReader* pPrevReader = pReader->innerReader[0];
- SDataBlockIter* pBlockIter = &pPrevReader->status.blockIter;
+ STsdbReader* pPrevReader = pReader->innerReader[0];
+ STsdbReader* pNextReader = pReader->innerReader[1];
- code = tsdbTakeReadSnap(pPrevReader->pTsdb, &pPrevReader->pReadSnap, pReader->idStr);
+ // we need only one row
+ pPrevReader->capacity = 1;
+ pPrevReader->status.pTableMap = pReader->status.pTableMap;
+ pPrevReader->pReadSnap = pReader->pReadSnap;
+
+ pNextReader->capacity = 1;
+ pNextReader->status.pTableMap = pReader->status.pTableMap;
+ pNextReader->pReadSnap = pReader->pReadSnap;
+
+ code = doOpenReaderImpl(pPrevReader);
if (code != TSDB_CODE_SUCCESS) {
- goto _err;
+ return code;
}
- initFilesetIterator(&pPrevReader->status.fileIter, pPrevReader->pReadSnap->fs.aDFileSet, pPrevReader);
- resetDataBlockIterator(&pPrevReader->status.blockIter, pPrevReader->order);
+ code = doOpenReaderImpl(pNextReader);
+ if (code != TSDB_CODE_SUCCESS) {
+ return code;
+ }
- // no data in files, let's try buffer in memory
- if (pPrevReader->status.fileIter.numOfFiles == 0) {
- pPrevReader->status.loadFromFile = false;
- } else {
- code = initForFirstBlockInFile(pPrevReader, pBlockIter);
- if (code != TSDB_CODE_SUCCESS) {
- return code;
- }
+ code = doOpenReaderImpl(pReader);
+ if (code != TSDB_CODE_SUCCESS) {
+ return code;
}
}
@@ -3418,6 +3451,19 @@ void tsdbReaderClose(STsdbReader* pReader) {
return;
}
+ {
+ if (pReader->innerReader[0] != NULL) {
+ pReader->innerReader[0]->status.pTableMap = NULL;
+ pReader->innerReader[0]->pReadSnap = NULL;
+
+ pReader->innerReader[1]->status.pTableMap = NULL;
+ pReader->innerReader[1]->pReadSnap = NULL;
+
+ tsdbReaderClose(pReader->innerReader[0]);
+ tsdbReaderClose(pReader->innerReader[1]);
+ }
+ }
+
SBlockLoadSuppInfo* pSupInfo = &pReader->suppInfo;
taosMemoryFreeClear(pSupInfo->plist);
@@ -3508,32 +3554,32 @@ bool tsdbNextDataBlock(STsdbReader* pReader) {
return false;
}
- if (pReader->innerReader[0] != NULL) {
+ if (pReader->innerReader[0] != NULL && pReader->step == 0) {
bool ret = doTsdbNextDataBlock(pReader->innerReader[0]);
+ resetDataBlockScanInfo(pReader->innerReader[0]->status.pTableMap, pReader->innerReader[0]->window.ekey);
+ pReader->step = EXTERNAL_ROWS_PREV;
+
if (ret) {
- pReader->step = EXTERNAL_ROWS_PREV;
return ret;
}
-
- tsdbReaderClose(pReader->innerReader[0]);
- pReader->innerReader[0] = NULL;
}
- pReader->step = EXTERNAL_ROWS_MAIN;
+ if (pReader->step == EXTERNAL_ROWS_PREV) {
+ pReader->step = EXTERNAL_ROWS_MAIN;
+ }
+
bool ret = doTsdbNextDataBlock(pReader);
if (ret) {
return ret;
}
- if (pReader->innerReader[1] != NULL) {
+ if (pReader->innerReader[1] != NULL && pReader->step == EXTERNAL_ROWS_MAIN) {
+ resetDataBlockScanInfo(pReader->innerReader[1]->status.pTableMap, pReader->window.ekey);
bool ret1 = doTsdbNextDataBlock(pReader->innerReader[1]);
+ pReader->step = EXTERNAL_ROWS_NEXT;
if (ret1) {
- pReader->step = EXTERNAL_ROWS_NEXT;
return ret1;
}
-
- tsdbReaderClose(pReader->innerReader[1]);
- pReader->innerReader[1] = NULL;
}
return false;
diff --git a/source/libs/command/src/explain.c b/source/libs/command/src/explain.c
index 967c682b0b..a1a8ed66e6 100644
--- a/source/libs/command/src/explain.c
+++ b/source/libs/command/src/explain.c
@@ -764,9 +764,9 @@ int32_t qExplainResNodeToRowsImpl(SExplainResNode *pResNode, SExplainCtx *ctx, i
}
case QUERY_NODE_PHYSICAL_PLAN_EXCHANGE: {
SExchangePhysiNode *pExchNode = (SExchangePhysiNode *)pNode;
- SExplainGroup *group = taosHashGet(ctx->groupHash, &pExchNode->srcGroupId, sizeof(pExchNode->srcGroupId));
+ SExplainGroup *group = taosHashGet(ctx->groupHash, &pExchNode->srcStartGroupId, sizeof(pExchNode->srcStartGroupId));
if (NULL == group) {
- qError("exchange src group %d not in groupHash", pExchNode->srcGroupId);
+ qError("exchange src group %d not in groupHash", pExchNode->srcStartGroupId);
QRY_ERR_RET(TSDB_CODE_QRY_APP_ERROR);
}
@@ -801,7 +801,7 @@ int32_t qExplainResNodeToRowsImpl(SExplainResNode *pResNode, SExplainCtx *ctx, i
}
}
- QRY_ERR_RET(qExplainAppendGroupResRows(ctx, pExchNode->srcGroupId, level + 1));
+ QRY_ERR_RET(qExplainAppendGroupResRows(ctx, pExchNode->srcStartGroupId, level + 1));
break;
}
case QUERY_NODE_PHYSICAL_PLAN_SORT: {
diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c
index 45b88ec6a5..be8bdf7308 100644
--- a/source/libs/executor/src/executor.c
+++ b/source/libs/executor/src/executor.c
@@ -49,6 +49,7 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu
SStreamScanInfo* pInfo = pOperator->info;
+#if 0
// TODO: if a block was set but not consumed,
// prevent setting a different type of block
pInfo->validBlockIndex = 0;
@@ -57,6 +58,10 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu
} else {
taosArrayClear(pInfo->pBlockLists);
}
+#endif
+
+ ASSERT(pInfo->validBlockIndex == 0);
+ ASSERT(taosArrayGetSize(pInfo->pBlockLists) == 0);
if (type == STREAM_INPUT__MERGED_SUBMIT) {
// ASSERT(numOfBlocks > 1);
@@ -79,7 +84,9 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu
} else if (type == STREAM_INPUT__DATA_BLOCK) {
for (int32_t i = 0; i < numOfBlocks; ++i) {
SSDataBlock* pDataBlock = &((SSDataBlock*)input)[i];
+ taosArrayPush(pInfo->pBlockLists, &pDataBlock);
+#if 0
// TODO optimize
SSDataBlock* p = createOneDataBlock(pDataBlock, false);
p->info = pDataBlock->info;
@@ -87,6 +94,7 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu
taosArrayClear(p->pDataBlock);
taosArrayAddAll(p->pDataBlock, pDataBlock->pDataBlock);
taosArrayPush(pInfo->pBlockLists, &p);
+#endif
}
pInfo->blockType = STREAM_INPUT__DATA_BLOCK;
} else {
@@ -100,6 +108,7 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu
static FORCE_INLINE void streamInputBlockDataDestory(void* pBlock) { blockDataDestroy((SSDataBlock*)pBlock); }
void tdCleanupStreamInputDataBlock(qTaskInfo_t tinfo) {
+#if 0
SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo;
if (!pTaskInfo || !pTaskInfo->pRoot || pTaskInfo->pRoot->numOfDownstream <= 0) {
return;
@@ -116,6 +125,7 @@ void tdCleanupStreamInputDataBlock(qTaskInfo_t tinfo) {
} else {
ASSERT(0);
}
+#endif
}
int32_t qSetMultiStreamInput(qTaskInfo_t tinfo, const void* pBlocks, size_t numOfBlocks, int32_t type) {
diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c
index a1ff79bd03..31a7b0facf 100644
--- a/source/libs/executor/src/executorimpl.c
+++ b/source/libs/executor/src/executorimpl.c
@@ -81,11 +81,6 @@ static UNUSED_FUNC void* u_realloc(void* p, size_t __size) {
int32_t getMaximumIdleDurationSec() { return tsShellActivityTimer * 2; }
-static int32_t getExprFunctionId(SExprInfo* pExprInfo) {
- assert(pExprInfo != NULL && pExprInfo->pExpr != NULL && pExprInfo->pExpr->nodeType == TEXPR_UNARYEXPR_NODE);
- return 0;
-}
-
static void setBlockSMAInfo(SqlFunctionCtx* pCtx, SExprInfo* pExpr, SSDataBlock* pBlock);
static void releaseQueryBuf(size_t numOfTables);
@@ -1115,7 +1110,7 @@ void setResultRowInitCtx(SResultRow* pResult, SqlFunctionCtx* pCtx, int32_t numO
}
}
-static void extractQualifiedTupleByFilterResult(SSDataBlock* pBlock, const int8_t* rowRes, bool keep);
+static void extractQualifiedTupleByFilterResult(SSDataBlock* pBlock, const SColumnInfoData* p, bool keep, int32_t status);
void doFilter(const SNode* pFilterNode, SSDataBlock* pBlock, const SArray* pColMatchInfo) {
if (pFilterNode == NULL || pBlock->info.rows == 0) {
@@ -1126,18 +1121,17 @@ void doFilter(const SNode* pFilterNode, SSDataBlock* pBlock, const SArray* pColM
// todo move to the initialization function
int32_t code = filterInitFromNode((SNode*)pFilterNode, &filter, 0);
-
- size_t numOfCols = taosArrayGetSize(pBlock->pDataBlock);
- SFilterColumnParam param1 = {.numOfCols = numOfCols, .pDataBlock = pBlock->pDataBlock};
+ SFilterColumnParam param1 = {.numOfCols = taosArrayGetSize(pBlock->pDataBlock), .pDataBlock = pBlock->pDataBlock};
code = filterSetDataFromSlotId(filter, ¶m1);
- int8_t* rowRes = NULL;
+ SColumnInfoData* p = NULL;
+ int32_t status = 0;
// todo the keep seems never to be True??
- bool keep = filterExecute(filter, pBlock, &rowRes, NULL, param1.numOfCols);
+ bool keep = filterExecute(filter, pBlock, &p, NULL, param1.numOfCols, &status);
filterFreeInfo(filter);
- extractQualifiedTupleByFilterResult(pBlock, rowRes, keep);
+ extractQualifiedTupleByFilterResult(pBlock, p, keep, status);
if (pColMatchInfo != NULL) {
for (int32_t i = 0; i < taosArrayGetSize(pColMatchInfo); ++i) {
@@ -1152,16 +1146,22 @@ void doFilter(const SNode* pFilterNode, SSDataBlock* pBlock, const SArray* pColM
}
}
- taosMemoryFree(rowRes);
+ colDataDestroy(p);
+ taosMemoryFree(p);
}
-void extractQualifiedTupleByFilterResult(SSDataBlock* pBlock, const int8_t* rowRes, bool keep) {
+void extractQualifiedTupleByFilterResult(SSDataBlock* pBlock, const SColumnInfoData* p, bool keep, int32_t status) {
if (keep) {
return;
}
- if (rowRes != NULL) {
- int32_t totalRows = pBlock->info.rows;
+ int32_t totalRows = pBlock->info.rows;
+
+ if (status == FILTER_RESULT_ALL_QUALIFIED) {
+ // here nothing needs to be done
+ } else if (status == FILTER_RESULT_NONE_QUALIFIED) {
+ pBlock->info.rows = 0;
+ } else {
SSDataBlock* px = createOneDataBlock(pBlock, true);
size_t numOfCols = taosArrayGetSize(pBlock->pDataBlock);
@@ -1177,7 +1177,7 @@ void extractQualifiedTupleByFilterResult(SSDataBlock* pBlock, const int8_t* rowR
int32_t numOfRows = 0;
for (int32_t j = 0; j < totalRows; ++j) {
- if (rowRes[j] == 0) {
+ if (((int8_t*)p->pData)[j] == 0) {
continue;
}
@@ -1189,6 +1189,7 @@ void extractQualifiedTupleByFilterResult(SSDataBlock* pBlock, const int8_t* rowR
numOfRows += 1;
}
+ // todo this value can be assigned directly
if (pBlock->info.rows == totalRows) {
pBlock->info.rows = numOfRows;
} else {
@@ -1197,13 +1198,10 @@ void extractQualifiedTupleByFilterResult(SSDataBlock* pBlock, const int8_t* rowR
}
blockDataDestroy(px); // fix memory leak
- } else {
- // do nothing
- pBlock->info.rows = 0;
}
}
-void doSetTableGroupOutputBuf(SOperatorInfo* pOperator, int32_t numOfOutput, uint64_t groupId) {
+ void doSetTableGroupOutputBuf(SOperatorInfo* pOperator, int32_t numOfOutput, uint64_t groupId) {
// for simple group by query without interval, all the tables belong to one group result.
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
SAggOperatorInfo* pAggInfo = pOperator->info;
@@ -4246,10 +4244,10 @@ int32_t buildDataBlockFromGroupRes(SExecTaskInfo* pTaskInfo, SSDataBlock* pBlock
pCtx[j].resultInfo = getResultEntryInfo(pRow, j, rowEntryOffset);
if (pCtx[j].fpSet.finalize) {
- int32_t code = pCtx[j].fpSet.finalize(&pCtx[j], pBlock);
- if (TAOS_FAILED(code)) {
- qError("%s build result data block error, code %s", GET_TASKID(pTaskInfo), tstrerror(code));
- T_LONG_JMP(pTaskInfo->env, code);
+ int32_t code1 = pCtx[j].fpSet.finalize(&pCtx[j], pBlock);
+ if (TAOS_FAILED(code1)) {
+ qError("%s build result data block error, code %s", GET_TASKID(pTaskInfo), tstrerror(code1));
+ T_LONG_JMP(pTaskInfo->env, code1);
}
} else if (strcmp(pCtx[j].pExpr->pExpr->_function.functionName, "_select_value") == 0) {
// do nothing, todo refactor
diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c
index 5293e23fa7..6c5c33ae29 100644
--- a/source/libs/executor/src/scanoperator.c
+++ b/source/libs/executor/src/scanoperator.c
@@ -920,6 +920,19 @@ _error:
}
static void doClearBufferedBlocks(SStreamScanInfo* pInfo) {
+#if 0
+ if (pInfo->blockType == STREAM_INPUT__DATA_BLOCK) {
+ size_t total = taosArrayGetSize(pInfo->pBlockLists);
+ for (int32_t i = 0; i < total; i++) {
+ SSDataBlock* p = taosArrayGetP(pInfo->pBlockLists, i);
+ taosArrayDestroy(p->pDataBlock);
+ taosMemoryFree(p);
+ }
+ }
+#endif
+ taosArrayClear(pInfo->pBlockLists);
+ pInfo->validBlockIndex = 0;
+#if 0
size_t total = taosArrayGetSize(pInfo->pBlockLists);
pInfo->validBlockIndex = 0;
@@ -928,6 +941,7 @@ static void doClearBufferedBlocks(SStreamScanInfo* pInfo) {
blockDataDestroy(p);
}
taosArrayClear(pInfo->pBlockLists);
+#endif
}
static bool isSessionWindow(SStreamScanInfo* pInfo) {
@@ -1580,9 +1594,10 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
size_t total = taosArrayGetSize(pInfo->pBlockLists);
// TODO: refactor
+FETCH_NEXT_BLOCK:
if (pInfo->blockType == STREAM_INPUT__DATA_BLOCK) {
if (pInfo->validBlockIndex >= total) {
- /*doClearBufferedBlocks(pInfo);*/
+ doClearBufferedBlocks(pInfo);
/*pOperator->status = OP_EXEC_DONE;*/
return NULL;
}
@@ -1606,27 +1621,40 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
} break;
case STREAM_DELETE_DATA: {
printDataBlock(pBlock, "stream scan delete recv");
+ SSDataBlock* pDelBlock = NULL;
if (pInfo->tqReader) {
- SSDataBlock* pDelBlock = createSpecialDataBlock(STREAM_DELETE_DATA);
+ pDelBlock = createSpecialDataBlock(STREAM_DELETE_DATA);
filterDelBlockByUid(pDelBlock, pBlock, pInfo);
- pBlock = pDelBlock;
+ } else {
+ pDelBlock = pBlock;
}
printDataBlock(pBlock, "stream scan delete recv filtered");
if (!isIntervalWindow(pInfo) && !isSessionWindow(pInfo) && !isStateWindow(pInfo)) {
- generateDeleteResultBlock(pInfo, pBlock, pInfo->pDeleteDataRes);
+ generateDeleteResultBlock(pInfo, pDelBlock, pInfo->pDeleteDataRes);
pInfo->pDeleteDataRes->info.type = STREAM_DELETE_RESULT;
- printDataBlock(pBlock, "stream scan delete result");
- return pInfo->pDeleteDataRes;
+ printDataBlock(pDelBlock, "stream scan delete result");
+ if (pInfo->pDeleteDataRes->info.rows > 0) {
+ return pInfo->pDeleteDataRes;
+ } else {
+ goto FETCH_NEXT_BLOCK;
+ }
} else {
pInfo->blockType = STREAM_INPUT__DATA_SUBMIT;
pInfo->updateResIndex = 0;
- generateScanRange(pInfo, pBlock, pInfo->pUpdateRes);
+ generateScanRange(pInfo, pDelBlock, pInfo->pUpdateRes);
prepareRangeScan(pInfo, pInfo->pUpdateRes, &pInfo->updateResIndex);
copyDataBlock(pInfo->pDeleteDataRes, pInfo->pUpdateRes);
pInfo->pDeleteDataRes->info.type = STREAM_DELETE_DATA;
pInfo->scanMode = STREAM_SCAN_FROM_DATAREADER_RANGE;
- printDataBlock(pBlock, "stream scan delete data");
- return pInfo->pDeleteDataRes;
+ printDataBlock(pDelBlock, "stream scan delete data");
+ if (pInfo->tqReader) {
+ blockDataDestroy(pDelBlock);
+ }
+ if (pInfo->pDeleteDataRes->info.rows > 0) {
+ return pInfo->pDeleteDataRes;
+ } else {
+ goto FETCH_NEXT_BLOCK;
+ }
}
} break;
default:
@@ -1688,10 +1716,12 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
int32_t totBlockNum = taosArrayGetSize(pInfo->pBlockLists);
+ NEXT_SUBMIT_BLK:
while (1) {
if (pInfo->tqReader->pMsg == NULL) {
if (pInfo->validBlockIndex >= totBlockNum) {
updateInfoDestoryColseWinSBF(pInfo->pUpdateInfo);
+ doClearBufferedBlocks(pInfo);
return NULL;
}
@@ -1763,7 +1793,12 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
}
qDebug("scan rows: %d", pBlockInfo->rows);
- return (pBlockInfo->rows == 0) ? NULL : pInfo->pRes;
+ if (pBlockInfo->rows > 0) {
+ return pInfo->pRes;
+ } else {
+ goto NEXT_SUBMIT_BLK;
+ }
+ /*return (pBlockInfo->rows == 0) ? NULL : pInfo->pRes;*/
} else {
ASSERT(0);
return NULL;
diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c
index 660420aebb..9e51f3638e 100644
--- a/source/libs/executor/src/timewindowoperator.c
+++ b/source/libs/executor/src/timewindowoperator.c
@@ -2075,7 +2075,7 @@ static void doKeepLinearInfo(STimeSliceOperatorInfo* pSliceInfo, const SSDataBlo
}
}
- pSliceInfo->fillLastPoint = isLastRow ? true : false;
+ pSliceInfo->fillLastPoint = isLastRow;
}
static void genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp* pExprSup, SSDataBlock* pResBlock) {
@@ -2294,15 +2294,6 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
SSDataBlock* pResBlock = pSliceInfo->pRes;
SExprSupp* pSup = &pOperator->exprSupp;
- // if (pOperator->status == OP_RES_TO_RETURN) {
- // // doBuildResultDatablock(&pRuntimeEnv->groupResInfo, pRuntimeEnv, pIntervalInfo->pRes);
- // if (pResBlock->info.rows == 0 || !hasRemainResults(&pSliceInfo->groupResInfo)) {
- // doSetOperatorCompleted(pOperator);
- // }
- //
- // return pResBlock;
- // }
-
int32_t order = TSDB_ORDER_ASC;
SInterval* pInterval = &pSliceInfo->interval;
SOperatorInfo* downstream = pOperator->pDownstream[0];
@@ -2432,6 +2423,9 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
break;
}
}
+ } else {
+ // store ts value as start, and calculate interp value when processing next block
+ doKeepLinearInfo(pSliceInfo, pBlock, i, true);
}
} else { // non-linear interpolation
if (i < pBlock->info.rows - 1) {
@@ -2510,6 +2504,9 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
break;
}
}
+ } else { // it is the last row of current block
+ // store ts value as start, and calculate interp value when processing next block
+ doKeepLinearInfo(pSliceInfo, pBlock, i, true);
}
} else { // non-linear interpolation
pSliceInfo->current =
@@ -2615,6 +2612,10 @@ SOperatorInfo* createTimeSliceOperatorInfo(SOperatorInfo* downstream, SPhysiNode
pInfo->interval.interval = pInterpPhyNode->interval;
pInfo->current = pInfo->win.skey;
+ STableScanInfo* pScanInfo = (STableScanInfo*)downstream->info;
+ pScanInfo->cond.twindows = pInfo->win;
+ pScanInfo->cond.type = TIMEWINDOW_RANGE_EXTERNAL;
+
pOperator->name = "TimeSliceOperator";
pOperator->operatorType = QUERY_NODE_PHYSICAL_PLAN_INTERP_FUNC;
pOperator->blocking = false;
@@ -5657,7 +5658,6 @@ static void doStreamIntervalAggImpl2(SOperatorInfo* pOperatorInfo, SSDataBlock*
TSKEY* tsCols = NULL;
SResultRow* pResult = NULL;
int32_t forwardRows = 0;
- int32_t aa = 4;
ASSERT(pSDataBlock->pDataBlock != NULL);
SColumnInfoData* pColDataInfo = taosArrayGet(pSDataBlock->pDataBlock, pInfo->primaryTsIndex);
diff --git a/source/libs/function/src/functionMgt.c b/source/libs/function/src/functionMgt.c
index 26735fa263..bc10ce71ae 100644
--- a/source/libs/function/src/functionMgt.c
+++ b/source/libs/function/src/functionMgt.c
@@ -26,11 +26,6 @@ typedef struct SFuncMgtService {
SHashObj* pFuncNameHashTable;
} SFuncMgtService;
-typedef struct SUdfInfo {
- SDataType outputDt;
- int8_t funcType;
-} SUdfInfo;
-
static SFuncMgtService gFunMgtService;
static TdThreadOnce functionHashTableInit = PTHREAD_ONCE_INIT;
static int32_t initFunctionCode = 0;
diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c
index 48e21e137f..dbe08bb7b2 100644
--- a/source/libs/nodes/src/nodesCloneFuncs.c
+++ b/source/libs/nodes/src/nodesCloneFuncs.c
@@ -324,6 +324,21 @@ static int32_t fillNodeCopy(const SFillNode* pSrc, SFillNode* pDst) {
return TSDB_CODE_SUCCESS;
}
+static int32_t whenThenNodeCopy(const SWhenThenNode* pSrc, SWhenThenNode* pDst) {
+ COPY_BASE_OBJECT_FIELD(node, exprNodeCopy);
+ CLONE_NODE_FIELD(pWhen);
+ CLONE_NODE_FIELD(pThen);
+ return TSDB_CODE_SUCCESS;
+}
+
+static int32_t caseWhenNodeCopy(const SCaseWhenNode* pSrc, SCaseWhenNode* pDst) {
+ COPY_BASE_OBJECT_FIELD(node, exprNodeCopy);
+ CLONE_NODE_FIELD(pCase);
+ CLONE_NODE_FIELD(pElse);
+ CLONE_NODE_LIST_FIELD(pWhenThenList);
+ return TSDB_CODE_SUCCESS;
+}
+
static int32_t logicNodeCopy(const SLogicNode* pSrc, SLogicNode* pDst) {
CLONE_NODE_LIST_FIELD(pTargets);
CLONE_NODE_FIELD(pConditions);
@@ -414,7 +429,8 @@ static int32_t logicVnodeModifCopy(const SVnodeModifyLogicNode* pSrc, SVnodeModi
static int32_t logicExchangeCopy(const SExchangeLogicNode* pSrc, SExchangeLogicNode* pDst) {
COPY_BASE_OBJECT_FIELD(node, logicNodeCopy);
- COPY_SCALAR_FIELD(srcGroupId);
+ COPY_SCALAR_FIELD(srcStartGroupId);
+ COPY_SCALAR_FIELD(srcEndGroupId);
return TSDB_CODE_SUCCESS;
}
@@ -711,6 +727,12 @@ SNode* nodesCloneNode(const SNode* pNode) {
case QUERY_NODE_LEFT_VALUE:
code = TSDB_CODE_SUCCESS;
break;
+ case QUERY_NODE_WHEN_THEN:
+ code = whenThenNodeCopy((const SWhenThenNode*)pNode, (SWhenThenNode*)pDst);
+ break;
+ case QUERY_NODE_CASE_WHEN:
+ code = caseWhenNodeCopy((const SCaseWhenNode*)pNode, (SCaseWhenNode*)pDst);
+ break;
case QUERY_NODE_SELECT_STMT:
code = selectStmtCopy((const SSelectStmt*)pNode, (SSelectStmt*)pDst);
break;
diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c
index c5851b7875..af6c1757a9 100644
--- a/source/libs/nodes/src/nodesCodeFuncs.c
+++ b/source/libs/nodes/src/nodesCodeFuncs.c
@@ -81,6 +81,10 @@ const char* nodesNodeName(ENodeType type) {
return "IndexOptions";
case QUERY_NODE_LEFT_VALUE:
return "LeftValue";
+ case QUERY_NODE_WHEN_THEN:
+ return "WhenThen";
+ case QUERY_NODE_CASE_WHEN:
+ return "CaseWhen";
case QUERY_NODE_SET_OPERATOR:
return "SetOperator";
case QUERY_NODE_SELECT_STMT:
@@ -722,14 +726,18 @@ static int32_t jsonToLogicVnodeModifyNode(const SJson* pJson, void* pObj) {
return code;
}
-static const char* jkExchangeLogicPlanSrcGroupId = "SrcGroupId";
+static const char* jkExchangeLogicPlanSrcStartGroupId = "SrcStartGroupId";
+static const char* jkExchangeLogicPlanSrcEndGroupId = "SrcEndGroupId";
static int32_t logicExchangeNodeToJson(const void* pObj, SJson* pJson) {
const SExchangeLogicNode* pNode = (const SExchangeLogicNode*)pObj;
int32_t code = logicPlanNodeToJson(pObj, pJson);
if (TSDB_CODE_SUCCESS == code) {
- code = tjsonAddIntegerToObject(pJson, jkExchangeLogicPlanSrcGroupId, pNode->srcGroupId);
+ code = tjsonAddIntegerToObject(pJson, jkExchangeLogicPlanSrcStartGroupId, pNode->srcStartGroupId);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tjsonAddIntegerToObject(pJson, jkExchangeLogicPlanSrcEndGroupId, pNode->srcEndGroupId);
}
return code;
@@ -740,7 +748,10 @@ static int32_t jsonToLogicExchangeNode(const SJson* pJson, void* pObj) {
int32_t code = jsonToLogicPlanNode(pJson, pObj);
if (TSDB_CODE_SUCCESS == code) {
- code = tjsonGetIntValue(pJson, jkExchangeLogicPlanSrcGroupId, &pNode->srcGroupId);
+ code = tjsonGetIntValue(pJson, jkExchangeLogicPlanSrcStartGroupId, &pNode->srcStartGroupId);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tjsonGetIntValue(pJson, jkExchangeLogicPlanSrcEndGroupId, &pNode->srcEndGroupId);
}
return code;
@@ -1833,7 +1844,8 @@ static int32_t jsonToPhysiAggNode(const SJson* pJson, void* pObj) {
return code;
}
-static const char* jkExchangePhysiPlanSrcGroupId = "SrcGroupId";
+static const char* jkExchangePhysiPlanSrcStartGroupId = "SrcStartGroupId";
+static const char* jkExchangePhysiPlanSrcEndGroupId = "SrcEndGroupId";
static const char* jkExchangePhysiPlanSrcEndPoints = "SrcEndPoints";
static int32_t physiExchangeNodeToJson(const void* pObj, SJson* pJson) {
@@ -1841,7 +1853,10 @@ static int32_t physiExchangeNodeToJson(const void* pObj, SJson* pJson) {
int32_t code = physicPlanNodeToJson(pObj, pJson);
if (TSDB_CODE_SUCCESS == code) {
- code = tjsonAddIntegerToObject(pJson, jkExchangePhysiPlanSrcGroupId, pNode->srcGroupId);
+ code = tjsonAddIntegerToObject(pJson, jkExchangePhysiPlanSrcStartGroupId, pNode->srcStartGroupId);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tjsonAddIntegerToObject(pJson, jkExchangePhysiPlanSrcEndGroupId, pNode->srcEndGroupId);
}
if (TSDB_CODE_SUCCESS == code) {
code = nodeListToJson(pJson, jkExchangePhysiPlanSrcEndPoints, pNode->pSrcEndPoints);
@@ -1855,7 +1870,10 @@ static int32_t jsonToPhysiExchangeNode(const SJson* pJson, void* pObj) {
int32_t code = jsonToPhysicPlanNode(pJson, pObj);
if (TSDB_CODE_SUCCESS == code) {
- code = tjsonGetIntValue(pJson, jkExchangePhysiPlanSrcGroupId, &pNode->srcGroupId);
+ code = tjsonGetIntValue(pJson, jkExchangePhysiPlanSrcStartGroupId, &pNode->srcStartGroupId);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tjsonGetIntValue(pJson, jkExchangePhysiPlanSrcEndGroupId, &pNode->srcEndGroupId);
}
if (TSDB_CODE_SUCCESS == code) {
code = jsonToNodeList(pJson, jkExchangePhysiPlanSrcEndPoints, &pNode->pSrcEndPoints);
@@ -3917,6 +3935,75 @@ static int32_t jsonToDatabaseOptions(const SJson* pJson, void* pObj) {
return code;
}
+static const char* jkWhenThenWhen = "When";
+static const char* jkWhenThenThen = "Then";
+
+static int32_t whenThenNodeToJson(const void* pObj, SJson* pJson) {
+ const SWhenThenNode* pNode = (const SWhenThenNode*)pObj;
+
+ int32_t code = exprNodeToJson(pObj, pJson);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tjsonAddObject(pJson, jkWhenThenWhen, nodeToJson, pNode->pWhen);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tjsonAddObject(pJson, jkWhenThenThen, nodeToJson, pNode->pThen);
+ }
+
+ return code;
+}
+
+static int32_t jsonToWhenThenNode(const SJson* pJson, void* pObj) {
+ SWhenThenNode* pNode = (SWhenThenNode*)pObj;
+
+ int32_t code = jsonToExprNode(pJson, pObj);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = jsonToNodeObject(pJson, jkWhenThenWhen, &pNode->pWhen);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = jsonToNodeObject(pJson, jkWhenThenThen, &pNode->pThen);
+ }
+
+ return code;
+}
+
+static const char* jkCaseWhenCase = "Case";
+static const char* jkCaseWhenWhenThenList = "WhenThenList";
+static const char* jkCaseWhenElse = "Else";
+
+static int32_t caseWhenNodeToJson(const void* pObj, SJson* pJson) {
+ const SCaseWhenNode* pNode = (const SCaseWhenNode*)pObj;
+
+ int32_t code = exprNodeToJson(pObj, pJson);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tjsonAddObject(pJson, jkCaseWhenCase, nodeToJson, pNode->pCase);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = nodeListToJson(pJson, jkCaseWhenWhenThenList, pNode->pWhenThenList);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tjsonAddObject(pJson, jkCaseWhenElse, nodeToJson, pNode->pElse);
+ }
+
+ return code;
+}
+
+static int32_t jsonToCaseWhenNode(const SJson* pJson, void* pObj) {
+ SCaseWhenNode* pNode = (SCaseWhenNode*)pObj;
+
+ int32_t code = jsonToExprNode(pJson, pObj);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = jsonToNodeObject(pJson, jkCaseWhenCase, &pNode->pCase);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = jsonToNodeList(pJson, jkCaseWhenWhenThenList, &pNode->pWhenThenList);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = jsonToNodeObject(pJson, jkCaseWhenElse, &pNode->pElse);
+ }
+
+ return code;
+}
+
static const char* jkDataBlockDescDataBlockId = "DataBlockId";
static const char* jkDataBlockDescSlots = "Slots";
static const char* jkDataBlockTotalRowSize = "TotalRowSize";
@@ -4399,6 +4486,10 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) {
return databaseOptionsToJson(pObj, pJson);
case QUERY_NODE_LEFT_VALUE:
return TSDB_CODE_SUCCESS; // SLeftValueNode has no fields to serialize.
+ case QUERY_NODE_WHEN_THEN:
+ return whenThenNodeToJson(pObj, pJson);
+ case QUERY_NODE_CASE_WHEN:
+ return caseWhenNodeToJson(pObj, pJson);
case QUERY_NODE_SET_OPERATOR:
return setOperatorToJson(pObj, pJson);
case QUERY_NODE_SELECT_STMT:
@@ -4562,6 +4653,10 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) {
return jsonToDatabaseOptions(pJson, pObj);
case QUERY_NODE_LEFT_VALUE:
return TSDB_CODE_SUCCESS; // SLeftValueNode has no fields to deserialize.
+ case QUERY_NODE_WHEN_THEN:
+ return jsonToWhenThenNode(pJson, pObj);
+ case QUERY_NODE_CASE_WHEN:
+ return jsonToCaseWhenNode(pJson, pObj);
case QUERY_NODE_SET_OPERATOR:
return jsonToSetOperator(pJson, pObj);
case QUERY_NODE_SELECT_STMT:
diff --git a/source/libs/nodes/src/nodesEqualFuncs.c b/source/libs/nodes/src/nodesEqualFuncs.c
index 9cb7e8b66d..4e23999ec2 100644
--- a/source/libs/nodes/src/nodesEqualFuncs.c
+++ b/source/libs/nodes/src/nodesEqualFuncs.c
@@ -140,6 +140,19 @@ static bool functionNodeEqual(const SFunctionNode* a, const SFunctionNode* b) {
return true;
}
+static bool whenThenNodeEqual(const SWhenThenNode* a, const SWhenThenNode* b) {
+ COMPARE_NODE_FIELD(pWhen);
+ COMPARE_NODE_FIELD(pThen);
+ return true;
+}
+
+static bool caseWhenNodeEqual(const SCaseWhenNode* a, const SCaseWhenNode* b) {
+ COMPARE_NODE_FIELD(pCase);
+ COMPARE_NODE_FIELD(pElse);
+ COMPARE_NODE_LIST_FIELD(pWhenThenList);
+ return true;
+}
+
bool nodesEqualNode(const SNode* a, const SNode* b) {
if (a == b) {
return true;
@@ -164,13 +177,17 @@ bool nodesEqualNode(const SNode* a, const SNode* b) {
return logicConditionNodeEqual((const SLogicConditionNode*)a, (const SLogicConditionNode*)b);
case QUERY_NODE_FUNCTION:
return functionNodeEqual((const SFunctionNode*)a, (const SFunctionNode*)b);
+ case QUERY_NODE_WHEN_THEN:
+ return whenThenNodeEqual((const SWhenThenNode*)a, (const SWhenThenNode*)b);
+ case QUERY_NODE_CASE_WHEN:
+ return caseWhenNodeEqual((const SCaseWhenNode*)a, (const SCaseWhenNode*)b);
case QUERY_NODE_REAL_TABLE:
case QUERY_NODE_TEMP_TABLE:
case QUERY_NODE_JOIN_TABLE:
case QUERY_NODE_GROUPING_SET:
case QUERY_NODE_ORDER_BY_EXPR:
case QUERY_NODE_LIMIT:
- return false; // todo
+ return false;
default:
break;
}
diff --git a/source/libs/nodes/src/nodesMsgFuncs.c b/source/libs/nodes/src/nodesMsgFuncs.c
index 2c47ddea8b..0c6b11a765 100644
--- a/source/libs/nodes/src/nodesMsgFuncs.c
+++ b/source/libs/nodes/src/nodesMsgFuncs.c
@@ -1733,6 +1733,92 @@ static int32_t msgToDownstreamSourceNode(STlvDecoder* pDecoder, void* pObj) {
return code;
}
+enum { WHEN_THEN_CODE_EXPR_BASE = 1, WHEN_THEN_CODE_WHEN, WHEN_THEN_CODE_THEN };
+
+static int32_t whenThenNodeToMsg(const void* pObj, STlvEncoder* pEncoder) {
+ const SWhenThenNode* pNode = (const SWhenThenNode*)pObj;
+
+ int32_t code = tlvEncodeObj(pEncoder, WHEN_THEN_CODE_EXPR_BASE, exprNodeToMsg, pNode);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tlvEncodeObj(pEncoder, WHEN_THEN_CODE_WHEN, nodeToMsg, pNode->pWhen);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tlvEncodeObj(pEncoder, WHEN_THEN_CODE_THEN, nodeToMsg, pNode->pThen);
+ }
+
+ return code;
+}
+
+static int32_t msgToWhenThenNode(STlvDecoder* pDecoder, void* pObj) {
+ SWhenThenNode* pNode = (SWhenThenNode*)pObj;
+
+ int32_t code = TSDB_CODE_SUCCESS;
+ STlv* pTlv = NULL;
+ tlvForEach(pDecoder, pTlv, code) {
+ switch (pTlv->type) {
+ case WHEN_THEN_CODE_EXPR_BASE:
+ code = tlvDecodeObjFromTlv(pTlv, msgToExprNode, &pNode->node);
+ break;
+ case WHEN_THEN_CODE_WHEN:
+ code = msgToNodeFromTlv(pTlv, (void**)&pNode->pWhen);
+ break;
+ case WHEN_THEN_CODE_THEN:
+ code = msgToNodeFromTlv(pTlv, (void**)&pNode->pThen);
+ break;
+ default:
+ break;
+ }
+ }
+
+ return code;
+}
+
+enum { CASE_WHEN_CODE_EXPR_BASE = 1, CASE_WHEN_CODE_CASE, CASE_WHEN_CODE_ELSE, CASE_WHEN_CODE_WHEN_THEN_LIST };
+
+static int32_t caseWhenNodeToMsg(const void* pObj, STlvEncoder* pEncoder) {
+ const SCaseWhenNode* pNode = (const SCaseWhenNode*)pObj;
+
+ int32_t code = tlvEncodeObj(pEncoder, CASE_WHEN_CODE_EXPR_BASE, exprNodeToMsg, pNode);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tlvEncodeObj(pEncoder, CASE_WHEN_CODE_CASE, nodeToMsg, pNode->pCase);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tlvEncodeObj(pEncoder, CASE_WHEN_CODE_ELSE, nodeToMsg, pNode->pElse);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tlvEncodeObj(pEncoder, CASE_WHEN_CODE_WHEN_THEN_LIST, nodeListToMsg, pNode->pWhenThenList);
+ }
+
+ return code;
+}
+
+static int32_t msgToCaseWhenNode(STlvDecoder* pDecoder, void* pObj) {
+ SCaseWhenNode* pNode = (SCaseWhenNode*)pObj;
+
+ int32_t code = TSDB_CODE_SUCCESS;
+ STlv* pTlv = NULL;
+ tlvForEach(pDecoder, pTlv, code) {
+ switch (pTlv->type) {
+ case CASE_WHEN_CODE_EXPR_BASE:
+ code = tlvDecodeObjFromTlv(pTlv, msgToExprNode, &pNode->node);
+ break;
+ case CASE_WHEN_CODE_CASE:
+ code = msgToNodeFromTlv(pTlv, (void**)&pNode->pCase);
+ break;
+ case CASE_WHEN_CODE_ELSE:
+ code = msgToNodeFromTlv(pTlv, (void**)&pNode->pElse);
+ break;
+ case CASE_WHEN_CODE_WHEN_THEN_LIST:
+ code = msgToNodeListFromTlv(pTlv, (void**)&pNode->pWhenThenList);
+ break;
+ default:
+ break;
+ }
+ }
+
+ return code;
+}
+
enum {
PHY_NODE_CODE_OUTPUT_DESC = 1,
PHY_NODE_CODE_CONDITIONS,
@@ -2294,7 +2380,8 @@ static int32_t msgToPhysiAggNode(STlvDecoder* pDecoder, void* pObj) {
enum {
PHY_EXCHANGE_CODE_BASE_NODE = 1,
- PHY_EXCHANGE_CODE_SRC_GROUP_ID,
+ PHY_EXCHANGE_CODE_SRC_START_GROUP_ID,
+ PHY_EXCHANGE_CODE_SRC_END_GROUP_ID,
PHY_EXCHANGE_CODE_SINGLE_CHANNEL,
PHY_EXCHANGE_CODE_SRC_ENDPOINTS
};
@@ -2304,7 +2391,10 @@ static int32_t physiExchangeNodeToMsg(const void* pObj, STlvEncoder* pEncoder) {
int32_t code = tlvEncodeObj(pEncoder, PHY_EXCHANGE_CODE_BASE_NODE, physiNodeToMsg, &pNode->node);
if (TSDB_CODE_SUCCESS == code) {
- code = tlvEncodeI32(pEncoder, PHY_EXCHANGE_CODE_SRC_GROUP_ID, pNode->srcGroupId);
+ code = tlvEncodeI32(pEncoder, PHY_EXCHANGE_CODE_SRC_START_GROUP_ID, pNode->srcStartGroupId);
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tlvEncodeI32(pEncoder, PHY_EXCHANGE_CODE_SRC_END_GROUP_ID, pNode->srcEndGroupId);
}
if (TSDB_CODE_SUCCESS == code) {
code = tlvEncodeBool(pEncoder, PHY_EXCHANGE_CODE_SINGLE_CHANNEL, pNode->singleChannel);
@@ -2326,8 +2416,11 @@ static int32_t msgToPhysiExchangeNode(STlvDecoder* pDecoder, void* pObj) {
case PHY_EXCHANGE_CODE_BASE_NODE:
code = tlvDecodeObjFromTlv(pTlv, msgToPhysiNode, &pNode->node);
break;
- case PHY_EXCHANGE_CODE_SRC_GROUP_ID:
- code = tlvDecodeI32(pTlv, &pNode->srcGroupId);
+ case PHY_EXCHANGE_CODE_SRC_START_GROUP_ID:
+ code = tlvDecodeI32(pTlv, &pNode->srcStartGroupId);
+ break;
+ case PHY_EXCHANGE_CODE_SRC_END_GROUP_ID:
+ code = tlvDecodeI32(pTlv, &pNode->srcEndGroupId);
break;
case PHY_EXCHANGE_CODE_SINGLE_CHANNEL:
code = tlvDecodeBool(pTlv, &pNode->singleChannel);
@@ -3434,9 +3527,16 @@ static int32_t specificNodeToMsg(const void* pObj, STlvEncoder* pEncoder) {
code = slotDescNodeToMsg(pObj, pEncoder);
break;
case QUERY_NODE_DOWNSTREAM_SOURCE:
- return downstreamSourceNodeToMsg(pObj, pEncoder);
+ code = downstreamSourceNodeToMsg(pObj, pEncoder);
+ break;
case QUERY_NODE_LEFT_VALUE:
break;
+ case QUERY_NODE_WHEN_THEN:
+ code = whenThenNodeToMsg(pObj, pEncoder);
+ break;
+ case QUERY_NODE_CASE_WHEN:
+ code = caseWhenNodeToMsg(pObj, pEncoder);
+ break;
case QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN:
case QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN:
code = physiScanNodeToMsg(pObj, pEncoder);
@@ -3563,9 +3663,15 @@ static int32_t msgToSpecificNode(STlvDecoder* pDecoder, void* pObj) {
code = msgToSlotDescNode(pDecoder, pObj);
break;
case QUERY_NODE_DOWNSTREAM_SOURCE:
- return msgToDownstreamSourceNode(pDecoder, pObj);
+ code = msgToDownstreamSourceNode(pDecoder, pObj);
case QUERY_NODE_LEFT_VALUE:
break;
+ case QUERY_NODE_WHEN_THEN:
+ code = msgToWhenThenNode(pDecoder, pObj);
+ break;
+ case QUERY_NODE_CASE_WHEN:
+ code = msgToCaseWhenNode(pDecoder, pObj);
+ break;
case QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN:
case QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN:
code = msgToPhysiScanNode(pDecoder, pObj);
diff --git a/source/libs/nodes/src/nodesTraverseFuncs.c b/source/libs/nodes/src/nodesTraverseFuncs.c
index 728e173ff8..8ea80344fc 100644
--- a/source/libs/nodes/src/nodesTraverseFuncs.c
+++ b/source/libs/nodes/src/nodesTraverseFuncs.c
@@ -146,6 +146,25 @@ static EDealRes dispatchExpr(SNode* pNode, ETraversalOrder order, FNodeWalker wa
case QUERY_NODE_TARGET:
res = walkExpr(((STargetNode*)pNode)->pExpr, order, walker, pContext);
break;
+ case QUERY_NODE_WHEN_THEN: {
+ SWhenThenNode* pWhenThen = (SWhenThenNode*)pNode;
+ res = walkExpr(pWhenThen->pWhen, order, walker, pContext);
+ if (DEAL_RES_ERROR != res && DEAL_RES_END != res) {
+ res = walkExpr(pWhenThen->pThen, order, walker, pContext);
+ }
+ break;
+ }
+ case QUERY_NODE_CASE_WHEN: {
+ SCaseWhenNode* pCaseWhen = (SCaseWhenNode*)pNode;
+ res = walkExpr(pCaseWhen->pCase, order, walker, pContext);
+ if (DEAL_RES_ERROR != res && DEAL_RES_END != res) {
+ res = walkExpr(pCaseWhen->pElse, order, walker, pContext);
+ }
+ if (DEAL_RES_ERROR != res && DEAL_RES_END != res) {
+ res = walkExprs(pCaseWhen->pWhenThenList, order, walker, pContext);
+ }
+ break;
+ }
default:
break;
}
@@ -291,6 +310,25 @@ static EDealRes rewriteExpr(SNode** pRawNode, ETraversalOrder order, FNodeRewrit
case QUERY_NODE_TARGET:
res = rewriteExpr(&(((STargetNode*)pNode)->pExpr), order, rewriter, pContext);
break;
+ case QUERY_NODE_WHEN_THEN: {
+ SWhenThenNode* pWhenThen = (SWhenThenNode*)pNode;
+ res = rewriteExpr(&pWhenThen->pWhen, order, rewriter, pContext);
+ if (DEAL_RES_ERROR != res && DEAL_RES_END != res) {
+ res = rewriteExpr(&pWhenThen->pThen, order, rewriter, pContext);
+ }
+ break;
+ }
+ case QUERY_NODE_CASE_WHEN: {
+ SCaseWhenNode* pCaseWhen = (SCaseWhenNode*)pNode;
+ res = rewriteExpr(&pCaseWhen->pCase, order, rewriter, pContext);
+ if (DEAL_RES_ERROR != res && DEAL_RES_END != res) {
+ res = rewriteExpr(&pCaseWhen->pElse, order, rewriter, pContext);
+ }
+ if (DEAL_RES_ERROR != res && DEAL_RES_END != res) {
+ res = rewriteExprs(pCaseWhen->pWhenThenList, order, rewriter, pContext);
+ }
+ break;
+ }
default:
break;
}
diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c
index 2e5a0d935b..7a04d319ec 100644
--- a/source/libs/nodes/src/nodesUtilFuncs.c
+++ b/source/libs/nodes/src/nodesUtilFuncs.c
@@ -291,6 +291,10 @@ SNode* nodesMakeNode(ENodeType type) {
return makeNode(type, sizeof(SLeftValueNode));
case QUERY_NODE_COLUMN_REF:
return makeNode(type, sizeof(SColumnDefNode));
+ case QUERY_NODE_WHEN_THEN:
+ return makeNode(type, sizeof(SWhenThenNode));
+ case QUERY_NODE_CASE_WHEN:
+ return makeNode(type, sizeof(SCaseWhenNode));
case QUERY_NODE_SET_OPERATOR:
return makeNode(type, sizeof(SSetOperator));
case QUERY_NODE_SELECT_STMT:
@@ -738,7 +742,21 @@ void nodesDestroyNode(SNode* pNode) {
break;
}
case QUERY_NODE_LEFT_VALUE: // no pointer field
+ case QUERY_NODE_COLUMN_REF: // no pointer field
break;
+ case QUERY_NODE_WHEN_THEN: {
+ SWhenThenNode* pStmt = (SWhenThenNode*)pNode;
+ nodesDestroyNode(pStmt->pWhen);
+ nodesDestroyNode(pStmt->pThen);
+ break;
+ }
+ case QUERY_NODE_CASE_WHEN: {
+ SCaseWhenNode* pStmt = (SCaseWhenNode*)pNode;
+ nodesDestroyNode(pStmt->pCase);
+ nodesDestroyNode(pStmt->pElse);
+ nodesDestroyList(pStmt->pWhenThenList);
+ break;
+ }
case QUERY_NODE_SET_OPERATOR: {
SSetOperator* pStmt = (SSetOperator*)pNode;
nodesDestroyList(pStmt->pProjectionList);
diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h
index 898e4bf732..dea741cc9b 100644
--- a/source/libs/parser/inc/parAst.h
+++ b/source/libs/parser/inc/parAst.h
@@ -119,6 +119,8 @@ SNode* createIntervalWindowNode(SAstCreateContext* pCxt, SNode* pInterval, SNode
SNode* createFillNode(SAstCreateContext* pCxt, EFillMode mode, SNode* pValues);
SNode* createGroupingSetNode(SAstCreateContext* pCxt, SNode* pNode);
SNode* createInterpTimeRange(SAstCreateContext* pCxt, SNode* pStart, SNode* pEnd);
+SNode* createWhenThenNode(SAstCreateContext* pCxt, SNode* pWhen, SNode* pThen);
+SNode* createCaseWhenNode(SAstCreateContext* pCxt, SNode* pCase, SNodeList* pWhenThenList, SNode* pElse);
SNode* addWhereClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pWhere);
SNode* addPartitionByClause(SAstCreateContext* pCxt, SNode* pStmt, SNodeList* pPartitionByList);
diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y
index 6e43843cda..3e05583d92 100644
--- a/source/libs/parser/inc/sql.y
+++ b/source/libs/parser/inc/sql.y
@@ -625,42 +625,44 @@ stream_name(A) ::= NK_ID(B).
cgroup_name(A) ::= NK_ID(B). { A = B; }
/************************************************ expression **********************************************************/
+expr_or_subquery(A) ::= expression(B). { A = B; }
+expr_or_subquery(A) ::= subquery(B). { A = B; }
+
expression(A) ::= literal(B). { A = B; }
expression(A) ::= pseudo_column(B). { A = B; }
expression(A) ::= column_reference(B). { A = B; }
expression(A) ::= function_expression(B). { A = B; }
-//expression(A) ::= case_expression(B). { A = B; }
-expression(A) ::= subquery(B). { A = B; }
+expression(A) ::= case_when_expression(B). { A = B; }
expression(A) ::= NK_LP(B) expression(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, releaseRawExprNode(pCxt, C)); }
-expression(A) ::= NK_PLUS(B) expression(C). {
+expression(A) ::= NK_PLUS(B) expr_or_subquery(C). {
SToken t = getTokenFromRawExprNode(pCxt, C);
A = createRawExprNodeExt(pCxt, &B, &t, releaseRawExprNode(pCxt, C));
}
-expression(A) ::= NK_MINUS(B) expression(C). {
+expression(A) ::= NK_MINUS(B) expr_or_subquery(C). {
SToken t = getTokenFromRawExprNode(pCxt, C);
A = createRawExprNodeExt(pCxt, &B, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, C), NULL));
}
-expression(A) ::= expression(B) NK_PLUS expression(C). {
+expression(A) ::= expr_or_subquery(B) NK_PLUS expr_or_subquery(C). {
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, C);
A = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)));
}
-expression(A) ::= expression(B) NK_MINUS expression(C). {
+expression(A) ::= expr_or_subquery(B) NK_MINUS expr_or_subquery(C). {
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, C);
A = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)));
}
-expression(A) ::= expression(B) NK_STAR expression(C). {
+expression(A) ::= expr_or_subquery(B) NK_STAR expr_or_subquery(C). {
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, C);
A = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)));
}
-expression(A) ::= expression(B) NK_SLASH expression(C). {
+expression(A) ::= expr_or_subquery(B) NK_SLASH expr_or_subquery(C). {
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, C);
A = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)));
}
-expression(A) ::= expression(B) NK_REM expression(C). {
+expression(A) ::= expr_or_subquery(B) NK_REM expr_or_subquery(C). {
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, C);
A = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)));
@@ -669,12 +671,12 @@ expression(A) ::= column_reference(B) NK_ARROW NK_STRING(C).
SToken s = getTokenFromRawExprNode(pCxt, B);
A = createRawExprNodeExt(pCxt, &s, &C, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, B), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &C)));
}
-expression(A) ::= expression(B) NK_BITAND expression(C). {
+expression(A) ::= expr_or_subquery(B) NK_BITAND expr_or_subquery(C). {
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, C);
A = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)));
}
-expression(A) ::= expression(B) NK_BITOR expression(C). {
+expression(A) ::= expr_or_subquery(B) NK_BITOR expr_or_subquery(C). {
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, C);
A = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)));
@@ -682,8 +684,8 @@ expression(A) ::= expression(B) NK_BITOR expression(C).
%type expression_list { SNodeList* }
%destructor expression_list { nodesDestroyList($$); }
-expression_list(A) ::= expression(B). { A = createNodeList(pCxt, releaseRawExprNode(pCxt, B)); }
-expression_list(A) ::= expression_list(B) NK_COMMA expression(C). { A = addNodeToList(pCxt, B, releaseRawExprNode(pCxt, C)); }
+expression_list(A) ::= expr_or_subquery(B). { A = createNodeList(pCxt, releaseRawExprNode(pCxt, B)); }
+expression_list(A) ::= expression_list(B) NK_COMMA expr_or_subquery(C). { A = addNodeToList(pCxt, B, releaseRawExprNode(pCxt, C)); }
column_reference(A) ::= column_name(B). { A = createRawExprNode(pCxt, &B, createColumnNode(pCxt, NULL, &B)); }
column_reference(A) ::= table_name(B) NK_DOT column_name(C). { A = createRawExprNodeExt(pCxt, &B, &C, createColumnNode(pCxt, &B, &C)); }
@@ -700,7 +702,8 @@ pseudo_column(A) ::= WDURATION(B).
function_expression(A) ::= function_name(B) NK_LP expression_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); }
function_expression(A) ::= star_func(B) NK_LP star_func_para_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); }
-function_expression(A) ::= CAST(B) NK_LP expression(C) AS type_name(D) NK_RP(E). { A = createRawExprNodeExt(pCxt, &B, &E, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, C), D)); }
+function_expression(A) ::=
+ CAST(B) NK_LP expr_or_subquery(C) AS type_name(D) NK_RP(E). { A = createRawExprNodeExt(pCxt, &B, &E, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, C), D)); }
function_expression(A) ::= literal_func(B). { A = B; }
literal_func(A) ::= noarg_func(B) NK_LP NK_RP(C). { A = createRawExprNodeExt(pCxt, &B, &C, createFunctionNode(pCxt, &B, NULL)); }
@@ -735,35 +738,52 @@ star_func_para_list(A) ::= other_para_list(B).
other_para_list(A) ::= star_func_para(B). { A = createNodeList(pCxt, B); }
other_para_list(A) ::= other_para_list(B) NK_COMMA star_func_para(C). { A = addNodeToList(pCxt, B, C); }
-star_func_para(A) ::= expression(B). { A = releaseRawExprNode(pCxt, B); }
+star_func_para(A) ::= expr_or_subquery(B). { A = releaseRawExprNode(pCxt, B); }
star_func_para(A) ::= table_name(B) NK_DOT NK_STAR(C). { A = createColumnNode(pCxt, &B, &C); }
+case_when_expression(A) ::=
+ CASE(E) when_then_list(C) case_when_else_opt(D) END(F). { A = createRawExprNodeExt(pCxt, &E, &F, createCaseWhenNode(pCxt, NULL, C, D)); }
+case_when_expression(A) ::=
+ CASE(E) common_expression(B) when_then_list(C) case_when_else_opt(D) END(F). { A = createRawExprNodeExt(pCxt, &E, &F, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, B), C, D)); }
+
+%type when_then_list { SNodeList* }
+%destructor when_then_list { nodesDestroyList($$); }
+when_then_list(A) ::= when_then_expr(B). { A = createNodeList(pCxt, B); }
+when_then_list(A) ::= when_then_list(B) when_then_expr(C). { A = addNodeToList(pCxt, B, C); }
+
+when_then_expr(A) ::= WHEN common_expression(B) THEN common_expression(C). { A = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)); }
+
+case_when_else_opt(A) ::= . { A = NULL; }
+case_when_else_opt(A) ::= ELSE common_expression(B). { A = releaseRawExprNode(pCxt, B); }
+
/************************************************ predicate ***********************************************************/
-predicate(A) ::= expression(B) compare_op(C) expression(D). {
+predicate(A) ::= expr_or_subquery(B) compare_op(C) expr_or_subquery(D). {
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, D);
A = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, C, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, D)));
}
//predicate(A) ::= expression(B) compare_op sub_type expression(B).
-predicate(A) ::= expression(B) BETWEEN expression(C) AND expression(D). {
+predicate(A) ::=
+ expr_or_subquery(B) BETWEEN expr_or_subquery(C) AND expr_or_subquery(D). {
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, D);
A = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C), releaseRawExprNode(pCxt, D)));
}
-predicate(A) ::= expression(B) NOT BETWEEN expression(C) AND expression(D). {
+predicate(A) ::=
+ expr_or_subquery(B) NOT BETWEEN expr_or_subquery(C) AND expr_or_subquery(D). {
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, D);
A = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C), releaseRawExprNode(pCxt, D)));
}
-predicate(A) ::= expression(B) IS NULL(C). {
+predicate(A) ::= expr_or_subquery(B) IS NULL(C). {
SToken s = getTokenFromRawExprNode(pCxt, B);
A = createRawExprNodeExt(pCxt, &s, &C, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, B), NULL));
}
-predicate(A) ::= expression(B) IS NOT NULL(C). {
+predicate(A) ::= expr_or_subquery(B) IS NOT NULL(C). {
SToken s = getTokenFromRawExprNode(pCxt, B);
A = createRawExprNodeExt(pCxt, &s, &C, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, B), NULL));
}
-predicate(A) ::= expression(B) in_op(C) in_predicate_value(D). {
+predicate(A) ::= expr_or_subquery(B) in_op(C) in_predicate_value(D). {
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, D);
A = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, C, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, D)));
@@ -813,7 +833,7 @@ boolean_primary(A) ::= predicate(B).
boolean_primary(A) ::= NK_LP(C) boolean_value_expression(B) NK_RP(D). { A = createRawExprNodeExt(pCxt, &C, &D, releaseRawExprNode(pCxt, B)); }
/************************************************ common_expression ********************************************/
-common_expression(A) ::= expression(B). { A = B; }
+common_expression(A) ::= expr_or_subquery(B). { A = B; }
common_expression(A) ::= boolean_value_expression(B). { A = B; }
/************************************************ from_clause_opt *********************************************************/
@@ -894,7 +914,7 @@ partition_by_clause_opt(A) ::= PARTITION BY expression_list(B).
twindow_clause_opt(A) ::= . { A = NULL; }
twindow_clause_opt(A) ::=
SESSION NK_LP column_reference(B) NK_COMMA duration_literal(C) NK_RP. { A = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)); }
-twindow_clause_opt(A) ::= STATE_WINDOW NK_LP expression(B) NK_RP. { A = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, B)); }
+twindow_clause_opt(A) ::= STATE_WINDOW NK_LP expr_or_subquery(B) NK_RP. { A = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, B)); }
twindow_clause_opt(A) ::=
INTERVAL NK_LP duration_literal(B) NK_RP sliding_opt(C) fill_opt(D). { A = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, B), NULL, C, D); }
twindow_clause_opt(A) ::=
@@ -923,14 +943,15 @@ group_by_clause_opt(A) ::= GROUP BY group_by_list(B).
%type group_by_list { SNodeList* }
%destructor group_by_list { nodesDestroyList($$); }
-group_by_list(A) ::= expression(B). { A = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, B))); }
-group_by_list(A) ::= group_by_list(B) NK_COMMA expression(C). { A = addNodeToList(pCxt, B, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, C))); }
+group_by_list(A) ::= expr_or_subquery(B). { A = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, B))); }
+group_by_list(A) ::= group_by_list(B) NK_COMMA expr_or_subquery(C). { A = addNodeToList(pCxt, B, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, C))); }
having_clause_opt(A) ::= . { A = NULL; }
having_clause_opt(A) ::= HAVING search_condition(B). { A = B; }
range_opt(A) ::= . { A = NULL; }
-range_opt(A) ::= RANGE NK_LP expression(B) NK_COMMA expression(C) NK_RP. { A = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)); }
+range_opt(A) ::=
+ RANGE NK_LP expr_or_subquery(B) NK_COMMA expr_or_subquery(C) NK_RP. { A = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)); }
every_opt(A) ::= . { A = NULL; }
every_opt(A) ::= EVERY NK_LP duration_literal(B) NK_RP. { A = releaseRawExprNode(pCxt, B); }
@@ -974,6 +995,7 @@ limit_clause_opt(A) ::= LIMIT NK_INTEGER(C) NK_COMMA NK_INTEGER(B).
/************************************************ subquery ************************************************************/
subquery(A) ::= NK_LP(B) query_expression(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, C); }
+subquery(A) ::= NK_LP(B) subquery(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, releaseRawExprNode(pCxt, C)); }
/************************************************ search_condition ****************************************************/
search_condition(A) ::= common_expression(B). { A = releaseRawExprNode(pCxt, B); }
@@ -986,7 +1008,7 @@ sort_specification_list(A) ::=
sort_specification_list(B) NK_COMMA sort_specification(C). { A = addNodeToList(pCxt, B, C); }
sort_specification(A) ::=
- expression(B) ordering_specification_opt(C) null_ordering_opt(D). { A = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, B), C, D); }
+ expr_or_subquery(B) ordering_specification_opt(C) null_ordering_opt(D). { A = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, B), C, D); }
%type ordering_specification_opt EOrder
%destructor ordering_specification_opt { }
diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c
index 379bd975b4..65afc84c9d 100644
--- a/source/libs/parser/src/parAstCreater.c
+++ b/source/libs/parser/src/parAstCreater.c
@@ -647,6 +647,25 @@ SNode* createInterpTimeRange(SAstCreateContext* pCxt, SNode* pStart, SNode* pEnd
return createBetweenAnd(pCxt, createPrimaryKeyCol(pCxt, NULL), pStart, pEnd);
}
+SNode* createWhenThenNode(SAstCreateContext* pCxt, SNode* pWhen, SNode* pThen) {
+ CHECK_PARSER_STATUS(pCxt);
+ SWhenThenNode* pWhenThen = (SWhenThenNode*)nodesMakeNode(QUERY_NODE_WHEN_THEN);
+ CHECK_OUT_OF_MEM(pWhenThen);
+ pWhenThen->pWhen = pWhen;
+ pWhenThen->pThen = pThen;
+ return (SNode*)pWhenThen;
+}
+
+SNode* createCaseWhenNode(SAstCreateContext* pCxt, SNode* pCase, SNodeList* pWhenThenList, SNode* pElse) {
+ CHECK_PARSER_STATUS(pCxt);
+ SCaseWhenNode* pCaseWhen = (SCaseWhenNode*)nodesMakeNode(QUERY_NODE_CASE_WHEN);
+ CHECK_OUT_OF_MEM(pCaseWhen);
+ pCaseWhen->pCase = pCase;
+ pCaseWhen->pWhenThenList = pWhenThenList;
+ pCaseWhen->pElse = pElse;
+ return (SNode*)pCaseWhen;
+}
+
SNode* setProjectionAlias(SAstCreateContext* pCxt, SNode* pNode, SToken* pAlias) {
CHECK_PARSER_STATUS(pCxt);
trimEscape(pAlias);
diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c
index 68eb3e6fb1..c51553f7a1 100644
--- a/source/libs/parser/src/parTokenizer.c
+++ b/source/libs/parser/src/parTokenizer.c
@@ -54,6 +54,7 @@ static SKeyword keywordTable[] = {
{"CACHE", TK_CACHE},
{"CACHEMODEL", TK_CACHEMODEL},
{"CACHESIZE", TK_CACHESIZE},
+ {"CASE", TK_CASE},
{"CAST", TK_CAST},
{"CLIENT_VERSION", TK_CLIENT_VERSION},
{"CLUSTER", TK_CLUSTER},
@@ -82,7 +83,9 @@ static SKeyword keywordTable[] = {
{"DOUBLE", TK_DOUBLE},
{"DROP", TK_DROP},
{"DURATION", TK_DURATION},
+ {"ELSE", TK_ELSE},
{"ENABLE", TK_ENABLE},
+ {"END", TK_END},
{"EXISTS", TK_EXISTS},
{"EXPIRED", TK_EXPIRED},
{"EXPLAIN", TK_EXPLAIN},
@@ -205,6 +208,7 @@ static SKeyword keywordTable[] = {
{"TAG", TK_TAG},
{"TAGS", TK_TAGS},
{"TBNAME", TK_TBNAME},
+ {"THEN", TK_THEN},
{"TIMESTAMP", TK_TIMESTAMP},
{"TIMEZONE", TK_TIMEZONE},
{"TINYINT", TK_TINYINT},
@@ -240,6 +244,7 @@ static SKeyword keywordTable[] = {
{"WAL_ROLL_PERIOD", TK_WAL_ROLL_PERIOD},
{"WAL_SEGMENT_SIZE", TK_WAL_SEGMENT_SIZE},
{"WATERMARK", TK_WATERMARK},
+ {"WHEN", TK_WHEN},
{"WHERE", TK_WHERE},
{"WINDOW_CLOSE", TK_WINDOW_CLOSE},
{"WITH", TK_WITH},
diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c
index f0d5e5d67e..82167e8911 100644
--- a/source/libs/parser/src/parTranslater.c
+++ b/source/libs/parser/src/parTranslater.c
@@ -264,6 +264,8 @@ static bool beforeHaving(ESqlClause clause) { return clause < SQL_CLAUSE_HAVING;
static bool afterHaving(ESqlClause clause) { return clause > SQL_CLAUSE_HAVING; }
+static bool beforeWindow(ESqlClause clause) { return clause < SQL_CLAUSE_WINDOW; }
+
static bool hasSameTableAlias(SArray* pTables) {
if (taosArrayGetSize(pTables) < 2) {
return false;
@@ -1476,6 +1478,10 @@ static int32_t translateWindowPseudoColumnFunc(STranslateContext* pCxt, SFunctio
if (!isSelectStmt(pCxt->pCurrStmt) || NULL == ((SSelectStmt*)pCxt->pCurrStmt)->pWindow) {
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_WINDOW_PC);
}
+ if (beforeWindow(pCxt->currClause)) {
+ return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_WINDOW_PC, "There mustn't be %s",
+ pFunc->functionName);
+ }
return TSDB_CODE_SUCCESS;
}
@@ -1807,6 +1813,59 @@ static EDealRes translateLogicCond(STranslateContext* pCxt, SLogicConditionNode*
return DEAL_RES_CONTINUE;
}
+static int32_t createCastFunc(STranslateContext* pCxt, SNode* pExpr, SDataType dt, SNode** pCast) {
+ SFunctionNode* pFunc = (SFunctionNode*)nodesMakeNode(QUERY_NODE_FUNCTION);
+ if (NULL == pFunc) {
+ return TSDB_CODE_OUT_OF_MEMORY;
+ }
+ strcpy(pFunc->functionName, "cast");
+ pFunc->node.resType = dt;
+ if (TSDB_CODE_SUCCESS != nodesListMakeAppend(&pFunc->pParameterList, pExpr)) {
+ nodesDestroyNode((SNode*)pFunc);
+ return TSDB_CODE_OUT_OF_MEMORY;
+ }
+ if (TSDB_CODE_SUCCESS != getFuncInfo(pCxt, pFunc)) {
+ nodesClearList(pFunc->pParameterList);
+ pFunc->pParameterList = NULL;
+ nodesDestroyNode((SNode*)pFunc);
+ return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_WRONG_VALUE_TYPE, ((SExprNode*)pExpr)->aliasName);
+ }
+ *pCast = (SNode*)pFunc;
+ return TSDB_CODE_SUCCESS;
+}
+
+static EDealRes translateWhenThen(STranslateContext* pCxt, SWhenThenNode* pWhenThen) {
+ pWhenThen->node.resType = ((SExprNode*)pWhenThen->pThen)->resType;
+ return DEAL_RES_CONTINUE;
+}
+
+static EDealRes translateCaseWhen(STranslateContext* pCxt, SCaseWhenNode* pCaseWhen) {
+ bool first = true;
+ SNode* pNode = NULL;
+ FOREACH(pNode, pCaseWhen->pWhenThenList) {
+ if (first) {
+ pCaseWhen->node.resType = ((SExprNode*)pNode)->resType;
+ } else if (!dataTypeEqual(&pCaseWhen->node.resType, &((SExprNode*)pNode)->resType)) {
+ SWhenThenNode* pWhenThen = (SWhenThenNode*)pNode;
+ SNode* pCastFunc = NULL;
+ if (TSDB_CODE_SUCCESS != createCastFunc(pCxt, pWhenThen->pThen, pCaseWhen->node.resType, &pCastFunc)) {
+ return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_WRONG_VALUE_TYPE, "CASE WHEN data type mismatch");
+ }
+ pWhenThen->pThen = pCastFunc;
+ pWhenThen->node.resType = pCaseWhen->node.resType;
+ }
+ }
+ if (NULL != pCaseWhen->pElse && !dataTypeEqual(&pCaseWhen->node.resType, &((SExprNode*)pCaseWhen->pElse)->resType)) {
+ SNode* pCastFunc = NULL;
+ if (TSDB_CODE_SUCCESS != createCastFunc(pCxt, pCaseWhen->pElse, pCaseWhen->node.resType, &pCastFunc)) {
+ return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_WRONG_VALUE_TYPE, "CASE WHEN data type mismatch");
+ }
+ pCaseWhen->pElse = pCastFunc;
+ ((SExprNode*)pCaseWhen->pElse)->resType = pCaseWhen->node.resType;
+ }
+ return DEAL_RES_CONTINUE;
+}
+
static EDealRes doTranslateExpr(SNode** pNode, void* pContext) {
STranslateContext* pCxt = (STranslateContext*)pContext;
switch (nodeType(*pNode)) {
@@ -1822,6 +1881,10 @@ static EDealRes doTranslateExpr(SNode** pNode, void* pContext) {
return translateLogicCond(pCxt, (SLogicConditionNode*)*pNode);
case QUERY_NODE_TEMP_TABLE:
return translateExprSubquery(pCxt, ((STempTableNode*)*pNode)->pSubquery);
+ case QUERY_NODE_WHEN_THEN:
+ return translateWhenThen(pCxt, (SWhenThenNode*)*pNode);
+ case QUERY_NODE_CASE_WHEN:
+ return translateCaseWhen(pCxt, (SCaseWhenNode*)*pNode);
default:
break;
}
@@ -2213,6 +2276,17 @@ static int32_t setTableCacheLastMode(STranslateContext* pCxt, SSelectStmt* pSele
return code;
}
+static int32_t checkJoinTable(STranslateContext* pCxt, SJoinTableNode* pJoinTable) {
+ if ((QUERY_NODE_TEMP_TABLE == nodeType(pJoinTable->pLeft) &&
+ !isTimeLineQuery(((STempTableNode*)pJoinTable->pLeft)->pSubquery)) ||
+ (QUERY_NODE_TEMP_TABLE == nodeType(pJoinTable->pRight) &&
+ !isTimeLineQuery(((STempTableNode*)pJoinTable->pRight)->pSubquery))) {
+ return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_NOT_SUPPORT_JOIN,
+ "Join requires valid time series input");
+ }
+ return TSDB_CODE_SUCCESS;
+}
+
static int32_t translateTable(STranslateContext* pCxt, SNode* pTable) {
int32_t code = TSDB_CODE_SUCCESS;
switch (nodeType(pTable)) {
@@ -2259,6 +2333,9 @@ static int32_t translateTable(STranslateContext* pCxt, SNode* pTable) {
if (TSDB_CODE_SUCCESS == code) {
code = translateTable(pCxt, pJoinTable->pRight);
}
+ if (TSDB_CODE_SUCCESS == code) {
+ code = checkJoinTable(pCxt, pJoinTable);
+ }
if (TSDB_CODE_SUCCESS == code) {
pJoinTable->table.precision = calcJoinTablePrecision(pJoinTable);
pJoinTable->table.singleTable = joinTableIsSingleTable(pJoinTable);
@@ -3208,27 +3285,6 @@ static SNode* createSetOperProject(const char* pTableAlias, SNode* pNode) {
return (SNode*)pCol;
}
-static int32_t createCastFunc(STranslateContext* pCxt, SNode* pExpr, SDataType dt, SNode** pCast) {
- SFunctionNode* pFunc = (SFunctionNode*)nodesMakeNode(QUERY_NODE_FUNCTION);
- if (NULL == pFunc) {
- return TSDB_CODE_OUT_OF_MEMORY;
- }
- strcpy(pFunc->functionName, "cast");
- pFunc->node.resType = dt;
- if (TSDB_CODE_SUCCESS != nodesListMakeAppend(&pFunc->pParameterList, pExpr)) {
- nodesDestroyNode((SNode*)pFunc);
- return TSDB_CODE_OUT_OF_MEMORY;
- }
- if (TSDB_CODE_SUCCESS != getFuncInfo(pCxt, pFunc)) {
- nodesClearList(pFunc->pParameterList);
- pFunc->pParameterList = NULL;
- nodesDestroyNode((SNode*)pFunc);
- return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_WRONG_VALUE_TYPE, ((SExprNode*)pExpr)->aliasName);
- }
- *pCast = (SNode*)pFunc;
- return TSDB_CODE_SUCCESS;
-}
-
static int32_t translateSetOperProject(STranslateContext* pCxt, SSetOperator* pSetOperator) {
SNodeList* pLeftProjections = getProjectList(pSetOperator->pLeft);
SNodeList* pRightProjections = getProjectList(pSetOperator->pRight);
diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c
index c24eef0016..f4ced2799a 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 432
+#define YYNOCODE 441
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SToken
typedef union {
int yyinit;
ParseTOKENTYPE yy0;
- EOrder yy2;
- int32_t yy100;
- SNodeList* yy280;
- bool yy281;
- SDataType yy304;
- EJoinType yy468;
- int64_t yy477;
- int8_t yy503;
- SAlterOption yy605;
- SToken yy641;
- ENullOrder yy649;
- EOperatorType yy668;
- EFillMode yy774;
- SNode* yy776;
+ EFillMode yy18;
+ EOperatorType yy128;
+ bool yy173;
+ SNodeList* yy334;
+ int8_t yy341;
+ int64_t yy459;
+ ENullOrder yy487;
+ SAlterOption yy515;
+ EJoinType yy540;
+ SNode* yy560;
+ SDataType yy574;
+ EOrder yy596;
+ SToken yy659;
+ int32_t yy676;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
@@ -139,17 +139,17 @@ typedef union {
#define ParseCTX_FETCH
#define ParseCTX_STORE
#define YYFALLBACK 1
-#define YYNSTATE 668
-#define YYNRULE 499
-#define YYNTOKEN 309
-#define YY_MAX_SHIFT 667
-#define YY_MIN_SHIFTREDUCE 980
-#define YY_MAX_SHIFTREDUCE 1478
-#define YY_ERROR_ACTION 1479
-#define YY_ACCEPT_ACTION 1480
-#define YY_NO_ACTION 1481
-#define YY_MIN_REDUCE 1482
-#define YY_MAX_REDUCE 1980
+#define YYNSTATE 679
+#define YYNRULE 509
+#define YYNTOKEN 313
+#define YY_MAX_SHIFT 678
+#define YY_MIN_SHIFTREDUCE 1000
+#define YY_MAX_SHIFTREDUCE 1508
+#define YY_ERROR_ACTION 1509
+#define YY_ACCEPT_ACTION 1510
+#define YY_NO_ACTION 1511
+#define YY_MIN_REDUCE 1512
+#define YY_MAX_REDUCE 2020
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
@@ -216,646 +216,720 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
-#define YY_ACTTAB_COUNT (2196)
+#define YY_ACTTAB_COUNT (2662)
static const YYACTIONTYPE yy_action[] = {
- /* 0 */ 428, 1730, 429, 1517, 1811, 436, 1799, 429, 1517, 510,
- /* 10 */ 28, 252, 37, 35, 1957, 1616, 318, 1795, 1013, 1727,
- /* 20 */ 332, 146, 1276, 1494, 1811, 38, 36, 34, 33, 32,
- /* 30 */ 549, 319, 1829, 1352, 337, 1274, 1952, 1672, 1674, 144,
- /* 40 */ 574, 1791, 1797, 321, 71, 1781, 377, 573, 1629, 551,
- /* 50 */ 162, 1957, 1829, 567, 1953, 552, 1347, 120, 1017, 1018,
- /* 60 */ 574, 12, 1673, 1674, 81, 1781, 1622, 573, 1282, 1544,
- /* 70 */ 1843, 1302, 1829, 1952, 91, 1812, 577, 1814, 575, 572,
- /* 80 */ 539, 567, 148, 295, 1889, 1620, 1586, 1956, 298, 1885,
- /* 90 */ 1843, 1953, 1955, 1, 93, 1812, 577, 1814, 1815, 572,
- /* 100 */ 1952, 567, 510, 40, 1889, 1419, 414, 1904, 1888, 1885,
- /* 110 */ 549, 1301, 1728, 551, 162, 664, 538, 104, 1953, 552,
- /* 120 */ 103, 102, 101, 100, 99, 98, 97, 96, 95, 1354,
- /* 130 */ 1355, 1901, 641, 640, 639, 638, 342, 1303, 637, 636,
- /* 140 */ 126, 631, 630, 629, 628, 627, 626, 625, 624, 137,
- /* 150 */ 620, 619, 618, 341, 340, 615, 614, 613, 612, 611,
- /* 160 */ 24, 173, 172, 156, 192, 1482, 31, 30, 475, 474,
- /* 170 */ 38, 36, 34, 33, 32, 1277, 1666, 1275, 150, 427,
- /* 180 */ 1173, 1174, 431, 462, 458, 454, 450, 191, 52, 113,
- /* 190 */ 112, 111, 110, 109, 108, 107, 106, 105, 1280, 1281,
- /* 200 */ 52, 1329, 1330, 1332, 1333, 1334, 1335, 1336, 1337, 569,
- /* 210 */ 565, 1345, 1346, 1348, 1349, 1350, 1351, 1353, 1356, 37,
- /* 220 */ 35, 1415, 41, 72, 635, 633, 189, 332, 523, 1276,
- /* 230 */ 31, 30, 163, 1505, 38, 36, 34, 33, 32, 46,
- /* 240 */ 1352, 445, 1274, 218, 1811, 1131, 599, 598, 597, 1135,
- /* 250 */ 596, 1137, 1138, 595, 1140, 592, 1627, 1146, 589, 1148,
- /* 260 */ 1149, 586, 583, 1347, 6, 20, 1679, 523, 12, 370,
- /* 270 */ 523, 369, 1829, 320, 1781, 1282, 37, 35, 165, 248,
- /* 280 */ 550, 114, 1677, 1302, 332, 1781, 1276, 573, 466, 188,
- /* 290 */ 182, 71, 187, 1331, 56, 1627, 441, 1352, 1627, 1274,
- /* 300 */ 1, 31, 30, 1256, 1257, 38, 36, 34, 33, 32,
- /* 310 */ 1843, 1605, 180, 1623, 92, 1812, 577, 1814, 1815, 572,
- /* 320 */ 1347, 567, 664, 1301, 1889, 12, 608, 163, 323, 1885,
- /* 330 */ 157, 88, 1282, 329, 328, 610, 1354, 1355, 1483, 163,
- /* 340 */ 1618, 206, 161, 1290, 122, 135, 134, 605, 604, 603,
- /* 350 */ 1915, 1795, 1619, 1304, 1352, 549, 1283, 1, 602, 104,
- /* 360 */ 1811, 163, 103, 102, 101, 100, 99, 98, 97, 96,
- /* 370 */ 95, 445, 144, 478, 477, 1791, 1797, 1347, 335, 664,
- /* 380 */ 121, 1630, 1277, 52, 1275, 1376, 144, 567, 1829, 1282,
- /* 390 */ 213, 473, 476, 1354, 1355, 1629, 574, 472, 73, 297,
- /* 400 */ 540, 1781, 513, 573, 1300, 1280, 1281, 1436, 1329, 1330,
- /* 410 */ 1332, 1333, 1334, 1335, 1336, 1337, 569, 565, 1345, 1346,
- /* 420 */ 1348, 1349, 1350, 1351, 1353, 1356, 1843, 52, 40, 75,
- /* 430 */ 92, 1812, 577, 1814, 1815, 572, 562, 567, 1523, 1277,
- /* 440 */ 1889, 1275, 1679, 1679, 323, 1885, 1971, 25, 1504, 304,
- /* 450 */ 532, 1434, 1435, 1437, 1438, 1923, 1408, 1381, 1677, 1678,
- /* 460 */ 1475, 1503, 1280, 1281, 169, 1329, 1330, 1332, 1333, 1334,
- /* 470 */ 1335, 1336, 1337, 569, 565, 1345, 1346, 1348, 1349, 1350,
- /* 480 */ 1351, 1353, 1356, 37, 35, 294, 659, 1299, 1957, 1781,
- /* 490 */ 371, 332, 1301, 1276, 407, 228, 1291, 419, 1286, 1412,
- /* 500 */ 68, 535, 1781, 67, 1352, 1502, 1274, 1362, 506, 435,
- /* 510 */ 1952, 1282, 431, 1301, 392, 1799, 420, 1811, 394, 1294,
- /* 520 */ 1296, 1480, 163, 551, 162, 378, 1795, 1347, 1953, 552,
- /* 530 */ 1952, 565, 1345, 1346, 1348, 1349, 1350, 1351, 379, 1282,
- /* 540 */ 1604, 1957, 1301, 1958, 162, 1829, 1781, 1474, 1953, 552,
- /* 550 */ 1791, 1797, 327, 571, 1030, 1030, 1029, 1029, 1781, 385,
- /* 560 */ 573, 1612, 567, 1952, 7, 52, 163, 163, 31, 30,
- /* 570 */ 464, 381, 38, 36, 34, 33, 32, 1956, 541, 536,
- /* 580 */ 347, 1953, 1954, 1843, 1031, 1031, 664, 285, 1812, 577,
- /* 590 */ 1814, 1815, 572, 570, 567, 564, 1861, 622, 506, 418,
- /* 600 */ 1354, 1355, 413, 412, 411, 410, 409, 406, 405, 404,
- /* 610 */ 403, 402, 398, 397, 396, 395, 389, 388, 387, 386,
- /* 620 */ 1952, 383, 382, 306, 31, 30, 1614, 546, 38, 36,
- /* 630 */ 34, 33, 32, 1958, 162, 546, 31, 30, 1953, 552,
- /* 640 */ 38, 36, 34, 33, 32, 608, 1277, 1904, 1275, 34,
- /* 650 */ 33, 32, 31, 30, 1446, 125, 38, 36, 34, 33,
- /* 660 */ 32, 9, 8, 125, 135, 134, 605, 604, 603, 1280,
- /* 670 */ 1281, 1900, 1329, 1330, 1332, 1333, 1334, 1335, 1336, 1337,
- /* 680 */ 569, 565, 1345, 1346, 1348, 1349, 1350, 1351, 1353, 1356,
- /* 690 */ 37, 35, 1357, 123, 1093, 1331, 433, 1768, 332, 1501,
- /* 700 */ 1276, 116, 1299, 163, 163, 133, 483, 548, 158, 1897,
- /* 710 */ 1898, 1352, 1902, 1274, 219, 220, 246, 1897, 545, 26,
- /* 720 */ 544, 493, 1426, 1952, 1331, 31, 30, 1095, 1411, 38,
- /* 730 */ 36, 34, 33, 32, 1347, 205, 551, 162, 1314, 1811,
- /* 740 */ 1781, 1953, 552, 1679, 354, 366, 1282, 37, 35, 486,
- /* 750 */ 336, 523, 1800, 480, 1388, 332, 45, 1276, 204, 1677,
- /* 760 */ 1603, 523, 114, 1795, 368, 364, 1956, 1829, 1352, 471,
- /* 770 */ 1274, 7, 375, 297, 523, 574, 513, 509, 143, 1627,
- /* 780 */ 1781, 1500, 573, 555, 338, 376, 345, 1791, 1797, 1627,
- /* 790 */ 546, 1347, 144, 664, 58, 506, 1602, 57, 1610, 567,
- /* 800 */ 1499, 1629, 1627, 1282, 506, 1843, 1498, 1354, 1355, 92,
- /* 810 */ 1812, 577, 1814, 1815, 572, 1957, 567, 1952, 125, 1889,
- /* 820 */ 610, 209, 1781, 323, 1885, 1971, 1952, 1904, 7, 1495,
- /* 830 */ 1958, 162, 1303, 1497, 1946, 1953, 552, 1720, 1720, 1958,
- /* 840 */ 162, 1781, 1017, 1018, 1953, 552, 492, 1781, 168, 171,
- /* 850 */ 664, 1899, 568, 1277, 606, 1275, 123, 1670, 601, 490,
- /* 860 */ 344, 488, 31, 30, 1354, 1355, 38, 36, 34, 33,
- /* 870 */ 32, 159, 1897, 1898, 1781, 1902, 1280, 1281, 506, 1329,
- /* 880 */ 1330, 1332, 1333, 1334, 1335, 1336, 1337, 569, 565, 1345,
- /* 890 */ 1346, 1348, 1349, 1350, 1351, 1353, 1356, 546, 31, 30,
- /* 900 */ 1952, 608, 38, 36, 34, 33, 32, 44, 505, 1726,
- /* 910 */ 1277, 292, 1275, 1958, 162, 299, 501, 1496, 1953, 552,
- /* 920 */ 135, 134, 605, 604, 603, 125, 309, 249, 607, 1811,
- /* 930 */ 1493, 1670, 1492, 1280, 1281, 1491, 1329, 1330, 1332, 1333,
- /* 940 */ 1334, 1335, 1336, 1337, 569, 565, 1345, 1346, 1348, 1349,
- /* 950 */ 1350, 1351, 1353, 1356, 37, 35, 1374, 1829, 1781, 1725,
- /* 960 */ 1285, 292, 332, 123, 1276, 574, 1490, 623, 494, 1599,
- /* 970 */ 1781, 1781, 573, 1781, 248, 1352, 1781, 1274, 160, 1897,
- /* 980 */ 1898, 264, 1902, 470, 1657, 310, 506, 308, 307, 1811,
- /* 990 */ 468, 556, 1489, 563, 470, 1843, 1488, 1284, 1347, 92,
- /* 1000 */ 1812, 577, 1814, 1815, 572, 469, 567, 1781, 1952, 1889,
- /* 1010 */ 1282, 1375, 554, 323, 1885, 1971, 469, 1829, 1909, 1408,
- /* 1020 */ 197, 1958, 162, 195, 1908, 574, 1953, 552, 1547, 145,
- /* 1030 */ 1781, 558, 573, 1781, 270, 1, 1534, 1781, 31, 30,
- /* 1040 */ 1276, 1587, 38, 36, 34, 33, 32, 463, 268, 60,
- /* 1050 */ 42, 3, 59, 1274, 1830, 1843, 523, 664, 479, 147,
- /* 1060 */ 1812, 577, 1814, 1815, 572, 1529, 567, 384, 176, 424,
- /* 1070 */ 422, 1354, 1355, 27, 330, 1369, 1370, 1371, 1372, 1373,
- /* 1080 */ 1377, 1378, 1379, 1380, 1627, 1527, 1282, 481, 1487, 1057,
- /* 1090 */ 523, 299, 478, 477, 1486, 1811, 240, 523, 523, 121,
- /* 1100 */ 199, 399, 1288, 198, 52, 553, 1972, 484, 400, 443,
- /* 1110 */ 473, 476, 201, 9, 8, 200, 472, 1277, 1627, 1275,
- /* 1120 */ 533, 1485, 1058, 1829, 1314, 1627, 1627, 343, 316, 1781,
- /* 1130 */ 1366, 574, 1374, 664, 212, 1781, 1781, 39, 573, 1287,
- /* 1140 */ 1280, 1281, 90, 1329, 1330, 1332, 1333, 1334, 1335, 1336,
- /* 1150 */ 1337, 569, 565, 1345, 1346, 1348, 1349, 1350, 1351, 1353,
- /* 1160 */ 1356, 1843, 1781, 1477, 1478, 286, 1812, 577, 1814, 1815,
- /* 1170 */ 572, 203, 567, 74, 202, 217, 129, 1802, 65, 64,
- /* 1180 */ 374, 523, 132, 167, 1667, 523, 523, 1375, 1227, 1919,
- /* 1190 */ 523, 133, 444, 1277, 1811, 1275, 1624, 495, 1518, 293,
- /* 1200 */ 523, 502, 362, 547, 360, 356, 352, 349, 346, 1627,
- /* 1210 */ 616, 507, 523, 1627, 1627, 245, 1280, 1281, 1627, 87,
- /* 1220 */ 523, 4, 1829, 223, 1804, 54, 221, 516, 1627, 84,
- /* 1230 */ 550, 519, 1077, 225, 523, 1781, 232, 573, 251, 2,
- /* 1240 */ 1627, 559, 1124, 163, 54, 521, 353, 1811, 1627, 27,
- /* 1250 */ 330, 1369, 1370, 1371, 1372, 1373, 1377, 1378, 1379, 1380,
- /* 1260 */ 1843, 1811, 1627, 348, 92, 1812, 577, 1814, 1815, 572,
- /* 1270 */ 523, 567, 39, 523, 1889, 1829, 1433, 39, 323, 1885,
- /* 1280 */ 157, 522, 305, 574, 253, 617, 1243, 235, 1781, 1829,
- /* 1290 */ 573, 581, 260, 132, 380, 1382, 170, 574, 1627, 133,
- /* 1300 */ 1916, 1627, 1781, 1299, 573, 401, 1722, 1075, 117, 132,
- /* 1310 */ 416, 1811, 408, 1843, 415, 417, 421, 277, 1812, 577,
- /* 1320 */ 1814, 575, 572, 1338, 567, 423, 425, 1843, 263, 1305,
- /* 1330 */ 426, 93, 1812, 577, 1814, 1815, 572, 1811, 567, 1829,
- /* 1340 */ 434, 1889, 1152, 1952, 1156, 561, 1885, 574, 1307, 437,
- /* 1350 */ 1163, 1811, 1781, 179, 573, 438, 551, 162, 439, 1161,
- /* 1360 */ 136, 1953, 552, 1306, 181, 1829, 1308, 440, 184, 442,
- /* 1370 */ 524, 186, 69, 574, 70, 446, 190, 1843, 1781, 1829,
- /* 1380 */ 573, 93, 1812, 577, 1814, 1815, 572, 574, 567, 465,
- /* 1390 */ 523, 1889, 1781, 467, 573, 296, 1886, 1617, 194, 1613,
- /* 1400 */ 196, 339, 138, 1843, 1811, 261, 139, 286, 1812, 577,
- /* 1410 */ 1814, 1815, 572, 1615, 567, 115, 1611, 1843, 1627, 140,
- /* 1420 */ 141, 281, 1812, 577, 1814, 1815, 572, 207, 567, 496,
- /* 1430 */ 1811, 210, 1829, 214, 497, 1761, 503, 508, 500, 315,
- /* 1440 */ 574, 531, 511, 1760, 1732, 1781, 514, 573, 517, 130,
- /* 1450 */ 131, 317, 78, 1304, 1811, 262, 80, 518, 1829, 542,
- /* 1460 */ 527, 534, 1628, 1930, 230, 1920, 571, 234, 529, 5,
- /* 1470 */ 1843, 1781, 543, 573, 147, 1812, 577, 1814, 1815, 572,
- /* 1480 */ 530, 567, 1829, 1929, 1911, 151, 528, 331, 322, 537,
- /* 1490 */ 574, 526, 525, 239, 1408, 1781, 1843, 573, 244, 243,
- /* 1500 */ 285, 1812, 577, 1814, 1815, 572, 124, 567, 1303, 1862,
- /* 1510 */ 241, 242, 1811, 324, 51, 1870, 560, 1905, 557, 82,
- /* 1520 */ 1843, 1973, 579, 667, 286, 1812, 577, 1814, 1815, 572,
- /* 1530 */ 250, 567, 1671, 1974, 1600, 1951, 265, 259, 660, 256,
- /* 1540 */ 1829, 661, 663, 43, 278, 333, 291, 288, 574, 287,
- /* 1550 */ 267, 154, 269, 1781, 1775, 573, 657, 653, 649, 645,
- /* 1560 */ 257, 1774, 62, 1773, 1811, 1772, 63, 1769, 350, 351,
- /* 1570 */ 1268, 1269, 166, 355, 1811, 1767, 357, 358, 1843, 359,
- /* 1580 */ 1766, 361, 286, 1812, 577, 1814, 1815, 572, 1765, 567,
- /* 1590 */ 363, 1764, 1829, 365, 1763, 367, 89, 1246, 1245, 226,
- /* 1600 */ 574, 1743, 1829, 1742, 373, 1781, 372, 573, 1741, 1740,
- /* 1610 */ 574, 1715, 1215, 1714, 1713, 1781, 127, 573, 1712, 1711,
- /* 1620 */ 1710, 66, 1709, 1708, 1707, 1706, 1811, 1705, 390, 1704,
- /* 1630 */ 1843, 391, 520, 393, 271, 1812, 577, 1814, 1815, 572,
- /* 1640 */ 1843, 567, 1703, 1702, 272, 1812, 577, 1814, 1815, 572,
- /* 1650 */ 1811, 567, 1701, 1700, 1829, 1699, 1698, 1697, 1696, 1695,
- /* 1660 */ 1694, 1693, 574, 1692, 1691, 215, 1690, 1781, 128, 573,
- /* 1670 */ 1689, 1688, 1687, 1686, 1811, 1685, 1684, 1683, 1829, 1682,
- /* 1680 */ 1681, 1680, 1549, 1250, 1217, 208, 574, 174, 1548, 175,
- /* 1690 */ 1811, 1781, 1843, 573, 1546, 1514, 273, 1812, 577, 1814,
- /* 1700 */ 1815, 572, 1829, 567, 1020, 1019, 118, 177, 1513, 178,
- /* 1710 */ 574, 155, 1756, 119, 1750, 1781, 1843, 573, 1829, 1739,
- /* 1720 */ 280, 1812, 577, 1814, 1815, 572, 574, 567, 183, 430,
- /* 1730 */ 1811, 1781, 432, 573, 185, 1738, 1724, 1606, 1545, 1543,
- /* 1740 */ 1843, 447, 449, 448, 282, 1812, 577, 1814, 1815, 572,
- /* 1750 */ 1541, 567, 451, 1539, 452, 1050, 1843, 453, 1829, 455,
- /* 1760 */ 274, 1812, 577, 1814, 1815, 572, 574, 567, 456, 457,
- /* 1770 */ 1537, 1781, 460, 573, 1526, 459, 1525, 1510, 1608, 1167,
- /* 1780 */ 461, 1166, 1607, 1811, 1092, 193, 53, 1091, 632, 634,
- /* 1790 */ 1088, 1087, 1535, 1086, 311, 1811, 1843, 1530, 1528, 485,
- /* 1800 */ 283, 1812, 577, 1814, 1815, 572, 482, 567, 312, 1811,
- /* 1810 */ 313, 1829, 1509, 1508, 487, 489, 1507, 491, 1755, 574,
- /* 1820 */ 94, 1749, 1252, 1829, 1781, 142, 573, 498, 1737, 1735,
- /* 1830 */ 1957, 574, 1736, 1734, 1733, 13, 1781, 1829, 573, 1260,
- /* 1840 */ 47, 216, 1731, 1723, 222, 574, 211, 76, 77, 1843,
- /* 1850 */ 1781, 79, 573, 275, 1812, 577, 1814, 1815, 572, 499,
- /* 1860 */ 567, 1843, 314, 504, 1811, 284, 1812, 577, 1814, 1815,
- /* 1870 */ 572, 515, 567, 224, 14, 1843, 84, 227, 39, 276,
- /* 1880 */ 1812, 577, 1814, 1815, 572, 512, 567, 21, 50, 237,
- /* 1890 */ 238, 23, 1829, 1448, 229, 1802, 231, 1430, 247, 49,
- /* 1900 */ 574, 233, 55, 1801, 1432, 1781, 152, 573, 149, 16,
- /* 1910 */ 236, 1463, 1811, 22, 1462, 325, 1425, 83, 1467, 1405,
- /* 1920 */ 1404, 1466, 326, 8, 1468, 1292, 1367, 17, 1811, 1846,
- /* 1930 */ 1843, 48, 1342, 566, 289, 1812, 577, 1814, 1815, 572,
- /* 1940 */ 1829, 567, 153, 164, 1340, 15, 11, 29, 574, 1339,
- /* 1950 */ 1322, 10, 1811, 1781, 18, 573, 1829, 19, 580, 1153,
- /* 1960 */ 576, 334, 582, 578, 574, 1150, 584, 585, 587, 1781,
- /* 1970 */ 588, 573, 1147, 590, 593, 1141, 1139, 1130, 1843, 1145,
- /* 1980 */ 1829, 591, 290, 1812, 577, 1814, 1815, 572, 574, 567,
- /* 1990 */ 1144, 594, 1143, 1781, 1843, 573, 600, 85, 1823, 1812,
- /* 2000 */ 577, 1814, 1815, 572, 1811, 567, 1142, 86, 1162, 61,
- /* 2010 */ 254, 1158, 1048, 609, 1811, 1083, 1082, 1081, 1843, 1080,
- /* 2020 */ 1079, 1078, 1822, 1812, 577, 1814, 1815, 572, 1811, 567,
- /* 2030 */ 1076, 1074, 1829, 1073, 1072, 621, 1099, 255, 1070, 1069,
- /* 2040 */ 574, 1068, 1829, 1067, 1066, 1781, 1065, 573, 1064, 1063,
- /* 2050 */ 574, 1096, 1094, 1060, 1054, 1781, 1829, 573, 1059, 1056,
- /* 2060 */ 1055, 1053, 1542, 642, 574, 1540, 644, 643, 646, 1781,
- /* 2070 */ 1843, 573, 1538, 648, 1821, 1812, 577, 1814, 1815, 572,
- /* 2080 */ 1843, 567, 647, 650, 302, 1812, 577, 1814, 1815, 572,
- /* 2090 */ 651, 567, 652, 1536, 1843, 654, 1811, 655, 301, 1812,
- /* 2100 */ 577, 1814, 1815, 572, 1524, 567, 656, 1506, 1811, 658,
- /* 2110 */ 1010, 258, 662, 1481, 1278, 666, 266, 665, 1811, 1481,
- /* 2120 */ 1481, 1481, 1481, 1481, 1829, 1481, 1481, 1481, 1481, 1481,
- /* 2130 */ 1481, 1481, 574, 1481, 1481, 1481, 1829, 1781, 1481, 573,
- /* 2140 */ 1481, 1481, 1481, 1481, 574, 1481, 1829, 1481, 1481, 1781,
- /* 2150 */ 1481, 573, 1481, 1481, 574, 1481, 1481, 1481, 1481, 1781,
- /* 2160 */ 1481, 573, 1843, 1481, 1481, 1481, 303, 1812, 577, 1814,
- /* 2170 */ 1815, 572, 1481, 567, 1843, 1481, 1481, 1481, 300, 1812,
- /* 2180 */ 577, 1814, 1815, 572, 1843, 567, 1481, 1481, 279, 1812,
- /* 2190 */ 577, 1814, 1815, 572, 1481, 567,
+ /* 0 */ 530, 556, 1760, 530, 435, 1829, 436, 1547, 32, 258,
+ /* 10 */ 1843, 117, 42, 40, 117, 1996, 1825, 1033, 473, 1646,
+ /* 20 */ 339, 478, 1296, 41, 39, 38, 37, 36, 1657, 1323,
+ /* 30 */ 1991, 1657, 1323, 1374, 1577, 1294, 571, 571, 1861, 1648,
+ /* 40 */ 1821, 1827, 327, 555, 166, 1510, 572, 325, 1992, 557,
+ /* 50 */ 1825, 1811, 1642, 584, 578, 150, 1369, 1037, 1038, 571,
+ /* 60 */ 443, 16, 436, 1547, 1659, 1861, 60, 1843, 1302, 42,
+ /* 70 */ 40, 1444, 440, 550, 1821, 1827, 1875, 339, 1319, 1296,
+ /* 80 */ 95, 1841, 1842, 1844, 588, 1846, 1847, 583, 578, 578,
+ /* 90 */ 1374, 530, 1294, 1, 163, 1861, 1928, 384, 485, 484,
+ /* 100 */ 332, 1924, 50, 572, 354, 124, 1498, 56, 1811, 44,
+ /* 110 */ 584, 549, 152, 1369, 1524, 675, 480, 483, 16, 1657,
+ /* 120 */ 513, 1955, 479, 344, 1829, 1302, 1702, 1704, 452, 1376,
+ /* 130 */ 1377, 212, 44, 1875, 301, 1825, 1996, 95, 1841, 1842,
+ /* 140 */ 1844, 588, 1846, 1847, 583, 1830, 578, 1703, 1704, 1991,
+ /* 150 */ 1, 163, 45, 1928, 1843, 56, 1825, 332, 1924, 1821,
+ /* 160 */ 1827, 333, 1997, 166, 532, 1991, 1900, 1992, 557, 1709,
+ /* 170 */ 168, 257, 675, 578, 257, 1297, 326, 1295, 1954, 1995,
+ /* 180 */ 1821, 1827, 1861, 1992, 1994, 1707, 1376, 1377, 77, 303,
+ /* 190 */ 585, 1322, 520, 568, 578, 1811, 154, 584, 1300, 1301,
+ /* 200 */ 1616, 1351, 1352, 1354, 1355, 1356, 1357, 1358, 1359, 580,
+ /* 210 */ 576, 1367, 1368, 1370, 1371, 1372, 1373, 1375, 1378, 3,
+ /* 220 */ 1875, 130, 162, 621, 95, 1841, 1842, 1844, 588, 1846,
+ /* 230 */ 1847, 583, 1297, 578, 1295, 1696, 127, 169, 137, 1899,
+ /* 240 */ 1928, 1465, 35, 34, 332, 1924, 41, 39, 38, 37,
+ /* 250 */ 36, 169, 1050, 169, 1049, 1300, 1301, 128, 1351, 1352,
+ /* 260 */ 1354, 1355, 1356, 1357, 1358, 1359, 580, 576, 1367, 1368,
+ /* 270 */ 1370, 1371, 1372, 1373, 1375, 1378, 3, 42, 40, 165,
+ /* 280 */ 1936, 1937, 1051, 1941, 11, 339, 1321, 1296, 1322, 543,
+ /* 290 */ 1463, 1464, 1466, 1467, 434, 1843, 169, 438, 1374, 169,
+ /* 300 */ 1294, 56, 1151, 610, 609, 608, 1155, 607, 1157, 1158,
+ /* 310 */ 606, 1160, 603, 568, 1166, 600, 1168, 1169, 597, 594,
+ /* 320 */ 421, 1369, 11, 1861, 9, 219, 16, 1635, 1475, 225,
+ /* 330 */ 226, 585, 530, 1302, 42, 40, 1811, 613, 584, 546,
+ /* 340 */ 1709, 130, 339, 171, 1296, 35, 34, 343, 1535, 41,
+ /* 350 */ 39, 38, 37, 36, 1324, 1374, 1707, 1294, 1, 56,
+ /* 360 */ 1657, 1875, 56, 1113, 79, 95, 1841, 1842, 1844, 588,
+ /* 370 */ 1846, 1847, 583, 373, 578, 179, 178, 119, 1369, 1903,
+ /* 380 */ 675, 1928, 377, 16, 376, 332, 1924, 452, 303, 1811,
+ /* 390 */ 1302, 520, 375, 371, 1376, 1377, 1115, 1193, 1194, 255,
+ /* 400 */ 1936, 567, 1513, 566, 35, 34, 1991, 530, 41, 39,
+ /* 410 */ 38, 37, 36, 442, 617, 1, 438, 1700, 382, 555,
+ /* 420 */ 166, 552, 547, 107, 1992, 557, 106, 105, 104, 103,
+ /* 430 */ 102, 101, 100, 99, 98, 1657, 517, 675, 1633, 24,
+ /* 440 */ 1297, 1448, 1295, 324, 85, 169, 1757, 1321, 1534, 1302,
+ /* 450 */ 107, 1376, 1377, 106, 105, 104, 103, 102, 101, 100,
+ /* 460 */ 99, 98, 1321, 1300, 1301, 1650, 1351, 1352, 1354, 1355,
+ /* 470 */ 1356, 1357, 1358, 1359, 580, 576, 1367, 1368, 1370, 1371,
+ /* 480 */ 1372, 1373, 1375, 1378, 3, 1512, 11, 35, 34, 1811,
+ /* 490 */ 530, 41, 39, 38, 37, 36, 234, 1297, 621, 1295,
+ /* 500 */ 1995, 383, 126, 169, 1505, 1899, 169, 315, 633, 116,
+ /* 510 */ 115, 114, 113, 112, 111, 110, 109, 108, 1657, 1943,
+ /* 520 */ 1300, 1301, 551, 1351, 1352, 1354, 1355, 1356, 1357, 1358,
+ /* 530 */ 1359, 580, 576, 1367, 1368, 1370, 1371, 1372, 1373, 1375,
+ /* 540 */ 1378, 3, 42, 40, 1709, 224, 1296, 342, 1940, 1644,
+ /* 550 */ 339, 310, 1296, 482, 481, 150, 563, 75, 75, 1294,
+ /* 560 */ 1707, 568, 198, 1374, 1659, 1294, 316, 530, 314, 313,
+ /* 570 */ 123, 475, 1050, 1455, 1049, 477, 156, 1533, 391, 1652,
+ /* 580 */ 1653, 469, 465, 461, 457, 197, 1369, 471, 556, 130,
+ /* 590 */ 92, 1843, 1302, 619, 1320, 1657, 1504, 476, 1302, 42,
+ /* 600 */ 40, 1379, 1051, 125, 1943, 1276, 1277, 339, 1640, 1296,
+ /* 610 */ 568, 1649, 141, 140, 616, 615, 614, 1991, 1811, 1861,
+ /* 620 */ 1374, 76, 1294, 8, 195, 128, 530, 585, 215, 1353,
+ /* 630 */ 555, 166, 1811, 1939, 584, 1992, 557, 406, 130, 675,
+ /* 640 */ 175, 530, 1532, 1369, 1384, 675, 570, 164, 1936, 1937,
+ /* 650 */ 1321, 1941, 407, 579, 1657, 1302, 1709, 1875, 499, 1376,
+ /* 660 */ 1377, 95, 1841, 1842, 1844, 588, 1846, 1847, 583, 1657,
+ /* 670 */ 578, 497, 1708, 495, 128, 2011, 72, 1928, 530, 71,
+ /* 680 */ 8, 332, 1924, 1811, 1843, 485, 484, 194, 188, 450,
+ /* 690 */ 193, 1962, 124, 534, 448, 1900, 167, 1936, 1937, 1297,
+ /* 700 */ 1941, 1295, 675, 480, 483, 1297, 1657, 1295, 1750, 479,
+ /* 710 */ 186, 1531, 1861, 38, 37, 36, 1376, 1377, 1634, 174,
+ /* 720 */ 585, 150, 1300, 1301, 1530, 1811, 508, 584, 1300, 1301,
+ /* 730 */ 1660, 1351, 1352, 1354, 1355, 1356, 1357, 1358, 1359, 580,
+ /* 740 */ 576, 1367, 1368, 1370, 1371, 1372, 1373, 1375, 1378, 3,
+ /* 750 */ 1875, 559, 1811, 1943, 95, 1841, 1842, 1844, 588, 1846,
+ /* 760 */ 1847, 583, 1297, 578, 1295, 1811, 28, 169, 1901, 1529,
+ /* 770 */ 1928, 564, 35, 34, 332, 1924, 41, 39, 38, 37,
+ /* 780 */ 36, 1528, 1938, 1843, 1527, 1300, 1301, 7, 1351, 1352,
+ /* 790 */ 1354, 1355, 1356, 1357, 1358, 1359, 580, 576, 1367, 1368,
+ /* 800 */ 1370, 1371, 1372, 1373, 1375, 1378, 3, 42, 40, 1526,
+ /* 810 */ 1811, 1861, 345, 646, 644, 339, 322, 1296, 618, 585,
+ /* 820 */ 150, 1700, 1811, 619, 1811, 1811, 584, 30, 1374, 1659,
+ /* 830 */ 1294, 378, 1353, 35, 34, 1037, 1038, 41, 39, 38,
+ /* 840 */ 37, 36, 141, 140, 616, 615, 614, 513, 1321, 1875,
+ /* 850 */ 1811, 1369, 1523, 292, 1841, 1842, 1844, 588, 1846, 1847,
+ /* 860 */ 583, 218, 578, 1302, 42, 40, 1750, 612, 1756, 517,
+ /* 870 */ 298, 530, 339, 1755, 1296, 298, 1991, 177, 678, 1758,
+ /* 880 */ 1522, 634, 451, 1629, 1525, 1374, 1405, 1294, 8, 1997,
+ /* 890 */ 166, 252, 265, 1811, 1992, 557, 1617, 35, 34, 1657,
+ /* 900 */ 78, 41, 39, 38, 37, 36, 160, 530, 1369, 477,
+ /* 910 */ 675, 668, 664, 660, 656, 263, 516, 1521, 1654, 1077,
+ /* 920 */ 1302, 1811, 35, 34, 1376, 1377, 41, 39, 38, 37,
+ /* 930 */ 36, 476, 513, 35, 34, 1657, 91, 41, 39, 38,
+ /* 940 */ 37, 36, 13, 12, 270, 1, 88, 1687, 530, 530,
+ /* 950 */ 306, 93, 1078, 29, 232, 530, 1305, 530, 1811, 502,
+ /* 960 */ 509, 1991, 530, 1410, 46, 4, 514, 675, 229, 1441,
+ /* 970 */ 1297, 139, 1295, 526, 1997, 166, 1657, 1657, 1520, 1992,
+ /* 980 */ 557, 1376, 1377, 1657, 1437, 1657, 544, 527, 1948, 1437,
+ /* 990 */ 1657, 1403, 1519, 1300, 1301, 1564, 1351, 1352, 1354, 1355,
+ /* 1000 */ 1356, 1357, 1358, 1359, 580, 576, 1367, 1368, 1370, 1371,
+ /* 1010 */ 1372, 1373, 1375, 1378, 3, 530, 300, 486, 1319, 1811,
+ /* 1020 */ 221, 385, 49, 48, 512, 414, 528, 1297, 426, 1295,
+ /* 1030 */ 1353, 1518, 1798, 1811, 386, 1417, 352, 1517, 1270, 1516,
+ /* 1040 */ 214, 203, 1515, 1657, 201, 399, 1404, 427, 1862, 401,
+ /* 1050 */ 1300, 1301, 513, 1351, 1352, 1354, 1355, 1356, 1357, 1358,
+ /* 1060 */ 1359, 580, 576, 1367, 1368, 1370, 1371, 1372, 1373, 1375,
+ /* 1070 */ 1378, 3, 1811, 530, 205, 1559, 149, 204, 1811, 361,
+ /* 1080 */ 1811, 1991, 530, 1811, 529, 207, 151, 560, 206, 1557,
+ /* 1090 */ 392, 276, 1632, 259, 1997, 166, 575, 488, 1308, 1992,
+ /* 1100 */ 557, 1657, 388, 1574, 209, 274, 64, 208, 43, 63,
+ /* 1110 */ 1657, 491, 223, 31, 336, 1398, 1399, 1400, 1401, 1402,
+ /* 1120 */ 1406, 1407, 1408, 1409, 470, 182, 431, 429, 13, 12,
+ /* 1130 */ 425, 1507, 1508, 420, 419, 418, 417, 416, 413, 412,
+ /* 1140 */ 411, 410, 409, 405, 404, 403, 402, 396, 395, 394,
+ /* 1150 */ 393, 246, 390, 389, 312, 134, 1996, 350, 138, 1247,
+ /* 1160 */ 139, 56, 1548, 227, 58, 1996, 652, 651, 650, 649,
+ /* 1170 */ 349, 238, 648, 647, 131, 642, 641, 640, 639, 638,
+ /* 1180 */ 637, 636, 635, 143, 631, 630, 629, 348, 347, 626,
+ /* 1190 */ 625, 624, 623, 622, 1991, 1304, 530, 619, 58, 94,
+ /* 1200 */ 1697, 1958, 1843, 1440, 43, 1832, 523, 346, 1995, 231,
+ /* 1210 */ 627, 1144, 1992, 1993, 254, 1462, 141, 140, 616, 615,
+ /* 1220 */ 614, 1553, 241, 569, 1657, 251, 628, 2, 5, 43,
+ /* 1230 */ 1861, 592, 1097, 1395, 355, 69, 68, 381, 585, 138,
+ /* 1240 */ 173, 360, 490, 1811, 311, 584, 139, 1498, 1095, 1411,
+ /* 1250 */ 120, 351, 1834, 138, 1263, 1360, 299, 500, 176, 369,
+ /* 1260 */ 387, 367, 363, 359, 356, 353, 266, 513, 1875, 670,
+ /* 1270 */ 1319, 211, 96, 586, 338, 1844, 588, 1846, 1847, 583,
+ /* 1280 */ 269, 578, 1172, 501, 1843, 493, 408, 1752, 1928, 487,
+ /* 1290 */ 1176, 415, 305, 1924, 210, 423, 1991, 1183, 422, 513,
+ /* 1300 */ 561, 1181, 424, 1991, 142, 169, 428, 430, 432, 1997,
+ /* 1310 */ 166, 1325, 1861, 1327, 1992, 557, 555, 166, 433, 441,
+ /* 1320 */ 585, 1992, 557, 444, 185, 1811, 445, 584, 1991, 1326,
+ /* 1330 */ 62, 187, 446, 61, 1328, 449, 190, 1307, 192, 447,
+ /* 1340 */ 73, 1997, 166, 74, 1843, 453, 1992, 557, 196, 472,
+ /* 1350 */ 1875, 1791, 267, 474, 95, 1841, 1842, 1844, 588, 1846,
+ /* 1360 */ 1847, 583, 1647, 578, 118, 302, 1843, 200, 2011, 1643,
+ /* 1370 */ 1928, 202, 1861, 144, 332, 1924, 507, 145, 1645, 213,
+ /* 1380 */ 585, 1641, 146, 147, 1985, 1811, 503, 584, 504, 216,
+ /* 1390 */ 510, 515, 542, 321, 1861, 524, 220, 135, 518, 1790,
+ /* 1400 */ 1762, 525, 585, 521, 82, 323, 84, 1811, 1658, 584,
+ /* 1410 */ 1875, 268, 136, 1324, 95, 1841, 1842, 1844, 588, 1846,
+ /* 1420 */ 1847, 583, 1843, 578, 545, 236, 240, 1969, 2011, 538,
+ /* 1430 */ 1928, 540, 1875, 541, 332, 1924, 285, 586, 338, 1844,
+ /* 1440 */ 588, 1846, 1847, 583, 1947, 578, 1959, 335, 334, 1968,
+ /* 1450 */ 1861, 328, 548, 6, 554, 536, 537, 1310, 585, 250,
+ /* 1460 */ 329, 539, 565, 1811, 2014, 584, 562, 1991, 1374, 1437,
+ /* 1470 */ 1303, 129, 1323, 55, 247, 1950, 245, 157, 248, 86,
+ /* 1480 */ 555, 166, 249, 1843, 1944, 1992, 557, 1909, 1875, 1990,
+ /* 1490 */ 590, 1369, 95, 1841, 1842, 1844, 588, 1846, 1847, 583,
+ /* 1500 */ 1701, 578, 1630, 1302, 271, 1843, 533, 262, 1928, 671,
+ /* 1510 */ 253, 1861, 332, 1924, 672, 47, 674, 297, 273, 585,
+ /* 1520 */ 283, 294, 293, 275, 1811, 1805, 584, 66, 1803, 1802,
+ /* 1530 */ 67, 1799, 357, 1861, 1804, 358, 1288, 1289, 172, 362,
+ /* 1540 */ 1797, 585, 364, 365, 366, 1796, 1811, 368, 584, 1875,
+ /* 1550 */ 574, 1795, 370, 96, 1841, 1842, 1844, 588, 1846, 1847,
+ /* 1560 */ 583, 1794, 578, 372, 1793, 374, 1266, 1265, 1773, 1928,
+ /* 1570 */ 1772, 1875, 379, 1927, 1924, 96, 1841, 1842, 1844, 588,
+ /* 1580 */ 1846, 1847, 583, 380, 578, 1771, 1770, 1745, 1235, 1843,
+ /* 1590 */ 1744, 1928, 1743, 1742, 132, 573, 1924, 1741, 1740, 70,
+ /* 1600 */ 1739, 1738, 1737, 1736, 1735, 397, 398, 1734, 400, 1733,
+ /* 1610 */ 1311, 1732, 1306, 1731, 1730, 1729, 1728, 1861, 1727, 1726,
+ /* 1620 */ 1725, 1724, 1723, 1722, 1721, 582, 1720, 1719, 1718, 1717,
+ /* 1630 */ 1811, 133, 584, 1314, 1316, 1716, 1715, 1714, 1713, 1237,
+ /* 1640 */ 1712, 1711, 1710, 1579, 1843, 576, 1367, 1368, 1370, 1371,
+ /* 1650 */ 1372, 1373, 1578, 1576, 1544, 1875, 437, 1543, 1040, 291,
+ /* 1660 */ 1841, 1842, 1844, 588, 1846, 1847, 583, 581, 578, 531,
+ /* 1670 */ 1893, 121, 1861, 183, 184, 1039, 161, 1786, 122, 1780,
+ /* 1680 */ 585, 180, 1769, 1768, 191, 1811, 181, 584, 189, 1754,
+ /* 1690 */ 1636, 439, 1575, 1573, 454, 455, 1571, 1843, 458, 1569,
+ /* 1700 */ 462, 456, 459, 460, 1567, 463, 464, 466, 468, 1070,
+ /* 1710 */ 1875, 1556, 1555, 467, 153, 1841, 1842, 1844, 588, 1846,
+ /* 1720 */ 1847, 583, 1540, 578, 1638, 1861, 1187, 1186, 1637, 1112,
+ /* 1730 */ 1111, 643, 1108, 585, 1565, 1107, 1106, 1560, 1811, 317,
+ /* 1740 */ 584, 645, 318, 1558, 492, 319, 1539, 1538, 494, 1843,
+ /* 1750 */ 489, 199, 57, 496, 1537, 498, 97, 1785, 1779, 148,
+ /* 1760 */ 1272, 1843, 505, 1875, 217, 558, 2012, 96, 1841, 1842,
+ /* 1770 */ 1844, 588, 1846, 1847, 583, 1843, 578, 1861, 1767, 1765,
+ /* 1780 */ 1996, 1766, 1764, 1928, 1763, 582, 1280, 1761, 1925, 1861,
+ /* 1790 */ 1811, 1753, 584, 519, 535, 81, 17, 585, 233, 1386,
+ /* 1800 */ 10, 222, 1811, 1861, 584, 18, 43, 19, 1385, 228,
+ /* 1810 */ 244, 585, 80, 88, 230, 1875, 1811, 54, 584, 291,
+ /* 1820 */ 1841, 1842, 1844, 588, 1846, 1847, 583, 1875, 578, 1843,
+ /* 1830 */ 1894, 292, 1841, 1842, 1844, 588, 1846, 1847, 583, 511,
+ /* 1840 */ 578, 1875, 51, 1843, 522, 287, 1841, 1842, 1844, 588,
+ /* 1850 */ 1846, 1847, 583, 83, 578, 1477, 243, 1861, 25, 235,
+ /* 1860 */ 1832, 27, 237, 1459, 506, 585, 239, 59, 320, 1461,
+ /* 1870 */ 1811, 1861, 584, 155, 21, 1492, 337, 1454, 242, 585,
+ /* 1880 */ 1497, 26, 87, 1491, 1811, 330, 584, 1496, 553, 1498,
+ /* 1890 */ 1495, 331, 1434, 1843, 1433, 1875, 53, 256, 12, 153,
+ /* 1900 */ 1841, 1842, 1844, 588, 1846, 1847, 583, 1831, 578, 1875,
+ /* 1910 */ 1312, 20, 1843, 292, 1841, 1842, 1844, 588, 1846, 1847,
+ /* 1920 */ 583, 1861, 578, 158, 1396, 1878, 340, 15, 1364, 585,
+ /* 1930 */ 577, 159, 1362, 1361, 1811, 33, 584, 14, 22, 170,
+ /* 1940 */ 1861, 1336, 1344, 52, 587, 589, 591, 23, 585, 341,
+ /* 1950 */ 593, 2013, 1173, 1811, 1170, 584, 595, 1167, 596, 1875,
+ /* 1960 */ 598, 599, 1843, 292, 1841, 1842, 1844, 588, 1846, 1847,
+ /* 1970 */ 583, 601, 578, 1161, 602, 604, 1843, 1159, 1875, 605,
+ /* 1980 */ 1150, 1182, 277, 1841, 1842, 1844, 588, 1846, 1847, 583,
+ /* 1990 */ 1861, 578, 1165, 1164, 611, 1163, 89, 1162, 585, 90,
+ /* 2000 */ 65, 1178, 260, 1811, 1861, 584, 1068, 1103, 620, 1102,
+ /* 2010 */ 1101, 1100, 585, 1099, 632, 1098, 1096, 1811, 1094, 584,
+ /* 2020 */ 1093, 1092, 1119, 1090, 1089, 261, 1088, 1087, 1875, 1086,
+ /* 2030 */ 1085, 1843, 278, 1841, 1842, 1844, 588, 1846, 1847, 583,
+ /* 2040 */ 1084, 578, 1875, 1083, 1114, 1116, 279, 1841, 1842, 1844,
+ /* 2050 */ 588, 1846, 1847, 583, 1080, 578, 1079, 1843, 1076, 1861,
+ /* 2060 */ 1075, 1074, 1073, 1572, 653, 655, 1570, 585, 657, 654,
+ /* 2070 */ 659, 658, 1811, 1568, 584, 661, 663, 662, 1566, 665,
+ /* 2080 */ 667, 666, 1554, 1843, 669, 1861, 1030, 1536, 677, 264,
+ /* 2090 */ 673, 1511, 1298, 585, 272, 676, 1511, 1875, 1811, 1511,
+ /* 2100 */ 584, 286, 1841, 1842, 1844, 588, 1846, 1847, 583, 1843,
+ /* 2110 */ 578, 1861, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 585,
+ /* 2120 */ 1511, 1511, 1511, 1875, 1811, 1511, 584, 288, 1841, 1842,
+ /* 2130 */ 1844, 588, 1846, 1847, 583, 1843, 578, 1861, 1511, 1511,
+ /* 2140 */ 1511, 1511, 1511, 1511, 1511, 585, 1511, 1511, 1511, 1875,
+ /* 2150 */ 1811, 1511, 584, 280, 1841, 1842, 1844, 588, 1846, 1847,
+ /* 2160 */ 583, 1511, 578, 1861, 1511, 1511, 1511, 1511, 1511, 1511,
+ /* 2170 */ 1511, 585, 1511, 1511, 1511, 1875, 1811, 1511, 584, 289,
+ /* 2180 */ 1841, 1842, 1844, 588, 1846, 1847, 583, 1843, 578, 1511,
+ /* 2190 */ 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511,
+ /* 2200 */ 1511, 1875, 1511, 1843, 1511, 281, 1841, 1842, 1844, 588,
+ /* 2210 */ 1846, 1847, 583, 1511, 578, 1861, 1511, 1511, 1511, 1511,
+ /* 2220 */ 1511, 1511, 1511, 585, 1511, 1511, 1511, 1511, 1811, 1511,
+ /* 2230 */ 584, 1861, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 585,
+ /* 2240 */ 1511, 1511, 1511, 1511, 1811, 1511, 584, 1511, 1511, 1511,
+ /* 2250 */ 1511, 1511, 1511, 1875, 1511, 1511, 1511, 290, 1841, 1842,
+ /* 2260 */ 1844, 588, 1846, 1847, 583, 1843, 578, 1511, 1511, 1875,
+ /* 2270 */ 1511, 1511, 1511, 282, 1841, 1842, 1844, 588, 1846, 1847,
+ /* 2280 */ 583, 1843, 578, 1511, 1511, 1511, 1511, 1511, 1511, 1511,
+ /* 2290 */ 1511, 1511, 1511, 1861, 1511, 1511, 1511, 1511, 1511, 1511,
+ /* 2300 */ 1511, 585, 1511, 1511, 1511, 1511, 1811, 1511, 584, 1861,
+ /* 2310 */ 1511, 1511, 1511, 1511, 1511, 1511, 1511, 585, 1511, 1511,
+ /* 2320 */ 1511, 1511, 1811, 1511, 584, 1511, 1511, 1511, 1511, 1511,
+ /* 2330 */ 1511, 1875, 1511, 1511, 1843, 295, 1841, 1842, 1844, 588,
+ /* 2340 */ 1846, 1847, 583, 1511, 578, 1511, 1511, 1875, 1843, 1511,
+ /* 2350 */ 1511, 296, 1841, 1842, 1844, 588, 1846, 1847, 583, 1511,
+ /* 2360 */ 578, 1511, 1861, 1511, 1511, 1511, 1511, 1511, 1511, 1511,
+ /* 2370 */ 585, 1511, 1511, 1511, 1511, 1811, 1861, 584, 1511, 1511,
+ /* 2380 */ 1511, 1511, 1511, 1511, 585, 1511, 1511, 1511, 1511, 1811,
+ /* 2390 */ 1511, 584, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511,
+ /* 2400 */ 1875, 1511, 1843, 1511, 1855, 1841, 1842, 1844, 588, 1846,
+ /* 2410 */ 1847, 583, 1511, 578, 1875, 1511, 1511, 1511, 1854, 1841,
+ /* 2420 */ 1842, 1844, 588, 1846, 1847, 583, 1843, 578, 1511, 1511,
+ /* 2430 */ 1861, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 585, 1511,
+ /* 2440 */ 1511, 1511, 1511, 1811, 1511, 584, 1511, 1511, 1511, 1511,
+ /* 2450 */ 1511, 1511, 1843, 1511, 1861, 1511, 1511, 1511, 1511, 1511,
+ /* 2460 */ 1511, 1511, 585, 1511, 1511, 1511, 1511, 1811, 1875, 584,
+ /* 2470 */ 1511, 1511, 1853, 1841, 1842, 1844, 588, 1846, 1847, 583,
+ /* 2480 */ 1861, 578, 1511, 1511, 1511, 1511, 1511, 1511, 585, 1511,
+ /* 2490 */ 1511, 1511, 1875, 1811, 1511, 584, 307, 1841, 1842, 1844,
+ /* 2500 */ 588, 1846, 1847, 583, 1843, 578, 1511, 1511, 1511, 1511,
+ /* 2510 */ 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1875, 1511,
+ /* 2520 */ 1843, 1511, 308, 1841, 1842, 1844, 588, 1846, 1847, 583,
+ /* 2530 */ 1511, 578, 1861, 1511, 1511, 1511, 1511, 1511, 1511, 1511,
+ /* 2540 */ 585, 1511, 1511, 1511, 1511, 1811, 1511, 584, 1861, 1511,
+ /* 2550 */ 1511, 1511, 1511, 1511, 1511, 1511, 585, 1511, 1511, 1511,
+ /* 2560 */ 1511, 1811, 1511, 584, 1511, 1511, 1511, 1511, 1511, 1511,
+ /* 2570 */ 1875, 1511, 1511, 1511, 304, 1841, 1842, 1844, 588, 1846,
+ /* 2580 */ 1847, 583, 1843, 578, 1511, 1511, 1875, 1511, 1511, 1511,
+ /* 2590 */ 309, 1841, 1842, 1844, 588, 1846, 1847, 583, 1511, 578,
+ /* 2600 */ 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511,
+ /* 2610 */ 1861, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 585, 1511,
+ /* 2620 */ 1511, 1511, 1511, 1811, 1511, 584, 1511, 1511, 1511, 1511,
+ /* 2630 */ 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511,
+ /* 2640 */ 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1511, 1875, 1511,
+ /* 2650 */ 1511, 1511, 284, 1841, 1842, 1844, 588, 1846, 1847, 583,
+ /* 2660 */ 1511, 578,
};
static const YYCODETYPE yy_lookahead[] = {
- /* 0 */ 316, 0, 318, 319, 312, 316, 342, 318, 319, 355,
- /* 10 */ 393, 394, 12, 13, 386, 341, 362, 353, 4, 365,
- /* 20 */ 20, 311, 22, 313, 312, 12, 13, 14, 15, 16,
- /* 30 */ 20, 332, 340, 33, 351, 35, 408, 354, 355, 340,
- /* 40 */ 348, 377, 378, 379, 324, 353, 320, 355, 349, 421,
- /* 50 */ 422, 386, 340, 389, 426, 427, 56, 337, 44, 45,
- /* 60 */ 348, 61, 354, 355, 322, 353, 346, 355, 68, 0,
- /* 70 */ 378, 20, 340, 408, 382, 383, 384, 385, 386, 387,
- /* 80 */ 348, 389, 325, 357, 392, 343, 329, 422, 396, 397,
- /* 90 */ 378, 426, 427, 93, 382, 383, 384, 385, 386, 387,
- /* 100 */ 408, 389, 355, 93, 392, 14, 78, 380, 396, 397,
- /* 110 */ 20, 20, 365, 421, 422, 115, 384, 21, 426, 427,
- /* 120 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 129,
- /* 130 */ 130, 404, 63, 64, 65, 66, 67, 20, 69, 70,
- /* 140 */ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
- /* 150 */ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
- /* 160 */ 2, 133, 134, 339, 33, 0, 8, 9, 326, 327,
- /* 170 */ 12, 13, 14, 15, 16, 175, 352, 177, 47, 317,
- /* 180 */ 129, 130, 320, 52, 53, 54, 55, 56, 93, 24,
- /* 190 */ 25, 26, 27, 28, 29, 30, 31, 32, 198, 199,
- /* 200 */ 93, 201, 202, 203, 204, 205, 206, 207, 208, 209,
- /* 210 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 12,
- /* 220 */ 13, 14, 93, 92, 326, 327, 95, 20, 320, 22,
- /* 230 */ 8, 9, 232, 312, 12, 13, 14, 15, 16, 331,
- /* 240 */ 33, 60, 35, 124, 312, 106, 107, 108, 109, 110,
- /* 250 */ 111, 112, 113, 114, 115, 116, 348, 118, 119, 120,
- /* 260 */ 121, 122, 123, 56, 39, 43, 340, 320, 61, 174,
- /* 270 */ 320, 176, 340, 347, 353, 68, 12, 13, 331, 162,
- /* 280 */ 348, 331, 356, 20, 20, 353, 22, 355, 338, 158,
- /* 290 */ 159, 324, 161, 202, 4, 348, 165, 33, 348, 35,
- /* 300 */ 93, 8, 9, 184, 185, 12, 13, 14, 15, 16,
- /* 310 */ 378, 0, 181, 346, 382, 383, 384, 385, 386, 387,
- /* 320 */ 56, 389, 115, 20, 392, 61, 105, 232, 396, 397,
- /* 330 */ 398, 322, 68, 12, 13, 60, 129, 130, 0, 232,
- /* 340 */ 342, 125, 410, 22, 335, 124, 125, 126, 127, 128,
- /* 350 */ 418, 353, 343, 20, 33, 20, 35, 93, 104, 21,
- /* 360 */ 312, 232, 24, 25, 26, 27, 28, 29, 30, 31,
- /* 370 */ 32, 60, 340, 64, 65, 377, 378, 56, 332, 115,
- /* 380 */ 71, 349, 175, 93, 177, 157, 340, 389, 340, 68,
- /* 390 */ 56, 82, 83, 129, 130, 349, 348, 88, 182, 183,
- /* 400 */ 20, 353, 186, 355, 20, 198, 199, 198, 201, 202,
- /* 410 */ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
- /* 420 */ 213, 214, 215, 216, 217, 218, 378, 93, 93, 95,
- /* 430 */ 382, 383, 384, 385, 386, 387, 115, 389, 0, 175,
- /* 440 */ 392, 177, 340, 340, 396, 397, 398, 219, 312, 347,
- /* 450 */ 241, 242, 243, 244, 245, 407, 231, 229, 356, 356,
- /* 460 */ 167, 312, 198, 199, 56, 201, 202, 203, 204, 205,
- /* 470 */ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
- /* 480 */ 216, 217, 218, 12, 13, 18, 48, 20, 386, 353,
- /* 490 */ 368, 20, 20, 22, 27, 162, 175, 30, 177, 4,
- /* 500 */ 92, 160, 353, 95, 33, 312, 35, 14, 386, 317,
- /* 510 */ 408, 68, 320, 20, 47, 342, 49, 312, 51, 198,
- /* 520 */ 199, 309, 232, 421, 422, 22, 353, 56, 426, 427,
- /* 530 */ 408, 210, 211, 212, 213, 214, 215, 216, 35, 68,
- /* 540 */ 0, 386, 20, 421, 422, 340, 353, 254, 426, 427,
- /* 550 */ 377, 378, 379, 348, 20, 20, 22, 22, 353, 92,
- /* 560 */ 355, 341, 389, 408, 93, 93, 232, 232, 8, 9,
- /* 570 */ 35, 104, 12, 13, 14, 15, 16, 422, 237, 238,
- /* 580 */ 368, 426, 427, 378, 50, 50, 115, 382, 383, 384,
- /* 590 */ 385, 386, 387, 388, 389, 390, 391, 68, 386, 132,
- /* 600 */ 129, 130, 135, 136, 137, 138, 139, 140, 141, 142,
- /* 610 */ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
- /* 620 */ 408, 154, 155, 156, 8, 9, 341, 320, 12, 13,
- /* 630 */ 14, 15, 16, 421, 422, 320, 8, 9, 426, 427,
- /* 640 */ 12, 13, 14, 15, 16, 105, 175, 380, 177, 14,
- /* 650 */ 15, 16, 8, 9, 94, 348, 12, 13, 14, 15,
- /* 660 */ 16, 1, 2, 348, 124, 125, 126, 127, 128, 198,
- /* 670 */ 199, 404, 201, 202, 203, 204, 205, 206, 207, 208,
- /* 680 */ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
- /* 690 */ 12, 13, 14, 386, 35, 202, 14, 0, 20, 312,
- /* 700 */ 22, 386, 20, 232, 232, 43, 4, 400, 401, 402,
- /* 710 */ 403, 33, 405, 35, 124, 125, 401, 402, 403, 2,
- /* 720 */ 405, 19, 94, 408, 202, 8, 9, 68, 233, 12,
- /* 730 */ 13, 14, 15, 16, 56, 33, 421, 422, 94, 312,
- /* 740 */ 353, 426, 427, 340, 47, 170, 68, 12, 13, 47,
- /* 750 */ 347, 320, 342, 51, 94, 20, 94, 22, 56, 356,
- /* 760 */ 0, 320, 331, 353, 189, 190, 3, 340, 33, 338,
- /* 770 */ 35, 93, 331, 183, 320, 348, 186, 368, 162, 348,
- /* 780 */ 353, 312, 355, 43, 332, 331, 368, 377, 378, 348,
- /* 790 */ 320, 56, 340, 115, 92, 386, 0, 95, 341, 389,
- /* 800 */ 312, 349, 348, 68, 386, 378, 312, 129, 130, 382,
- /* 810 */ 383, 384, 385, 386, 387, 3, 389, 408, 348, 392,
- /* 820 */ 60, 341, 353, 396, 397, 398, 408, 380, 93, 313,
- /* 830 */ 421, 422, 20, 312, 407, 426, 427, 348, 348, 421,
- /* 840 */ 422, 353, 44, 45, 426, 427, 21, 353, 359, 359,
- /* 850 */ 115, 404, 341, 175, 350, 177, 386, 353, 341, 34,
- /* 860 */ 368, 36, 8, 9, 129, 130, 12, 13, 14, 15,
- /* 870 */ 16, 401, 402, 403, 353, 405, 198, 199, 386, 201,
- /* 880 */ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
- /* 890 */ 212, 213, 214, 215, 216, 217, 218, 320, 8, 9,
- /* 900 */ 408, 105, 12, 13, 14, 15, 16, 162, 163, 364,
- /* 910 */ 175, 366, 177, 421, 422, 61, 372, 312, 426, 427,
- /* 920 */ 124, 125, 126, 127, 128, 348, 37, 430, 350, 312,
- /* 930 */ 312, 353, 312, 198, 199, 312, 201, 202, 203, 204,
- /* 940 */ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
- /* 950 */ 215, 216, 217, 218, 12, 13, 102, 340, 353, 364,
- /* 960 */ 35, 366, 20, 386, 22, 348, 312, 328, 368, 330,
- /* 970 */ 353, 353, 355, 353, 162, 33, 353, 35, 401, 402,
- /* 980 */ 403, 333, 405, 105, 336, 96, 386, 98, 99, 312,
- /* 990 */ 101, 251, 312, 61, 105, 378, 312, 35, 56, 382,
- /* 1000 */ 383, 384, 385, 386, 387, 127, 389, 353, 408, 392,
- /* 1010 */ 68, 157, 249, 396, 397, 398, 127, 340, 230, 231,
- /* 1020 */ 97, 421, 422, 100, 407, 348, 426, 427, 0, 18,
- /* 1030 */ 353, 43, 355, 353, 23, 93, 0, 353, 8, 9,
- /* 1040 */ 22, 329, 12, 13, 14, 15, 16, 321, 37, 38,
- /* 1050 */ 42, 43, 41, 35, 340, 378, 320, 115, 22, 382,
- /* 1060 */ 383, 384, 385, 386, 387, 0, 389, 331, 57, 58,
- /* 1070 */ 59, 129, 130, 219, 220, 221, 222, 223, 224, 225,
- /* 1080 */ 226, 227, 228, 229, 348, 0, 68, 22, 312, 35,
- /* 1090 */ 320, 61, 64, 65, 312, 312, 415, 320, 320, 71,
- /* 1100 */ 97, 331, 177, 100, 93, 428, 429, 22, 331, 331,
- /* 1110 */ 82, 83, 97, 1, 2, 100, 88, 175, 348, 177,
- /* 1120 */ 419, 312, 68, 340, 94, 348, 348, 321, 345, 353,
- /* 1130 */ 198, 348, 102, 115, 56, 353, 353, 43, 355, 177,
- /* 1140 */ 198, 199, 131, 201, 202, 203, 204, 205, 206, 207,
- /* 1150 */ 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
- /* 1160 */ 218, 378, 353, 129, 130, 382, 383, 384, 385, 386,
- /* 1170 */ 387, 97, 389, 95, 100, 43, 43, 46, 167, 168,
- /* 1180 */ 169, 320, 43, 172, 352, 320, 320, 157, 94, 381,
- /* 1190 */ 320, 43, 331, 175, 312, 177, 331, 331, 319, 188,
- /* 1200 */ 320, 331, 191, 406, 193, 194, 195, 196, 197, 348,
- /* 1210 */ 13, 331, 320, 348, 348, 399, 198, 199, 348, 93,
- /* 1220 */ 320, 234, 340, 331, 93, 43, 94, 94, 348, 103,
- /* 1230 */ 348, 331, 35, 94, 320, 353, 43, 355, 423, 409,
- /* 1240 */ 348, 253, 94, 232, 43, 331, 47, 312, 348, 219,
- /* 1250 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
- /* 1260 */ 378, 312, 348, 376, 382, 383, 384, 385, 386, 387,
- /* 1270 */ 320, 389, 43, 320, 392, 340, 94, 43, 396, 397,
- /* 1280 */ 398, 331, 375, 348, 331, 13, 173, 94, 353, 340,
- /* 1290 */ 355, 43, 370, 43, 360, 94, 42, 348, 348, 43,
- /* 1300 */ 418, 348, 353, 20, 355, 320, 320, 35, 43, 43,
- /* 1310 */ 157, 312, 360, 378, 358, 358, 320, 382, 383, 384,
- /* 1320 */ 385, 386, 387, 94, 389, 320, 320, 378, 94, 20,
- /* 1330 */ 314, 382, 383, 384, 385, 386, 387, 312, 389, 340,
- /* 1340 */ 314, 392, 94, 408, 94, 396, 397, 348, 20, 374,
- /* 1350 */ 94, 312, 353, 324, 355, 355, 421, 422, 367, 94,
- /* 1360 */ 94, 426, 427, 20, 324, 340, 20, 369, 324, 367,
- /* 1370 */ 345, 324, 324, 348, 324, 320, 324, 378, 353, 340,
- /* 1380 */ 355, 382, 383, 384, 385, 386, 387, 348, 389, 314,
- /* 1390 */ 320, 392, 353, 340, 355, 314, 397, 340, 340, 340,
- /* 1400 */ 340, 331, 340, 378, 312, 374, 340, 382, 383, 384,
- /* 1410 */ 385, 386, 387, 340, 389, 320, 340, 378, 348, 340,
- /* 1420 */ 340, 382, 383, 384, 385, 386, 387, 322, 389, 180,
- /* 1430 */ 312, 322, 340, 322, 373, 353, 320, 320, 355, 367,
- /* 1440 */ 348, 239, 353, 353, 353, 353, 353, 355, 159, 363,
- /* 1450 */ 363, 353, 322, 20, 312, 336, 322, 361, 340, 420,
- /* 1460 */ 353, 240, 348, 414, 363, 381, 348, 363, 353, 246,
- /* 1470 */ 378, 353, 166, 355, 382, 383, 384, 385, 386, 387,
- /* 1480 */ 353, 389, 340, 414, 417, 414, 248, 345, 353, 353,
- /* 1490 */ 348, 247, 235, 416, 231, 353, 378, 355, 376, 411,
- /* 1500 */ 382, 383, 384, 385, 386, 387, 348, 389, 20, 391,
- /* 1510 */ 413, 412, 312, 255, 93, 395, 252, 380, 250, 93,
- /* 1520 */ 378, 429, 344, 19, 382, 383, 384, 385, 386, 387,
- /* 1530 */ 424, 389, 353, 431, 330, 425, 320, 33, 36, 322,
- /* 1540 */ 340, 315, 314, 371, 334, 345, 366, 334, 348, 334,
- /* 1550 */ 323, 47, 310, 353, 0, 355, 52, 53, 54, 55,
- /* 1560 */ 56, 0, 182, 0, 312, 0, 42, 0, 35, 192,
- /* 1570 */ 35, 35, 35, 192, 312, 0, 35, 35, 378, 192,
- /* 1580 */ 0, 192, 382, 383, 384, 385, 386, 387, 0, 389,
- /* 1590 */ 35, 0, 340, 22, 0, 35, 92, 177, 175, 95,
- /* 1600 */ 348, 0, 340, 0, 170, 353, 171, 355, 0, 0,
- /* 1610 */ 348, 0, 46, 0, 0, 353, 42, 355, 0, 0,
- /* 1620 */ 0, 153, 0, 0, 0, 0, 312, 0, 148, 0,
- /* 1630 */ 378, 35, 128, 148, 382, 383, 384, 385, 386, 387,
- /* 1640 */ 378, 389, 0, 0, 382, 383, 384, 385, 386, 387,
- /* 1650 */ 312, 389, 0, 0, 340, 0, 0, 0, 0, 0,
- /* 1660 */ 0, 0, 348, 0, 0, 161, 0, 353, 42, 355,
- /* 1670 */ 0, 0, 0, 0, 312, 0, 0, 0, 340, 0,
- /* 1680 */ 0, 0, 0, 179, 22, 181, 348, 56, 0, 56,
- /* 1690 */ 312, 353, 378, 355, 0, 0, 382, 383, 384, 385,
- /* 1700 */ 386, 387, 340, 389, 14, 14, 39, 42, 0, 40,
- /* 1710 */ 348, 43, 0, 39, 0, 353, 378, 355, 340, 0,
- /* 1720 */ 382, 383, 384, 385, 386, 387, 348, 389, 39, 46,
- /* 1730 */ 312, 353, 46, 355, 166, 0, 0, 0, 0, 0,
- /* 1740 */ 378, 35, 39, 47, 382, 383, 384, 385, 386, 387,
- /* 1750 */ 0, 389, 35, 0, 47, 62, 378, 39, 340, 35,
- /* 1760 */ 382, 383, 384, 385, 386, 387, 348, 389, 47, 39,
- /* 1770 */ 0, 353, 47, 355, 0, 35, 0, 0, 0, 35,
- /* 1780 */ 39, 22, 0, 312, 35, 100, 102, 35, 43, 43,
- /* 1790 */ 35, 35, 0, 22, 22, 312, 378, 0, 0, 35,
- /* 1800 */ 382, 383, 384, 385, 386, 387, 49, 389, 22, 312,
- /* 1810 */ 22, 340, 0, 0, 35, 35, 0, 22, 0, 348,
- /* 1820 */ 20, 0, 35, 340, 353, 178, 355, 22, 0, 0,
- /* 1830 */ 3, 348, 0, 0, 0, 93, 353, 340, 355, 35,
- /* 1840 */ 162, 94, 0, 0, 93, 348, 159, 93, 39, 378,
- /* 1850 */ 353, 93, 355, 382, 383, 384, 385, 386, 387, 162,
- /* 1860 */ 389, 378, 162, 164, 312, 382, 383, 384, 385, 386,
- /* 1870 */ 387, 160, 389, 158, 236, 378, 103, 46, 43, 382,
- /* 1880 */ 383, 384, 385, 386, 387, 187, 389, 93, 43, 43,
- /* 1890 */ 46, 43, 340, 94, 93, 46, 94, 94, 46, 43,
- /* 1900 */ 348, 93, 3, 46, 94, 353, 46, 355, 93, 43,
- /* 1910 */ 93, 35, 312, 93, 35, 35, 94, 93, 35, 94,
- /* 1920 */ 94, 35, 35, 2, 94, 22, 198, 43, 312, 93,
- /* 1930 */ 378, 230, 94, 93, 382, 383, 384, 385, 386, 387,
- /* 1940 */ 340, 389, 46, 46, 94, 236, 236, 93, 348, 94,
- /* 1950 */ 22, 93, 312, 353, 93, 355, 340, 93, 35, 94,
- /* 1960 */ 200, 35, 93, 104, 348, 94, 35, 93, 35, 353,
- /* 1970 */ 93, 355, 94, 35, 35, 94, 94, 22, 378, 117,
- /* 1980 */ 340, 93, 382, 383, 384, 385, 386, 387, 348, 389,
- /* 1990 */ 117, 93, 117, 353, 378, 355, 105, 93, 382, 383,
- /* 2000 */ 384, 385, 386, 387, 312, 389, 117, 93, 35, 93,
- /* 2010 */ 43, 22, 62, 61, 312, 35, 35, 35, 378, 35,
- /* 2020 */ 35, 35, 382, 383, 384, 385, 386, 387, 312, 389,
- /* 2030 */ 35, 35, 340, 35, 35, 91, 68, 43, 35, 35,
- /* 2040 */ 348, 22, 340, 35, 22, 353, 35, 355, 35, 35,
- /* 2050 */ 348, 68, 35, 35, 22, 353, 340, 355, 35, 35,
- /* 2060 */ 35, 35, 0, 35, 348, 0, 39, 47, 35, 353,
- /* 2070 */ 378, 355, 0, 39, 382, 383, 384, 385, 386, 387,
- /* 2080 */ 378, 389, 47, 35, 382, 383, 384, 385, 386, 387,
- /* 2090 */ 47, 389, 39, 0, 378, 35, 312, 47, 382, 383,
- /* 2100 */ 384, 385, 386, 387, 0, 389, 39, 0, 312, 35,
- /* 2110 */ 35, 22, 21, 432, 22, 20, 22, 21, 312, 432,
- /* 2120 */ 432, 432, 432, 432, 340, 432, 432, 432, 432, 432,
- /* 2130 */ 432, 432, 348, 432, 432, 432, 340, 353, 432, 355,
- /* 2140 */ 432, 432, 432, 432, 348, 432, 340, 432, 432, 353,
- /* 2150 */ 432, 355, 432, 432, 348, 432, 432, 432, 432, 353,
- /* 2160 */ 432, 355, 378, 432, 432, 432, 382, 383, 384, 385,
- /* 2170 */ 386, 387, 432, 389, 378, 432, 432, 432, 382, 383,
- /* 2180 */ 384, 385, 386, 387, 378, 389, 432, 432, 382, 383,
- /* 2190 */ 384, 385, 386, 387, 432, 389, 432, 432, 432, 432,
- /* 2200 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2210 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2220 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2230 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2240 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2250 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2260 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2270 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2280 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2290 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2300 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2310 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2320 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2330 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2340 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2350 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2360 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2370 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2380 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2390 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2400 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2410 */ 432, 432, 432, 432, 432, 432, 432, 432, 432, 432,
- /* 2420 */ 432, 432, 432, 432, 432, 432, 432,
+ /* 0 */ 324, 388, 0, 324, 320, 346, 322, 323, 403, 404,
+ /* 10 */ 316, 335, 12, 13, 335, 3, 357, 4, 342, 345,
+ /* 20 */ 20, 342, 22, 12, 13, 14, 15, 16, 352, 20,
+ /* 30 */ 417, 352, 20, 33, 0, 35, 20, 20, 344, 346,
+ /* 40 */ 381, 382, 383, 430, 431, 313, 352, 336, 435, 436,
+ /* 50 */ 357, 357, 345, 359, 395, 344, 56, 44, 45, 20,
+ /* 60 */ 320, 61, 322, 323, 353, 344, 4, 316, 68, 12,
+ /* 70 */ 13, 14, 14, 352, 381, 382, 382, 20, 20, 22,
+ /* 80 */ 386, 387, 388, 389, 390, 391, 392, 393, 395, 395,
+ /* 90 */ 33, 324, 35, 93, 400, 344, 402, 324, 64, 65,
+ /* 100 */ 406, 407, 335, 352, 372, 71, 94, 93, 357, 93,
+ /* 110 */ 359, 390, 315, 56, 317, 115, 82, 83, 61, 352,
+ /* 120 */ 388, 427, 88, 355, 346, 68, 358, 359, 60, 129,
+ /* 130 */ 130, 125, 93, 382, 361, 357, 388, 386, 387, 388,
+ /* 140 */ 389, 390, 391, 392, 393, 346, 395, 358, 359, 417,
+ /* 150 */ 93, 400, 93, 402, 316, 93, 357, 406, 407, 381,
+ /* 160 */ 382, 383, 430, 431, 399, 417, 401, 435, 436, 344,
+ /* 170 */ 419, 162, 115, 395, 162, 175, 351, 177, 427, 431,
+ /* 180 */ 381, 382, 344, 435, 436, 360, 129, 130, 182, 183,
+ /* 190 */ 352, 20, 186, 324, 395, 357, 329, 359, 198, 199,
+ /* 200 */ 333, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ /* 210 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
+ /* 220 */ 382, 352, 343, 60, 386, 387, 388, 389, 390, 391,
+ /* 230 */ 392, 393, 175, 395, 177, 356, 398, 237, 400, 401,
+ /* 240 */ 402, 198, 8, 9, 406, 407, 12, 13, 14, 15,
+ /* 250 */ 16, 237, 20, 237, 22, 198, 199, 388, 201, 202,
+ /* 260 */ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ /* 270 */ 213, 214, 215, 216, 217, 218, 219, 12, 13, 410,
+ /* 280 */ 411, 412, 50, 414, 221, 20, 20, 22, 20, 246,
+ /* 290 */ 247, 248, 249, 250, 321, 316, 237, 324, 33, 237,
+ /* 300 */ 35, 93, 106, 107, 108, 109, 110, 111, 112, 113,
+ /* 310 */ 114, 115, 116, 324, 118, 119, 120, 121, 122, 123,
+ /* 320 */ 78, 56, 221, 344, 223, 56, 61, 0, 94, 124,
+ /* 330 */ 125, 352, 324, 68, 12, 13, 357, 104, 359, 160,
+ /* 340 */ 344, 352, 20, 335, 22, 8, 9, 351, 316, 12,
+ /* 350 */ 13, 14, 15, 16, 20, 33, 360, 35, 93, 93,
+ /* 360 */ 352, 382, 93, 35, 95, 386, 387, 388, 389, 390,
+ /* 370 */ 391, 392, 393, 170, 395, 133, 134, 388, 56, 400,
+ /* 380 */ 115, 402, 174, 61, 176, 406, 407, 60, 183, 357,
+ /* 390 */ 68, 186, 189, 190, 129, 130, 68, 129, 130, 410,
+ /* 400 */ 411, 412, 0, 414, 8, 9, 417, 324, 12, 13,
+ /* 410 */ 14, 15, 16, 321, 354, 93, 324, 357, 335, 430,
+ /* 420 */ 431, 242, 243, 21, 435, 436, 24, 25, 26, 27,
+ /* 430 */ 28, 29, 30, 31, 32, 352, 359, 115, 0, 43,
+ /* 440 */ 175, 14, 177, 366, 326, 237, 369, 20, 316, 68,
+ /* 450 */ 21, 129, 130, 24, 25, 26, 27, 28, 29, 30,
+ /* 460 */ 31, 32, 20, 198, 199, 347, 201, 202, 203, 204,
+ /* 470 */ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ /* 480 */ 215, 216, 217, 218, 219, 0, 221, 8, 9, 357,
+ /* 490 */ 324, 12, 13, 14, 15, 16, 162, 175, 60, 177,
+ /* 500 */ 3, 335, 398, 237, 167, 401, 237, 37, 68, 24,
+ /* 510 */ 25, 26, 27, 28, 29, 30, 31, 32, 352, 384,
+ /* 520 */ 198, 199, 20, 201, 202, 203, 204, 205, 206, 207,
+ /* 530 */ 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
+ /* 540 */ 218, 219, 12, 13, 344, 124, 22, 336, 413, 345,
+ /* 550 */ 20, 351, 22, 330, 331, 344, 43, 328, 328, 35,
+ /* 560 */ 360, 324, 33, 33, 353, 35, 96, 324, 98, 99,
+ /* 570 */ 341, 101, 20, 94, 22, 105, 47, 316, 335, 350,
+ /* 580 */ 350, 52, 53, 54, 55, 56, 56, 35, 388, 352,
+ /* 590 */ 326, 316, 68, 105, 20, 352, 259, 127, 68, 12,
+ /* 600 */ 13, 14, 50, 339, 384, 184, 185, 20, 345, 22,
+ /* 610 */ 324, 347, 124, 125, 126, 127, 128, 417, 357, 344,
+ /* 620 */ 33, 92, 35, 93, 95, 388, 324, 352, 345, 202,
+ /* 630 */ 430, 431, 357, 413, 359, 435, 436, 335, 352, 115,
+ /* 640 */ 56, 324, 316, 56, 14, 115, 409, 410, 411, 412,
+ /* 650 */ 20, 414, 335, 345, 352, 68, 344, 382, 21, 129,
+ /* 660 */ 130, 386, 387, 388, 389, 390, 391, 392, 393, 352,
+ /* 670 */ 395, 34, 360, 36, 388, 400, 92, 402, 324, 95,
+ /* 680 */ 93, 406, 407, 357, 316, 64, 65, 158, 159, 335,
+ /* 690 */ 161, 416, 71, 399, 165, 401, 410, 411, 412, 175,
+ /* 700 */ 414, 177, 115, 82, 83, 175, 352, 177, 352, 88,
+ /* 710 */ 181, 316, 344, 14, 15, 16, 129, 130, 0, 363,
+ /* 720 */ 352, 344, 198, 199, 316, 357, 376, 359, 198, 199,
+ /* 730 */ 353, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ /* 740 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
+ /* 750 */ 382, 254, 357, 384, 386, 387, 388, 389, 390, 391,
+ /* 760 */ 392, 393, 175, 395, 177, 357, 2, 237, 400, 316,
+ /* 770 */ 402, 258, 8, 9, 406, 407, 12, 13, 14, 15,
+ /* 780 */ 16, 316, 413, 316, 316, 198, 199, 39, 201, 202,
+ /* 790 */ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ /* 800 */ 213, 214, 215, 216, 217, 218, 219, 12, 13, 316,
+ /* 810 */ 357, 344, 336, 330, 331, 20, 349, 22, 354, 352,
+ /* 820 */ 344, 357, 357, 105, 357, 357, 359, 2, 33, 353,
+ /* 830 */ 35, 372, 202, 8, 9, 44, 45, 12, 13, 14,
+ /* 840 */ 15, 16, 124, 125, 126, 127, 128, 388, 20, 382,
+ /* 850 */ 357, 56, 316, 386, 387, 388, 389, 390, 391, 392,
+ /* 860 */ 393, 56, 395, 68, 12, 13, 352, 345, 368, 359,
+ /* 870 */ 370, 324, 20, 368, 22, 370, 417, 363, 19, 369,
+ /* 880 */ 316, 332, 335, 334, 317, 33, 157, 35, 93, 430,
+ /* 890 */ 431, 439, 33, 357, 435, 436, 333, 8, 9, 352,
+ /* 900 */ 95, 12, 13, 14, 15, 16, 47, 324, 56, 105,
+ /* 910 */ 115, 52, 53, 54, 55, 56, 372, 316, 335, 35,
+ /* 920 */ 68, 357, 8, 9, 129, 130, 12, 13, 14, 15,
+ /* 930 */ 16, 127, 388, 8, 9, 352, 93, 12, 13, 14,
+ /* 940 */ 15, 16, 1, 2, 337, 93, 103, 340, 324, 324,
+ /* 950 */ 61, 92, 68, 224, 95, 324, 35, 324, 357, 335,
+ /* 960 */ 335, 417, 324, 234, 42, 43, 335, 115, 335, 4,
+ /* 970 */ 175, 43, 177, 335, 430, 431, 352, 352, 316, 435,
+ /* 980 */ 436, 129, 130, 352, 236, 352, 428, 128, 235, 236,
+ /* 990 */ 352, 102, 316, 198, 199, 0, 201, 202, 203, 204,
+ /* 1000 */ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ /* 1010 */ 215, 216, 217, 218, 219, 324, 18, 22, 20, 357,
+ /* 1020 */ 161, 22, 94, 162, 163, 27, 335, 175, 30, 177,
+ /* 1030 */ 202, 316, 0, 357, 35, 94, 372, 316, 179, 316,
+ /* 1040 */ 181, 97, 316, 352, 100, 47, 157, 49, 344, 51,
+ /* 1050 */ 198, 199, 388, 201, 202, 203, 204, 205, 206, 207,
+ /* 1060 */ 208, 209, 210, 211, 212, 213, 214, 215, 216, 217,
+ /* 1070 */ 218, 219, 357, 324, 97, 0, 162, 100, 357, 47,
+ /* 1080 */ 357, 417, 324, 357, 335, 97, 18, 43, 100, 0,
+ /* 1090 */ 92, 23, 0, 335, 430, 431, 61, 22, 177, 435,
+ /* 1100 */ 436, 352, 104, 0, 97, 37, 38, 100, 43, 41,
+ /* 1110 */ 352, 22, 43, 224, 225, 226, 227, 228, 229, 230,
+ /* 1120 */ 231, 232, 233, 234, 325, 57, 58, 59, 1, 2,
+ /* 1130 */ 132, 129, 130, 135, 136, 137, 138, 139, 140, 141,
+ /* 1140 */ 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ /* 1150 */ 152, 424, 154, 155, 156, 43, 3, 325, 43, 94,
+ /* 1160 */ 43, 93, 323, 94, 43, 388, 63, 64, 65, 66,
+ /* 1170 */ 67, 43, 69, 70, 71, 72, 73, 74, 75, 76,
+ /* 1180 */ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ /* 1190 */ 87, 88, 89, 90, 417, 35, 324, 105, 43, 131,
+ /* 1200 */ 356, 385, 316, 238, 43, 46, 94, 335, 431, 94,
+ /* 1210 */ 13, 94, 435, 436, 432, 94, 124, 125, 126, 127,
+ /* 1220 */ 128, 0, 94, 415, 352, 408, 13, 418, 239, 43,
+ /* 1230 */ 344, 43, 35, 198, 380, 167, 168, 169, 352, 43,
+ /* 1240 */ 172, 47, 4, 357, 379, 359, 43, 94, 35, 94,
+ /* 1250 */ 43, 372, 93, 43, 173, 94, 188, 19, 42, 191,
+ /* 1260 */ 364, 193, 194, 195, 196, 197, 374, 388, 382, 48,
+ /* 1270 */ 20, 33, 386, 387, 388, 389, 390, 391, 392, 393,
+ /* 1280 */ 94, 395, 94, 372, 316, 47, 324, 324, 402, 51,
+ /* 1290 */ 94, 364, 406, 407, 56, 157, 417, 94, 362, 388,
+ /* 1300 */ 256, 94, 362, 417, 94, 237, 324, 324, 324, 430,
+ /* 1310 */ 431, 20, 344, 20, 435, 436, 430, 431, 318, 318,
+ /* 1320 */ 352, 435, 436, 378, 328, 357, 359, 359, 417, 20,
+ /* 1330 */ 92, 328, 371, 95, 20, 371, 328, 177, 328, 373,
+ /* 1340 */ 328, 430, 431, 328, 316, 324, 435, 436, 328, 318,
+ /* 1350 */ 382, 357, 378, 344, 386, 387, 388, 389, 390, 391,
+ /* 1360 */ 392, 393, 344, 395, 324, 318, 316, 344, 400, 344,
+ /* 1370 */ 402, 344, 344, 344, 406, 407, 359, 344, 344, 326,
+ /* 1380 */ 352, 344, 344, 344, 416, 357, 180, 359, 377, 326,
+ /* 1390 */ 324, 324, 244, 371, 344, 159, 326, 367, 357, 357,
+ /* 1400 */ 357, 365, 352, 357, 326, 357, 326, 357, 352, 359,
+ /* 1410 */ 382, 340, 367, 20, 386, 387, 388, 389, 390, 391,
+ /* 1420 */ 392, 393, 316, 395, 245, 367, 367, 423, 400, 357,
+ /* 1430 */ 402, 357, 382, 357, 406, 407, 386, 387, 388, 389,
+ /* 1440 */ 390, 391, 392, 393, 416, 395, 385, 12, 13, 423,
+ /* 1450 */ 344, 357, 357, 251, 166, 240, 252, 22, 352, 380,
+ /* 1460 */ 260, 253, 257, 357, 440, 359, 255, 417, 33, 236,
+ /* 1470 */ 35, 352, 20, 93, 422, 426, 425, 423, 421, 93,
+ /* 1480 */ 430, 431, 420, 316, 384, 435, 436, 405, 382, 434,
+ /* 1490 */ 348, 56, 386, 387, 388, 389, 390, 391, 392, 393,
+ /* 1500 */ 357, 395, 334, 68, 324, 316, 400, 326, 402, 36,
+ /* 1510 */ 433, 344, 406, 407, 319, 375, 318, 370, 327, 352,
+ /* 1520 */ 338, 338, 338, 314, 357, 0, 359, 182, 0, 0,
+ /* 1530 */ 42, 0, 35, 344, 0, 192, 35, 35, 35, 192,
+ /* 1540 */ 0, 352, 35, 35, 192, 0, 357, 192, 359, 382,
+ /* 1550 */ 115, 0, 35, 386, 387, 388, 389, 390, 391, 392,
+ /* 1560 */ 393, 0, 395, 22, 0, 35, 177, 175, 0, 402,
+ /* 1570 */ 0, 382, 171, 406, 407, 386, 387, 388, 389, 390,
+ /* 1580 */ 391, 392, 393, 170, 395, 0, 0, 0, 46, 316,
+ /* 1590 */ 0, 402, 0, 0, 42, 406, 407, 0, 0, 153,
+ /* 1600 */ 0, 0, 0, 0, 0, 148, 35, 0, 148, 0,
+ /* 1610 */ 175, 0, 177, 0, 0, 0, 0, 344, 0, 0,
+ /* 1620 */ 0, 0, 0, 0, 0, 352, 0, 0, 0, 0,
+ /* 1630 */ 357, 42, 359, 198, 199, 0, 0, 0, 0, 22,
+ /* 1640 */ 0, 0, 0, 0, 316, 210, 211, 212, 213, 214,
+ /* 1650 */ 215, 216, 0, 0, 0, 382, 46, 0, 14, 386,
+ /* 1660 */ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ /* 1670 */ 397, 39, 344, 42, 40, 14, 43, 0, 39, 0,
+ /* 1680 */ 352, 56, 0, 0, 166, 357, 56, 359, 39, 0,
+ /* 1690 */ 0, 46, 0, 0, 35, 47, 0, 316, 35, 0,
+ /* 1700 */ 35, 39, 47, 39, 0, 47, 39, 35, 39, 62,
+ /* 1710 */ 382, 0, 0, 47, 386, 387, 388, 389, 390, 391,
+ /* 1720 */ 392, 393, 0, 395, 0, 344, 35, 22, 0, 35,
+ /* 1730 */ 35, 43, 35, 352, 0, 35, 22, 0, 357, 22,
+ /* 1740 */ 359, 43, 22, 0, 35, 22, 0, 0, 35, 316,
+ /* 1750 */ 49, 100, 102, 35, 0, 22, 20, 0, 0, 178,
+ /* 1760 */ 35, 316, 22, 382, 159, 437, 438, 386, 387, 388,
+ /* 1770 */ 389, 390, 391, 392, 393, 316, 395, 344, 0, 0,
+ /* 1780 */ 3, 0, 0, 402, 0, 352, 35, 0, 407, 344,
+ /* 1790 */ 357, 0, 359, 187, 349, 39, 93, 352, 46, 220,
+ /* 1800 */ 222, 94, 357, 344, 359, 43, 43, 241, 220, 93,
+ /* 1810 */ 46, 352, 93, 103, 158, 382, 357, 43, 359, 386,
+ /* 1820 */ 387, 388, 389, 390, 391, 392, 393, 382, 395, 316,
+ /* 1830 */ 397, 386, 387, 388, 389, 390, 391, 392, 393, 164,
+ /* 1840 */ 395, 382, 162, 316, 160, 386, 387, 388, 389, 390,
+ /* 1850 */ 391, 392, 393, 93, 395, 94, 43, 344, 93, 93,
+ /* 1860 */ 46, 43, 94, 94, 162, 352, 93, 3, 162, 94,
+ /* 1870 */ 357, 344, 359, 93, 43, 35, 349, 94, 93, 352,
+ /* 1880 */ 94, 93, 93, 35, 357, 35, 359, 35, 429, 94,
+ /* 1890 */ 35, 35, 94, 316, 94, 382, 43, 46, 2, 386,
+ /* 1900 */ 387, 388, 389, 390, 391, 392, 393, 46, 395, 382,
+ /* 1910 */ 22, 241, 316, 386, 387, 388, 389, 390, 391, 392,
+ /* 1920 */ 393, 344, 395, 46, 198, 93, 349, 241, 94, 352,
+ /* 1930 */ 93, 46, 94, 94, 357, 93, 359, 93, 93, 46,
+ /* 1940 */ 344, 94, 22, 235, 200, 104, 35, 93, 352, 35,
+ /* 1950 */ 93, 438, 94, 357, 94, 359, 35, 94, 93, 382,
+ /* 1960 */ 35, 93, 316, 386, 387, 388, 389, 390, 391, 392,
+ /* 1970 */ 393, 35, 395, 94, 93, 35, 316, 94, 382, 93,
+ /* 1980 */ 22, 35, 386, 387, 388, 389, 390, 391, 392, 393,
+ /* 1990 */ 344, 395, 117, 117, 105, 117, 93, 117, 352, 93,
+ /* 2000 */ 93, 22, 43, 357, 344, 359, 62, 35, 61, 35,
+ /* 2010 */ 35, 35, 352, 35, 91, 35, 35, 357, 35, 359,
+ /* 2020 */ 35, 35, 68, 35, 35, 43, 22, 35, 382, 22,
+ /* 2030 */ 35, 316, 386, 387, 388, 389, 390, 391, 392, 393,
+ /* 2040 */ 35, 395, 382, 35, 35, 68, 386, 387, 388, 389,
+ /* 2050 */ 390, 391, 392, 393, 35, 395, 35, 316, 35, 344,
+ /* 2060 */ 35, 22, 35, 0, 35, 39, 0, 352, 35, 47,
+ /* 2070 */ 39, 47, 357, 0, 359, 35, 39, 47, 0, 35,
+ /* 2080 */ 39, 47, 0, 316, 35, 344, 35, 0, 20, 22,
+ /* 2090 */ 21, 441, 22, 352, 22, 21, 441, 382, 357, 441,
+ /* 2100 */ 359, 386, 387, 388, 389, 390, 391, 392, 393, 316,
+ /* 2110 */ 395, 344, 441, 441, 441, 441, 441, 441, 441, 352,
+ /* 2120 */ 441, 441, 441, 382, 357, 441, 359, 386, 387, 388,
+ /* 2130 */ 389, 390, 391, 392, 393, 316, 395, 344, 441, 441,
+ /* 2140 */ 441, 441, 441, 441, 441, 352, 441, 441, 441, 382,
+ /* 2150 */ 357, 441, 359, 386, 387, 388, 389, 390, 391, 392,
+ /* 2160 */ 393, 441, 395, 344, 441, 441, 441, 441, 441, 441,
+ /* 2170 */ 441, 352, 441, 441, 441, 382, 357, 441, 359, 386,
+ /* 2180 */ 387, 388, 389, 390, 391, 392, 393, 316, 395, 441,
+ /* 2190 */ 441, 441, 441, 441, 441, 441, 441, 441, 441, 441,
+ /* 2200 */ 441, 382, 441, 316, 441, 386, 387, 388, 389, 390,
+ /* 2210 */ 391, 392, 393, 441, 395, 344, 441, 441, 441, 441,
+ /* 2220 */ 441, 441, 441, 352, 441, 441, 441, 441, 357, 441,
+ /* 2230 */ 359, 344, 441, 441, 441, 441, 441, 441, 441, 352,
+ /* 2240 */ 441, 441, 441, 441, 357, 441, 359, 441, 441, 441,
+ /* 2250 */ 441, 441, 441, 382, 441, 441, 441, 386, 387, 388,
+ /* 2260 */ 389, 390, 391, 392, 393, 316, 395, 441, 441, 382,
+ /* 2270 */ 441, 441, 441, 386, 387, 388, 389, 390, 391, 392,
+ /* 2280 */ 393, 316, 395, 441, 441, 441, 441, 441, 441, 441,
+ /* 2290 */ 441, 441, 441, 344, 441, 441, 441, 441, 441, 441,
+ /* 2300 */ 441, 352, 441, 441, 441, 441, 357, 441, 359, 344,
+ /* 2310 */ 441, 441, 441, 441, 441, 441, 441, 352, 441, 441,
+ /* 2320 */ 441, 441, 357, 441, 359, 441, 441, 441, 441, 441,
+ /* 2330 */ 441, 382, 441, 441, 316, 386, 387, 388, 389, 390,
+ /* 2340 */ 391, 392, 393, 441, 395, 441, 441, 382, 316, 441,
+ /* 2350 */ 441, 386, 387, 388, 389, 390, 391, 392, 393, 441,
+ /* 2360 */ 395, 441, 344, 441, 441, 441, 441, 441, 441, 441,
+ /* 2370 */ 352, 441, 441, 441, 441, 357, 344, 359, 441, 441,
+ /* 2380 */ 441, 441, 441, 441, 352, 441, 441, 441, 441, 357,
+ /* 2390 */ 441, 359, 441, 441, 441, 441, 441, 441, 441, 441,
+ /* 2400 */ 382, 441, 316, 441, 386, 387, 388, 389, 390, 391,
+ /* 2410 */ 392, 393, 441, 395, 382, 441, 441, 441, 386, 387,
+ /* 2420 */ 388, 389, 390, 391, 392, 393, 316, 395, 441, 441,
+ /* 2430 */ 344, 441, 441, 441, 441, 441, 441, 441, 352, 441,
+ /* 2440 */ 441, 441, 441, 357, 441, 359, 441, 441, 441, 441,
+ /* 2450 */ 441, 441, 316, 441, 344, 441, 441, 441, 441, 441,
+ /* 2460 */ 441, 441, 352, 441, 441, 441, 441, 357, 382, 359,
+ /* 2470 */ 441, 441, 386, 387, 388, 389, 390, 391, 392, 393,
+ /* 2480 */ 344, 395, 441, 441, 441, 441, 441, 441, 352, 441,
+ /* 2490 */ 441, 441, 382, 357, 441, 359, 386, 387, 388, 389,
+ /* 2500 */ 390, 391, 392, 393, 316, 395, 441, 441, 441, 441,
+ /* 2510 */ 441, 441, 441, 441, 441, 441, 441, 441, 382, 441,
+ /* 2520 */ 316, 441, 386, 387, 388, 389, 390, 391, 392, 393,
+ /* 2530 */ 441, 395, 344, 441, 441, 441, 441, 441, 441, 441,
+ /* 2540 */ 352, 441, 441, 441, 441, 357, 441, 359, 344, 441,
+ /* 2550 */ 441, 441, 441, 441, 441, 441, 352, 441, 441, 441,
+ /* 2560 */ 441, 357, 441, 359, 441, 441, 441, 441, 441, 441,
+ /* 2570 */ 382, 441, 441, 441, 386, 387, 388, 389, 390, 391,
+ /* 2580 */ 392, 393, 316, 395, 441, 441, 382, 441, 441, 441,
+ /* 2590 */ 386, 387, 388, 389, 390, 391, 392, 393, 441, 395,
+ /* 2600 */ 441, 441, 441, 441, 441, 441, 441, 441, 441, 441,
+ /* 2610 */ 344, 441, 441, 441, 441, 441, 441, 441, 352, 441,
+ /* 2620 */ 441, 441, 441, 357, 441, 359, 441, 441, 441, 441,
+ /* 2630 */ 441, 441, 441, 441, 441, 441, 441, 441, 441, 441,
+ /* 2640 */ 441, 441, 441, 441, 441, 441, 441, 441, 382, 441,
+ /* 2650 */ 441, 441, 386, 387, 388, 389, 390, 391, 392, 393,
+ /* 2660 */ 441, 395,
};
-#define YY_SHIFT_COUNT (667)
+#define YY_SHIFT_COUNT (678)
#define YY_SHIFT_MIN (0)
-#define YY_SHIFT_MAX (2107)
+#define YY_SHIFT_MAX (2087)
static const unsigned short int yy_shift_ofst[] = {
- /* 0 */ 1011, 0, 207, 207, 264, 264, 264, 471, 264, 264,
- /* 10 */ 678, 735, 942, 735, 735, 735, 735, 735, 735, 735,
- /* 20 */ 735, 735, 735, 735, 735, 735, 735, 735, 735, 735,
- /* 30 */ 735, 735, 735, 735, 735, 735, 735, 735, 735, 735,
- /* 40 */ 335, 472, 10, 95, 334, 107, 129, 107, 10, 10,
- /* 50 */ 321, 321, 107, 321, 321, 290, 107, 90, 90, 14,
- /* 60 */ 14, 51, 90, 90, 90, 90, 90, 90, 90, 90,
- /* 70 */ 90, 90, 181, 90, 90, 90, 263, 90, 90, 303,
- /* 80 */ 90, 90, 303, 380, 90, 303, 303, 303, 90, 275,
- /* 90 */ 467, 1030, 854, 854, 96, 1018, 1018, 1018, 1018, 1018,
- /* 100 */ 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018,
- /* 110 */ 1018, 1018, 1018, 1018, 889, 309, 812, 51, 682, 682,
- /* 120 */ 311, 659, 760, 117, 117, 117, 659, 384, 384, 263,
- /* 130 */ 1, 1, 303, 303, 443, 443, 254, 529, 139, 139,
- /* 140 */ 139, 139, 139, 139, 139, 1504, 338, 293, 1028, 209,
- /* 150 */ 535, 341, 91, 493, 534, 798, 878, 333, 788, 225,
- /* 160 */ 788, 1008, 763, 495, 522, 987, 1199, 1113, 1254, 1283,
- /* 170 */ 1283, 1254, 1153, 1153, 1283, 1283, 1283, 1309, 1309, 1328,
- /* 180 */ 181, 263, 181, 1343, 1346, 181, 1343, 181, 181, 181,
- /* 190 */ 1283, 181, 1309, 303, 303, 303, 303, 303, 303, 303,
- /* 200 */ 303, 303, 303, 303, 1283, 1309, 443, 1328, 275, 1249,
- /* 210 */ 263, 275, 1283, 1283, 1343, 275, 1202, 443, 443, 443,
- /* 220 */ 443, 1202, 443, 1289, 275, 254, 275, 384, 1433, 443,
- /* 230 */ 1221, 1202, 443, 443, 1221, 1202, 443, 443, 303, 1223,
- /* 240 */ 1306, 1221, 1238, 1244, 1257, 987, 1263, 384, 1488, 1258,
- /* 250 */ 1264, 1268, 1421, 1426, 443, 529, 1283, 275, 1502, 1309,
- /* 260 */ 2196, 2196, 2196, 2196, 2196, 2196, 2196, 69, 131, 165,
- /* 270 */ 702, 560, 222, 628, 158, 717, 616, 644, 540, 890,
- /* 280 */ 890, 890, 890, 890, 890, 890, 890, 796, 221, 13,
- /* 290 */ 13, 216, 590, 575, 408, 28, 825, 119, 660, 228,
- /* 300 */ 635, 635, 635, 635, 662, 697, 503, 923, 1003, 1015,
- /* 310 */ 1074, 1036, 1065, 1085, 1078, 745, 1094, 1132, 1133, 1139,
- /* 320 */ 1148, 1182, 1193, 1112, 1034, 740, 988, 1201, 925, 962,
- /* 330 */ 932, 1229, 1131, 1234, 1248, 1250, 1256, 1265, 1266, 1126,
- /* 340 */ 1197, 1272, 1054, 438, 1554, 1561, 1380, 1563, 1565, 1524,
- /* 350 */ 1567, 1533, 1377, 1535, 1536, 1537, 1381, 1575, 1541, 1542,
- /* 360 */ 1387, 1580, 1389, 1588, 1555, 1591, 1571, 1594, 1560, 1420,
- /* 370 */ 1423, 1601, 1603, 1435, 1434, 1608, 1609, 1566, 1611, 1613,
- /* 380 */ 1614, 1574, 1618, 1619, 1620, 1468, 1622, 1623, 1624, 1625,
- /* 390 */ 1627, 1480, 1596, 1629, 1485, 1642, 1643, 1652, 1653, 1655,
- /* 400 */ 1656, 1657, 1658, 1659, 1660, 1661, 1663, 1664, 1666, 1626,
- /* 410 */ 1670, 1671, 1672, 1673, 1675, 1676, 1662, 1677, 1679, 1680,
- /* 420 */ 1681, 1682, 1631, 1688, 1633, 1694, 1695, 1665, 1667, 1668,
- /* 430 */ 1690, 1683, 1691, 1686, 1708, 1669, 1674, 1712, 1714, 1719,
- /* 440 */ 1689, 1568, 1735, 1736, 1737, 1693, 1738, 1739, 1706, 1696,
- /* 450 */ 1703, 1750, 1717, 1707, 1718, 1753, 1724, 1721, 1730, 1770,
- /* 460 */ 1740, 1725, 1741, 1774, 1776, 1777, 1778, 1684, 1685, 1744,
- /* 470 */ 1759, 1782, 1749, 1752, 1745, 1746, 1755, 1756, 1771, 1792,
- /* 480 */ 1772, 1797, 1786, 1757, 1798, 1788, 1764, 1812, 1779, 1813,
- /* 490 */ 1780, 1816, 1795, 1800, 1818, 1678, 1787, 1821, 1647, 1805,
- /* 500 */ 1697, 1687, 1828, 1829, 1700, 1699, 1827, 1832, 1833, 1834,
- /* 510 */ 1742, 1747, 1804, 1698, 1842, 1751, 1711, 1754, 1843, 1809,
- /* 520 */ 1715, 1758, 1773, 1831, 1835, 1638, 1794, 1799, 1801, 1802,
- /* 530 */ 1803, 1808, 1845, 1810, 1815, 1817, 1820, 1822, 1846, 1844,
- /* 540 */ 1849, 1824, 1848, 1709, 1825, 1826, 1852, 1701, 1856, 1857,
- /* 550 */ 1860, 1830, 1899, 1866, 1710, 1876, 1879, 1880, 1883, 1886,
- /* 560 */ 1887, 1921, 1903, 1728, 1884, 1836, 1838, 1840, 1850, 1854,
- /* 570 */ 1855, 1896, 1858, 1861, 1897, 1827, 1928, 1760, 1864, 1859,
- /* 580 */ 1865, 1923, 1926, 1869, 1871, 1931, 1874, 1878, 1933, 1877,
- /* 590 */ 1881, 1938, 1888, 1882, 1939, 1898, 1862, 1873, 1875, 1889,
- /* 600 */ 1955, 1891, 1904, 1914, 1973, 1916, 1967, 1967, 1989, 1950,
- /* 610 */ 1952, 1980, 1981, 1982, 1984, 1985, 1986, 1995, 1996, 1998,
- /* 620 */ 1999, 1968, 1944, 1994, 2003, 2004, 2019, 2008, 2022, 2011,
- /* 630 */ 2013, 2014, 1983, 1745, 2017, 1746, 2018, 2023, 2024, 2025,
- /* 640 */ 2032, 2026, 2062, 2028, 2020, 2027, 2065, 2033, 2035, 2034,
- /* 650 */ 2072, 2048, 2043, 2053, 2093, 2060, 2050, 2067, 2104, 2074,
- /* 660 */ 2075, 2107, 2089, 2091, 2092, 2094, 2096, 2095,
+ /* 0 */ 1068, 0, 57, 265, 57, 322, 322, 322, 530, 322,
+ /* 10 */ 322, 322, 322, 322, 587, 795, 852, 795, 795, 795,
+ /* 20 */ 795, 795, 795, 795, 795, 795, 795, 795, 795, 795,
+ /* 30 */ 795, 795, 795, 795, 795, 795, 795, 795, 795, 795,
+ /* 40 */ 795, 795, 795, 795, 16, 266, 39, 208, 269, 14,
+ /* 50 */ 59, 14, 39, 39, 1435, 1435, 14, 1435, 1435, 62,
+ /* 60 */ 14, 17, 17, 13, 13, 268, 17, 17, 17, 17,
+ /* 70 */ 17, 17, 17, 17, 17, 17, 68, 17, 17, 17,
+ /* 80 */ 171, 17, 17, 442, 17, 17, 442, 502, 17, 442,
+ /* 90 */ 442, 442, 17, 163, 998, 889, 889, 429, 524, 524,
+ /* 100 */ 524, 524, 524, 524, 524, 524, 524, 524, 524, 524,
+ /* 110 */ 524, 524, 524, 524, 524, 524, 524, 470, 621, 12,
+ /* 120 */ 268, 58, 58, 327, 328, 438, 101, 101, 9, 9,
+ /* 130 */ 9, 328, 574, 574, 171, 2, 2, 63, 442, 442,
+ /* 140 */ 381, 381, 233, 440, 196, 196, 196, 196, 196, 196,
+ /* 150 */ 196, 859, 402, 337, 34, 43, 552, 179, 427, 630,
+ /* 160 */ 232, 791, 804, 334, 753, 748, 497, 753, 922, 965,
+ /* 170 */ 828, 989, 1194, 1081, 1216, 1250, 1250, 1216, 1138, 1138,
+ /* 180 */ 1250, 1250, 1250, 1291, 1291, 1293, 68, 171, 68, 1309,
+ /* 190 */ 1314, 68, 1309, 68, 68, 68, 1250, 68, 1291, 442,
+ /* 200 */ 442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
+ /* 210 */ 1250, 1291, 381, 1293, 163, 1206, 171, 163, 1250, 1250,
+ /* 220 */ 1309, 163, 1148, 381, 381, 381, 381, 1148, 381, 1236,
+ /* 230 */ 163, 233, 163, 574, 1393, 381, 1179, 1148, 381, 381,
+ /* 240 */ 1179, 1148, 381, 381, 442, 1202, 1288, 1179, 1208, 1204,
+ /* 250 */ 1215, 989, 1200, 1205, 1211, 1233, 574, 1452, 1380, 1386,
+ /* 260 */ 381, 440, 1250, 163, 1473, 1291, 2662, 2662, 2662, 2662,
+ /* 270 */ 2662, 2662, 2662, 1103, 529, 485, 1238, 234, 396, 479,
+ /* 280 */ 764, 825, 914, 718, 925, 925, 925, 925, 925, 925,
+ /* 290 */ 925, 925, 925, 1092, 488, 11, 11, 6, 205, 203,
+ /* 300 */ 584, 242, 637, 421, 699, 941, 729, 699, 699, 699,
+ /* 310 */ 928, 1032, 999, 944, 977, 988, 1007, 995, 1075, 1089,
+ /* 320 */ 805, 861, 1065, 1069, 1112, 1115, 1117, 1121, 1128, 1002,
+ /* 330 */ 1044, 513, 1127, 1155, 921, 1160, 1035, 1161, 1153, 1159,
+ /* 340 */ 1186, 1188, 1196, 1203, 1207, 1210, 843, 1197, 1213, 884,
+ /* 350 */ 1221, 1525, 1534, 1345, 1528, 1529, 1488, 1531, 1497, 1343,
+ /* 360 */ 1501, 1502, 1503, 1347, 1540, 1507, 1508, 1352, 1545, 1355,
+ /* 370 */ 1551, 1517, 1561, 1541, 1564, 1530, 1389, 1392, 1568, 1570,
+ /* 380 */ 1401, 1413, 1585, 1586, 1542, 1587, 1590, 1592, 1552, 1593,
+ /* 390 */ 1597, 1598, 1446, 1600, 1601, 1602, 1603, 1604, 1457, 1571,
+ /* 400 */ 1607, 1460, 1609, 1611, 1613, 1614, 1615, 1616, 1618, 1619,
+ /* 410 */ 1620, 1621, 1622, 1623, 1624, 1626, 1589, 1627, 1628, 1629,
+ /* 420 */ 1635, 1636, 1637, 1617, 1638, 1640, 1641, 1642, 1643, 1625,
+ /* 430 */ 1652, 1630, 1653, 1654, 1631, 1632, 1633, 1644, 1610, 1661,
+ /* 440 */ 1645, 1657, 1634, 1639, 1677, 1679, 1682, 1649, 1518, 1683,
+ /* 450 */ 1689, 1690, 1647, 1692, 1693, 1659, 1648, 1662, 1696, 1663,
+ /* 460 */ 1655, 1664, 1699, 1665, 1658, 1667, 1704, 1672, 1666, 1669,
+ /* 470 */ 1711, 1712, 1722, 1724, 1650, 1651, 1691, 1705, 1728, 1694,
+ /* 480 */ 1695, 1688, 1698, 1697, 1700, 1714, 1734, 1717, 1737, 1720,
+ /* 490 */ 1701, 1743, 1723, 1709, 1746, 1713, 1747, 1718, 1754, 1733,
+ /* 500 */ 1736, 1757, 1680, 1725, 1758, 1581, 1740, 1702, 1605, 1778,
+ /* 510 */ 1779, 1706, 1675, 1777, 1781, 1782, 1784, 1703, 1707, 1751,
+ /* 520 */ 1606, 1787, 1716, 1684, 1719, 1791, 1756, 1656, 1760, 1710,
+ /* 530 */ 1752, 1762, 1579, 1578, 1588, 1763, 1566, 1765, 1761, 1766,
+ /* 540 */ 1768, 1769, 1773, 1774, 1775, 1780, 1785, 1788, 1783, 1813,
+ /* 550 */ 1764, 1814, 1789, 1818, 1670, 1786, 1795, 1864, 1831, 1686,
+ /* 560 */ 1840, 1848, 1850, 1852, 1855, 1856, 1798, 1800, 1851, 1708,
+ /* 570 */ 1853, 1861, 1877, 1896, 1888, 1726, 1832, 1834, 1837, 1838,
+ /* 580 */ 1842, 1839, 1885, 1844, 1845, 1893, 1847, 1920, 1744, 1854,
+ /* 590 */ 1841, 1858, 1911, 1914, 1857, 1860, 1921, 1865, 1863, 1925,
+ /* 600 */ 1868, 1879, 1936, 1881, 1883, 1940, 1886, 1875, 1876, 1878,
+ /* 610 */ 1880, 1958, 1889, 1903, 1906, 1946, 1907, 1959, 1959, 1979,
+ /* 620 */ 1944, 1947, 1972, 1974, 1975, 1976, 1978, 1980, 1981, 1983,
+ /* 630 */ 1985, 1986, 1954, 1923, 1982, 1988, 1989, 2004, 1992, 2007,
+ /* 640 */ 1995, 2005, 2008, 1977, 1688, 2009, 1698, 2019, 2021, 2023,
+ /* 650 */ 2025, 2039, 2027, 2063, 2029, 2022, 2026, 2066, 2033, 2024,
+ /* 660 */ 2031, 2073, 2040, 2030, 2037, 2078, 2044, 2034, 2041, 2082,
+ /* 670 */ 2049, 2051, 2087, 2067, 2069, 2070, 2072, 2074, 2068,
};
-#define YY_REDUCE_COUNT (266)
-#define YY_REDUCE_MIN (-383)
-#define YY_REDUCE_MAX (1806)
+#define YY_REDUCE_COUNT (272)
+#define YY_REDUCE_MIN (-395)
+#define YY_REDUCE_MAX (2266)
static const short yy_reduce_ofst[] = {
- /* 0 */ 212, -308, -68, 882, 48, 427, 617, 935, -288, 949,
- /* 10 */ 205, 677, 999, 783, 1025, 1039, 1092, 1118, 1142, 1200,
- /* 20 */ 1252, 1262, 1314, 1338, 1362, 1378, 1418, 1471, 1483, 1497,
- /* 30 */ 1552, 1600, 1616, 1640, 1692, 1702, 1716, 1784, 1796, 1806,
- /* 40 */ 315, 102, 307, 122, 409, 418, 492, 600, 470, 577,
- /* 50 */ -336, 173, -372, -2, 410, -335, 155, -50, 431, -316,
- /* 60 */ -311, -317, -92, -53, 441, 454, 736, 770, 777, 778,
- /* 70 */ 861, 865, -280, 866, 870, 880, -346, 892, 900, -301,
- /* 80 */ 914, 950, -74, -268, 953, 46, 403, 452, 1070, 9,
- /* 90 */ -274, -383, -383, -383, -290, -79, 136, 149, 193, 387,
- /* 100 */ 469, 488, 494, 521, 605, 618, 620, 623, 654, 680,
- /* 110 */ 684, 776, 782, 809, -176, -243, -273, -292, -138, 192,
- /* 120 */ -33, -158, -258, -273, 267, 447, -102, 489, 490, -253,
- /* 130 */ 545, 595, 32, 103, 504, 578, 648, 639, -326, 220,
- /* 140 */ 285, 457, 480, 511, 517, 544, 516, 497, 712, 701,
- /* 150 */ 726, 681, 714, 714, 806, 879, 832, 808, 797, 797,
- /* 160 */ 797, 816, 815, 830, 714, 887, 907, 922, 934, 985,
- /* 170 */ 986, 952, 956, 957, 996, 1005, 1006, 1016, 1026, 975,
- /* 180 */ 1029, 1000, 1040, 991, 998, 1044, 1002, 1047, 1048, 1050,
- /* 190 */ 1055, 1052, 1075, 1053, 1057, 1058, 1059, 1060, 1062, 1066,
- /* 200 */ 1073, 1076, 1079, 1080, 1095, 1081, 1082, 1031, 1105, 1061,
- /* 210 */ 1083, 1109, 1116, 1117, 1072, 1111, 1086, 1089, 1090, 1091,
- /* 220 */ 1093, 1087, 1098, 1096, 1130, 1119, 1134, 1114, 1084, 1107,
- /* 230 */ 1049, 1101, 1115, 1127, 1069, 1104, 1135, 1136, 714, 1067,
- /* 240 */ 1077, 1071, 1097, 1099, 1088, 1122, 797, 1158, 1137, 1102,
- /* 250 */ 1110, 1106, 1120, 1178, 1179, 1204, 1216, 1217, 1226, 1228,
- /* 260 */ 1172, 1180, 1210, 1213, 1215, 1227, 1242,
+ /* 0 */ -268, 886, -249, -162, -306, 275, 968, 1028, 1050, -21,
+ /* 10 */ 368, 1106, 1167, 1189, 1273, 1328, 1381, 467, 1433, 1445,
+ /* 20 */ 1459, 1513, 1527, 1577, 1596, 1646, 1660, 1715, 1741, 1767,
+ /* 30 */ 1793, 1819, 1871, 1887, 1949, 1965, 2018, 2032, 2086, 2110,
+ /* 40 */ 2136, 2188, 2204, 2266, -11, 200, 237, 459, 544, 664,
+ /* 50 */ 879, 911, -131, 286, -341, -222, -387, -307, -201, -252,
+ /* 60 */ 777, -324, -321, -316, -260, -232, -233, 8, 83, 166,
+ /* 70 */ 243, 302, 317, 354, 547, 583, 229, 624, 625, 631,
+ /* 80 */ 77, 633, 638, -289, 691, 749, -175, -279, 758, 211,
+ /* 90 */ -4, 476, 872, 264, -227, -395, -395, -203, 32, 132,
+ /* 100 */ 261, 326, 395, 408, 453, 465, 468, 493, 536, 564,
+ /* 110 */ 601, 662, 676, 715, 721, 723, 726, -121, -133, 135,
+ /* 120 */ -211, -27, 92, 230, 223, 118, -235, 294, 135, 220,
+ /* 130 */ 369, 483, 356, 514, 510, 500, 505, 104, 377, 312,
+ /* 140 */ 60, 464, 607, 549, -326, -293, 204, 263, 283, 308,
+ /* 150 */ 522, 350, 567, 452, 563, 558, 799, 727, 704, 704,
+ /* 160 */ 832, 839, 844, 816, 808, 808, 782, 808, 817, 809,
+ /* 170 */ 704, 854, 865, 892, 896, 962, 963, 927, 936, 940,
+ /* 180 */ 982, 983, 984, 1000, 1001, 945, 996, 967, 1003, 961,
+ /* 190 */ 966, 1008, 964, 1010, 1012, 1015, 1021, 1020, 1031, 1009,
+ /* 200 */ 1018, 1023, 1025, 1027, 1029, 1033, 1034, 1037, 1038, 1039,
+ /* 210 */ 1040, 1047, 994, 974, 1053, 1011, 1017, 1063, 1066, 1067,
+ /* 220 */ 1022, 1070, 1030, 1041, 1042, 1043, 1046, 1045, 1048, 1036,
+ /* 230 */ 1078, 1071, 1080, 1056, 1061, 1072, 1004, 1058, 1074, 1076,
+ /* 240 */ 1026, 1059, 1094, 1095, 704, 1049, 1051, 1054, 1052, 1057,
+ /* 250 */ 1062, 1079, 1024, 1055, 1077, 808, 1119, 1100, 1082, 1142,
+ /* 260 */ 1143, 1168, 1180, 1181, 1195, 1198, 1140, 1147, 1182, 1183,
+ /* 270 */ 1184, 1191, 1209,
};
static const YYACTIONTYPE yy_default[] = {
- /* 0 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 10 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 20 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 30 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 40 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 50 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 60 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 70 */ 1479, 1479, 1553, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 80 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1551,
- /* 90 */ 1716, 1479, 1891, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 100 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 110 */ 1479, 1479, 1479, 1479, 1479, 1479, 1903, 1479, 1479, 1479,
- /* 120 */ 1553, 1479, 1551, 1903, 1903, 1903, 1479, 1479, 1479, 1479,
- /* 130 */ 1757, 1757, 1479, 1479, 1479, 1479, 1656, 1479, 1479, 1479,
- /* 140 */ 1479, 1479, 1479, 1479, 1479, 1751, 1479, 1975, 1479, 1479,
- /* 150 */ 1479, 1926, 1479, 1479, 1479, 1479, 1609, 1918, 1895, 1909,
- /* 160 */ 1896, 1893, 1960, 1912, 1479, 1922, 1479, 1744, 1721, 1479,
- /* 170 */ 1479, 1721, 1718, 1718, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 180 */ 1553, 1479, 1553, 1479, 1479, 1553, 1479, 1553, 1553, 1553,
- /* 190 */ 1479, 1553, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 200 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1551, 1753,
- /* 210 */ 1479, 1551, 1479, 1479, 1479, 1551, 1931, 1479, 1479, 1479,
- /* 220 */ 1479, 1931, 1479, 1479, 1551, 1479, 1551, 1479, 1479, 1479,
- /* 230 */ 1933, 1931, 1479, 1479, 1933, 1931, 1479, 1479, 1479, 1945,
- /* 240 */ 1941, 1933, 1949, 1947, 1924, 1922, 1909, 1479, 1479, 1978,
- /* 250 */ 1966, 1962, 1479, 1625, 1479, 1479, 1479, 1551, 1511, 1479,
- /* 260 */ 1746, 1757, 1659, 1659, 1659, 1554, 1484, 1479, 1479, 1479,
- /* 270 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1828,
- /* 280 */ 1944, 1943, 1867, 1866, 1865, 1863, 1827, 1479, 1621, 1826,
- /* 290 */ 1825, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 300 */ 1819, 1820, 1818, 1817, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 310 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 320 */ 1479, 1479, 1479, 1892, 1479, 1963, 1967, 1479, 1479, 1479,
- /* 330 */ 1479, 1479, 1803, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 340 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 350 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 360 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 370 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 380 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 390 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 400 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 410 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 420 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1516,
- /* 430 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 440 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 450 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 460 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 470 */ 1479, 1479, 1479, 1479, 1592, 1591, 1479, 1479, 1479, 1479,
- /* 480 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 490 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 500 */ 1479, 1479, 1479, 1479, 1479, 1479, 1959, 1479, 1479, 1479,
- /* 510 */ 1479, 1479, 1479, 1479, 1761, 1479, 1479, 1479, 1479, 1479,
- /* 520 */ 1479, 1479, 1479, 1479, 1925, 1479, 1479, 1479, 1479, 1479,
- /* 530 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 540 */ 1803, 1479, 1942, 1479, 1902, 1898, 1479, 1479, 1894, 1802,
- /* 550 */ 1479, 1479, 1479, 1961, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 560 */ 1479, 1887, 1479, 1479, 1860, 1845, 1479, 1479, 1479, 1479,
- /* 570 */ 1479, 1479, 1479, 1479, 1479, 1815, 1479, 1813, 1479, 1479,
- /* 580 */ 1479, 1479, 1479, 1653, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 590 */ 1479, 1479, 1479, 1479, 1479, 1479, 1638, 1636, 1635, 1634,
- /* 600 */ 1479, 1631, 1479, 1479, 1479, 1479, 1662, 1661, 1479, 1479,
- /* 610 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 620 */ 1479, 1479, 1479, 1573, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 630 */ 1479, 1479, 1479, 1564, 1479, 1563, 1479, 1479, 1479, 1479,
- /* 640 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 650 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
- /* 660 */ 1479, 1479, 1479, 1479, 1479, 1479, 1479, 1479,
+ /* 0 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 10 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 20 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 30 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 40 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 50 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 60 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 70 */ 1509, 1509, 1509, 1509, 1509, 1509, 1583, 1509, 1509, 1509,
+ /* 80 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 90 */ 1509, 1509, 1509, 1581, 1746, 1930, 1509, 1509, 1509, 1509,
+ /* 100 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 110 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1942,
+ /* 120 */ 1509, 1509, 1509, 1583, 1509, 1581, 1902, 1902, 1942, 1942,
+ /* 130 */ 1942, 1509, 1509, 1509, 1509, 1787, 1787, 1509, 1509, 1509,
+ /* 140 */ 1509, 1509, 1686, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 150 */ 1509, 1781, 1509, 2015, 1509, 1509, 1509, 1965, 1509, 1509,
+ /* 160 */ 1509, 1509, 1639, 1957, 1934, 1948, 1999, 1935, 1932, 1951,
+ /* 170 */ 1509, 1961, 1509, 1774, 1751, 1509, 1509, 1751, 1748, 1748,
+ /* 180 */ 1509, 1509, 1509, 1509, 1509, 1509, 1583, 1509, 1583, 1509,
+ /* 190 */ 1509, 1583, 1509, 1583, 1583, 1583, 1509, 1583, 1509, 1509,
+ /* 200 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 210 */ 1509, 1509, 1509, 1509, 1581, 1783, 1509, 1581, 1509, 1509,
+ /* 220 */ 1509, 1581, 1970, 1509, 1509, 1509, 1509, 1970, 1509, 1509,
+ /* 230 */ 1581, 1509, 1581, 1509, 1509, 1509, 1972, 1970, 1509, 1509,
+ /* 240 */ 1972, 1970, 1509, 1509, 1509, 1984, 1980, 1972, 1988, 1986,
+ /* 250 */ 1963, 1961, 2018, 2005, 2001, 1948, 1509, 1509, 1509, 1655,
+ /* 260 */ 1509, 1509, 1509, 1581, 1541, 1509, 1776, 1787, 1689, 1689,
+ /* 270 */ 1689, 1584, 1514, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 280 */ 1509, 1509, 1509, 1509, 1860, 1509, 1983, 1982, 1906, 1905,
+ /* 290 */ 1904, 1895, 1859, 1509, 1651, 1858, 1857, 1509, 1509, 1509,
+ /* 300 */ 1509, 1509, 1509, 1509, 1851, 1509, 1509, 1852, 1850, 1849,
+ /* 310 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 320 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 330 */ 2002, 2006, 1931, 1509, 1509, 1509, 1509, 1509, 1842, 1833,
+ /* 340 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 350 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 360 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 370 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 380 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 390 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 400 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 410 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 420 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 430 */ 1509, 1509, 1509, 1509, 1509, 1509, 1546, 1509, 1509, 1509,
+ /* 440 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 450 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 460 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 470 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 480 */ 1509, 1622, 1621, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 490 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 500 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 510 */ 1509, 1509, 1509, 1998, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 520 */ 1509, 1791, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 530 */ 1509, 1892, 1509, 1509, 1509, 1964, 1509, 1509, 1509, 1509,
+ /* 540 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 550 */ 1509, 1833, 1509, 1981, 1509, 1509, 1996, 1509, 2000, 1509,
+ /* 560 */ 1509, 1509, 1509, 1509, 1509, 1509, 1941, 1937, 1509, 1509,
+ /* 570 */ 1933, 1832, 1509, 1926, 1509, 1509, 1877, 1509, 1509, 1509,
+ /* 580 */ 1509, 1509, 1509, 1509, 1509, 1509, 1841, 1509, 1845, 1509,
+ /* 590 */ 1509, 1509, 1509, 1509, 1683, 1509, 1509, 1509, 1509, 1509,
+ /* 600 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1668, 1666, 1665,
+ /* 610 */ 1664, 1509, 1661, 1509, 1509, 1509, 1509, 1692, 1691, 1509,
+ /* 620 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 630 */ 1509, 1509, 1509, 1509, 1603, 1509, 1509, 1509, 1509, 1509,
+ /* 640 */ 1509, 1509, 1509, 1509, 1594, 1509, 1593, 1509, 1509, 1509,
+ /* 650 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 660 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
+ /* 670 */ 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,
};
/********** End of lemon-generated parsing tables *****************************/
@@ -1094,6 +1168,11 @@ static const YYCODETYPE yyFallback[] = {
0, /* CURRENT_USER => nothing */
0, /* COUNT => nothing */
0, /* LAST_ROW => nothing */
+ 0, /* CASE => nothing */
+ 261, /* END => ABORT */
+ 0, /* WHEN => nothing */
+ 0, /* THEN => nothing */
+ 0, /* ELSE => nothing */
0, /* BETWEEN => nothing */
0, /* IS => nothing */
0, /* NK_LT => nothing */
@@ -1132,58 +1211,57 @@ static const YYCODETYPE yyFallback[] = {
0, /* ASC => nothing */
0, /* NULLS => nothing */
0, /* ABORT => nothing */
- 256, /* AFTER => ABORT */
- 256, /* ATTACH => ABORT */
- 256, /* BEFORE => ABORT */
- 256, /* BEGIN => ABORT */
- 256, /* BITAND => ABORT */
- 256, /* BITNOT => ABORT */
- 256, /* BITOR => ABORT */
- 256, /* BLOCKS => ABORT */
- 256, /* CHANGE => ABORT */
- 256, /* COMMA => ABORT */
- 256, /* COMPACT => ABORT */
- 256, /* CONCAT => ABORT */
- 256, /* CONFLICT => ABORT */
- 256, /* COPY => ABORT */
- 256, /* DEFERRED => ABORT */
- 256, /* DELIMITERS => ABORT */
- 256, /* DETACH => ABORT */
- 256, /* DIVIDE => ABORT */
- 256, /* DOT => ABORT */
- 256, /* EACH => ABORT */
- 256, /* END => ABORT */
- 256, /* FAIL => ABORT */
- 256, /* FILE => ABORT */
- 256, /* FOR => ABORT */
- 256, /* GLOB => ABORT */
- 256, /* ID => ABORT */
- 256, /* IMMEDIATE => ABORT */
- 256, /* IMPORT => ABORT */
- 256, /* INITIALLY => ABORT */
- 256, /* INSTEAD => ABORT */
- 256, /* ISNULL => ABORT */
- 256, /* KEY => ABORT */
- 256, /* NK_BITNOT => ABORT */
- 256, /* NK_SEMI => ABORT */
- 256, /* NOTNULL => ABORT */
- 256, /* OF => ABORT */
- 256, /* PLUS => ABORT */
- 256, /* PRIVILEGE => ABORT */
- 256, /* RAISE => ABORT */
- 256, /* REPLACE => ABORT */
- 256, /* RESTRICT => ABORT */
- 256, /* ROW => ABORT */
- 256, /* SEMI => ABORT */
- 256, /* STAR => ABORT */
- 256, /* STATEMENT => ABORT */
- 256, /* STRING => ABORT */
- 256, /* TIMES => ABORT */
- 256, /* UPDATE => ABORT */
- 256, /* VALUES => ABORT */
- 256, /* VARIABLE => ABORT */
- 256, /* VIEW => ABORT */
- 256, /* WAL => ABORT */
+ 261, /* AFTER => ABORT */
+ 261, /* ATTACH => ABORT */
+ 261, /* BEFORE => ABORT */
+ 261, /* BEGIN => ABORT */
+ 261, /* BITAND => ABORT */
+ 261, /* BITNOT => ABORT */
+ 261, /* BITOR => ABORT */
+ 261, /* BLOCKS => ABORT */
+ 261, /* CHANGE => ABORT */
+ 261, /* COMMA => ABORT */
+ 261, /* COMPACT => ABORT */
+ 261, /* CONCAT => ABORT */
+ 261, /* CONFLICT => ABORT */
+ 261, /* COPY => ABORT */
+ 261, /* DEFERRED => ABORT */
+ 261, /* DELIMITERS => ABORT */
+ 261, /* DETACH => ABORT */
+ 261, /* DIVIDE => ABORT */
+ 261, /* DOT => ABORT */
+ 261, /* EACH => ABORT */
+ 261, /* FAIL => ABORT */
+ 261, /* FILE => ABORT */
+ 261, /* FOR => ABORT */
+ 261, /* GLOB => ABORT */
+ 261, /* ID => ABORT */
+ 261, /* IMMEDIATE => ABORT */
+ 261, /* IMPORT => ABORT */
+ 261, /* INITIALLY => ABORT */
+ 261, /* INSTEAD => ABORT */
+ 261, /* ISNULL => ABORT */
+ 261, /* KEY => ABORT */
+ 261, /* NK_BITNOT => ABORT */
+ 261, /* NK_SEMI => ABORT */
+ 261, /* NOTNULL => ABORT */
+ 261, /* OF => ABORT */
+ 261, /* PLUS => ABORT */
+ 261, /* PRIVILEGE => ABORT */
+ 261, /* RAISE => ABORT */
+ 261, /* REPLACE => ABORT */
+ 261, /* RESTRICT => ABORT */
+ 261, /* ROW => ABORT */
+ 261, /* SEMI => ABORT */
+ 261, /* STAR => ABORT */
+ 261, /* STATEMENT => ABORT */
+ 261, /* STRING => ABORT */
+ 261, /* TIMES => ABORT */
+ 261, /* UPDATE => ABORT */
+ 261, /* VALUES => ABORT */
+ 261, /* VARIABLE => ABORT */
+ 261, /* VIEW => ABORT */
+ 261, /* WAL => ABORT */
};
#endif /* YYFALLBACK */
@@ -1490,219 +1568,228 @@ static const char *const yyTokenName[] = {
/* 216 */ "CURRENT_USER",
/* 217 */ "COUNT",
/* 218 */ "LAST_ROW",
- /* 219 */ "BETWEEN",
- /* 220 */ "IS",
- /* 221 */ "NK_LT",
- /* 222 */ "NK_GT",
- /* 223 */ "NK_LE",
- /* 224 */ "NK_GE",
- /* 225 */ "NK_NE",
- /* 226 */ "MATCH",
- /* 227 */ "NMATCH",
- /* 228 */ "CONTAINS",
- /* 229 */ "IN",
- /* 230 */ "JOIN",
- /* 231 */ "INNER",
- /* 232 */ "SELECT",
- /* 233 */ "DISTINCT",
- /* 234 */ "WHERE",
- /* 235 */ "PARTITION",
- /* 236 */ "BY",
- /* 237 */ "SESSION",
- /* 238 */ "STATE_WINDOW",
- /* 239 */ "SLIDING",
- /* 240 */ "FILL",
- /* 241 */ "VALUE",
- /* 242 */ "NONE",
- /* 243 */ "PREV",
- /* 244 */ "LINEAR",
- /* 245 */ "NEXT",
- /* 246 */ "HAVING",
- /* 247 */ "RANGE",
- /* 248 */ "EVERY",
- /* 249 */ "ORDER",
- /* 250 */ "SLIMIT",
- /* 251 */ "SOFFSET",
- /* 252 */ "LIMIT",
- /* 253 */ "OFFSET",
- /* 254 */ "ASC",
- /* 255 */ "NULLS",
- /* 256 */ "ABORT",
- /* 257 */ "AFTER",
- /* 258 */ "ATTACH",
- /* 259 */ "BEFORE",
- /* 260 */ "BEGIN",
- /* 261 */ "BITAND",
- /* 262 */ "BITNOT",
- /* 263 */ "BITOR",
- /* 264 */ "BLOCKS",
- /* 265 */ "CHANGE",
- /* 266 */ "COMMA",
- /* 267 */ "COMPACT",
- /* 268 */ "CONCAT",
- /* 269 */ "CONFLICT",
- /* 270 */ "COPY",
- /* 271 */ "DEFERRED",
- /* 272 */ "DELIMITERS",
- /* 273 */ "DETACH",
- /* 274 */ "DIVIDE",
- /* 275 */ "DOT",
- /* 276 */ "EACH",
- /* 277 */ "END",
- /* 278 */ "FAIL",
- /* 279 */ "FILE",
- /* 280 */ "FOR",
- /* 281 */ "GLOB",
- /* 282 */ "ID",
- /* 283 */ "IMMEDIATE",
- /* 284 */ "IMPORT",
- /* 285 */ "INITIALLY",
- /* 286 */ "INSTEAD",
- /* 287 */ "ISNULL",
- /* 288 */ "KEY",
- /* 289 */ "NK_BITNOT",
- /* 290 */ "NK_SEMI",
- /* 291 */ "NOTNULL",
- /* 292 */ "OF",
- /* 293 */ "PLUS",
- /* 294 */ "PRIVILEGE",
- /* 295 */ "RAISE",
- /* 296 */ "REPLACE",
- /* 297 */ "RESTRICT",
- /* 298 */ "ROW",
- /* 299 */ "SEMI",
- /* 300 */ "STAR",
- /* 301 */ "STATEMENT",
- /* 302 */ "STRING",
- /* 303 */ "TIMES",
- /* 304 */ "UPDATE",
- /* 305 */ "VALUES",
- /* 306 */ "VARIABLE",
- /* 307 */ "VIEW",
- /* 308 */ "WAL",
- /* 309 */ "cmd",
- /* 310 */ "account_options",
- /* 311 */ "alter_account_options",
- /* 312 */ "literal",
- /* 313 */ "alter_account_option",
- /* 314 */ "user_name",
- /* 315 */ "sysinfo_opt",
- /* 316 */ "privileges",
- /* 317 */ "priv_level",
- /* 318 */ "priv_type_list",
- /* 319 */ "priv_type",
- /* 320 */ "db_name",
- /* 321 */ "dnode_endpoint",
- /* 322 */ "not_exists_opt",
- /* 323 */ "db_options",
- /* 324 */ "exists_opt",
- /* 325 */ "alter_db_options",
- /* 326 */ "integer_list",
- /* 327 */ "variable_list",
- /* 328 */ "retention_list",
- /* 329 */ "alter_db_option",
- /* 330 */ "retention",
- /* 331 */ "full_table_name",
- /* 332 */ "column_def_list",
- /* 333 */ "tags_def_opt",
- /* 334 */ "table_options",
- /* 335 */ "multi_create_clause",
- /* 336 */ "tags_def",
- /* 337 */ "multi_drop_clause",
- /* 338 */ "alter_table_clause",
- /* 339 */ "alter_table_options",
- /* 340 */ "column_name",
- /* 341 */ "type_name",
- /* 342 */ "signed_literal",
- /* 343 */ "create_subtable_clause",
- /* 344 */ "specific_cols_opt",
- /* 345 */ "expression_list",
- /* 346 */ "drop_table_clause",
- /* 347 */ "col_name_list",
- /* 348 */ "table_name",
- /* 349 */ "column_def",
- /* 350 */ "duration_list",
- /* 351 */ "rollup_func_list",
- /* 352 */ "alter_table_option",
- /* 353 */ "duration_literal",
- /* 354 */ "rollup_func_name",
- /* 355 */ "function_name",
- /* 356 */ "col_name",
- /* 357 */ "db_name_cond_opt",
- /* 358 */ "like_pattern_opt",
- /* 359 */ "table_name_cond",
- /* 360 */ "from_db_opt",
- /* 361 */ "index_options",
- /* 362 */ "func_list",
- /* 363 */ "sliding_opt",
- /* 364 */ "sma_stream_opt",
- /* 365 */ "func",
- /* 366 */ "stream_options",
- /* 367 */ "topic_name",
- /* 368 */ "query_or_subquery",
- /* 369 */ "cgroup_name",
- /* 370 */ "analyze_opt",
- /* 371 */ "explain_options",
- /* 372 */ "agg_func_opt",
- /* 373 */ "bufsize_opt",
- /* 374 */ "stream_name",
- /* 375 */ "dnode_list",
- /* 376 */ "where_clause_opt",
- /* 377 */ "signed",
- /* 378 */ "literal_func",
- /* 379 */ "literal_list",
- /* 380 */ "table_alias",
- /* 381 */ "column_alias",
- /* 382 */ "expression",
- /* 383 */ "pseudo_column",
- /* 384 */ "column_reference",
- /* 385 */ "function_expression",
- /* 386 */ "subquery",
- /* 387 */ "star_func",
- /* 388 */ "star_func_para_list",
- /* 389 */ "noarg_func",
- /* 390 */ "other_para_list",
- /* 391 */ "star_func_para",
- /* 392 */ "predicate",
- /* 393 */ "compare_op",
- /* 394 */ "in_op",
- /* 395 */ "in_predicate_value",
- /* 396 */ "boolean_value_expression",
- /* 397 */ "boolean_primary",
- /* 398 */ "common_expression",
- /* 399 */ "from_clause_opt",
- /* 400 */ "table_reference_list",
- /* 401 */ "table_reference",
- /* 402 */ "table_primary",
- /* 403 */ "joined_table",
- /* 404 */ "alias_opt",
- /* 405 */ "parenthesized_joined_table",
- /* 406 */ "join_type",
- /* 407 */ "search_condition",
- /* 408 */ "query_specification",
- /* 409 */ "set_quantifier_opt",
- /* 410 */ "select_list",
- /* 411 */ "partition_by_clause_opt",
- /* 412 */ "range_opt",
- /* 413 */ "every_opt",
- /* 414 */ "fill_opt",
- /* 415 */ "twindow_clause_opt",
- /* 416 */ "group_by_clause_opt",
- /* 417 */ "having_clause_opt",
- /* 418 */ "select_item",
- /* 419 */ "fill_mode",
- /* 420 */ "group_by_list",
- /* 421 */ "query_expression",
- /* 422 */ "query_simple",
- /* 423 */ "order_by_clause_opt",
- /* 424 */ "slimit_clause_opt",
- /* 425 */ "limit_clause_opt",
- /* 426 */ "union_query_expression",
- /* 427 */ "query_simple_or_subquery",
- /* 428 */ "sort_specification_list",
- /* 429 */ "sort_specification",
- /* 430 */ "ordering_specification_opt",
- /* 431 */ "null_ordering_opt",
+ /* 219 */ "CASE",
+ /* 220 */ "END",
+ /* 221 */ "WHEN",
+ /* 222 */ "THEN",
+ /* 223 */ "ELSE",
+ /* 224 */ "BETWEEN",
+ /* 225 */ "IS",
+ /* 226 */ "NK_LT",
+ /* 227 */ "NK_GT",
+ /* 228 */ "NK_LE",
+ /* 229 */ "NK_GE",
+ /* 230 */ "NK_NE",
+ /* 231 */ "MATCH",
+ /* 232 */ "NMATCH",
+ /* 233 */ "CONTAINS",
+ /* 234 */ "IN",
+ /* 235 */ "JOIN",
+ /* 236 */ "INNER",
+ /* 237 */ "SELECT",
+ /* 238 */ "DISTINCT",
+ /* 239 */ "WHERE",
+ /* 240 */ "PARTITION",
+ /* 241 */ "BY",
+ /* 242 */ "SESSION",
+ /* 243 */ "STATE_WINDOW",
+ /* 244 */ "SLIDING",
+ /* 245 */ "FILL",
+ /* 246 */ "VALUE",
+ /* 247 */ "NONE",
+ /* 248 */ "PREV",
+ /* 249 */ "LINEAR",
+ /* 250 */ "NEXT",
+ /* 251 */ "HAVING",
+ /* 252 */ "RANGE",
+ /* 253 */ "EVERY",
+ /* 254 */ "ORDER",
+ /* 255 */ "SLIMIT",
+ /* 256 */ "SOFFSET",
+ /* 257 */ "LIMIT",
+ /* 258 */ "OFFSET",
+ /* 259 */ "ASC",
+ /* 260 */ "NULLS",
+ /* 261 */ "ABORT",
+ /* 262 */ "AFTER",
+ /* 263 */ "ATTACH",
+ /* 264 */ "BEFORE",
+ /* 265 */ "BEGIN",
+ /* 266 */ "BITAND",
+ /* 267 */ "BITNOT",
+ /* 268 */ "BITOR",
+ /* 269 */ "BLOCKS",
+ /* 270 */ "CHANGE",
+ /* 271 */ "COMMA",
+ /* 272 */ "COMPACT",
+ /* 273 */ "CONCAT",
+ /* 274 */ "CONFLICT",
+ /* 275 */ "COPY",
+ /* 276 */ "DEFERRED",
+ /* 277 */ "DELIMITERS",
+ /* 278 */ "DETACH",
+ /* 279 */ "DIVIDE",
+ /* 280 */ "DOT",
+ /* 281 */ "EACH",
+ /* 282 */ "FAIL",
+ /* 283 */ "FILE",
+ /* 284 */ "FOR",
+ /* 285 */ "GLOB",
+ /* 286 */ "ID",
+ /* 287 */ "IMMEDIATE",
+ /* 288 */ "IMPORT",
+ /* 289 */ "INITIALLY",
+ /* 290 */ "INSTEAD",
+ /* 291 */ "ISNULL",
+ /* 292 */ "KEY",
+ /* 293 */ "NK_BITNOT",
+ /* 294 */ "NK_SEMI",
+ /* 295 */ "NOTNULL",
+ /* 296 */ "OF",
+ /* 297 */ "PLUS",
+ /* 298 */ "PRIVILEGE",
+ /* 299 */ "RAISE",
+ /* 300 */ "REPLACE",
+ /* 301 */ "RESTRICT",
+ /* 302 */ "ROW",
+ /* 303 */ "SEMI",
+ /* 304 */ "STAR",
+ /* 305 */ "STATEMENT",
+ /* 306 */ "STRING",
+ /* 307 */ "TIMES",
+ /* 308 */ "UPDATE",
+ /* 309 */ "VALUES",
+ /* 310 */ "VARIABLE",
+ /* 311 */ "VIEW",
+ /* 312 */ "WAL",
+ /* 313 */ "cmd",
+ /* 314 */ "account_options",
+ /* 315 */ "alter_account_options",
+ /* 316 */ "literal",
+ /* 317 */ "alter_account_option",
+ /* 318 */ "user_name",
+ /* 319 */ "sysinfo_opt",
+ /* 320 */ "privileges",
+ /* 321 */ "priv_level",
+ /* 322 */ "priv_type_list",
+ /* 323 */ "priv_type",
+ /* 324 */ "db_name",
+ /* 325 */ "dnode_endpoint",
+ /* 326 */ "not_exists_opt",
+ /* 327 */ "db_options",
+ /* 328 */ "exists_opt",
+ /* 329 */ "alter_db_options",
+ /* 330 */ "integer_list",
+ /* 331 */ "variable_list",
+ /* 332 */ "retention_list",
+ /* 333 */ "alter_db_option",
+ /* 334 */ "retention",
+ /* 335 */ "full_table_name",
+ /* 336 */ "column_def_list",
+ /* 337 */ "tags_def_opt",
+ /* 338 */ "table_options",
+ /* 339 */ "multi_create_clause",
+ /* 340 */ "tags_def",
+ /* 341 */ "multi_drop_clause",
+ /* 342 */ "alter_table_clause",
+ /* 343 */ "alter_table_options",
+ /* 344 */ "column_name",
+ /* 345 */ "type_name",
+ /* 346 */ "signed_literal",
+ /* 347 */ "create_subtable_clause",
+ /* 348 */ "specific_cols_opt",
+ /* 349 */ "expression_list",
+ /* 350 */ "drop_table_clause",
+ /* 351 */ "col_name_list",
+ /* 352 */ "table_name",
+ /* 353 */ "column_def",
+ /* 354 */ "duration_list",
+ /* 355 */ "rollup_func_list",
+ /* 356 */ "alter_table_option",
+ /* 357 */ "duration_literal",
+ /* 358 */ "rollup_func_name",
+ /* 359 */ "function_name",
+ /* 360 */ "col_name",
+ /* 361 */ "db_name_cond_opt",
+ /* 362 */ "like_pattern_opt",
+ /* 363 */ "table_name_cond",
+ /* 364 */ "from_db_opt",
+ /* 365 */ "index_options",
+ /* 366 */ "func_list",
+ /* 367 */ "sliding_opt",
+ /* 368 */ "sma_stream_opt",
+ /* 369 */ "func",
+ /* 370 */ "stream_options",
+ /* 371 */ "topic_name",
+ /* 372 */ "query_or_subquery",
+ /* 373 */ "cgroup_name",
+ /* 374 */ "analyze_opt",
+ /* 375 */ "explain_options",
+ /* 376 */ "agg_func_opt",
+ /* 377 */ "bufsize_opt",
+ /* 378 */ "stream_name",
+ /* 379 */ "dnode_list",
+ /* 380 */ "where_clause_opt",
+ /* 381 */ "signed",
+ /* 382 */ "literal_func",
+ /* 383 */ "literal_list",
+ /* 384 */ "table_alias",
+ /* 385 */ "column_alias",
+ /* 386 */ "expr_or_subquery",
+ /* 387 */ "expression",
+ /* 388 */ "subquery",
+ /* 389 */ "pseudo_column",
+ /* 390 */ "column_reference",
+ /* 391 */ "function_expression",
+ /* 392 */ "case_when_expression",
+ /* 393 */ "star_func",
+ /* 394 */ "star_func_para_list",
+ /* 395 */ "noarg_func",
+ /* 396 */ "other_para_list",
+ /* 397 */ "star_func_para",
+ /* 398 */ "when_then_list",
+ /* 399 */ "case_when_else_opt",
+ /* 400 */ "common_expression",
+ /* 401 */ "when_then_expr",
+ /* 402 */ "predicate",
+ /* 403 */ "compare_op",
+ /* 404 */ "in_op",
+ /* 405 */ "in_predicate_value",
+ /* 406 */ "boolean_value_expression",
+ /* 407 */ "boolean_primary",
+ /* 408 */ "from_clause_opt",
+ /* 409 */ "table_reference_list",
+ /* 410 */ "table_reference",
+ /* 411 */ "table_primary",
+ /* 412 */ "joined_table",
+ /* 413 */ "alias_opt",
+ /* 414 */ "parenthesized_joined_table",
+ /* 415 */ "join_type",
+ /* 416 */ "search_condition",
+ /* 417 */ "query_specification",
+ /* 418 */ "set_quantifier_opt",
+ /* 419 */ "select_list",
+ /* 420 */ "partition_by_clause_opt",
+ /* 421 */ "range_opt",
+ /* 422 */ "every_opt",
+ /* 423 */ "fill_opt",
+ /* 424 */ "twindow_clause_opt",
+ /* 425 */ "group_by_clause_opt",
+ /* 426 */ "having_clause_opt",
+ /* 427 */ "select_item",
+ /* 428 */ "fill_mode",
+ /* 429 */ "group_by_list",
+ /* 430 */ "query_expression",
+ /* 431 */ "query_simple",
+ /* 432 */ "order_by_clause_opt",
+ /* 433 */ "slimit_clause_opt",
+ /* 434 */ "limit_clause_opt",
+ /* 435 */ "union_query_expression",
+ /* 436 */ "query_simple_or_subquery",
+ /* 437 */ "sort_specification_list",
+ /* 438 */ "sort_specification",
+ /* 439 */ "ordering_specification_opt",
+ /* 440 */ "null_ordering_opt",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
@@ -2039,176 +2126,186 @@ static const char *const yyRuleName[] = {
/* 326 */ "topic_name ::= NK_ID",
/* 327 */ "stream_name ::= NK_ID",
/* 328 */ "cgroup_name ::= NK_ID",
- /* 329 */ "expression ::= literal",
- /* 330 */ "expression ::= pseudo_column",
- /* 331 */ "expression ::= column_reference",
- /* 332 */ "expression ::= function_expression",
- /* 333 */ "expression ::= subquery",
- /* 334 */ "expression ::= NK_LP expression NK_RP",
- /* 335 */ "expression ::= NK_PLUS expression",
- /* 336 */ "expression ::= NK_MINUS expression",
- /* 337 */ "expression ::= expression NK_PLUS expression",
- /* 338 */ "expression ::= expression NK_MINUS expression",
- /* 339 */ "expression ::= expression NK_STAR expression",
- /* 340 */ "expression ::= expression NK_SLASH expression",
- /* 341 */ "expression ::= expression NK_REM expression",
- /* 342 */ "expression ::= column_reference NK_ARROW NK_STRING",
- /* 343 */ "expression ::= expression NK_BITAND expression",
- /* 344 */ "expression ::= expression NK_BITOR expression",
- /* 345 */ "expression_list ::= expression",
- /* 346 */ "expression_list ::= expression_list NK_COMMA expression",
- /* 347 */ "column_reference ::= column_name",
- /* 348 */ "column_reference ::= table_name NK_DOT column_name",
- /* 349 */ "pseudo_column ::= ROWTS",
- /* 350 */ "pseudo_column ::= TBNAME",
- /* 351 */ "pseudo_column ::= table_name NK_DOT TBNAME",
- /* 352 */ "pseudo_column ::= QSTART",
- /* 353 */ "pseudo_column ::= QEND",
- /* 354 */ "pseudo_column ::= QDURATION",
- /* 355 */ "pseudo_column ::= WSTART",
- /* 356 */ "pseudo_column ::= WEND",
- /* 357 */ "pseudo_column ::= WDURATION",
- /* 358 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
- /* 359 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
- /* 360 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP",
- /* 361 */ "function_expression ::= literal_func",
- /* 362 */ "literal_func ::= noarg_func NK_LP NK_RP",
- /* 363 */ "literal_func ::= NOW",
- /* 364 */ "noarg_func ::= NOW",
- /* 365 */ "noarg_func ::= TODAY",
- /* 366 */ "noarg_func ::= TIMEZONE",
- /* 367 */ "noarg_func ::= DATABASE",
- /* 368 */ "noarg_func ::= CLIENT_VERSION",
- /* 369 */ "noarg_func ::= SERVER_VERSION",
- /* 370 */ "noarg_func ::= SERVER_STATUS",
- /* 371 */ "noarg_func ::= CURRENT_USER",
- /* 372 */ "noarg_func ::= USER",
- /* 373 */ "star_func ::= COUNT",
- /* 374 */ "star_func ::= FIRST",
- /* 375 */ "star_func ::= LAST",
- /* 376 */ "star_func ::= LAST_ROW",
- /* 377 */ "star_func_para_list ::= NK_STAR",
- /* 378 */ "star_func_para_list ::= other_para_list",
- /* 379 */ "other_para_list ::= star_func_para",
- /* 380 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
- /* 381 */ "star_func_para ::= expression",
- /* 382 */ "star_func_para ::= table_name NK_DOT NK_STAR",
- /* 383 */ "predicate ::= expression compare_op expression",
- /* 384 */ "predicate ::= expression BETWEEN expression AND expression",
- /* 385 */ "predicate ::= expression NOT BETWEEN expression AND expression",
- /* 386 */ "predicate ::= expression IS NULL",
- /* 387 */ "predicate ::= expression IS NOT NULL",
- /* 388 */ "predicate ::= expression in_op in_predicate_value",
- /* 389 */ "compare_op ::= NK_LT",
- /* 390 */ "compare_op ::= NK_GT",
- /* 391 */ "compare_op ::= NK_LE",
- /* 392 */ "compare_op ::= NK_GE",
- /* 393 */ "compare_op ::= NK_NE",
- /* 394 */ "compare_op ::= NK_EQ",
- /* 395 */ "compare_op ::= LIKE",
- /* 396 */ "compare_op ::= NOT LIKE",
- /* 397 */ "compare_op ::= MATCH",
- /* 398 */ "compare_op ::= NMATCH",
- /* 399 */ "compare_op ::= CONTAINS",
- /* 400 */ "in_op ::= IN",
- /* 401 */ "in_op ::= NOT IN",
- /* 402 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
- /* 403 */ "boolean_value_expression ::= boolean_primary",
- /* 404 */ "boolean_value_expression ::= NOT boolean_primary",
- /* 405 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
- /* 406 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
- /* 407 */ "boolean_primary ::= predicate",
- /* 408 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
- /* 409 */ "common_expression ::= expression",
- /* 410 */ "common_expression ::= boolean_value_expression",
- /* 411 */ "from_clause_opt ::=",
- /* 412 */ "from_clause_opt ::= FROM table_reference_list",
- /* 413 */ "table_reference_list ::= table_reference",
- /* 414 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
- /* 415 */ "table_reference ::= table_primary",
- /* 416 */ "table_reference ::= joined_table",
- /* 417 */ "table_primary ::= table_name alias_opt",
- /* 418 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
- /* 419 */ "table_primary ::= subquery alias_opt",
- /* 420 */ "table_primary ::= parenthesized_joined_table",
- /* 421 */ "alias_opt ::=",
- /* 422 */ "alias_opt ::= table_alias",
- /* 423 */ "alias_opt ::= AS table_alias",
- /* 424 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
- /* 425 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
- /* 426 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
- /* 427 */ "join_type ::=",
- /* 428 */ "join_type ::= INNER",
- /* 429 */ "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",
- /* 430 */ "set_quantifier_opt ::=",
- /* 431 */ "set_quantifier_opt ::= DISTINCT",
- /* 432 */ "set_quantifier_opt ::= ALL",
- /* 433 */ "select_list ::= select_item",
- /* 434 */ "select_list ::= select_list NK_COMMA select_item",
- /* 435 */ "select_item ::= NK_STAR",
- /* 436 */ "select_item ::= common_expression",
- /* 437 */ "select_item ::= common_expression column_alias",
- /* 438 */ "select_item ::= common_expression AS column_alias",
- /* 439 */ "select_item ::= table_name NK_DOT NK_STAR",
- /* 440 */ "where_clause_opt ::=",
- /* 441 */ "where_clause_opt ::= WHERE search_condition",
- /* 442 */ "partition_by_clause_opt ::=",
- /* 443 */ "partition_by_clause_opt ::= PARTITION BY expression_list",
- /* 444 */ "twindow_clause_opt ::=",
- /* 445 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
- /* 446 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP",
- /* 447 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
- /* 448 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
- /* 449 */ "sliding_opt ::=",
- /* 450 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
- /* 451 */ "fill_opt ::=",
- /* 452 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
- /* 453 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
- /* 454 */ "fill_mode ::= NONE",
- /* 455 */ "fill_mode ::= PREV",
- /* 456 */ "fill_mode ::= NULL",
- /* 457 */ "fill_mode ::= LINEAR",
- /* 458 */ "fill_mode ::= NEXT",
- /* 459 */ "group_by_clause_opt ::=",
- /* 460 */ "group_by_clause_opt ::= GROUP BY group_by_list",
- /* 461 */ "group_by_list ::= expression",
- /* 462 */ "group_by_list ::= group_by_list NK_COMMA expression",
- /* 463 */ "having_clause_opt ::=",
- /* 464 */ "having_clause_opt ::= HAVING search_condition",
- /* 465 */ "range_opt ::=",
- /* 466 */ "range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP",
- /* 467 */ "every_opt ::=",
- /* 468 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
- /* 469 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt",
- /* 470 */ "query_simple ::= query_specification",
- /* 471 */ "query_simple ::= union_query_expression",
- /* 472 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery",
- /* 473 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery",
- /* 474 */ "query_simple_or_subquery ::= query_simple",
- /* 475 */ "query_simple_or_subquery ::= subquery",
- /* 476 */ "query_or_subquery ::= query_expression",
- /* 477 */ "query_or_subquery ::= subquery",
- /* 478 */ "order_by_clause_opt ::=",
- /* 479 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
- /* 480 */ "slimit_clause_opt ::=",
- /* 481 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
- /* 482 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
- /* 483 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
- /* 484 */ "limit_clause_opt ::=",
- /* 485 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
- /* 486 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
- /* 487 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
- /* 488 */ "subquery ::= NK_LP query_expression NK_RP",
- /* 489 */ "search_condition ::= common_expression",
- /* 490 */ "sort_specification_list ::= sort_specification",
- /* 491 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
- /* 492 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt",
- /* 493 */ "ordering_specification_opt ::=",
- /* 494 */ "ordering_specification_opt ::= ASC",
- /* 495 */ "ordering_specification_opt ::= DESC",
- /* 496 */ "null_ordering_opt ::=",
- /* 497 */ "null_ordering_opt ::= NULLS FIRST",
- /* 498 */ "null_ordering_opt ::= NULLS LAST",
+ /* 329 */ "expr_or_subquery ::= expression",
+ /* 330 */ "expr_or_subquery ::= subquery",
+ /* 331 */ "expression ::= literal",
+ /* 332 */ "expression ::= pseudo_column",
+ /* 333 */ "expression ::= column_reference",
+ /* 334 */ "expression ::= function_expression",
+ /* 335 */ "expression ::= case_when_expression",
+ /* 336 */ "expression ::= NK_LP expression NK_RP",
+ /* 337 */ "expression ::= NK_PLUS expr_or_subquery",
+ /* 338 */ "expression ::= NK_MINUS expr_or_subquery",
+ /* 339 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery",
+ /* 340 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery",
+ /* 341 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery",
+ /* 342 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery",
+ /* 343 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery",
+ /* 344 */ "expression ::= column_reference NK_ARROW NK_STRING",
+ /* 345 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery",
+ /* 346 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery",
+ /* 347 */ "expression_list ::= expr_or_subquery",
+ /* 348 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery",
+ /* 349 */ "column_reference ::= column_name",
+ /* 350 */ "column_reference ::= table_name NK_DOT column_name",
+ /* 351 */ "pseudo_column ::= ROWTS",
+ /* 352 */ "pseudo_column ::= TBNAME",
+ /* 353 */ "pseudo_column ::= table_name NK_DOT TBNAME",
+ /* 354 */ "pseudo_column ::= QSTART",
+ /* 355 */ "pseudo_column ::= QEND",
+ /* 356 */ "pseudo_column ::= QDURATION",
+ /* 357 */ "pseudo_column ::= WSTART",
+ /* 358 */ "pseudo_column ::= WEND",
+ /* 359 */ "pseudo_column ::= WDURATION",
+ /* 360 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
+ /* 361 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
+ /* 362 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP",
+ /* 363 */ "function_expression ::= literal_func",
+ /* 364 */ "literal_func ::= noarg_func NK_LP NK_RP",
+ /* 365 */ "literal_func ::= NOW",
+ /* 366 */ "noarg_func ::= NOW",
+ /* 367 */ "noarg_func ::= TODAY",
+ /* 368 */ "noarg_func ::= TIMEZONE",
+ /* 369 */ "noarg_func ::= DATABASE",
+ /* 370 */ "noarg_func ::= CLIENT_VERSION",
+ /* 371 */ "noarg_func ::= SERVER_VERSION",
+ /* 372 */ "noarg_func ::= SERVER_STATUS",
+ /* 373 */ "noarg_func ::= CURRENT_USER",
+ /* 374 */ "noarg_func ::= USER",
+ /* 375 */ "star_func ::= COUNT",
+ /* 376 */ "star_func ::= FIRST",
+ /* 377 */ "star_func ::= LAST",
+ /* 378 */ "star_func ::= LAST_ROW",
+ /* 379 */ "star_func_para_list ::= NK_STAR",
+ /* 380 */ "star_func_para_list ::= other_para_list",
+ /* 381 */ "other_para_list ::= star_func_para",
+ /* 382 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
+ /* 383 */ "star_func_para ::= expr_or_subquery",
+ /* 384 */ "star_func_para ::= table_name NK_DOT NK_STAR",
+ /* 385 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END",
+ /* 386 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END",
+ /* 387 */ "when_then_list ::= when_then_expr",
+ /* 388 */ "when_then_list ::= when_then_list when_then_expr",
+ /* 389 */ "when_then_expr ::= WHEN common_expression THEN common_expression",
+ /* 390 */ "case_when_else_opt ::=",
+ /* 391 */ "case_when_else_opt ::= ELSE common_expression",
+ /* 392 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery",
+ /* 393 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery",
+ /* 394 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery",
+ /* 395 */ "predicate ::= expr_or_subquery IS NULL",
+ /* 396 */ "predicate ::= expr_or_subquery IS NOT NULL",
+ /* 397 */ "predicate ::= expr_or_subquery in_op in_predicate_value",
+ /* 398 */ "compare_op ::= NK_LT",
+ /* 399 */ "compare_op ::= NK_GT",
+ /* 400 */ "compare_op ::= NK_LE",
+ /* 401 */ "compare_op ::= NK_GE",
+ /* 402 */ "compare_op ::= NK_NE",
+ /* 403 */ "compare_op ::= NK_EQ",
+ /* 404 */ "compare_op ::= LIKE",
+ /* 405 */ "compare_op ::= NOT LIKE",
+ /* 406 */ "compare_op ::= MATCH",
+ /* 407 */ "compare_op ::= NMATCH",
+ /* 408 */ "compare_op ::= CONTAINS",
+ /* 409 */ "in_op ::= IN",
+ /* 410 */ "in_op ::= NOT IN",
+ /* 411 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
+ /* 412 */ "boolean_value_expression ::= boolean_primary",
+ /* 413 */ "boolean_value_expression ::= NOT boolean_primary",
+ /* 414 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
+ /* 415 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
+ /* 416 */ "boolean_primary ::= predicate",
+ /* 417 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
+ /* 418 */ "common_expression ::= expr_or_subquery",
+ /* 419 */ "common_expression ::= boolean_value_expression",
+ /* 420 */ "from_clause_opt ::=",
+ /* 421 */ "from_clause_opt ::= FROM table_reference_list",
+ /* 422 */ "table_reference_list ::= table_reference",
+ /* 423 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
+ /* 424 */ "table_reference ::= table_primary",
+ /* 425 */ "table_reference ::= joined_table",
+ /* 426 */ "table_primary ::= table_name alias_opt",
+ /* 427 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
+ /* 428 */ "table_primary ::= subquery alias_opt",
+ /* 429 */ "table_primary ::= parenthesized_joined_table",
+ /* 430 */ "alias_opt ::=",
+ /* 431 */ "alias_opt ::= table_alias",
+ /* 432 */ "alias_opt ::= AS table_alias",
+ /* 433 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
+ /* 434 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
+ /* 435 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
+ /* 436 */ "join_type ::=",
+ /* 437 */ "join_type ::= INNER",
+ /* 438 */ "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",
+ /* 439 */ "set_quantifier_opt ::=",
+ /* 440 */ "set_quantifier_opt ::= DISTINCT",
+ /* 441 */ "set_quantifier_opt ::= ALL",
+ /* 442 */ "select_list ::= select_item",
+ /* 443 */ "select_list ::= select_list NK_COMMA select_item",
+ /* 444 */ "select_item ::= NK_STAR",
+ /* 445 */ "select_item ::= common_expression",
+ /* 446 */ "select_item ::= common_expression column_alias",
+ /* 447 */ "select_item ::= common_expression AS column_alias",
+ /* 448 */ "select_item ::= table_name NK_DOT NK_STAR",
+ /* 449 */ "where_clause_opt ::=",
+ /* 450 */ "where_clause_opt ::= WHERE search_condition",
+ /* 451 */ "partition_by_clause_opt ::=",
+ /* 452 */ "partition_by_clause_opt ::= PARTITION BY expression_list",
+ /* 453 */ "twindow_clause_opt ::=",
+ /* 454 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
+ /* 455 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP",
+ /* 456 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
+ /* 457 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
+ /* 458 */ "sliding_opt ::=",
+ /* 459 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
+ /* 460 */ "fill_opt ::=",
+ /* 461 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
+ /* 462 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
+ /* 463 */ "fill_mode ::= NONE",
+ /* 464 */ "fill_mode ::= PREV",
+ /* 465 */ "fill_mode ::= NULL",
+ /* 466 */ "fill_mode ::= LINEAR",
+ /* 467 */ "fill_mode ::= NEXT",
+ /* 468 */ "group_by_clause_opt ::=",
+ /* 469 */ "group_by_clause_opt ::= GROUP BY group_by_list",
+ /* 470 */ "group_by_list ::= expr_or_subquery",
+ /* 471 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery",
+ /* 472 */ "having_clause_opt ::=",
+ /* 473 */ "having_clause_opt ::= HAVING search_condition",
+ /* 474 */ "range_opt ::=",
+ /* 475 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP",
+ /* 476 */ "every_opt ::=",
+ /* 477 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
+ /* 478 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt",
+ /* 479 */ "query_simple ::= query_specification",
+ /* 480 */ "query_simple ::= union_query_expression",
+ /* 481 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery",
+ /* 482 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery",
+ /* 483 */ "query_simple_or_subquery ::= query_simple",
+ /* 484 */ "query_simple_or_subquery ::= subquery",
+ /* 485 */ "query_or_subquery ::= query_expression",
+ /* 486 */ "query_or_subquery ::= subquery",
+ /* 487 */ "order_by_clause_opt ::=",
+ /* 488 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
+ /* 489 */ "slimit_clause_opt ::=",
+ /* 490 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
+ /* 491 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
+ /* 492 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
+ /* 493 */ "limit_clause_opt ::=",
+ /* 494 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
+ /* 495 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
+ /* 496 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
+ /* 497 */ "subquery ::= NK_LP query_expression NK_RP",
+ /* 498 */ "subquery ::= NK_LP subquery NK_RP",
+ /* 499 */ "search_condition ::= common_expression",
+ /* 500 */ "sort_specification_list ::= sort_specification",
+ /* 501 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
+ /* 502 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt",
+ /* 503 */ "ordering_specification_opt ::=",
+ /* 504 */ "ordering_specification_opt ::= ASC",
+ /* 505 */ "ordering_specification_opt ::= DESC",
+ /* 506 */ "null_ordering_opt ::=",
+ /* 507 */ "null_ordering_opt ::= NULLS FIRST",
+ /* 508 */ "null_ordering_opt ::= NULLS LAST",
};
#endif /* NDEBUG */
@@ -2335,181 +2432,186 @@ static void yy_destructor(
*/
/********* Begin destructor definitions ***************************************/
/* Default NON-TERMINAL Destructor */
- case 309: /* cmd */
- case 312: /* literal */
- case 323: /* db_options */
- case 325: /* alter_db_options */
- case 330: /* retention */
- case 331: /* full_table_name */
- case 334: /* table_options */
- case 338: /* alter_table_clause */
- case 339: /* alter_table_options */
- case 342: /* signed_literal */
- case 343: /* create_subtable_clause */
- case 346: /* drop_table_clause */
- case 349: /* column_def */
- case 353: /* duration_literal */
- case 354: /* rollup_func_name */
- case 356: /* col_name */
- case 357: /* db_name_cond_opt */
- case 358: /* like_pattern_opt */
- case 359: /* table_name_cond */
- case 360: /* from_db_opt */
- case 361: /* index_options */
- case 363: /* sliding_opt */
- case 364: /* sma_stream_opt */
- case 365: /* func */
- case 366: /* stream_options */
- case 368: /* query_or_subquery */
- case 371: /* explain_options */
- case 376: /* where_clause_opt */
- case 377: /* signed */
- case 378: /* literal_func */
- case 382: /* expression */
- case 383: /* pseudo_column */
- case 384: /* column_reference */
- case 385: /* function_expression */
- case 386: /* subquery */
- case 391: /* star_func_para */
- case 392: /* predicate */
- case 395: /* in_predicate_value */
- case 396: /* boolean_value_expression */
- case 397: /* boolean_primary */
- case 398: /* common_expression */
- case 399: /* from_clause_opt */
- case 400: /* table_reference_list */
- case 401: /* table_reference */
- case 402: /* table_primary */
- case 403: /* joined_table */
- case 405: /* parenthesized_joined_table */
- case 407: /* search_condition */
- case 408: /* query_specification */
- case 412: /* range_opt */
- case 413: /* every_opt */
- case 414: /* fill_opt */
- case 415: /* twindow_clause_opt */
- case 417: /* having_clause_opt */
- case 418: /* select_item */
- case 421: /* query_expression */
- case 422: /* query_simple */
- case 424: /* slimit_clause_opt */
- case 425: /* limit_clause_opt */
- case 426: /* union_query_expression */
- case 427: /* query_simple_or_subquery */
- case 429: /* sort_specification */
+ case 313: /* cmd */
+ case 316: /* literal */
+ case 327: /* db_options */
+ case 329: /* alter_db_options */
+ case 334: /* retention */
+ case 335: /* full_table_name */
+ case 338: /* table_options */
+ case 342: /* alter_table_clause */
+ case 343: /* alter_table_options */
+ case 346: /* signed_literal */
+ case 347: /* create_subtable_clause */
+ case 350: /* drop_table_clause */
+ case 353: /* column_def */
+ case 357: /* duration_literal */
+ case 358: /* rollup_func_name */
+ case 360: /* col_name */
+ case 361: /* db_name_cond_opt */
+ case 362: /* like_pattern_opt */
+ case 363: /* table_name_cond */
+ case 364: /* from_db_opt */
+ case 365: /* index_options */
+ case 367: /* sliding_opt */
+ case 368: /* sma_stream_opt */
+ case 369: /* func */
+ case 370: /* stream_options */
+ case 372: /* query_or_subquery */
+ case 375: /* explain_options */
+ case 380: /* where_clause_opt */
+ case 381: /* signed */
+ case 382: /* literal_func */
+ case 386: /* expr_or_subquery */
+ case 387: /* expression */
+ case 388: /* subquery */
+ case 389: /* pseudo_column */
+ case 390: /* column_reference */
+ case 391: /* function_expression */
+ case 392: /* case_when_expression */
+ case 397: /* star_func_para */
+ case 399: /* case_when_else_opt */
+ case 400: /* common_expression */
+ case 401: /* when_then_expr */
+ case 402: /* predicate */
+ case 405: /* in_predicate_value */
+ case 406: /* boolean_value_expression */
+ case 407: /* boolean_primary */
+ case 408: /* from_clause_opt */
+ case 409: /* table_reference_list */
+ case 410: /* table_reference */
+ case 411: /* table_primary */
+ case 412: /* joined_table */
+ case 414: /* parenthesized_joined_table */
+ case 416: /* search_condition */
+ case 417: /* query_specification */
+ case 421: /* range_opt */
+ case 422: /* every_opt */
+ case 423: /* fill_opt */
+ case 424: /* twindow_clause_opt */
+ case 426: /* having_clause_opt */
+ case 427: /* select_item */
+ case 430: /* query_expression */
+ case 431: /* query_simple */
+ case 433: /* slimit_clause_opt */
+ case 434: /* limit_clause_opt */
+ case 435: /* union_query_expression */
+ case 436: /* query_simple_or_subquery */
+ case 438: /* sort_specification */
{
- nodesDestroyNode((yypminor->yy776));
+ nodesDestroyNode((yypminor->yy560));
}
break;
- case 310: /* account_options */
- case 311: /* alter_account_options */
- case 313: /* alter_account_option */
- case 373: /* bufsize_opt */
+ case 314: /* account_options */
+ case 315: /* alter_account_options */
+ case 317: /* alter_account_option */
+ case 377: /* bufsize_opt */
{
}
break;
- case 314: /* user_name */
- case 317: /* priv_level */
- case 320: /* db_name */
- case 321: /* dnode_endpoint */
- case 340: /* column_name */
- case 348: /* table_name */
- case 355: /* function_name */
- case 367: /* topic_name */
- case 369: /* cgroup_name */
- case 374: /* stream_name */
- case 380: /* table_alias */
- case 381: /* column_alias */
- case 387: /* star_func */
- case 389: /* noarg_func */
- case 404: /* alias_opt */
+ case 318: /* user_name */
+ case 321: /* priv_level */
+ case 324: /* db_name */
+ case 325: /* dnode_endpoint */
+ case 344: /* column_name */
+ case 352: /* table_name */
+ case 359: /* function_name */
+ case 371: /* topic_name */
+ case 373: /* cgroup_name */
+ case 378: /* stream_name */
+ case 384: /* table_alias */
+ case 385: /* column_alias */
+ case 393: /* star_func */
+ case 395: /* noarg_func */
+ case 413: /* alias_opt */
{
}
break;
- case 315: /* sysinfo_opt */
+ case 319: /* sysinfo_opt */
{
}
break;
- case 316: /* privileges */
- case 318: /* priv_type_list */
- case 319: /* priv_type */
+ case 320: /* privileges */
+ case 322: /* priv_type_list */
+ case 323: /* priv_type */
{
}
break;
- case 322: /* not_exists_opt */
- case 324: /* exists_opt */
- case 370: /* analyze_opt */
- case 372: /* agg_func_opt */
- case 409: /* set_quantifier_opt */
+ case 326: /* not_exists_opt */
+ case 328: /* exists_opt */
+ case 374: /* analyze_opt */
+ case 376: /* agg_func_opt */
+ case 418: /* set_quantifier_opt */
{
}
break;
- case 326: /* integer_list */
- case 327: /* variable_list */
- case 328: /* retention_list */
- case 332: /* column_def_list */
- case 333: /* tags_def_opt */
- case 335: /* multi_create_clause */
- case 336: /* tags_def */
- case 337: /* multi_drop_clause */
- case 344: /* specific_cols_opt */
- case 345: /* expression_list */
- case 347: /* col_name_list */
- case 350: /* duration_list */
- case 351: /* rollup_func_list */
- case 362: /* func_list */
- case 375: /* dnode_list */
- case 379: /* literal_list */
- case 388: /* star_func_para_list */
- case 390: /* other_para_list */
- case 410: /* select_list */
- case 411: /* partition_by_clause_opt */
- case 416: /* group_by_clause_opt */
- case 420: /* group_by_list */
- case 423: /* order_by_clause_opt */
- case 428: /* sort_specification_list */
+ case 330: /* integer_list */
+ case 331: /* variable_list */
+ case 332: /* retention_list */
+ case 336: /* column_def_list */
+ case 337: /* tags_def_opt */
+ case 339: /* multi_create_clause */
+ case 340: /* tags_def */
+ case 341: /* multi_drop_clause */
+ case 348: /* specific_cols_opt */
+ case 349: /* expression_list */
+ case 351: /* col_name_list */
+ case 354: /* duration_list */
+ case 355: /* rollup_func_list */
+ case 366: /* func_list */
+ case 379: /* dnode_list */
+ case 383: /* literal_list */
+ case 394: /* star_func_para_list */
+ case 396: /* other_para_list */
+ case 398: /* when_then_list */
+ case 419: /* select_list */
+ case 420: /* partition_by_clause_opt */
+ case 425: /* group_by_clause_opt */
+ case 429: /* group_by_list */
+ case 432: /* order_by_clause_opt */
+ case 437: /* sort_specification_list */
{
- nodesDestroyList((yypminor->yy280));
+ nodesDestroyList((yypminor->yy334));
}
break;
- case 329: /* alter_db_option */
- case 352: /* alter_table_option */
+ case 333: /* alter_db_option */
+ case 356: /* alter_table_option */
{
}
break;
- case 341: /* type_name */
+ case 345: /* type_name */
{
}
break;
- case 393: /* compare_op */
- case 394: /* in_op */
+ case 403: /* compare_op */
+ case 404: /* in_op */
{
}
break;
- case 406: /* join_type */
+ case 415: /* join_type */
{
}
break;
- case 419: /* fill_mode */
+ case 428: /* fill_mode */
{
}
break;
- case 430: /* ordering_specification_opt */
+ case 439: /* ordering_specification_opt */
{
}
break;
- case 431: /* null_ordering_opt */
+ case 440: /* null_ordering_opt */
{
}
@@ -2808,505 +2910,515 @@ 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[] = {
- { 309, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
- { 309, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
- { 310, 0 }, /* (2) account_options ::= */
- { 310, -3 }, /* (3) account_options ::= account_options PPS literal */
- { 310, -3 }, /* (4) account_options ::= account_options TSERIES literal */
- { 310, -3 }, /* (5) account_options ::= account_options STORAGE literal */
- { 310, -3 }, /* (6) account_options ::= account_options STREAMS literal */
- { 310, -3 }, /* (7) account_options ::= account_options QTIME literal */
- { 310, -3 }, /* (8) account_options ::= account_options DBS literal */
- { 310, -3 }, /* (9) account_options ::= account_options USERS literal */
- { 310, -3 }, /* (10) account_options ::= account_options CONNS literal */
- { 310, -3 }, /* (11) account_options ::= account_options STATE literal */
- { 311, -1 }, /* (12) alter_account_options ::= alter_account_option */
- { 311, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */
- { 313, -2 }, /* (14) alter_account_option ::= PASS literal */
- { 313, -2 }, /* (15) alter_account_option ::= PPS literal */
- { 313, -2 }, /* (16) alter_account_option ::= TSERIES literal */
- { 313, -2 }, /* (17) alter_account_option ::= STORAGE literal */
- { 313, -2 }, /* (18) alter_account_option ::= STREAMS literal */
- { 313, -2 }, /* (19) alter_account_option ::= QTIME literal */
- { 313, -2 }, /* (20) alter_account_option ::= DBS literal */
- { 313, -2 }, /* (21) alter_account_option ::= USERS literal */
- { 313, -2 }, /* (22) alter_account_option ::= CONNS literal */
- { 313, -2 }, /* (23) alter_account_option ::= STATE literal */
- { 309, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
- { 309, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
- { 309, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
- { 309, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
- { 309, -3 }, /* (28) cmd ::= DROP USER user_name */
- { 315, 0 }, /* (29) sysinfo_opt ::= */
- { 315, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */
- { 309, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */
- { 309, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */
- { 316, -1 }, /* (33) privileges ::= ALL */
- { 316, -1 }, /* (34) privileges ::= priv_type_list */
- { 318, -1 }, /* (35) priv_type_list ::= priv_type */
- { 318, -3 }, /* (36) priv_type_list ::= priv_type_list NK_COMMA priv_type */
- { 319, -1 }, /* (37) priv_type ::= READ */
- { 319, -1 }, /* (38) priv_type ::= WRITE */
- { 317, -3 }, /* (39) priv_level ::= NK_STAR NK_DOT NK_STAR */
- { 317, -3 }, /* (40) priv_level ::= db_name NK_DOT NK_STAR */
- { 309, -3 }, /* (41) cmd ::= CREATE DNODE dnode_endpoint */
- { 309, -5 }, /* (42) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
- { 309, -3 }, /* (43) cmd ::= DROP DNODE NK_INTEGER */
- { 309, -3 }, /* (44) cmd ::= DROP DNODE dnode_endpoint */
- { 309, -4 }, /* (45) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
- { 309, -5 }, /* (46) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
- { 309, -4 }, /* (47) cmd ::= ALTER ALL DNODES NK_STRING */
- { 309, -5 }, /* (48) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
- { 321, -1 }, /* (49) dnode_endpoint ::= NK_STRING */
- { 321, -1 }, /* (50) dnode_endpoint ::= NK_ID */
- { 321, -1 }, /* (51) dnode_endpoint ::= NK_IPTOKEN */
- { 309, -3 }, /* (52) cmd ::= ALTER LOCAL NK_STRING */
- { 309, -4 }, /* (53) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
- { 309, -5 }, /* (54) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
- { 309, -5 }, /* (55) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
- { 309, -5 }, /* (56) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
- { 309, -5 }, /* (57) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
- { 309, -5 }, /* (58) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
- { 309, -5 }, /* (59) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
- { 309, -5 }, /* (60) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
- { 309, -5 }, /* (61) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
- { 309, -5 }, /* (62) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
- { 309, -4 }, /* (63) cmd ::= DROP DATABASE exists_opt db_name */
- { 309, -2 }, /* (64) cmd ::= USE db_name */
- { 309, -4 }, /* (65) cmd ::= ALTER DATABASE db_name alter_db_options */
- { 309, -3 }, /* (66) cmd ::= FLUSH DATABASE db_name */
- { 309, -3 }, /* (67) cmd ::= TRIM DATABASE db_name */
- { 322, -3 }, /* (68) not_exists_opt ::= IF NOT EXISTS */
- { 322, 0 }, /* (69) not_exists_opt ::= */
- { 324, -2 }, /* (70) exists_opt ::= IF EXISTS */
- { 324, 0 }, /* (71) exists_opt ::= */
- { 323, 0 }, /* (72) db_options ::= */
- { 323, -3 }, /* (73) db_options ::= db_options BUFFER NK_INTEGER */
- { 323, -3 }, /* (74) db_options ::= db_options CACHEMODEL NK_STRING */
- { 323, -3 }, /* (75) db_options ::= db_options CACHESIZE NK_INTEGER */
- { 323, -3 }, /* (76) db_options ::= db_options COMP NK_INTEGER */
- { 323, -3 }, /* (77) db_options ::= db_options DURATION NK_INTEGER */
- { 323, -3 }, /* (78) db_options ::= db_options DURATION NK_VARIABLE */
- { 323, -3 }, /* (79) db_options ::= db_options MAXROWS NK_INTEGER */
- { 323, -3 }, /* (80) db_options ::= db_options MINROWS NK_INTEGER */
- { 323, -3 }, /* (81) db_options ::= db_options KEEP integer_list */
- { 323, -3 }, /* (82) db_options ::= db_options KEEP variable_list */
- { 323, -3 }, /* (83) db_options ::= db_options PAGES NK_INTEGER */
- { 323, -3 }, /* (84) db_options ::= db_options PAGESIZE NK_INTEGER */
- { 323, -3 }, /* (85) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
- { 323, -3 }, /* (86) db_options ::= db_options PRECISION NK_STRING */
- { 323, -3 }, /* (87) db_options ::= db_options REPLICA NK_INTEGER */
- { 323, -3 }, /* (88) db_options ::= db_options STRICT NK_STRING */
- { 323, -3 }, /* (89) db_options ::= db_options VGROUPS NK_INTEGER */
- { 323, -3 }, /* (90) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
- { 323, -3 }, /* (91) db_options ::= db_options RETENTIONS retention_list */
- { 323, -3 }, /* (92) db_options ::= db_options SCHEMALESS NK_INTEGER */
- { 323, -3 }, /* (93) db_options ::= db_options WAL_LEVEL NK_INTEGER */
- { 323, -3 }, /* (94) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
- { 323, -3 }, /* (95) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
- { 323, -4 }, /* (96) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
- { 323, -3 }, /* (97) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
- { 323, -4 }, /* (98) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
- { 323, -3 }, /* (99) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
- { 323, -3 }, /* (100) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
- { 323, -3 }, /* (101) db_options ::= db_options STT_TRIGGER NK_INTEGER */
- { 323, -3 }, /* (102) db_options ::= db_options TABLE_PREFIX NK_INTEGER */
- { 323, -3 }, /* (103) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */
- { 325, -1 }, /* (104) alter_db_options ::= alter_db_option */
- { 325, -2 }, /* (105) alter_db_options ::= alter_db_options alter_db_option */
- { 329, -2 }, /* (106) alter_db_option ::= CACHEMODEL NK_STRING */
- { 329, -2 }, /* (107) alter_db_option ::= CACHESIZE NK_INTEGER */
- { 329, -2 }, /* (108) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
- { 329, -2 }, /* (109) alter_db_option ::= KEEP integer_list */
- { 329, -2 }, /* (110) alter_db_option ::= KEEP variable_list */
- { 329, -2 }, /* (111) alter_db_option ::= WAL_LEVEL NK_INTEGER */
- { 329, -2 }, /* (112) alter_db_option ::= STT_TRIGGER NK_INTEGER */
- { 326, -1 }, /* (113) integer_list ::= NK_INTEGER */
- { 326, -3 }, /* (114) integer_list ::= integer_list NK_COMMA NK_INTEGER */
- { 327, -1 }, /* (115) variable_list ::= NK_VARIABLE */
- { 327, -3 }, /* (116) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
- { 328, -1 }, /* (117) retention_list ::= retention */
- { 328, -3 }, /* (118) retention_list ::= retention_list NK_COMMA retention */
- { 330, -3 }, /* (119) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
- { 309, -9 }, /* (120) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
- { 309, -3 }, /* (121) cmd ::= CREATE TABLE multi_create_clause */
- { 309, -9 }, /* (122) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
- { 309, -3 }, /* (123) cmd ::= DROP TABLE multi_drop_clause */
- { 309, -4 }, /* (124) cmd ::= DROP STABLE exists_opt full_table_name */
- { 309, -3 }, /* (125) cmd ::= ALTER TABLE alter_table_clause */
- { 309, -3 }, /* (126) cmd ::= ALTER STABLE alter_table_clause */
- { 338, -2 }, /* (127) alter_table_clause ::= full_table_name alter_table_options */
- { 338, -5 }, /* (128) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
- { 338, -4 }, /* (129) alter_table_clause ::= full_table_name DROP COLUMN column_name */
- { 338, -5 }, /* (130) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
- { 338, -5 }, /* (131) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
- { 338, -5 }, /* (132) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
- { 338, -4 }, /* (133) alter_table_clause ::= full_table_name DROP TAG column_name */
- { 338, -5 }, /* (134) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
- { 338, -5 }, /* (135) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
- { 338, -6 }, /* (136) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
- { 335, -1 }, /* (137) multi_create_clause ::= create_subtable_clause */
- { 335, -2 }, /* (138) multi_create_clause ::= multi_create_clause create_subtable_clause */
- { 343, -10 }, /* (139) 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 */
- { 337, -1 }, /* (140) multi_drop_clause ::= drop_table_clause */
- { 337, -2 }, /* (141) multi_drop_clause ::= multi_drop_clause drop_table_clause */
- { 346, -2 }, /* (142) drop_table_clause ::= exists_opt full_table_name */
- { 344, 0 }, /* (143) specific_cols_opt ::= */
- { 344, -3 }, /* (144) specific_cols_opt ::= NK_LP col_name_list NK_RP */
- { 331, -1 }, /* (145) full_table_name ::= table_name */
- { 331, -3 }, /* (146) full_table_name ::= db_name NK_DOT table_name */
- { 332, -1 }, /* (147) column_def_list ::= column_def */
- { 332, -3 }, /* (148) column_def_list ::= column_def_list NK_COMMA column_def */
- { 349, -2 }, /* (149) column_def ::= column_name type_name */
- { 349, -4 }, /* (150) column_def ::= column_name type_name COMMENT NK_STRING */
- { 341, -1 }, /* (151) type_name ::= BOOL */
- { 341, -1 }, /* (152) type_name ::= TINYINT */
- { 341, -1 }, /* (153) type_name ::= SMALLINT */
- { 341, -1 }, /* (154) type_name ::= INT */
- { 341, -1 }, /* (155) type_name ::= INTEGER */
- { 341, -1 }, /* (156) type_name ::= BIGINT */
- { 341, -1 }, /* (157) type_name ::= FLOAT */
- { 341, -1 }, /* (158) type_name ::= DOUBLE */
- { 341, -4 }, /* (159) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
- { 341, -1 }, /* (160) type_name ::= TIMESTAMP */
- { 341, -4 }, /* (161) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
- { 341, -2 }, /* (162) type_name ::= TINYINT UNSIGNED */
- { 341, -2 }, /* (163) type_name ::= SMALLINT UNSIGNED */
- { 341, -2 }, /* (164) type_name ::= INT UNSIGNED */
- { 341, -2 }, /* (165) type_name ::= BIGINT UNSIGNED */
- { 341, -1 }, /* (166) type_name ::= JSON */
- { 341, -4 }, /* (167) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
- { 341, -1 }, /* (168) type_name ::= MEDIUMBLOB */
- { 341, -1 }, /* (169) type_name ::= BLOB */
- { 341, -4 }, /* (170) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
- { 341, -1 }, /* (171) type_name ::= DECIMAL */
- { 341, -4 }, /* (172) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
- { 341, -6 }, /* (173) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
- { 333, 0 }, /* (174) tags_def_opt ::= */
- { 333, -1 }, /* (175) tags_def_opt ::= tags_def */
- { 336, -4 }, /* (176) tags_def ::= TAGS NK_LP column_def_list NK_RP */
- { 334, 0 }, /* (177) table_options ::= */
- { 334, -3 }, /* (178) table_options ::= table_options COMMENT NK_STRING */
- { 334, -3 }, /* (179) table_options ::= table_options MAX_DELAY duration_list */
- { 334, -3 }, /* (180) table_options ::= table_options WATERMARK duration_list */
- { 334, -5 }, /* (181) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
- { 334, -3 }, /* (182) table_options ::= table_options TTL NK_INTEGER */
- { 334, -5 }, /* (183) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
- { 339, -1 }, /* (184) alter_table_options ::= alter_table_option */
- { 339, -2 }, /* (185) alter_table_options ::= alter_table_options alter_table_option */
- { 352, -2 }, /* (186) alter_table_option ::= COMMENT NK_STRING */
- { 352, -2 }, /* (187) alter_table_option ::= TTL NK_INTEGER */
- { 350, -1 }, /* (188) duration_list ::= duration_literal */
- { 350, -3 }, /* (189) duration_list ::= duration_list NK_COMMA duration_literal */
- { 351, -1 }, /* (190) rollup_func_list ::= rollup_func_name */
- { 351, -3 }, /* (191) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
- { 354, -1 }, /* (192) rollup_func_name ::= function_name */
- { 354, -1 }, /* (193) rollup_func_name ::= FIRST */
- { 354, -1 }, /* (194) rollup_func_name ::= LAST */
- { 347, -1 }, /* (195) col_name_list ::= col_name */
- { 347, -3 }, /* (196) col_name_list ::= col_name_list NK_COMMA col_name */
- { 356, -1 }, /* (197) col_name ::= column_name */
- { 309, -2 }, /* (198) cmd ::= SHOW DNODES */
- { 309, -2 }, /* (199) cmd ::= SHOW USERS */
- { 309, -2 }, /* (200) cmd ::= SHOW DATABASES */
- { 309, -4 }, /* (201) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
- { 309, -4 }, /* (202) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
- { 309, -3 }, /* (203) cmd ::= SHOW db_name_cond_opt VGROUPS */
- { 309, -2 }, /* (204) cmd ::= SHOW MNODES */
- { 309, -2 }, /* (205) cmd ::= SHOW MODULES */
- { 309, -2 }, /* (206) cmd ::= SHOW QNODES */
- { 309, -2 }, /* (207) cmd ::= SHOW FUNCTIONS */
- { 309, -5 }, /* (208) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
- { 309, -2 }, /* (209) cmd ::= SHOW STREAMS */
- { 309, -2 }, /* (210) cmd ::= SHOW ACCOUNTS */
- { 309, -2 }, /* (211) cmd ::= SHOW APPS */
- { 309, -2 }, /* (212) cmd ::= SHOW CONNECTIONS */
- { 309, -2 }, /* (213) cmd ::= SHOW LICENCES */
- { 309, -2 }, /* (214) cmd ::= SHOW GRANTS */
- { 309, -4 }, /* (215) cmd ::= SHOW CREATE DATABASE db_name */
- { 309, -4 }, /* (216) cmd ::= SHOW CREATE TABLE full_table_name */
- { 309, -4 }, /* (217) cmd ::= SHOW CREATE STABLE full_table_name */
- { 309, -2 }, /* (218) cmd ::= SHOW QUERIES */
- { 309, -2 }, /* (219) cmd ::= SHOW SCORES */
- { 309, -2 }, /* (220) cmd ::= SHOW TOPICS */
- { 309, -2 }, /* (221) cmd ::= SHOW VARIABLES */
- { 309, -3 }, /* (222) cmd ::= SHOW LOCAL VARIABLES */
- { 309, -4 }, /* (223) cmd ::= SHOW DNODE NK_INTEGER VARIABLES */
- { 309, -2 }, /* (224) cmd ::= SHOW BNODES */
- { 309, -2 }, /* (225) cmd ::= SHOW SNODES */
- { 309, -2 }, /* (226) cmd ::= SHOW CLUSTER */
- { 309, -2 }, /* (227) cmd ::= SHOW TRANSACTIONS */
- { 309, -4 }, /* (228) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
- { 309, -2 }, /* (229) cmd ::= SHOW CONSUMERS */
- { 309, -2 }, /* (230) cmd ::= SHOW SUBSCRIPTIONS */
- { 309, -5 }, /* (231) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
- { 309, -3 }, /* (232) cmd ::= SHOW VNODES NK_INTEGER */
- { 309, -3 }, /* (233) cmd ::= SHOW VNODES NK_STRING */
- { 357, 0 }, /* (234) db_name_cond_opt ::= */
- { 357, -2 }, /* (235) db_name_cond_opt ::= db_name NK_DOT */
- { 358, 0 }, /* (236) like_pattern_opt ::= */
- { 358, -2 }, /* (237) like_pattern_opt ::= LIKE NK_STRING */
- { 359, -1 }, /* (238) table_name_cond ::= table_name */
- { 360, 0 }, /* (239) from_db_opt ::= */
- { 360, -2 }, /* (240) from_db_opt ::= FROM db_name */
- { 309, -8 }, /* (241) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */
- { 309, -4 }, /* (242) cmd ::= DROP INDEX exists_opt full_table_name */
- { 361, -10 }, /* (243) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
- { 361, -12 }, /* (244) 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 */
- { 362, -1 }, /* (245) func_list ::= func */
- { 362, -3 }, /* (246) func_list ::= func_list NK_COMMA func */
- { 365, -4 }, /* (247) func ::= function_name NK_LP expression_list NK_RP */
- { 364, 0 }, /* (248) sma_stream_opt ::= */
- { 364, -3 }, /* (249) sma_stream_opt ::= stream_options WATERMARK duration_literal */
- { 364, -3 }, /* (250) sma_stream_opt ::= stream_options MAX_DELAY duration_literal */
- { 309, -6 }, /* (251) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
- { 309, -7 }, /* (252) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
- { 309, -9 }, /* (253) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
- { 309, -7 }, /* (254) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
- { 309, -9 }, /* (255) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
- { 309, -4 }, /* (256) cmd ::= DROP TOPIC exists_opt topic_name */
- { 309, -7 }, /* (257) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
- { 309, -2 }, /* (258) cmd ::= DESC full_table_name */
- { 309, -2 }, /* (259) cmd ::= DESCRIBE full_table_name */
- { 309, -3 }, /* (260) cmd ::= RESET QUERY CACHE */
- { 309, -4 }, /* (261) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
- { 370, 0 }, /* (262) analyze_opt ::= */
- { 370, -1 }, /* (263) analyze_opt ::= ANALYZE */
- { 371, 0 }, /* (264) explain_options ::= */
- { 371, -3 }, /* (265) explain_options ::= explain_options VERBOSE NK_BOOL */
- { 371, -3 }, /* (266) explain_options ::= explain_options RATIO NK_FLOAT */
- { 309, -10 }, /* (267) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
- { 309, -4 }, /* (268) cmd ::= DROP FUNCTION exists_opt function_name */
- { 372, 0 }, /* (269) agg_func_opt ::= */
- { 372, -1 }, /* (270) agg_func_opt ::= AGGREGATE */
- { 373, 0 }, /* (271) bufsize_opt ::= */
- { 373, -2 }, /* (272) bufsize_opt ::= BUFSIZE NK_INTEGER */
- { 309, -9 }, /* (273) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name AS query_or_subquery */
- { 309, -4 }, /* (274) cmd ::= DROP STREAM exists_opt stream_name */
- { 366, 0 }, /* (275) stream_options ::= */
- { 366, -3 }, /* (276) stream_options ::= stream_options TRIGGER AT_ONCE */
- { 366, -3 }, /* (277) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
- { 366, -4 }, /* (278) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
- { 366, -3 }, /* (279) stream_options ::= stream_options WATERMARK duration_literal */
- { 366, -4 }, /* (280) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
- { 309, -3 }, /* (281) cmd ::= KILL CONNECTION NK_INTEGER */
- { 309, -3 }, /* (282) cmd ::= KILL QUERY NK_STRING */
- { 309, -3 }, /* (283) cmd ::= KILL TRANSACTION NK_INTEGER */
- { 309, -2 }, /* (284) cmd ::= BALANCE VGROUP */
- { 309, -4 }, /* (285) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
- { 309, -4 }, /* (286) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
- { 309, -3 }, /* (287) cmd ::= SPLIT VGROUP NK_INTEGER */
- { 375, -2 }, /* (288) dnode_list ::= DNODE NK_INTEGER */
- { 375, -3 }, /* (289) dnode_list ::= dnode_list DNODE NK_INTEGER */
- { 309, -4 }, /* (290) cmd ::= DELETE FROM full_table_name where_clause_opt */
- { 309, -1 }, /* (291) cmd ::= query_or_subquery */
- { 309, -7 }, /* (292) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
- { 309, -4 }, /* (293) cmd ::= INSERT INTO full_table_name query_or_subquery */
- { 312, -1 }, /* (294) literal ::= NK_INTEGER */
- { 312, -1 }, /* (295) literal ::= NK_FLOAT */
- { 312, -1 }, /* (296) literal ::= NK_STRING */
- { 312, -1 }, /* (297) literal ::= NK_BOOL */
- { 312, -2 }, /* (298) literal ::= TIMESTAMP NK_STRING */
- { 312, -1 }, /* (299) literal ::= duration_literal */
- { 312, -1 }, /* (300) literal ::= NULL */
- { 312, -1 }, /* (301) literal ::= NK_QUESTION */
- { 353, -1 }, /* (302) duration_literal ::= NK_VARIABLE */
- { 377, -1 }, /* (303) signed ::= NK_INTEGER */
- { 377, -2 }, /* (304) signed ::= NK_PLUS NK_INTEGER */
- { 377, -2 }, /* (305) signed ::= NK_MINUS NK_INTEGER */
- { 377, -1 }, /* (306) signed ::= NK_FLOAT */
- { 377, -2 }, /* (307) signed ::= NK_PLUS NK_FLOAT */
- { 377, -2 }, /* (308) signed ::= NK_MINUS NK_FLOAT */
- { 342, -1 }, /* (309) signed_literal ::= signed */
- { 342, -1 }, /* (310) signed_literal ::= NK_STRING */
- { 342, -1 }, /* (311) signed_literal ::= NK_BOOL */
- { 342, -2 }, /* (312) signed_literal ::= TIMESTAMP NK_STRING */
- { 342, -1 }, /* (313) signed_literal ::= duration_literal */
- { 342, -1 }, /* (314) signed_literal ::= NULL */
- { 342, -1 }, /* (315) signed_literal ::= literal_func */
- { 342, -1 }, /* (316) signed_literal ::= NK_QUESTION */
- { 379, -1 }, /* (317) literal_list ::= signed_literal */
- { 379, -3 }, /* (318) literal_list ::= literal_list NK_COMMA signed_literal */
- { 320, -1 }, /* (319) db_name ::= NK_ID */
- { 348, -1 }, /* (320) table_name ::= NK_ID */
- { 340, -1 }, /* (321) column_name ::= NK_ID */
- { 355, -1 }, /* (322) function_name ::= NK_ID */
- { 380, -1 }, /* (323) table_alias ::= NK_ID */
- { 381, -1 }, /* (324) column_alias ::= NK_ID */
- { 314, -1 }, /* (325) user_name ::= NK_ID */
- { 367, -1 }, /* (326) topic_name ::= NK_ID */
- { 374, -1 }, /* (327) stream_name ::= NK_ID */
- { 369, -1 }, /* (328) cgroup_name ::= NK_ID */
- { 382, -1 }, /* (329) expression ::= literal */
- { 382, -1 }, /* (330) expression ::= pseudo_column */
- { 382, -1 }, /* (331) expression ::= column_reference */
- { 382, -1 }, /* (332) expression ::= function_expression */
- { 382, -1 }, /* (333) expression ::= subquery */
- { 382, -3 }, /* (334) expression ::= NK_LP expression NK_RP */
- { 382, -2 }, /* (335) expression ::= NK_PLUS expression */
- { 382, -2 }, /* (336) expression ::= NK_MINUS expression */
- { 382, -3 }, /* (337) expression ::= expression NK_PLUS expression */
- { 382, -3 }, /* (338) expression ::= expression NK_MINUS expression */
- { 382, -3 }, /* (339) expression ::= expression NK_STAR expression */
- { 382, -3 }, /* (340) expression ::= expression NK_SLASH expression */
- { 382, -3 }, /* (341) expression ::= expression NK_REM expression */
- { 382, -3 }, /* (342) expression ::= column_reference NK_ARROW NK_STRING */
- { 382, -3 }, /* (343) expression ::= expression NK_BITAND expression */
- { 382, -3 }, /* (344) expression ::= expression NK_BITOR expression */
- { 345, -1 }, /* (345) expression_list ::= expression */
- { 345, -3 }, /* (346) expression_list ::= expression_list NK_COMMA expression */
- { 384, -1 }, /* (347) column_reference ::= column_name */
- { 384, -3 }, /* (348) column_reference ::= table_name NK_DOT column_name */
- { 383, -1 }, /* (349) pseudo_column ::= ROWTS */
- { 383, -1 }, /* (350) pseudo_column ::= TBNAME */
- { 383, -3 }, /* (351) pseudo_column ::= table_name NK_DOT TBNAME */
- { 383, -1 }, /* (352) pseudo_column ::= QSTART */
- { 383, -1 }, /* (353) pseudo_column ::= QEND */
- { 383, -1 }, /* (354) pseudo_column ::= QDURATION */
- { 383, -1 }, /* (355) pseudo_column ::= WSTART */
- { 383, -1 }, /* (356) pseudo_column ::= WEND */
- { 383, -1 }, /* (357) pseudo_column ::= WDURATION */
- { 385, -4 }, /* (358) function_expression ::= function_name NK_LP expression_list NK_RP */
- { 385, -4 }, /* (359) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
- { 385, -6 }, /* (360) function_expression ::= CAST NK_LP expression AS type_name NK_RP */
- { 385, -1 }, /* (361) function_expression ::= literal_func */
- { 378, -3 }, /* (362) literal_func ::= noarg_func NK_LP NK_RP */
- { 378, -1 }, /* (363) literal_func ::= NOW */
- { 389, -1 }, /* (364) noarg_func ::= NOW */
- { 389, -1 }, /* (365) noarg_func ::= TODAY */
- { 389, -1 }, /* (366) noarg_func ::= TIMEZONE */
- { 389, -1 }, /* (367) noarg_func ::= DATABASE */
- { 389, -1 }, /* (368) noarg_func ::= CLIENT_VERSION */
- { 389, -1 }, /* (369) noarg_func ::= SERVER_VERSION */
- { 389, -1 }, /* (370) noarg_func ::= SERVER_STATUS */
- { 389, -1 }, /* (371) noarg_func ::= CURRENT_USER */
- { 389, -1 }, /* (372) noarg_func ::= USER */
- { 387, -1 }, /* (373) star_func ::= COUNT */
- { 387, -1 }, /* (374) star_func ::= FIRST */
- { 387, -1 }, /* (375) star_func ::= LAST */
- { 387, -1 }, /* (376) star_func ::= LAST_ROW */
- { 388, -1 }, /* (377) star_func_para_list ::= NK_STAR */
- { 388, -1 }, /* (378) star_func_para_list ::= other_para_list */
- { 390, -1 }, /* (379) other_para_list ::= star_func_para */
- { 390, -3 }, /* (380) other_para_list ::= other_para_list NK_COMMA star_func_para */
- { 391, -1 }, /* (381) star_func_para ::= expression */
- { 391, -3 }, /* (382) star_func_para ::= table_name NK_DOT NK_STAR */
- { 392, -3 }, /* (383) predicate ::= expression compare_op expression */
- { 392, -5 }, /* (384) predicate ::= expression BETWEEN expression AND expression */
- { 392, -6 }, /* (385) predicate ::= expression NOT BETWEEN expression AND expression */
- { 392, -3 }, /* (386) predicate ::= expression IS NULL */
- { 392, -4 }, /* (387) predicate ::= expression IS NOT NULL */
- { 392, -3 }, /* (388) predicate ::= expression in_op in_predicate_value */
- { 393, -1 }, /* (389) compare_op ::= NK_LT */
- { 393, -1 }, /* (390) compare_op ::= NK_GT */
- { 393, -1 }, /* (391) compare_op ::= NK_LE */
- { 393, -1 }, /* (392) compare_op ::= NK_GE */
- { 393, -1 }, /* (393) compare_op ::= NK_NE */
- { 393, -1 }, /* (394) compare_op ::= NK_EQ */
- { 393, -1 }, /* (395) compare_op ::= LIKE */
- { 393, -2 }, /* (396) compare_op ::= NOT LIKE */
- { 393, -1 }, /* (397) compare_op ::= MATCH */
- { 393, -1 }, /* (398) compare_op ::= NMATCH */
- { 393, -1 }, /* (399) compare_op ::= CONTAINS */
- { 394, -1 }, /* (400) in_op ::= IN */
- { 394, -2 }, /* (401) in_op ::= NOT IN */
- { 395, -3 }, /* (402) in_predicate_value ::= NK_LP literal_list NK_RP */
- { 396, -1 }, /* (403) boolean_value_expression ::= boolean_primary */
- { 396, -2 }, /* (404) boolean_value_expression ::= NOT boolean_primary */
- { 396, -3 }, /* (405) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
- { 396, -3 }, /* (406) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
- { 397, -1 }, /* (407) boolean_primary ::= predicate */
- { 397, -3 }, /* (408) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
- { 398, -1 }, /* (409) common_expression ::= expression */
- { 398, -1 }, /* (410) common_expression ::= boolean_value_expression */
- { 399, 0 }, /* (411) from_clause_opt ::= */
- { 399, -2 }, /* (412) from_clause_opt ::= FROM table_reference_list */
- { 400, -1 }, /* (413) table_reference_list ::= table_reference */
- { 400, -3 }, /* (414) table_reference_list ::= table_reference_list NK_COMMA table_reference */
- { 401, -1 }, /* (415) table_reference ::= table_primary */
- { 401, -1 }, /* (416) table_reference ::= joined_table */
- { 402, -2 }, /* (417) table_primary ::= table_name alias_opt */
- { 402, -4 }, /* (418) table_primary ::= db_name NK_DOT table_name alias_opt */
- { 402, -2 }, /* (419) table_primary ::= subquery alias_opt */
- { 402, -1 }, /* (420) table_primary ::= parenthesized_joined_table */
- { 404, 0 }, /* (421) alias_opt ::= */
- { 404, -1 }, /* (422) alias_opt ::= table_alias */
- { 404, -2 }, /* (423) alias_opt ::= AS table_alias */
- { 405, -3 }, /* (424) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
- { 405, -3 }, /* (425) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
- { 403, -6 }, /* (426) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
- { 406, 0 }, /* (427) join_type ::= */
- { 406, -1 }, /* (428) join_type ::= INNER */
- { 408, -12 }, /* (429) 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 */
- { 409, 0 }, /* (430) set_quantifier_opt ::= */
- { 409, -1 }, /* (431) set_quantifier_opt ::= DISTINCT */
- { 409, -1 }, /* (432) set_quantifier_opt ::= ALL */
- { 410, -1 }, /* (433) select_list ::= select_item */
- { 410, -3 }, /* (434) select_list ::= select_list NK_COMMA select_item */
- { 418, -1 }, /* (435) select_item ::= NK_STAR */
- { 418, -1 }, /* (436) select_item ::= common_expression */
- { 418, -2 }, /* (437) select_item ::= common_expression column_alias */
- { 418, -3 }, /* (438) select_item ::= common_expression AS column_alias */
- { 418, -3 }, /* (439) select_item ::= table_name NK_DOT NK_STAR */
- { 376, 0 }, /* (440) where_clause_opt ::= */
- { 376, -2 }, /* (441) where_clause_opt ::= WHERE search_condition */
- { 411, 0 }, /* (442) partition_by_clause_opt ::= */
- { 411, -3 }, /* (443) partition_by_clause_opt ::= PARTITION BY expression_list */
- { 415, 0 }, /* (444) twindow_clause_opt ::= */
- { 415, -6 }, /* (445) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
- { 415, -4 }, /* (446) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */
- { 415, -6 }, /* (447) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
- { 415, -8 }, /* (448) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
- { 363, 0 }, /* (449) sliding_opt ::= */
- { 363, -4 }, /* (450) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
- { 414, 0 }, /* (451) fill_opt ::= */
- { 414, -4 }, /* (452) fill_opt ::= FILL NK_LP fill_mode NK_RP */
- { 414, -6 }, /* (453) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
- { 419, -1 }, /* (454) fill_mode ::= NONE */
- { 419, -1 }, /* (455) fill_mode ::= PREV */
- { 419, -1 }, /* (456) fill_mode ::= NULL */
- { 419, -1 }, /* (457) fill_mode ::= LINEAR */
- { 419, -1 }, /* (458) fill_mode ::= NEXT */
- { 416, 0 }, /* (459) group_by_clause_opt ::= */
- { 416, -3 }, /* (460) group_by_clause_opt ::= GROUP BY group_by_list */
- { 420, -1 }, /* (461) group_by_list ::= expression */
- { 420, -3 }, /* (462) group_by_list ::= group_by_list NK_COMMA expression */
- { 417, 0 }, /* (463) having_clause_opt ::= */
- { 417, -2 }, /* (464) having_clause_opt ::= HAVING search_condition */
- { 412, 0 }, /* (465) range_opt ::= */
- { 412, -6 }, /* (466) range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */
- { 413, 0 }, /* (467) every_opt ::= */
- { 413, -4 }, /* (468) every_opt ::= EVERY NK_LP duration_literal NK_RP */
- { 421, -4 }, /* (469) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
- { 422, -1 }, /* (470) query_simple ::= query_specification */
- { 422, -1 }, /* (471) query_simple ::= union_query_expression */
- { 426, -4 }, /* (472) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
- { 426, -3 }, /* (473) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
- { 427, -1 }, /* (474) query_simple_or_subquery ::= query_simple */
- { 427, -1 }, /* (475) query_simple_or_subquery ::= subquery */
- { 368, -1 }, /* (476) query_or_subquery ::= query_expression */
- { 368, -1 }, /* (477) query_or_subquery ::= subquery */
- { 423, 0 }, /* (478) order_by_clause_opt ::= */
- { 423, -3 }, /* (479) order_by_clause_opt ::= ORDER BY sort_specification_list */
- { 424, 0 }, /* (480) slimit_clause_opt ::= */
- { 424, -2 }, /* (481) slimit_clause_opt ::= SLIMIT NK_INTEGER */
- { 424, -4 }, /* (482) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
- { 424, -4 }, /* (483) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
- { 425, 0 }, /* (484) limit_clause_opt ::= */
- { 425, -2 }, /* (485) limit_clause_opt ::= LIMIT NK_INTEGER */
- { 425, -4 }, /* (486) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
- { 425, -4 }, /* (487) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
- { 386, -3 }, /* (488) subquery ::= NK_LP query_expression NK_RP */
- { 407, -1 }, /* (489) search_condition ::= common_expression */
- { 428, -1 }, /* (490) sort_specification_list ::= sort_specification */
- { 428, -3 }, /* (491) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
- { 429, -3 }, /* (492) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
- { 430, 0 }, /* (493) ordering_specification_opt ::= */
- { 430, -1 }, /* (494) ordering_specification_opt ::= ASC */
- { 430, -1 }, /* (495) ordering_specification_opt ::= DESC */
- { 431, 0 }, /* (496) null_ordering_opt ::= */
- { 431, -2 }, /* (497) null_ordering_opt ::= NULLS FIRST */
- { 431, -2 }, /* (498) null_ordering_opt ::= NULLS LAST */
+ { 313, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
+ { 313, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
+ { 314, 0 }, /* (2) account_options ::= */
+ { 314, -3 }, /* (3) account_options ::= account_options PPS literal */
+ { 314, -3 }, /* (4) account_options ::= account_options TSERIES literal */
+ { 314, -3 }, /* (5) account_options ::= account_options STORAGE literal */
+ { 314, -3 }, /* (6) account_options ::= account_options STREAMS literal */
+ { 314, -3 }, /* (7) account_options ::= account_options QTIME literal */
+ { 314, -3 }, /* (8) account_options ::= account_options DBS literal */
+ { 314, -3 }, /* (9) account_options ::= account_options USERS literal */
+ { 314, -3 }, /* (10) account_options ::= account_options CONNS literal */
+ { 314, -3 }, /* (11) account_options ::= account_options STATE literal */
+ { 315, -1 }, /* (12) alter_account_options ::= alter_account_option */
+ { 315, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */
+ { 317, -2 }, /* (14) alter_account_option ::= PASS literal */
+ { 317, -2 }, /* (15) alter_account_option ::= PPS literal */
+ { 317, -2 }, /* (16) alter_account_option ::= TSERIES literal */
+ { 317, -2 }, /* (17) alter_account_option ::= STORAGE literal */
+ { 317, -2 }, /* (18) alter_account_option ::= STREAMS literal */
+ { 317, -2 }, /* (19) alter_account_option ::= QTIME literal */
+ { 317, -2 }, /* (20) alter_account_option ::= DBS literal */
+ { 317, -2 }, /* (21) alter_account_option ::= USERS literal */
+ { 317, -2 }, /* (22) alter_account_option ::= CONNS literal */
+ { 317, -2 }, /* (23) alter_account_option ::= STATE literal */
+ { 313, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
+ { 313, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
+ { 313, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
+ { 313, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
+ { 313, -3 }, /* (28) cmd ::= DROP USER user_name */
+ { 319, 0 }, /* (29) sysinfo_opt ::= */
+ { 319, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */
+ { 313, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */
+ { 313, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */
+ { 320, -1 }, /* (33) privileges ::= ALL */
+ { 320, -1 }, /* (34) privileges ::= priv_type_list */
+ { 322, -1 }, /* (35) priv_type_list ::= priv_type */
+ { 322, -3 }, /* (36) priv_type_list ::= priv_type_list NK_COMMA priv_type */
+ { 323, -1 }, /* (37) priv_type ::= READ */
+ { 323, -1 }, /* (38) priv_type ::= WRITE */
+ { 321, -3 }, /* (39) priv_level ::= NK_STAR NK_DOT NK_STAR */
+ { 321, -3 }, /* (40) priv_level ::= db_name NK_DOT NK_STAR */
+ { 313, -3 }, /* (41) cmd ::= CREATE DNODE dnode_endpoint */
+ { 313, -5 }, /* (42) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
+ { 313, -3 }, /* (43) cmd ::= DROP DNODE NK_INTEGER */
+ { 313, -3 }, /* (44) cmd ::= DROP DNODE dnode_endpoint */
+ { 313, -4 }, /* (45) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
+ { 313, -5 }, /* (46) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
+ { 313, -4 }, /* (47) cmd ::= ALTER ALL DNODES NK_STRING */
+ { 313, -5 }, /* (48) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
+ { 325, -1 }, /* (49) dnode_endpoint ::= NK_STRING */
+ { 325, -1 }, /* (50) dnode_endpoint ::= NK_ID */
+ { 325, -1 }, /* (51) dnode_endpoint ::= NK_IPTOKEN */
+ { 313, -3 }, /* (52) cmd ::= ALTER LOCAL NK_STRING */
+ { 313, -4 }, /* (53) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
+ { 313, -5 }, /* (54) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
+ { 313, -5 }, /* (55) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
+ { 313, -5 }, /* (56) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
+ { 313, -5 }, /* (57) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
+ { 313, -5 }, /* (58) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
+ { 313, -5 }, /* (59) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
+ { 313, -5 }, /* (60) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
+ { 313, -5 }, /* (61) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
+ { 313, -5 }, /* (62) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
+ { 313, -4 }, /* (63) cmd ::= DROP DATABASE exists_opt db_name */
+ { 313, -2 }, /* (64) cmd ::= USE db_name */
+ { 313, -4 }, /* (65) cmd ::= ALTER DATABASE db_name alter_db_options */
+ { 313, -3 }, /* (66) cmd ::= FLUSH DATABASE db_name */
+ { 313, -3 }, /* (67) cmd ::= TRIM DATABASE db_name */
+ { 326, -3 }, /* (68) not_exists_opt ::= IF NOT EXISTS */
+ { 326, 0 }, /* (69) not_exists_opt ::= */
+ { 328, -2 }, /* (70) exists_opt ::= IF EXISTS */
+ { 328, 0 }, /* (71) exists_opt ::= */
+ { 327, 0 }, /* (72) db_options ::= */
+ { 327, -3 }, /* (73) db_options ::= db_options BUFFER NK_INTEGER */
+ { 327, -3 }, /* (74) db_options ::= db_options CACHEMODEL NK_STRING */
+ { 327, -3 }, /* (75) db_options ::= db_options CACHESIZE NK_INTEGER */
+ { 327, -3 }, /* (76) db_options ::= db_options COMP NK_INTEGER */
+ { 327, -3 }, /* (77) db_options ::= db_options DURATION NK_INTEGER */
+ { 327, -3 }, /* (78) db_options ::= db_options DURATION NK_VARIABLE */
+ { 327, -3 }, /* (79) db_options ::= db_options MAXROWS NK_INTEGER */
+ { 327, -3 }, /* (80) db_options ::= db_options MINROWS NK_INTEGER */
+ { 327, -3 }, /* (81) db_options ::= db_options KEEP integer_list */
+ { 327, -3 }, /* (82) db_options ::= db_options KEEP variable_list */
+ { 327, -3 }, /* (83) db_options ::= db_options PAGES NK_INTEGER */
+ { 327, -3 }, /* (84) db_options ::= db_options PAGESIZE NK_INTEGER */
+ { 327, -3 }, /* (85) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
+ { 327, -3 }, /* (86) db_options ::= db_options PRECISION NK_STRING */
+ { 327, -3 }, /* (87) db_options ::= db_options REPLICA NK_INTEGER */
+ { 327, -3 }, /* (88) db_options ::= db_options STRICT NK_STRING */
+ { 327, -3 }, /* (89) db_options ::= db_options VGROUPS NK_INTEGER */
+ { 327, -3 }, /* (90) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
+ { 327, -3 }, /* (91) db_options ::= db_options RETENTIONS retention_list */
+ { 327, -3 }, /* (92) db_options ::= db_options SCHEMALESS NK_INTEGER */
+ { 327, -3 }, /* (93) db_options ::= db_options WAL_LEVEL NK_INTEGER */
+ { 327, -3 }, /* (94) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
+ { 327, -3 }, /* (95) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
+ { 327, -4 }, /* (96) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
+ { 327, -3 }, /* (97) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
+ { 327, -4 }, /* (98) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
+ { 327, -3 }, /* (99) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
+ { 327, -3 }, /* (100) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
+ { 327, -3 }, /* (101) db_options ::= db_options STT_TRIGGER NK_INTEGER */
+ { 327, -3 }, /* (102) db_options ::= db_options TABLE_PREFIX NK_INTEGER */
+ { 327, -3 }, /* (103) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */
+ { 329, -1 }, /* (104) alter_db_options ::= alter_db_option */
+ { 329, -2 }, /* (105) alter_db_options ::= alter_db_options alter_db_option */
+ { 333, -2 }, /* (106) alter_db_option ::= CACHEMODEL NK_STRING */
+ { 333, -2 }, /* (107) alter_db_option ::= CACHESIZE NK_INTEGER */
+ { 333, -2 }, /* (108) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
+ { 333, -2 }, /* (109) alter_db_option ::= KEEP integer_list */
+ { 333, -2 }, /* (110) alter_db_option ::= KEEP variable_list */
+ { 333, -2 }, /* (111) alter_db_option ::= WAL_LEVEL NK_INTEGER */
+ { 333, -2 }, /* (112) alter_db_option ::= STT_TRIGGER NK_INTEGER */
+ { 330, -1 }, /* (113) integer_list ::= NK_INTEGER */
+ { 330, -3 }, /* (114) integer_list ::= integer_list NK_COMMA NK_INTEGER */
+ { 331, -1 }, /* (115) variable_list ::= NK_VARIABLE */
+ { 331, -3 }, /* (116) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
+ { 332, -1 }, /* (117) retention_list ::= retention */
+ { 332, -3 }, /* (118) retention_list ::= retention_list NK_COMMA retention */
+ { 334, -3 }, /* (119) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
+ { 313, -9 }, /* (120) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
+ { 313, -3 }, /* (121) cmd ::= CREATE TABLE multi_create_clause */
+ { 313, -9 }, /* (122) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
+ { 313, -3 }, /* (123) cmd ::= DROP TABLE multi_drop_clause */
+ { 313, -4 }, /* (124) cmd ::= DROP STABLE exists_opt full_table_name */
+ { 313, -3 }, /* (125) cmd ::= ALTER TABLE alter_table_clause */
+ { 313, -3 }, /* (126) cmd ::= ALTER STABLE alter_table_clause */
+ { 342, -2 }, /* (127) alter_table_clause ::= full_table_name alter_table_options */
+ { 342, -5 }, /* (128) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
+ { 342, -4 }, /* (129) alter_table_clause ::= full_table_name DROP COLUMN column_name */
+ { 342, -5 }, /* (130) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
+ { 342, -5 }, /* (131) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
+ { 342, -5 }, /* (132) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
+ { 342, -4 }, /* (133) alter_table_clause ::= full_table_name DROP TAG column_name */
+ { 342, -5 }, /* (134) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
+ { 342, -5 }, /* (135) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
+ { 342, -6 }, /* (136) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
+ { 339, -1 }, /* (137) multi_create_clause ::= create_subtable_clause */
+ { 339, -2 }, /* (138) multi_create_clause ::= multi_create_clause create_subtable_clause */
+ { 347, -10 }, /* (139) 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 */
+ { 341, -1 }, /* (140) multi_drop_clause ::= drop_table_clause */
+ { 341, -2 }, /* (141) multi_drop_clause ::= multi_drop_clause drop_table_clause */
+ { 350, -2 }, /* (142) drop_table_clause ::= exists_opt full_table_name */
+ { 348, 0 }, /* (143) specific_cols_opt ::= */
+ { 348, -3 }, /* (144) specific_cols_opt ::= NK_LP col_name_list NK_RP */
+ { 335, -1 }, /* (145) full_table_name ::= table_name */
+ { 335, -3 }, /* (146) full_table_name ::= db_name NK_DOT table_name */
+ { 336, -1 }, /* (147) column_def_list ::= column_def */
+ { 336, -3 }, /* (148) column_def_list ::= column_def_list NK_COMMA column_def */
+ { 353, -2 }, /* (149) column_def ::= column_name type_name */
+ { 353, -4 }, /* (150) column_def ::= column_name type_name COMMENT NK_STRING */
+ { 345, -1 }, /* (151) type_name ::= BOOL */
+ { 345, -1 }, /* (152) type_name ::= TINYINT */
+ { 345, -1 }, /* (153) type_name ::= SMALLINT */
+ { 345, -1 }, /* (154) type_name ::= INT */
+ { 345, -1 }, /* (155) type_name ::= INTEGER */
+ { 345, -1 }, /* (156) type_name ::= BIGINT */
+ { 345, -1 }, /* (157) type_name ::= FLOAT */
+ { 345, -1 }, /* (158) type_name ::= DOUBLE */
+ { 345, -4 }, /* (159) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
+ { 345, -1 }, /* (160) type_name ::= TIMESTAMP */
+ { 345, -4 }, /* (161) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
+ { 345, -2 }, /* (162) type_name ::= TINYINT UNSIGNED */
+ { 345, -2 }, /* (163) type_name ::= SMALLINT UNSIGNED */
+ { 345, -2 }, /* (164) type_name ::= INT UNSIGNED */
+ { 345, -2 }, /* (165) type_name ::= BIGINT UNSIGNED */
+ { 345, -1 }, /* (166) type_name ::= JSON */
+ { 345, -4 }, /* (167) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
+ { 345, -1 }, /* (168) type_name ::= MEDIUMBLOB */
+ { 345, -1 }, /* (169) type_name ::= BLOB */
+ { 345, -4 }, /* (170) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
+ { 345, -1 }, /* (171) type_name ::= DECIMAL */
+ { 345, -4 }, /* (172) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
+ { 345, -6 }, /* (173) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
+ { 337, 0 }, /* (174) tags_def_opt ::= */
+ { 337, -1 }, /* (175) tags_def_opt ::= tags_def */
+ { 340, -4 }, /* (176) tags_def ::= TAGS NK_LP column_def_list NK_RP */
+ { 338, 0 }, /* (177) table_options ::= */
+ { 338, -3 }, /* (178) table_options ::= table_options COMMENT NK_STRING */
+ { 338, -3 }, /* (179) table_options ::= table_options MAX_DELAY duration_list */
+ { 338, -3 }, /* (180) table_options ::= table_options WATERMARK duration_list */
+ { 338, -5 }, /* (181) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
+ { 338, -3 }, /* (182) table_options ::= table_options TTL NK_INTEGER */
+ { 338, -5 }, /* (183) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
+ { 343, -1 }, /* (184) alter_table_options ::= alter_table_option */
+ { 343, -2 }, /* (185) alter_table_options ::= alter_table_options alter_table_option */
+ { 356, -2 }, /* (186) alter_table_option ::= COMMENT NK_STRING */
+ { 356, -2 }, /* (187) alter_table_option ::= TTL NK_INTEGER */
+ { 354, -1 }, /* (188) duration_list ::= duration_literal */
+ { 354, -3 }, /* (189) duration_list ::= duration_list NK_COMMA duration_literal */
+ { 355, -1 }, /* (190) rollup_func_list ::= rollup_func_name */
+ { 355, -3 }, /* (191) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
+ { 358, -1 }, /* (192) rollup_func_name ::= function_name */
+ { 358, -1 }, /* (193) rollup_func_name ::= FIRST */
+ { 358, -1 }, /* (194) rollup_func_name ::= LAST */
+ { 351, -1 }, /* (195) col_name_list ::= col_name */
+ { 351, -3 }, /* (196) col_name_list ::= col_name_list NK_COMMA col_name */
+ { 360, -1 }, /* (197) col_name ::= column_name */
+ { 313, -2 }, /* (198) cmd ::= SHOW DNODES */
+ { 313, -2 }, /* (199) cmd ::= SHOW USERS */
+ { 313, -2 }, /* (200) cmd ::= SHOW DATABASES */
+ { 313, -4 }, /* (201) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
+ { 313, -4 }, /* (202) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
+ { 313, -3 }, /* (203) cmd ::= SHOW db_name_cond_opt VGROUPS */
+ { 313, -2 }, /* (204) cmd ::= SHOW MNODES */
+ { 313, -2 }, /* (205) cmd ::= SHOW MODULES */
+ { 313, -2 }, /* (206) cmd ::= SHOW QNODES */
+ { 313, -2 }, /* (207) cmd ::= SHOW FUNCTIONS */
+ { 313, -5 }, /* (208) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
+ { 313, -2 }, /* (209) cmd ::= SHOW STREAMS */
+ { 313, -2 }, /* (210) cmd ::= SHOW ACCOUNTS */
+ { 313, -2 }, /* (211) cmd ::= SHOW APPS */
+ { 313, -2 }, /* (212) cmd ::= SHOW CONNECTIONS */
+ { 313, -2 }, /* (213) cmd ::= SHOW LICENCES */
+ { 313, -2 }, /* (214) cmd ::= SHOW GRANTS */
+ { 313, -4 }, /* (215) cmd ::= SHOW CREATE DATABASE db_name */
+ { 313, -4 }, /* (216) cmd ::= SHOW CREATE TABLE full_table_name */
+ { 313, -4 }, /* (217) cmd ::= SHOW CREATE STABLE full_table_name */
+ { 313, -2 }, /* (218) cmd ::= SHOW QUERIES */
+ { 313, -2 }, /* (219) cmd ::= SHOW SCORES */
+ { 313, -2 }, /* (220) cmd ::= SHOW TOPICS */
+ { 313, -2 }, /* (221) cmd ::= SHOW VARIABLES */
+ { 313, -3 }, /* (222) cmd ::= SHOW LOCAL VARIABLES */
+ { 313, -4 }, /* (223) cmd ::= SHOW DNODE NK_INTEGER VARIABLES */
+ { 313, -2 }, /* (224) cmd ::= SHOW BNODES */
+ { 313, -2 }, /* (225) cmd ::= SHOW SNODES */
+ { 313, -2 }, /* (226) cmd ::= SHOW CLUSTER */
+ { 313, -2 }, /* (227) cmd ::= SHOW TRANSACTIONS */
+ { 313, -4 }, /* (228) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
+ { 313, -2 }, /* (229) cmd ::= SHOW CONSUMERS */
+ { 313, -2 }, /* (230) cmd ::= SHOW SUBSCRIPTIONS */
+ { 313, -5 }, /* (231) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
+ { 313, -3 }, /* (232) cmd ::= SHOW VNODES NK_INTEGER */
+ { 313, -3 }, /* (233) cmd ::= SHOW VNODES NK_STRING */
+ { 361, 0 }, /* (234) db_name_cond_opt ::= */
+ { 361, -2 }, /* (235) db_name_cond_opt ::= db_name NK_DOT */
+ { 362, 0 }, /* (236) like_pattern_opt ::= */
+ { 362, -2 }, /* (237) like_pattern_opt ::= LIKE NK_STRING */
+ { 363, -1 }, /* (238) table_name_cond ::= table_name */
+ { 364, 0 }, /* (239) from_db_opt ::= */
+ { 364, -2 }, /* (240) from_db_opt ::= FROM db_name */
+ { 313, -8 }, /* (241) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */
+ { 313, -4 }, /* (242) cmd ::= DROP INDEX exists_opt full_table_name */
+ { 365, -10 }, /* (243) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
+ { 365, -12 }, /* (244) 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 */
+ { 366, -1 }, /* (245) func_list ::= func */
+ { 366, -3 }, /* (246) func_list ::= func_list NK_COMMA func */
+ { 369, -4 }, /* (247) func ::= function_name NK_LP expression_list NK_RP */
+ { 368, 0 }, /* (248) sma_stream_opt ::= */
+ { 368, -3 }, /* (249) sma_stream_opt ::= stream_options WATERMARK duration_literal */
+ { 368, -3 }, /* (250) sma_stream_opt ::= stream_options MAX_DELAY duration_literal */
+ { 313, -6 }, /* (251) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
+ { 313, -7 }, /* (252) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
+ { 313, -9 }, /* (253) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
+ { 313, -7 }, /* (254) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
+ { 313, -9 }, /* (255) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
+ { 313, -4 }, /* (256) cmd ::= DROP TOPIC exists_opt topic_name */
+ { 313, -7 }, /* (257) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
+ { 313, -2 }, /* (258) cmd ::= DESC full_table_name */
+ { 313, -2 }, /* (259) cmd ::= DESCRIBE full_table_name */
+ { 313, -3 }, /* (260) cmd ::= RESET QUERY CACHE */
+ { 313, -4 }, /* (261) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
+ { 374, 0 }, /* (262) analyze_opt ::= */
+ { 374, -1 }, /* (263) analyze_opt ::= ANALYZE */
+ { 375, 0 }, /* (264) explain_options ::= */
+ { 375, -3 }, /* (265) explain_options ::= explain_options VERBOSE NK_BOOL */
+ { 375, -3 }, /* (266) explain_options ::= explain_options RATIO NK_FLOAT */
+ { 313, -10 }, /* (267) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
+ { 313, -4 }, /* (268) cmd ::= DROP FUNCTION exists_opt function_name */
+ { 376, 0 }, /* (269) agg_func_opt ::= */
+ { 376, -1 }, /* (270) agg_func_opt ::= AGGREGATE */
+ { 377, 0 }, /* (271) bufsize_opt ::= */
+ { 377, -2 }, /* (272) bufsize_opt ::= BUFSIZE NK_INTEGER */
+ { 313, -9 }, /* (273) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name AS query_or_subquery */
+ { 313, -4 }, /* (274) cmd ::= DROP STREAM exists_opt stream_name */
+ { 370, 0 }, /* (275) stream_options ::= */
+ { 370, -3 }, /* (276) stream_options ::= stream_options TRIGGER AT_ONCE */
+ { 370, -3 }, /* (277) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
+ { 370, -4 }, /* (278) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
+ { 370, -3 }, /* (279) stream_options ::= stream_options WATERMARK duration_literal */
+ { 370, -4 }, /* (280) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
+ { 313, -3 }, /* (281) cmd ::= KILL CONNECTION NK_INTEGER */
+ { 313, -3 }, /* (282) cmd ::= KILL QUERY NK_STRING */
+ { 313, -3 }, /* (283) cmd ::= KILL TRANSACTION NK_INTEGER */
+ { 313, -2 }, /* (284) cmd ::= BALANCE VGROUP */
+ { 313, -4 }, /* (285) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
+ { 313, -4 }, /* (286) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
+ { 313, -3 }, /* (287) cmd ::= SPLIT VGROUP NK_INTEGER */
+ { 379, -2 }, /* (288) dnode_list ::= DNODE NK_INTEGER */
+ { 379, -3 }, /* (289) dnode_list ::= dnode_list DNODE NK_INTEGER */
+ { 313, -4 }, /* (290) cmd ::= DELETE FROM full_table_name where_clause_opt */
+ { 313, -1 }, /* (291) cmd ::= query_or_subquery */
+ { 313, -7 }, /* (292) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
+ { 313, -4 }, /* (293) cmd ::= INSERT INTO full_table_name query_or_subquery */
+ { 316, -1 }, /* (294) literal ::= NK_INTEGER */
+ { 316, -1 }, /* (295) literal ::= NK_FLOAT */
+ { 316, -1 }, /* (296) literal ::= NK_STRING */
+ { 316, -1 }, /* (297) literal ::= NK_BOOL */
+ { 316, -2 }, /* (298) literal ::= TIMESTAMP NK_STRING */
+ { 316, -1 }, /* (299) literal ::= duration_literal */
+ { 316, -1 }, /* (300) literal ::= NULL */
+ { 316, -1 }, /* (301) literal ::= NK_QUESTION */
+ { 357, -1 }, /* (302) duration_literal ::= NK_VARIABLE */
+ { 381, -1 }, /* (303) signed ::= NK_INTEGER */
+ { 381, -2 }, /* (304) signed ::= NK_PLUS NK_INTEGER */
+ { 381, -2 }, /* (305) signed ::= NK_MINUS NK_INTEGER */
+ { 381, -1 }, /* (306) signed ::= NK_FLOAT */
+ { 381, -2 }, /* (307) signed ::= NK_PLUS NK_FLOAT */
+ { 381, -2 }, /* (308) signed ::= NK_MINUS NK_FLOAT */
+ { 346, -1 }, /* (309) signed_literal ::= signed */
+ { 346, -1 }, /* (310) signed_literal ::= NK_STRING */
+ { 346, -1 }, /* (311) signed_literal ::= NK_BOOL */
+ { 346, -2 }, /* (312) signed_literal ::= TIMESTAMP NK_STRING */
+ { 346, -1 }, /* (313) signed_literal ::= duration_literal */
+ { 346, -1 }, /* (314) signed_literal ::= NULL */
+ { 346, -1 }, /* (315) signed_literal ::= literal_func */
+ { 346, -1 }, /* (316) signed_literal ::= NK_QUESTION */
+ { 383, -1 }, /* (317) literal_list ::= signed_literal */
+ { 383, -3 }, /* (318) literal_list ::= literal_list NK_COMMA signed_literal */
+ { 324, -1 }, /* (319) db_name ::= NK_ID */
+ { 352, -1 }, /* (320) table_name ::= NK_ID */
+ { 344, -1 }, /* (321) column_name ::= NK_ID */
+ { 359, -1 }, /* (322) function_name ::= NK_ID */
+ { 384, -1 }, /* (323) table_alias ::= NK_ID */
+ { 385, -1 }, /* (324) column_alias ::= NK_ID */
+ { 318, -1 }, /* (325) user_name ::= NK_ID */
+ { 371, -1 }, /* (326) topic_name ::= NK_ID */
+ { 378, -1 }, /* (327) stream_name ::= NK_ID */
+ { 373, -1 }, /* (328) cgroup_name ::= NK_ID */
+ { 386, -1 }, /* (329) expr_or_subquery ::= expression */
+ { 386, -1 }, /* (330) expr_or_subquery ::= subquery */
+ { 387, -1 }, /* (331) expression ::= literal */
+ { 387, -1 }, /* (332) expression ::= pseudo_column */
+ { 387, -1 }, /* (333) expression ::= column_reference */
+ { 387, -1 }, /* (334) expression ::= function_expression */
+ { 387, -1 }, /* (335) expression ::= case_when_expression */
+ { 387, -3 }, /* (336) expression ::= NK_LP expression NK_RP */
+ { 387, -2 }, /* (337) expression ::= NK_PLUS expr_or_subquery */
+ { 387, -2 }, /* (338) expression ::= NK_MINUS expr_or_subquery */
+ { 387, -3 }, /* (339) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
+ { 387, -3 }, /* (340) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
+ { 387, -3 }, /* (341) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
+ { 387, -3 }, /* (342) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
+ { 387, -3 }, /* (343) expression ::= expr_or_subquery NK_REM expr_or_subquery */
+ { 387, -3 }, /* (344) expression ::= column_reference NK_ARROW NK_STRING */
+ { 387, -3 }, /* (345) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
+ { 387, -3 }, /* (346) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
+ { 349, -1 }, /* (347) expression_list ::= expr_or_subquery */
+ { 349, -3 }, /* (348) expression_list ::= expression_list NK_COMMA expr_or_subquery */
+ { 390, -1 }, /* (349) column_reference ::= column_name */
+ { 390, -3 }, /* (350) column_reference ::= table_name NK_DOT column_name */
+ { 389, -1 }, /* (351) pseudo_column ::= ROWTS */
+ { 389, -1 }, /* (352) pseudo_column ::= TBNAME */
+ { 389, -3 }, /* (353) pseudo_column ::= table_name NK_DOT TBNAME */
+ { 389, -1 }, /* (354) pseudo_column ::= QSTART */
+ { 389, -1 }, /* (355) pseudo_column ::= QEND */
+ { 389, -1 }, /* (356) pseudo_column ::= QDURATION */
+ { 389, -1 }, /* (357) pseudo_column ::= WSTART */
+ { 389, -1 }, /* (358) pseudo_column ::= WEND */
+ { 389, -1 }, /* (359) pseudo_column ::= WDURATION */
+ { 391, -4 }, /* (360) function_expression ::= function_name NK_LP expression_list NK_RP */
+ { 391, -4 }, /* (361) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
+ { 391, -6 }, /* (362) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
+ { 391, -1 }, /* (363) function_expression ::= literal_func */
+ { 382, -3 }, /* (364) literal_func ::= noarg_func NK_LP NK_RP */
+ { 382, -1 }, /* (365) literal_func ::= NOW */
+ { 395, -1 }, /* (366) noarg_func ::= NOW */
+ { 395, -1 }, /* (367) noarg_func ::= TODAY */
+ { 395, -1 }, /* (368) noarg_func ::= TIMEZONE */
+ { 395, -1 }, /* (369) noarg_func ::= DATABASE */
+ { 395, -1 }, /* (370) noarg_func ::= CLIENT_VERSION */
+ { 395, -1 }, /* (371) noarg_func ::= SERVER_VERSION */
+ { 395, -1 }, /* (372) noarg_func ::= SERVER_STATUS */
+ { 395, -1 }, /* (373) noarg_func ::= CURRENT_USER */
+ { 395, -1 }, /* (374) noarg_func ::= USER */
+ { 393, -1 }, /* (375) star_func ::= COUNT */
+ { 393, -1 }, /* (376) star_func ::= FIRST */
+ { 393, -1 }, /* (377) star_func ::= LAST */
+ { 393, -1 }, /* (378) star_func ::= LAST_ROW */
+ { 394, -1 }, /* (379) star_func_para_list ::= NK_STAR */
+ { 394, -1 }, /* (380) star_func_para_list ::= other_para_list */
+ { 396, -1 }, /* (381) other_para_list ::= star_func_para */
+ { 396, -3 }, /* (382) other_para_list ::= other_para_list NK_COMMA star_func_para */
+ { 397, -1 }, /* (383) star_func_para ::= expr_or_subquery */
+ { 397, -3 }, /* (384) star_func_para ::= table_name NK_DOT NK_STAR */
+ { 392, -4 }, /* (385) case_when_expression ::= CASE when_then_list case_when_else_opt END */
+ { 392, -5 }, /* (386) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
+ { 398, -1 }, /* (387) when_then_list ::= when_then_expr */
+ { 398, -2 }, /* (388) when_then_list ::= when_then_list when_then_expr */
+ { 401, -4 }, /* (389) when_then_expr ::= WHEN common_expression THEN common_expression */
+ { 399, 0 }, /* (390) case_when_else_opt ::= */
+ { 399, -2 }, /* (391) case_when_else_opt ::= ELSE common_expression */
+ { 402, -3 }, /* (392) predicate ::= expr_or_subquery compare_op expr_or_subquery */
+ { 402, -5 }, /* (393) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
+ { 402, -6 }, /* (394) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
+ { 402, -3 }, /* (395) predicate ::= expr_or_subquery IS NULL */
+ { 402, -4 }, /* (396) predicate ::= expr_or_subquery IS NOT NULL */
+ { 402, -3 }, /* (397) predicate ::= expr_or_subquery in_op in_predicate_value */
+ { 403, -1 }, /* (398) compare_op ::= NK_LT */
+ { 403, -1 }, /* (399) compare_op ::= NK_GT */
+ { 403, -1 }, /* (400) compare_op ::= NK_LE */
+ { 403, -1 }, /* (401) compare_op ::= NK_GE */
+ { 403, -1 }, /* (402) compare_op ::= NK_NE */
+ { 403, -1 }, /* (403) compare_op ::= NK_EQ */
+ { 403, -1 }, /* (404) compare_op ::= LIKE */
+ { 403, -2 }, /* (405) compare_op ::= NOT LIKE */
+ { 403, -1 }, /* (406) compare_op ::= MATCH */
+ { 403, -1 }, /* (407) compare_op ::= NMATCH */
+ { 403, -1 }, /* (408) compare_op ::= CONTAINS */
+ { 404, -1 }, /* (409) in_op ::= IN */
+ { 404, -2 }, /* (410) in_op ::= NOT IN */
+ { 405, -3 }, /* (411) in_predicate_value ::= NK_LP literal_list NK_RP */
+ { 406, -1 }, /* (412) boolean_value_expression ::= boolean_primary */
+ { 406, -2 }, /* (413) boolean_value_expression ::= NOT boolean_primary */
+ { 406, -3 }, /* (414) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
+ { 406, -3 }, /* (415) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
+ { 407, -1 }, /* (416) boolean_primary ::= predicate */
+ { 407, -3 }, /* (417) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
+ { 400, -1 }, /* (418) common_expression ::= expr_or_subquery */
+ { 400, -1 }, /* (419) common_expression ::= boolean_value_expression */
+ { 408, 0 }, /* (420) from_clause_opt ::= */
+ { 408, -2 }, /* (421) from_clause_opt ::= FROM table_reference_list */
+ { 409, -1 }, /* (422) table_reference_list ::= table_reference */
+ { 409, -3 }, /* (423) table_reference_list ::= table_reference_list NK_COMMA table_reference */
+ { 410, -1 }, /* (424) table_reference ::= table_primary */
+ { 410, -1 }, /* (425) table_reference ::= joined_table */
+ { 411, -2 }, /* (426) table_primary ::= table_name alias_opt */
+ { 411, -4 }, /* (427) table_primary ::= db_name NK_DOT table_name alias_opt */
+ { 411, -2 }, /* (428) table_primary ::= subquery alias_opt */
+ { 411, -1 }, /* (429) table_primary ::= parenthesized_joined_table */
+ { 413, 0 }, /* (430) alias_opt ::= */
+ { 413, -1 }, /* (431) alias_opt ::= table_alias */
+ { 413, -2 }, /* (432) alias_opt ::= AS table_alias */
+ { 414, -3 }, /* (433) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
+ { 414, -3 }, /* (434) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
+ { 412, -6 }, /* (435) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
+ { 415, 0 }, /* (436) join_type ::= */
+ { 415, -1 }, /* (437) join_type ::= INNER */
+ { 417, -12 }, /* (438) 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 */
+ { 418, 0 }, /* (439) set_quantifier_opt ::= */
+ { 418, -1 }, /* (440) set_quantifier_opt ::= DISTINCT */
+ { 418, -1 }, /* (441) set_quantifier_opt ::= ALL */
+ { 419, -1 }, /* (442) select_list ::= select_item */
+ { 419, -3 }, /* (443) select_list ::= select_list NK_COMMA select_item */
+ { 427, -1 }, /* (444) select_item ::= NK_STAR */
+ { 427, -1 }, /* (445) select_item ::= common_expression */
+ { 427, -2 }, /* (446) select_item ::= common_expression column_alias */
+ { 427, -3 }, /* (447) select_item ::= common_expression AS column_alias */
+ { 427, -3 }, /* (448) select_item ::= table_name NK_DOT NK_STAR */
+ { 380, 0 }, /* (449) where_clause_opt ::= */
+ { 380, -2 }, /* (450) where_clause_opt ::= WHERE search_condition */
+ { 420, 0 }, /* (451) partition_by_clause_opt ::= */
+ { 420, -3 }, /* (452) partition_by_clause_opt ::= PARTITION BY expression_list */
+ { 424, 0 }, /* (453) twindow_clause_opt ::= */
+ { 424, -6 }, /* (454) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
+ { 424, -4 }, /* (455) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
+ { 424, -6 }, /* (456) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
+ { 424, -8 }, /* (457) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
+ { 367, 0 }, /* (458) sliding_opt ::= */
+ { 367, -4 }, /* (459) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
+ { 423, 0 }, /* (460) fill_opt ::= */
+ { 423, -4 }, /* (461) fill_opt ::= FILL NK_LP fill_mode NK_RP */
+ { 423, -6 }, /* (462) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
+ { 428, -1 }, /* (463) fill_mode ::= NONE */
+ { 428, -1 }, /* (464) fill_mode ::= PREV */
+ { 428, -1 }, /* (465) fill_mode ::= NULL */
+ { 428, -1 }, /* (466) fill_mode ::= LINEAR */
+ { 428, -1 }, /* (467) fill_mode ::= NEXT */
+ { 425, 0 }, /* (468) group_by_clause_opt ::= */
+ { 425, -3 }, /* (469) group_by_clause_opt ::= GROUP BY group_by_list */
+ { 429, -1 }, /* (470) group_by_list ::= expr_or_subquery */
+ { 429, -3 }, /* (471) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
+ { 426, 0 }, /* (472) having_clause_opt ::= */
+ { 426, -2 }, /* (473) having_clause_opt ::= HAVING search_condition */
+ { 421, 0 }, /* (474) range_opt ::= */
+ { 421, -6 }, /* (475) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
+ { 422, 0 }, /* (476) every_opt ::= */
+ { 422, -4 }, /* (477) every_opt ::= EVERY NK_LP duration_literal NK_RP */
+ { 430, -4 }, /* (478) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
+ { 431, -1 }, /* (479) query_simple ::= query_specification */
+ { 431, -1 }, /* (480) query_simple ::= union_query_expression */
+ { 435, -4 }, /* (481) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
+ { 435, -3 }, /* (482) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
+ { 436, -1 }, /* (483) query_simple_or_subquery ::= query_simple */
+ { 436, -1 }, /* (484) query_simple_or_subquery ::= subquery */
+ { 372, -1 }, /* (485) query_or_subquery ::= query_expression */
+ { 372, -1 }, /* (486) query_or_subquery ::= subquery */
+ { 432, 0 }, /* (487) order_by_clause_opt ::= */
+ { 432, -3 }, /* (488) order_by_clause_opt ::= ORDER BY sort_specification_list */
+ { 433, 0 }, /* (489) slimit_clause_opt ::= */
+ { 433, -2 }, /* (490) slimit_clause_opt ::= SLIMIT NK_INTEGER */
+ { 433, -4 }, /* (491) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
+ { 433, -4 }, /* (492) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
+ { 434, 0 }, /* (493) limit_clause_opt ::= */
+ { 434, -2 }, /* (494) limit_clause_opt ::= LIMIT NK_INTEGER */
+ { 434, -4 }, /* (495) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
+ { 434, -4 }, /* (496) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
+ { 388, -3 }, /* (497) subquery ::= NK_LP query_expression NK_RP */
+ { 388, -3 }, /* (498) subquery ::= NK_LP subquery NK_RP */
+ { 416, -1 }, /* (499) search_condition ::= common_expression */
+ { 437, -1 }, /* (500) sort_specification_list ::= sort_specification */
+ { 437, -3 }, /* (501) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
+ { 438, -3 }, /* (502) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
+ { 439, 0 }, /* (503) ordering_specification_opt ::= */
+ { 439, -1 }, /* (504) ordering_specification_opt ::= ASC */
+ { 439, -1 }, /* (505) ordering_specification_opt ::= DESC */
+ { 440, 0 }, /* (506) null_ordering_opt ::= */
+ { 440, -2 }, /* (507) null_ordering_opt ::= NULLS FIRST */
+ { 440, -2 }, /* (508) null_ordering_opt ::= NULLS LAST */
};
static void yy_accept(yyParser*); /* Forward Declaration */
@@ -3395,11 +3507,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,310,&yymsp[0].minor);
+ yy_destructor(yypParser,314,&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,311,&yymsp[0].minor);
+ yy_destructor(yypParser,315,&yymsp[0].minor);
break;
case 2: /* account_options ::= */
{ }
@@ -3413,20 +3525,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,310,&yymsp[-2].minor);
+{ yy_destructor(yypParser,314,&yymsp[-2].minor);
{ }
- yy_destructor(yypParser,312,&yymsp[0].minor);
+ yy_destructor(yypParser,316,&yymsp[0].minor);
}
break;
case 12: /* alter_account_options ::= alter_account_option */
-{ yy_destructor(yypParser,313,&yymsp[0].minor);
+{ yy_destructor(yypParser,317,&yymsp[0].minor);
{ }
}
break;
case 13: /* alter_account_options ::= alter_account_options alter_account_option */
-{ yy_destructor(yypParser,311,&yymsp[-1].minor);
+{ yy_destructor(yypParser,315,&yymsp[-1].minor);
{ }
- yy_destructor(yypParser,313,&yymsp[0].minor);
+ yy_destructor(yypParser,317,&yymsp[0].minor);
}
break;
case 14: /* alter_account_option ::= PASS literal */
@@ -3440,72 +3552,72 @@ 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,312,&yymsp[0].minor);
+ yy_destructor(yypParser,316,&yymsp[0].minor);
break;
case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
-{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy641, &yymsp[-1].minor.yy0, yymsp[0].minor.yy503); }
+{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy659, &yymsp[-1].minor.yy0, yymsp[0].minor.yy341); }
break;
case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy641, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy659, 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.yy641, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy659, 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.yy641, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy659, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
break;
case 28: /* cmd ::= DROP USER user_name */
-{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy659); }
break;
case 29: /* sysinfo_opt ::= */
-{ yymsp[1].minor.yy503 = 1; }
+{ yymsp[1].minor.yy341 = 1; }
break;
case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */
-{ yymsp[-1].minor.yy503 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
+{ yymsp[-1].minor.yy341 = 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.yy477, &yymsp[-2].minor.yy641, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy459, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659); }
break;
case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */
-{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy477, &yymsp[-2].minor.yy641, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy459, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659); }
break;
case 33: /* privileges ::= ALL */
-{ yymsp[0].minor.yy477 = PRIVILEGE_TYPE_ALL; }
+{ yymsp[0].minor.yy459 = PRIVILEGE_TYPE_ALL; }
break;
case 34: /* privileges ::= priv_type_list */
case 35: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==35);
-{ yylhsminor.yy477 = yymsp[0].minor.yy477; }
- yymsp[0].minor.yy477 = yylhsminor.yy477;
+{ yylhsminor.yy459 = yymsp[0].minor.yy459; }
+ yymsp[0].minor.yy459 = yylhsminor.yy459;
break;
case 36: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */
-{ yylhsminor.yy477 = yymsp[-2].minor.yy477 | yymsp[0].minor.yy477; }
- yymsp[-2].minor.yy477 = yylhsminor.yy477;
+{ yylhsminor.yy459 = yymsp[-2].minor.yy459 | yymsp[0].minor.yy459; }
+ yymsp[-2].minor.yy459 = yylhsminor.yy459;
break;
case 37: /* priv_type ::= READ */
-{ yymsp[0].minor.yy477 = PRIVILEGE_TYPE_READ; }
+{ yymsp[0].minor.yy459 = PRIVILEGE_TYPE_READ; }
break;
case 38: /* priv_type ::= WRITE */
-{ yymsp[0].minor.yy477 = PRIVILEGE_TYPE_WRITE; }
+{ yymsp[0].minor.yy459 = PRIVILEGE_TYPE_WRITE; }
break;
case 39: /* priv_level ::= NK_STAR NK_DOT NK_STAR */
-{ yylhsminor.yy641 = yymsp[-2].minor.yy0; }
- yymsp[-2].minor.yy641 = yylhsminor.yy641;
+{ yylhsminor.yy659 = yymsp[-2].minor.yy0; }
+ yymsp[-2].minor.yy659 = yylhsminor.yy659;
break;
case 40: /* priv_level ::= db_name NK_DOT NK_STAR */
-{ yylhsminor.yy641 = yymsp[-2].minor.yy641; }
- yymsp[-2].minor.yy641 = yylhsminor.yy641;
+{ yylhsminor.yy659 = yymsp[-2].minor.yy659; }
+ yymsp[-2].minor.yy659 = yylhsminor.yy659;
break;
case 41: /* cmd ::= CREATE DNODE dnode_endpoint */
-{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy641, NULL); }
+{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy659, NULL); }
break;
case 42: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
-{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy641, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy0); }
break;
case 43: /* cmd ::= DROP DNODE NK_INTEGER */
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); }
break;
case 44: /* cmd ::= DROP DNODE dnode_endpoint */
-{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy659); }
break;
case 45: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); }
@@ -3532,21 +3644,21 @@ static YYACTIONTYPE yy_reduce(
case 326: /* topic_name ::= NK_ID */ yytestcase(yyruleno==326);
case 327: /* stream_name ::= NK_ID */ yytestcase(yyruleno==327);
case 328: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==328);
- case 364: /* noarg_func ::= NOW */ yytestcase(yyruleno==364);
- case 365: /* noarg_func ::= TODAY */ yytestcase(yyruleno==365);
- case 366: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==366);
- case 367: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==367);
- case 368: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==368);
- case 369: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==369);
- case 370: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==370);
- case 371: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==371);
- case 372: /* noarg_func ::= USER */ yytestcase(yyruleno==372);
- case 373: /* star_func ::= COUNT */ yytestcase(yyruleno==373);
- case 374: /* star_func ::= FIRST */ yytestcase(yyruleno==374);
- case 375: /* star_func ::= LAST */ yytestcase(yyruleno==375);
- case 376: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==376);
-{ yylhsminor.yy641 = yymsp[0].minor.yy0; }
- yymsp[0].minor.yy641 = yylhsminor.yy641;
+ case 366: /* noarg_func ::= NOW */ yytestcase(yyruleno==366);
+ case 367: /* noarg_func ::= TODAY */ yytestcase(yyruleno==367);
+ case 368: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==368);
+ case 369: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==369);
+ case 370: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==370);
+ case 371: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==371);
+ case 372: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==372);
+ case 373: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==373);
+ case 374: /* noarg_func ::= USER */ yytestcase(yyruleno==374);
+ case 375: /* star_func ::= COUNT */ yytestcase(yyruleno==375);
+ case 376: /* star_func ::= FIRST */ yytestcase(yyruleno==376);
+ case 377: /* star_func ::= LAST */ yytestcase(yyruleno==377);
+ case 378: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==378);
+{ yylhsminor.yy659 = yymsp[0].minor.yy0; }
+ yymsp[0].minor.yy659 = yylhsminor.yy659;
break;
case 52: /* cmd ::= ALTER LOCAL NK_STRING */
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
@@ -3579,208 +3691,208 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); }
break;
case 62: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
-{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy281, &yymsp[-1].minor.yy641, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy173, &yymsp[-1].minor.yy659, yymsp[0].minor.yy560); }
break;
case 63: /* cmd ::= DROP DATABASE exists_opt db_name */
-{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy281, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy659); }
break;
case 64: /* cmd ::= USE db_name */
-{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy659); }
break;
case 65: /* cmd ::= ALTER DATABASE db_name alter_db_options */
-{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy641, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy659, yymsp[0].minor.yy560); }
break;
case 66: /* cmd ::= FLUSH DATABASE db_name */
-{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy659); }
break;
case 67: /* cmd ::= TRIM DATABASE db_name */
-{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[0].minor.yy659); }
break;
case 68: /* not_exists_opt ::= IF NOT EXISTS */
-{ yymsp[-2].minor.yy281 = true; }
+{ yymsp[-2].minor.yy173 = true; }
break;
case 69: /* not_exists_opt ::= */
case 71: /* exists_opt ::= */ yytestcase(yyruleno==71);
case 262: /* analyze_opt ::= */ yytestcase(yyruleno==262);
case 269: /* agg_func_opt ::= */ yytestcase(yyruleno==269);
- case 430: /* set_quantifier_opt ::= */ yytestcase(yyruleno==430);
-{ yymsp[1].minor.yy281 = false; }
+ case 439: /* set_quantifier_opt ::= */ yytestcase(yyruleno==439);
+{ yymsp[1].minor.yy173 = false; }
break;
case 70: /* exists_opt ::= IF EXISTS */
-{ yymsp[-1].minor.yy281 = true; }
+{ yymsp[-1].minor.yy173 = true; }
break;
case 72: /* db_options ::= */
-{ yymsp[1].minor.yy776 = createDefaultDatabaseOptions(pCxt); }
+{ yymsp[1].minor.yy560 = createDefaultDatabaseOptions(pCxt); }
break;
case 73: /* db_options ::= db_options BUFFER NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 74: /* db_options ::= db_options CACHEMODEL NK_STRING */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 75: /* db_options ::= db_options CACHESIZE NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 76: /* db_options ::= db_options COMP NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 77: /* db_options ::= db_options DURATION NK_INTEGER */
case 78: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==78);
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 79: /* db_options ::= db_options MAXROWS NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 80: /* db_options ::= db_options MINROWS NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 81: /* db_options ::= db_options KEEP integer_list */
case 82: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==82);
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_KEEP, yymsp[0].minor.yy280); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_KEEP, yymsp[0].minor.yy334); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 83: /* db_options ::= db_options PAGES NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 84: /* db_options ::= db_options PAGESIZE NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 85: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 86: /* db_options ::= db_options PRECISION NK_STRING */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 87: /* db_options ::= db_options REPLICA NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 88: /* db_options ::= db_options STRICT NK_STRING */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_STRICT, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_STRICT, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 89: /* db_options ::= db_options VGROUPS NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 90: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 91: /* db_options ::= db_options RETENTIONS retention_list */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_RETENTIONS, yymsp[0].minor.yy280); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_RETENTIONS, yymsp[0].minor.yy334); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 92: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 93: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 94: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 95: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 96: /* 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.yy776 = setDatabaseOption(pCxt, yymsp[-3].minor.yy776, DB_OPTION_WAL_RETENTION_PERIOD, &t);
+ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-3].minor.yy560, DB_OPTION_WAL_RETENTION_PERIOD, &t);
}
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
case 97: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 98: /* 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.yy776 = setDatabaseOption(pCxt, yymsp[-3].minor.yy776, DB_OPTION_WAL_RETENTION_SIZE, &t);
+ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-3].minor.yy560, DB_OPTION_WAL_RETENTION_SIZE, &t);
}
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
case 99: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 100: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 101: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 102: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 103: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */
-{ yylhsminor.yy776 = setDatabaseOption(pCxt, yymsp[-2].minor.yy776, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 104: /* alter_db_options ::= alter_db_option */
-{ yylhsminor.yy776 = createAlterDatabaseOptions(pCxt); yylhsminor.yy776 = setAlterDatabaseOption(pCxt, yylhsminor.yy776, &yymsp[0].minor.yy605); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterDatabaseOptions(pCxt); yylhsminor.yy560 = setAlterDatabaseOption(pCxt, yylhsminor.yy560, &yymsp[0].minor.yy515); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 105: /* alter_db_options ::= alter_db_options alter_db_option */
-{ yylhsminor.yy776 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy776, &yymsp[0].minor.yy605); }
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy560, &yymsp[0].minor.yy515); }
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
case 106: /* alter_db_option ::= CACHEMODEL NK_STRING */
-{ yymsp[-1].minor.yy605.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy515.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy515.val = yymsp[0].minor.yy0; }
break;
case 107: /* alter_db_option ::= CACHESIZE NK_INTEGER */
-{ yymsp[-1].minor.yy605.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy515.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy515.val = yymsp[0].minor.yy0; }
break;
case 108: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
-{ yymsp[-1].minor.yy605.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy515.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy515.val = yymsp[0].minor.yy0; }
break;
case 109: /* alter_db_option ::= KEEP integer_list */
case 110: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==110);
-{ yymsp[-1].minor.yy605.type = DB_OPTION_KEEP; yymsp[-1].minor.yy605.pList = yymsp[0].minor.yy280; }
+{ yymsp[-1].minor.yy515.type = DB_OPTION_KEEP; yymsp[-1].minor.yy515.pList = yymsp[0].minor.yy334; }
break;
case 111: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */
-{ yymsp[-1].minor.yy605.type = DB_OPTION_WAL; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy515.type = DB_OPTION_WAL; yymsp[-1].minor.yy515.val = yymsp[0].minor.yy0; }
break;
case 112: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */
-{ yymsp[-1].minor.yy605.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy515.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy515.val = yymsp[0].minor.yy0; }
break;
case 113: /* integer_list ::= NK_INTEGER */
-{ yylhsminor.yy280 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy280 = yylhsminor.yy280;
+{ yylhsminor.yy334 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy334 = yylhsminor.yy334;
break;
case 114: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */
case 289: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==289);
-{ yylhsminor.yy280 = addNodeToList(pCxt, yymsp[-2].minor.yy280, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
- yymsp[-2].minor.yy280 = yylhsminor.yy280;
+{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy334 = yylhsminor.yy334;
break;
case 115: /* variable_list ::= NK_VARIABLE */
-{ yylhsminor.yy280 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy280 = yylhsminor.yy280;
+{ yylhsminor.yy334 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy334 = yylhsminor.yy334;
break;
case 116: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
-{ yylhsminor.yy280 = addNodeToList(pCxt, yymsp[-2].minor.yy280, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[-2].minor.yy280 = yylhsminor.yy280;
+{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy334 = yylhsminor.yy334;
break;
case 117: /* retention_list ::= retention */
case 137: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==137);
@@ -3790,11 +3902,12 @@ static YYACTIONTYPE yy_reduce(
case 195: /* col_name_list ::= col_name */ yytestcase(yyruleno==195);
case 245: /* func_list ::= func */ yytestcase(yyruleno==245);
case 317: /* literal_list ::= signed_literal */ yytestcase(yyruleno==317);
- case 379: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==379);
- case 433: /* select_list ::= select_item */ yytestcase(yyruleno==433);
- case 490: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==490);
-{ yylhsminor.yy280 = createNodeList(pCxt, yymsp[0].minor.yy776); }
- yymsp[0].minor.yy280 = yylhsminor.yy280;
+ case 381: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==381);
+ case 387: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==387);
+ case 442: /* select_list ::= select_item */ yytestcase(yyruleno==442);
+ case 500: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==500);
+{ yylhsminor.yy334 = createNodeList(pCxt, yymsp[0].minor.yy560); }
+ yymsp[0].minor.yy334 = yylhsminor.yy334;
break;
case 118: /* retention_list ::= retention_list NK_COMMA retention */
case 148: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==148);
@@ -3802,253 +3915,254 @@ static YYACTIONTYPE yy_reduce(
case 196: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==196);
case 246: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==246);
case 318: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==318);
- case 380: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==380);
- case 434: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==434);
- case 491: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==491);
-{ yylhsminor.yy280 = addNodeToList(pCxt, yymsp[-2].minor.yy280, yymsp[0].minor.yy776); }
- yymsp[-2].minor.yy280 = yylhsminor.yy280;
+ case 382: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==382);
+ case 443: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==443);
+ case 501: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==501);
+{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, yymsp[0].minor.yy560); }
+ yymsp[-2].minor.yy334 = yylhsminor.yy334;
break;
case 119: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
-{ yylhsminor.yy776 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 120: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
case 122: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==122);
-{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy281, yymsp[-5].minor.yy776, yymsp[-3].minor.yy280, yymsp[-1].minor.yy280, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy173, yymsp[-5].minor.yy560, yymsp[-3].minor.yy334, yymsp[-1].minor.yy334, yymsp[0].minor.yy560); }
break;
case 121: /* cmd ::= CREATE TABLE multi_create_clause */
-{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy280); }
+{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy334); }
break;
case 123: /* cmd ::= DROP TABLE multi_drop_clause */
-{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy280); }
+{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy334); }
break;
case 124: /* cmd ::= DROP STABLE exists_opt full_table_name */
-{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy281, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); }
break;
case 125: /* cmd ::= ALTER TABLE alter_table_clause */
case 291: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==291);
-{ pCxt->pRootNode = yymsp[0].minor.yy776; }
+{ pCxt->pRootNode = yymsp[0].minor.yy560; }
break;
case 126: /* cmd ::= ALTER STABLE alter_table_clause */
-{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy560); }
break;
case 127: /* alter_table_clause ::= full_table_name alter_table_options */
-{ yylhsminor.yy776 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy776, yymsp[0].minor.yy776); }
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); }
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
case 128: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
-{ yylhsminor.yy776 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy776, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy641, yymsp[0].minor.yy304); }
- yymsp[-4].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy659, yymsp[0].minor.yy574); }
+ yymsp[-4].minor.yy560 = yylhsminor.yy560;
break;
case 129: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
-{ yylhsminor.yy776 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy776, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy641); }
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy560, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy659); }
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
case 130: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
-{ yylhsminor.yy776 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy776, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy641, yymsp[0].minor.yy304); }
- yymsp[-4].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy659, yymsp[0].minor.yy574); }
+ yymsp[-4].minor.yy560 = yylhsminor.yy560;
break;
case 131: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
-{ yylhsminor.yy776 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy776, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy641, &yymsp[0].minor.yy641); }
- yymsp[-4].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy659, &yymsp[0].minor.yy659); }
+ yymsp[-4].minor.yy560 = yylhsminor.yy560;
break;
case 132: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
-{ yylhsminor.yy776 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy776, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy641, yymsp[0].minor.yy304); }
- yymsp[-4].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy659, yymsp[0].minor.yy574); }
+ yymsp[-4].minor.yy560 = yylhsminor.yy560;
break;
case 133: /* alter_table_clause ::= full_table_name DROP TAG column_name */
-{ yylhsminor.yy776 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy776, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy641); }
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy560, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy659); }
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
case 134: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
-{ yylhsminor.yy776 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy776, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy641, yymsp[0].minor.yy304); }
- yymsp[-4].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy659, yymsp[0].minor.yy574); }
+ yymsp[-4].minor.yy560 = yylhsminor.yy560;
break;
case 135: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
-{ yylhsminor.yy776 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy776, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy641, &yymsp[0].minor.yy641); }
- yymsp[-4].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy659, &yymsp[0].minor.yy659); }
+ yymsp[-4].minor.yy560 = yylhsminor.yy560;
break;
case 136: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
-{ yylhsminor.yy776 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy776, &yymsp[-2].minor.yy641, yymsp[0].minor.yy776); }
- yymsp[-5].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy560, &yymsp[-2].minor.yy659, yymsp[0].minor.yy560); }
+ yymsp[-5].minor.yy560 = yylhsminor.yy560;
break;
case 138: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
case 141: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==141);
-{ yylhsminor.yy280 = addNodeToList(pCxt, yymsp[-1].minor.yy280, yymsp[0].minor.yy776); }
- yymsp[-1].minor.yy280 = yylhsminor.yy280;
+ case 388: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==388);
+{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-1].minor.yy334, yymsp[0].minor.yy560); }
+ yymsp[-1].minor.yy334 = yylhsminor.yy334;
break;
case 139: /* 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.yy776 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy281, yymsp[-8].minor.yy776, yymsp[-6].minor.yy776, yymsp[-5].minor.yy280, yymsp[-2].minor.yy280, yymsp[0].minor.yy776); }
- yymsp[-9].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy173, yymsp[-8].minor.yy560, yymsp[-6].minor.yy560, yymsp[-5].minor.yy334, yymsp[-2].minor.yy334, yymsp[0].minor.yy560); }
+ yymsp[-9].minor.yy560 = yylhsminor.yy560;
break;
case 142: /* drop_table_clause ::= exists_opt full_table_name */
-{ yylhsminor.yy776 = createDropTableClause(pCxt, yymsp[-1].minor.yy281, yymsp[0].minor.yy776); }
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createDropTableClause(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); }
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
case 143: /* specific_cols_opt ::= */
case 174: /* tags_def_opt ::= */ yytestcase(yyruleno==174);
- case 442: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==442);
- case 459: /* group_by_clause_opt ::= */ yytestcase(yyruleno==459);
- case 478: /* order_by_clause_opt ::= */ yytestcase(yyruleno==478);
-{ yymsp[1].minor.yy280 = NULL; }
+ case 451: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==451);
+ case 468: /* group_by_clause_opt ::= */ yytestcase(yyruleno==468);
+ case 487: /* order_by_clause_opt ::= */ yytestcase(yyruleno==487);
+{ yymsp[1].minor.yy334 = NULL; }
break;
case 144: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */
-{ yymsp[-2].minor.yy280 = yymsp[-1].minor.yy280; }
+{ yymsp[-2].minor.yy334 = yymsp[-1].minor.yy334; }
break;
case 145: /* full_table_name ::= table_name */
-{ yylhsminor.yy776 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy641, NULL); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy659, NULL); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 146: /* full_table_name ::= db_name NK_DOT table_name */
-{ yylhsminor.yy776 = createRealTableNode(pCxt, &yymsp[-2].minor.yy641, &yymsp[0].minor.yy641, NULL); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createRealTableNode(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659, NULL); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 149: /* column_def ::= column_name type_name */
-{ yylhsminor.yy776 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy641, yymsp[0].minor.yy304, NULL); }
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy659, yymsp[0].minor.yy574, NULL); }
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
case 150: /* column_def ::= column_name type_name COMMENT NK_STRING */
-{ yylhsminor.yy776 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy641, yymsp[-2].minor.yy304, &yymsp[0].minor.yy0); }
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy659, yymsp[-2].minor.yy574, &yymsp[0].minor.yy0); }
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
case 151: /* type_name ::= BOOL */
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BOOL); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_BOOL); }
break;
case 152: /* type_name ::= TINYINT */
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_TINYINT); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_TINYINT); }
break;
case 153: /* type_name ::= SMALLINT */
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
break;
case 154: /* type_name ::= INT */
case 155: /* type_name ::= INTEGER */ yytestcase(yyruleno==155);
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_INT); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_INT); }
break;
case 156: /* type_name ::= BIGINT */
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BIGINT); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_BIGINT); }
break;
case 157: /* type_name ::= FLOAT */
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_FLOAT); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_FLOAT); }
break;
case 158: /* type_name ::= DOUBLE */
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
break;
case 159: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy574 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
break;
case 160: /* type_name ::= TIMESTAMP */
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
break;
case 161: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy574 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
break;
case 162: /* type_name ::= TINYINT UNSIGNED */
-{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
+{ yymsp[-1].minor.yy574 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
break;
case 163: /* type_name ::= SMALLINT UNSIGNED */
-{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
+{ yymsp[-1].minor.yy574 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
break;
case 164: /* type_name ::= INT UNSIGNED */
-{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UINT); }
+{ yymsp[-1].minor.yy574 = createDataType(TSDB_DATA_TYPE_UINT); }
break;
case 165: /* type_name ::= BIGINT UNSIGNED */
-{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
+{ yymsp[-1].minor.yy574 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
break;
case 166: /* type_name ::= JSON */
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_JSON); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_JSON); }
break;
case 167: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy574 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
break;
case 168: /* type_name ::= MEDIUMBLOB */
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
break;
case 169: /* type_name ::= BLOB */
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BLOB); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_BLOB); }
break;
case 170: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy574 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
break;
case 171: /* type_name ::= DECIMAL */
-{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+{ yymsp[0].minor.yy574 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 172: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+{ yymsp[-3].minor.yy574 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 173: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
-{ yymsp[-5].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+{ yymsp[-5].minor.yy574 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 175: /* tags_def_opt ::= tags_def */
- case 378: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==378);
-{ yylhsminor.yy280 = yymsp[0].minor.yy280; }
- yymsp[0].minor.yy280 = yylhsminor.yy280;
+ case 380: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==380);
+{ yylhsminor.yy334 = yymsp[0].minor.yy334; }
+ yymsp[0].minor.yy334 = yylhsminor.yy334;
break;
case 176: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
-{ yymsp[-3].minor.yy280 = yymsp[-1].minor.yy280; }
+{ yymsp[-3].minor.yy334 = yymsp[-1].minor.yy334; }
break;
case 177: /* table_options ::= */
-{ yymsp[1].minor.yy776 = createDefaultTableOptions(pCxt); }
+{ yymsp[1].minor.yy560 = createDefaultTableOptions(pCxt); }
break;
case 178: /* table_options ::= table_options COMMENT NK_STRING */
-{ yylhsminor.yy776 = setTableOption(pCxt, yymsp[-2].minor.yy776, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-2].minor.yy560, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 179: /* table_options ::= table_options MAX_DELAY duration_list */
-{ yylhsminor.yy776 = setTableOption(pCxt, yymsp[-2].minor.yy776, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy280); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-2].minor.yy560, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy334); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 180: /* table_options ::= table_options WATERMARK duration_list */
-{ yylhsminor.yy776 = setTableOption(pCxt, yymsp[-2].minor.yy776, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy280); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-2].minor.yy560, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy334); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 181: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
-{ yylhsminor.yy776 = setTableOption(pCxt, yymsp[-4].minor.yy776, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy280); }
- yymsp[-4].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-4].minor.yy560, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy334); }
+ yymsp[-4].minor.yy560 = yylhsminor.yy560;
break;
case 182: /* table_options ::= table_options TTL NK_INTEGER */
-{ yylhsminor.yy776 = setTableOption(pCxt, yymsp[-2].minor.yy776, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-2].minor.yy560, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 183: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
-{ yylhsminor.yy776 = setTableOption(pCxt, yymsp[-4].minor.yy776, TABLE_OPTION_SMA, yymsp[-1].minor.yy280); }
- yymsp[-4].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-4].minor.yy560, TABLE_OPTION_SMA, yymsp[-1].minor.yy334); }
+ yymsp[-4].minor.yy560 = yylhsminor.yy560;
break;
case 184: /* alter_table_options ::= alter_table_option */
-{ yylhsminor.yy776 = createAlterTableOptions(pCxt); yylhsminor.yy776 = setTableOption(pCxt, yylhsminor.yy776, yymsp[0].minor.yy605.type, &yymsp[0].minor.yy605.val); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createAlterTableOptions(pCxt); yylhsminor.yy560 = setTableOption(pCxt, yylhsminor.yy560, yymsp[0].minor.yy515.type, &yymsp[0].minor.yy515.val); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 185: /* alter_table_options ::= alter_table_options alter_table_option */
-{ yylhsminor.yy776 = setTableOption(pCxt, yymsp[-1].minor.yy776, yymsp[0].minor.yy605.type, &yymsp[0].minor.yy605.val); }
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-1].minor.yy560, yymsp[0].minor.yy515.type, &yymsp[0].minor.yy515.val); }
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
case 186: /* alter_table_option ::= COMMENT NK_STRING */
-{ yymsp[-1].minor.yy605.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy515.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy515.val = yymsp[0].minor.yy0; }
break;
case 187: /* alter_table_option ::= TTL NK_INTEGER */
-{ yymsp[-1].minor.yy605.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy515.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy515.val = yymsp[0].minor.yy0; }
break;
case 188: /* duration_list ::= duration_literal */
- case 345: /* expression_list ::= expression */ yytestcase(yyruleno==345);
-{ yylhsminor.yy280 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy776)); }
- yymsp[0].minor.yy280 = yylhsminor.yy280;
+ case 347: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==347);
+{ yylhsminor.yy334 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); }
+ yymsp[0].minor.yy334 = yylhsminor.yy334;
break;
case 189: /* duration_list ::= duration_list NK_COMMA duration_literal */
- case 346: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==346);
-{ yylhsminor.yy280 = addNodeToList(pCxt, yymsp[-2].minor.yy280, releaseRawExprNode(pCxt, yymsp[0].minor.yy776)); }
- yymsp[-2].minor.yy280 = yylhsminor.yy280;
+ case 348: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==348);
+{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); }
+ yymsp[-2].minor.yy334 = yylhsminor.yy334;
break;
case 192: /* rollup_func_name ::= function_name */
-{ yylhsminor.yy776 = createFunctionNode(pCxt, &yymsp[0].minor.yy641, NULL); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createFunctionNode(pCxt, &yymsp[0].minor.yy659, NULL); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 193: /* rollup_func_name ::= FIRST */
case 194: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==194);
-{ yylhsminor.yy776 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 197: /* col_name ::= column_name */
-{ yylhsminor.yy776 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy641); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy659); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 198: /* cmd ::= SHOW DNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); }
@@ -4060,13 +4174,13 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); }
break;
case 201: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy776, yymsp[0].minor.yy776, OP_TYPE_LIKE); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy560, yymsp[0].minor.yy560, OP_TYPE_LIKE); }
break;
case 202: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy776, yymsp[0].minor.yy776, OP_TYPE_LIKE); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy560, yymsp[0].minor.yy560, OP_TYPE_LIKE); }
break;
case 203: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy776, NULL, OP_TYPE_LIKE); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy560, NULL, OP_TYPE_LIKE); }
break;
case 204: /* cmd ::= SHOW MNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); }
@@ -4081,7 +4195,7 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); }
break;
case 208: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy776, yymsp[-1].minor.yy776, OP_TYPE_EQUAL); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy560, yymsp[-1].minor.yy560, OP_TYPE_EQUAL); }
break;
case 209: /* cmd ::= SHOW STREAMS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); }
@@ -4100,13 +4214,13 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); }
break;
case 215: /* cmd ::= SHOW CREATE DATABASE db_name */
-{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy659); }
break;
case 216: /* cmd ::= SHOW CREATE TABLE full_table_name */
-{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy560); }
break;
case 217: /* cmd ::= SHOW CREATE STABLE full_table_name */
-{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy560); }
break;
case 218: /* cmd ::= SHOW QUERIES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); }
@@ -4139,7 +4253,7 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); }
break;
case 228: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
-{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy560); }
break;
case 229: /* cmd ::= SHOW CONSUMERS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); }
@@ -4148,7 +4262,7 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); }
break;
case 231: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy776, yymsp[-1].minor.yy776, OP_TYPE_EQUAL); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy560, yymsp[-1].minor.yy560, OP_TYPE_EQUAL); }
break;
case 232: /* cmd ::= SHOW VNODES NK_INTEGER */
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); }
@@ -4158,144 +4272,145 @@ static YYACTIONTYPE yy_reduce(
break;
case 234: /* db_name_cond_opt ::= */
case 239: /* from_db_opt ::= */ yytestcase(yyruleno==239);
-{ yymsp[1].minor.yy776 = createDefaultDatabaseCondValue(pCxt); }
+{ yymsp[1].minor.yy560 = createDefaultDatabaseCondValue(pCxt); }
break;
case 235: /* db_name_cond_opt ::= db_name NK_DOT */
-{ yylhsminor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy641); }
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy659); }
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
case 236: /* like_pattern_opt ::= */
- case 411: /* from_clause_opt ::= */ yytestcase(yyruleno==411);
- case 440: /* where_clause_opt ::= */ yytestcase(yyruleno==440);
- case 444: /* twindow_clause_opt ::= */ yytestcase(yyruleno==444);
- case 449: /* sliding_opt ::= */ yytestcase(yyruleno==449);
- case 451: /* fill_opt ::= */ yytestcase(yyruleno==451);
- case 463: /* having_clause_opt ::= */ yytestcase(yyruleno==463);
- case 465: /* range_opt ::= */ yytestcase(yyruleno==465);
- case 467: /* every_opt ::= */ yytestcase(yyruleno==467);
- case 480: /* slimit_clause_opt ::= */ yytestcase(yyruleno==480);
- case 484: /* limit_clause_opt ::= */ yytestcase(yyruleno==484);
-{ yymsp[1].minor.yy776 = NULL; }
+ case 390: /* case_when_else_opt ::= */ yytestcase(yyruleno==390);
+ case 420: /* from_clause_opt ::= */ yytestcase(yyruleno==420);
+ case 449: /* where_clause_opt ::= */ yytestcase(yyruleno==449);
+ case 453: /* twindow_clause_opt ::= */ yytestcase(yyruleno==453);
+ case 458: /* sliding_opt ::= */ yytestcase(yyruleno==458);
+ case 460: /* fill_opt ::= */ yytestcase(yyruleno==460);
+ case 472: /* having_clause_opt ::= */ yytestcase(yyruleno==472);
+ case 474: /* range_opt ::= */ yytestcase(yyruleno==474);
+ case 476: /* every_opt ::= */ yytestcase(yyruleno==476);
+ case 489: /* slimit_clause_opt ::= */ yytestcase(yyruleno==489);
+ case 493: /* limit_clause_opt ::= */ yytestcase(yyruleno==493);
+{ yymsp[1].minor.yy560 = NULL; }
break;
case 237: /* like_pattern_opt ::= LIKE NK_STRING */
-{ yymsp[-1].minor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
+{ yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
break;
case 238: /* table_name_cond ::= table_name */
-{ yylhsminor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy641); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy659); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 240: /* from_db_opt ::= FROM db_name */
-{ yymsp[-1].minor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy641); }
+{ yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy659); }
break;
case 241: /* 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.yy281, yymsp[-3].minor.yy776, yymsp[-1].minor.yy776, NULL, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy173, yymsp[-3].minor.yy560, yymsp[-1].minor.yy560, NULL, yymsp[0].minor.yy560); }
break;
case 242: /* cmd ::= DROP INDEX exists_opt full_table_name */
-{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy281, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); }
break;
case 243: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
-{ yymsp[-9].minor.yy776 = createIndexOption(pCxt, yymsp[-7].minor.yy280, releaseRawExprNode(pCxt, yymsp[-3].minor.yy776), NULL, yymsp[-1].minor.yy776, yymsp[0].minor.yy776); }
+{ yymsp[-9].minor.yy560 = createIndexOption(pCxt, yymsp[-7].minor.yy334, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), NULL, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); }
break;
case 244: /* 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.yy776 = createIndexOption(pCxt, yymsp[-9].minor.yy280, releaseRawExprNode(pCxt, yymsp[-5].minor.yy776), releaseRawExprNode(pCxt, yymsp[-3].minor.yy776), yymsp[-1].minor.yy776, yymsp[0].minor.yy776); }
+{ yymsp[-11].minor.yy560 = createIndexOption(pCxt, yymsp[-9].minor.yy334, releaseRawExprNode(pCxt, yymsp[-5].minor.yy560), releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), yymsp[-1].minor.yy560, yymsp[0].minor.yy560); }
break;
case 247: /* func ::= function_name NK_LP expression_list NK_RP */
-{ yylhsminor.yy776 = createFunctionNode(pCxt, &yymsp[-3].minor.yy641, yymsp[-1].minor.yy280); }
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createFunctionNode(pCxt, &yymsp[-3].minor.yy659, yymsp[-1].minor.yy334); }
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
case 248: /* sma_stream_opt ::= */
case 275: /* stream_options ::= */ yytestcase(yyruleno==275);
-{ yymsp[1].minor.yy776 = createStreamOptions(pCxt); }
+{ yymsp[1].minor.yy560 = createStreamOptions(pCxt); }
break;
case 249: /* sma_stream_opt ::= stream_options WATERMARK duration_literal */
case 279: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==279);
-{ ((SStreamOptions*)yymsp[-2].minor.yy776)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy776); yylhsminor.yy776 = yymsp[-2].minor.yy776; }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ ((SStreamOptions*)yymsp[-2].minor.yy560)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); yylhsminor.yy560 = yymsp[-2].minor.yy560; }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 250: /* sma_stream_opt ::= stream_options MAX_DELAY duration_literal */
-{ ((SStreamOptions*)yymsp[-2].minor.yy776)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy776); yylhsminor.yy776 = yymsp[-2].minor.yy776; }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ ((SStreamOptions*)yymsp[-2].minor.yy560)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); yylhsminor.yy560 = yymsp[-2].minor.yy560; }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 251: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
-{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy281, &yymsp[-2].minor.yy641, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy173, &yymsp[-2].minor.yy659, yymsp[0].minor.yy560); }
break;
case 252: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy281, &yymsp[-3].minor.yy641, &yymsp[0].minor.yy641, false); }
+{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy173, &yymsp[-3].minor.yy659, &yymsp[0].minor.yy659, false); }
break;
case 253: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy281, &yymsp[-5].minor.yy641, &yymsp[0].minor.yy641, true); }
+{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy173, &yymsp[-5].minor.yy659, &yymsp[0].minor.yy659, true); }
break;
case 254: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy281, &yymsp[-3].minor.yy641, yymsp[0].minor.yy776, false); }
+{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy173, &yymsp[-3].minor.yy659, yymsp[0].minor.yy560, false); }
break;
case 255: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy281, &yymsp[-5].minor.yy641, yymsp[0].minor.yy776, true); }
+{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy173, &yymsp[-5].minor.yy659, yymsp[0].minor.yy560, true); }
break;
case 256: /* cmd ::= DROP TOPIC exists_opt topic_name */
-{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy281, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy659); }
break;
case 257: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
-{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy281, &yymsp[-2].minor.yy641, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy173, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659); }
break;
case 258: /* cmd ::= DESC full_table_name */
case 259: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==259);
-{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy560); }
break;
case 260: /* cmd ::= RESET QUERY CACHE */
{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); }
break;
case 261: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
-{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy281, yymsp[-1].minor.yy776, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy173, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); }
break;
case 263: /* analyze_opt ::= ANALYZE */
case 270: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==270);
- case 431: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==431);
-{ yymsp[0].minor.yy281 = true; }
+ case 440: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==440);
+{ yymsp[0].minor.yy173 = true; }
break;
case 264: /* explain_options ::= */
-{ yymsp[1].minor.yy776 = createDefaultExplainOptions(pCxt); }
+{ yymsp[1].minor.yy560 = createDefaultExplainOptions(pCxt); }
break;
case 265: /* explain_options ::= explain_options VERBOSE NK_BOOL */
-{ yylhsminor.yy776 = setExplainVerbose(pCxt, yymsp[-2].minor.yy776, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setExplainVerbose(pCxt, yymsp[-2].minor.yy560, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 266: /* explain_options ::= explain_options RATIO NK_FLOAT */
-{ yylhsminor.yy776 = setExplainRatio(pCxt, yymsp[-2].minor.yy776, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = setExplainRatio(pCxt, yymsp[-2].minor.yy560, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 267: /* 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.yy281, yymsp[-8].minor.yy281, &yymsp[-5].minor.yy641, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy304, yymsp[0].minor.yy100); }
+{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy173, yymsp[-8].minor.yy173, &yymsp[-5].minor.yy659, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy574, yymsp[0].minor.yy676); }
break;
case 268: /* cmd ::= DROP FUNCTION exists_opt function_name */
-{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy281, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy659); }
break;
case 271: /* bufsize_opt ::= */
-{ yymsp[1].minor.yy100 = 0; }
+{ yymsp[1].minor.yy676 = 0; }
break;
case 272: /* bufsize_opt ::= BUFSIZE NK_INTEGER */
-{ yymsp[-1].minor.yy100 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
+{ yymsp[-1].minor.yy676 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 273: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name AS query_or_subquery */
-{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-6].minor.yy281, &yymsp[-5].minor.yy641, yymsp[-2].minor.yy776, yymsp[-4].minor.yy776, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-6].minor.yy173, &yymsp[-5].minor.yy659, yymsp[-2].minor.yy560, yymsp[-4].minor.yy560, yymsp[0].minor.yy560); }
break;
case 274: /* cmd ::= DROP STREAM exists_opt stream_name */
-{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy281, &yymsp[0].minor.yy641); }
+{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy659); }
break;
case 276: /* stream_options ::= stream_options TRIGGER AT_ONCE */
-{ ((SStreamOptions*)yymsp[-2].minor.yy776)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy776 = yymsp[-2].minor.yy776; }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ ((SStreamOptions*)yymsp[-2].minor.yy560)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy560 = yymsp[-2].minor.yy560; }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 277: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
-{ ((SStreamOptions*)yymsp[-2].minor.yy776)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy776 = yymsp[-2].minor.yy776; }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ ((SStreamOptions*)yymsp[-2].minor.yy560)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy560 = yymsp[-2].minor.yy560; }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
case 278: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
-{ ((SStreamOptions*)yymsp[-3].minor.yy776)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy776)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy776); yylhsminor.yy776 = yymsp[-3].minor.yy776; }
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+{ ((SStreamOptions*)yymsp[-3].minor.yy560)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy560)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); yylhsminor.yy560 = yymsp[-3].minor.yy560; }
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
case 280: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
-{ ((SStreamOptions*)yymsp[-3].minor.yy776)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy776 = yymsp[-3].minor.yy776; }
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+{ ((SStreamOptions*)yymsp[-3].minor.yy560)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy560 = yymsp[-3].minor.yy560; }
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
case 281: /* cmd ::= KILL CONNECTION NK_INTEGER */
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); }
@@ -4313,549 +4428,566 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
break;
case 286: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
-{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy280); }
+{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy334); }
break;
case 287: /* cmd ::= SPLIT VGROUP NK_INTEGER */
{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); }
break;
case 288: /* dnode_list ::= DNODE NK_INTEGER */
-{ yymsp[-1].minor.yy280 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+{ yymsp[-1].minor.yy334 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
break;
case 290: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
-{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy776, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); }
break;
case 292: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
-{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy776, yymsp[-2].minor.yy280, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy560, yymsp[-2].minor.yy334, yymsp[0].minor.yy560); }
break;
case 293: /* cmd ::= INSERT INTO full_table_name query_or_subquery */
-{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy776, NULL, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy560, NULL, yymsp[0].minor.yy560); }
break;
case 294: /* literal ::= NK_INTEGER */
-{ yylhsminor.yy776 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 295: /* literal ::= NK_FLOAT */
-{ yylhsminor.yy776 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 296: /* literal ::= NK_STRING */
-{ yylhsminor.yy776 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 297: /* literal ::= NK_BOOL */
-{ yylhsminor.yy776 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 298: /* literal ::= TIMESTAMP NK_STRING */
-{ yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
case 299: /* literal ::= duration_literal */
case 309: /* signed_literal ::= signed */ yytestcase(yyruleno==309);
- case 329: /* expression ::= literal */ yytestcase(yyruleno==329);
- case 330: /* expression ::= pseudo_column */ yytestcase(yyruleno==330);
- case 331: /* expression ::= column_reference */ yytestcase(yyruleno==331);
- case 332: /* expression ::= function_expression */ yytestcase(yyruleno==332);
- case 333: /* expression ::= subquery */ yytestcase(yyruleno==333);
- case 361: /* function_expression ::= literal_func */ yytestcase(yyruleno==361);
- case 403: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==403);
- case 407: /* boolean_primary ::= predicate */ yytestcase(yyruleno==407);
- case 409: /* common_expression ::= expression */ yytestcase(yyruleno==409);
- case 410: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==410);
- case 413: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==413);
- case 415: /* table_reference ::= table_primary */ yytestcase(yyruleno==415);
- case 416: /* table_reference ::= joined_table */ yytestcase(yyruleno==416);
- case 420: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==420);
- case 470: /* query_simple ::= query_specification */ yytestcase(yyruleno==470);
- case 471: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==471);
- case 474: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==474);
- case 476: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==476);
-{ yylhsminor.yy776 = yymsp[0].minor.yy776; }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+ case 329: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==329);
+ case 330: /* expr_or_subquery ::= subquery */ yytestcase(yyruleno==330);
+ case 331: /* expression ::= literal */ yytestcase(yyruleno==331);
+ case 332: /* expression ::= pseudo_column */ yytestcase(yyruleno==332);
+ case 333: /* expression ::= column_reference */ yytestcase(yyruleno==333);
+ case 334: /* expression ::= function_expression */ yytestcase(yyruleno==334);
+ case 335: /* expression ::= case_when_expression */ yytestcase(yyruleno==335);
+ case 363: /* function_expression ::= literal_func */ yytestcase(yyruleno==363);
+ case 412: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==412);
+ case 416: /* boolean_primary ::= predicate */ yytestcase(yyruleno==416);
+ case 418: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==418);
+ case 419: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==419);
+ case 422: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==422);
+ case 424: /* table_reference ::= table_primary */ yytestcase(yyruleno==424);
+ case 425: /* table_reference ::= joined_table */ yytestcase(yyruleno==425);
+ case 429: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==429);
+ case 479: /* query_simple ::= query_specification */ yytestcase(yyruleno==479);
+ case 480: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==480);
+ case 483: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==483);
+ case 485: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==485);
+{ yylhsminor.yy560 = yymsp[0].minor.yy560; }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 300: /* literal ::= NULL */
-{ yylhsminor.yy776 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 301: /* literal ::= NK_QUESTION */
-{ yylhsminor.yy776 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 302: /* duration_literal ::= NK_VARIABLE */
-{ yylhsminor.yy776 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 303: /* signed ::= NK_INTEGER */
-{ yylhsminor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 304: /* signed ::= NK_PLUS NK_INTEGER */
-{ yymsp[-1].minor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
+{ yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
break;
case 305: /* 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.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
+ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
}
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
case 306: /* signed ::= NK_FLOAT */
-{ yylhsminor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 307: /* signed ::= NK_PLUS NK_FLOAT */
-{ yymsp[-1].minor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
+{ yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
break;
case 308: /* 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.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
+ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
}
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
case 310: /* signed_literal ::= NK_STRING */
-{ yylhsminor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 311: /* signed_literal ::= NK_BOOL */
-{ yylhsminor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 312: /* signed_literal ::= TIMESTAMP NK_STRING */
-{ yymsp[-1].minor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
+{ yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
break;
case 313: /* signed_literal ::= duration_literal */
case 315: /* signed_literal ::= literal_func */ yytestcase(yyruleno==315);
- case 381: /* star_func_para ::= expression */ yytestcase(yyruleno==381);
- case 436: /* select_item ::= common_expression */ yytestcase(yyruleno==436);
- case 475: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==475);
- case 477: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==477);
- case 489: /* search_condition ::= common_expression */ yytestcase(yyruleno==489);
-{ yylhsminor.yy776 = releaseRawExprNode(pCxt, yymsp[0].minor.yy776); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+ case 383: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==383);
+ case 445: /* select_item ::= common_expression */ yytestcase(yyruleno==445);
+ case 484: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==484);
+ case 486: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==486);
+ case 499: /* search_condition ::= common_expression */ yytestcase(yyruleno==499);
+{ yylhsminor.yy560 = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 314: /* signed_literal ::= NULL */
-{ yylhsminor.yy776 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
case 316: /* signed_literal ::= NK_QUESTION */
-{ yylhsminor.yy776 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy560 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
- case 334: /* expression ::= NK_LP expression NK_RP */
- case 408: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==408);
-{ yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy776)); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 336: /* expression ::= NK_LP expression NK_RP */
+ case 417: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==417);
+ case 498: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==498);
+{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 335: /* expression ::= NK_PLUS expression */
+ case 337: /* expression ::= NK_PLUS expr_or_subquery */
{
- SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy776));
+ SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy560));
}
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
- case 336: /* expression ::= NK_MINUS expression */
+ case 338: /* expression ::= NK_MINUS expr_or_subquery */
{
- SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy776), NULL));
+ SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy560), NULL));
}
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
- case 337: /* expression ::= expression NK_PLUS expression */
+ case 339: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 338: /* expression ::= expression NK_MINUS expression */
+ case 340: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 339: /* expression ::= expression NK_STAR expression */
+ case 341: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 340: /* expression ::= expression NK_SLASH expression */
+ case 342: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 341: /* expression ::= expression NK_REM expression */
+ case 343: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 342: /* expression ::= column_reference NK_ARROW NK_STRING */
+ case 344: /* expression ::= column_reference NK_ARROW NK_STRING */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 343: /* expression ::= expression NK_BITAND expression */
+ case 345: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 344: /* expression ::= expression NK_BITOR expression */
+ case 346: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 347: /* column_reference ::= column_name */
-{ yylhsminor.yy776 = createRawExprNode(pCxt, &yymsp[0].minor.yy641, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy641)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+ case 349: /* column_reference ::= column_name */
+{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy659, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy659)); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
- case 348: /* column_reference ::= table_name NK_DOT column_name */
-{ yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy641, &yymsp[0].minor.yy641, createColumnNode(pCxt, &yymsp[-2].minor.yy641, &yymsp[0].minor.yy641)); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 350: /* column_reference ::= table_name NK_DOT column_name */
+{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659, createColumnNode(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659)); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 349: /* pseudo_column ::= ROWTS */
- case 350: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==350);
- case 352: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==352);
- case 353: /* pseudo_column ::= QEND */ yytestcase(yyruleno==353);
- case 354: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==354);
- case 355: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==355);
- case 356: /* pseudo_column ::= WEND */ yytestcase(yyruleno==356);
- case 357: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==357);
- case 363: /* literal_func ::= NOW */ yytestcase(yyruleno==363);
-{ yylhsminor.yy776 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+ case 351: /* pseudo_column ::= ROWTS */
+ case 352: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==352);
+ case 354: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==354);
+ case 355: /* pseudo_column ::= QEND */ yytestcase(yyruleno==355);
+ case 356: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==356);
+ case 357: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==357);
+ case 358: /* pseudo_column ::= WEND */ yytestcase(yyruleno==358);
+ case 359: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==359);
+ case 365: /* literal_func ::= NOW */ yytestcase(yyruleno==365);
+{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
- case 351: /* pseudo_column ::= table_name NK_DOT TBNAME */
-{ yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy641, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy641)))); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 353: /* pseudo_column ::= table_name NK_DOT TBNAME */
+{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy659)))); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 358: /* function_expression ::= function_name NK_LP expression_list NK_RP */
- case 359: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==359);
-{ yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy641, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy641, yymsp[-1].minor.yy280)); }
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+ case 360: /* function_expression ::= function_name NK_LP expression_list NK_RP */
+ case 361: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==361);
+{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy659, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy659, yymsp[-1].minor.yy334)); }
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
- case 360: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */
-{ yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy776), yymsp[-1].minor.yy304)); }
- yymsp[-5].minor.yy776 = yylhsminor.yy776;
+ case 362: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
+{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), yymsp[-1].minor.yy574)); }
+ yymsp[-5].minor.yy560 = yylhsminor.yy560;
break;
- case 362: /* literal_func ::= noarg_func NK_LP NK_RP */
-{ yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy641, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy641, NULL)); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 364: /* literal_func ::= noarg_func NK_LP NK_RP */
+{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy659, NULL)); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 377: /* star_func_para_list ::= NK_STAR */
-{ yylhsminor.yy280 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy280 = yylhsminor.yy280;
+ case 379: /* star_func_para_list ::= NK_STAR */
+{ yylhsminor.yy334 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy334 = yylhsminor.yy334;
break;
- case 382: /* star_func_para ::= table_name NK_DOT NK_STAR */
- case 439: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==439);
-{ yylhsminor.yy776 = createColumnNode(pCxt, &yymsp[-2].minor.yy641, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 384: /* star_func_para ::= table_name NK_DOT NK_STAR */
+ case 448: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==448);
+{ yylhsminor.yy560 = createColumnNode(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 383: /* predicate ::= expression compare_op expression */
- case 388: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==388);
+ case 385: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
+{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy334, yymsp[-1].minor.yy560)); }
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
+ break;
+ case 386: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
+{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), yymsp[-2].minor.yy334, yymsp[-1].minor.yy560)); }
+ yymsp[-4].minor.yy560 = yylhsminor.yy560;
+ break;
+ case 389: /* when_then_expr ::= WHEN common_expression THEN common_expression */
+{ yymsp[-3].minor.yy560 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); }
+ break;
+ case 391: /* case_when_else_opt ::= ELSE common_expression */
+{ yymsp[-1].minor.yy560 = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); }
+ break;
+ case 392: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */
+ case 397: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==397);
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy668, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy128, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 384: /* predicate ::= expression BETWEEN expression AND expression */
+ case 393: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy776), releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy560), releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-4].minor.yy776 = yylhsminor.yy776;
+ yymsp[-4].minor.yy560 = yylhsminor.yy560;
break;
- case 385: /* predicate ::= expression NOT BETWEEN expression AND expression */
+ case 394: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy776), releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy560), releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-5].minor.yy776 = yylhsminor.yy776;
+ yymsp[-5].minor.yy560 = yylhsminor.yy560;
break;
- case 386: /* predicate ::= expression IS NULL */
+ case 395: /* predicate ::= expr_or_subquery IS NULL */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), NULL));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), NULL));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 387: /* predicate ::= expression IS NOT NULL */
+ case 396: /* predicate ::= expr_or_subquery IS NOT NULL */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy776), NULL));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), NULL));
}
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
- case 389: /* compare_op ::= NK_LT */
-{ yymsp[0].minor.yy668 = OP_TYPE_LOWER_THAN; }
+ case 398: /* compare_op ::= NK_LT */
+{ yymsp[0].minor.yy128 = OP_TYPE_LOWER_THAN; }
break;
- case 390: /* compare_op ::= NK_GT */
-{ yymsp[0].minor.yy668 = OP_TYPE_GREATER_THAN; }
+ case 399: /* compare_op ::= NK_GT */
+{ yymsp[0].minor.yy128 = OP_TYPE_GREATER_THAN; }
break;
- case 391: /* compare_op ::= NK_LE */
-{ yymsp[0].minor.yy668 = OP_TYPE_LOWER_EQUAL; }
+ case 400: /* compare_op ::= NK_LE */
+{ yymsp[0].minor.yy128 = OP_TYPE_LOWER_EQUAL; }
break;
- case 392: /* compare_op ::= NK_GE */
-{ yymsp[0].minor.yy668 = OP_TYPE_GREATER_EQUAL; }
+ case 401: /* compare_op ::= NK_GE */
+{ yymsp[0].minor.yy128 = OP_TYPE_GREATER_EQUAL; }
break;
- case 393: /* compare_op ::= NK_NE */
-{ yymsp[0].minor.yy668 = OP_TYPE_NOT_EQUAL; }
+ case 402: /* compare_op ::= NK_NE */
+{ yymsp[0].minor.yy128 = OP_TYPE_NOT_EQUAL; }
break;
- case 394: /* compare_op ::= NK_EQ */
-{ yymsp[0].minor.yy668 = OP_TYPE_EQUAL; }
+ case 403: /* compare_op ::= NK_EQ */
+{ yymsp[0].minor.yy128 = OP_TYPE_EQUAL; }
break;
- case 395: /* compare_op ::= LIKE */
-{ yymsp[0].minor.yy668 = OP_TYPE_LIKE; }
+ case 404: /* compare_op ::= LIKE */
+{ yymsp[0].minor.yy128 = OP_TYPE_LIKE; }
break;
- case 396: /* compare_op ::= NOT LIKE */
-{ yymsp[-1].minor.yy668 = OP_TYPE_NOT_LIKE; }
+ case 405: /* compare_op ::= NOT LIKE */
+{ yymsp[-1].minor.yy128 = OP_TYPE_NOT_LIKE; }
break;
- case 397: /* compare_op ::= MATCH */
-{ yymsp[0].minor.yy668 = OP_TYPE_MATCH; }
+ case 406: /* compare_op ::= MATCH */
+{ yymsp[0].minor.yy128 = OP_TYPE_MATCH; }
break;
- case 398: /* compare_op ::= NMATCH */
-{ yymsp[0].minor.yy668 = OP_TYPE_NMATCH; }
+ case 407: /* compare_op ::= NMATCH */
+{ yymsp[0].minor.yy128 = OP_TYPE_NMATCH; }
break;
- case 399: /* compare_op ::= CONTAINS */
-{ yymsp[0].minor.yy668 = OP_TYPE_JSON_CONTAINS; }
+ case 408: /* compare_op ::= CONTAINS */
+{ yymsp[0].minor.yy128 = OP_TYPE_JSON_CONTAINS; }
break;
- case 400: /* in_op ::= IN */
-{ yymsp[0].minor.yy668 = OP_TYPE_IN; }
+ case 409: /* in_op ::= IN */
+{ yymsp[0].minor.yy128 = OP_TYPE_IN; }
break;
- case 401: /* in_op ::= NOT IN */
-{ yymsp[-1].minor.yy668 = OP_TYPE_NOT_IN; }
+ case 410: /* in_op ::= NOT IN */
+{ yymsp[-1].minor.yy128 = OP_TYPE_NOT_IN; }
break;
- case 402: /* in_predicate_value ::= NK_LP literal_list NK_RP */
-{ yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy280)); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 411: /* in_predicate_value ::= NK_LP literal_list NK_RP */
+{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy334)); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 404: /* boolean_value_expression ::= NOT boolean_primary */
+ case 413: /* boolean_value_expression ::= NOT boolean_primary */
{
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy776), NULL));
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy560), NULL));
}
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
- case 405: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
+ case 414: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 406: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
+ case 415: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy776);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy776);
- yylhsminor.yy776 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), releaseRawExprNode(pCxt, yymsp[0].minor.yy776)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560);
+ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)));
}
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 412: /* from_clause_opt ::= FROM table_reference_list */
- case 441: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==441);
- case 464: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==464);
-{ yymsp[-1].minor.yy776 = yymsp[0].minor.yy776; }
+ case 421: /* from_clause_opt ::= FROM table_reference_list */
+ case 450: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==450);
+ case 473: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==473);
+{ yymsp[-1].minor.yy560 = yymsp[0].minor.yy560; }
break;
- case 414: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
-{ yylhsminor.yy776 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy776, yymsp[0].minor.yy776, NULL); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 423: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
+{ yylhsminor.yy560 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy560, yymsp[0].minor.yy560, NULL); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 417: /* table_primary ::= table_name alias_opt */
-{ yylhsminor.yy776 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy641, &yymsp[0].minor.yy641); }
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+ case 426: /* table_primary ::= table_name alias_opt */
+{ yylhsminor.yy560 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy659, &yymsp[0].minor.yy659); }
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
- case 418: /* table_primary ::= db_name NK_DOT table_name alias_opt */
-{ yylhsminor.yy776 = createRealTableNode(pCxt, &yymsp[-3].minor.yy641, &yymsp[-1].minor.yy641, &yymsp[0].minor.yy641); }
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+ case 427: /* table_primary ::= db_name NK_DOT table_name alias_opt */
+{ yylhsminor.yy560 = createRealTableNode(pCxt, &yymsp[-3].minor.yy659, &yymsp[-1].minor.yy659, &yymsp[0].minor.yy659); }
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
- case 419: /* table_primary ::= subquery alias_opt */
-{ yylhsminor.yy776 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy776), &yymsp[0].minor.yy641); }
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+ case 428: /* table_primary ::= subquery alias_opt */
+{ yylhsminor.yy560 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560), &yymsp[0].minor.yy659); }
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
- case 421: /* alias_opt ::= */
-{ yymsp[1].minor.yy641 = nil_token; }
+ case 430: /* alias_opt ::= */
+{ yymsp[1].minor.yy659 = nil_token; }
break;
- case 422: /* alias_opt ::= table_alias */
-{ yylhsminor.yy641 = yymsp[0].minor.yy641; }
- yymsp[0].minor.yy641 = yylhsminor.yy641;
+ case 431: /* alias_opt ::= table_alias */
+{ yylhsminor.yy659 = yymsp[0].minor.yy659; }
+ yymsp[0].minor.yy659 = yylhsminor.yy659;
break;
- case 423: /* alias_opt ::= AS table_alias */
-{ yymsp[-1].minor.yy641 = yymsp[0].minor.yy641; }
+ case 432: /* alias_opt ::= AS table_alias */
+{ yymsp[-1].minor.yy659 = yymsp[0].minor.yy659; }
break;
- case 424: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
- case 425: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==425);
-{ yymsp[-2].minor.yy776 = yymsp[-1].minor.yy776; }
+ case 433: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
+ case 434: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==434);
+{ yymsp[-2].minor.yy560 = yymsp[-1].minor.yy560; }
break;
- case 426: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
-{ yylhsminor.yy776 = createJoinTableNode(pCxt, yymsp[-4].minor.yy468, yymsp[-5].minor.yy776, yymsp[-2].minor.yy776, yymsp[0].minor.yy776); }
- yymsp[-5].minor.yy776 = yylhsminor.yy776;
+ case 435: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
+{ yylhsminor.yy560 = createJoinTableNode(pCxt, yymsp[-4].minor.yy540, yymsp[-5].minor.yy560, yymsp[-2].minor.yy560, yymsp[0].minor.yy560); }
+ yymsp[-5].minor.yy560 = yylhsminor.yy560;
break;
- case 427: /* join_type ::= */
-{ yymsp[1].minor.yy468 = JOIN_TYPE_INNER; }
+ case 436: /* join_type ::= */
+{ yymsp[1].minor.yy540 = JOIN_TYPE_INNER; }
break;
- case 428: /* join_type ::= INNER */
-{ yymsp[0].minor.yy468 = JOIN_TYPE_INNER; }
+ case 437: /* join_type ::= INNER */
+{ yymsp[0].minor.yy540 = JOIN_TYPE_INNER; }
break;
- case 429: /* 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 438: /* 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.yy776 = createSelectStmt(pCxt, yymsp[-10].minor.yy281, yymsp[-9].minor.yy280, yymsp[-8].minor.yy776);
- yymsp[-11].minor.yy776 = addWhereClause(pCxt, yymsp[-11].minor.yy776, yymsp[-7].minor.yy776);
- yymsp[-11].minor.yy776 = addPartitionByClause(pCxt, yymsp[-11].minor.yy776, yymsp[-6].minor.yy280);
- yymsp[-11].minor.yy776 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy776, yymsp[-2].minor.yy776);
- yymsp[-11].minor.yy776 = addGroupByClause(pCxt, yymsp[-11].minor.yy776, yymsp[-1].minor.yy280);
- yymsp[-11].minor.yy776 = addHavingClause(pCxt, yymsp[-11].minor.yy776, yymsp[0].minor.yy776);
- yymsp[-11].minor.yy776 = addRangeClause(pCxt, yymsp[-11].minor.yy776, yymsp[-5].minor.yy776);
- yymsp[-11].minor.yy776 = addEveryClause(pCxt, yymsp[-11].minor.yy776, yymsp[-4].minor.yy776);
- yymsp[-11].minor.yy776 = addFillClause(pCxt, yymsp[-11].minor.yy776, yymsp[-3].minor.yy776);
+ yymsp[-11].minor.yy560 = createSelectStmt(pCxt, yymsp[-10].minor.yy173, yymsp[-9].minor.yy334, yymsp[-8].minor.yy560);
+ yymsp[-11].minor.yy560 = addWhereClause(pCxt, yymsp[-11].minor.yy560, yymsp[-7].minor.yy560);
+ yymsp[-11].minor.yy560 = addPartitionByClause(pCxt, yymsp[-11].minor.yy560, yymsp[-6].minor.yy334);
+ yymsp[-11].minor.yy560 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy560, yymsp[-2].minor.yy560);
+ yymsp[-11].minor.yy560 = addGroupByClause(pCxt, yymsp[-11].minor.yy560, yymsp[-1].minor.yy334);
+ yymsp[-11].minor.yy560 = addHavingClause(pCxt, yymsp[-11].minor.yy560, yymsp[0].minor.yy560);
+ yymsp[-11].minor.yy560 = addRangeClause(pCxt, yymsp[-11].minor.yy560, yymsp[-5].minor.yy560);
+ yymsp[-11].minor.yy560 = addEveryClause(pCxt, yymsp[-11].minor.yy560, yymsp[-4].minor.yy560);
+ yymsp[-11].minor.yy560 = addFillClause(pCxt, yymsp[-11].minor.yy560, yymsp[-3].minor.yy560);
}
break;
- case 432: /* set_quantifier_opt ::= ALL */
-{ yymsp[0].minor.yy281 = false; }
+ case 441: /* set_quantifier_opt ::= ALL */
+{ yymsp[0].minor.yy173 = false; }
break;
- case 435: /* select_item ::= NK_STAR */
-{ yylhsminor.yy776 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+ case 444: /* select_item ::= NK_STAR */
+{ yylhsminor.yy560 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy560 = yylhsminor.yy560;
break;
- case 437: /* select_item ::= common_expression column_alias */
-{ yylhsminor.yy776 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy776), &yymsp[0].minor.yy641); }
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+ case 446: /* select_item ::= common_expression column_alias */
+{ yylhsminor.yy560 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560), &yymsp[0].minor.yy659); }
+ yymsp[-1].minor.yy560 = yylhsminor.yy560;
break;
- case 438: /* select_item ::= common_expression AS column_alias */
-{ yylhsminor.yy776 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), &yymsp[0].minor.yy641); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 447: /* select_item ::= common_expression AS column_alias */
+{ yylhsminor.yy560 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), &yymsp[0].minor.yy659); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 443: /* partition_by_clause_opt ::= PARTITION BY expression_list */
- case 460: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==460);
- case 479: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==479);
-{ yymsp[-2].minor.yy280 = yymsp[0].minor.yy280; }
+ case 452: /* partition_by_clause_opt ::= PARTITION BY expression_list */
+ case 469: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==469);
+ case 488: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==488);
+{ yymsp[-2].minor.yy334 = yymsp[0].minor.yy334; }
break;
- case 445: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
-{ yymsp[-5].minor.yy776 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy776), releaseRawExprNode(pCxt, yymsp[-1].minor.yy776)); }
+ case 454: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
+{ yymsp[-5].minor.yy560 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); }
break;
- case 446: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */
-{ yymsp[-3].minor.yy776 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy776)); }
+ case 455: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
+{ yymsp[-3].minor.yy560 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); }
break;
- case 447: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
-{ yymsp[-5].minor.yy776 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy776), NULL, yymsp[-1].minor.yy776, yymsp[0].minor.yy776); }
+ case 456: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
+{ yymsp[-5].minor.yy560 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), NULL, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); }
break;
- case 448: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
-{ yymsp[-7].minor.yy776 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy776), releaseRawExprNode(pCxt, yymsp[-3].minor.yy776), yymsp[-1].minor.yy776, yymsp[0].minor.yy776); }
+ case 457: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
+{ yymsp[-7].minor.yy560 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy560), releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), yymsp[-1].minor.yy560, yymsp[0].minor.yy560); }
break;
- case 450: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
- case 468: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==468);
-{ yymsp[-3].minor.yy776 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy776); }
+ case 459: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
+ case 477: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==477);
+{ yymsp[-3].minor.yy560 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy560); }
break;
- case 452: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
-{ yymsp[-3].minor.yy776 = createFillNode(pCxt, yymsp[-1].minor.yy774, NULL); }
+ case 461: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
+{ yymsp[-3].minor.yy560 = createFillNode(pCxt, yymsp[-1].minor.yy18, NULL); }
break;
- case 453: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
-{ yymsp[-5].minor.yy776 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy280)); }
+ case 462: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
+{ yymsp[-5].minor.yy560 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy334)); }
break;
- case 454: /* fill_mode ::= NONE */
-{ yymsp[0].minor.yy774 = FILL_MODE_NONE; }
+ case 463: /* fill_mode ::= NONE */
+{ yymsp[0].minor.yy18 = FILL_MODE_NONE; }
break;
- case 455: /* fill_mode ::= PREV */
-{ yymsp[0].minor.yy774 = FILL_MODE_PREV; }
+ case 464: /* fill_mode ::= PREV */
+{ yymsp[0].minor.yy18 = FILL_MODE_PREV; }
break;
- case 456: /* fill_mode ::= NULL */
-{ yymsp[0].minor.yy774 = FILL_MODE_NULL; }
+ case 465: /* fill_mode ::= NULL */
+{ yymsp[0].minor.yy18 = FILL_MODE_NULL; }
break;
- case 457: /* fill_mode ::= LINEAR */
-{ yymsp[0].minor.yy774 = FILL_MODE_LINEAR; }
+ case 466: /* fill_mode ::= LINEAR */
+{ yymsp[0].minor.yy18 = FILL_MODE_LINEAR; }
break;
- case 458: /* fill_mode ::= NEXT */
-{ yymsp[0].minor.yy774 = FILL_MODE_NEXT; }
+ case 467: /* fill_mode ::= NEXT */
+{ yymsp[0].minor.yy18 = FILL_MODE_NEXT; }
break;
- case 461: /* group_by_list ::= expression */
-{ yylhsminor.yy280 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy776))); }
- yymsp[0].minor.yy280 = yylhsminor.yy280;
+ case 470: /* group_by_list ::= expr_or_subquery */
+{ yylhsminor.yy334 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); }
+ yymsp[0].minor.yy334 = yylhsminor.yy334;
break;
- case 462: /* group_by_list ::= group_by_list NK_COMMA expression */
-{ yylhsminor.yy280 = addNodeToList(pCxt, yymsp[-2].minor.yy280, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy776))); }
- yymsp[-2].minor.yy280 = yylhsminor.yy280;
+ case 471: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
+{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); }
+ yymsp[-2].minor.yy334 = yylhsminor.yy334;
break;
- case 466: /* range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */
-{ yymsp[-5].minor.yy776 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy776), releaseRawExprNode(pCxt, yymsp[-1].minor.yy776)); }
+ case 475: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
+{ yymsp[-5].minor.yy560 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); }
break;
- case 469: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
+ case 478: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
{
- yylhsminor.yy776 = addOrderByClause(pCxt, yymsp[-3].minor.yy776, yymsp[-2].minor.yy280);
- yylhsminor.yy776 = addSlimitClause(pCxt, yylhsminor.yy776, yymsp[-1].minor.yy776);
- yylhsminor.yy776 = addLimitClause(pCxt, yylhsminor.yy776, yymsp[0].minor.yy776);
+ yylhsminor.yy560 = addOrderByClause(pCxt, yymsp[-3].minor.yy560, yymsp[-2].minor.yy334);
+ yylhsminor.yy560 = addSlimitClause(pCxt, yylhsminor.yy560, yymsp[-1].minor.yy560);
+ yylhsminor.yy560 = addLimitClause(pCxt, yylhsminor.yy560, yymsp[0].minor.yy560);
}
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
- case 472: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
-{ yylhsminor.yy776 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy776, yymsp[0].minor.yy776); }
- yymsp[-3].minor.yy776 = yylhsminor.yy776;
+ case 481: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
+{ yylhsminor.yy560 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy560, yymsp[0].minor.yy560); }
+ yymsp[-3].minor.yy560 = yylhsminor.yy560;
break;
- case 473: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
-{ yylhsminor.yy776 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy776, yymsp[0].minor.yy776); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 482: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
+{ yylhsminor.yy560 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy560, yymsp[0].minor.yy560); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 481: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
- case 485: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==485);
-{ yymsp[-1].minor.yy776 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
+ case 490: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
+ case 494: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==494);
+{ yymsp[-1].minor.yy560 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
break;
- case 482: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
- case 486: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==486);
-{ yymsp[-3].minor.yy776 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
+ case 491: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
+ case 495: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==495);
+{ yymsp[-3].minor.yy560 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
break;
- case 483: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
- case 487: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==487);
-{ yymsp[-3].minor.yy776 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
+ case 492: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
+ case 496: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==496);
+{ yymsp[-3].minor.yy560 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
break;
- case 488: /* subquery ::= NK_LP query_expression NK_RP */
-{ yylhsminor.yy776 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy776); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 497: /* subquery ::= NK_LP query_expression NK_RP */
+{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy560); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 492: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */
-{ yylhsminor.yy776 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy776), yymsp[-1].minor.yy2, yymsp[0].minor.yy649); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 502: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
+{ yylhsminor.yy560 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), yymsp[-1].minor.yy596, yymsp[0].minor.yy487); }
+ yymsp[-2].minor.yy560 = yylhsminor.yy560;
break;
- case 493: /* ordering_specification_opt ::= */
-{ yymsp[1].minor.yy2 = ORDER_ASC; }
+ case 503: /* ordering_specification_opt ::= */
+{ yymsp[1].minor.yy596 = ORDER_ASC; }
break;
- case 494: /* ordering_specification_opt ::= ASC */
-{ yymsp[0].minor.yy2 = ORDER_ASC; }
+ case 504: /* ordering_specification_opt ::= ASC */
+{ yymsp[0].minor.yy596 = ORDER_ASC; }
break;
- case 495: /* ordering_specification_opt ::= DESC */
-{ yymsp[0].minor.yy2 = ORDER_DESC; }
+ case 505: /* ordering_specification_opt ::= DESC */
+{ yymsp[0].minor.yy596 = ORDER_DESC; }
break;
- case 496: /* null_ordering_opt ::= */
-{ yymsp[1].minor.yy649 = NULL_ORDER_DEFAULT; }
+ case 506: /* null_ordering_opt ::= */
+{ yymsp[1].minor.yy487 = NULL_ORDER_DEFAULT; }
break;
- case 497: /* null_ordering_opt ::= NULLS FIRST */
-{ yymsp[-1].minor.yy649 = NULL_ORDER_FIRST; }
+ case 507: /* null_ordering_opt ::= NULLS FIRST */
+{ yymsp[-1].minor.yy487 = NULL_ORDER_FIRST; }
break;
- case 498: /* null_ordering_opt ::= NULLS LAST */
-{ yymsp[-1].minor.yy649 = NULL_ORDER_LAST; }
+ case 508: /* null_ordering_opt ::= NULLS LAST */
+{ yymsp[-1].minor.yy487 = NULL_ORDER_LAST; }
break;
default:
break;
diff --git a/source/libs/parser/test/parSelectTest.cpp b/source/libs/parser/test/parSelectTest.cpp
index 716dd7ffc0..79a7038401 100644
--- a/source/libs/parser/test/parSelectTest.cpp
+++ b/source/libs/parser/test/parSelectTest.cpp
@@ -60,6 +60,9 @@ TEST_F(ParserSelectTest, expression) {
run("SELECT ts > 0, c1 between 10 and 20 and c2 = 'qaz' FROM t1");
run("SELECT c1 | 10, c2 & 20, c4 | c5 FROM t1");
+
+ run("SELECT CASE WHEN ts > '2020-1-1 10:10:10' THEN c1 + 10 ELSE c1 - 10 END FROM t1 "
+ "WHERE CASE c1 WHEN c3 + 20 THEN c3 - 1 WHEN c3 + 10 THEN c3 - 2 ELSE 10 END > 0");
}
TEST_F(ParserSelectTest, condition) {
@@ -312,6 +315,8 @@ TEST_F(ParserSelectTest, subquery) {
run("SELECT _C0 FROM (SELECT _ROWTS, ts FROM st1s1)");
run("SELECT ts FROM (SELECT t1.ts FROM st1s1 t1)");
+
+ run("(((SELECT t1.ts FROM st1s1 t1)))");
}
TEST_F(ParserSelectTest, subquerySemanticCheck) {
@@ -445,4 +450,11 @@ TEST_F(ParserSelectTest, withoutFromSemanticCheck) {
run("SELECT TBNAME", TSDB_CODE_PAR_INVALID_TBNAME);
}
+TEST_F(ParserSelectTest, joinSemanticCheck) {
+ useDb("root", "test");
+
+ run("SELECT * FROM (SELECT tag1, SUM(c1) s FROM st1 GROUP BY tag1) t1, st1 t2 where t1.tag1 = t2.tag1",
+ TSDB_CODE_PAR_NOT_SUPPORT_JOIN);
+}
+
} // namespace ParserTest
diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c
index b0177e61ed..ec7050fdbc 100644
--- a/source/libs/planner/src/planPhysiCreater.c
+++ b/source/libs/planner/src/planPhysiCreater.c
@@ -1046,7 +1046,8 @@ static int32_t doCreateExchangePhysiNode(SPhysiPlanContext* pCxt, SExchangeLogic
return TSDB_CODE_OUT_OF_MEMORY;
}
- pExchange->srcGroupId = pExchangeLogicNode->srcGroupId;
+ pExchange->srcStartGroupId = pExchangeLogicNode->srcStartGroupId;
+ pExchange->srcEndGroupId = pExchangeLogicNode->srcEndGroupId;
*pPhyNode = (SPhysiNode*)pExchange;
return TSDB_CODE_SUCCESS;
@@ -1425,7 +1426,8 @@ static int32_t createExchangePhysiNodeByMerge(SMergePhysiNode* pMerge) {
if (NULL == pExchange) {
return TSDB_CODE_OUT_OF_MEMORY;
}
- pExchange->srcGroupId = pMerge->srcGroupId;
+ pExchange->srcStartGroupId = pMerge->srcGroupId;
+ pExchange->srcEndGroupId = pMerge->srcGroupId;
pExchange->singleChannel = true;
pExchange->node.pParent = (SPhysiNode*)pMerge;
pExchange->node.pOutputDataBlockDesc = (SDataBlockDescNode*)nodesCloneNode((SNode*)pMerge->node.pOutputDataBlockDesc);
diff --git a/source/libs/planner/src/planSpliter.c b/source/libs/planner/src/planSpliter.c
index 106e674152..74ed3b57a4 100644
--- a/source/libs/planner/src/planSpliter.c
+++ b/source/libs/planner/src/planSpliter.c
@@ -84,7 +84,8 @@ static int32_t splCreateExchangeNode(SSplitContext* pCxt, SLogicNode* pChild, SE
if (NULL == pExchange) {
return TSDB_CODE_OUT_OF_MEMORY;
}
- pExchange->srcGroupId = pCxt->groupId;
+ pExchange->srcStartGroupId = pCxt->groupId;
+ pExchange->srcEndGroupId = pCxt->groupId;
pExchange->node.precision = pChild->precision;
pExchange->node.pTargets = nodesCloneList(pChild->pTargets);
if (NULL == pExchange->node.pTargets) {
@@ -112,7 +113,8 @@ static int32_t splCreateExchangeNodeForSubplan(SSplitContext* pCxt, SLogicSubpla
static bool splIsChildSubplan(SLogicNode* pLogicNode, int32_t groupId) {
if (QUERY_NODE_LOGIC_PLAN_EXCHANGE == nodeType(pLogicNode)) {
- return ((SExchangeLogicNode*)pLogicNode)->srcGroupId == groupId;
+ return groupId >= ((SExchangeLogicNode*)pLogicNode)->srcStartGroupId &&
+ groupId <= ((SExchangeLogicNode*)pLogicNode)->srcEndGroupId;
}
if (QUERY_NODE_LOGIC_PLAN_MERGE == nodeType(pLogicNode)) {
@@ -1184,6 +1186,7 @@ static int32_t unionSplitSubplan(SSplitContext* pCxt, SLogicSubplan* pUnionSubpl
if (TSDB_CODE_SUCCESS != code) {
break;
}
+ ++(pCxt->groupId);
}
if (TSDB_CODE_SUCCESS == code) {
nodesDestroyList(pSubplanChildren);
@@ -1207,12 +1210,14 @@ static bool unAllSplFindSplitNode(SSplitContext* pCxt, SLogicSubplan* pSubplan,
return false;
}
-static int32_t unAllSplCreateExchangeNode(SSplitContext* pCxt, SLogicSubplan* pSubplan, SProjectLogicNode* pProject) {
+static int32_t unAllSplCreateExchangeNode(SSplitContext* pCxt, int32_t startGroupId, SLogicSubplan* pSubplan,
+ SProjectLogicNode* pProject) {
SExchangeLogicNode* pExchange = (SExchangeLogicNode*)nodesMakeNode(QUERY_NODE_LOGIC_PLAN_EXCHANGE);
if (NULL == pExchange) {
return TSDB_CODE_OUT_OF_MEMORY;
}
- pExchange->srcGroupId = pCxt->groupId;
+ pExchange->srcStartGroupId = startGroupId;
+ pExchange->srcEndGroupId = pCxt->groupId - 1;
pExchange->node.precision = pProject->node.precision;
pExchange->node.pTargets = nodesCloneList(pProject->node.pTargets);
if (NULL == pExchange->node.pTargets) {
@@ -1246,11 +1251,11 @@ static int32_t unionAllSplit(SSplitContext* pCxt, SLogicSubplan* pSubplan) {
return TSDB_CODE_SUCCESS;
}
+ int32_t startGroupId = pCxt->groupId;
int32_t code = unionSplitSubplan(pCxt, info.pSubplan, (SLogicNode*)info.pProject);
if (TSDB_CODE_SUCCESS == code) {
- code = unAllSplCreateExchangeNode(pCxt, info.pSubplan, info.pProject);
+ code = unAllSplCreateExchangeNode(pCxt, startGroupId, info.pSubplan, info.pProject);
}
- ++(pCxt->groupId);
pCxt->split = true;
return code;
}
@@ -1260,12 +1265,14 @@ typedef struct SUnionDistinctSplitInfo {
SLogicSubplan* pSubplan;
} SUnionDistinctSplitInfo;
-static int32_t unDistSplCreateExchangeNode(SSplitContext* pCxt, SLogicSubplan* pSubplan, SAggLogicNode* pAgg) {
+static int32_t unDistSplCreateExchangeNode(SSplitContext* pCxt, int32_t startGroupId, SLogicSubplan* pSubplan,
+ SAggLogicNode* pAgg) {
SExchangeLogicNode* pExchange = (SExchangeLogicNode*)nodesMakeNode(QUERY_NODE_LOGIC_PLAN_EXCHANGE);
if (NULL == pExchange) {
return TSDB_CODE_OUT_OF_MEMORY;
}
- pExchange->srcGroupId = pCxt->groupId;
+ pExchange->srcStartGroupId = startGroupId;
+ pExchange->srcEndGroupId = pCxt->groupId - 1;
pExchange->node.precision = pAgg->node.precision;
pExchange->node.pTargets = nodesCloneList(pAgg->pGroupKeys);
if (NULL == pExchange->node.pTargets) {
@@ -1293,11 +1300,11 @@ static int32_t unionDistinctSplit(SSplitContext* pCxt, SLogicSubplan* pSubplan)
return TSDB_CODE_SUCCESS;
}
+ int32_t startGroupId = pCxt->groupId;
int32_t code = unionSplitSubplan(pCxt, info.pSubplan, (SLogicNode*)info.pAgg);
if (TSDB_CODE_SUCCESS == code) {
- code = unDistSplCreateExchangeNode(pCxt, info.pSubplan, info.pAgg);
+ code = unDistSplCreateExchangeNode(pCxt, startGroupId, info.pSubplan, info.pAgg);
}
- ++(pCxt->groupId);
pCxt->split = true;
return code;
}
@@ -1430,7 +1437,7 @@ static const SSplitRule splitRuleSet[] = {
{.pName = "SingleTableJoinSplit", .splitFunc = singleTableJoinSplit},
{.pName = "UnionAllSplit", .splitFunc = unionAllSplit},
{.pName = "UnionDistinctSplit", .splitFunc = unionDistinctSplit},
- {.pName = "SmaIndexSplit", .splitFunc = smaIndexSplit},
+ {.pName = "SmaIndexSplit", .splitFunc = smaIndexSplit}, // not used yet
{.pName = "InsertSelectSplit", .splitFunc = insertSelectSplit}
};
// clang-format on
diff --git a/source/libs/planner/src/planner.c b/source/libs/planner/src/planner.c
index e4f02f12e6..53549c122d 100644
--- a/source/libs/planner/src/planner.c
+++ b/source/libs/planner/src/planner.c
@@ -63,7 +63,7 @@ int32_t qCreateQueryPlan(SPlanContext* pCxt, SQueryPlan** pPlan, SArray* pExecNo
static int32_t setSubplanExecutionNode(SPhysiNode* pNode, int32_t groupId, SDownstreamSourceNode* pSource) {
if (QUERY_NODE_PHYSICAL_PLAN_EXCHANGE == nodeType(pNode)) {
SExchangePhysiNode* pExchange = (SExchangePhysiNode*)pNode;
- if (pExchange->srcGroupId == groupId) {
+ if (groupId >= pExchange->srcStartGroupId && groupId <= pExchange->srcEndGroupId) {
return nodesListMakeStrictAppend(&pExchange->pSrcEndPoints, nodesCloneNode((SNode*)pSource));
}
} else if (QUERY_NODE_PHYSICAL_PLAN_MERGE == nodeType(pNode)) {
diff --git a/source/libs/planner/test/planBasicTest.cpp b/source/libs/planner/test/planBasicTest.cpp
index 27ec409d52..c7769b15b1 100644
--- a/source/libs/planner/test/planBasicTest.cpp
+++ b/source/libs/planner/test/planBasicTest.cpp
@@ -40,6 +40,13 @@ TEST_F(PlanBasicTest, whereClause) {
run("SELECT ts, c1 FROM t1 WHERE ts > NOW AND ts IS NULL AND (c1 > 0 OR c3 < 20)");
}
+TEST_F(PlanBasicTest, caseWhen) {
+ useDb("root", "test");
+
+ run("SELECT CASE WHEN ts > '2020-1-1 10:10:10' THEN c1 + 10 ELSE c1 - 10 END FROM t1 "
+ "WHERE CASE c1 WHEN c2 + 20 THEN c4 - 1 WHEN c2 + 10 THEN c4 - 2 ELSE 10 END > 0");
+}
+
TEST_F(PlanBasicTest, func) {
useDb("root", "test");
diff --git a/source/libs/planner/test/planJoinTest.cpp b/source/libs/planner/test/planJoinTest.cpp
index 66ef4d3f19..535bb0b416 100644
--- a/source/libs/planner/test/planJoinTest.cpp
+++ b/source/libs/planner/test/planJoinTest.cpp
@@ -28,6 +28,8 @@ TEST_F(PlanJoinTest, basic) {
run("SELECT t1.*, t2.* FROM st1s1 t1, st1s2 t2 WHERE t1.ts = t2.ts");
run("SELECT t1.c1, t2.c1 FROM st1s1 t1 JOIN st1s2 t2 ON t1.ts = t2.ts");
+
+ run("SELECT t1.c1, t2.c1 FROM st1 t1 JOIN st2 t2 ON t1.ts = t2.ts");
}
TEST_F(PlanJoinTest, complex) {
@@ -56,9 +58,3 @@ TEST_F(PlanJoinTest, multiJoin) {
run("SELECT t1.c1, t2.c1 FROM st1s1 t1 JOIN st1s2 t2 ON t1.ts = t2.ts JOIN st1s3 t3 ON t1.ts = t3.ts");
}
-
-TEST_F(PlanJoinTest, stable) {
- useDb("root", "test");
-
- run("SELECT t1.c1, t2.c1 FROM st1 t1 JOIN st2 t2 ON t1.ts = t2.ts ");
-}
diff --git a/source/libs/scalar/inc/filterInt.h b/source/libs/scalar/inc/filterInt.h
index e7695b2f04..5d243d86e8 100644
--- a/source/libs/scalar/inc/filterInt.h
+++ b/source/libs/scalar/inc/filterInt.h
@@ -99,7 +99,7 @@ typedef struct SFilterRange {
typedef bool (*rangeCompFunc) (const void *, const void *, const void *, const void *, __compar_fn_t);
typedef int32_t(*filter_desc_compare_func)(const void *, const void *);
-typedef bool(*filter_exec_func)(void *, int32_t, int8_t**, SColumnDataAgg *, int16_t);
+typedef bool(*filter_exec_func)(void *info, int32_t numOfRows, SColumnInfoData* p, SColumnDataAgg *statis, int16_t numOfCols);
typedef int32_t (*filer_get_col_from_name)(void *, int32_t, char*, void **);
typedef struct SFilterRangeCompare {
diff --git a/source/libs/scalar/src/filter.c b/source/libs/scalar/src/filter.c
index 9e67635437..dc6b505bb9 100644
--- a/source/libs/scalar/src/filter.c
+++ b/source/libs/scalar/src/filter.c
@@ -2976,14 +2976,12 @@ _return:
return TSDB_CODE_SUCCESS;
}
-bool filterExecuteBasedOnStatisImpl(void *pinfo, int32_t numOfRows, int8_t** p, SColumnDataAgg *statis, int16_t numOfCols) {
+bool filterExecuteBasedOnStatisImpl(void *pinfo, int32_t numOfRows, SColumnInfoData* pRes, SColumnDataAgg *statis, int16_t numOfCols) {
SFilterInfo *info = (SFilterInfo *)pinfo;
bool all = true;
uint32_t *unitIdx = NULL;
- if (*p == NULL) {
- *p = taosMemoryCalloc(numOfRows, sizeof(int8_t));
- }
+ int8_t* p = (int8_t*)pRes->pData;
for (int32_t i = 0; i < numOfRows; ++i) {
//FILTER_UNIT_CLR_F(info);
@@ -3002,35 +3000,35 @@ bool filterExecuteBasedOnStatisImpl(void *pinfo, int32_t numOfRows, int8_t** p,
uint8_t optr = cunit->optr;
if (colDataIsNull((SColumnInfoData *)(cunit->colData), 0, i, NULL)) {
- (*p)[i] = optr == OP_TYPE_IS_NULL ? true : false;
+ p[i] = (optr == OP_TYPE_IS_NULL) ? true : false;
} else {
if (optr == OP_TYPE_IS_NOT_NULL) {
- (*p)[i] = 1;
+ p[i] = 1;
} else if (optr == OP_TYPE_IS_NULL) {
- (*p)[i] = 0;
+ p[i] = 0;
} else if (cunit->rfunc >= 0) {
- (*p)[i] = (*gRangeCompare[cunit->rfunc])(colData, colData, cunit->valData, cunit->valData2, gDataCompare[cunit->func]);
+ p[i] = (*gRangeCompare[cunit->rfunc])(colData, colData, cunit->valData, cunit->valData2, gDataCompare[cunit->func]);
} else {
- (*p)[i] = filterDoCompare(gDataCompare[cunit->func], cunit->optr, colData, cunit->valData);
+ p[i] = filterDoCompare(gDataCompare[cunit->func], cunit->optr, colData, cunit->valData);
}
//FILTER_UNIT_SET_R(info, uidx, p[i]);
//FILTER_UNIT_SET_F(info, uidx);
}
- if ((*p)[i] == 0) {
+ if (p[i] == 0) {
break;
}
}
- if ((*p)[i]) {
+ if (p[i]) {
break;
}
unitIdx += unitNum;
}
- if ((*p)[i] == 0) {
+ if (p[i] == 0) {
all = false;
}
}
@@ -3040,7 +3038,7 @@ bool filterExecuteBasedOnStatisImpl(void *pinfo, int32_t numOfRows, int8_t** p,
-int32_t filterExecuteBasedOnStatis(SFilterInfo *info, int32_t numOfRows, int8_t** p, SColumnDataAgg *statis, int16_t numOfCols, bool* all) {
+int32_t filterExecuteBasedOnStatis(SFilterInfo *info, int32_t numOfRows, SColumnInfoData* p, SColumnDataAgg *statis, int16_t numOfCols, bool* all) {
if (statis && numOfRows >= FILTER_RM_UNIT_MIN_ROWS) {
info->blkFlag = 0;
@@ -3058,7 +3056,6 @@ int32_t filterExecuteBasedOnStatis(SFilterInfo *info, int32_t numOfRows, int8_t*
assert(info->unitNum > 1);
*all = filterExecuteBasedOnStatisImpl(info, numOfRows, p, statis, numOfCols);
-
goto _return;
}
}
@@ -3067,59 +3064,55 @@ int32_t filterExecuteBasedOnStatis(SFilterInfo *info, int32_t numOfRows, int8_t*
_return:
info->blkFlag = 0;
-
return TSDB_CODE_SUCCESS;
}
-
-static FORCE_INLINE bool filterExecuteImplAll(void *info, int32_t numOfRows, int8_t** p, SColumnDataAgg *statis, int16_t numOfCols) {
+static FORCE_INLINE bool filterExecuteImplAll(void *info, int32_t numOfRows, SColumnInfoData* p, SColumnDataAgg *statis, int16_t numOfCols) {
return true;
}
-static FORCE_INLINE bool filterExecuteImplEmpty(void *info, int32_t numOfRows, int8_t** p, SColumnDataAgg *statis, int16_t numOfCols) {
+
+static FORCE_INLINE bool filterExecuteImplEmpty(void *info, int32_t numOfRows, SColumnInfoData* p, SColumnDataAgg *statis, int16_t numOfCols) {
return false;
}
-static FORCE_INLINE bool filterExecuteImplIsNull(void *pinfo, int32_t numOfRows, int8_t** p, SColumnDataAgg *statis, int16_t numOfCols) {
+
+static FORCE_INLINE bool filterExecuteImplIsNull(void *pinfo, int32_t numOfRows, SColumnInfoData* pRes, SColumnDataAgg *statis, int16_t numOfCols) {
SFilterInfo *info = (SFilterInfo *)pinfo;
bool all = true;
- if (filterExecuteBasedOnStatis(info, numOfRows, p, statis, numOfCols, &all) == 0) {
- return all;
- }
+ int8_t* p = (int8_t*)pRes->pData;
- if (*p == NULL) {
- *p = taosMemoryCalloc(numOfRows, sizeof(int8_t));
+ if (filterExecuteBasedOnStatis(info, numOfRows, pRes, statis, numOfCols, &all) == 0) {
+ return all;
}
for (int32_t i = 0; i < numOfRows; ++i) {
uint32_t uidx = info->groups[0].unitIdxs[0];
void *colData = colDataGetData((SColumnInfoData *)info->cunits[uidx].colData, i);
- (*p)[i] = ((colData == NULL) || colDataIsNull((SColumnInfoData *)info->cunits[uidx].colData, 0, i, NULL));
+ p[i] = ((colData == NULL) || colDataIsNull((SColumnInfoData *)info->cunits[uidx].colData, 0, i, NULL));
- if ((*p)[i] == 0) {
+ if (p[i] == 0) {
all = false;
}
}
return all;
}
-static FORCE_INLINE bool filterExecuteImplNotNull(void *pinfo, int32_t numOfRows, int8_t** p, SColumnDataAgg *statis, int16_t numOfCols) {
+static FORCE_INLINE bool filterExecuteImplNotNull(void *pinfo, int32_t numOfRows, SColumnInfoData* pRes, SColumnDataAgg *statis, int16_t numOfCols) {
SFilterInfo *info = (SFilterInfo *)pinfo;
bool all = true;
- if (filterExecuteBasedOnStatis(info, numOfRows, p, statis, numOfCols, &all) == 0) {
+ if (filterExecuteBasedOnStatis(info, numOfRows, pRes, statis, numOfCols, &all) == 0) {
return all;
}
- if (*p == NULL) {
- *p = taosMemoryCalloc(numOfRows, sizeof(int8_t));
- }
+ int8_t* p = (int8_t*)pRes->pData;
for (int32_t i = 0; i < numOfRows; ++i) {
uint32_t uidx = info->groups[0].unitIdxs[0];
void *colData = colDataGetData((SColumnInfoData *)info->cunits[uidx].colData, i);
- (*p)[i] = ((colData != NULL) && !colDataIsNull((SColumnInfoData *)info->cunits[uidx].colData, 0, i, NULL));
- if ((*p)[i] == 0) {
+ p[i] = ((colData != NULL) && !colDataIsNull((SColumnInfoData *)info->cunits[uidx].colData, 0, i, NULL));
+ if (p[i] == 0) {
all = false;
}
}
@@ -3127,7 +3120,7 @@ static FORCE_INLINE bool filterExecuteImplNotNull(void *pinfo, int32_t numOfRows
return all;
}
-bool filterExecuteImplRange(void *pinfo, int32_t numOfRows, int8_t** p, SColumnDataAgg *statis, int16_t numOfCols) {
+bool filterExecuteImplRange(void *pinfo, int32_t numOfRows, SColumnInfoData* pRes, SColumnDataAgg *statis, int16_t numOfCols) {
SFilterInfo *info = (SFilterInfo *)pinfo;
bool all = true;
uint16_t dataSize = info->cunits[0].dataSize;
@@ -3136,13 +3129,11 @@ bool filterExecuteImplRange(void *pinfo, int32_t numOfRows, int8_t** p, SColumnD
void *valData2 = info->cunits[0].valData2;
__compar_fn_t func = gDataCompare[info->cunits[0].func];
- if (filterExecuteBasedOnStatis(info, numOfRows, p, statis, numOfCols, &all) == 0) {
+ if (filterExecuteBasedOnStatis(info, numOfRows, pRes, statis, numOfCols, &all) == 0) {
return all;
}
- if (*p == NULL) {
- *p = taosMemoryCalloc(numOfRows, sizeof(int8_t));
- }
+ int8_t* p = (int8_t*) pRes->pData;
for (int32_t i = 0; i < numOfRows; ++i) {
void *colData = colDataGetData((SColumnInfoData *)info->cunits[0].colData, i);
@@ -3152,9 +3143,9 @@ bool filterExecuteImplRange(void *pinfo, int32_t numOfRows, int8_t** p, SColumnD
continue;
}
- (*p)[i] = (*rfunc)(colData, colData, valData, valData2, func);
+ p[i] = (*rfunc)(colData, colData, valData, valData2, func);
- if ((*p)[i] == 0) {
+ if (p[i] == 0) {
all = false;
}
}
@@ -3162,23 +3153,21 @@ bool filterExecuteImplRange(void *pinfo, int32_t numOfRows, int8_t** p, SColumnD
return all;
}
-bool filterExecuteImplMisc(void *pinfo, int32_t numOfRows, int8_t** p, SColumnDataAgg *statis, int16_t numOfCols) {
+bool filterExecuteImplMisc(void *pinfo, int32_t numOfRows, SColumnInfoData* pRes, SColumnDataAgg *statis, int16_t numOfCols) {
SFilterInfo *info = (SFilterInfo *)pinfo;
bool all = true;
- if (filterExecuteBasedOnStatis(info, numOfRows, p, statis, numOfCols, &all) == 0) {
+ if (filterExecuteBasedOnStatis(info, numOfRows, pRes, statis, numOfCols, &all) == 0) {
return all;
}
- if (*p == NULL) {
- *p = taosMemoryCalloc(numOfRows, sizeof(int8_t));
- }
+ int8_t* p = (int8_t*) pRes->pData;
for (int32_t i = 0; i < numOfRows; ++i) {
uint32_t uidx = info->groups[0].unitIdxs[0];
void *colData = colDataGetData((SColumnInfoData *)info->cunits[uidx].colData, i);
if (colData == NULL || colDataIsNull_s((SColumnInfoData *)info->cunits[uidx].colData, i)) {
- (*p)[i] = 0;
+ p[i] = 0;
all = false;
continue;
}
@@ -3191,14 +3180,14 @@ bool filterExecuteImplMisc(void *pinfo, int32_t numOfRows, int8_t** p, SColumnDa
qError("castConvert1 taosUcs4ToMbs error");
}else{
varDataSetLen(newColData, len);
- (*p)[i] = filterDoCompare(gDataCompare[info->cunits[uidx].func], info->cunits[uidx].optr, newColData, info->cunits[uidx].valData);
+ p[i] = filterDoCompare(gDataCompare[info->cunits[uidx].func], info->cunits[uidx].optr, newColData, info->cunits[uidx].valData);
}
taosMemoryFreeClear(newColData);
}else{
- (*p)[i] = filterDoCompare(gDataCompare[info->cunits[uidx].func], info->cunits[uidx].optr, colData, info->cunits[uidx].valData);
+ p[i] = filterDoCompare(gDataCompare[info->cunits[uidx].func], info->cunits[uidx].optr, colData, info->cunits[uidx].valData);
}
- if ((*p)[i] == 0) {
+ if (p[i] == 0) {
all = false;
}
}
@@ -3207,17 +3196,15 @@ bool filterExecuteImplMisc(void *pinfo, int32_t numOfRows, int8_t** p, SColumnDa
}
-bool filterExecuteImpl(void *pinfo, int32_t numOfRows, int8_t** p, SColumnDataAgg *statis, int16_t numOfCols) {
+bool filterExecuteImpl(void *pinfo, int32_t numOfRows, SColumnInfoData* pRes, SColumnDataAgg *statis, int16_t numOfCols) {
SFilterInfo *info = (SFilterInfo *)pinfo;
bool all = true;
- if (filterExecuteBasedOnStatis(info, numOfRows, p, statis, numOfCols, &all) == 0) {
+ if (filterExecuteBasedOnStatis(info, numOfRows, pRes, statis, numOfCols, &all) == 0) {
return all;
}
- if (*p == NULL) {
- *p = taosMemoryCalloc(numOfRows, sizeof(int8_t));
- }
+ int8_t* p = (int8_t*) pRes->pData;
for (int32_t i = 0; i < numOfRows; ++i) {
//FILTER_UNIT_CLR_F(info);
@@ -3235,14 +3222,14 @@ bool filterExecuteImpl(void *pinfo, int32_t numOfRows, int8_t** p, SColumnDataAg
uint8_t optr = cunit->optr;
if (colData == NULL || colDataIsNull((SColumnInfoData *)(cunit->colData), 0, i, NULL)) {
- (*p)[i] = optr == OP_TYPE_IS_NULL ? true : false;
+ p[i] = optr == OP_TYPE_IS_NULL ? true : false;
} else {
if (optr == OP_TYPE_IS_NOT_NULL) {
- (*p)[i] = 1;
+ p[i] = 1;
} else if (optr == OP_TYPE_IS_NULL) {
- (*p)[i] = 0;
+ p[i] = 0;
} else if (cunit->rfunc >= 0) {
- (*p)[i] = (*gRangeCompare[cunit->rfunc])(colData, colData, cunit->valData, cunit->valData2, gDataCompare[cunit->func]);
+ p[i] = (*gRangeCompare[cunit->rfunc])(colData, colData, cunit->valData, cunit->valData2, gDataCompare[cunit->func]);
} else {
if(cunit->dataType == TSDB_DATA_TYPE_NCHAR && (cunit->optr == OP_TYPE_MATCH || cunit->optr == OP_TYPE_NMATCH)){
char *newColData = taosMemoryCalloc(cunit->dataSize * TSDB_NCHAR_SIZE + VARSTR_HEADER_SIZE, 1);
@@ -3251,11 +3238,11 @@ bool filterExecuteImpl(void *pinfo, int32_t numOfRows, int8_t** p, SColumnDataAg
qError("castConvert1 taosUcs4ToMbs error");
}else{
varDataSetLen(newColData, len);
- (*p)[i] = filterDoCompare(gDataCompare[cunit->func], cunit->optr, newColData, cunit->valData);
+ p[i] = filterDoCompare(gDataCompare[cunit->func], cunit->optr, newColData, cunit->valData);
}
taosMemoryFreeClear(newColData);
}else{
- (*p)[i] = filterDoCompare(gDataCompare[cunit->func], cunit->optr, colData, cunit->valData);
+ p[i] = filterDoCompare(gDataCompare[cunit->func], cunit->optr, colData, cunit->valData);
}
}
@@ -3263,17 +3250,17 @@ bool filterExecuteImpl(void *pinfo, int32_t numOfRows, int8_t** p, SColumnDataAg
//FILTER_UNIT_SET_F(info, uidx);
}
- if ((*p)[i] == 0) {
+ if (p[i] == 0) {
break;
}
}
- if ((*p)[i]) {
+ if (p[i]) {
break;
}
}
- if ((*p)[i] == 0) {
+ if (p[i] == 0) {
all = false;
}
}
@@ -4026,38 +4013,63 @@ _return:
FLT_RET(code);
}
-bool filterExecute(SFilterInfo *info, SSDataBlock *pSrc, int8_t** p, SColumnDataAgg *statis, int16_t numOfCols) {
+bool filterExecute(SFilterInfo *info, SSDataBlock *pSrc, SColumnInfoData** p, SColumnDataAgg *statis, int16_t numOfCols, int32_t *pResultStatus) {
if (NULL == info) {
+ *pResultStatus = FILTER_RESULT_ALL_QUALIFIED;
+ return false;
+ }
+
+ SScalarParam output = {0};
+ SDataType type = {.type = TSDB_DATA_TYPE_BOOL, .bytes = sizeof(bool)};
+
+ int32_t code = sclCreateColumnInfoData(&type, pSrc->info.rows, &output);
+ if (code != TSDB_CODE_SUCCESS) {
return false;
}
if (info->scalarMode) {
- SScalarParam output = {0};
-
- SDataType type = {.type = TSDB_DATA_TYPE_BOOL, .bytes = sizeof(bool)};
- int32_t code = sclCreateColumnInfoData(&type, pSrc->info.rows, &output);
- if (code != TSDB_CODE_SUCCESS) {
- return code;
- }
-
SArray *pList = taosArrayInit(1, POINTER_BYTES);
taosArrayPush(pList, &pSrc);
FLT_ERR_RET(scalarCalculate(info->sclCtx.node, pList, &output));
- *p = taosMemoryMalloc(output.numOfRows * sizeof(bool));
-
- memcpy(*p, output.columnData->pData, output.numOfRows);
- colDataDestroy(output.columnData);
- taosMemoryFree(output.columnData);
+ *p = output.columnData;
taosArrayDestroy(pList);
+
+ if (output.numOfQualified == output.numOfRows) {
+ *pResultStatus = FILTER_RESULT_ALL_QUALIFIED;
+ } else if (output.numOfQualified == 0) {
+ *pResultStatus = FILTER_RESULT_NONE_QUALIFIED;
+ } else {
+ *pResultStatus = FILTER_RESULT_PARTIAL_QUALIFIED;
+ }
return false;
+ } else {
+ *p = output.columnData;
+ output.numOfRows = pSrc->info.rows;
+
+ bool keep = (*info->func)(info, pSrc->info.rows, *p, statis, numOfCols);
+
+ // todo this should be return during filter procedure
+ int32_t num = 0;
+ for(int32_t i = 0; i < output.numOfRows; ++i) {
+ if (((int8_t*)((*p)->pData))[i] == 1) {
+ ++num;
+ }
+ }
+
+ if (num == output.numOfRows) {
+ *pResultStatus = FILTER_RESULT_ALL_QUALIFIED;
+ } else if (num == 0) {
+ *pResultStatus = FILTER_RESULT_NONE_QUALIFIED;
+ } else {
+ *pResultStatus = FILTER_RESULT_PARTIAL_QUALIFIED;
+ }
+
+ return keep;
}
-
- return (*info->func)(info, pSrc->info.rows, p, statis, numOfCols);
}
-
typedef struct SClassifyConditionCxt {
bool hasPrimaryKey;
bool hasTagIndexCol;
diff --git a/source/libs/scalar/src/scalar.c b/source/libs/scalar/src/scalar.c
index 05730c62ac..9cba94d85a 100644
--- a/source/libs/scalar/src/scalar.c
+++ b/source/libs/scalar/src/scalar.c
@@ -606,6 +606,8 @@ int32_t sclExecLogic(SLogicConditionNode *node, SScalarCtx *ctx, SScalarParam *o
SCL_ERR_JRET(code);
}
+ int32_t numOfQualified = 0;
+
bool value = false;
bool complete = true;
for (int32_t i = 0; i < rowNum; ++i) {
@@ -631,6 +633,9 @@ int32_t sclExecLogic(SLogicConditionNode *node, SScalarCtx *ctx, SScalarParam *o
if (complete) {
colDataAppend(output->columnData, i, (char*) &value, false);
+ if (value) {
+ numOfQualified++;
+ }
}
}
@@ -639,8 +644,9 @@ int32_t sclExecLogic(SLogicConditionNode *node, SScalarCtx *ctx, SScalarParam *o
output->numOfRows = 0;
}
-_return:
+ output->numOfQualified = numOfQualified;
+_return:
sclFreeParamList(params, paramNum);
SCL_RET(code);
}
@@ -1242,6 +1248,7 @@ int32_t scalarCalculate(SNode *pNode, SArray *pBlockList, SScalarParam *pDst) {
colInfoDataEnsureCapacity(pDst->columnData, res->numOfRows);
colDataAssign(pDst->columnData, res->columnData, res->numOfRows, NULL);
pDst->numOfRows = res->numOfRows;
+ pDst->numOfQualified = res->numOfQualified;
}
sclFreeParam(res);
@@ -1249,7 +1256,6 @@ int32_t scalarCalculate(SNode *pNode, SArray *pBlockList, SScalarParam *pDst) {
}
_return:
- //nodesDestroyNode(pNode);
sclFreeRes(ctx.pRes);
return code;
}
diff --git a/source/libs/scalar/src/sclvector.c b/source/libs/scalar/src/sclvector.c
index a003315fca..fe2a970aaa 100644
--- a/source/libs/scalar/src/sclvector.c
+++ b/source/libs/scalar/src/sclvector.c
@@ -1475,19 +1475,19 @@ void vectorMathMinus(SScalarParam* pLeft, SScalarParam* pRight, SScalarParam *pO
void vectorAssign(SScalarParam* pLeft, SScalarParam* pRight, SScalarParam *pOut, int32_t _ord) {
SColumnInfoData *pOutputCol = pOut->columnData;
-
pOut->numOfRows = pLeft->numOfRows;
-// if (IS_HELPER_NULL(pRight->columnData, 0)) {
if(colDataIsNull_s(pRight->columnData, 0)){
- for (int32_t i = 0; i < pOut->numOfRows; ++i) {
- colDataAppend(pOutputCol, i, NULL, true);
- }
+ colDataAppendNNULL(pOutputCol, 0, pOut->numOfRows);
} else {
+ char* d = colDataGetData(pRight->columnData, 0);
for (int32_t i = 0; i < pOut->numOfRows; ++i) {
- colDataAppend(pOutputCol, i, colDataGetData(pRight->columnData, 0), false);
+ colDataAppend(pOutputCol, i, d, false);
}
}
+
+ ASSERT(pRight->numOfQualified == 1 || pRight->numOfQualified == 0);
+ pOut->numOfQualified = pRight->numOfQualified * pOut->numOfRows;
}
void vectorConcat(SScalarParam* pLeft, SScalarParam* pRight, void *out, int32_t _ord) {
@@ -1646,38 +1646,60 @@ void vectorBitOr(SScalarParam* pLeft, SScalarParam* pRight, SScalarParam *pOut,
doReleaseVec(pRightCol, rightConvert);
}
-#define VEC_COM_INNER(pCol, index1, index2) \
- for (; i < pCol->numOfRows && i >= 0; i += step) {\
- if (IS_HELPER_NULL(pLeft->columnData, index1) || IS_HELPER_NULL(pRight->columnData, index2)) {\
- bool res = false;\
- colDataAppendInt8(pOut->columnData, i, (int8_t*)&res);\
- continue;\
- }\
- char *pLeftData = colDataGetData(pLeft->columnData, index1);\
- char *pRightData = colDataGetData(pRight->columnData, index2);\
- int64_t leftOut = 0;\
- int64_t rightOut = 0;\
- bool freeLeft = false;\
- bool freeRight = false;\
- bool isJsonnull = false;\
- bool result = convertJsonValue(&fp, optr, GET_PARAM_TYPE(pLeft), GET_PARAM_TYPE(pRight),\
- &pLeftData, &pRightData, &leftOut, &rightOut, &isJsonnull, &freeLeft, &freeRight);\
- if(isJsonnull){\
- ASSERT(0);\
- }\
- if(!pLeftData || !pRightData){\
- result = false;\
- }\
- if(!result){\
- colDataAppendInt8(pOut->columnData, i, (int8_t*)&result);\
- }else{\
- bool res = filterDoCompare(fp, optr, pLeftData, pRightData);\
- colDataAppendInt8(pOut->columnData, i, (int8_t*)&res);\
- }\
- if(freeLeft) taosMemoryFreeClear(pLeftData);\
- if(freeRight) taosMemoryFreeClear(pRightData);\
+int32_t doVectorCompareImpl(int32_t numOfRows, SScalarParam *pOut, int32_t startIndex, int32_t step, __compar_fn_t fp,
+ SScalarParam *pLeft, SScalarParam *pRight, int32_t optr) {
+ int32_t num = 0;
+
+ for (int32_t i = startIndex; i < numOfRows && i >= 0; i += step) {
+ int32_t leftIndex = (i >= pLeft->numOfRows)? 0:i;
+ int32_t rightIndex = (i >= pRight->numOfRows)? 0:i;
+
+ if (IS_HELPER_NULL(pLeft->columnData, leftIndex) || IS_HELPER_NULL(pRight->columnData, rightIndex)) {
+ bool res = false;
+ colDataAppendInt8(pOut->columnData, i, (int8_t *)&res);
+ continue;
+ }
+
+ char * pLeftData = colDataGetData(pLeft->columnData, leftIndex);
+ char * pRightData = colDataGetData(pRight->columnData, rightIndex);
+ int64_t leftOut = 0;
+ int64_t rightOut = 0;
+ bool freeLeft = false;
+ bool freeRight = false;
+ bool isJsonnull = false;
+
+ bool result = convertJsonValue(&fp, optr, GET_PARAM_TYPE(pLeft), GET_PARAM_TYPE(pRight), &pLeftData, &pRightData,
+ &leftOut, &rightOut, &isJsonnull, &freeLeft, &freeRight);
+ if (isJsonnull) {
+ ASSERT(0);
+ }
+
+ if (!pLeftData || !pRightData) {
+ result = false;
+ }
+
+ if (!result) {
+ colDataAppendInt8(pOut->columnData, i, (int8_t *)&result);
+ } else {
+ bool res = filterDoCompare(fp, optr, pLeftData, pRightData);
+ colDataAppendInt8(pOut->columnData, i, (int8_t *)&res);
+ if (res) {
+ ++num;
+ }
+ }
+
+ if (freeLeft) {
+ taosMemoryFreeClear(pLeftData);
+ }
+
+ if (freeRight) {
+ taosMemoryFreeClear(pRightData);
+ }
}
+ return num;
+}
+
void vectorCompareImpl(SScalarParam* pLeft, SScalarParam* pRight, SScalarParam *pOut, int32_t _ord, int32_t optr) {
int32_t i = ((_ord) == TSDB_ORDER_ASC) ? 0 : TMAX(pLeft->numOfRows, pRight->numOfRows) - 1;
int32_t step = ((_ord) == TSDB_ORDER_ASC) ? 1 : -1;
@@ -1704,16 +1726,12 @@ void vectorCompareImpl(SScalarParam* pLeft, SScalarParam* pRight, SScalarParam *
char *pLeftData = colDataGetData(pLeft->columnData, i);
bool res = filterDoCompare(fp, optr, pLeftData, pRight->pHashFilter);
colDataAppendInt8(pOut->columnData, i, (int8_t*)&res);
+ if (res) {
+ pOut->numOfQualified++;
+ }
}
- return;
- }
-
- if (pLeft->numOfRows == pRight->numOfRows) {
- VEC_COM_INNER(pLeft, i, i)
- } else if (pRight->numOfRows == 1) {
- VEC_COM_INNER(pLeft, i, 0)
- } else if (pLeft->numOfRows == 1) {
- VEC_COM_INNER(pRight, 0, i)
+ } else { // normal compare
+ pOut->numOfQualified = doVectorCompareImpl(pOut->numOfRows, pOut, i, step, fp, pLeft, pRight, optr);
}
}
diff --git a/source/libs/scheduler/src/schTask.c b/source/libs/scheduler/src/schTask.c
index 8b3a2016b8..2cb227d84b 100644
--- a/source/libs/scheduler/src/schTask.c
+++ b/source/libs/scheduler/src/schTask.c
@@ -20,6 +20,7 @@
#include "tmsg.h"
#include "tref.h"
#include "trpc.h"
+#include "tglobal.h"
void schFreeTask(SSchJob *pJob, SSchTask *pTask) {
schDeregisterTaskHb(pJob, pTask);
@@ -870,8 +871,12 @@ int32_t schLaunchTaskImpl(void *param) {
SCH_TASK_ELOG("failed to create physical plan, code:%s, msg:%p, len:%d", tstrerror(code), pTask->msg,
pTask->msgLen);
SCH_ERR_JRET(code);
- } else {
- SCH_TASK_DLOGL("physical plan len:%d, %s", pTask->msgLen, pTask->msg);
+ } else if (tsQueryPlannerTrace) {
+ char *msg = NULL;
+ int32_t msgLen = 0;
+ qSubPlanToString(plan, &msg, &msgLen);
+ SCH_TASK_DLOGL("physical plan len:%d, %s", msgLen, msg);
+ taosMemoryFree(msg);
}
}
diff --git a/tests/script/tsim/insert/basic.sim b/tests/script/tsim/insert/basic.sim
index c4ef3e39da..c926cbc8b0 100644
--- a/tests/script/tsim/insert/basic.sim
+++ b/tests/script/tsim/insert/basic.sim
@@ -12,7 +12,7 @@ $tb = $tbPrefix . $i
print =============== step1
sql drop database -x step1
step1:
-sql create database $db
+sql create database $db vgroups 2
sql use $db
sql create table $tb (ts timestamp, speed int)
diff --git a/tests/script/tsim/trans/create_db.sim b/tests/script/tsim/trans/create_db.sim
index 8543bec144..f04e505dd5 100644
--- a/tests/script/tsim/trans/create_db.sim
+++ b/tests/script/tsim/trans/create_db.sim
@@ -56,7 +56,7 @@ if $data[0][2] != redoAction then
return -1
endi
-if $data[0][3] != d1 then
+if $data[0][4] != d1 then
return -1
endi
@@ -120,7 +120,7 @@ if $system_content != Windows_NT then
return -1
endi
- if $data[0][3] != d2 then
+ if $data[0][4] != d2 then
return -1
endi
diff --git a/tests/system-test/1-insert/database_pre_suf.py b/tests/system-test/1-insert/database_pre_suf.py
index fe788af0db..fc4bf7f5de 100755
--- a/tests/system-test/1-insert/database_pre_suf.py
+++ b/tests/system-test/1-insert/database_pre_suf.py
@@ -107,7 +107,7 @@ class TDTestCase:
# create stream
- tdSql.execute('''create stream current_stream into stream_max_stable_1 as select _wstart as start, _wend as end, 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 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);''')
# insert data
for i in range(num_random*n):
@@ -185,20 +185,20 @@ class TDTestCase:
tdSql.checkData(0,0,num_random*n)
# stream data check
- tdSql.query("select start,end,max_int from stream_max_stable_1 ;")
+ tdSql.query("select start,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 end, 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 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));")
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 end, 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 start, _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]
diff --git a/tests/system-test/2-query/interp.py b/tests/system-test/2-query/interp.py
index 5550519e05..7bf0191ec1 100644
--- a/tests/system-test/2-query/interp.py
+++ b/tests/system-test/2-query/interp.py
@@ -595,11 +595,11 @@ class TDTestCase:
tdSql.checkData(2, i, 15)
tdSql.query(f"select interp(c0),interp(c1),interp(c2),interp(c3) from {dbname}.{tbname} range('2020-02-09 00:00:05', '2020-02-13 00:00:05') every(1d) fill(linear)")
- tdSql.checkRows(1)
+ tdSql.checkRows(3)
tdSql.checkCols(4)
for i in range (tdSql.queryCols):
- tdSql.checkData(0, i, 15)
+ tdSql.checkData(0, i, 13)
tdLog.printNoPrefix("==========step10:test error cases")