diff --git a/docs/en/02-intro/index.md b/docs/en/02-intro/index.md index 79d170eeb9..9324ca9f7e 100644 --- a/docs/en/02-intro/index.md +++ b/docs/en/02-intro/index.md @@ -44,7 +44,7 @@ For more details on features, please read through the entire documentation. ## Competitive Advantages -By making full use of [characteristics of time series data](https://tdengine.com/tsdb/characteristics-of-time-series-data/), TDengine differentiates itself from other [time series databases](https://tdengine.com/tsdb), with the following advantages. +By making full use of [characteristics of time series data](https://tdengine.com/tsdb/characteristics-of-time-series-data/), TDengine differentiates itself from other [time series databases](https://tdengine.com/tsdb/), with the following advantages. - **[High-Performance](https://tdengine.com/tdengine/high-performance-time-series-database/)**: TDengine is the only time-series database to solve the high cardinality issue to support billions of data collection points while out performing other time-series databases for data ingestion, querying and data compression. @@ -123,13 +123,12 @@ As a high-performance, scalable and SQL supported time-series database, TDengine ## Comparison with other databases -- [Writing Performance Comparison of TDengine and InfluxDB ](https://tdengine.com/performance-comparison-of-tdengine-and-influxdb/) -- [Query Performance Comparison of TDengine and InfluxDB](https://tdengine.com/query-performance-comparison-test-report-tdengine-vs-influxdb/) -- [TDengine vs OpenTSDB](https://tdengine.com/performance-tdengine-vs-opentsdb/) -- [TDengine vs Cassandra](https://tdengine.com/performance-tdengine-vs-cassandra/) -- [TDengine vs InfluxDB](https://tdengine.com/performance-tdengine-vs-influxdb/) +- [TDengine vs. InfluxDB](https://tdengine.com/tsdb-comparison-influxdb-vs-tdengine/) +- [TDengine vs. TimescaleDB](https://tdengine.com/tsdb-comparison-timescaledb-vs-tdengine/) +- [TDengine vs. OpenTSDB](https://tdengine.com/performance-tdengine-vs-opentsdb/) +- [TDengine vs. Cassandra](https://tdengine.com/performance-tdengine-vs-cassandra/) ## More readings - [Introduction to Time-Series Database](https://tdengine.com/tsdb/) - [Introduction to TDengine competitive advantages](https://tdengine.com/tdengine/) - + diff --git a/docs/en/05-get-started/01-docker.md b/docs/en/05-get-started/01-docker.md index 42e6861674..2049e1615f 100644 --- a/docs/en/05-get-started/01-docker.md +++ b/docs/en/05-get-started/01-docker.md @@ -6,7 +6,7 @@ description: This document describes how to install TDengine in a Docker contain This document describes how to install TDengine in a Docker container and perform queries and inserts. -- The easiest way to explore TDengine is through [TDengine Cloud](http://cloud.tdengine.com). +- The easiest way to explore TDengine is through [TDengine Cloud](https://cloud.tdengine.com). - To get started with TDengine in a non-containerized environment, see [Quick Install from Package](../../get-started/package). - If you want to view the source code, build TDengine yourself, or contribute to the project, see the [TDengine GitHub repository](https://github.com/taosdata/TDengine). diff --git a/docs/en/05-get-started/03-package.md b/docs/en/05-get-started/03-package.md index 159760ed21..8f9cb9aedc 100644 --- a/docs/en/05-get-started/03-package.md +++ b/docs/en/05-get-started/03-package.md @@ -10,7 +10,7 @@ import PkgListV3 from "/components/PkgListV3"; This document describes how to install TDengine on Linux/Windows/macOS and perform queries and inserts. -- The easiest way to explore TDengine is through [TDengine Cloud](http://cloud.tdengine.com). +- The easiest way to explore TDengine is through [TDengine Cloud](https://cloud.tdengine.com). - To get started with TDengine on Docker, see [Quick Install on Docker](../../get-started/docker). - If you want to view the source code, build TDengine yourself, or contribute to the project, see the [TDengine GitHub repository](https://github.com/taosdata/TDengine). diff --git a/docs/en/07-develop/01-connect/index.md b/docs/en/07-develop/01-connect/index.md index 913c24f189..8cf3c463af 100644 --- a/docs/en/07-develop/01-connect/index.md +++ b/docs/en/07-develop/01-connect/index.md @@ -288,6 +288,6 @@ Prior to establishing connection, please make sure TDengine is already running a :::tip -If the connection fails, in most cases it's caused by improper configuration for FQDN or firewall. Please refer to the section "Unable to establish connection" in [FAQ](https://docs.tdengine.com/train-faq/faq). +If the connection fails, in most cases it's caused by improper configuration for FQDN or firewall. Please refer to the section "Unable to establish connection" in [FAQ](../../train-faq/faq). ::: diff --git a/docs/en/07-develop/07-tmq.mdx b/docs/en/07-develop/07-tmq.mdx index 739eabd1cf..a4eb41bd7e 100644 --- a/docs/en/07-develop/07-tmq.mdx +++ b/docs/en/07-develop/07-tmq.mdx @@ -23,7 +23,7 @@ By subscribing to a topic, a consumer can obtain the latest data in that topic i To implement these features, TDengine indexes its write-ahead log (WAL) file for fast random access and provides configurable methods for replacing and retaining this file. You can define a retention period and size for this file. For information, see the CREATE DATABASE statement. In this way, the WAL file is transformed into a persistent storage engine that remembers the order in which events occur. However, note that configuring an overly long retention period for your WAL files makes database compression inefficient. TDengine then uses the WAL file instead of the time-series database as its storage engine for queries in the form of topics. TDengine reads the data from the WAL file; uses a unified query engine instance to perform filtering, transformations, and other operations; and finally pushes the data to consumers. -Tips:The default data subscription is to consume data from the wal. If the wal is deleted, the consumed data will be incomplete. At this time, you can set the parameter experimental.snapshot.enable to true to obtain all data from the tsdb, but in this way, the consumption order of the data cannot be guaranteed. Therefore, it is recommended to set a reasonable retention policy for WAL based on your consumption situation to ensure that you can subscribe all data from WAL. +Tips: Data subscription is to consume data from the wal. If some wal files are deleted according to WAL retention policy, the deleted data can't be consumed any more. So you need to set a reasonable value for parameter `WAL_RETENTION_PERIOD` or `WAL_RETENTION_SIZE` when creating the database and make sure your application consume the data in a timely way to make sure there is no data loss. This behavior is similar to Kafka and other widely used message queue products. ## Data Schema and API @@ -294,7 +294,6 @@ You configure the following parameters when creating a consumer: | `auto.offset.reset` | enum | Initial offset for the consumer group | Specify `earliest`, `latest`, or `none`(default) | | `enable.auto.commit` | boolean | Commit automatically; true: user application doesn't need to explicitly commit; false: user application need to handle commit by itself | Default value is true | | `auto.commit.interval.ms` | integer | Interval for automatic commits, in milliseconds | -| `experimental.snapshot.enable` | boolean | Specify whether to consume data in TSDB; true: both data in WAL and in TSDB can be consumed; false: only data in WAL can be consumed | default value: false | | `msg.with.table.name` | boolean | Specify whether to deserialize table names from messages | default value: false The method of specifying these parameters depends on the language used: @@ -312,7 +311,6 @@ tmq_conf_set(conf, "group.id", "cgrpName"); tmq_conf_set(conf, "td.connect.user", "root"); tmq_conf_set(conf, "td.connect.pass", "taosdata"); tmq_conf_set(conf, "auto.offset.reset", "earliest"); -tmq_conf_set(conf, "experimental.snapshot.enable", "true"); tmq_conf_set(conf, "msg.with.table.name", "true"); tmq_conf_set_auto_commit_cb(conf, tmq_commit_cb_print, NULL); @@ -368,7 +366,6 @@ conf := &tmq.ConfigMap{ "td.connect.port": "6030", "client.id": "test_tmq_c", "enable.auto.commit": "false", - "experimental.snapshot.enable": "true", "msg.with.table.name": "true", } consumer, err := NewConsumer(conf) @@ -416,7 +413,6 @@ Python programs use the following parameters: | `enable.auto.commit` | string | Commit automatically | pecify `true` or `false` | | `auto.commit.interval.ms` | string | Interval for automatic commits, in milliseconds | | | `auto.offset.reset` | string | Initial offset for the consumer group | Specify `earliest`, `latest`, or `none`(default) | -| `experimental.snapshot.enable` | string | Specify whether it's allowed to consume messages from the WAL or from TSDB | Specify `true` or `false` | | `enable.heartbeat.background` | string | Backend heartbeat; if enabled, the consumer does not go offline even if it has not polled for a long time | Specify `true` or `false` | diff --git a/docs/en/12-taos-sql/04-stable.md b/docs/en/12-taos-sql/04-stable.md index a1d103eaf0..3a4d6cc590 100644 --- a/docs/en/12-taos-sql/04-stable.md +++ b/docs/en/12-taos-sql/04-stable.md @@ -33,7 +33,7 @@ column_definition: SHOW STABLES [LIKE tb_name_wildcard]; ``` -The preceding SQL statement shows all supertables in the current TDengine database, including the name, creation time, number of columns, number of tags, and number of subtables for each supertable. +The preceding SQL statement shows all supertables in the current TDengine database. ### View the CREATE Statement for a Supertable diff --git a/docs/en/12-taos-sql/06-select.md b/docs/en/12-taos-sql/06-select.md index de7294f7a9..070fd41653 100644 --- a/docs/en/12-taos-sql/06-select.md +++ b/docs/en/12-taos-sql/06-select.md @@ -55,7 +55,7 @@ window_clause: { | INTERVAL(interval_val [, interval_offset]) [SLIDING (sliding_val)] [WATERMARK(watermark_val)] [FILL(fill_mod_and_val)] interp_clause: - RANGE(ts_val, ts_val), EVERY(every_val), FILL(fill_mod_and_val) + RANGE(ts_val, ts_val) EVERY(every_val) FILL(fill_mod_and_val) partition_by_clause: PARTITION BY expr [, expr] ... diff --git a/docs/en/12-taos-sql/10-function.md b/docs/en/12-taos-sql/10-function.md index 0b5f9103c7..5c0ad8a71d 100644 --- a/docs/en/12-taos-sql/10-function.md +++ b/docs/en/12-taos-sql/10-function.md @@ -886,7 +886,7 @@ INTERP(expr) - The output time range of `INTERP` is specified by `RANGE(timestamp1,timestamp2)` parameter, with timestamp1 <= timestamp2. timestamp1 is the starting point of the output time range and must be specified. timestamp2 is the ending point of the output time range and must be specified. - The number of rows in the result set of `INTERP` is determined by the parameter `EVERY(time_unit)`. Starting from timestamp1, one interpolation is performed for every time interval specified `time_unit` parameter. The parameter `time_unit` must be an integer, with no quotes, with a time unit of: a(millisecond)), s(second), m(minute), h(hour), d(day), or w(week). For example, `EVERY(500a)` will interpolate every 500 milliseconds. - Interpolation is performed based on `FILL` parameter. For more information about FILL clause, see [FILL Clause](../distinguished/#fill-clause). -- `INTERP` can only be used to interpolate in single timeline. So it must be used with `partition by tbname` when it's used on a STable. +- `INTERP` can be applied to supertable by interpolating primary key sorted data of all its childtables. It can also be used with `partition by tbname` when applied to supertable to generate interpolation on each single timeline. - Pseudocolumn `_irowts` can be used along with `INTERP` to return the timestamps associated with interpolation points(support after version 3.0.2.0). - Pseudocolumn `_isfilled` can be used along with `INTERP` to indicate whether the results are original records or data points generated by interpolation algorithm(support after version 3.0.3.0). diff --git a/docs/en/12-taos-sql/24-show.md b/docs/en/12-taos-sql/24-show.md index 1f340cab30..7b3da109ca 100644 --- a/docs/en/12-taos-sql/24-show.md +++ b/docs/en/12-taos-sql/24-show.md @@ -129,6 +129,14 @@ SHOW QNODES; Shows information about qnodes in the system. +## SHOW QUERIES + +```sql +SHOW QUERIES; +``` + +Shows the queries in progress in the system. + ## SHOW SCORES ```sql diff --git a/docs/en/14-reference/03-connector/04-java.mdx b/docs/en/14-reference/03-connector/04-java.mdx index 2847bf20f8..65c7bc9bc5 100644 --- a/docs/en/14-reference/03-connector/04-java.mdx +++ b/docs/en/14-reference/03-connector/04-java.mdx @@ -36,6 +36,93 @@ REST connection supports all platforms that can run Java. Please refer to [version support list](/reference/connector#version-support) +## Recent update logs + +| taos-jdbcdriver version | major changes | +| :---------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------: | +| 3.2.1 | JDBC REST connection supports schemaless/prepareStatement over WebSocket | +| 3.2.0 | This version has been deprecated | +| 3.1.0 | JDBC REST connection supports subscription over WebSocket | +| 3.0.1 - 3.0.4 | fix the resultSet data is parsed incorrectly sometimes. 3.0.1 is compiled on JDK 11, you are advised to use other version in the JDK 8 environment | +| 3.0.0 | Support for TDengine 3.0 | +| 2.0.42 | fix wasNull interface return value in WebSocket connection | +| 2.0.41 | fix decode method of username and password in REST connection | +| 2.0.39 - 2.0.40 | Add REST connection/request timeout parameters | +| 2.0.38 | JDBC REST connections add bulk pull function | +| 2.0.37 | Support json tags | +| 2.0.36 | Support schemaless writing | + +**Note**: adding `batchfetch` to the REST connection and setting it to true will enable the WebSocket connection. + +### Handling exceptions + +After an error is reported, the error message and error code can be obtained through SQLException. + +```java +try (Statement statement = connection.createStatement()) { + // executeQuery + ResultSet resultSet = statement.executeQuery(sql); + // print result + printResult(resultSet); +} catch (SQLException e) { + System.out.println("ERROR Message: " + e.getMessage()); + System.out.println("ERROR Code: " + e.getErrorCode()); + e.printStackTrace(); +} +``` + +There are four types of error codes that the JDBC connector can report: + +- Error code of the JDBC driver itself (error code between 0x2301 and 0x2350), +- Error code of the native connection method (error code between 0x2351 and 0x2360) +- Error code of the consumer method (error code between 0x2371 and 0x2380) +- Error code of other TDengine function modules. + +For specific error codes, please refer to. + +| Error Code | Description | Suggested Actions | +| ---------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| 0x2301 | connection already closed | The connection has been closed, check the connection status, or recreate the connection to execute the relevant instructions. | +| 0x2302 | this operation is NOT supported currently! | The current interface does not support the connection. You can use another connection mode. | +| 0x2303 | invalid variables | The parameter is invalid. Check the interface specification and adjust the parameter type and size. | +| 0x2304 | statement is closed | The statement is closed. Check whether the statement is closed and used again, or whether the connection is normal. | +| 0x2305 | resultSet is closed | result set The result set is released. Check whether the result set is released and used again. | +| 0x2306 | Batch is empty! | prepare statement Add parameters and then execute batch. | +| 0x2307 | Can not issue data manipulation statements with executeQuery() | The update operation should use execute update(), not execute query(). | +| 0x2308 | Can not issue SELECT via executeUpdate() | The query operation should use execute query(), not execute update(). | +| 0x230d | parameter index out of range | The parameter is out of bounds. Check the proper range of the parameter. | +| 0x230e | connection already closed | The connection has been closed. Please check whether the connection is closed and used again, or whether the connection is normal. | +| 0x230f | unknown sql type in tdengine | Check the data type supported by TDengine. | +| 0x2310 | can't register JDBC-JNI driver | The native driver cannot be registered. Please check whether the url is correct. | +| 0x2312 | url is not set | Check whether the REST connection url is correct. | +| 0x2314 | numeric value out of range | Check that the correct interface is used for the numeric types in the obtained result set. | +| 0x2315 | unknown taos type in tdengine | Whether the correct TDengine data type is specified when converting the TDengine data type to the JDBC data type. | +| 0x2317 | | wrong request type was used in the REST connection. | +| 0x2318 | | data transmission exception occurred during the REST connection. Please check the network status and try again. | +| 0x2319 | user is required | The user name information is missing when creating the connection | +| 0x231a | password is required | Password information is missing when creating a connection | +| 0x231c | httpEntity is null, sql: | Execution exception occurred during the REST connection | +| 0x2350 | unknown error | Unknown exception, please return to the developer on github. | +| 0x2352 | Unsupported encoding | An unsupported character encoding set is specified under the native Connection. | +| 0x2353 | internal error of database, please see taoslog for more details | An error occurs when the prepare statement is executed on the native connection. Check the taos log to locate the fault. | +| 0x2354 | JNI connection is NULL | When the command is executed, the native Connection is closed. Check the connection to TDengine. | +| 0x2355 | JNI result set is NULL | The result set is abnormal. Please check the connection status and try again. | +| 0x2356 | invalid num of fields | The meta information of the result set obtained by the native connection does not match. | +| 0x2357 | empty sql string | Fill in the correct SQL for execution. | +| 0x2359 | JNI alloc memory failed, please see taoslog for more details | Memory allocation for the native connection failed. Check the taos log to locate the problem. | +| 0x2371 | consumer properties must not be null! | The parameter is empty when you create a subscription. Please fill in the correct parameter. | +| 0x2372 | configs contain empty key, failed to set consumer property | The parameter key contains a null value. Please enter the correct parameter. | +| 0x2373 | failed to set consumer property, | The parameter value contains a null value. Please enter the correct parameter. | +| 0x2375 | topic reference has been destroyed | The topic reference is released during the creation of the data subscription. Check the connection to TDengine. | +| 0x2376 | failed to set consumer topic, topic name is empty | During data subscription creation, the subscription topic name is empty. Check that the specified topic name is correct. | +| 0x2377 | consumer reference has been destroyed | The subscription data transfer channel has been closed. Please check the connection to TDengine. | +| 0x2378 | consumer create error | Failed to create a data subscription. Check the taos log according to the error message to locate the fault. | +| - | can't create connection with server within | Increase the connection time by adding the httpConnectTimeout parameter, or check the connection to the taos adapter. | +| - | failed to complete the task within the specified time | Increase the execution time by adding the messageWaitTimeout parameter, or check the connection to the taos adapter. | + +- [TDengine Java Connector](https://github.com/taosdata/taos-connector-jdbc/blob/main/src/main/java/com/taosdata/jdbc/TSDBErrorNumbers.java) + + ## TDengine DataType vs. Java DataType TDengine currently supports timestamp, number, character, Boolean type, and the corresponding type conversion with Java is as follows: @@ -82,7 +169,7 @@ Add following dependency in the `pom.xml` file of your Maven project: com.taosdata.jdbc taos-jdbcdriver - 3.1.0 + 3.2.1 ``` @@ -97,7 +184,7 @@ cd taos-connector-jdbc mvn clean install -Dmaven.test.skip=true ``` -After you have compiled taos-jdbcdriver, the `taos-jdbcdriver-3.0.*-dist.jar` file is created in the target directory. The compiled JAR file is automatically stored in your local Maven repository. +After you have compiled taos-jdbcdriver, the `taos-jdbcdriver-3.2.*-dist.jar` file is created in the target directory. The compiled JAR file is automatically stored in your local Maven repository. @@ -333,35 +420,6 @@ while(resultSet.next()){ > The query is consistent with operating a relational database. When using subscripts to get the contents of the returned fields, you have to start from 1. However, we recommend using the field names to get the values of the fields in the result set. -### Handling exceptions - -After an error is reported, the error message and error code can be obtained through SQLException. - -```java -try (Statement statement = connection.createStatement()) { - // executeQuery - ResultSet resultSet = statement.executeQuery(sql); - // print result - printResult(resultSet); -} catch (SQLException e) { - System.out.println("ERROR Message: " + e.getMessage()); - System.out.println("ERROR Code: " + e.getErrorCode()); - e.printStackTrace(); -} -``` - -There are four types of error codes that the JDBC connector can report: - -- Error code of the JDBC driver itself (error code between 0x2301 and 0x2350), -- Error code of the native connection method (error code between 0x2351 and 0x2360) -- Error code of the consumer method (error code between 0x2371 and 0x2380) -- Error code of other TDengine function modules. - -For specific error codes, please refer to. - -- [TDengine Java Connector](https://github.com/taosdata/taos-connector-jdbc/blob/main/src/main/java/com/taosdata/jdbc/TSDBErrorNumbers.java) - - ### Writing data via parameter binding TDengine has significantly improved the bind APIs to support data writing (INSERT) scenarios. Writing data in this way avoids the resource consumption of SQL syntax parsing, resulting in significant write performance improvements in many cases. @@ -369,9 +427,12 @@ TDengine has significantly improved the bind APIs to support data writing (INSER **Note:** - JDBC REST connections do not currently support bind interface -- The following sample code is based on taos-jdbcdriver-3.1.0 +- The following sample code is based on taos-jdbcdriver-3.2.1 - The setString method should be called for binary type data, and the setNString method should be called for nchar type data -- both setString and setNString require the user to declare the width of the corresponding column in the size parameter of the table definition +- Do not use `db.?` in prepareStatement when specify the database with the table name, should directly use `?`, then specify the database in setTableName, for example: `prepareStatement.setTableName("db.t1")`. + + + ```java public class ParameterBindingDemo { @@ -599,21 +660,7 @@ public class ParameterBindingDemo { } ``` -The methods to set TAGS values: - -```java -public void setTagNull(int index, int type) -public void setTagBoolean(int index, boolean value) -public void setTagInt(int index, int value) -public void setTagByte(int index, byte value) -public void setTagShort(int index, short value) -public void setTagLong(int index, long value) -public void setTagTimestamp(int index, long value) -public void setTagFloat(int index, float value) -public void setTagDouble(int index, double value) -public void setTagString(int index, String value) -public void setTagNString(int index, String value) -``` +**Note**: both setString and setNString require the user to declare the width of the corresponding column in the size parameter of the table definition The methods to set VALUES columns: @@ -630,17 +677,203 @@ public void setString(int columnIndex, ArrayList list, int size) throws public void setNString(int columnIndex, ArrayList list, int size) throws SQLException ``` + + + +```java +public class ParameterBindingDemo { + private static final String host = "127.0.0.1"; + private static final Random random = new Random(System.currentTimeMillis()); + private static final int BINARY_COLUMN_SIZE = 30; + private static final String[] schemaList = { + "create table stable1(ts timestamp, f1 tinyint, f2 smallint, f3 int, f4 bigint) tags(t1 tinyint, t2 smallint, t3 int, t4 bigint)", + "create table stable2(ts timestamp, f1 float, f2 double) tags(t1 float, t2 double)", + "create table stable3(ts timestamp, f1 bool) tags(t1 bool)", + "create table stable4(ts timestamp, f1 binary(" + BINARY_COLUMN_SIZE + ")) tags(t1 binary(" + BINARY_COLUMN_SIZE + "))", + "create table stable5(ts timestamp, f1 nchar(" + BINARY_COLUMN_SIZE + ")) tags(t1 nchar(" + BINARY_COLUMN_SIZE + "))" + }; + private static final int numOfSubTable = 10, numOfRow = 10; + + public static void main(String[] args) throws SQLException { + + String jdbcUrl = "jdbc:TAOS-RS://" + host + ":6041/?batchfetch=true"; + Connection conn = DriverManager.getConnection(jdbcUrl, "root", "taosdata"); + + init(conn); + + bindInteger(conn); + + bindFloat(conn); + + bindBoolean(conn); + + bindBytes(conn); + + bindString(conn); + + conn.close(); + } + + private static void init(Connection conn) throws SQLException { + try (Statement stmt = conn.createStatement()) { + stmt.execute("drop database if exists test_ws_parabind"); + stmt.execute("create database if not exists test_ws_parabind"); + stmt.execute("use test_ws_parabind"); + for (int i = 0; i < schemaList.length; i++) { + stmt.execute(schemaList[i]); + } + } + } + + private static void bindInteger(Connection conn) throws SQLException { + String sql = "insert into ? using stable1 tags(?,?,?,?) values(?,?,?,?,?)"; + + try (TSWSPreparedStatement pstmt = conn.prepareStatement(sql).unwrap(TSWSPreparedStatement.class)) { + + for (int i = 1; i <= numOfSubTable; i++) { + // set table name + pstmt.setTableName("t1_" + i); + // set tags + pstmt.setTagByte(1, Byte.parseByte(Integer.toString(random.nextInt(Byte.MAX_VALUE)))); + pstmt.setTagShort(2, Short.parseShort(Integer.toString(random.nextInt(Short.MAX_VALUE)))); + pstmt.setTagInt(3, random.nextInt(Integer.MAX_VALUE)); + pstmt.setTagLong(4, random.nextLong()); + // set columns + long current = System.currentTimeMillis(); + for (int j = 0; j < numOfRow; j++) { + pstmt.setTimestamp(1, new Timestamp(current + j)); + pstmt.setByte(2, Byte.parseByte(Integer.toString(random.nextInt(Byte.MAX_VALUE)))); + pstmt.setShort(3, Short.parseShort(Integer.toString(random.nextInt(Short.MAX_VALUE)))); + pstmt.setInt(4, random.nextInt(Integer.MAX_VALUE)); + pstmt.setLong(5, random.nextLong()); + pstmt.addBatch(); + } + pstmt.executeBatch(); + } + } + } + + private static void bindFloat(Connection conn) throws SQLException { + String sql = "insert into ? using stable2 tags(?,?) values(?,?,?)"; + + try(TSWSPreparedStatement pstmt = conn.prepareStatement(sql).unwrap(TSWSPreparedStatement.class)) { + + for (int i = 1; i <= numOfSubTable; i++) { + // set table name + pstmt.setTableName("t2_" + i); + // set tags + pstmt.setTagFloat(1, random.nextFloat()); + pstmt.setTagDouble(2, random.nextDouble()); + // set columns + long current = System.currentTimeMillis(); + for (int j = 0; j < numOfRow; j++) { + pstmt.setTimestamp(1, new Timestamp(current + j)); + pstmt.setFloat(2, random.nextFloat()); + pstmt.setDouble(3, random.nextDouble()); + pstmt.addBatch(); + } + pstmt.executeBatch(); + } + } + } + + private static void bindBoolean(Connection conn) throws SQLException { + String sql = "insert into ? using stable3 tags(?) values(?,?)"; + + try (TSWSPreparedStatement pstmt = conn.prepareStatement(sql).unwrap(TSWSPreparedStatement.class)) { + for (int i = 1; i <= numOfSubTable; i++) { + // set table name + pstmt.setTableName("t3_" + i); + // set tags + pstmt.setTagBoolean(1, random.nextBoolean()); + // set columns + long current = System.currentTimeMillis(); + for (int j = 0; j < numOfRow; j++) { + pstmt.setTimestamp(1, new Timestamp(current + j)); + pstmt.setBoolean(2, random.nextBoolean()); + pstmt.addBatch(); + } + pstmt.executeBatch(); + } + } + } + + private static void bindBytes(Connection conn) throws SQLException { + String sql = "insert into ? using stable4 tags(?) values(?,?)"; + + try (TSWSPreparedStatement pstmt = conn.prepareStatement(sql).unwrap(TSWSPreparedStatement.class)) { + + for (int i = 1; i <= numOfSubTable; i++) { + // set table name + pstmt.setTableName("t4_" + i); + // set tags + pstmt.setTagString(1, new String("abc")); + + // set columns + long current = System.currentTimeMillis(); + for (int j = 0; j < numOfRow; j++) { + pstmt.setTimestamp(1, new Timestamp(current + j)); + pstmt.setString(2, "abc"); + pstmt.addBatch(); + } + pstmt.executeBatch(); + } + } + } + + private static void bindString(Connection conn) throws SQLException { + String sql = "insert into ? using stable5 tags(?) values(?,?)"; + + try (TSWSPreparedStatement pstmt = conn.prepareStatement(sql).unwrap(TSWSPreparedStatement.class)) { + + for (int i = 1; i <= numOfSubTable; i++) { + // set table name + pstmt.setTableName("t5_" + i); + // set tags + pstmt.setTagNString(1, "California.SanFrancisco"); + + // set columns + long current = System.currentTimeMillis(); + for (int j = 0; j < numOfRow; j++) { + pstmt.setTimestamp(0, new Timestamp(current + j)); + pstmt.setNString(1, "California.SanFrancisco"); + pstmt.addBatch(); + } + pstmt.executeBatch(); + } + } + } +} +``` + + + + +The methods to set TAGS values: + +```java +public void setTagNull(int index, int type) +public void setTagBoolean(int index, boolean value) +public void setTagInt(int index, int value) +public void setTagByte(int index, byte value) +public void setTagShort(int index, short value) +public void setTagLong(int index, long value) +public void setTagTimestamp(int index, long value) +public void setTagFloat(int index, float value) +public void setTagDouble(int index, double value) +public void setTagString(int index, String value) +public void setTagNString(int index, String value) +``` + ### Schemaless Writing TDengine supports schemaless writing. It is compatible with InfluxDB's Line Protocol, OpenTSDB's telnet line protocol, and OpenTSDB's JSON format protocol. For more information, see [Schemaless Writing](../../schemaless). -Note: - -- JDBC REST connections do not currently support schemaless writes -- The following sample code is based on taos-jdbcdriver-3.1.0 + + ```java -public class SchemalessInsertTest { +public class SchemalessJniTest { private static final String host = "127.0.0.1"; private static final String lineDemo = "st,t1=3i64,t2=4f64,t3=\"t3\" c1=3i64,c3=L\"passit\",c2=false,c4=4f64 1626006833639000000"; private static final String telnetDemo = "stb0_0 1626006833 4 host=host0 interface=eth0"; @@ -668,6 +901,41 @@ public class SchemalessInsertTest { } ``` + + + +```java +public class SchemalessWsTest { + private static final String host = "127.0.0.1"; + private static final String lineDemo = "st,t1=3i64,t2=4f64,t3=\"t3\" c1=3i64,c3=L\"passit\",c2=false,c4=4f64 1626006833639000000"; + private static final String telnetDemo = "stb0_0 1626006833 4 host=host0 interface=eth0"; + private static final String jsonDemo = "{\"metric\": \"meter_current\",\"timestamp\": 1626846400,\"value\": 10.3, \"tags\": {\"groupid\": 2, \"location\": \"California.SanFrancisco\", \"id\": \"d1001\"}}"; + + public static void main(String[] args) throws SQLException { + final String url = "jdbc:TAOS-RS://" + host + ":6041/?user=root&password=taosdata&batchfetch=true"; + Connection connection = DriverManager.getConnection(url); + init(connection); + + SchemalessWriter writer = new SchemalessWriter(connection, "test_ws_schemaless"); + writer.write(lineDemo, SchemalessProtocolType.LINE, SchemalessTimestampType.NANO_SECONDS); + writer.write(telnetDemo, SchemalessProtocolType.TELNET, SchemalessTimestampType.MILLI_SECONDS); + writer.write(jsonDemo, SchemalessProtocolType.JSON, SchemalessTimestampType.SECONDS); + System.exit(0); + } + + private static void init(Connection connection) throws SQLException { + try (Statement stmt = connection.createStatement()) { + stmt.executeUpdate("drop database if exists test_ws_schemaless"); + stmt.executeUpdate("create database if not exists test_ws_schemaless keep 36500"); + stmt.executeUpdate("use test_ws_schemaless"); + } + } +} +``` + + + + ### Data Subscription The TDengine Java Connector supports subscription functionality with the following application API. @@ -711,8 +979,9 @@ TaosConsumer consumer = new TaosConsumer<>(config); ```java while(true) { ConsumerRecords records = consumer.poll(Duration.ofMillis(100)); - for (ResultBean record : records) { - process(record); + for (ConsumerRecord record : records) { + ResultBean bean = record.value(); + process(bean); } } ``` @@ -765,8 +1034,9 @@ public abstract class ConsumerLoop { while (!shutdown.get()) { ConsumerRecords records = consumer.poll(Duration.ofMillis(100)); - for (ResultBean record : records) { - process(record); + for (ConsumerRecord record : records) { + ResultBean bean = record.value(); + process(bean); } } consumer.unsubscribe(); @@ -841,8 +1111,9 @@ public abstract class ConsumerLoop { while (!shutdown.get()) { ConsumerRecords records = consumer.poll(Duration.ofMillis(100)); - for (ResultBean record : records) { - process(record); + for (ConsumerRecord record : records) { + ResultBean bean = record.value(); + process(bean); } } consumer.unsubscribe(); @@ -968,20 +1239,6 @@ The source code of the sample application is under `TDengine/examples/JDBC`: [JDBC example](https://github.com/taosdata/TDengine/tree/3.0/examples/JDBC) -## Recent update logs - -| taos-jdbcdriver version | major changes | -| :---------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------: | -| 3.1.0 | JDBC REST connection supports subscription over WebSocket | -| 3.0.1 - 3.0.4 | fix the resultSet data is parsed incorrectly sometimes. 3.0.1 is compiled on JDK 11, you are advised to use other version in the JDK 8 environment | -| 3.0.0 | Support for TDengine 3.0 | -| 2.0.42 | fix wasNull interface return value in WebSocket connection | -| 2.0.41 | fix decode method of username and password in REST connection | -| 2.0.39 - 2.0.40 | Add REST connection/request timeout parameters | -| 2.0.38 | JDBC REST connections add bulk pull function | -| 2.0.37 | Support json tags | -| 2.0.36 | Support schemaless writing | - ## Frequently Asked Questions 1. Why is there no performance improvement when using Statement's `addBatch()` and `executeBatch()` to perform `batch data writing/update`? diff --git a/docs/en/14-reference/07-tdinsight/index.md b/docs/en/14-reference/07-tdinsight/index.md index 652d5ded0b..8d97dafa7c 100644 --- a/docs/en/14-reference/07-tdinsight/index.md +++ b/docs/en/14-reference/07-tdinsight/index.md @@ -12,8 +12,8 @@ After TDengine starts, it automatically writes many metrics in specific interval To deploy TDinsight, we need - a single-node TDengine server or a multi-node TDengine cluster and a [Grafana] server are required. This dashboard requires TDengine 3.0.1.0 and above, with the monitoring feature enabled. For detailed configuration, please refer to [TDengine monitoring configuration](../config/#monitoring-parameters). -- taosAdapter has been instaleld and running, please refer to [taosAdapter](../taosadapter). -- taosKeeper has been installed and running, please refer to [taosKeeper](../taoskeeper). +- taosAdapter has been installed and running, please refer to [taosAdapter](../taosadapter). +- taosKeeper has been installed and running, please refer to [taosKeeper](../taosKeeper). Please record - The endpoint of taosAdapter REST service, for example `http://tdengine.local:6041` diff --git a/docs/en/20-third-party/11-kafka.md b/docs/en/20-third-party/11-kafka.md index 9e322d2a5b..3b0de6c349 100644 --- a/docs/en/20-third-party/11-kafka.md +++ b/docs/en/20-third-party/11-kafka.md @@ -46,15 +46,14 @@ Execute in any directory: ```` curl -O http://packages.confluent.io/archive/7.1/confluent-7.1.1.tar.gz -tar xzf confluent-7.1.1.tar.gz -C /opt/test +tar xzf confluent-7.1.1.tar.gz -C /opt/ ```` Then you need to add the `$CONFLUENT_HOME/bin` directory to the PATH. ```title=".profile" export CONFLUENT_HOME=/opt/confluent-7.1.1 -PATH=$CONFLUENT_HOME/bin -export PATH +export PATH=$CONFLUENT_HOME/bin:$PATH ``` Users can append the above script to the current user's profile file (~/.profile or ~/.bash_profile) @@ -329,7 +328,15 @@ DROP DATABASE IF EXISTS test; CREATE DATABASE test; USE test; CREATE STABLE meters (ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS (location BINARY(64), groupId INT); -INSERT INTO d1001 USING meters TAGS(California.SanFrancisco, 2) VALUES('2018-10-03 14:38:05.000',10.30000,219,0.31000) d1001 USING meters TAGS(California.SanFrancisco, 2) VALUES('2018-10-03 14:38:15.000',12.60000,218,0.33000) d1001 USING meters TAGS(California.SanFrancisco, 2) VALUES('2018-10-03 14:38:16.800',12.30000,221,0.31000) d1002 USING meters TAGS(California.SanFrancisco, 3) VALUES('2018-10-03 14:38:16.650',10.30000,218,0.25000) d1003 USING meters TAGS(California.LoSangeles, 2) VALUES('2018-10-03 14:38:05.500',11.80000,221,0.28000) d1003 USING meters TAGS(California.LoSangeles, 2) VALUES('2018-10-03 14:38:16.600',13.40000,223,0.29000) d1004 USING meters TAGS(California.LoSangeles, 3) VALUES('2018-10-03 14:38:05.000',10.80000,223,0.29000) d1004 USING meters TAGS(California.LoSangeles, 3) VALUES('2018-10-03 14:38:06.500',11.50000,221,0.35000); + +INSERT INTO d1001 USING meters TAGS('California.SanFrancisco', 2) VALUES('2018-10-03 14:38:05.000',10.30000,219,0.31000) \ + d1001 USING meters TAGS('California.SanFrancisco', 2) VALUES('2018-10-03 14:38:15.000',12.60000,218,0.33000) \ + d1001 USING meters TAGS('California.SanFrancisco', 2) VALUES('2018-10-03 14:38:16.800',12.30000,221,0.31000) \ + d1002 USING meters TAGS('California.SanFrancisco', 3) VALUES('2018-10-03 14:38:16.650',10.30000,218,0.25000) \ + d1003 USING meters TAGS('California.LosAngeles', 2) VALUES('2018-10-03 14:38:05.500',11.80000,221,0.28000) \ + d1003 USING meters TAGS('California.LosAngeles', 2) VALUES('2018-10-03 14:38:16.600',13.40000,223,0.29000) \ + d1004 USING meters TAGS('California.LosAngeles', 3) VALUES('2018-10-03 14:38:05.000',10.80000,223,0.29000) \ + d1004 USING meters TAGS('California.LosAngeles', 3) VALUES('2018-10-03 14:38:06.500',11.50000,221,0.35000); ``` Use TDengine CLI to execute SQL script @@ -384,7 +391,7 @@ confluent local services connect connector status You should now have two active connectors if you followed the previous steps. Use the following command to unload: ```` -confluent local services connect connector unload TDengineSourceConnector +confluent local services connect connector unload TDengineSinkConnector confluent local services connect connector unload TDengineSourceConnector ```` diff --git a/docs/en/25-application/01-telegraf.md b/docs/en/25-application/01-telegraf.md index b84b30bb71..1e3325b2b2 100644 --- a/docs/en/25-application/01-telegraf.md +++ b/docs/en/25-application/01-telegraf.md @@ -35,7 +35,7 @@ Please refer to the [official documentation](https://grafana.com/grafana/downloa ### TDengine -Download the latest TDengine-server from the [Downloads](http://tdengine.com/en/all-downloads/) page on the TAOSData website and install it. +Download and install the [latest version of TDengine](https://docs.tdengine.com/releases/tdengine/). ## Data Connection Setup diff --git a/docs/en/25-application/02-collectd.md b/docs/en/25-application/02-collectd.md index 6ac7253fc4..ee1e944928 100644 --- a/docs/en/25-application/02-collectd.md +++ b/docs/en/25-application/02-collectd.md @@ -38,7 +38,7 @@ Please refer to the [official documentation](https://grafana.com/grafana/downloa ### Install TDengine -Download the latest TDengine-server from the [Downloads](http://tdengine.com/en/all-downloads/) page on the TAOSData website and install it. +Download and install the [latest version of TDengine](https://docs.tdengine.com/releases/tdengine/). ## Data Connection Setup diff --git a/docs/en/27-train-faq/01-faq.md b/docs/en/27-train-faq/01-faq.md index 9e7f4f8e0d..aa28303f5d 100644 --- a/docs/en/27-train-faq/01-faq.md +++ b/docs/en/27-train-faq/01-faq.md @@ -32,7 +32,7 @@ TDengine 3.0 is not compatible with the configuration and data files from previo 2. Run `sudo rm -rf /var/log/taos/` to delete your log files. 3. Run `sudo rm -rf /var/lib/taos/` to delete your data files. 4. Install TDengine 3.0. -5. For assistance in migrating data to TDengine 3.0, contact [TDengine Support](https://tdengine.com/support). +5. For assistance in migrating data to TDengine 3.0, contact [TDengine Support](https://tdengine.com/support/). ### 2. How can I resolve the "Unable to establish connection" error? diff --git a/docs/examples/java/pom.xml b/docs/examples/java/pom.xml index 01d0ce936c..4bdb2062b2 100644 --- a/docs/examples/java/pom.xml +++ b/docs/examples/java/pom.xml @@ -22,7 +22,7 @@ com.taosdata.jdbc taos-jdbcdriver - 3.1.0 + 3.2.1 diff --git a/docs/examples/java/src/main/java/com/taos/example/SubscribeDemo.java b/docs/examples/java/src/main/java/com/taos/example/SubscribeDemo.java index 8da6f77bae..b5cdedc34f 100644 --- a/docs/examples/java/src/main/java/com/taos/example/SubscribeDemo.java +++ b/docs/examples/java/src/main/java/com/taos/example/SubscribeDemo.java @@ -1,5 +1,6 @@ package com.taos.example; +import com.taosdata.jdbc.tmq.ConsumerRecord; import com.taosdata.jdbc.tmq.ConsumerRecords; import com.taosdata.jdbc.tmq.TMQConstants; import com.taosdata.jdbc.tmq.TaosConsumer; @@ -64,7 +65,8 @@ public class SubscribeDemo { consumer.subscribe(Collections.singletonList(TOPIC)); while (!shutdown.get()) { ConsumerRecords meters = consumer.poll(Duration.ofMillis(100)); - for (Meters meter : meters) { + for (ConsumerRecord recode : meters) { + Meters meter = recode.value(); System.out.println(meter); } } diff --git a/docs/zh/07-develop/07-tmq.mdx b/docs/zh/07-develop/07-tmq.mdx index a3833438a2..11aef1f7e8 100644 --- a/docs/zh/07-develop/07-tmq.mdx +++ b/docs/zh/07-develop/07-tmq.mdx @@ -25,7 +25,8 @@ import CDemo from "./_sub_c.mdx"; 本文档不对消息队列本身的基础知识做介绍,如果需要了解,请自行搜索。 -注意:默认是从wal消费数据,如果wal被删除,消费到的数据会不全,此时可以将参数 experimental.snapshot.enable 设置为true,从tsdb获取全部数据,但是这样的话就不能保证数据的消费顺序。所以建议根据自己的消费情况合理的设置wal的保留策略,保证可以从wal里订阅到全部数据。 +注意:数据订阅是从 WAL 消费数据,如果一些 WAL 文件被基于 WAL 保留策略删除,则已经删除的 WAL 文件中的数据就无法再消费到。需要根据业务需要在创建数据库时合理设置 `WAL_RETENTION_PERIOD` 或 `WAL_RETENTION_SIZE` ,并确保应用及时消费数据,这样才不会产生数据丢失的现象。数据订阅的行为与 Kafka 等广泛使用的消息队列类产品的行为相似。 + ## 主要数据结构和 API 不同语言下, TMQ 订阅相关的 API 及数据结构如下: @@ -293,7 +294,6 @@ CREATE TOPIC topic_name AS DATABASE db_name; | `auto.offset.reset` | enum | 消费组订阅的初始位置 |
`earliest`: default;从头开始订阅;
`latest`: 仅从最新数据开始订阅;
`none`: 没有提交的 offset 无法订阅 | | `enable.auto.commit` | boolean | 是否启用消费位点自动提交,true: 自动提交,客户端应用无需commit;false:客户端应用需要自行commit | 默认值为 true | | `auto.commit.interval.ms` | integer | 消费记录自动提交消费位点时间间隔,单位为毫秒 | 默认值为 5000 | -| `experimental.snapshot.enable` | boolean | 是否允许从 TSDB 消费数据。当其关闭时,只能消费依据 WAL 保留策略仍然在WAL中的数据;当其打开时,除WAL中的数据以外,也能够消费已经从WAL中删除但落盘到TSDB中的数据 | 实验功能,默认关闭 | | `msg.with.table.name` | boolean | 是否允许从消息中解析表名, 不适用于列订阅(列订阅时可将 tbname 作为列写入 subquery 语句) |默认关闭 | 对于不同编程语言,其设置方式如下: @@ -311,7 +311,6 @@ tmq_conf_set(conf, "group.id", "cgrpName"); tmq_conf_set(conf, "td.connect.user", "root"); tmq_conf_set(conf, "td.connect.pass", "taosdata"); tmq_conf_set(conf, "auto.offset.reset", "earliest"); -tmq_conf_set(conf, "experimental.snapshot.enable", "true"); tmq_conf_set(conf, "msg.with.table.name", "true"); tmq_conf_set_auto_commit_cb(conf, tmq_commit_cb_print, NULL); @@ -367,7 +366,6 @@ conf := &tmq.ConfigMap{ "td.connect.port": "6030", "client.id": "test_tmq_c", "enable.auto.commit": "false", - "experimental.snapshot.enable": "true", "msg.with.table.name": "true", } consumer, err := NewConsumer(conf) @@ -417,7 +415,6 @@ consumer = Consumer({"group.id": "local", "td.connect.ip": "127.0.0.1"}) | `enable.auto.commit` | string | 启用自动提交 | 合法值:`true`, `false` | | `auto.commit.interval.ms` | string | 以毫秒为单位的自动提交时间间隔 | 默认值:5000 ms | | `auto.offset.reset` | string | 消费组订阅的初始位置 | 可选:`earliest`(default), `latest`, `none` | -| `experimental.snapshot.enable` | string | 是否允许从 TSDB 消费数据 | 合法值:`true`, `false` | diff --git a/docs/zh/08-connector/14-java.mdx b/docs/zh/08-connector/14-java.mdx index bf89b1df83..35332a9602 100644 --- a/docs/zh/08-connector/14-java.mdx +++ b/docs/zh/08-connector/14-java.mdx @@ -36,6 +36,93 @@ REST 连接支持所有能运行 Java 的平台。 请参考[版本支持列表](../#版本支持) +## 最近更新记录 + +| taos-jdbcdriver 版本 | 主要变化 | +| :------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------: | +| 3.2.1 | 新增功能:WebSocket 连接支持 schemaless 与 prepareStatement 写入。变更:consumer poll 返回结果集为 ConsumerRecord,可通过 value() 获取指定结果集数据。 | +| 3.2.0 | 存在连接问题,不推荐使用 | +| 3.1.0 | WebSocket 连接支持订阅功能 | +| 3.0.1 - 3.0.4 | 修复一些情况下结果集数据解析错误的问题。3.0.1 在 JDK 11 环境编译,JDK 8 环境下建议使用其他版本 | +| 3.0.0 | 支持 TDengine 3.0 | +| 2.0.42 | 修在 WebSocket 连接中 wasNull 接口返回值 | +| 2.0.41 | 修正 REST 连接中用户名和密码转码方式 | +| 2.0.39 - 2.0.40 | 增加 REST 连接/请求 超时设置 | +| 2.0.38 | JDBC REST 连接增加批量拉取功能 | +| 2.0.37 | 增加对 json tag 支持 | +| 2.0.36 | 增加对 schemaless 写入支持 | + +**注**:REST 连接中增加 `batchfetch` 参数并设置为 true,将开启 WebSocket 连接。 + +## 处理异常 + +在报错后,通过 SQLException 可以获取到错误的信息和错误码: + +```java +try (Statement statement = connection.createStatement()) { + // executeQuery + ResultSet resultSet = statement.executeQuery(sql); + // print result + printResult(resultSet); +} catch (SQLException e) { + System.out.println("ERROR Message: " + e.getMessage()); + System.out.println("ERROR Code: " + e.getErrorCode()); + e.printStackTrace(); +} +``` + +JDBC 连接器可能报错的错误码包括 4 种: + +- JDBC driver 本身的报错(错误码在 0x2301 到 0x2350 之间) +- 原生连接方法的报错(错误码在 0x2351 到 0x2360 之间) +- 数据订阅的报错(错误码在 0x2371 到 0x2380 之间) +- TDengine 其他功能模块的报错。 + +具体的错误码请参考: + +| Error Code | Description | Suggested Actions | +| ---------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| 0x2301 | connection already closed | 连接已经关闭,检查连接情况,或重新创建连接去执行相关指令。 | +| 0x2302 | this operation is NOT supported currently! | 当前使用接口不支持,可以更换其他连接方式。 | +| 0x2303 | invalid variables | 参数不合法,请检查相应接口规范,调整参数类型及大小。 | +| 0x2304 | statement is closed | statement 已经关闭,请检查 statement 是否关闭后再次使用,或是连接是否正常。 | +| 0x2305 | resultSet is closed | resultSet 结果集已经释放,请检查 resultSet 是否释放后再次使用。 | +| 0x2306 | Batch is empty! | prepareStatement 添加参数后再执行 executeBatch。 | +| 0x2307 | Can not issue data manipulation statements with executeQuery() | 更新操作应该使用 executeUpdate(),而不是 executeQuery()。 | +| 0x2308 | Can not issue SELECT via executeUpdate() | 查询操作应该使用 executeQuery(),而不是 executeUpdate()。 | +| 0x230d | parameter index out of range | 参数越界,请检查参数的合理范围。 | +| 0x230e | connection already closed | 连接已经关闭,请检查 Connection 是否关闭后再次使用,或是连接是否正常。 | +| 0x230f | unknown sql type in tdengine | 请检查 TDengine 支持的 Data Type 类型。 | +| 0x2310 | can't register JDBC-JNI driver | 不能注册 JNI 驱动,请检查 url 是否填写正确。 | +| 0x2312 | url is not set | 请检查 REST 连接 url 是否填写正确。 | +| 0x2314 | numeric value out of range | 请检查获取结果集中数值类型是否使用了正确的接口。 | +| 0x2315 | unknown taos type in tdengine | 在 TDengine 数据类型与 JDBC 数据类型转换时,是否指定了正确的 TDengine 数据类型。 | +| 0x2317 | | REST 连接中使用了错误的请求类型。 | +| 0x2318 | | REST 连接中出现了数据传输异常,请检查网络情况并重试。 | +| 0x2319 | user is required | 创建连接时缺少用户名信息 | +| 0x231a | password is required | 创建连接时缺少密码信息 | +| 0x231c | httpEntity is null, sql: | REST 连接中执行出现异常 | +| 0x2350 | unknown error | 未知异常,请在 github 反馈给开发人员。 | +| 0x2352 | Unsupported encoding | 本地连接下指定了不支持的字符编码集 | +| 0x2353 | internal error of database, please see taoslog for more details | 本地连接执行 prepareStatement 时出现错误,请检查 taos log 进行问题定位。 | +| 0x2354 | JNI connection is NULL | 本地连接执行命令时,Connection 已经关闭。请检查与 TDengine 的连接情况。 | +| 0x2355 | JNI result set is NULL | 本地连接获取结果集,结果集异常,请检查连接情况,并重试。 | +| 0x2356 | invalid num of fields | 本地连接获取结果集的 meta 信息不匹配。 | +| 0x2357 | empty sql string | 填写正确的 SQL 进行执行。 | +| 0x2359 | JNI alloc memory failed, please see taoslog for more details | 本地连接分配内存错误,请检查 taos log 进行问题定位。 | +| 0x2371 | consumer properties must not be null! | 创建订阅时参数为空,请填写正确的参数。 | +| 0x2372 | configs contain empty key, failed to set consumer property | 参数 key 中包含空值,请填写正确的参数。 | +| 0x2373 | failed to set consumer property, | 参数 value 中包含空值,请填写正确的参数。 | +| 0x2375 | topic reference has been destroyed | 创建数据订阅过程中,topic 引用被释放。请检查与 TDengine 的连接情况。 | +| 0x2376 | failed to set consumer topic, topic name is empty | 创建数据订阅过程中,订阅 topic 名称为空。请检查指定的 topic 名称是否填写正确。 | +| 0x2377 | consumer reference has been destroyed | 订阅数据传输通道已经关闭,请检查与 TDengine 的连接情况。 | +| 0x2378 | consumer create error | 创建数据订阅失败,请根据错误信息检查 taos log 进行问题定位。 | +| - | can't create connection with server within | 通过增加参数 httpConnectTimeout 增加连接耗时,或是请检查与 taosAdapter 之间的连接情况。 | +| - | failed to complete the task within the specified time | 通过增加参数 messageWaitTimeout 增加执行耗时,或是请检查与 taosAdapter 之间的连接情况。 | + +- [TDengine Java Connector](https://github.com/taosdata/taos-connector-jdbc/blob/main/src/main/java/com/taosdata/jdbc/TSDBErrorNumbers.java) + + ## TDengine DataType 和 Java DataType TDengine 目前支持时间戳、数字、字符、布尔类型,与 Java 对应类型转换如下: @@ -82,7 +169,7 @@ Maven 项目中,在 pom.xml 中添加以下依赖: com.taosdata.jdbc taos-jdbcdriver - 3.1.0 + 3.2.1 ``` @@ -97,7 +184,7 @@ cd taos-connector-jdbc mvn clean install -Dmaven.test.skip=true ``` -编译后,在 target 目录下会产生 taos-jdbcdriver-3.0.\*-dist.jar 的 jar 包,并自动将编译的 jar 文件放在本地的 Maven 仓库中。 +编译后,在 target 目录下会产生 taos-jdbcdriver-3.2.\*-dist.jar 的 jar 包,并自动将编译的 jar 文件放在本地的 Maven 仓库中。 @@ -336,35 +423,6 @@ while(resultSet.next()){ > 查询和操作关系型数据库一致,使用下标获取返回字段内容时从 1 开始,建议使用字段名称获取。 -### 处理异常 - -在报错后,通过 SQLException 可以获取到错误的信息和错误码: - -```java -try (Statement statement = connection.createStatement()) { - // executeQuery - ResultSet resultSet = statement.executeQuery(sql); - // print result - printResult(resultSet); -} catch (SQLException e) { - System.out.println("ERROR Message: " + e.getMessage()); - System.out.println("ERROR Code: " + e.getErrorCode()); - e.printStackTrace(); -} -``` - -JDBC 连接器可能报错的错误码包括 4 种: - -- JDBC driver 本身的报错(错误码在 0x2301 到 0x2350 之间) -- 原生连接方法的报错(错误码在 0x2351 到 0x2360 之间) -- 数据订阅的报错(错误码在 0x2371 到 0x2380 之间) -- TDengine 其他功能模块的报错。 - -具体的错误码请参考: - -- [TDengine Java Connector](https://github.com/taosdata/taos-connector-jdbc/blob/main/src/main/java/com/taosdata/jdbc/TSDBErrorNumbers.java) - - ### 通过参数绑定写入数据 TDengine 的 JDBC 原生连接实现大幅改进了参数绑定方式对数据写入(INSERT)场景的支持。采用这种方式写入数据时,能避免 SQL 语法解析的资源消耗,从而在很多情况下显著提升写入性能。 @@ -372,9 +430,12 @@ TDengine 的 JDBC 原生连接实现大幅改进了参数绑定方式对数据 **注意**: - JDBC REST 连接目前不支持参数绑定 -- 以下示例代码基于 taos-jdbcdriver-3.1.0 +- 以下示例代码基于 taos-jdbcdriver-3.2.1 - binary 类型数据需要调用 setString 方法,nchar 类型数据需要调用 setNString 方法 -- setString 和 setNString 都要求用户在 size 参数里声明表定义中对应列的列宽 +- 预处理语句中指定数据库与子表名称不要使用 `db.?`,应直接使用 `?`,然后在 setTableName 中指定数据库,如:`prepareStatement.setTableName("db.t1")`。 + + + ```java public class ParameterBindingDemo { @@ -602,21 +663,7 @@ public class ParameterBindingDemo { } ``` -用于设定 TAGS 取值的方法总共有: - -```java -public void setTagNull(int index, int type) -public void setTagBoolean(int index, boolean value) -public void setTagInt(int index, int value) -public void setTagByte(int index, byte value) -public void setTagShort(int index, short value) -public void setTagLong(int index, long value) -public void setTagTimestamp(int index, long value) -public void setTagFloat(int index, float value) -public void setTagDouble(int index, double value) -public void setTagString(int index, String value) -public void setTagNString(int index, String value) -``` +**注**:setString 和 setNString 都要求用户在 size 参数里声明表定义中对应列的列宽 用于设定 VALUES 数据列的取值的方法总共有: @@ -633,17 +680,203 @@ public void setString(int columnIndex, ArrayList list, int size) throws public void setNString(int columnIndex, ArrayList list, int size) throws SQLException ``` + + + +```java +public class ParameterBindingDemo { + private static final String host = "127.0.0.1"; + private static final Random random = new Random(System.currentTimeMillis()); + private static final int BINARY_COLUMN_SIZE = 30; + private static final String[] schemaList = { + "create table stable1(ts timestamp, f1 tinyint, f2 smallint, f3 int, f4 bigint) tags(t1 tinyint, t2 smallint, t3 int, t4 bigint)", + "create table stable2(ts timestamp, f1 float, f2 double) tags(t1 float, t2 double)", + "create table stable3(ts timestamp, f1 bool) tags(t1 bool)", + "create table stable4(ts timestamp, f1 binary(" + BINARY_COLUMN_SIZE + ")) tags(t1 binary(" + BINARY_COLUMN_SIZE + "))", + "create table stable5(ts timestamp, f1 nchar(" + BINARY_COLUMN_SIZE + ")) tags(t1 nchar(" + BINARY_COLUMN_SIZE + "))" + }; + private static final int numOfSubTable = 10, numOfRow = 10; + + public static void main(String[] args) throws SQLException { + + String jdbcUrl = "jdbc:TAOS-RS://" + host + ":6041/?batchfetch=true"; + Connection conn = DriverManager.getConnection(jdbcUrl, "root", "taosdata"); + + init(conn); + + bindInteger(conn); + + bindFloat(conn); + + bindBoolean(conn); + + bindBytes(conn); + + bindString(conn); + + conn.close(); + } + + private static void init(Connection conn) throws SQLException { + try (Statement stmt = conn.createStatement()) { + stmt.execute("drop database if exists test_ws_parabind"); + stmt.execute("create database if not exists test_ws_parabind"); + stmt.execute("use test_ws_parabind"); + for (int i = 0; i < schemaList.length; i++) { + stmt.execute(schemaList[i]); + } + } + } + + private static void bindInteger(Connection conn) throws SQLException { + String sql = "insert into ? using stable1 tags(?,?,?,?) values(?,?,?,?,?)"; + + try (TSWSPreparedStatement pstmt = conn.prepareStatement(sql).unwrap(TSWSPreparedStatement.class)) { + + for (int i = 1; i <= numOfSubTable; i++) { + // set table name + pstmt.setTableName("t1_" + i); + // set tags + pstmt.setTagByte(1, Byte.parseByte(Integer.toString(random.nextInt(Byte.MAX_VALUE)))); + pstmt.setTagShort(2, Short.parseShort(Integer.toString(random.nextInt(Short.MAX_VALUE)))); + pstmt.setTagInt(3, random.nextInt(Integer.MAX_VALUE)); + pstmt.setTagLong(4, random.nextLong()); + // set columns + long current = System.currentTimeMillis(); + for (int j = 0; j < numOfRow; j++) { + pstmt.setTimestamp(1, new Timestamp(current + j)); + pstmt.setByte(2, Byte.parseByte(Integer.toString(random.nextInt(Byte.MAX_VALUE)))); + pstmt.setShort(3, Short.parseShort(Integer.toString(random.nextInt(Short.MAX_VALUE)))); + pstmt.setInt(4, random.nextInt(Integer.MAX_VALUE)); + pstmt.setLong(5, random.nextLong()); + pstmt.addBatch(); + } + pstmt.executeBatch(); + } + } + } + + private static void bindFloat(Connection conn) throws SQLException { + String sql = "insert into ? using stable2 tags(?,?) values(?,?,?)"; + + try(TSWSPreparedStatement pstmt = conn.prepareStatement(sql).unwrap(TSWSPreparedStatement.class)) { + + for (int i = 1; i <= numOfSubTable; i++) { + // set table name + pstmt.setTableName("t2_" + i); + // set tags + pstmt.setTagFloat(1, random.nextFloat()); + pstmt.setTagDouble(2, random.nextDouble()); + // set columns + long current = System.currentTimeMillis(); + for (int j = 0; j < numOfRow; j++) { + pstmt.setTimestamp(1, new Timestamp(current + j)); + pstmt.setFloat(2, random.nextFloat()); + pstmt.setDouble(3, random.nextDouble()); + pstmt.addBatch(); + } + pstmt.executeBatch(); + } + } + } + + private static void bindBoolean(Connection conn) throws SQLException { + String sql = "insert into ? using stable3 tags(?) values(?,?)"; + + try (TSWSPreparedStatement pstmt = conn.prepareStatement(sql).unwrap(TSWSPreparedStatement.class)) { + for (int i = 1; i <= numOfSubTable; i++) { + // set table name + pstmt.setTableName("t3_" + i); + // set tags + pstmt.setTagBoolean(1, random.nextBoolean()); + // set columns + long current = System.currentTimeMillis(); + for (int j = 0; j < numOfRow; j++) { + pstmt.setTimestamp(1, new Timestamp(current + j)); + pstmt.setBoolean(2, random.nextBoolean()); + pstmt.addBatch(); + } + pstmt.executeBatch(); + } + } + } + + private static void bindBytes(Connection conn) throws SQLException { + String sql = "insert into ? using stable4 tags(?) values(?,?)"; + + try (TSWSPreparedStatement pstmt = conn.prepareStatement(sql).unwrap(TSWSPreparedStatement.class)) { + + for (int i = 1; i <= numOfSubTable; i++) { + // set table name + pstmt.setTableName("t4_" + i); + // set tags + pstmt.setTagString(1, new String("abc")); + + // set columns + long current = System.currentTimeMillis(); + for (int j = 0; j < numOfRow; j++) { + pstmt.setTimestamp(1, new Timestamp(current + j)); + pstmt.setString(2, "abc"); + pstmt.addBatch(); + } + pstmt.executeBatch(); + } + } + } + + private static void bindString(Connection conn) throws SQLException { + String sql = "insert into ? using stable5 tags(?) values(?,?)"; + + try (TSWSPreparedStatement pstmt = conn.prepareStatement(sql).unwrap(TSWSPreparedStatement.class)) { + + for (int i = 1; i <= numOfSubTable; i++) { + // set table name + pstmt.setTableName("t5_" + i); + // set tags + pstmt.setTagNString(1, "California.SanFrancisco"); + + // set columns + long current = System.currentTimeMillis(); + for (int j = 0; j < numOfRow; j++) { + pstmt.setTimestamp(0, new Timestamp(current + j)); + pstmt.setNString(1, "California.SanFrancisco"); + pstmt.addBatch(); + } + pstmt.executeBatch(); + } + } + } +} +``` + + + + +用于设定 TAGS 取值的方法总共有: + +```java +public void setTagNull(int index, int type) +public void setTagBoolean(int index, boolean value) +public void setTagInt(int index, int value) +public void setTagByte(int index, byte value) +public void setTagShort(int index, short value) +public void setTagLong(int index, long value) +public void setTagTimestamp(int index, long value) +public void setTagFloat(int index, float value) +public void setTagDouble(int index, double value) +public void setTagString(int index, String value) +public void setTagNString(int index, String value) +``` + ### 无模式写入 TDengine 支持无模式写入功能。无模式写入兼容 InfluxDB 的 行协议(Line Protocol)、OpenTSDB 的 telnet 行协议和 OpenTSDB 的 JSON 格式协议。详情请参见[无模式写入](../../reference/schemaless/)。 -**注意**: - -- JDBC REST 连接目前不支持无模式写入 -- 以下示例代码基于 taos-jdbcdriver-3.1.0 + + ```java -public class SchemalessInsertTest { +public class SchemalessJniTest { private static final String host = "127.0.0.1"; private static final String lineDemo = "st,t1=3i64,t2=4f64,t3=\"t3\" c1=3i64,c3=L\"passit\",c2=false,c4=4f64 1626006833639000000"; private static final String telnetDemo = "stb0_0 1626006833 4 host=host0 interface=eth0"; @@ -671,6 +904,41 @@ public class SchemalessInsertTest { } ``` + + + +```java +public class SchemalessWsTest { + private static final String host = "127.0.0.1"; + private static final String lineDemo = "st,t1=3i64,t2=4f64,t3=\"t3\" c1=3i64,c3=L\"passit\",c2=false,c4=4f64 1626006833639000000"; + private static final String telnetDemo = "stb0_0 1626006833 4 host=host0 interface=eth0"; + private static final String jsonDemo = "{\"metric\": \"meter_current\",\"timestamp\": 1626846400,\"value\": 10.3, \"tags\": {\"groupid\": 2, \"location\": \"California.SanFrancisco\", \"id\": \"d1001\"}}"; + + public static void main(String[] args) throws SQLException { + final String url = "jdbc:TAOS-RS://" + host + ":6041/?user=root&password=taosdata&batchfetch=true"; + Connection connection = DriverManager.getConnection(url); + init(connection); + + SchemalessWriter writer = new SchemalessWriter(connection, "test_ws_schemaless"); + writer.write(lineDemo, SchemalessProtocolType.LINE, SchemalessTimestampType.NANO_SECONDS); + writer.write(telnetDemo, SchemalessProtocolType.TELNET, SchemalessTimestampType.MILLI_SECONDS); + writer.write(jsonDemo, SchemalessProtocolType.JSON, SchemalessTimestampType.SECONDS); + System.exit(0); + } + + private static void init(Connection connection) throws SQLException { + try (Statement stmt = connection.createStatement()) { + stmt.executeUpdate("drop database if exists test_ws_schemaless"); + stmt.executeUpdate("create database if not exists test_ws_schemaless keep 36500"); + stmt.executeUpdate("use test_ws_schemaless"); + } + } +} +``` + + + + ### 数据订阅 TDengine Java 连接器支持订阅功能,应用 API 如下: @@ -714,8 +982,9 @@ TaosConsumer consumer = new TaosConsumer<>(config); ```java while(true) { ConsumerRecords records = consumer.poll(Duration.ofMillis(100)); - for (ResultBean record : records) { - process(record); + for (ConsumerRecord record : records) { + ResultBean bean = record.value(); + process(bean); } } ``` @@ -766,8 +1035,9 @@ public abstract class ConsumerLoop { while (!shutdown.get()) { ConsumerRecords records = consumer.poll(Duration.ofMillis(100)); - for (ResultBean record : records) { - process(record); + for (ConsumerRecord record : records) { + ResultBean bean = record.value(); + process(bean); } } consumer.unsubscribe(); @@ -844,8 +1114,9 @@ public abstract class ConsumerLoop { while (!shutdown.get()) { ConsumerRecords records = consumer.poll(Duration.ofMillis(100)); - for (ResultBean record : records) { - process(record); + for (ConsumerRecord record : records) { + ResultBean bean = record.value(); + process(bean); } } consumer.unsubscribe(); @@ -971,20 +1242,6 @@ public static void main(String[] args) throws Exception { 请参考:[JDBC example](https://github.com/taosdata/TDengine/tree/3.0/examples/JDBC) -## 最近更新记录 - -| taos-jdbcdriver 版本 | 主要变化 | -| :------------------: | :--------------------------------------------------------------------------------------------: | -| 3.1.0 | WebSocket 连接支持订阅功能 | -| 3.0.1 - 3.0.4 | 修复一些情况下结果集数据解析错误的问题。3.0.1 在 JDK 11 环境编译,JDK 8 环境下建议使用其他版本 | -| 3.0.0 | 支持 TDengine 3.0 | -| 2.0.42 | 修在 WebSocket 连接中 wasNull 接口返回值 | -| 2.0.41 | 修正 REST 连接中用户名和密码转码方式 | -| 2.0.39 - 2.0.40 | 增加 REST 连接/请求 超时设置 | -| 2.0.38 | JDBC REST 连接增加批量拉取功能 | -| 2.0.37 | 增加对 json tag 支持 | -| 2.0.36 | 增加对 schemaless 写入支持 | - ## 常见问题 1. 使用 Statement 的 `addBatch()` 和 `executeBatch()` 来执行“批量写入/更新”,为什么没有带来性能上的提升? diff --git a/docs/zh/12-taos-sql/04-stable.md b/docs/zh/12-taos-sql/04-stable.md index 74ef52ee7c..93decf190d 100644 --- a/docs/zh/12-taos-sql/04-stable.md +++ b/docs/zh/12-taos-sql/04-stable.md @@ -33,7 +33,7 @@ column_definition: SHOW STABLES [LIKE tb_name_wildcard]; ``` -查看数据库内全部 STable,及其相关信息,包括 STable 的名称、创建时间、列数量、标签(TAG)数量、通过该 STable 建表的数量。 +查看数据库内全部超级表。 ### 显示一个超级表的创建语句 diff --git a/docs/zh/12-taos-sql/06-select.md b/docs/zh/12-taos-sql/06-select.md index e4ba5b76e4..870df73471 100644 --- a/docs/zh/12-taos-sql/06-select.md +++ b/docs/zh/12-taos-sql/06-select.md @@ -55,7 +55,7 @@ window_clause: { | INTERVAL(interval_val [, interval_offset]) [SLIDING (sliding_val)] [WATERMARK(watermark_val)] [FILL(fill_mod_and_val)] interp_clause: - RANGE(ts_val, ts_val), EVERY(every_val), FILL(fill_mod_and_val) + RANGE(ts_val, ts_val) EVERY(every_val) FILL(fill_mod_and_val) partition_by_clause: PARTITION BY expr [, expr] ... diff --git a/docs/zh/12-taos-sql/10-function.md b/docs/zh/12-taos-sql/10-function.md index 50e82e6b90..458fc9c7a2 100644 --- a/docs/zh/12-taos-sql/10-function.md +++ b/docs/zh/12-taos-sql/10-function.md @@ -888,7 +888,7 @@ INTERP(expr) - INTERP 的输出时间范围根据 RANGE(timestamp1,timestamp2)字段来指定,需满足 timestamp1 <= timestamp2。其中 timestamp1(必选值)为输出时间范围的起始值,即如果 timestamp1 时刻符合插值条件则 timestamp1 为输出的第一条记录,timestamp2(必选值)为输出时间范围的结束值,即输出的最后一条记录的 timestamp 不能大于 timestamp2。 - INTERP 根据 EVERY(time_unit) 字段来确定输出时间范围内的结果条数,即从 timestamp1 开始每隔固定长度的时间(time_unit 值)进行插值,time_unit 可取值时间单位:1a(毫秒),1s(秒),1m(分),1h(小时),1d(天),1w(周)。例如 EVERY(500a) 将对于指定数据每500毫秒间隔进行一次插值. - INTERP 根据 FILL 字段来决定在每个符合输出条件的时刻如何进行插值。关于 FILL 子句如何使用请参考 [FILL 子句](../distinguished/#fill-子句) -- INTERP 只能在一个时间序列内进行插值,因此当作用于超级表时必须跟 partition by tbname 一起使用。 +- INTERP 作用于超级表时, 会将该超级表下的所有子表数据按照主键列排序后进行插值计算,也可以搭配 PARTITION BY tbname 使用,将结果强制规约到单个时间线。 - INTERP 可以与伪列 _irowts 一起使用,返回插值点所对应的时间戳(3.0.2.0版本以后支持)。 - INTERP 可以与伪列 _isfilled 一起使用,显示返回结果是否为原始记录或插值算法产生的数据(3.0.3.0版本以后支持)。 diff --git a/docs/zh/12-taos-sql/24-show.md b/docs/zh/12-taos-sql/24-show.md index ab29a1ee50..12ad665e42 100644 --- a/docs/zh/12-taos-sql/24-show.md +++ b/docs/zh/12-taos-sql/24-show.md @@ -129,6 +129,14 @@ SHOW QNODES; 显示当前系统中 QNODE (查询节点)的信息。 +## SHOW QUERIES + +```sql +SHOW QUERIES; +``` + +显示当前系统中正在进行的查询。 + ## SHOW SCORES ```sql diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index c1d23df409..2694086f59 100644 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -735,7 +735,6 @@ charset 的有效值是 UTF-8。 | 16 | maxTmrCtrl | 是 | 否 | 3.0 行为未知 | | 17 | monitorReplica | 是 | 否 | 由 RAFT 协议管理多副本 | | 18 | smlTagNullName | 是 | 否 | 3.0 行为未知 | -| 19 | keepColumnName | 是 | 否 | 3.0 行为未知 | | 20 | ratioOfQueryCores | 是 | 否 | 由 线程池 相关配置参数决定 | | 21 | maxStreamCompDelay | 是 | 否 | 3.0 行为未知 | | 22 | maxFirstStreamCompDelay | 是 | 否 | 3.0 行为未知 | diff --git a/docs/zh/20-third-party/11-kafka.md b/docs/zh/20-third-party/11-kafka.md index 7fb7738a4f..75d8deebb1 100644 --- a/docs/zh/20-third-party/11-kafka.md +++ b/docs/zh/20-third-party/11-kafka.md @@ -48,15 +48,14 @@ Confluent 提供了 Docker 和二进制包两种安装方式。本文仅介绍 ``` curl -O http://packages.confluent.io/archive/7.1/confluent-7.1.1.tar.gz -tar xzf confluent-7.1.1.tar.gz -C /opt/test +tar xzf confluent-7.1.1.tar.gz -C /opt/ ``` 然后需要把 `$CONFLUENT_HOME/bin` 目录加入 PATH。 ```title=".profile" export CONFLUENT_HOME=/opt/confluent-7.1.1 -PATH=$CONFLUENT_HOME/bin -export PATH +export PATH=$CONFLUENT_HOME/bin:$PATH ``` 以上脚本可以追加到当前用户的 profile 文件(~/.profile 或 ~/.bash_profile) @@ -333,7 +332,15 @@ DROP DATABASE IF EXISTS test; CREATE DATABASE test; USE test; CREATE STABLE meters (ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS (location BINARY(64), groupId INT); -INSERT INTO d1001 USING meters TAGS(California.SanFrancisco, 2) VALUES('2018-10-03 14:38:05.000',10.30000,219,0.31000) d1001 USING meters TAGS(California.SanFrancisco, 2) VALUES('2018-10-03 14:38:15.000',12.60000,218,0.33000) d1001 USING meters TAGS(California.SanFrancisco, 2) VALUES('2018-10-03 14:38:16.800',12.30000,221,0.31000) d1002 USING meters TAGS(California.SanFrancisco, 3) VALUES('2018-10-03 14:38:16.650',10.30000,218,0.25000) d1003 USING meters TAGS(California.LosAngeles, 2) VALUES('2018-10-03 14:38:05.500',11.80000,221,0.28000) d1003 USING meters TAGS(California.LosAngeles, 2) VALUES('2018-10-03 14:38:16.600',13.40000,223,0.29000) d1004 USING meters TAGS(California.LosAngeles, 3) VALUES('2018-10-03 14:38:05.000',10.80000,223,0.29000) d1004 USING meters TAGS(California.LosAngeles, 3) VALUES('2018-10-03 14:38:06.500',11.50000,221,0.35000); + +INSERT INTO d1001 USING meters TAGS('California.SanFrancisco', 2) VALUES('2018-10-03 14:38:05.000',10.30000,219,0.31000) \ + d1001 USING meters TAGS('California.SanFrancisco', 2) VALUES('2018-10-03 14:38:15.000',12.60000,218,0.33000) \ + d1001 USING meters TAGS('California.SanFrancisco', 2) VALUES('2018-10-03 14:38:16.800',12.30000,221,0.31000) \ + d1002 USING meters TAGS('California.SanFrancisco', 3) VALUES('2018-10-03 14:38:16.650',10.30000,218,0.25000) \ + d1003 USING meters TAGS('California.LosAngeles', 2) VALUES('2018-10-03 14:38:05.500',11.80000,221,0.28000) \ + d1003 USING meters TAGS('California.LosAngeles', 2) VALUES('2018-10-03 14:38:16.600',13.40000,223,0.29000) \ + d1004 USING meters TAGS('California.LosAngeles', 3) VALUES('2018-10-03 14:38:05.000',10.80000,223,0.29000) \ + d1004 USING meters TAGS('California.LosAngeles', 3) VALUES('2018-10-03 14:38:06.500',11.50000,221,0.35000); ``` 使用 TDengine CLI, 执行 SQL 文件。 @@ -388,7 +395,7 @@ confluent local services connect connector status 如果按照前述操作,此时应有两个活跃的 connector。使用下面的命令 unload: ``` -confluent local services connect connector unload TDengineSourceConnector +confluent local services connect connector unload TDengineSinkConnector confluent local services connect connector unload TDengineSourceConnector ``` diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 8a47b850c4..46e09a56b6 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -26,6 +26,10 @@ extern "C" { #include "tgrantCfg.h" #endif +#ifndef GRANTS_COL_MAX_LEN +#define GRANTS_COL_MAX_LEN 196 +#endif + typedef enum { TSDB_GRANT_ALL, TSDB_GRANT_TIME, @@ -47,23 +51,49 @@ typedef enum { int32_t grantCheck(EGrantType grant); #ifndef GRANTS_CFG -#define GRANTS_SCHEMA \ - static const SSysDbTableSchema grantsSchema[] = { \ - {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "storage", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "databases", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "users", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "accounts", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "connections", .bytes = 11 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "speed", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ - {.name = "querytime", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ +#ifdef TD_ENTERPRISE +#define GRANTS_SCHEMA \ + static const SSysDbTableSchema grantsSchema[] = { \ + {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "storage", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "databases", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "users", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "accounts", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "connections", .bytes = 11 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "speed", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "querytime", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "opc_da", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "opc_ua", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "pi", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "kafka", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "influxdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "mqtt", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ } +#else +#define GRANTS_SCHEMA \ + static const SSysDbTableSchema grantsSchema[] = { \ + {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "storage", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "databases", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "users", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "accounts", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "connections", .bytes = 11 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "speed", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + {.name = "querytime", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \ + } +#endif #define GRANT_CFG_ADD #define GRANT_CFG_SET #define GRANT_CFG_GET diff --git a/include/common/tmsg.h b/include/common/tmsg.h index cbbdd169e6..2daa37d453 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1233,6 +1233,14 @@ typedef struct { SEp ep; } SDnodeEp; +typedef struct { + int32_t id; + int8_t isMnode; + SEp ep; + char active[TSDB_ACTIVE_KEY_LEN]; + char connActive[TSDB_CONN_ACTIVE_KEY_LEN]; +} SDnodeInfo; + typedef struct { int64_t dnodeVer; SDnodeCfg dnodeCfg; @@ -1626,6 +1634,21 @@ typedef struct { int32_t tSerializeSDropDnodeReq(void* buf, int32_t bufLen, SDropDnodeReq* pReq); int32_t tDeserializeSDropDnodeReq(void* buf, int32_t bufLen, SDropDnodeReq* pReq); +enum { + RESTORE_TYPE__ALL = 1, + RESTORE_TYPE__MNODE, + RESTORE_TYPE__VNODE, + RESTORE_TYPE__QNODE, +}; + +typedef struct { + int32_t dnodeId; + int8_t restoreType; +} SRestoreDnodeReq; + +int32_t tSerializeSRestoreDnodeReq(void* buf, int32_t bufLen, SRestoreDnodeReq* pReq); +int32_t tDeserializeSRestoreDnodeReq(void* buf, int32_t bufLen, SRestoreDnodeReq* pReq); + typedef struct { int32_t dnodeId; char config[TSDB_DNODE_CONFIG_LEN]; diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index 7d877bf146..1f2d597496 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -178,6 +178,7 @@ enum { // TD_DEF_MSG_TYPE(TDMT_MND_STREAM_BEGIN_CHECKPOINT, "stream-begin-checkpoint", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_MAX_MSG, "mnd-max", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_BALANCE_VGROUP_LEADER, "balance-vgroup-leader", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_RESTORE_DNODE, "restore-dnode", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_PAUSE_STREAM, "pause-stream", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_RESUME_STREAM, "resume-stream", NULL, NULL) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index f27ed5cff4..363d95e1f7 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -16,338 +16,340 @@ #ifndef _TD_COMMON_TOKEN_H_ #define _TD_COMMON_TOKEN_H_ -#define TK_OR 1 -#define TK_AND 2 -#define TK_UNION 3 -#define TK_ALL 4 -#define TK_MINUS 5 -#define TK_EXCEPT 6 -#define TK_INTERSECT 7 -#define TK_NK_BITAND 8 -#define TK_NK_BITOR 9 -#define TK_NK_LSHIFT 10 -#define TK_NK_RSHIFT 11 -#define TK_NK_PLUS 12 -#define TK_NK_MINUS 13 -#define TK_NK_STAR 14 -#define TK_NK_SLASH 15 -#define TK_NK_REM 16 -#define TK_NK_CONCAT 17 -#define TK_CREATE 18 -#define TK_ACCOUNT 19 -#define TK_NK_ID 20 -#define TK_PASS 21 -#define TK_NK_STRING 22 -#define TK_ALTER 23 -#define TK_PPS 24 -#define TK_TSERIES 25 -#define TK_STORAGE 26 -#define TK_STREAMS 27 -#define TK_QTIME 28 -#define TK_DBS 29 -#define TK_USERS 30 -#define TK_CONNS 31 -#define TK_STATE 32 -#define TK_USER 33 -#define TK_ENABLE 34 -#define TK_NK_INTEGER 35 -#define TK_SYSINFO 36 -#define TK_DROP 37 -#define TK_GRANT 38 -#define TK_ON 39 -#define TK_TO 40 -#define TK_REVOKE 41 -#define TK_FROM 42 -#define TK_SUBSCRIBE 43 -#define TK_NK_COMMA 44 -#define TK_READ 45 -#define TK_WRITE 46 -#define TK_NK_DOT 47 -#define TK_WITH 48 -#define TK_DNODE 49 -#define TK_PORT 50 -#define TK_DNODES 51 -#define TK_NK_IPTOKEN 52 -#define TK_FORCE 53 -#define TK_LOCAL 54 -#define TK_QNODE 55 -#define TK_BNODE 56 -#define TK_SNODE 57 -#define TK_MNODE 58 -#define TK_DATABASE 59 -#define TK_USE 60 -#define TK_FLUSH 61 -#define TK_TRIM 62 -#define TK_COMPACT 63 -#define TK_IF 64 -#define TK_NOT 65 -#define TK_EXISTS 66 -#define TK_BUFFER 67 -#define TK_CACHEMODEL 68 -#define TK_CACHESIZE 69 -#define TK_COMP 70 -#define TK_DURATION 71 -#define TK_NK_VARIABLE 72 -#define TK_MAXROWS 73 -#define TK_MINROWS 74 -#define TK_KEEP 75 -#define TK_PAGES 76 -#define TK_PAGESIZE 77 -#define TK_TSDB_PAGESIZE 78 -#define TK_PRECISION 79 -#define TK_REPLICA 80 -#define TK_VGROUPS 81 -#define TK_SINGLE_STABLE 82 -#define TK_RETENTIONS 83 -#define TK_SCHEMALESS 84 -#define TK_WAL_LEVEL 85 -#define TK_WAL_FSYNC_PERIOD 86 -#define TK_WAL_RETENTION_PERIOD 87 -#define TK_WAL_RETENTION_SIZE 88 -#define TK_WAL_ROLL_PERIOD 89 -#define TK_WAL_SEGMENT_SIZE 90 -#define TK_STT_TRIGGER 91 -#define TK_TABLE_PREFIX 92 -#define TK_TABLE_SUFFIX 93 -#define TK_NK_COLON 94 -#define TK_MAX_SPEED 95 -#define TK_START 96 -#define TK_TIMESTAMP 97 -#define TK_END 98 -#define TK_TABLE 99 -#define TK_NK_LP 100 -#define TK_NK_RP 101 -#define TK_STABLE 102 -#define TK_ADD 103 -#define TK_COLUMN 104 -#define TK_MODIFY 105 -#define TK_RENAME 106 -#define TK_TAG 107 -#define TK_SET 108 -#define TK_NK_EQ 109 -#define TK_USING 110 -#define TK_TAGS 111 -#define TK_BOOL 112 -#define TK_TINYINT 113 -#define TK_SMALLINT 114 -#define TK_INT 115 -#define TK_INTEGER 116 -#define TK_BIGINT 117 -#define TK_FLOAT 118 -#define TK_DOUBLE 119 -#define TK_BINARY 120 -#define TK_NCHAR 121 -#define TK_UNSIGNED 122 -#define TK_JSON 123 -#define TK_VARCHAR 124 -#define TK_MEDIUMBLOB 125 -#define TK_BLOB 126 -#define TK_VARBINARY 127 -#define TK_DECIMAL 128 -#define TK_COMMENT 129 -#define TK_MAX_DELAY 130 -#define TK_WATERMARK 131 -#define TK_ROLLUP 132 -#define TK_TTL 133 -#define TK_SMA 134 -#define TK_DELETE_MARK 135 -#define TK_FIRST 136 -#define TK_LAST 137 -#define TK_SHOW 138 -#define TK_PRIVILEGES 139 -#define TK_DATABASES 140 -#define TK_TABLES 141 -#define TK_STABLES 142 -#define TK_MNODES 143 -#define TK_QNODES 144 -#define TK_FUNCTIONS 145 -#define TK_INDEXES 146 -#define TK_ACCOUNTS 147 -#define TK_APPS 148 -#define TK_CONNECTIONS 149 -#define TK_LICENCES 150 -#define TK_GRANTS 151 -#define TK_QUERIES 152 -#define TK_SCORES 153 -#define TK_TOPICS 154 -#define TK_VARIABLES 155 -#define TK_CLUSTER 156 -#define TK_BNODES 157 -#define TK_SNODES 158 -#define TK_TRANSACTIONS 159 -#define TK_DISTRIBUTED 160 -#define TK_CONSUMERS 161 -#define TK_SUBSCRIPTIONS 162 -#define TK_VNODES 163 -#define TK_ALIVE 164 -#define TK_LIKE 165 -#define TK_TBNAME 166 -#define TK_QTAGS 167 -#define TK_AS 168 -#define TK_INDEX 169 -#define TK_FUNCTION 170 -#define TK_INTERVAL 171 -#define TK_COUNT 172 -#define TK_LAST_ROW 173 -#define TK_TOPIC 174 -#define TK_META 175 -#define TK_CONSUMER 176 -#define TK_GROUP 177 -#define TK_DESC 178 -#define TK_DESCRIBE 179 -#define TK_RESET 180 -#define TK_QUERY 181 -#define TK_CACHE 182 -#define TK_EXPLAIN 183 -#define TK_ANALYZE 184 -#define TK_VERBOSE 185 -#define TK_NK_BOOL 186 -#define TK_RATIO 187 -#define TK_NK_FLOAT 188 -#define TK_OUTPUTTYPE 189 -#define TK_AGGREGATE 190 -#define TK_BUFSIZE 191 -#define TK_LANGUAGE 192 -#define TK_REPLACE 193 -#define TK_STREAM 194 -#define TK_INTO 195 -#define TK_PAUSE 196 -#define TK_RESUME 197 -#define TK_TRIGGER 198 -#define TK_AT_ONCE 199 -#define TK_WINDOW_CLOSE 200 -#define TK_IGNORE 201 -#define TK_EXPIRED 202 -#define TK_FILL_HISTORY 203 -#define TK_UPDATE 204 -#define TK_SUBTABLE 205 -#define TK_UNTREATED 206 -#define TK_KILL 207 -#define TK_CONNECTION 208 -#define TK_TRANSACTION 209 -#define TK_BALANCE 210 -#define TK_VGROUP 211 -#define TK_LEADER 212 -#define TK_MERGE 213 -#define TK_REDISTRIBUTE 214 -#define TK_SPLIT 215 -#define TK_DELETE 216 -#define TK_INSERT 217 -#define TK_NULL 218 -#define TK_NK_QUESTION 219 -#define TK_NK_ARROW 220 -#define TK_ROWTS 221 -#define TK_QSTART 222 -#define TK_QEND 223 -#define TK_QDURATION 224 -#define TK_WSTART 225 -#define TK_WEND 226 -#define TK_WDURATION 227 -#define TK_IROWTS 228 -#define TK_ISFILLED 229 -#define TK_CAST 230 -#define TK_NOW 231 -#define TK_TODAY 232 -#define TK_TIMEZONE 233 -#define TK_CLIENT_VERSION 234 -#define TK_SERVER_VERSION 235 -#define TK_SERVER_STATUS 236 -#define TK_CURRENT_USER 237 -#define TK_CASE 238 -#define TK_WHEN 239 -#define TK_THEN 240 -#define TK_ELSE 241 -#define TK_BETWEEN 242 -#define TK_IS 243 -#define TK_NK_LT 244 -#define TK_NK_GT 245 -#define TK_NK_LE 246 -#define TK_NK_GE 247 -#define TK_NK_NE 248 -#define TK_MATCH 249 -#define TK_NMATCH 250 -#define TK_CONTAINS 251 -#define TK_IN 252 -#define TK_JOIN 253 -#define TK_INNER 254 -#define TK_SELECT 255 -#define TK_DISTINCT 256 -#define TK_WHERE 257 -#define TK_PARTITION 258 -#define TK_BY 259 -#define TK_SESSION 260 -#define TK_STATE_WINDOW 261 -#define TK_EVENT_WINDOW 262 -#define TK_SLIDING 263 -#define TK_FILL 264 -#define TK_VALUE 265 -#define TK_VALUE_F 266 -#define TK_NONE 267 -#define TK_PREV 268 -#define TK_NULL_F 269 -#define TK_LINEAR 270 -#define TK_NEXT 271 -#define TK_HAVING 272 -#define TK_RANGE 273 -#define TK_EVERY 274 -#define TK_ORDER 275 -#define TK_SLIMIT 276 -#define TK_SOFFSET 277 -#define TK_LIMIT 278 -#define TK_OFFSET 279 -#define TK_ASC 280 -#define TK_NULLS 281 -#define TK_ABORT 282 -#define TK_AFTER 283 -#define TK_ATTACH 284 -#define TK_BEFORE 285 -#define TK_BEGIN 286 -#define TK_BITAND 287 -#define TK_BITNOT 288 -#define TK_BITOR 289 -#define TK_BLOCKS 290 -#define TK_CHANGE 291 -#define TK_COMMA 292 -#define TK_CONCAT 293 -#define TK_CONFLICT 294 -#define TK_COPY 295 -#define TK_DEFERRED 296 -#define TK_DELIMITERS 297 -#define TK_DETACH 298 -#define TK_DIVIDE 299 -#define TK_DOT 300 -#define TK_EACH 301 -#define TK_FAIL 302 -#define TK_FILE 303 -#define TK_FOR 304 -#define TK_GLOB 305 -#define TK_ID 306 -#define TK_IMMEDIATE 307 -#define TK_IMPORT 308 -#define TK_INITIALLY 309 -#define TK_INSTEAD 310 -#define TK_ISNULL 311 -#define TK_KEY 312 -#define TK_MODULES 313 -#define TK_NK_BITNOT 314 -#define TK_NK_SEMI 315 -#define TK_NOTNULL 316 -#define TK_OF 317 -#define TK_PLUS 318 -#define TK_PRIVILEGE 319 -#define TK_RAISE 320 -#define TK_RESTRICT 321 -#define TK_ROW 322 -#define TK_SEMI 323 -#define TK_STAR 324 -#define TK_STATEMENT 325 -#define TK_STRICT 326 -#define TK_STRING 327 -#define TK_TIMES 328 -#define TK_VALUES 329 -#define TK_VARIABLE 330 -#define TK_VIEW 331 -#define TK_WAL 332 +#define TK_OR 1 +#define TK_AND 2 +#define TK_UNION 3 +#define TK_ALL 4 +#define TK_MINUS 5 +#define TK_EXCEPT 6 +#define TK_INTERSECT 7 +#define TK_NK_BITAND 8 +#define TK_NK_BITOR 9 +#define TK_NK_LSHIFT 10 +#define TK_NK_RSHIFT 11 +#define TK_NK_PLUS 12 +#define TK_NK_MINUS 13 +#define TK_NK_STAR 14 +#define TK_NK_SLASH 15 +#define TK_NK_REM 16 +#define TK_NK_CONCAT 17 +#define TK_CREATE 18 +#define TK_ACCOUNT 19 +#define TK_NK_ID 20 +#define TK_PASS 21 +#define TK_NK_STRING 22 +#define TK_ALTER 23 +#define TK_PPS 24 +#define TK_TSERIES 25 +#define TK_STORAGE 26 +#define TK_STREAMS 27 +#define TK_QTIME 28 +#define TK_DBS 29 +#define TK_USERS 30 +#define TK_CONNS 31 +#define TK_STATE 32 +#define TK_USER 33 +#define TK_ENABLE 34 +#define TK_NK_INTEGER 35 +#define TK_SYSINFO 36 +#define TK_DROP 37 +#define TK_GRANT 38 +#define TK_ON 39 +#define TK_TO 40 +#define TK_REVOKE 41 +#define TK_FROM 42 +#define TK_SUBSCRIBE 43 +#define TK_NK_COMMA 44 +#define TK_READ 45 +#define TK_WRITE 46 +#define TK_NK_DOT 47 +#define TK_WITH 48 +#define TK_DNODE 49 +#define TK_PORT 50 +#define TK_DNODES 51 +#define TK_RESTORE 52 +#define TK_NK_IPTOKEN 53 +#define TK_FORCE 54 +#define TK_LOCAL 55 +#define TK_QNODE 56 +#define TK_BNODE 57 +#define TK_SNODE 58 +#define TK_MNODE 59 +#define TK_VNODE 60 +#define TK_DATABASE 61 +#define TK_USE 62 +#define TK_FLUSH 63 +#define TK_TRIM 64 +#define TK_COMPACT 65 +#define TK_IF 66 +#define TK_NOT 67 +#define TK_EXISTS 68 +#define TK_BUFFER 69 +#define TK_CACHEMODEL 70 +#define TK_CACHESIZE 71 +#define TK_COMP 72 +#define TK_DURATION 73 +#define TK_NK_VARIABLE 74 +#define TK_MAXROWS 75 +#define TK_MINROWS 76 +#define TK_KEEP 77 +#define TK_PAGES 78 +#define TK_PAGESIZE 79 +#define TK_TSDB_PAGESIZE 80 +#define TK_PRECISION 81 +#define TK_REPLICA 82 +#define TK_VGROUPS 83 +#define TK_SINGLE_STABLE 84 +#define TK_RETENTIONS 85 +#define TK_SCHEMALESS 86 +#define TK_WAL_LEVEL 87 +#define TK_WAL_FSYNC_PERIOD 88 +#define TK_WAL_RETENTION_PERIOD 89 +#define TK_WAL_RETENTION_SIZE 90 +#define TK_WAL_ROLL_PERIOD 91 +#define TK_WAL_SEGMENT_SIZE 92 +#define TK_STT_TRIGGER 93 +#define TK_TABLE_PREFIX 94 +#define TK_TABLE_SUFFIX 95 +#define TK_NK_COLON 96 +#define TK_MAX_SPEED 97 +#define TK_START 98 +#define TK_TIMESTAMP 99 +#define TK_END 100 +#define TK_TABLE 101 +#define TK_NK_LP 102 +#define TK_NK_RP 103 +#define TK_STABLE 104 +#define TK_ADD 105 +#define TK_COLUMN 106 +#define TK_MODIFY 107 +#define TK_RENAME 108 +#define TK_TAG 109 +#define TK_SET 110 +#define TK_NK_EQ 111 +#define TK_USING 112 +#define TK_TAGS 113 +#define TK_BOOL 114 +#define TK_TINYINT 115 +#define TK_SMALLINT 116 +#define TK_INT 117 +#define TK_INTEGER 118 +#define TK_BIGINT 119 +#define TK_FLOAT 120 +#define TK_DOUBLE 121 +#define TK_BINARY 122 +#define TK_NCHAR 123 +#define TK_UNSIGNED 124 +#define TK_JSON 125 +#define TK_VARCHAR 126 +#define TK_MEDIUMBLOB 127 +#define TK_BLOB 128 +#define TK_VARBINARY 129 +#define TK_DECIMAL 130 +#define TK_COMMENT 131 +#define TK_MAX_DELAY 132 +#define TK_WATERMARK 133 +#define TK_ROLLUP 134 +#define TK_TTL 135 +#define TK_SMA 136 +#define TK_DELETE_MARK 137 +#define TK_FIRST 138 +#define TK_LAST 139 +#define TK_SHOW 140 +#define TK_PRIVILEGES 141 +#define TK_DATABASES 142 +#define TK_TABLES 143 +#define TK_STABLES 144 +#define TK_MNODES 145 +#define TK_QNODES 146 +#define TK_FUNCTIONS 147 +#define TK_INDEXES 148 +#define TK_ACCOUNTS 149 +#define TK_APPS 150 +#define TK_CONNECTIONS 151 +#define TK_LICENCES 152 +#define TK_GRANTS 153 +#define TK_QUERIES 154 +#define TK_SCORES 155 +#define TK_TOPICS 156 +#define TK_VARIABLES 157 +#define TK_CLUSTER 158 +#define TK_BNODES 159 +#define TK_SNODES 160 +#define TK_TRANSACTIONS 161 +#define TK_DISTRIBUTED 162 +#define TK_CONSUMERS 163 +#define TK_SUBSCRIPTIONS 164 +#define TK_VNODES 165 +#define TK_ALIVE 166 +#define TK_LIKE 167 +#define TK_TBNAME 168 +#define TK_QTAGS 169 +#define TK_AS 170 +#define TK_INDEX 171 +#define TK_FUNCTION 172 +#define TK_INTERVAL 173 +#define TK_COUNT 174 +#define TK_LAST_ROW 175 +#define TK_TOPIC 176 +#define TK_META 177 +#define TK_CONSUMER 178 +#define TK_GROUP 179 +#define TK_DESC 180 +#define TK_DESCRIBE 181 +#define TK_RESET 182 +#define TK_QUERY 183 +#define TK_CACHE 184 +#define TK_EXPLAIN 185 +#define TK_ANALYZE 186 +#define TK_VERBOSE 187 +#define TK_NK_BOOL 188 +#define TK_RATIO 189 +#define TK_NK_FLOAT 190 +#define TK_OUTPUTTYPE 191 +#define TK_AGGREGATE 192 +#define TK_BUFSIZE 193 +#define TK_LANGUAGE 194 +#define TK_REPLACE 195 +#define TK_STREAM 196 +#define TK_INTO 197 +#define TK_PAUSE 198 +#define TK_RESUME 199 +#define TK_TRIGGER 200 +#define TK_AT_ONCE 201 +#define TK_WINDOW_CLOSE 202 +#define TK_IGNORE 203 +#define TK_EXPIRED 204 +#define TK_FILL_HISTORY 205 +#define TK_UPDATE 206 +#define TK_SUBTABLE 207 +#define TK_UNTREATED 208 +#define TK_KILL 209 +#define TK_CONNECTION 210 +#define TK_TRANSACTION 211 +#define TK_BALANCE 212 +#define TK_VGROUP 213 +#define TK_LEADER 214 +#define TK_MERGE 215 +#define TK_REDISTRIBUTE 216 +#define TK_SPLIT 217 +#define TK_DELETE 218 +#define TK_INSERT 219 +#define TK_NULL 220 +#define TK_NK_QUESTION 221 +#define TK_NK_ARROW 222 +#define TK_ROWTS 223 +#define TK_QSTART 224 +#define TK_QEND 225 +#define TK_QDURATION 226 +#define TK_WSTART 227 +#define TK_WEND 228 +#define TK_WDURATION 229 +#define TK_IROWTS 230 +#define TK_ISFILLED 231 +#define TK_CAST 232 +#define TK_NOW 233 +#define TK_TODAY 234 +#define TK_TIMEZONE 235 +#define TK_CLIENT_VERSION 236 +#define TK_SERVER_VERSION 237 +#define TK_SERVER_STATUS 238 +#define TK_CURRENT_USER 239 +#define TK_CASE 240 +#define TK_WHEN 241 +#define TK_THEN 242 +#define TK_ELSE 243 +#define TK_BETWEEN 244 +#define TK_IS 245 +#define TK_NK_LT 246 +#define TK_NK_GT 247 +#define TK_NK_LE 248 +#define TK_NK_GE 249 +#define TK_NK_NE 250 +#define TK_MATCH 251 +#define TK_NMATCH 252 +#define TK_CONTAINS 253 +#define TK_IN 254 +#define TK_JOIN 255 +#define TK_INNER 256 +#define TK_SELECT 257 +#define TK_DISTINCT 258 +#define TK_WHERE 259 +#define TK_PARTITION 260 +#define TK_BY 261 +#define TK_SESSION 262 +#define TK_STATE_WINDOW 263 +#define TK_EVENT_WINDOW 264 +#define TK_SLIDING 265 +#define TK_FILL 266 +#define TK_VALUE 267 +#define TK_VALUE_F 268 +#define TK_NONE 269 +#define TK_PREV 270 +#define TK_NULL_F 271 +#define TK_LINEAR 272 +#define TK_NEXT 273 +#define TK_HAVING 274 +#define TK_RANGE 275 +#define TK_EVERY 276 +#define TK_ORDER 277 +#define TK_SLIMIT 278 +#define TK_SOFFSET 279 +#define TK_LIMIT 280 +#define TK_OFFSET 281 +#define TK_ASC 282 +#define TK_NULLS 283 +#define TK_ABORT 284 +#define TK_AFTER 285 +#define TK_ATTACH 286 +#define TK_BEFORE 287 +#define TK_BEGIN 288 +#define TK_BITAND 289 +#define TK_BITNOT 290 +#define TK_BITOR 291 +#define TK_BLOCKS 292 +#define TK_CHANGE 293 +#define TK_COMMA 294 +#define TK_CONCAT 295 +#define TK_CONFLICT 296 +#define TK_COPY 297 +#define TK_DEFERRED 298 +#define TK_DELIMITERS 299 +#define TK_DETACH 300 +#define TK_DIVIDE 301 +#define TK_DOT 302 +#define TK_EACH 303 +#define TK_FAIL 304 +#define TK_FILE 305 +#define TK_FOR 306 +#define TK_GLOB 307 +#define TK_ID 308 +#define TK_IMMEDIATE 309 +#define TK_IMPORT 310 +#define TK_INITIALLY 311 +#define TK_INSTEAD 312 +#define TK_ISNULL 313 +#define TK_KEY 314 +#define TK_MODULES 315 +#define TK_NK_BITNOT 316 +#define TK_NK_SEMI 317 +#define TK_NOTNULL 318 +#define TK_OF 319 +#define TK_PLUS 320 +#define TK_PRIVILEGE 321 +#define TK_RAISE 322 +#define TK_RESTRICT 323 +#define TK_ROW 324 +#define TK_SEMI 325 +#define TK_STAR 326 +#define TK_STATEMENT 327 +#define TK_STRICT 328 +#define TK_STRING 329 +#define TK_TIMES 330 +#define TK_VALUES 331 +#define TK_VARIABLE 332 +#define TK_VIEW 333 +#define TK_WAL 334 #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 3c68c1d4f3..d899307d74 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -350,6 +350,11 @@ typedef struct SDropComponentNodeStmt { int32_t dnodeId; } SDropComponentNodeStmt; +typedef struct SRestoreComponentNodeStmt { + ENodeType type; + int32_t dnodeId; +} SRestoreComponentNodeStmt; + typedef struct SCreateTopicStmt { ENodeType type; char topicName[TSDB_TABLE_NAME_LEN]; diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index eb449fb646..8eda9457c6 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -211,6 +211,10 @@ typedef enum ENodeType { QUERY_NODE_SHOW_DB_ALIVE_STMT, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT, QUERY_NODE_BALANCE_VGROUP_LEADER_STMT, + QUERY_NODE_RESTORE_DNODE_STMT, + QUERY_NODE_RESTORE_QNODE_STMT, + QUERY_NODE_RESTORE_MNODE_STMT, + QUERY_NODE_RESTORE_VNODE_STMT, QUERY_NODE_PAUSE_STREAM_STMT, QUERY_NODE_RESUME_STREAM_STMT, diff --git a/include/libs/tfs/tfs.h b/include/libs/tfs/tfs.h index cbf1d60e35..622cd615b8 100644 --- a/include/libs/tfs/tfs.h +++ b/include/libs/tfs/tfs.h @@ -133,6 +133,16 @@ int32_t tfsMkdirAt(STfs *pTfs, const char *rname, SDiskID diskId); */ int32_t tfsMkdirRecurAt(STfs *pTfs, const char *rname, SDiskID diskId); +/** + * @brief check directories exist in tfs. + * + * @param pTfs The fs object. + * @param rname The rel name of directory. + * @param diskId The disk ID. + * @return true for exist, false for not exist. + */ +bool tfsDirExistAt(STfs *pTfs, const char *rname, SDiskID diskId); + /** * @brief Remove directory at all levels in tfs. * diff --git a/include/util/taoserror.h b/include/util/taoserror.h index acc6977e2e..8bc6ed2ac8 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -407,6 +407,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_SNODE_NOT_DEPLOYED TAOS_DEF_ERROR_CODE(0, 0x0411) #define TSDB_CODE_MNODE_NOT_CATCH_UP TAOS_DEF_ERROR_CODE(0, 0x0412) // internal #define TSDB_CODE_MNODE_ALREADY_IS_VOTER TAOS_DEF_ERROR_CODE(0, 0x0413) // internal +#define TSDB_CODE_MNODE_ONLY_TWO_MNODE TAOS_DEF_ERROR_CODE(0, 0x0414) // internal // vnode // #define TSDB_CODE_VND_ACTION_IN_PROGRESS TAOS_DEF_ERROR_CODE(0, 0x0500) // 2.x @@ -443,6 +444,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_VND_QUERY_BUSY TAOS_DEF_ERROR_CODE(0, 0x0531) #define TSDB_CODE_VND_NOT_CATCH_UP TAOS_DEF_ERROR_CODE(0, 0x0532) // internal #define TSDB_CODE_VND_ALREADY_IS_VOTER TAOS_DEF_ERROR_CODE(0, 0x0533) // internal +#define TSDB_CODE_VND_DIR_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0534) // tsdb #define TSDB_CODE_TDB_INVALID_TABLE_ID TAOS_DEF_ERROR_CODE(0, 0x0600) @@ -737,28 +739,21 @@ int32_t* taosGetErrno(); //tsma #define TSDB_CODE_TSMA_INIT_FAILED TAOS_DEF_ERROR_CODE(0, 0x3100) #define TSDB_CODE_TSMA_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x3101) -#define TSDB_CODE_TSMA_NO_INDEX_IN_META TAOS_DEF_ERROR_CODE(0, 0x3102) -#define TSDB_CODE_TSMA_INVALID_ENV TAOS_DEF_ERROR_CODE(0, 0x3103) -#define TSDB_CODE_TSMA_INVALID_STAT TAOS_DEF_ERROR_CODE(0, 0x3104) -#define TSDB_CODE_TSMA_INVALID_PTR TAOS_DEF_ERROR_CODE(0, 0x3105) -#define TSDB_CODE_TSMA_INVALID_PARA TAOS_DEF_ERROR_CODE(0, 0x3106) -#define TSDB_CODE_TSMA_NO_INDEX_IN_CACHE TAOS_DEF_ERROR_CODE(0, 0x3107) +#define TSDB_CODE_TSMA_INVALID_ENV TAOS_DEF_ERROR_CODE(0, 0x3102) +#define TSDB_CODE_TSMA_INVALID_STAT TAOS_DEF_ERROR_CODE(0, 0x3103) +#define TSDB_CODE_TSMA_INVALID_PTR TAOS_DEF_ERROR_CODE(0, 0x3104) +#define TSDB_CODE_TSMA_INVALID_PARA TAOS_DEF_ERROR_CODE(0, 0x3105) //rsma #define TSDB_CODE_RSMA_INVALID_ENV TAOS_DEF_ERROR_CODE(0, 0x3150) #define TSDB_CODE_RSMA_INVALID_STAT TAOS_DEF_ERROR_CODE(0, 0x3151) #define TSDB_CODE_RSMA_QTASKINFO_CREATE TAOS_DEF_ERROR_CODE(0, 0x3152) -#define TSDB_CODE_RSMA_FS_COMMIT TAOS_DEF_ERROR_CODE(0, 0x3153) -#define TSDB_CODE_RSMA_REMOVE_EXISTS TAOS_DEF_ERROR_CODE(0, 0x3154) -#define TSDB_CODE_RSMA_FETCH_MSG_MSSED_UP TAOS_DEF_ERROR_CODE(0, 0x3155) -#define TSDB_CODE_RSMA_EMPTY_INFO TAOS_DEF_ERROR_CODE(0, 0x3156) -#define TSDB_CODE_RSMA_INVALID_SCHEMA TAOS_DEF_ERROR_CODE(0, 0x3157) -#define TSDB_CODE_RSMA_REGEX_MATCH TAOS_DEF_ERROR_CODE(0, 0x3158) -#define TSDB_CODE_RSMA_STREAM_STATE_OPEN TAOS_DEF_ERROR_CODE(0, 0x3159) -#define TSDB_CODE_RSMA_STREAM_STATE_COMMIT TAOS_DEF_ERROR_CODE(0, 0x3160) -#define TSDB_CODE_RSMA_FS_REF TAOS_DEF_ERROR_CODE(0, 0x3161) -#define TSDB_CODE_RSMA_FS_SYNC TAOS_DEF_ERROR_CODE(0, 0x3162) -#define TSDB_CODE_RSMA_FS_UPDATE TAOS_DEF_ERROR_CODE(0, 0x3163) +#define TSDB_CODE_RSMA_INVALID_SCHEMA TAOS_DEF_ERROR_CODE(0, 0x3153) +#define TSDB_CODE_RSMA_STREAM_STATE_OPEN TAOS_DEF_ERROR_CODE(0, 0x3154) +#define TSDB_CODE_RSMA_STREAM_STATE_COMMIT TAOS_DEF_ERROR_CODE(0, 0x3155) +#define TSDB_CODE_RSMA_FS_REF TAOS_DEF_ERROR_CODE(0, 0x3156) +#define TSDB_CODE_RSMA_FS_SYNC TAOS_DEF_ERROR_CODE(0, 0x3157) +#define TSDB_CODE_RSMA_FS_UPDATE TAOS_DEF_ERROR_CODE(0, 0x3158) //index #define TSDB_CODE_INDEX_REBUILDING TAOS_DEF_ERROR_CODE(0, 0x3200) diff --git a/include/util/tdef.h b/include/util/tdef.h index 2d1290713a..427a49fd4e 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -267,6 +267,9 @@ typedef enum ELogicConditionType { #define TSDB_DNODE_CONFIG_LEN 128 #define TSDB_DNODE_VALUE_LEN 256 +#define TSDB_ACTIVE_KEY_LEN 109 // history 109:? +#define TSDB_CONN_ACTIVE_KEY_LEN 257 // history 257:? + #define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE #define TSDB_PAYLOAD_SIZE TSDB_DEFAULT_PKT_SIZE diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 9e0065a5f4..4f5edd8a59 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -2543,6 +2543,31 @@ int32_t tmq_get_topic_assignment(tmq_t* tmq, const char* pTopicName, tmq_topic_a *numOfAssignment = num; } + for (int32_t j = 0; j < (*numOfAssignment); ++j) { + tmq_topic_assignment* p = &(*assignment)[j]; + + for(int32_t i = 0; i < taosArrayGetSize(pTopic->vgs); ++i) { + SMqClientVg* pClientVg = taosArrayGet(pTopic->vgs, i); + if (pClientVg->vgId != p->vgId) { + continue; + } + + SVgOffsetInfo* pOffsetInfo = &pClientVg->offsetInfo; + + pOffsetInfo->currentOffset.type = TMQ_OFFSET__LOG; + + char offsetBuf[80] = {0}; + tFormatOffset(offsetBuf, tListLen(offsetBuf), &pOffsetInfo->currentOffset); + + tscDebug("vgId:%d offset is update to:%s", p->vgId, offsetBuf); + + pOffsetInfo->walVerBegin = p->begin; + pOffsetInfo->walVerEnd = p->end; + pOffsetInfo->currentOffset.version = p->currentOffset; + pOffsetInfo->committedOffset.version = p->currentOffset; + } + } + destroyCommonInfo(pCommon); return code; } else { @@ -2590,7 +2615,8 @@ int32_t tmq_offset_seek(tmq_t* tmq, const char* pTopicName, int32_t vgId, int64_ } if (offset < pOffsetInfo->walVerBegin || offset > pOffsetInfo->walVerEnd) { - tscError("consumer:0x%" PRIx64 " invalid seek params, offset:%" PRId64, tmq->consumerId, offset); + tscError("consumer:0x%" PRIx64 " invalid seek params, offset:%" PRId64 ", valid range:[%" PRId64 ", %" PRId64 "]", + tmq->consumerId, offset, pOffsetInfo->walVerBegin, pOffsetInfo->walVerEnd); return TSDB_CODE_INVALID_PARA; } diff --git a/source/client/test/clientTests.cpp b/source/client/test/clientTests.cpp index 105dfde139..6bb3b321d2 100644 --- a/source/client/test/clientTests.cpp +++ b/source/client/test/clientTests.cpp @@ -1133,6 +1133,8 @@ TEST(clientCase, sub_tb_test) { return; } + tmq_offset_seek(tmq, "topic_t1", pAssign[0].vgId, 0); + while (1) { TAOS_RES* pRes = tmq_consumer_poll(tmq, timeout); <<<<<<< HEAD diff --git a/source/common/src/systable.c b/source/common/src/systable.c index cd3dd63ef0..062bae68c8 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -35,6 +35,10 @@ static const SSysDbTableSchema dnodesSchema[] = { {.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, {.name = "reboot_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, {.name = "note", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, +#ifdef TD_ENTERPRISE + {.name = "active_code", .bytes = TSDB_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "c_active_code", .bytes = TSDB_CONN_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, +#endif }; static const SSysDbTableSchema mnodesSchema[] = { diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index bb6b11f301..aff213fea3 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -1723,6 +1723,33 @@ int32_t tDeserializeSDropDnodeReq(void *buf, int32_t bufLen, SDropDnodeReq *pReq return 0; } +int32_t tSerializeSRestoreDnodeReq(void *buf, int32_t bufLen, SRestoreDnodeReq *pReq) { + SEncoder encoder = {0}; + tEncoderInit(&encoder, buf, bufLen); + + if (tStartEncode(&encoder) < 0) return -1; + if (tEncodeI32(&encoder, pReq->dnodeId) < 0) return -1; + if (tEncodeI8(&encoder, pReq->restoreType) < 0) return -1; + tEndEncode(&encoder); + + int32_t tlen = encoder.pos; + tEncoderClear(&encoder); + return tlen; +} + +int32_t tDeserializeSRestoreDnodeReq(void *buf, int32_t bufLen, SRestoreDnodeReq *pReq) { + SDecoder decoder = {0}; + tDecoderInit(&decoder, buf, bufLen); + + if (tStartDecode(&decoder) < 0) return -1; + if (tDecodeI32(&decoder, &pReq->dnodeId) < 0) return -1; + if (tDecodeI8(&decoder, &pReq->restoreType) < 0) return -1; + tEndDecode(&decoder); + + tDecoderClear(&decoder); + return 0; +} + int32_t tSerializeSMCfgDnodeReq(void *buf, int32_t bufLen, SMCfgDnodeReq *pReq) { SEncoder encoder = {0}; tEncoderInit(&encoder, buf, bufLen); @@ -7652,7 +7679,6 @@ void tDestroySSubmitRsp2(SSubmitRsp2 *pRsp, int32_t flag) { } } -<<<<<<< HEAD int32_t tSerializeSMPauseStreamReq(void *buf, int32_t bufLen, const SMPauseStreamReq *pReq) { SEncoder encoder = {0}; tEncoderInit(&encoder, buf, bufLen); @@ -7705,7 +7731,6 @@ int32_t tDeserializeSMResumeStreamReq(void *buf, int32_t bufLen, SMResumeStreamR return 0; } -======= int32_t tEncodeMqSubTopicEp(void **buf, const SMqSubTopicEp *pTopicEp) { int32_t tlen = 0; tlen += taosEncodeString(buf, pTopicEp->topic); @@ -7743,4 +7768,3 @@ void tDeleteMqSubTopicEp(SMqSubTopicEp *pSubTopicEp) { pSubTopicEp->schema.nCols = 0; taosArrayDestroy(pSubTopicEp->vgs); } ->>>>>>> enh/3.0 diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c index d9678c713d..7f8f6a48fa 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c @@ -177,6 +177,7 @@ SArray *mmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_MND_SERVER_VERSION, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_CREATE_INDEX, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_DROP_INDEX, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_MND_RESTORE_DNODE, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_SCH_QUERY, mmPutMsgToQueryQueue, 1) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_SCH_MERGE_QUERY, mmPutMsgToQueryQueue, 1) == NULL) goto _OVER; diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c index 282e694f56..61d76c3f4e 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c @@ -255,7 +255,7 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { SVnodeObj *pVnode = vmAcquireVnode(pMgmt, req.vgId); if (pVnode != NULL) { - dInfo("vgId:%d, already exist", req.vgId); + dError("vgId:%d, already exist", req.vgId); tFreeSCreateVnodeReq(&req); vmReleaseVnode(pMgmt, pVnode); terrno = TSDB_CODE_VND_ALREADY_EXIST; @@ -264,7 +264,22 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { } snprintf(path, TSDB_FILENAME_LEN, "vnode%svnode%d", TD_DIRSEP, vnodeCfg.vgId); - if (vnodeCreate(path, &vnodeCfg, pMgmt->pTfs) < 0) { + + if (pMgmt->pTfs) { + if (tfsDirExistAt(pMgmt->pTfs, path, (SDiskID){0})) { + terrno = TSDB_CODE_VND_DIR_ALREADY_EXIST; + dError("vgId:%d, failed to restore vnode since %s", req.vgId, terrstr()); + return -1; + } + } else { + if (taosDirExist(path)) { + terrno = TSDB_CODE_VND_DIR_ALREADY_EXIST; + dError("vgId:%d, failed to restore vnode since %s", req.vgId, terrstr()); + return -1; + } + } + +if (vnodeCreate(path, &vnodeCfg, pMgmt->pTfs) < 0) { tFreeSCreateVnodeReq(&req); dError("vgId:%d, failed to create vnode since %s", req.vgId, terrstr()); code = terrno; @@ -344,6 +359,7 @@ int32_t vmProcessAlterVnodeTypeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { ESyncRole role = vnodeGetRole(pVnode->pImpl); dInfo("vgId:%d, checking node role:%d", req.vgId, role); if(role == TAOS_SYNC_ROLE_VOTER){ + dError("vgId:%d, failed to alter vnode type since node already is role:%d", req.vgId, role); terrno = TSDB_CODE_VND_ALREADY_IS_VOTER; vmReleaseVnode(pMgmt, pVnode); return -1; @@ -380,7 +396,7 @@ int32_t vmProcessAlterVnodeTypeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { } SReplica *pReplica = NULL; - if(req.selfIndex > 0){ + if(req.selfIndex != -1){ pReplica = &req.replicas[req.selfIndex]; } else{ diff --git a/source/dnode/mgmt/node_mgmt/src/dmEnv.c b/source/dnode/mgmt/node_mgmt/src/dmEnv.c index 3459af1a3a..56bff0c760 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmEnv.c +++ b/source/dnode/mgmt/node_mgmt/src/dmEnv.c @@ -218,6 +218,7 @@ static int32_t dmProcessAlterNodeTypeReq(EDndNodeType ntype, SRpcMsg *pMsg) { ESyncRole role = (*pWrapper->func.nodeRoleFp)(pWrapper->pMgmt); dInfo("node:%s, checking node role:%d", pWrapper->name, role); if(role == TAOS_SYNC_ROLE_VOTER){ + dError("node:%s, failed to alter node type since node already is role:%d", pWrapper->name, role); terrno = TSDB_CODE_MNODE_ALREADY_IS_VOTER; return -1; } diff --git a/source/dnode/mgmt/node_util/src/dmEps.c b/source/dnode/mgmt/node_util/src/dmEps.c index 784d2b425b..45cc4bb711 100644 --- a/source/dnode/mgmt/node_util/src/dmEps.c +++ b/source/dnode/mgmt/node_util/src/dmEps.c @@ -173,7 +173,7 @@ _OVER: dmResetEps(pData, pData->dnodeEps); if (pData->oldDnodeEps == NULL && dmIsEpChanged(pData, pData->dnodeId, tsLocalEp)) { - dError("localEp %s different with %s and need reconfigured", tsLocalEp, file); + dError("localEp %s different with %s and need to be reconfigured", tsLocalEp, file); terrno = TSDB_CODE_INVALID_CFG; return -1; } diff --git a/source/dnode/mnode/impl/CMakeLists.txt b/source/dnode/mnode/impl/CMakeLists.txt index b9aa8eb674..010067e99f 100644 --- a/source/dnode/mnode/impl/CMakeLists.txt +++ b/source/dnode/mnode/impl/CMakeLists.txt @@ -6,6 +6,7 @@ IF (TD_ENTERPRISE) LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/src/plugins/privilege/src/privilege.c) LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/src/plugins/mnode/src/mndDb.c) LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/src/plugins/mnode/src/mndVgroup.c) + LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/src/plugins/mnode/src/mndDnode.c) ENDIF () add_library(mnode STATIC ${MNODE_SRC}) diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 4cbab214d2..b14f7a9023 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -206,6 +206,8 @@ typedef struct { uint16_t port; char fqdn[TSDB_FQDN_LEN]; char ep[TSDB_EP_LEN]; + char active[TSDB_ACTIVE_KEY_LEN]; + char connActive[TSDB_CONN_ACTIVE_KEY_LEN]; } SDnodeObj; typedef struct { diff --git a/source/dnode/mnode/impl/inc/mndDnode.h b/source/dnode/mnode/impl/inc/mndDnode.h index ebbabdfa33..83c2277612 100644 --- a/source/dnode/mnode/impl/inc/mndDnode.h +++ b/source/dnode/mnode/impl/inc/mndDnode.h @@ -29,7 +29,7 @@ void mndReleaseDnode(SMnode *pMnode, SDnodeObj *pDnode); SEpSet mndGetDnodeEpset(SDnodeObj *pDnode); int32_t mndGetDnodeSize(SMnode *pMnode); bool mndIsDnodeOnline(SDnodeObj *pDnode, int64_t curMs); -void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeEps); +void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeInfo); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/inc/mndMnode.h b/source/dnode/mnode/impl/inc/mndMnode.h index 320d3651f0..44eddb0617 100644 --- a/source/dnode/mnode/impl/inc/mndMnode.h +++ b/source/dnode/mnode/impl/inc/mndMnode.h @@ -29,6 +29,10 @@ void mndReleaseMnode(SMnode *pMnode, SMnodeObj *pObj); bool mndIsMnode(SMnode *pMnode, int32_t dnodeId); void mndGetMnodeEpSet(SMnode *pMnode, SEpSet *pEpSet); int32_t mndSetDropMnodeInfoToTrans(SMnode *pMnode, STrans *pTrans, SMnodeObj *pObj, bool force); +int32_t mndSetRestoreCreateMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDnodeObj *pDnode, SMnodeObj *pObj); +int32_t mndSetCreateMnodeCommitLogs(SMnode *pMnode, STrans *pTrans, SMnodeObj *pObj); +int32_t mndSetRestoreAlterMnodeTypeRedoActions(SMnode *pMnode, STrans *pTrans, SDnodeObj *pDnode, SMnodeObj *pObj); +int32_t mndSetRestoreCreateMnodeRedoLogs(SMnode *pMnode, STrans *pTrans, SMnodeObj *pObj); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/inc/mndQnode.h b/source/dnode/mnode/impl/inc/mndQnode.h index 36eebd3157..d4f364d821 100644 --- a/source/dnode/mnode/impl/inc/mndQnode.h +++ b/source/dnode/mnode/impl/inc/mndQnode.h @@ -30,6 +30,9 @@ SQnodeObj *mndAcquireQnode(SMnode *pMnode, int32_t qnodeId); void mndReleaseQnode(SMnode *pMnode, SQnodeObj *pObj); int32_t mndCreateQnodeList(SMnode *pMnode, SArray **pList, int32_t limit); int32_t mndSetDropQnodeInfoToTrans(SMnode *pMnode, STrans *pTrans, SQnodeObj *pObj, bool force); +bool mndQnodeInDnode(SQnodeObj *pQnode, int32_t dnodeId); +int32_t mndSetCreateQnodeCommitLogs(STrans *pTrans, SQnodeObj *pObj); +int32_t mndSetCreateQnodeRedoActions(STrans *pTrans, SDnodeObj *pDnode, SQnodeObj *pObj); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/inc/mndVgroup.h b/source/dnode/mnode/impl/inc/mndVgroup.h index 94c4eae83f..2ece0da5eb 100644 --- a/source/dnode/mnode/impl/inc/mndVgroup.h +++ b/source/dnode/mnode/impl/inc/mndVgroup.h @@ -49,6 +49,9 @@ int32_t mndBuildCompactVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, void *mndBuildCreateVnodeReq(SMnode *, SDnodeObj *pDnode, SDbObj *pDb, SVgObj *pVgroup, int32_t *pContLen); void *mndBuildDropVnodeReq(SMnode *, SDnodeObj *pDnode, SDbObj *pDb, SVgObj *pVgroup, int32_t *pContLen); bool mndVgroupInDb(SVgObj *pVgroup, int64_t dbUid); +bool mndVgroupInDnode(SVgObj *pVgroup, int32_t dnodeId); +int32_t mndBuildRestoreAlterVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *db, SVgObj *pVgroup, + SDnodeObj *pDnode); int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj *pVgroup); diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 1f58ae97a3..002407ce8a 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -27,7 +27,7 @@ #include "tmisce.h" #include "mndCluster.h" -#define TSDB_DNODE_VER_NUMBER 1 +#define TSDB_DNODE_VER_NUMBER 2 #define TSDB_DNODE_RESERVE_SIZE 64 static const char *offlineReason[] = { @@ -58,6 +58,7 @@ static int32_t mndProcessDropDnodeReq(SRpcMsg *pReq); static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq); static int32_t mndProcessConfigDnodeRsp(SRpcMsg *pRsp); static int32_t mndProcessStatusReq(SRpcMsg *pReq); +static int32_t mndProcessRestoreDnodeReq(SRpcMsg *pReq); static int32_t mndRetrieveConfigs(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); static void mndCancelGetNextConfig(SMnode *pMnode, void *pIter); @@ -83,6 +84,7 @@ int32_t mndInitDnode(SMnode *pMnode) { mndSetMsgHandle(pMnode, TDMT_MND_STATUS, mndProcessStatusReq); mndSetMsgHandle(pMnode, TDMT_MND_DNODE_LIST, mndProcessDnodeListReq); mndSetMsgHandle(pMnode, TDMT_MND_SHOW_VARIABLES, mndProcessShowVariablesReq); + mndSetMsgHandle(pMnode, TDMT_MND_RESTORE_DNODE, mndProcessRestoreDnodeReq); mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_CONFIGS, mndRetrieveConfigs); mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_CONFIGS, mndCancelGetNextConfig); @@ -139,6 +141,10 @@ static SSdbRaw *mndDnodeActionEncode(SDnodeObj *pDnode) { SDB_SET_INT16(pRaw, dataPos, pDnode->port, _OVER) SDB_SET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER) SDB_SET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER) + SDB_SET_INT16(pRaw, dataPos, TSDB_ACTIVE_KEY_LEN, _OVER) + SDB_SET_BINARY(pRaw, dataPos, pDnode->active, TSDB_ACTIVE_KEY_LEN, _OVER) + SDB_SET_INT16(pRaw, dataPos, TSDB_CONN_ACTIVE_KEY_LEN, _OVER) + SDB_SET_BINARY(pRaw, dataPos, pDnode->connActive, TSDB_CONN_ACTIVE_KEY_LEN, _OVER) SDB_SET_DATALEN(pRaw, dataPos, _OVER); terrno = 0; @@ -161,7 +167,7 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) { int8_t sver = 0; if (sdbGetRawSoftVer(pRaw, &sver) != 0) goto _OVER; - if (sver != TSDB_DNODE_VER_NUMBER) { + if (sver < 1 || sver > TSDB_DNODE_VER_NUMBER) { terrno = TSDB_CODE_SDB_INVALID_DATA_VER; goto _OVER; } @@ -179,6 +185,13 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) { SDB_GET_INT16(pRaw, dataPos, &pDnode->port, _OVER) SDB_GET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER) SDB_GET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER) + if (sver > 1) { + int16_t keyLen = 0; + SDB_GET_INT16(pRaw, dataPos, &keyLen, _OVER) + SDB_GET_BINARY(pRaw, dataPos, pDnode->active, keyLen, _OVER) + SDB_GET_INT16(pRaw, dataPos, &keyLen, _OVER) + SDB_GET_BINARY(pRaw, dataPos, pDnode->connActive, keyLen, _OVER) + } terrno = 0; if (tmsgUpdateDnodeInfo(&pDnode->id, NULL, pDnode->fqdn, &pDnode->port)) { @@ -294,6 +307,11 @@ int32_t mndGetDnodeSize(SMnode *pMnode) { return sdbGetSize(pSdb, SDB_DNODE); } +int32_t mndGetDbSize(SMnode *pMnode) { + SSdb *pSdb = pMnode->pSdb; + return sdbGetSize(pSdb, SDB_DB); +} + bool mndIsDnodeOnline(SDnodeObj *pDnode, int64_t curMs) { int64_t interval = TABS(pDnode->lastAccessTime - curMs); if (interval > 5000 * (int64_t)tsStatusInterval) { @@ -305,7 +323,7 @@ bool mndIsDnodeOnline(SDnodeObj *pDnode, int64_t curMs) { return true; } -void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeEps) { +static void mndGetDnodeEps(SMnode *pMnode, SArray *pDnodeEps) { SSdb *pSdb = pMnode->pSdb; int32_t numOfEps = 0; @@ -330,6 +348,34 @@ void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeEps) { } } +void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeInfo) { + SSdb *pSdb = pMnode->pSdb; + + int32_t numOfEps = 0; + void *pIter = NULL; + while (1) { + SDnodeObj *pDnode = NULL; + ESdbStatus objStatus = 0; + pIter = sdbFetchAll(pSdb, SDB_DNODE, pIter, (void **)&pDnode, &objStatus, true); + if (pIter == NULL) break; + + SDnodeInfo dInfo; + dInfo.id = pDnode->id; + dInfo.ep.port = pDnode->port; + tstrncpy(dInfo.ep.fqdn, pDnode->fqdn, TSDB_FQDN_LEN); + tstrncpy(dInfo.active, pDnode->active, TSDB_ACTIVE_KEY_LEN); + tstrncpy(dInfo.connActive, pDnode->connActive, TSDB_CONN_ACTIVE_KEY_LEN); + sdbRelease(pSdb, pDnode); + if (mndIsMnode(pMnode, pDnode->id)) { + dInfo.isMnode = 1; + } else { + dInfo.isMnode = 0; + } + + taosArrayPush(pDnodeInfo, &dInfo); + } +} + static int32_t mndCheckClusterCfgPara(SMnode *pMnode, SDnodeObj *pDnode, const SClusterCfg *pCfg) { if (pCfg->statusInterval != tsStatusInterval) { mError("dnode:%d, statusInterval:%d inconsistent with cluster:%d", pDnode->id, pCfg->statusInterval, @@ -536,7 +582,7 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { goto _OVER; } - mndGetDnodeData(pMnode, statusRsp.pDnodeEps); + mndGetDnodeEps(pMnode, statusRsp.pDnodeEps); int32_t contLen = tSerializeSStatusRsp(NULL, 0, &statusRsp); void *pHead = rpcMallocCont(contLen); @@ -745,6 +791,18 @@ _OVER: return code; } +extern int32_t mndProcessRestoreDnodeReqImpl(SRpcMsg *pReq); + +int32_t mndProcessRestoreDnodeReq(SRpcMsg *pReq){ + return mndProcessRestoreDnodeReqImpl(pReq); +} + +#ifndef TD_ENTERPRISE +int32_t mndProcessRestoreDnodeReqImpl(SRpcMsg *pReq){ + return 0; +} +#endif + static int32_t mndDropDnode(SMnode *pMnode, SRpcMsg *pReq, SDnodeObj *pDnode, SMnodeObj *pMObj, SQnodeObj *pQObj, SSnodeObj *pSObj, int32_t numOfVnodes, bool force) { int32_t code = -1; @@ -1041,6 +1099,7 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB ESdbStatus objStatus = 0; SDnodeObj *pDnode = NULL; int64_t curMs = taosGetTimestampMs(); + char buf[TSDB_CONN_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE]; // make sure TSDB_CONN_ACTIVE_KEY_LEN >= TSDB_EP_LEN while (numOfRows < rows) { pShow->pIter = sdbFetchAll(pSdb, SDB_DNODE, pShow->pIter, (void **)&pDnode, &objStatus, true); @@ -1052,7 +1111,6 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataSetVal(pColInfo, numOfRows, (const char *)&pDnode->id, false); - char buf[tListLen(pDnode->ep) + VARSTR_HEADER_SIZE] = {0}; STR_WITH_MAXSIZE_TO_VARSTR(buf, pDnode->ep, pShow->pMeta->pSchemas[cols].bytes); pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); @@ -1077,10 +1135,9 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB status = "offline"; } - char b1[16] = {0}; - STR_TO_VARSTR(b1, status); + STR_TO_VARSTR(buf, status); pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - colDataSetVal(pColInfo, numOfRows, b1, false); + colDataSetVal(pColInfo, numOfRows, buf, false); pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataSetVal(pColInfo, numOfRows, (const char *)&pDnode->createdTime, false); @@ -1095,6 +1152,16 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB colDataSetVal(pColInfo, numOfRows, b, false); taosMemoryFreeClear(b); +#ifdef TD_ENTERPRISE + STR_TO_VARSTR(buf, pDnode->active); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + colDataSetVal(pColInfo, numOfRows, buf, false); + + STR_TO_VARSTR(buf, pDnode->connActive); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + colDataSetVal(pColInfo, numOfRows, buf, false); +#endif + numOfRows++; sdbRelease(pSdb, pDnode); } diff --git a/source/dnode/mnode/impl/src/mndMnode.c b/source/dnode/mnode/impl/src/mndMnode.c index 5e3476859a..19c3d59167 100644 --- a/source/dnode/mnode/impl/src/mndMnode.c +++ b/source/dnode/mnode/impl/src/mndMnode.c @@ -275,6 +275,14 @@ static int32_t mndSetCreateMnodeRedoLogs(SMnode *pMnode, STrans *pTrans, SMnodeO return 0; } +int32_t mndSetRestoreCreateMnodeRedoLogs(SMnode *pMnode, STrans *pTrans, SMnodeObj *pObj) { + SSdbRaw *pRedoRaw = mndMnodeActionEncode(pObj); + if (pRedoRaw == NULL) return -1; + if (mndTransAppendRedolog(pTrans, pRedoRaw) != 0) return -1; + if (sdbSetRawStatus(pRedoRaw, SDB_STATUS_READY) != 0) return -1; + return 0; +} + static int32_t mndSetCreateMnodeUndoLogs(SMnode *pMnode, STrans *pTrans, SMnodeObj *pObj) { SSdbRaw *pUndoRaw = mndMnodeActionEncode(pObj); if (pUndoRaw == NULL) return -1; @@ -283,7 +291,7 @@ static int32_t mndSetCreateMnodeUndoLogs(SMnode *pMnode, STrans *pTrans, SMnodeO return 0; } -static int32_t mndSetCreateMnodeCommitLogs(SMnode *pMnode, STrans *pTrans, SMnodeObj *pObj) { +int32_t mndSetCreateMnodeCommitLogs(SMnode *pMnode, STrans *pTrans, SMnodeObj *pObj) { SSdbRaw *pCommitRaw = mndMnodeActionEncode(pObj); if (pCommitRaw == NULL) return -1; if (mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) return -1; @@ -421,6 +429,55 @@ static int32_t mndSetCreateMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDno return 0; } +int32_t mndSetRestoreCreateMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDnodeObj *pDnode, SMnodeObj *pObj) { + SSdb *pSdb = pMnode->pSdb; + void *pIter = NULL; + SDCreateMnodeReq createReq = {0}; + SEpSet createEpset = {0}; + + while (1) { + SMnodeObj *pMObj = NULL; + pIter = sdbFetch(pSdb, SDB_MNODE, pIter, (void **)&pMObj); + if (pIter == NULL) break; + + if(pMObj->id == pDnode->id) { + sdbRelease(pSdb, pMObj); + continue; + } + + if(pMObj->role == TAOS_SYNC_ROLE_VOTER){ + createReq.replicas[createReq.replica].id = pMObj->id; + createReq.replicas[createReq.replica].port = pMObj->pDnode->port; + memcpy(createReq.replicas[createReq.replica].fqdn, pMObj->pDnode->fqdn, TSDB_FQDN_LEN); + createReq.replica++; + } + else{ + createReq.learnerReplicas[createReq.learnerReplica].id = pMObj->id; + createReq.learnerReplicas[createReq.learnerReplica].port = pMObj->pDnode->port; + memcpy(createReq.learnerReplicas[createReq.learnerReplica].fqdn, pMObj->pDnode->fqdn, TSDB_FQDN_LEN); + createReq.learnerReplica++; + } + + sdbRelease(pSdb, pMObj); + } + + createReq.learnerReplicas[createReq.learnerReplica].id = pDnode->id; + createReq.learnerReplicas[createReq.learnerReplica].port = pDnode->port; + memcpy(createReq.learnerReplicas[createReq.learnerReplica].fqdn, pDnode->fqdn, TSDB_FQDN_LEN); + createReq.learnerReplica++; + + createReq.lastIndex = pObj->lastIndex; + + createEpset.inUse = 0; + createEpset.numOfEps = 1; + createEpset.eps[0].port = pDnode->port; + memcpy(createEpset.eps[0].fqdn, pDnode->fqdn, TSDB_FQDN_LEN); + + if (mndBuildCreateMnodeRedoAction(pTrans, &createReq, &createEpset) != 0) return -1; + + return 0; +} + static int32_t mndSetAlterMnodeTypeRedoActions(SMnode *pMnode, STrans *pTrans, SDnodeObj *pDnode, SMnodeObj *pObj) { SSdb *pSdb = pMnode->pSdb; void *pIter = NULL; @@ -465,6 +522,55 @@ static int32_t mndSetAlterMnodeTypeRedoActions(SMnode *pMnode, STrans *pTrans, S return 0; } +int32_t mndSetRestoreAlterMnodeTypeRedoActions(SMnode *pMnode, STrans *pTrans, SDnodeObj *pDnode, SMnodeObj *pObj) { + SSdb *pSdb = pMnode->pSdb; + void *pIter = NULL; + SDAlterMnodeTypeReq alterReq = {0}; + SEpSet createEpset = {0}; + + while (1) { + SMnodeObj *pMObj = NULL; + pIter = sdbFetch(pSdb, SDB_MNODE, pIter, (void **)&pMObj); + if (pIter == NULL) break; + + if(pMObj->id == pDnode->id) { + sdbRelease(pSdb, pMObj); + continue; + } + + if(pMObj->role == TAOS_SYNC_ROLE_VOTER){ + alterReq.replicas[alterReq.replica].id = pMObj->id; + alterReq.replicas[alterReq.replica].port = pMObj->pDnode->port; + memcpy(alterReq.replicas[alterReq.replica].fqdn, pMObj->pDnode->fqdn, TSDB_FQDN_LEN); + alterReq.replica++; + } + else{ + alterReq.learnerReplicas[alterReq.learnerReplica].id = pMObj->id; + alterReq.learnerReplicas[alterReq.learnerReplica].port = pMObj->pDnode->port; + memcpy(alterReq.learnerReplicas[alterReq.learnerReplica].fqdn, pMObj->pDnode->fqdn, TSDB_FQDN_LEN); + alterReq.learnerReplica++; + } + + sdbRelease(pSdb, pMObj); + } + + alterReq.replicas[alterReq.replica].id = pDnode->id; + alterReq.replicas[alterReq.replica].port = pDnode->port; + memcpy(alterReq.replicas[alterReq.replica].fqdn, pDnode->fqdn, TSDB_FQDN_LEN); + alterReq.replica++; + + alterReq.lastIndex = pObj->lastIndex; + + createEpset.inUse = 0; + createEpset.numOfEps = 1; + createEpset.eps[0].port = pDnode->port; + memcpy(createEpset.eps[0].fqdn, pDnode->fqdn, TSDB_FQDN_LEN); + + if (mndBuildAlterMnodeTypeRedoAction(pTrans, &alterReq, &createEpset) != 0) return -1; + + return 0; +} + static int32_t mndCreateMnode(SMnode *pMnode, SRpcMsg *pReq, SDnodeObj *pDnode, SMCreateMnodeReq *pCreate) { int32_t code = -1; diff --git a/source/dnode/mnode/impl/src/mndQnode.c b/source/dnode/mnode/impl/src/mndQnode.c index a8b2d5f4bb..b5c9ce1f65 100644 --- a/source/dnode/mnode/impl/src/mndQnode.c +++ b/source/dnode/mnode/impl/src/mndQnode.c @@ -180,7 +180,7 @@ static int32_t mndSetCreateQnodeUndoLogs(STrans *pTrans, SQnodeObj *pObj) { return 0; } -static int32_t mndSetCreateQnodeCommitLogs(STrans *pTrans, SQnodeObj *pObj) { +int32_t mndSetCreateQnodeCommitLogs(STrans *pTrans, SQnodeObj *pObj) { SSdbRaw *pCommitRaw = mndQnodeActionEncode(pObj); if (pCommitRaw == NULL) return -1; if (mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) return -1; @@ -188,7 +188,11 @@ static int32_t mndSetCreateQnodeCommitLogs(STrans *pTrans, SQnodeObj *pObj) { return 0; } -static int32_t mndSetCreateQnodeRedoActions(STrans *pTrans, SDnodeObj *pDnode, SQnodeObj *pObj) { +bool mndQnodeInDnode(SQnodeObj *pQnode, int32_t dnodeId) { + return pQnode->pDnode->id == dnodeId; +} + +int32_t mndSetCreateQnodeRedoActions(STrans *pTrans, SDnodeObj *pDnode, SQnodeObj *pObj) { SDCreateQnodeReq createReq = {0}; createReq.dnodeId = pDnode->id; diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index 9497ab3870..a834b164e2 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -1155,6 +1155,28 @@ int32_t mndAddCreateVnodeAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVg return 0; } +int32_t mndRestoreAddCreateVnodeAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, SDnodeObj *pDnode) { + STransAction action = {0}; + + action.epSet = mndGetDnodeEpset(pDnode); + + int32_t contLen = 0; + void *pReq = mndBuildCreateVnodeReq(pMnode, pDnode, pDb, pVgroup, &contLen); + if (pReq == NULL) return -1; + + action.pCont = pReq; + action.contLen = contLen; + action.msgType = TDMT_DND_CREATE_VNODE; + action.acceptableCode = TSDB_CODE_VND_ALREADY_EXIST; + + if (mndTransAppendRedoAction(pTrans, &action) != 0) { + taosMemoryFree(pReq); + return -1; + } + + return 0; +} + int32_t mndAddAlterVnodeConfirmAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup) { STransAction action = {0}; action.epSet = mndGetVgroupEpset(pMnode, pVgroup); @@ -1274,6 +1296,29 @@ int32_t mndAddAlterVnodeTypeAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, return 0; } +int32_t mndRestoreAddAlterVnodeTypeAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, + SDnodeObj *pDnode) { + STransAction action = {0}; + action.epSet = mndGetDnodeEpset(pDnode); + + int32_t contLen = 0; + void *pReq = mndBuildAlterVnodeReplicaReq(pMnode, pDb, pVgroup, pDnode->id, &contLen); + if (pReq == NULL) return -1; + + action.pCont = pReq; + action.contLen = contLen; + action.msgType = TDMT_DND_ALTER_VNODE_TYPE; + action.acceptableCode = TSDB_CODE_VND_ALREADY_IS_VOTER; + action.retryCode = TSDB_CODE_VND_NOT_CATCH_UP; + + if (mndTransAppendRedoAction(pTrans, &action) != 0) { + taosMemoryFree(pReq); + return -1; + } + + return 0; +} + static int32_t mndAddDisableVnodeWriteAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, int32_t dnodeId) { SDnodeObj *pDnode = mndAcquireDnode(pMnode, dnodeId); @@ -2113,6 +2158,55 @@ int32_t mndBuildAlterVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pOldDb return 0; } +int32_t mndBuildRestoreAlterVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *db, SVgObj *pVgroup, + SDnodeObj *pDnode) { + SVgObj newVgroup = {0}; + memcpy(&newVgroup, pVgroup, sizeof(SVgObj)); + + mInfo("db:%s, vgId:%d, restore vnodes, vn:0 dnode:%d", pVgroup->dbName, pVgroup->vgId, + pVgroup->vnodeGid[0].dnodeId); + + if(newVgroup.replica == 1){ + int selected = 0; + for(int i = 0; i < newVgroup.replica; i++){ + newVgroup.vnodeGid[i].nodeRole = TAOS_SYNC_ROLE_VOTER; + if(newVgroup.vnodeGid[i].dnodeId == pDnode->id){ + selected = i; + } + } + if (mndAddCreateVnodeAction(pMnode, pTrans, db, &newVgroup, &newVgroup.vnodeGid[selected]) != 0) return -1; + } + else if(newVgroup.replica == 3){ + for(int i = 0; i < newVgroup.replica; i++){ + if(newVgroup.vnodeGid[i].dnodeId == pDnode->id){ + newVgroup.vnodeGid[i].nodeRole = TAOS_SYNC_ROLE_LEARNER; + } + else{ + newVgroup.vnodeGid[i].nodeRole = TAOS_SYNC_ROLE_VOTER; + } + } + if (mndRestoreAddCreateVnodeAction(pMnode, pTrans, db, &newVgroup, pDnode) != 0) return -1; + + for(int i = 0; i < newVgroup.replica; i++){ + newVgroup.vnodeGid[i].nodeRole = TAOS_SYNC_ROLE_VOTER; + if(newVgroup.vnodeGid[i].dnodeId == pDnode->id){ + } + } + if (mndRestoreAddAlterVnodeTypeAction(pMnode, pTrans, db, &newVgroup, pDnode) != 0) + return -1; + } + + SSdbRaw *pVgRaw = mndVgroupActionEncode(&newVgroup); + if (pVgRaw == NULL) return -1; + if (mndTransAppendCommitlog(pTrans, pVgRaw) != 0) { + sdbFreeRaw(pVgRaw); + return -1; + } + (void)sdbSetRawStatus(pVgRaw, SDB_STATUS_READY); + + return 0; +} + static int32_t mndAddAdjustVnodeHashRangeAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup) { return 0; } @@ -2440,6 +2534,13 @@ _OVER: bool mndVgroupInDb(SVgObj *pVgroup, int64_t dbUid) { return !pVgroup->isTsma && pVgroup->dbUid == dbUid; } +bool mndVgroupInDnode(SVgObj *pVgroup, int32_t dnodeId) { + for(int i = 0; i < pVgroup->replica; i++){ + if(pVgroup->vnodeGid[i].dnodeId == dnodeId) return true; + } + return false; +} + static void *mndBuildCompactVnodeReq(SMnode *pMnode, SDbObj *pDb, SVgObj *pVgroup, int32_t *pContLen, int64_t compactTs, STimeWindow tw) { SCompactVnodeReq compactReq = {0}; diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 5684c40df0..f065d3ea1e 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -396,8 +396,12 @@ int32_t tqProcessSeekReq(STQ* pTq, int64_t sversion, char* msg, int32_t msgLen) } // save the new offset value - tqDebug("vgId:%d sub:%s seek to %" PRId64 " prev offset:%" PRId64, vgId, pOffset->subKey, pOffset->val.version, - pSavedOffset->val.version); + if (pSavedOffset != NULL) { + tqDebug("vgId:%d sub:%s seek to:%" PRId64 " prev offset:%" PRId64, vgId, pOffset->subKey, pOffset->val.version, + pSavedOffset->val.version); + } else { + tqDebug("vgId:%d sub:%s seek to:%"PRId64" not saved yet", vgId, pOffset->subKey, pOffset->val.version); + } if (tqOffsetWrite(pTq->pOffsetStore, pOffset) < 0) { tqError("failed to save offset, vgId:%d sub:%s seek to %" PRId64, vgId, pOffset->subKey, pOffset->val.version); diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 23b9f3db12..e0e837dc58 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -180,11 +180,12 @@ void tsdbCacheSerialize(SLastCol *pLastCol, char **value, size_t *size) { *(SLastCol *)(*value) = *pLastCol; if (IS_VAR_DATA_TYPE(pColVal->type)) { uint8_t *pVal = pColVal->value.pData; - pColVal->value.pData = *value + sizeof(*pLastCol); + SColVal *pDColVal = &((SLastCol *)(*value))->colVal; + pDColVal->value.pData = *value + sizeof(*pLastCol); if (pColVal->value.nData > 0) { - memcpy(pColVal->value.pData, pVal, pColVal->value.nData); + memcpy(pDColVal->value.pData, pVal, pColVal->value.nData); } else { - pColVal->value.pData = NULL; + pDColVal->value.pData = NULL; } } *size = length; @@ -340,6 +341,16 @@ _exit: return code; } +static void reallocVarData(SColVal *pColVal) { + if (IS_VAR_DATA_TYPE(pColVal->type)) { + uint8_t *pVal = pColVal->value.pData; + pColVal->value.pData = taosMemoryMalloc(pColVal->value.nData); + if (pColVal->value.nData) { + memcpy(pColVal->value.pData, pVal, pColVal->value.nData); + } + } +} + static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCacheRowsReader *pr, int16_t *aCols, int nCols, int16_t *slotIds); @@ -347,9 +358,10 @@ static int32_t mergeLastRowCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, int nCols, int16_t *slotIds); int32_t tsdbCacheGet(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCacheRowsReader *pr, int32_t ltype) { - static char const *alstring[2] = {"last_row", "last"}; - char const *lstring = alstring[ltype]; - int32_t code = 0; + static char const *alstring[2] = {"last_row", "last"}; + char const *lstring = alstring[ltype]; + rocksdb_writebatch_t *wb = NULL; + int32_t code = 0; SArray *pCidList = pr->pCidList; int num_keys = TARRAY_SIZE(pCidList); @@ -387,14 +399,7 @@ int32_t tsdbCacheGet(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCacheRowsR int16_t cid = *(int16_t *)taosArrayGet(pCidList, i); SLastCol noneCol = {.ts = TSKEY_MIN, .colVal = COL_VAL_NONE(cid, pr->pSchema->columns[pr->pSlotIds[i]].type)}; if (pLastCol) { - SColVal *pColVal = &pLastCol->colVal; - if (IS_VAR_DATA_TYPE(pColVal->type)) { - uint8_t *pVal = pColVal->value.pData; - pColVal->value.pData = taosMemoryMalloc(pColVal->value.nData); - if (pColVal->value.nData) { - memcpy(pColVal->value.pData, pVal, pColVal->value.nData); - } - } + reallocVarData(&pLastCol->colVal); } else { taosThreadMutexLock(&pTsdb->rCache.rMutex); @@ -423,22 +428,28 @@ int32_t tsdbCacheGet(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCacheRowsR } // store result back to rocks cache - rocksdb_writebatch_t *wb = pTsdb->rCache.writebatch; - char *value = NULL; - size_t vlen = 0; + wb = pTsdb->rCache.writebatch; + char *value = NULL; + size_t vlen = 0; tsdbCacheSerialize(pLastCol, &value, &vlen); char key[ROCKS_KEY_LEN]; size_t klen = snprintf(key, ROCKS_KEY_LEN, "%" PRIi64 ":%" PRIi16 ":%s", uid, pLastCol->colVal.cid, lstring); rocksdb_writebatch_put(wb, key, klen, value, vlen); taosMemoryFree(value); + } else { + reallocVarData(&pLastCol->colVal); + } + if (wb) { char *err = NULL; rocksdb_write(pTsdb->rCache.db, pTsdb->rCache.writeoptions, wb, &err); if (NULL != err) { tsdbError("vgId:%d, %s failed at line %d since %s", TD_VID(pTsdb->pVnode), __func__, __LINE__, err); rocksdb_free(err); } + + rocksdb_writebatch_clear(wb); } taosThreadMutexUnlock(&pTsdb->rCache.rMutex); @@ -1382,7 +1393,12 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow, bool *pIgnoreEarlie *pIgnoreEarlierTs = false; tBlockDataReset(state->pBlockData); TABLEID tid = {.suid = state->suid, .uid = state->uid}; - code = tBlockDataInit(state->pBlockData, &tid, state->pTSchema, aCols, nCols); + int nTmpCols = nCols; + if (aCols[0] == PRIMARYKEY_TIMESTAMP_COL_ID && nCols == 1) { + nTmpCols = 0; + skipBlock = false; + } + code = tBlockDataInit(state->pBlockData, &tid, state->pTSchema, aCols, nTmpCols); if (code) goto _err; code = tsdbReadDataBlock(*state->pDataFReader, &block, state->pBlockData); diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index 29e3668ec4..d56595dae9 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -38,6 +38,11 @@ typedef struct STimeSliceOperatorInfo { SColumn tsCol; // primary timestamp column SExprSupp scalarSup; // scalar calculation struct SFillColInfo* pFillColInfo; // fill column info + int64_t prevTs; + bool prevTsSet; + uint64_t groupId; + SGroupKeys* pPrevGroupKey; + SSDataBlock* pNextGroupRes; } STimeSliceOperatorInfo; static void destroyTimeSliceOperatorInfo(void* param); @@ -168,18 +173,55 @@ static bool isIsfilledPseudoColumn(SExprInfo* pExprInfo) { return (IS_BOOLEAN_TYPE(pExprInfo->base.resSchema.type) && strcasecmp(name, "_isfilled") == 0); } +static bool checkDuplicateTimestamps(STimeSliceOperatorInfo* pSliceInfo, SColumnInfoData* pTsCol, + int32_t curIndex, int32_t rows) { + + + int64_t currentTs = *(int64_t*)colDataGetData(pTsCol, curIndex); + if (currentTs > pSliceInfo->win.ekey) { + return false; + } + + if ((pSliceInfo->prevTsSet == true) && (currentTs == pSliceInfo->prevTs)) { + return true; + } + + pSliceInfo->prevTsSet = true; + pSliceInfo->prevTs = currentTs; + + if (currentTs == pSliceInfo->win.ekey && curIndex < rows - 1) { + int64_t nextTs = *(int64_t*)colDataGetData(pTsCol, curIndex + 1); + if (currentTs == nextTs) { + return true; + } + } + + return false; +} + +static bool isInterpFunc(SExprInfo* pExprInfo) { + int32_t functionType = pExprInfo->pExpr->_function.functionType; + return (functionType == FUNCTION_TYPE_INTERP); +} + +static bool isGroupKeyFunc(SExprInfo* pExprInfo) { + int32_t functionType = pExprInfo->pExpr->_function.functionType; + return (functionType == FUNCTION_TYPE_GROUP_KEY); +} + static bool genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp* pExprSup, SSDataBlock* pResBlock, - bool beforeTs) { + SSDataBlock* pSrcBlock, int32_t index, bool beforeTs) { int32_t rows = pResBlock->info.rows; timeSliceEnsureBlockCapacity(pSliceInfo, pResBlock); // todo set the correct primary timestamp column + // output the result bool hasInterp = true; for (int32_t j = 0; j < pExprSup->numOfExprs; ++j) { SExprInfo* pExprInfo = &pExprSup->pExprInfo[j]; - int32_t dstSlot = pExprInfo->base.resSchema.slotId; + int32_t dstSlot = pExprInfo->base.resSchema.slotId; SColumnInfoData* pDst = taosArrayGet(pResBlock->pDataBlock, dstSlot); if (isIrowtsPseudoColumn(pExprInfo)) { @@ -189,6 +231,30 @@ static bool genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp bool isFilled = true; colDataAppend(pDst, pResBlock->info.rows, (char*)&isFilled, false); continue; + } else if (!isInterpFunc(pExprInfo)) { + if (isGroupKeyFunc(pExprInfo)) { + if (pSrcBlock != NULL) { + int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; + SColumnInfoData* pSrc = taosArrayGet(pSrcBlock->pDataBlock, srcSlot); + + if (colDataIsNull_s(pSrc, index)) { + colDataSetNULL(pDst, pResBlock->info.rows); + continue; + } + + char* v = colDataGetData(pSrc, index); + colDataSetVal(pDst, pResBlock->info.rows, v, false); + } else { + // use stored group key + SGroupKeys* pkey = pSliceInfo->pPrevGroupKey; + if (pkey->isNull == false) { + colDataSetVal(pDst, rows, pkey->pData, false); + } else { + colDataSetNULL(pDst, rows); + } + } + } + continue; } int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; @@ -314,7 +380,7 @@ static void addCurrentRowToResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp* bool isFilled = false; colDataSetVal(pDst, pResBlock->info.rows, (char*)&isFilled, false); } else { - int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; + int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; SColumnInfoData* pSrc = taosArrayGet(pSrcBlock->pDataBlock, srcSlot); if (colDataIsNull_s(pSrc, index)) { @@ -414,7 +480,31 @@ static int32_t initFillLinearInfo(STimeSliceOperatorInfo* pInfo, SSDataBlock* pB return TSDB_CODE_SUCCESS; } -static int32_t initKeeperInfo(STimeSliceOperatorInfo* pInfo, SSDataBlock* pBlock) { +static int32_t initGroupKeyKeeper(STimeSliceOperatorInfo* pInfo, SExprSupp* pExprSup) { + if (pInfo->pPrevGroupKey != NULL) { + return TSDB_CODE_SUCCESS; + } + + pInfo->pPrevGroupKey = taosMemoryCalloc(1, sizeof(SGroupKeys)); + if (pInfo->pPrevGroupKey == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } + + for (int32_t i = 0; i < pExprSup->numOfExprs; ++i) { + SExprInfo* pExprInfo = &pExprSup->pExprInfo[i]; + + if (isGroupKeyFunc(pExprInfo)) { + pInfo->pPrevGroupKey->bytes = pExprInfo->base.resSchema.bytes; + pInfo->pPrevGroupKey->type = pExprInfo->base.resSchema.type; + pInfo->pPrevGroupKey->isNull = false; + pInfo->pPrevGroupKey->pData = taosMemoryCalloc(1, pInfo->pPrevGroupKey->bytes); + } + } + + return TSDB_CODE_SUCCESS; +} + +static int32_t initKeeperInfo(STimeSliceOperatorInfo* pInfo, SSDataBlock* pBlock, SExprSupp* pExprSup) { int32_t code; code = initPrevRowsKeeper(pInfo, pBlock); if (code != TSDB_CODE_SUCCESS) { @@ -431,9 +521,202 @@ static int32_t initKeeperInfo(STimeSliceOperatorInfo* pInfo, SSDataBlock* pBlock return TSDB_CODE_FAILED; } + code = initGroupKeyKeeper(pInfo, pExprSup); + if (code != TSDB_CODE_SUCCESS) { + return TSDB_CODE_FAILED; + } + + return TSDB_CODE_SUCCESS; } +static int32_t resetPrevRowsKeeper(STimeSliceOperatorInfo* pInfo) { + if (pInfo->pPrevRow == NULL) { + return TSDB_CODE_SUCCESS; + } + + for (int32_t i = 0; i < taosArrayGetSize(pInfo->pLinearInfo); ++i) { + SGroupKeys *pKey = taosArrayGet(pInfo->pPrevRow, i); + pKey->isNull = false; + } + + pInfo->isPrevRowSet = false; + + return TSDB_CODE_SUCCESS; +} + +static int32_t resetNextRowsKeeper(STimeSliceOperatorInfo* pInfo) { + if (pInfo->pNextRow == NULL) { + return TSDB_CODE_SUCCESS; + } + + for (int32_t i = 0; i < taosArrayGetSize(pInfo->pLinearInfo); ++i) { + SGroupKeys *pKey = taosArrayGet(pInfo->pPrevRow, i); + pKey->isNull = false; + } + + pInfo->isNextRowSet = false; + + return TSDB_CODE_SUCCESS; +} + +static int32_t resetFillLinearInfo(STimeSliceOperatorInfo* pInfo) { + if (pInfo->pLinearInfo == NULL) { + return TSDB_CODE_SUCCESS; + } + + for (int32_t i = 0; i < taosArrayGetSize(pInfo->pLinearInfo); ++i) { + SFillLinearInfo *pLinearInfo = taosArrayGet(pInfo->pLinearInfo, i); + pLinearInfo->start.key = INT64_MIN; + pLinearInfo->end.key = INT64_MIN; + pLinearInfo->isStartSet = false; + pLinearInfo->isEndSet = false; + } + + return TSDB_CODE_SUCCESS; +} + +static int32_t resetKeeperInfo(STimeSliceOperatorInfo* pInfo) { + resetPrevRowsKeeper(pInfo); + resetNextRowsKeeper(pInfo); + resetFillLinearInfo(pInfo); + + return TSDB_CODE_SUCCESS; +} + +static void doTimesliceImpl(SOperatorInfo* pOperator, STimeSliceOperatorInfo* pSliceInfo, SSDataBlock* pBlock, + SExecTaskInfo* pTaskInfo) { + SSDataBlock* pResBlock = pSliceInfo->pRes; + SInterval* pInterval = &pSliceInfo->interval; + + SColumnInfoData* pTsCol = taosArrayGet(pBlock->pDataBlock, pSliceInfo->tsCol.slotId); + for (int32_t i = 0; i < pBlock->info.rows; ++i) { + int64_t ts = *(int64_t*)colDataGetData(pTsCol, i); + + // check for duplicate timestamps + if (checkDuplicateTimestamps(pSliceInfo, pTsCol, i, pBlock->info.rows)) { + T_LONG_JMP(pTaskInfo->env, TSDB_CODE_FUNC_DUP_TIMESTAMP); + } + + if (pSliceInfo->current > pSliceInfo->win.ekey) { + break; + } + + if (ts == pSliceInfo->current) { + addCurrentRowToResult(pSliceInfo, &pOperator->exprSupp, pResBlock, pBlock, i); + + doKeepPrevRows(pSliceInfo, pBlock, i); + doKeepLinearInfo(pSliceInfo, pBlock, i); + + pSliceInfo->current = + taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); + if (pSliceInfo->current > pSliceInfo->win.ekey) { + break; + } + } else if (ts < pSliceInfo->current) { + // in case of interpolation window starts and ends between two datapoints, fill(prev) need to interpolate + doKeepPrevRows(pSliceInfo, pBlock, i); + doKeepLinearInfo(pSliceInfo, pBlock, i); + + if (i < pBlock->info.rows - 1) { + // in case of interpolation window starts and ends between two datapoints, fill(next) need to interpolate + doKeepNextRows(pSliceInfo, pBlock, i + 1); + int64_t nextTs = *(int64_t*)colDataGetData(pTsCol, i + 1); + if (nextTs > pSliceInfo->current) { + while (pSliceInfo->current < nextTs && pSliceInfo->current <= pSliceInfo->win.ekey) { + if (!genInterpolationResult(pSliceInfo, &pOperator->exprSupp, pResBlock, pBlock, i, false) && + pSliceInfo->fillType == TSDB_FILL_LINEAR) { + break; + } else { + pSliceInfo->current = taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, + pInterval->precision); + } + } + + if (pSliceInfo->current > pSliceInfo->win.ekey) { + break; + } + } else { + // ignore current row, and do nothing + } + } else { // it is the last row of current block + doKeepPrevRows(pSliceInfo, pBlock, i); + } + } else { // ts > pSliceInfo->current + // in case of interpolation window starts and ends between two datapoints, fill(next) need to interpolate + doKeepNextRows(pSliceInfo, pBlock, i); + doKeepLinearInfo(pSliceInfo, pBlock, i); + + while (pSliceInfo->current < ts && pSliceInfo->current <= pSliceInfo->win.ekey) { + if (!genInterpolationResult(pSliceInfo, &pOperator->exprSupp, pResBlock, pBlock, i, true) && + pSliceInfo->fillType == TSDB_FILL_LINEAR) { + break; + } else { + pSliceInfo->current = + taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); + } + } + + // add current row if timestamp match + if (ts == pSliceInfo->current && pSliceInfo->current <= pSliceInfo->win.ekey) { + addCurrentRowToResult(pSliceInfo, &pOperator->exprSupp, pResBlock, pBlock, i); + + pSliceInfo->current = + taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); + } + doKeepPrevRows(pSliceInfo, pBlock, i); + + if (pSliceInfo->current > pSliceInfo->win.ekey) { + break; + } + } + } +} + +static void genInterpAfterDataBlock(STimeSliceOperatorInfo* pSliceInfo, SOperatorInfo* pOperator, int32_t index) { + SSDataBlock* pResBlock = pSliceInfo->pRes; + SInterval* pInterval = &pSliceInfo->interval; + + while (pSliceInfo->current <= pSliceInfo->win.ekey && pSliceInfo->fillType != TSDB_FILL_NEXT && + pSliceInfo->fillType != TSDB_FILL_LINEAR) { + genInterpolationResult(pSliceInfo, &pOperator->exprSupp, pResBlock, NULL, index, false); + pSliceInfo->current = + taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); + } +} + +static void copyPrevGroupKey(SExprSupp* pExprSup, SGroupKeys* pGroupKey, SSDataBlock* pSrcBlock) { + for (int32_t j = 0; j < pExprSup->numOfExprs; ++j) { + SExprInfo* pExprInfo = &pExprSup->pExprInfo[j]; + + if (isGroupKeyFunc(pExprInfo)) { + int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; + SColumnInfoData* pSrc = taosArrayGet(pSrcBlock->pDataBlock, srcSlot); + + if (colDataIsNull_s(pSrc, 0)) { + pGroupKey->isNull = true; + break; + } + + char* v = colDataGetData(pSrc, 0); + if (IS_VAR_DATA_TYPE(pGroupKey->type)) { + memcpy(pGroupKey->pData, v, varDataTLen(v)); + } else { + memcpy(pGroupKey->pData, v, pGroupKey->bytes); + } + + pGroupKey->isNull = false; + break; + } + } +} + +static void resetTimesliceInfo(STimeSliceOperatorInfo* pSliceInfo) { + pSliceInfo->current = pSliceInfo->win.skey; + pSliceInfo->prevTsSet = false; + resetKeeperInfo(pSliceInfo); +} + static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { if (pOperator->status == OP_EXEC_DONE) { return NULL; @@ -452,118 +735,62 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { blockDataCleanup(pResBlock); while (1) { - SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream); - if (pBlock == NULL) { - break; + if (pSliceInfo->pNextGroupRes != NULL) { + setInputDataBlock(pSup, pSliceInfo->pNextGroupRes, order, MAIN_SCAN, true); + doTimesliceImpl(pOperator, pSliceInfo, pSliceInfo->pNextGroupRes, pTaskInfo); + copyPrevGroupKey(&pOperator->exprSupp, pSliceInfo->pPrevGroupKey, pSliceInfo->pNextGroupRes); + pSliceInfo->pNextGroupRes = NULL; } - if (pSliceInfo->scalarSup.pExprInfo != NULL) { - SExprSupp* pExprSup = &pSliceInfo->scalarSup; - projectApplyFunctions(pExprSup->pExprInfo, pBlock, pBlock, pExprSup->pCtx, pExprSup->numOfExprs, NULL); - } - - int32_t code = initKeeperInfo(pSliceInfo, pBlock); - if (code != TSDB_CODE_SUCCESS) { - T_LONG_JMP(pTaskInfo->env, code); - } - - // the pDataBlock are always the same one, no need to call this again - setInputDataBlock(pSup, pBlock, order, MAIN_SCAN, true); - - SColumnInfoData* pTsCol = taosArrayGet(pBlock->pDataBlock, pSliceInfo->tsCol.slotId); - for (int32_t i = 0; i < pBlock->info.rows; ++i) { - int64_t ts = *(int64_t*)colDataGetData(pTsCol, i); - - if (pSliceInfo->current > pSliceInfo->win.ekey) { + while (1) { + SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream); + if (pBlock == NULL) { setOperatorCompleted(pOperator); break; } - if (ts == pSliceInfo->current) { - addCurrentRowToResult(pSliceInfo, &pOperator->exprSupp, pResBlock, pBlock, i); - - doKeepPrevRows(pSliceInfo, pBlock, i); - doKeepLinearInfo(pSliceInfo, pBlock, i); - - pSliceInfo->current = - taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); - if (pSliceInfo->current > pSliceInfo->win.ekey) { - setOperatorCompleted(pOperator); - break; - } - } else if (ts < pSliceInfo->current) { - // in case of interpolation window starts and ends between two datapoints, fill(prev) need to interpolate - doKeepPrevRows(pSliceInfo, pBlock, i); - doKeepLinearInfo(pSliceInfo, pBlock, i); - - if (i < pBlock->info.rows - 1) { - // in case of interpolation window starts and ends between two datapoints, fill(next) need to interpolate - doKeepNextRows(pSliceInfo, pBlock, i + 1); - int64_t nextTs = *(int64_t*)colDataGetData(pTsCol, i + 1); - if (nextTs > pSliceInfo->current) { - while (pSliceInfo->current < nextTs && pSliceInfo->current <= pSliceInfo->win.ekey) { - if (!genInterpolationResult(pSliceInfo, &pOperator->exprSupp, pResBlock, false) && - pSliceInfo->fillType == TSDB_FILL_LINEAR) { - break; - } else { - pSliceInfo->current = taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, - pInterval->precision); - } - } - - if (pSliceInfo->current > pSliceInfo->win.ekey) { - setOperatorCompleted(pOperator); - break; - } - } else { - // ignore current row, and do nothing - } - } else { // it is the last row of current block - doKeepPrevRows(pSliceInfo, pBlock, i); - } - } else { // ts > pSliceInfo->current - // in case of interpolation window starts and ends between two datapoints, fill(next) need to interpolate - doKeepNextRows(pSliceInfo, pBlock, i); - doKeepLinearInfo(pSliceInfo, pBlock, i); - - while (pSliceInfo->current < ts && pSliceInfo->current <= pSliceInfo->win.ekey) { - if (!genInterpolationResult(pSliceInfo, &pOperator->exprSupp, pResBlock, true) && - pSliceInfo->fillType == TSDB_FILL_LINEAR) { - break; - } else { - pSliceInfo->current = - taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); - } - } - - // add current row if timestamp match - if (ts == pSliceInfo->current && pSliceInfo->current <= pSliceInfo->win.ekey) { - addCurrentRowToResult(pSliceInfo, &pOperator->exprSupp, pResBlock, pBlock, i); - - pSliceInfo->current = - taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); - } - doKeepPrevRows(pSliceInfo, pBlock, i); - - if (pSliceInfo->current > pSliceInfo->win.ekey) { - setOperatorCompleted(pOperator); + if (pSliceInfo->groupId == 0 && pBlock->info.id.groupId != 0) { + pSliceInfo->groupId = pBlock->info.id.groupId; + } else { + if (pSliceInfo->groupId != pBlock->info.id.groupId) { + pSliceInfo->groupId = pBlock->info.id.groupId; + pSliceInfo->pNextGroupRes = pBlock; break; } } + + if (pSliceInfo->scalarSup.pExprInfo != NULL) { + SExprSupp* pExprSup = &pSliceInfo->scalarSup; + projectApplyFunctions(pExprSup->pExprInfo, pBlock, pBlock, pExprSup->pCtx, pExprSup->numOfExprs, NULL); + } + + int32_t code = initKeeperInfo(pSliceInfo, pBlock, &pOperator->exprSupp); + if (code != TSDB_CODE_SUCCESS) { + T_LONG_JMP(pTaskInfo->env, code); + } + + // the pDataBlock are always the same one, no need to call this again + setInputDataBlock(pSup, pBlock, order, MAIN_SCAN, true); + doTimesliceImpl(pOperator, pSliceInfo, pBlock, pTaskInfo); + copyPrevGroupKey(&pOperator->exprSupp, pSliceInfo->pPrevGroupKey, pBlock); + } + + // check if need to interpolate after last datablock + // except for fill(next), fill(linear) + genInterpAfterDataBlock(pSliceInfo, pOperator, 0); + + doFilter(pResBlock, pOperator->exprSupp.pFilterInfo, NULL); + if (pOperator->status == OP_EXEC_DONE) { + break; + } + + // restore initial value for next group + resetTimesliceInfo(pSliceInfo); + if (pResBlock->info.rows >= 4096) { + break; } } - // check if need to interpolate after last datablock - // except for fill(next), fill(linear) - while (pSliceInfo->current <= pSliceInfo->win.ekey && pSliceInfo->fillType != TSDB_FILL_NEXT && - pSliceInfo->fillType != TSDB_FILL_LINEAR) { - genInterpolationResult(pSliceInfo, &pOperator->exprSupp, pResBlock, false); - pSliceInfo->current = - taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); - } - - doFilter(pResBlock, pOperator->exprSupp.pFilterInfo, NULL); - // restore the value setTaskStatus(pOperator->pTaskInfo, TASK_COMPLETED); if (pResBlock->info.rows == 0) { @@ -614,6 +841,11 @@ SOperatorInfo* createTimeSliceOperatorInfo(SOperatorInfo* downstream, SPhysiNode pInfo->win = pInterpPhyNode->timeRange; pInfo->interval.interval = pInterpPhyNode->interval; pInfo->current = pInfo->win.skey; + pInfo->prevTsSet = false; + pInfo->prevTs = 0; + pInfo->groupId = 0; + pInfo->pPrevGroupKey = NULL; + pInfo->pNextGroupRes = NULL; if (downstream->operatorType == QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN) { STableScanInfo* pScanInfo = (STableScanInfo*)downstream->info; @@ -661,6 +893,10 @@ void destroyTimeSliceOperatorInfo(void* param) { taosMemoryFree(pKey->end.val); } taosArrayDestroy(pInfo->pLinearInfo); + + taosMemoryFree(pInfo->pPrevGroupKey->pData); + taosMemoryFree(pInfo->pPrevGroupKey); + cleanupExprSupp(&pInfo->scalarSup); for (int32_t i = 0; i < pInfo->pFillColInfo->numOfFillExpr; ++i) { diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 0ec757d6cc..136d1fc391 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -261,6 +261,14 @@ const char* nodesNodeName(ENodeType type) { return "DeleteStmt"; case QUERY_NODE_INSERT_STMT: return "InsertStmt"; + case QUERY_NODE_RESTORE_DNODE_STMT: + return "RestoreDnodeStmt"; + case QUERY_NODE_RESTORE_QNODE_STMT: + return "RestoreQnodeStmt"; + case QUERY_NODE_RESTORE_MNODE_STMT: + return "RestoreMnodeStmt"; + case QUERY_NODE_RESTORE_VNODE_STMT: + return "RestoreVnodeStmt"; case QUERY_NODE_LOGIC_PLAN_SCAN: return "LogicScan"; case QUERY_NODE_LOGIC_PLAN_JOIN: @@ -5537,6 +5545,35 @@ static int32_t jsonToDropDnodeStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkRestoreComponentNodeStmtDnodeId = "DnodeId"; + +static int32_t restoreComponentNodeStmtToJson(const void* pObj, SJson* pJson) { + const SRestoreComponentNodeStmt* pNode = (const SRestoreComponentNodeStmt*)pObj; + return tjsonAddIntegerToObject(pJson, jkRestoreComponentNodeStmtDnodeId, pNode->dnodeId); +} + +static int32_t jsonToRestoreComponentNodeStmt(const SJson* pJson, void* pObj) { + SRestoreComponentNodeStmt* pNode = (SRestoreComponentNodeStmt*)pObj; + return tjsonGetIntValue(pJson, jkRestoreComponentNodeStmtDnodeId, &pNode->dnodeId); +} + +static int32_t jsonToRestoreDnodeStmt(const SJson* pJson, void* pObj) { + return jsonToRestoreComponentNodeStmt(pJson, pObj); +} +static int32_t jsonToRestoreQnodeStmt(const SJson* pJson, void* pObj) { + return jsonToRestoreComponentNodeStmt(pJson, pObj); +} +static int32_t jsonToRestoreMnodeStmt(const SJson* pJson, void* pObj) { + return jsonToRestoreComponentNodeStmt(pJson, pObj); +} +static int32_t jsonToRestoreVnodeStmt(const SJson* pJson, void* pObj) { + return jsonToRestoreComponentNodeStmt(pJson, pObj); +} + + + + + static const char* jkCreateTopicStmtTopicName = "TopicName"; static const char* jkCreateTopicStmtSubscribeDbName = "SubscribeDbName"; static const char* jkCreateTopicStmtIgnoreExists = "IgnoreExists"; @@ -6824,6 +6861,14 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToDeleteStmt(pJson, pObj); case QUERY_NODE_INSERT_STMT: return jsonToInsertStmt(pJson, pObj); + case QUERY_NODE_RESTORE_DNODE_STMT: + return jsonToRestoreDnodeStmt(pJson, pObj); + case QUERY_NODE_RESTORE_QNODE_STMT: + return jsonToRestoreQnodeStmt(pJson, pObj); + case QUERY_NODE_RESTORE_MNODE_STMT: + return jsonToRestoreMnodeStmt(pJson, pObj); + case QUERY_NODE_RESTORE_VNODE_STMT: + return jsonToRestoreVnodeStmt(pJson, pObj); case QUERY_NODE_LOGIC_PLAN_SCAN: return jsonToLogicScanNode(pJson, pObj); case QUERY_NODE_LOGIC_PLAN_JOIN: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 1f79616465..13c5a34084 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -459,6 +459,11 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SInsertStmt)); case QUERY_NODE_QUERY: return makeNode(type, sizeof(SQuery)); + case QUERY_NODE_RESTORE_DNODE_STMT: + case QUERY_NODE_RESTORE_QNODE_STMT: + case QUERY_NODE_RESTORE_MNODE_STMT: + case QUERY_NODE_RESTORE_VNODE_STMT: + return makeNode(type, sizeof(SRestoreComponentNodeStmt)); case QUERY_NODE_LOGIC_PLAN_SCAN: return makeNode(type, sizeof(SScanLogicNode)); case QUERY_NODE_LOGIC_PLAN_JOIN: @@ -1058,6 +1063,11 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode(pQuery->pPrepareRoot); break; } + case QUERY_NODE_RESTORE_DNODE_STMT: // no pointer field + case QUERY_NODE_RESTORE_QNODE_STMT: // no pointer field + case QUERY_NODE_RESTORE_MNODE_STMT: // no pointer field + case QUERY_NODE_RESTORE_VNODE_STMT: // no pointer field + break; case QUERY_NODE_LOGIC_PLAN_SCAN: { SScanLogicNode* pLogicNode = (SScanLogicNode*)pNode; destroyLogicNode((SLogicNode*)pLogicNode); diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 8f18797c83..1d1a522d01 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -202,6 +202,7 @@ SNode* createIndexOption(SAstCreateContext* pCxt, SNodeList* pFuncs, SNode* pInt SNode* createDropIndexStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SNode* pIndexName); SNode* createCreateComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, const SToken* pDnodeId); SNode* createDropComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, const SToken* pDnodeId); +SNode* createRestoreComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, const SToken* pDnodeId); SNode* createCreateTopicStmtUseQuery(SAstCreateContext* pCxt, bool ignoreExists, SToken* pTopicName, SNode* pQuery); SNode* createCreateTopicStmtUseDb(SAstCreateContext* pCxt, bool ignoreExists, SToken* pTopicName, SToken* pSubDbName, bool withMeta); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index e69fdf40d1..b682cdd4fd 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -123,7 +123,7 @@ priv_level(A) ::= topic_name(B). with_opt(A) ::= . { A = NULL; } with_opt(A) ::= WITH search_condition(B). { A = B; } -/************************************************ create/drop/alter dnode *********************************************/ +/************************************************ create/drop/alter/restore dnode *********************************************/ cmd ::= CREATE DNODE dnode_endpoint(A). { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &A, NULL); } cmd ::= CREATE DNODE dnode_endpoint(A) PORT NK_INTEGER(B). { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &A, &B); } cmd ::= DROP DNODE NK_INTEGER(A) force_opt(B). { pCxt->pRootNode = createDropDnodeStmt(pCxt, &A, B); } @@ -132,6 +132,7 @@ cmd ::= ALTER DNODE NK_INTEGER(A) NK_STRING(B). cmd ::= ALTER DNODE NK_INTEGER(A) NK_STRING(B) NK_STRING(C). { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &A, &B, &C); } cmd ::= ALTER ALL DNODES NK_STRING(A). { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &A, NULL); } cmd ::= ALTER ALL DNODES NK_STRING(A) NK_STRING(B). { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &A, &B); } +cmd ::= RESTORE DNODE NK_INTEGER(A). { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &A); } %type dnode_endpoint { SToken } %destructor dnode_endpoint { } @@ -148,9 +149,10 @@ force_opt(A) ::= FORCE. cmd ::= ALTER LOCAL NK_STRING(A). { pCxt->pRootNode = createAlterLocalStmt(pCxt, &A, NULL); } cmd ::= ALTER LOCAL NK_STRING(A) NK_STRING(B). { pCxt->pRootNode = createAlterLocalStmt(pCxt, &A, &B); } -/************************************************ create/drop qnode ***************************************************/ +/************************************************ create/drop/restore qnode ***************************************************/ cmd ::= CREATE QNODE ON DNODE NK_INTEGER(A). { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &A); } cmd ::= DROP QNODE ON DNODE NK_INTEGER(A). { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &A); } +cmd ::= RESTORE QNODE ON DNODE NK_INTEGER(A). { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &A); } /************************************************ create/drop bnode ***************************************************/ cmd ::= CREATE BNODE ON DNODE NK_INTEGER(A). { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &A); } @@ -160,9 +162,13 @@ cmd ::= DROP BNODE ON DNODE NK_INTEGER(A). cmd ::= CREATE SNODE ON DNODE NK_INTEGER(A). { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &A); } cmd ::= DROP SNODE ON DNODE NK_INTEGER(A). { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &A); } -/************************************************ create/drop mnode ***************************************************/ +/************************************************ create/drop/restore mnode ***************************************************/ cmd ::= CREATE MNODE ON DNODE NK_INTEGER(A). { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &A); } cmd ::= DROP MNODE ON DNODE NK_INTEGER(A). { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &A); } +cmd ::= RESTORE MNODE ON DNODE NK_INTEGER(A). { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &A); } + +/************************************************ restore vnode ***************************************************/ +cmd ::= RESTORE VNODE ON DNODE NK_INTEGER(A). { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &A); } /************************************************ create/drop/use database ********************************************/ cmd ::= CREATE DATABASE not_exists_opt(A) db_name(B) db_options(C). { pCxt->pRootNode = createCreateDatabaseStmt(pCxt, A, &B, C); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 02af95a10c..eeccf18c7b 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1674,6 +1674,14 @@ SNode* createDropComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, cons return (SNode*)pStmt; } +SNode* createRestoreComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, const SToken* pDnodeId) { + CHECK_PARSER_STATUS(pCxt); + SRestoreComponentNodeStmt* pStmt = (SRestoreComponentNodeStmt*)nodesMakeNode(type); + CHECK_OUT_OF_MEM(pStmt); + pStmt->dnodeId = taosStr2Int32(pDnodeId->z, NULL, 10); + return (SNode*)pStmt; +} + SNode* createCreateTopicStmtUseQuery(SAstCreateContext* pCxt, bool ignoreExists, SToken* pTopicName, SNode* pQuery) { CHECK_PARSER_STATUS(pCxt); if (!checkTopicName(pCxt, pTopicName)) { diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index b2b2d99d38..5c1f4bf98c 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -183,6 +183,7 @@ static SKeyword keywordTable[] = { {"REPLICA", TK_REPLICA}, {"RESET", TK_RESET}, {"RESUME", TK_RESUME}, + {"RESTORE", TK_RESTORE}, {"RETENTIONS", TK_RETENTIONS}, {"REVOKE", TK_REVOKE}, {"ROLLUP", TK_ROLLUP}, @@ -255,6 +256,7 @@ static SKeyword keywordTable[] = { {"VERBOSE", TK_VERBOSE}, {"VGROUP", TK_VGROUP}, {"VGROUPS", TK_VGROUPS}, + {"VNODE", TK_VNODE}, {"VNODES", TK_VNODES}, {"WAL_FSYNC_PERIOD", TK_WAL_FSYNC_PERIOD}, {"WAL_LEVEL", TK_WAL_LEVEL}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 529a063538..c5fe3a1f73 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -1523,9 +1523,7 @@ static int32_t translateInterpFunc(STranslateContext* pCxt, SFunctionNode* pFunc SSelectStmt* pSelect = (SSelectStmt*)pCxt->pCurrStmt; SNode* pTable = pSelect->pFromTable; - if ((NULL != pTable && (QUERY_NODE_REAL_TABLE != nodeType(pTable) || - (TSDB_CHILD_TABLE != ((SRealTableNode*)pTable)->pMeta->tableType && - TSDB_NORMAL_TABLE != ((SRealTableNode*)pTable)->pMeta->tableType)))) { + if ((NULL != pTable && QUERY_NODE_REAL_TABLE != nodeType(pTable))) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_ONLY_SUPPORT_SINGLE_TABLE, "%s is only supported in single table query", pFunc->functionName); } @@ -5532,6 +5530,29 @@ static int32_t translateAlterDnode(STranslateContext* pCxt, SAlterDnodeStmt* pSt return buildCmdMsg(pCxt, TDMT_MND_CONFIG_DNODE, (FSerializeFunc)tSerializeSMCfgDnodeReq, &cfgReq); } +static int32_t translateRestoreDnode(STranslateContext* pCxt, SRestoreComponentNodeStmt* pStmt) { + SRestoreDnodeReq restoreReq = {0}; + restoreReq.dnodeId = pStmt->dnodeId; + switch (nodeType((SNode*)pStmt)) { + case QUERY_NODE_RESTORE_DNODE_STMT: + restoreReq.restoreType = RESTORE_TYPE__ALL; + break; + case QUERY_NODE_RESTORE_QNODE_STMT: + restoreReq.restoreType = RESTORE_TYPE__QNODE; + break; + case QUERY_NODE_RESTORE_MNODE_STMT: + restoreReq.restoreType = RESTORE_TYPE__MNODE; + break; + case QUERY_NODE_RESTORE_VNODE_STMT: + restoreReq.restoreType = RESTORE_TYPE__VNODE; + break; + default: + return -1; + } + return buildCmdMsg(pCxt, TDMT_MND_RESTORE_DNODE, (FSerializeFunc)tSerializeSRestoreDnodeReq, &restoreReq); +} + + static int32_t getSmaIndexDstVgId(STranslateContext* pCxt, const char* pDbName, const char* pTableName, int32_t* pVgId) { SVgroupInfo vg = {0}; @@ -7094,6 +7115,12 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) { case QUERY_NODE_SHOW_CREATE_STABLE_STMT: code = translateShowCreateTable(pCxt, (SShowCreateTableStmt*)pNode); break; + case QUERY_NODE_RESTORE_DNODE_STMT: + case QUERY_NODE_RESTORE_QNODE_STMT: + case QUERY_NODE_RESTORE_MNODE_STMT: + case QUERY_NODE_RESTORE_VNODE_STMT: + code = translateRestoreDnode(pCxt, (SRestoreComponentNodeStmt*)pNode); + break; default: break; } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index c46dd65804..bb0b040035 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -25,6 +25,7 @@ #include #include /************ Begin %include sections from the grammar ************************/ +#line 11 "sql.y" #include #include @@ -41,6 +42,7 @@ #include "parAst.h" #define YYSTACKDEPTH 0 +#line 46 "sql.c" /**************** End of %include directives **********************************/ /* These constants specify the various numeric values for terminal symbols ** in a format understandable to "makeheaders". This section is blank unless @@ -104,27 +106,27 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 480 +#define YYNOCODE 482 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - STokenPair yy57; - EFillMode yy294; - EOperatorType yy380; - ENullOrder yy457; - int8_t yy503; - EOrder yy578; - int32_t yy580; - SAlterOption yy605; - SNodeList* yy664; - int64_t yy669; - SDataType yy784; - EJoinType yy852; - bool yy857; - SNode* yy872; - SToken yy929; + SNodeList* yy72; + SNode* yy164; + EJoinType yy196; + bool yy441; + EFillMode yy446; + SToken yy497; + ENullOrder yy517; + EOrder yy550; + int32_t yy560; + int8_t yy563; + int64_t yy693; + SDataType yy700; + SAlterOption yy761; + EOperatorType yy796; + STokenPair yy953; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -140,17 +142,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 772 -#define YYNRULE 587 -#define YYNTOKEN 333 -#define YY_MAX_SHIFT 771 -#define YY_MIN_SHIFTREDUCE 1147 -#define YY_MAX_SHIFTREDUCE 1733 -#define YY_ERROR_ACTION 1734 -#define YY_ACCEPT_ACTION 1735 -#define YY_NO_ACTION 1736 -#define YY_MIN_REDUCE 1737 -#define YY_MAX_REDUCE 2323 +#define YYNSTATE 787 +#define YYNRULE 591 +#define YYNRULE_WITH_ACTION 591 +#define YYNTOKEN 335 +#define YY_MAX_SHIFT 786 +#define YY_MIN_SHIFTREDUCE 1162 +#define YY_MAX_SHIFTREDUCE 1752 +#define YY_ERROR_ACTION 1753 +#define YY_ACCEPT_ACTION 1754 +#define YY_NO_ACTION 1755 +#define YY_MIN_REDUCE 1756 +#define YY_MAX_REDUCE 2346 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -217,816 +220,842 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (3028) +#define YY_ACTTAB_COUNT (2980) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 2135, 2025, 511, 2004, 403, 512, 1773, 1952, 1954, 1896, - /* 10 */ 682, 2025, 48, 46, 1661, 1738, 2023, 652, 34, 168, - /* 20 */ 398, 1749, 1510, 391, 41, 40, 2022, 652, 47, 45, - /* 30 */ 44, 43, 42, 1591, 1806, 1508, 123, 2153, 1535, 122, - /* 40 */ 121, 120, 119, 118, 117, 116, 115, 114, 199, 2103, - /* 50 */ 392, 681, 1202, 1202, 1201, 1201, 41, 40, 165, 1586, - /* 60 */ 47, 45, 44, 43, 42, 19, 1909, 233, 1538, 1735, - /* 70 */ 528, 123, 1516, 2238, 122, 121, 120, 119, 118, 117, - /* 80 */ 116, 115, 114, 2134, 1203, 1203, 2170, 665, 1907, 169, - /* 90 */ 2136, 685, 2138, 2139, 680, 66, 675, 768, 664, 2235, - /* 100 */ 15, 745, 744, 743, 742, 410, 191, 741, 740, 144, - /* 110 */ 735, 734, 733, 732, 731, 730, 729, 157, 725, 724, - /* 120 */ 723, 409, 408, 720, 719, 718, 175, 174, 203, 604, - /* 130 */ 2260, 519, 1331, 182, 512, 1773, 1593, 1594, 665, 1907, - /* 140 */ 413, 1536, 444, 62, 412, 1946, 443, 1322, 707, 706, - /* 150 */ 705, 1326, 704, 1328, 1329, 703, 700, 133, 1337, 697, - /* 160 */ 1339, 1340, 694, 691, 549, 1535, 1566, 1576, 84, 664, - /* 170 */ 1959, 83, 1592, 1595, 650, 41, 40, 363, 51, 47, - /* 180 */ 45, 44, 43, 42, 101, 1957, 1511, 603, 1509, 603, - /* 190 */ 2294, 62, 2294, 294, 295, 41, 40, 623, 293, 47, - /* 200 */ 45, 44, 43, 42, 1286, 2300, 186, 2300, 186, 1900, - /* 210 */ 2295, 629, 2295, 629, 640, 140, 262, 1285, 1514, 1515, - /* 220 */ 664, 1565, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, - /* 230 */ 677, 673, 1584, 1585, 1587, 1588, 1589, 1590, 2, 48, - /* 240 */ 46, 1989, 665, 1907, 348, 1622, 1533, 398, 628, 1510, - /* 250 */ 450, 2294, 357, 481, 665, 1907, 495, 1365, 1366, 494, - /* 260 */ 1591, 133, 1508, 717, 2135, 234, 627, 186, 554, 2113, - /* 270 */ 622, 2295, 629, 57, 679, 464, 516, 496, 1737, 497, - /* 280 */ 466, 172, 513, 1898, 38, 303, 1586, 545, 541, 537, - /* 290 */ 533, 231, 19, 2117, 345, 1534, 1620, 2153, 189, 1516, - /* 300 */ 51, 2153, 132, 131, 130, 129, 128, 127, 126, 125, - /* 310 */ 124, 1420, 1421, 2103, 432, 681, 282, 2231, 639, 590, - /* 320 */ 134, 638, 35, 2294, 768, 366, 1180, 15, 52, 1188, - /* 330 */ 2119, 88, 1627, 189, 229, 1534, 1510, 454, 627, 186, - /* 340 */ 675, 434, 430, 2295, 629, 1730, 189, 2134, 1537, 1508, - /* 350 */ 2170, 621, 1621, 339, 2136, 685, 2138, 2139, 680, 678, - /* 360 */ 675, 666, 2188, 1593, 1594, 1182, 492, 1185, 1186, 486, - /* 370 */ 485, 484, 483, 480, 479, 478, 477, 476, 472, 471, - /* 380 */ 470, 469, 347, 461, 460, 459, 1516, 456, 455, 364, - /* 390 */ 44, 43, 42, 1566, 1576, 1760, 468, 2299, 166, 1592, - /* 400 */ 1595, 228, 222, 323, 628, 467, 227, 2294, 524, 640, - /* 410 */ 140, 768, 249, 1511, 1537, 1509, 248, 321, 73, 563, - /* 420 */ 562, 72, 627, 186, 1953, 1954, 220, 2295, 629, 37, - /* 430 */ 396, 1615, 1616, 1617, 1618, 1619, 1623, 1624, 1625, 1626, - /* 440 */ 214, 507, 505, 502, 2103, 1514, 1515, 1729, 1565, 1568, - /* 450 */ 1569, 1570, 1571, 1572, 1573, 1574, 1575, 677, 673, 1584, - /* 460 */ 1585, 1587, 1588, 1589, 1590, 2, 12, 48, 46, 47, - /* 470 */ 45, 44, 43, 42, 1535, 398, 90, 1510, 1290, 352, - /* 480 */ 62, 2238, 377, 189, 583, 567, 566, 565, 1591, 2135, - /* 490 */ 1508, 1289, 557, 137, 561, 1723, 284, 1689, 560, 682, - /* 500 */ 1511, 62, 1509, 559, 564, 373, 372, 2234, 179, 558, - /* 510 */ 642, 184, 2231, 2232, 1586, 138, 2236, 216, 109, 1759, - /* 520 */ 19, 514, 167, 1780, 665, 1907, 2153, 1516, 365, 2008, - /* 530 */ 1848, 218, 1514, 1515, 618, 514, 2124, 1780, 2103, 12, - /* 540 */ 681, 10, 2113, 448, 615, 614, 1687, 1688, 1690, 1691, - /* 550 */ 1692, 602, 768, 499, 62, 15, 2122, 401, 81, 80, - /* 560 */ 447, 2135, 284, 198, 2004, 165, 2117, 646, 2103, 12, - /* 570 */ 250, 682, 2134, 1909, 1275, 2170, 439, 437, 170, 2136, - /* 580 */ 685, 2138, 2139, 680, 2068, 675, 442, 346, 441, 2126, - /* 590 */ 428, 1593, 1594, 426, 422, 418, 415, 440, 2153, 142, - /* 600 */ 41, 40, 2194, 2119, 47, 45, 44, 43, 42, 201, - /* 610 */ 2103, 1277, 681, 675, 603, 665, 1907, 2294, 440, 651, - /* 620 */ 1516, 1566, 1576, 624, 619, 612, 1758, 1592, 1595, 630, - /* 630 */ 2315, 251, 2300, 186, 449, 189, 30, 2295, 629, 1481, - /* 640 */ 1482, 1511, 1884, 1509, 2134, 1809, 581, 2170, 665, 1907, - /* 650 */ 110, 2136, 685, 2138, 2139, 680, 189, 675, 2096, 579, - /* 660 */ 143, 577, 150, 2194, 2223, 739, 737, 458, 394, 2219, - /* 670 */ 526, 55, 2018, 1514, 1515, 2103, 1565, 1568, 1569, 1570, - /* 680 */ 1571, 1572, 1573, 1574, 1575, 677, 673, 1584, 1585, 1587, - /* 690 */ 1588, 1589, 1590, 2, 48, 46, 1596, 665, 1907, 651, - /* 700 */ 2135, 1232, 398, 2299, 1510, 603, 2294, 1757, 2294, 189, - /* 710 */ 643, 1756, 567, 566, 565, 1591, 644, 1508, 1755, 557, - /* 720 */ 137, 561, 2298, 2300, 186, 560, 2295, 2297, 2295, 629, - /* 730 */ 559, 564, 373, 372, 665, 1907, 558, 2153, 1233, 41, - /* 740 */ 40, 1586, 1665, 47, 45, 44, 43, 42, 1535, 2103, - /* 750 */ 649, 681, 2018, 473, 1516, 667, 2103, 2195, 41, 40, - /* 760 */ 2103, 632, 47, 45, 44, 43, 42, 2103, 665, 1907, - /* 770 */ 285, 715, 155, 154, 712, 711, 710, 152, 1601, 768, - /* 780 */ 665, 1907, 49, 2134, 1535, 179, 2170, 474, 2135, 110, - /* 790 */ 2136, 685, 2138, 2139, 680, 572, 675, 708, 682, 527, - /* 800 */ 1782, 183, 1959, 2223, 407, 406, 2009, 394, 2219, 378, - /* 810 */ 582, 62, 2299, 93, 1538, 2294, 2238, 1957, 1593, 1594, - /* 820 */ 188, 1882, 665, 1907, 247, 2153, 709, 1517, 2249, 1950, - /* 830 */ 727, 2298, 1700, 640, 140, 2295, 2296, 2103, 1883, 681, - /* 840 */ 575, 1904, 2233, 87, 1892, 569, 1959, 87, 1566, 1576, - /* 850 */ 246, 1677, 36, 388, 1592, 1595, 665, 1907, 41, 40, - /* 860 */ 367, 1957, 47, 45, 44, 43, 42, 2086, 1511, 1902, - /* 870 */ 1509, 2134, 651, 1903, 2170, 252, 1538, 110, 2136, 685, - /* 880 */ 2138, 2139, 680, 1754, 675, 259, 640, 140, 2004, 2314, - /* 890 */ 70, 2223, 1753, 69, 1567, 394, 2219, 14, 13, 2097, - /* 900 */ 1514, 1515, 717, 1565, 1568, 1569, 1570, 1571, 1572, 1573, - /* 910 */ 1574, 1575, 677, 673, 1584, 1585, 1587, 1588, 1589, 1590, - /* 920 */ 2, 48, 46, 660, 2135, 2018, 665, 1907, 1959, 398, - /* 930 */ 1567, 1510, 2103, 205, 643, 185, 2231, 2232, 1752, 138, - /* 940 */ 2236, 2103, 1591, 1958, 1508, 599, 603, 2135, 2298, 2294, - /* 950 */ 715, 155, 154, 712, 711, 710, 152, 682, 669, 2257, - /* 960 */ 2195, 2153, 200, 401, 2300, 186, 189, 1658, 1586, 2295, - /* 970 */ 629, 162, 1751, 2103, 107, 681, 665, 1907, 379, 1909, - /* 980 */ 1520, 1516, 665, 1907, 2153, 9, 1957, 2103, 187, 2231, - /* 990 */ 2232, 141, 138, 2236, 633, 648, 2103, 1634, 681, 1899, - /* 1000 */ 1748, 298, 370, 404, 665, 1907, 768, 2134, 553, 49, - /* 1010 */ 2170, 165, 552, 110, 2136, 685, 2138, 2139, 680, 1909, - /* 1020 */ 675, 2103, 588, 662, 261, 183, 1894, 2223, 1747, 488, - /* 1030 */ 2134, 394, 2219, 2170, 1536, 1890, 110, 2136, 685, 2138, - /* 1040 */ 2139, 680, 2113, 675, 713, 1593, 1594, 1950, 2314, 2103, - /* 1050 */ 2223, 1746, 2250, 635, 394, 2219, 2121, 41, 40, 665, - /* 1060 */ 1907, 47, 45, 44, 43, 42, 2117, 1911, 371, 603, - /* 1070 */ 369, 368, 2294, 551, 2135, 1566, 1576, 2103, 663, 427, - /* 1080 */ 1745, 1592, 1595, 165, 682, 1535, 2270, 2300, 186, 207, - /* 1090 */ 206, 1910, 2295, 629, 553, 1511, 317, 1509, 552, 1936, - /* 1100 */ 2103, 41, 40, 2119, 395, 47, 45, 44, 43, 42, - /* 1110 */ 1744, 2153, 487, 675, 715, 155, 154, 712, 711, 710, - /* 1120 */ 152, 728, 256, 2103, 1869, 681, 676, 1514, 1515, 2103, - /* 1130 */ 1565, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 677, - /* 1140 */ 673, 1584, 1585, 1587, 1588, 1589, 1590, 2, 48, 46, - /* 1150 */ 1437, 1438, 714, 1185, 1186, 1950, 398, 2134, 1510, 2103, - /* 1160 */ 2170, 1743, 2135, 110, 2136, 685, 2138, 2139, 680, 1591, - /* 1170 */ 675, 1508, 682, 1959, 610, 2314, 1742, 2223, 665, 1907, - /* 1180 */ 393, 394, 2219, 1959, 153, 1741, 1436, 1439, 1957, 1740, - /* 1190 */ 402, 2135, 2243, 1654, 54, 1586, 3, 304, 1957, 2153, - /* 1200 */ 1654, 682, 451, 2288, 665, 1907, 1885, 146, 1516, 135, - /* 1210 */ 2103, 2103, 2089, 681, 585, 452, 584, 164, 74, 1657, - /* 1220 */ 631, 239, 555, 405, 237, 2103, 241, 556, 2153, 240, - /* 1230 */ 1849, 1567, 243, 768, 2103, 242, 15, 1796, 2103, 672, - /* 1240 */ 2103, 56, 681, 245, 1273, 2134, 244, 153, 2170, 1271, - /* 1250 */ 148, 110, 2136, 685, 2138, 2139, 680, 1789, 675, 568, - /* 1260 */ 1519, 420, 1783, 2314, 1787, 2223, 153, 82, 50, 394, - /* 1270 */ 2219, 50, 1593, 1594, 2134, 260, 266, 2170, 153, 570, - /* 1280 */ 110, 2136, 685, 2138, 2139, 680, 573, 675, 636, 1732, - /* 1290 */ 1733, 50, 2314, 1518, 2223, 291, 407, 406, 394, 2219, - /* 1300 */ 14, 13, 1566, 1576, 1476, 106, 1524, 1750, 1592, 1595, - /* 1310 */ 2263, 616, 763, 279, 1847, 103, 721, 1591, 91, 1517, - /* 1320 */ 71, 151, 1511, 1479, 1509, 1686, 153, 64, 1685, 50, - /* 1330 */ 232, 50, 689, 268, 151, 647, 153, 136, 1251, 151, - /* 1340 */ 1846, 273, 2154, 1586, 411, 2013, 1774, 1779, 1434, 2253, - /* 1350 */ 1947, 641, 296, 281, 1514, 1515, 1516, 1565, 1568, 1569, - /* 1360 */ 1570, 1571, 1572, 1573, 1574, 1575, 677, 673, 1584, 1585, - /* 1370 */ 1587, 1588, 1589, 1590, 2, 2135, 722, 657, 300, 278, - /* 1380 */ 1, 671, 5, 1316, 1628, 682, 1577, 2242, 316, 1343, - /* 1390 */ 419, 1347, 1612, 1354, 1352, 414, 156, 361, 1249, 1541, - /* 1400 */ 436, 435, 193, 194, 438, 196, 311, 1457, 204, 453, - /* 1410 */ 1538, 2014, 2153, 1522, 457, 490, 462, 1533, 475, 2006, - /* 1420 */ 482, 489, 491, 500, 2103, 501, 681, 498, 208, 209, - /* 1430 */ 503, 504, 211, 506, 508, 1539, 509, 4, 510, 517, - /* 1440 */ 520, 518, 1536, 219, 521, 221, 1521, 1540, 1542, 522, - /* 1450 */ 523, 525, 1205, 224, 548, 529, 226, 587, 2134, 85, - /* 1460 */ 2077, 2170, 86, 546, 110, 2136, 685, 2138, 2139, 680, - /* 1470 */ 1525, 675, 1520, 230, 2135, 112, 2314, 547, 2223, 351, - /* 1480 */ 2074, 589, 394, 2219, 682, 550, 149, 1897, 236, 593, - /* 1490 */ 2073, 1893, 238, 89, 158, 312, 159, 2135, 253, 1895, - /* 1500 */ 592, 257, 1528, 1530, 1891, 160, 161, 682, 1464, 594, - /* 1510 */ 617, 2153, 600, 2269, 2268, 673, 1584, 1585, 1587, 1588, - /* 1520 */ 1589, 1590, 255, 2103, 597, 681, 655, 607, 8, 2254, - /* 1530 */ 2264, 613, 2245, 383, 2153, 626, 620, 173, 274, 598, - /* 1540 */ 272, 608, 606, 264, 267, 277, 2103, 605, 681, 275, - /* 1550 */ 637, 276, 384, 139, 2293, 634, 1654, 2134, 280, 2317, - /* 1560 */ 2170, 1537, 645, 110, 2136, 685, 2138, 2139, 680, 2239, - /* 1570 */ 675, 286, 96, 387, 1543, 2198, 2019, 2223, 653, 313, - /* 1580 */ 2134, 394, 2219, 2170, 654, 2135, 110, 2136, 685, 2138, - /* 1590 */ 2139, 680, 314, 675, 658, 682, 2033, 591, 2196, 659, - /* 1600 */ 2223, 61, 315, 2032, 394, 2219, 98, 1908, 2204, 102, - /* 1610 */ 100, 2135, 687, 2031, 390, 771, 1951, 1870, 318, 307, - /* 1620 */ 764, 682, 2153, 2095, 342, 765, 53, 327, 2094, 310, - /* 1630 */ 320, 353, 767, 341, 2103, 322, 681, 354, 2093, 78, - /* 1640 */ 2090, 331, 416, 417, 1501, 178, 1502, 192, 2153, 421, - /* 1650 */ 2088, 761, 757, 753, 749, 308, 423, 424, 425, 2135, - /* 1660 */ 2103, 362, 681, 2087, 2085, 429, 2084, 431, 2134, 682, - /* 1670 */ 2083, 2170, 433, 1492, 110, 2136, 685, 2138, 2139, 680, - /* 1680 */ 2064, 675, 195, 2063, 197, 1460, 668, 79, 2223, 1459, - /* 1690 */ 2045, 2044, 394, 2219, 2134, 108, 2153, 2170, 301, 2043, - /* 1700 */ 111, 2136, 685, 2138, 2139, 680, 445, 675, 2103, 446, - /* 1710 */ 681, 2042, 2041, 1997, 2223, 1411, 1996, 1994, 2222, 2219, - /* 1720 */ 145, 1993, 2135, 1992, 1995, 1991, 1990, 1988, 1987, 1986, - /* 1730 */ 661, 202, 682, 463, 1985, 465, 1999, 1984, 1983, 1982, - /* 1740 */ 1981, 1980, 2134, 1979, 1978, 2170, 1977, 1976, 111, 2136, - /* 1750 */ 685, 2138, 2139, 680, 1975, 675, 1974, 1973, 1972, 2153, - /* 1760 */ 1971, 1970, 2223, 493, 147, 288, 670, 2219, 1969, 1968, - /* 1770 */ 287, 2103, 1967, 681, 1998, 1966, 1965, 1413, 1964, 1963, - /* 1780 */ 1962, 1961, 1960, 349, 1287, 1812, 1291, 1283, 1811, 210, - /* 1790 */ 254, 212, 1810, 350, 1808, 1769, 2123, 180, 76, 1768, - /* 1800 */ 1187, 213, 2062, 2052, 77, 683, 217, 2135, 2170, 215, - /* 1810 */ 2040, 111, 2136, 685, 2138, 2139, 680, 682, 675, 225, - /* 1820 */ 181, 2039, 223, 2017, 515, 2223, 530, 1803, 534, 356, - /* 1830 */ 2219, 1886, 1807, 1805, 1801, 532, 1225, 536, 531, 535, - /* 1840 */ 2135, 538, 1799, 540, 2153, 1786, 539, 542, 544, 543, - /* 1850 */ 682, 1785, 1765, 1888, 1359, 1887, 2103, 63, 681, 1358, - /* 1860 */ 1274, 736, 738, 1272, 1270, 1269, 1797, 1790, 1261, 1788, - /* 1870 */ 1268, 2135, 374, 1267, 1266, 1263, 375, 2153, 235, 1262, - /* 1880 */ 376, 682, 1260, 574, 1764, 1763, 1762, 571, 113, 2103, - /* 1890 */ 2134, 681, 576, 2170, 578, 580, 111, 2136, 685, 2138, - /* 1900 */ 2139, 680, 2135, 675, 2061, 1486, 1488, 1485, 2153, 1490, - /* 1910 */ 2223, 29, 682, 381, 67, 2220, 1466, 1468, 58, 2051, - /* 1920 */ 2103, 595, 681, 2134, 1470, 2038, 2170, 2036, 17, 169, - /* 1930 */ 2136, 685, 2138, 2139, 680, 2135, 675, 2299, 20, 2153, - /* 1940 */ 163, 6, 65, 31, 382, 682, 7, 21, 271, 22, - /* 1950 */ 1702, 2103, 596, 681, 2134, 380, 263, 2170, 609, 611, - /* 1960 */ 340, 2136, 685, 2138, 2139, 680, 265, 675, 270, 2124, - /* 1970 */ 2261, 258, 2153, 33, 23, 1684, 171, 269, 32, 92, - /* 1980 */ 601, 1676, 24, 1722, 2103, 2134, 681, 1717, 2170, 1723, - /* 1990 */ 1716, 340, 2136, 685, 2138, 2139, 680, 2135, 675, 385, - /* 2000 */ 1721, 1720, 386, 1651, 283, 176, 60, 682, 1650, 2037, - /* 2010 */ 2035, 2034, 2135, 2016, 94, 95, 289, 25, 2134, 290, - /* 2020 */ 292, 2170, 682, 297, 333, 2136, 685, 2138, 2139, 680, - /* 2030 */ 68, 675, 1682, 2135, 2153, 656, 2015, 97, 103, 302, - /* 2040 */ 99, 26, 1603, 679, 299, 1602, 2103, 13, 681, 2153, - /* 2050 */ 1526, 2173, 177, 11, 389, 1581, 674, 1558, 688, 190, - /* 2060 */ 1579, 2103, 400, 681, 1578, 692, 18, 625, 59, 1550, - /* 2070 */ 2153, 39, 16, 27, 28, 695, 1344, 690, 693, 1613, - /* 2080 */ 2134, 686, 2103, 2170, 681, 1341, 170, 2136, 685, 2138, - /* 2090 */ 2139, 680, 1338, 675, 696, 2134, 1332, 698, 2170, 2135, - /* 2100 */ 699, 340, 2136, 685, 2138, 2139, 680, 684, 675, 682, - /* 2110 */ 701, 1336, 1335, 305, 1353, 1330, 2134, 702, 1334, 2170, - /* 2120 */ 104, 1333, 339, 2136, 685, 2138, 2139, 680, 1349, 675, - /* 2130 */ 1223, 2189, 105, 75, 1255, 716, 2153, 1254, 2316, 1253, - /* 2140 */ 1252, 397, 726, 1250, 1248, 1247, 1246, 306, 2103, 1281, - /* 2150 */ 681, 1244, 1243, 1242, 1241, 1240, 1239, 1238, 1278, 1276, - /* 2160 */ 1235, 1234, 2135, 1231, 1230, 1229, 1228, 1804, 746, 748, - /* 2170 */ 1802, 750, 682, 754, 752, 1800, 747, 2135, 756, 1798, - /* 2180 */ 758, 760, 2134, 751, 1784, 2170, 755, 682, 340, 2136, - /* 2190 */ 685, 2138, 2139, 680, 762, 675, 759, 1177, 1761, 2153, - /* 2200 */ 309, 766, 770, 1512, 399, 319, 769, 1736, 1736, 1736, - /* 2210 */ 1736, 2103, 1736, 681, 2153, 1736, 1736, 1736, 1736, 1736, - /* 2220 */ 1736, 1736, 1736, 1736, 1736, 1736, 2103, 2135, 681, 1736, - /* 2230 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 682, 1736, 1736, - /* 2240 */ 1736, 1736, 1736, 1736, 1736, 2134, 1736, 2135, 2170, 1736, - /* 2250 */ 1736, 340, 2136, 685, 2138, 2139, 680, 682, 675, 1736, - /* 2260 */ 586, 1736, 1736, 2170, 2153, 1736, 335, 2136, 685, 2138, - /* 2270 */ 2139, 680, 1736, 675, 1736, 1736, 2103, 1736, 681, 1736, - /* 2280 */ 1736, 1736, 1736, 1736, 2153, 1736, 1736, 1736, 1736, 1736, - /* 2290 */ 1736, 1736, 1736, 1736, 1736, 1736, 2103, 2135, 681, 1736, - /* 2300 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 682, 1736, 1736, - /* 2310 */ 2134, 1736, 1736, 2170, 1736, 1736, 324, 2136, 685, 2138, - /* 2320 */ 2139, 680, 2135, 675, 1736, 1736, 1736, 1736, 1736, 1736, - /* 2330 */ 2134, 1736, 682, 2170, 2153, 1736, 325, 2136, 685, 2138, - /* 2340 */ 2139, 680, 1736, 675, 1736, 1736, 2103, 1736, 681, 1736, - /* 2350 */ 1736, 1736, 1736, 1736, 1736, 2135, 1736, 1736, 1736, 2153, - /* 2360 */ 1736, 1736, 1736, 1736, 1736, 682, 1736, 1736, 1736, 1736, - /* 2370 */ 1736, 2103, 1736, 681, 1736, 1736, 1736, 1736, 1736, 1736, - /* 2380 */ 2134, 1736, 1736, 2170, 1736, 2135, 326, 2136, 685, 2138, - /* 2390 */ 2139, 680, 2153, 675, 1736, 682, 1736, 1736, 1736, 1736, - /* 2400 */ 1736, 1736, 1736, 1736, 2103, 2134, 681, 1736, 2170, 1736, - /* 2410 */ 1736, 332, 2136, 685, 2138, 2139, 680, 1736, 675, 1736, - /* 2420 */ 1736, 2135, 2153, 1736, 1736, 1736, 1736, 1736, 1736, 1736, - /* 2430 */ 1736, 682, 1736, 1736, 2103, 1736, 681, 1736, 2134, 1736, - /* 2440 */ 1736, 2170, 1736, 2135, 336, 2136, 685, 2138, 2139, 680, - /* 2450 */ 1736, 675, 1736, 682, 1736, 1736, 1736, 1736, 2153, 1736, - /* 2460 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 2134, 1736, - /* 2470 */ 2103, 2170, 681, 1736, 328, 2136, 685, 2138, 2139, 680, - /* 2480 */ 2153, 675, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, - /* 2490 */ 1736, 1736, 2103, 1736, 681, 1736, 1736, 1736, 1736, 1736, - /* 2500 */ 1736, 1736, 1736, 1736, 2134, 1736, 1736, 2170, 1736, 2135, - /* 2510 */ 337, 2136, 685, 2138, 2139, 680, 1736, 675, 1736, 682, - /* 2520 */ 1736, 1736, 1736, 1736, 1736, 1736, 2134, 1736, 2135, 2170, - /* 2530 */ 1736, 1736, 329, 2136, 685, 2138, 2139, 680, 682, 675, - /* 2540 */ 1736, 1736, 1736, 1736, 1736, 1736, 2153, 1736, 1736, 1736, - /* 2550 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 2103, 1736, - /* 2560 */ 681, 1736, 1736, 1736, 1736, 2153, 1736, 1736, 1736, 1736, - /* 2570 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 2103, 1736, 681, - /* 2580 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, - /* 2590 */ 1736, 1736, 2134, 1736, 2135, 2170, 1736, 1736, 338, 2136, - /* 2600 */ 685, 2138, 2139, 680, 682, 675, 1736, 1736, 1736, 1736, - /* 2610 */ 1736, 2134, 1736, 2135, 2170, 1736, 1736, 330, 2136, 685, - /* 2620 */ 2138, 2139, 680, 682, 675, 1736, 1736, 1736, 1736, 1736, - /* 2630 */ 1736, 2153, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, - /* 2640 */ 1736, 1736, 1736, 2103, 2135, 681, 1736, 1736, 1736, 1736, - /* 2650 */ 2153, 1736, 1736, 1736, 682, 1736, 1736, 1736, 1736, 1736, - /* 2660 */ 1736, 1736, 2103, 1736, 681, 1736, 1736, 1736, 1736, 1736, - /* 2670 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 2134, 1736, 1736, - /* 2680 */ 2170, 2153, 1736, 343, 2136, 685, 2138, 2139, 680, 1736, - /* 2690 */ 675, 1736, 1736, 2103, 1736, 681, 2134, 1736, 1736, 2170, - /* 2700 */ 1736, 1736, 344, 2136, 685, 2138, 2139, 680, 2135, 675, - /* 2710 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 682, 1736, - /* 2720 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 2134, 1736, 2135, - /* 2730 */ 2170, 1736, 1736, 2147, 2136, 685, 2138, 2139, 680, 682, - /* 2740 */ 675, 1736, 1736, 1736, 1736, 2153, 1736, 1736, 1736, 1736, - /* 2750 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 2103, 2135, 681, - /* 2760 */ 1736, 1736, 1736, 1736, 1736, 1736, 2153, 1736, 682, 1736, - /* 2770 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 2103, 1736, - /* 2780 */ 681, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, - /* 2790 */ 1736, 2134, 1736, 1736, 2170, 2153, 1736, 2146, 2136, 685, - /* 2800 */ 2138, 2139, 680, 1736, 675, 1736, 1736, 2103, 1736, 681, - /* 2810 */ 1736, 1736, 2134, 1736, 1736, 2170, 2135, 1736, 2145, 2136, - /* 2820 */ 685, 2138, 2139, 680, 1736, 675, 682, 1736, 1736, 1736, - /* 2830 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, - /* 2840 */ 1736, 2134, 1736, 1736, 2170, 1736, 2135, 358, 2136, 685, - /* 2850 */ 2138, 2139, 680, 2153, 675, 1736, 682, 1736, 1736, 1736, - /* 2860 */ 1736, 1736, 1736, 1736, 1736, 2103, 2135, 681, 1736, 1736, - /* 2870 */ 1736, 1736, 1736, 1736, 1736, 1736, 682, 1736, 1736, 1736, - /* 2880 */ 1736, 1736, 1736, 2153, 1736, 1736, 1736, 1736, 1736, 1736, - /* 2890 */ 1736, 1736, 1736, 1736, 1736, 2103, 1736, 681, 1736, 2134, - /* 2900 */ 1736, 1736, 2170, 2153, 1736, 359, 2136, 685, 2138, 2139, - /* 2910 */ 680, 1736, 675, 1736, 2135, 2103, 1736, 681, 1736, 1736, - /* 2920 */ 1736, 1736, 1736, 1736, 682, 1736, 1736, 1736, 1736, 2134, - /* 2930 */ 1736, 2135, 2170, 1736, 1736, 355, 2136, 685, 2138, 2139, - /* 2940 */ 680, 682, 675, 1736, 1736, 1736, 1736, 1736, 1736, 2134, - /* 2950 */ 1736, 2153, 2170, 1736, 1736, 360, 2136, 685, 2138, 2139, - /* 2960 */ 680, 1736, 675, 2103, 1736, 681, 1736, 1736, 2153, 1736, - /* 2970 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, - /* 2980 */ 2103, 1736, 681, 1736, 1736, 1736, 1736, 1736, 1736, 1736, - /* 2990 */ 1736, 1736, 1736, 1736, 1736, 1736, 1736, 683, 1736, 1736, - /* 3000 */ 2170, 1736, 1736, 335, 2136, 685, 2138, 2139, 680, 1736, - /* 3010 */ 675, 1736, 1736, 1736, 2134, 1736, 1736, 2170, 1736, 1736, - /* 3020 */ 334, 2136, 685, 2138, 2139, 680, 1736, 675, + /* 0 */ 2158, 402, 680, 1930, 38, 303, 182, 2091, 643, 162, + /* 10 */ 694, 2317, 48, 46, 1680, 1757, 380, 1932, 1969, 216, + /* 20 */ 399, 133, 1529, 529, 1980, 1799, 642, 186, 564, 655, + /* 30 */ 140, 2318, 644, 1610, 1829, 1527, 123, 2176, 107, 122, + /* 40 */ 121, 120, 119, 118, 117, 116, 115, 114, 1555, 2126, + /* 50 */ 1907, 696, 41, 40, 251, 141, 47, 45, 44, 43, + /* 60 */ 42, 1605, 531, 1922, 1557, 41, 40, 19, 528, 47, + /* 70 */ 45, 44, 43, 42, 1535, 1905, 1554, 47, 45, 44, + /* 80 */ 43, 42, 142, 2157, 526, 2217, 2193, 527, 1792, 339, + /* 90 */ 2159, 700, 2161, 2162, 695, 693, 690, 681, 2211, 783, + /* 100 */ 167, 30, 15, 760, 759, 758, 757, 411, 1871, 756, + /* 110 */ 755, 144, 750, 749, 748, 747, 746, 745, 744, 157, + /* 120 */ 740, 739, 738, 410, 409, 735, 734, 733, 175, 174, + /* 130 */ 657, 184, 2254, 2255, 1350, 138, 2259, 123, 1612, 1613, + /* 140 */ 122, 121, 120, 119, 118, 117, 116, 115, 114, 1341, + /* 150 */ 722, 721, 720, 1345, 719, 1347, 1348, 718, 715, 679, + /* 160 */ 1356, 712, 1358, 1359, 709, 706, 1384, 1385, 1585, 1595, + /* 170 */ 680, 1930, 41, 40, 1611, 1614, 47, 45, 44, 43, + /* 180 */ 42, 730, 155, 154, 727, 726, 725, 152, 1530, 133, + /* 190 */ 1528, 62, 666, 408, 407, 568, 569, 41, 40, 567, + /* 200 */ 661, 47, 45, 44, 43, 42, 730, 155, 154, 727, + /* 210 */ 726, 725, 152, 665, 262, 534, 1536, 1554, 527, 1792, + /* 220 */ 1533, 1534, 543, 1584, 1587, 1588, 1589, 1590, 1591, 1592, + /* 230 */ 1593, 1594, 692, 688, 1603, 1604, 1606, 1607, 1608, 1609, + /* 240 */ 2, 48, 46, 541, 2158, 2041, 349, 618, 1552, 399, + /* 250 */ 2317, 1529, 14, 13, 658, 482, 358, 2048, 496, 638, + /* 260 */ 679, 495, 1610, 52, 1527, 2323, 186, 582, 581, 580, + /* 270 */ 2318, 644, 2046, 667, 572, 137, 576, 465, 2136, 497, + /* 280 */ 575, 2176, 234, 467, 1195, 574, 579, 374, 373, 1756, + /* 290 */ 1605, 573, 1921, 2126, 1982, 696, 19, 1982, 172, 1677, + /* 300 */ 1639, 379, 2140, 1535, 389, 560, 556, 552, 548, 1980, + /* 310 */ 231, 179, 1980, 132, 131, 130, 129, 128, 127, 126, + /* 320 */ 125, 124, 168, 1197, 1768, 1200, 1201, 2157, 783, 367, + /* 330 */ 2193, 15, 2032, 110, 2159, 700, 2161, 2162, 695, 2142, + /* 340 */ 690, 455, 51, 2261, 1749, 183, 189, 2246, 1982, 690, + /* 350 */ 88, 395, 2242, 229, 1653, 394, 1640, 404, 445, 732, + /* 360 */ 1975, 1977, 444, 1980, 188, 1439, 1440, 1612, 1613, 2258, + /* 370 */ 493, 1539, 2272, 487, 486, 485, 484, 481, 480, 479, + /* 380 */ 478, 477, 473, 472, 471, 470, 348, 462, 461, 460, + /* 390 */ 218, 457, 456, 365, 529, 679, 1799, 1585, 1595, 2012, + /* 400 */ 1555, 655, 140, 1611, 1614, 618, 41, 40, 2317, 2322, + /* 410 */ 47, 45, 44, 43, 42, 1982, 371, 1530, 189, 1528, + /* 420 */ 228, 222, 364, 2323, 186, 227, 1556, 539, 2318, 644, + /* 430 */ 1980, 1754, 2048, 37, 397, 1634, 1635, 1636, 1637, 1638, + /* 440 */ 1642, 1643, 1644, 1645, 392, 220, 1748, 2045, 667, 1533, + /* 450 */ 1534, 637, 1584, 1587, 1588, 1589, 1590, 1591, 1592, 1593, + /* 460 */ 1594, 692, 688, 1603, 1604, 1606, 1607, 1608, 1609, 2, + /* 470 */ 12, 48, 46, 87, 87, 393, 666, 51, 2176, 399, + /* 480 */ 451, 1529, 1779, 165, 372, 666, 370, 369, 2158, 566, + /* 490 */ 368, 1932, 1610, 643, 1527, 1708, 2317, 189, 697, 1925, + /* 500 */ 1926, 1719, 414, 185, 2254, 2255, 413, 138, 2259, 1742, + /* 510 */ 568, 642, 186, 2158, 567, 1982, 2318, 644, 1456, 1457, + /* 520 */ 1605, 680, 1930, 697, 345, 2176, 19, 664, 489, 2041, + /* 530 */ 1981, 2126, 636, 1535, 655, 140, 675, 2126, 2041, 696, + /* 540 */ 191, 633, 630, 629, 1706, 1707, 1709, 1710, 1711, 618, + /* 550 */ 2176, 1778, 2317, 1676, 1455, 1458, 469, 66, 783, 523, + /* 560 */ 101, 15, 2126, 1553, 696, 468, 521, 2323, 186, 517, + /* 570 */ 513, 2157, 2318, 644, 2193, 1832, 284, 169, 2159, 700, + /* 580 */ 2161, 2162, 695, 12, 690, 1923, 41, 40, 207, 206, + /* 590 */ 47, 45, 44, 43, 42, 596, 2157, 1612, 1613, 2193, + /* 600 */ 2126, 605, 110, 2159, 700, 2161, 2162, 695, 594, 690, + /* 610 */ 592, 488, 143, 1684, 150, 2217, 2246, 619, 2283, 1554, + /* 620 */ 395, 2242, 179, 1554, 294, 295, 1529, 1585, 1595, 293, + /* 630 */ 639, 634, 627, 1611, 1614, 2261, 187, 2254, 2255, 1527, + /* 640 */ 138, 2259, 366, 2031, 582, 581, 580, 1530, 165, 1528, + /* 650 */ 249, 572, 137, 576, 248, 62, 1933, 575, 1777, 723, + /* 660 */ 1620, 2257, 574, 579, 374, 373, 1554, 2158, 573, 730, + /* 670 */ 155, 154, 727, 726, 725, 152, 260, 658, 1535, 1533, + /* 680 */ 1534, 1696, 1584, 1587, 1588, 1589, 1590, 1591, 1592, 1593, + /* 690 */ 1594, 692, 688, 1603, 1604, 1606, 1607, 1608, 1609, 2, + /* 700 */ 48, 46, 1615, 783, 2176, 62, 1535, 2126, 399, 1294, + /* 710 */ 1529, 1218, 62, 1217, 90, 2158, 2126, 353, 696, 91, + /* 720 */ 378, 1610, 598, 1527, 34, 697, 233, 1801, 680, 1930, + /* 730 */ 41, 40, 680, 1930, 47, 45, 44, 43, 42, 9, + /* 740 */ 655, 140, 1776, 2261, 1219, 285, 742, 57, 1296, 1605, + /* 750 */ 2157, 449, 2176, 2193, 680, 1930, 110, 2159, 700, 2161, + /* 760 */ 2162, 695, 1535, 690, 2126, 2119, 696, 1586, 183, 2256, + /* 770 */ 2246, 36, 1775, 450, 395, 2242, 1538, 41, 40, 408, + /* 780 */ 407, 47, 45, 44, 43, 42, 62, 783, 93, 1543, + /* 790 */ 49, 2126, 1530, 1906, 1528, 2273, 153, 443, 2157, 442, + /* 800 */ 1610, 2193, 1536, 2158, 110, 2159, 700, 2161, 2162, 695, + /* 810 */ 189, 690, 618, 697, 1586, 2317, 2337, 570, 2246, 680, + /* 820 */ 1930, 2126, 395, 2242, 1533, 1534, 1612, 1613, 1605, 441, + /* 830 */ 2323, 186, 680, 1930, 1919, 2318, 644, 402, 459, 1292, + /* 840 */ 2176, 1535, 282, 2254, 654, 165, 134, 653, 12, 2317, + /* 850 */ 10, 474, 2126, 1932, 696, 56, 1585, 1595, 1774, 732, + /* 860 */ 189, 1773, 1611, 1614, 642, 186, 686, 189, 1982, 2318, + /* 870 */ 644, 680, 1930, 578, 577, 403, 1530, 2136, 1528, 2322, + /* 880 */ 1915, 2322, 2317, 1980, 2317, 1772, 2157, 680, 1930, 2193, + /* 890 */ 475, 2145, 170, 2159, 700, 2161, 2162, 695, 2321, 690, + /* 900 */ 2321, 2140, 2318, 2320, 2318, 2319, 542, 2126, 1533, 1534, + /* 910 */ 2126, 1584, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, + /* 920 */ 692, 688, 1603, 1604, 1606, 1607, 1608, 1609, 2, 48, + /* 930 */ 46, 1541, 680, 1930, 2126, 2158, 1771, 399, 2142, 1529, + /* 940 */ 1305, 189, 2321, 645, 2338, 697, 405, 2280, 690, 1917, + /* 950 */ 1610, 1927, 1527, 1304, 165, 1544, 1673, 1539, 1770, 41, + /* 960 */ 40, 1767, 1932, 47, 45, 44, 43, 42, 317, 41, + /* 970 */ 40, 1959, 2176, 47, 45, 44, 43, 42, 1605, 1554, + /* 980 */ 680, 1930, 1976, 1977, 2126, 2126, 696, 1547, 1549, 680, + /* 990 */ 1930, 1535, 680, 1930, 680, 1930, 1309, 2109, 2120, 252, + /* 1000 */ 688, 1603, 1604, 1606, 1607, 1608, 1609, 2126, 614, 1308, + /* 1010 */ 2126, 659, 2027, 663, 1556, 1913, 783, 498, 2157, 49, + /* 1020 */ 1218, 2193, 1217, 2158, 110, 2159, 700, 2161, 2162, 695, + /* 1030 */ 250, 690, 587, 697, 724, 2293, 2337, 1973, 2246, 680, + /* 1040 */ 1930, 728, 395, 2242, 1973, 618, 1641, 597, 2317, 1766, + /* 1050 */ 203, 680, 1930, 1219, 433, 1612, 1613, 199, 298, 1765, + /* 1060 */ 2176, 247, 1764, 2323, 186, 680, 1930, 1557, 2318, 644, + /* 1070 */ 677, 1763, 2126, 500, 696, 680, 1930, 590, 680, 1930, + /* 1080 */ 1557, 435, 431, 584, 678, 1585, 1595, 754, 752, 246, + /* 1090 */ 84, 1611, 1614, 83, 304, 1200, 1201, 406, 2126, 1500, + /* 1100 */ 1501, 44, 43, 42, 1203, 1530, 2157, 1528, 2126, 2193, + /* 1110 */ 1553, 2126, 110, 2159, 700, 2161, 2162, 695, 1762, 690, + /* 1120 */ 2126, 164, 603, 35, 2337, 1761, 2246, 1586, 1760, 70, + /* 1130 */ 395, 2242, 69, 1646, 1759, 2266, 1673, 1533, 1534, 2027, + /* 1140 */ 1584, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 692, + /* 1150 */ 688, 1603, 1604, 1606, 1607, 1608, 1609, 2, 48, 46, + /* 1160 */ 2027, 2158, 2136, 682, 284, 2218, 399, 2126, 1529, 618, + /* 1170 */ 2112, 697, 2317, 625, 2126, 743, 2144, 2126, 1892, 1610, + /* 1180 */ 684, 1527, 2218, 2126, 201, 74, 2140, 2323, 186, 452, + /* 1190 */ 617, 729, 2318, 644, 1973, 54, 1908, 3, 2176, 146, + /* 1200 */ 239, 135, 453, 237, 1816, 205, 241, 1605, 153, 240, + /* 1210 */ 2126, 428, 696, 571, 1808, 243, 646, 200, 242, 421, + /* 1220 */ 1535, 1806, 245, 2142, 396, 244, 583, 600, 153, 599, + /* 1230 */ 261, 50, 50, 690, 82, 1290, 585, 266, 153, 647, + /* 1240 */ 148, 1751, 1752, 588, 2157, 783, 50, 2193, 15, 687, + /* 1250 */ 110, 2159, 700, 2161, 2162, 695, 650, 690, 2147, 291, + /* 1260 */ 71, 1802, 2337, 1537, 2246, 106, 151, 1495, 395, 2242, + /* 1270 */ 153, 14, 13, 64, 50, 103, 50, 736, 737, 704, + /* 1280 */ 151, 153, 136, 151, 1612, 1613, 1934, 1498, 1251, 256, + /* 1290 */ 1705, 1704, 691, 259, 1872, 1769, 268, 662, 2286, 1270, + /* 1300 */ 1268, 279, 631, 166, 232, 1453, 273, 1870, 323, 1869, + /* 1310 */ 2177, 778, 55, 2149, 1585, 1595, 412, 2036, 296, 672, + /* 1320 */ 1611, 1614, 321, 73, 1793, 300, 72, 1252, 1798, 1335, + /* 1330 */ 2276, 1970, 1647, 1596, 1530, 316, 1528, 346, 1362, 1366, + /* 1340 */ 1373, 1371, 156, 656, 278, 281, 1, 214, 508, 506, + /* 1350 */ 503, 5, 415, 420, 362, 2158, 1560, 437, 436, 194, + /* 1360 */ 193, 196, 439, 1476, 204, 697, 1533, 1534, 311, 1584, + /* 1370 */ 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 692, 688, + /* 1380 */ 1603, 1604, 1606, 1607, 1608, 1609, 2, 62, 1557, 454, + /* 1390 */ 2037, 491, 2176, 458, 463, 1552, 476, 483, 2029, 490, + /* 1400 */ 492, 501, 1631, 502, 2126, 499, 696, 504, 209, 211, + /* 1410 */ 208, 505, 507, 509, 1558, 524, 535, 4, 1540, 532, + /* 1420 */ 525, 533, 219, 1555, 2158, 109, 536, 1559, 221, 537, + /* 1430 */ 1561, 538, 540, 224, 697, 544, 2311, 226, 2157, 85, + /* 1440 */ 86, 2193, 1221, 561, 110, 2159, 700, 2161, 2162, 695, + /* 1450 */ 230, 690, 563, 562, 352, 112, 2221, 2100, 2246, 602, + /* 1460 */ 604, 2176, 395, 2242, 565, 81, 80, 448, 1920, 89, + /* 1470 */ 198, 236, 1916, 2126, 648, 696, 149, 238, 312, 158, + /* 1480 */ 159, 1918, 1914, 440, 438, 160, 2158, 253, 161, 608, + /* 1490 */ 607, 257, 1483, 651, 347, 609, 697, 429, 2265, 615, + /* 1500 */ 427, 423, 419, 416, 441, 2097, 2096, 2157, 2277, 612, + /* 1510 */ 2193, 255, 2158, 110, 2159, 700, 2161, 2162, 695, 2287, + /* 1520 */ 690, 632, 697, 2176, 622, 2337, 2292, 2246, 670, 613, + /* 1530 */ 264, 395, 2242, 2291, 628, 2126, 384, 696, 267, 2268, + /* 1540 */ 8, 635, 189, 641, 623, 385, 621, 620, 277, 2176, + /* 1550 */ 2340, 649, 652, 139, 1673, 1556, 2262, 660, 388, 286, + /* 1560 */ 274, 2126, 1562, 696, 313, 2042, 96, 668, 669, 2157, + /* 1570 */ 2056, 314, 2193, 2055, 276, 110, 2159, 700, 2161, 2162, + /* 1580 */ 695, 673, 690, 275, 2054, 272, 2158, 2337, 173, 2246, + /* 1590 */ 391, 674, 61, 395, 2242, 2157, 697, 98, 2193, 2316, + /* 1600 */ 100, 110, 2159, 700, 2161, 2162, 695, 280, 690, 102, + /* 1610 */ 2227, 315, 702, 2219, 1974, 2246, 1893, 1931, 779, 395, + /* 1620 */ 2242, 318, 780, 2176, 782, 327, 53, 341, 307, 331, + /* 1630 */ 320, 2118, 322, 2117, 342, 2126, 2116, 696, 78, 2113, + /* 1640 */ 417, 418, 1520, 1521, 354, 355, 192, 2158, 2111, 422, + /* 1650 */ 424, 425, 426, 2110, 363, 2108, 430, 697, 434, 432, + /* 1660 */ 2106, 1511, 2087, 195, 2086, 197, 1479, 79, 1478, 2157, + /* 1670 */ 2107, 2068, 2193, 2158, 2067, 110, 2159, 700, 2161, 2162, + /* 1680 */ 695, 2066, 690, 697, 2176, 446, 447, 683, 2065, 2246, + /* 1690 */ 2064, 1430, 2020, 395, 2242, 2019, 2126, 2017, 696, 145, + /* 1700 */ 2016, 2015, 2018, 2014, 2013, 2011, 2010, 2009, 202, 2158, + /* 1710 */ 2176, 464, 2008, 466, 2022, 2007, 2006, 2005, 2004, 697, + /* 1720 */ 147, 1992, 2126, 2003, 696, 2002, 2001, 2000, 1999, 1998, + /* 1730 */ 2157, 1997, 1996, 2193, 1995, 1994, 111, 2159, 700, 2161, + /* 1740 */ 2162, 695, 1993, 690, 1991, 1990, 2176, 2021, 1989, 1988, + /* 1750 */ 2246, 1987, 1432, 1986, 2245, 2242, 2157, 1985, 2126, 2193, + /* 1760 */ 696, 494, 111, 2159, 700, 2161, 2162, 695, 1984, 690, + /* 1770 */ 1983, 1835, 1306, 2158, 1310, 1302, 2246, 1834, 1833, 1831, + /* 1780 */ 685, 2242, 225, 697, 350, 351, 1828, 511, 1827, 1820, + /* 1790 */ 510, 1810, 698, 514, 210, 2193, 518, 2158, 111, 2159, + /* 1800 */ 700, 2161, 2162, 695, 212, 690, 512, 697, 515, 519, + /* 1810 */ 2176, 516, 2246, 520, 1788, 213, 357, 2242, 215, 522, + /* 1820 */ 76, 1202, 2126, 1787, 696, 2085, 77, 2146, 2075, 180, + /* 1830 */ 2063, 2062, 2040, 217, 2176, 223, 1909, 181, 1830, 530, + /* 1840 */ 1826, 1244, 547, 545, 546, 1824, 2126, 549, 696, 550, + /* 1850 */ 551, 1822, 553, 554, 555, 1819, 2157, 557, 558, 2193, + /* 1860 */ 559, 2158, 111, 2159, 700, 2161, 2162, 695, 1805, 690, + /* 1870 */ 1804, 697, 1784, 1911, 63, 235, 2246, 1378, 1377, 1910, + /* 1880 */ 2157, 2243, 606, 2193, 1293, 1291, 169, 2159, 700, 2161, + /* 1890 */ 2162, 695, 751, 690, 1289, 1288, 1287, 1286, 2176, 1285, + /* 1900 */ 786, 1282, 753, 382, 1281, 1280, 1279, 1817, 375, 1809, + /* 1910 */ 2126, 376, 696, 1807, 310, 377, 586, 589, 1783, 2158, + /* 1920 */ 591, 1782, 593, 1781, 595, 113, 1505, 2284, 29, 697, + /* 1930 */ 178, 1507, 1504, 2084, 58, 2158, 1509, 776, 772, 768, + /* 1940 */ 764, 67, 308, 1485, 2157, 697, 1487, 2193, 2074, 610, + /* 1950 */ 340, 2159, 700, 2161, 2162, 695, 2176, 690, 2061, 2059, + /* 1960 */ 1489, 383, 6, 2322, 611, 31, 163, 624, 2126, 258, + /* 1970 */ 696, 381, 2176, 20, 17, 616, 7, 1721, 263, 21, + /* 1980 */ 22, 265, 108, 1703, 2126, 301, 696, 1695, 626, 271, + /* 1990 */ 171, 270, 65, 2147, 269, 33, 2158, 32, 24, 1736, + /* 2000 */ 92, 1735, 2157, 1741, 1742, 2193, 697, 23, 340, 2159, + /* 2010 */ 700, 2161, 2162, 695, 386, 690, 1740, 676, 2157, 1739, + /* 2020 */ 387, 2193, 2158, 18, 333, 2159, 700, 2161, 2162, 695, + /* 2030 */ 283, 690, 697, 2176, 1670, 1669, 60, 176, 59, 2060, + /* 2040 */ 2058, 2057, 2039, 94, 95, 2126, 289, 696, 671, 2038, + /* 2050 */ 97, 25, 288, 290, 302, 1701, 103, 287, 2158, 2176, + /* 2060 */ 26, 11, 177, 292, 390, 297, 13, 640, 694, 68, + /* 2070 */ 299, 2126, 99, 696, 1622, 1621, 1545, 254, 2196, 2157, + /* 2080 */ 1600, 1598, 2193, 1597, 689, 170, 2159, 700, 2161, 2162, + /* 2090 */ 695, 190, 690, 39, 2158, 2176, 16, 27, 1577, 1569, + /* 2100 */ 28, 701, 703, 1363, 697, 2157, 401, 2126, 2193, 696, + /* 2110 */ 705, 340, 2159, 700, 2161, 2162, 695, 1360, 690, 707, + /* 2120 */ 2158, 708, 710, 1632, 1357, 711, 699, 1351, 713, 714, + /* 2130 */ 697, 2176, 1349, 716, 717, 104, 398, 2339, 305, 105, + /* 2140 */ 1372, 2157, 1355, 2126, 2193, 696, 1354, 339, 2159, 700, + /* 2150 */ 2161, 2162, 695, 75, 690, 1353, 2212, 2176, 1352, 1368, + /* 2160 */ 1242, 1274, 400, 731, 1273, 1272, 1271, 1269, 1267, 2126, + /* 2170 */ 1266, 696, 306, 1300, 1265, 741, 1263, 2157, 1262, 1261, + /* 2180 */ 2193, 1260, 1259, 340, 2159, 700, 2161, 2162, 695, 1258, + /* 2190 */ 690, 1257, 1297, 1295, 1248, 2158, 1254, 1253, 1250, 1249, + /* 2200 */ 1247, 1825, 761, 2157, 762, 697, 2193, 763, 1823, 340, + /* 2210 */ 2159, 700, 2161, 2162, 695, 2158, 690, 765, 766, 767, + /* 2220 */ 1821, 1818, 769, 770, 771, 697, 773, 774, 775, 1803, + /* 2230 */ 777, 1192, 2176, 1780, 309, 781, 1755, 1531, 319, 784, + /* 2240 */ 1755, 1755, 785, 1755, 2126, 1755, 696, 1755, 1755, 1755, + /* 2250 */ 1755, 1755, 2176, 1755, 1755, 1755, 1755, 1755, 1755, 1755, + /* 2260 */ 1755, 1755, 1755, 1755, 2126, 1755, 696, 1755, 1755, 1755, + /* 2270 */ 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 601, 1755, + /* 2280 */ 1755, 2193, 1755, 2158, 335, 2159, 700, 2161, 2162, 695, + /* 2290 */ 1755, 690, 1755, 697, 1755, 1755, 1755, 1755, 2157, 1755, + /* 2300 */ 2158, 2193, 1755, 1755, 324, 2159, 700, 2161, 2162, 695, + /* 2310 */ 697, 690, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, + /* 2320 */ 2176, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, + /* 2330 */ 1755, 1755, 2126, 1755, 696, 1755, 1755, 2176, 1755, 1755, + /* 2340 */ 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 2158, 2126, + /* 2350 */ 1755, 696, 1755, 1755, 1755, 1755, 1755, 1755, 697, 1755, + /* 2360 */ 1755, 1755, 1755, 1755, 1755, 1755, 2157, 1755, 2158, 2193, + /* 2370 */ 1755, 1755, 325, 2159, 700, 2161, 2162, 695, 697, 690, + /* 2380 */ 1755, 1755, 1755, 2157, 1755, 2176, 2193, 1755, 1755, 326, + /* 2390 */ 2159, 700, 2161, 2162, 695, 1755, 690, 2126, 2158, 696, + /* 2400 */ 1755, 1755, 1755, 1755, 1755, 2176, 1755, 1755, 697, 1755, + /* 2410 */ 1755, 1755, 1755, 1755, 1755, 1755, 2158, 2126, 1755, 696, + /* 2420 */ 1755, 1755, 1755, 1755, 1755, 1755, 697, 1755, 1755, 1755, + /* 2430 */ 1755, 2157, 1755, 1755, 2193, 2176, 1755, 332, 2159, 700, + /* 2440 */ 2161, 2162, 695, 1755, 690, 1755, 2158, 2126, 1755, 696, + /* 2450 */ 1755, 2157, 1755, 2176, 2193, 1755, 697, 336, 2159, 700, + /* 2460 */ 2161, 2162, 695, 1755, 690, 2126, 1755, 696, 1755, 1755, + /* 2470 */ 1755, 1755, 1755, 1755, 1755, 1755, 2158, 1755, 1755, 1755, + /* 2480 */ 1755, 2157, 1755, 2176, 2193, 1755, 697, 328, 2159, 700, + /* 2490 */ 2161, 2162, 695, 1755, 690, 2126, 1755, 696, 1755, 2157, + /* 2500 */ 1755, 1755, 2193, 1755, 1755, 337, 2159, 700, 2161, 2162, + /* 2510 */ 695, 1755, 690, 2176, 1755, 1755, 1755, 1755, 1755, 1755, + /* 2520 */ 1755, 1755, 1755, 1755, 2158, 2126, 1755, 696, 1755, 2157, + /* 2530 */ 1755, 1755, 2193, 1755, 697, 329, 2159, 700, 2161, 2162, + /* 2540 */ 695, 1755, 690, 1755, 2158, 1755, 1755, 1755, 1755, 1755, + /* 2550 */ 1755, 1755, 1755, 1755, 697, 1755, 1755, 1755, 1755, 2157, + /* 2560 */ 1755, 2176, 2193, 1755, 1755, 338, 2159, 700, 2161, 2162, + /* 2570 */ 695, 1755, 690, 2126, 1755, 696, 1755, 1755, 1755, 1755, + /* 2580 */ 1755, 2176, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, + /* 2590 */ 1755, 1755, 1755, 2126, 1755, 696, 1755, 1755, 1755, 1755, + /* 2600 */ 1755, 1755, 1755, 1755, 1755, 1755, 1755, 2157, 1755, 1755, + /* 2610 */ 2193, 1755, 1755, 330, 2159, 700, 2161, 2162, 695, 1755, + /* 2620 */ 690, 1755, 2158, 1755, 1755, 1755, 1755, 2157, 1755, 1755, + /* 2630 */ 2193, 1755, 697, 343, 2159, 700, 2161, 2162, 695, 2158, + /* 2640 */ 690, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 697, + /* 2650 */ 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 2176, + /* 2660 */ 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, + /* 2670 */ 1755, 2126, 1755, 696, 1755, 1755, 2176, 1755, 1755, 1755, + /* 2680 */ 1755, 1755, 1755, 1755, 1755, 1755, 1755, 2158, 2126, 1755, + /* 2690 */ 696, 1755, 1755, 1755, 1755, 1755, 1755, 697, 1755, 1755, + /* 2700 */ 1755, 1755, 1755, 1755, 1755, 2157, 1755, 2158, 2193, 1755, + /* 2710 */ 1755, 344, 2159, 700, 2161, 2162, 695, 697, 690, 1755, + /* 2720 */ 1755, 1755, 2157, 1755, 2176, 2193, 1755, 1755, 2170, 2159, + /* 2730 */ 700, 2161, 2162, 695, 1755, 690, 2126, 2158, 696, 1755, + /* 2740 */ 1755, 1755, 1755, 1755, 2176, 1755, 1755, 697, 1755, 1755, + /* 2750 */ 1755, 1755, 1755, 1755, 1755, 2158, 2126, 1755, 696, 1755, + /* 2760 */ 1755, 1755, 1755, 1755, 1755, 697, 1755, 1755, 1755, 1755, + /* 2770 */ 2157, 1755, 1755, 2193, 2176, 1755, 2169, 2159, 700, 2161, + /* 2780 */ 2162, 695, 1755, 690, 1755, 2158, 2126, 1755, 696, 1755, + /* 2790 */ 2157, 1755, 2176, 2193, 1755, 697, 2168, 2159, 700, 2161, + /* 2800 */ 2162, 695, 1755, 690, 2126, 1755, 696, 1755, 1755, 1755, + /* 2810 */ 1755, 1755, 1755, 1755, 1755, 2158, 1755, 1755, 1755, 1755, + /* 2820 */ 2157, 1755, 2176, 2193, 1755, 697, 359, 2159, 700, 2161, + /* 2830 */ 2162, 695, 1755, 690, 2126, 1755, 696, 1755, 2157, 1755, + /* 2840 */ 1755, 2193, 1755, 1755, 360, 2159, 700, 2161, 2162, 695, + /* 2850 */ 1755, 690, 2176, 1755, 1755, 1755, 1755, 1755, 1755, 1755, + /* 2860 */ 1755, 1755, 1755, 2158, 2126, 1755, 696, 1755, 2157, 1755, + /* 2870 */ 1755, 2193, 1755, 697, 356, 2159, 700, 2161, 2162, 695, + /* 2880 */ 1755, 690, 1755, 2158, 1755, 1755, 1755, 1755, 1755, 1755, + /* 2890 */ 1755, 1755, 1755, 697, 1755, 1755, 1755, 1755, 2157, 1755, + /* 2900 */ 2176, 2193, 1755, 1755, 361, 2159, 700, 2161, 2162, 695, + /* 2910 */ 1755, 690, 2126, 1755, 696, 1755, 1755, 1755, 1755, 1755, + /* 2920 */ 2176, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755, + /* 2930 */ 1755, 1755, 2126, 1755, 696, 1755, 1755, 1755, 1755, 1755, + /* 2940 */ 1755, 1755, 1755, 1755, 1755, 1755, 698, 1755, 1755, 2193, + /* 2950 */ 1755, 1755, 335, 2159, 700, 2161, 2162, 695, 1755, 690, + /* 2960 */ 1755, 1755, 1755, 1755, 1755, 1755, 2157, 1755, 1755, 2193, + /* 2970 */ 1755, 1755, 334, 2159, 700, 2161, 2162, 695, 1755, 690, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 336, 387, 340, 346, 383, 343, 344, 386, 387, 374, - /* 10 */ 346, 387, 12, 13, 14, 0, 402, 403, 2, 335, - /* 20 */ 20, 337, 22, 399, 8, 9, 402, 403, 12, 13, - /* 30 */ 14, 15, 16, 33, 0, 35, 21, 373, 20, 24, - /* 40 */ 25, 26, 27, 28, 29, 30, 31, 32, 391, 385, - /* 50 */ 365, 387, 20, 20, 22, 22, 8, 9, 373, 59, - /* 60 */ 12, 13, 14, 15, 16, 65, 381, 35, 20, 333, - /* 70 */ 64, 21, 72, 424, 24, 25, 26, 27, 28, 29, - /* 80 */ 30, 31, 32, 419, 52, 52, 422, 345, 346, 425, - /* 90 */ 426, 427, 428, 429, 430, 4, 432, 97, 20, 450, - /* 100 */ 100, 67, 68, 69, 70, 71, 364, 73, 74, 75, + /* 0 */ 338, 367, 347, 348, 442, 443, 374, 371, 453, 375, + /* 10 */ 348, 456, 12, 13, 14, 0, 382, 383, 386, 343, + /* 20 */ 20, 366, 22, 347, 390, 349, 471, 472, 373, 347, + /* 30 */ 348, 476, 477, 33, 0, 35, 21, 375, 353, 24, + /* 40 */ 25, 26, 27, 28, 29, 30, 31, 32, 20, 387, + /* 50 */ 0, 389, 8, 9, 418, 370, 12, 13, 14, 15, + /* 60 */ 16, 61, 14, 378, 20, 8, 9, 67, 20, 12, + /* 70 */ 13, 14, 15, 16, 74, 0, 20, 12, 13, 14, + /* 80 */ 15, 16, 437, 421, 342, 440, 424, 345, 346, 427, + /* 90 */ 428, 429, 430, 431, 432, 433, 434, 435, 436, 99, + /* 100 */ 356, 44, 102, 69, 70, 71, 72, 73, 364, 75, /* 110 */ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - /* 120 */ 86, 87, 88, 89, 90, 91, 92, 93, 59, 465, - /* 130 */ 466, 340, 97, 372, 343, 344, 136, 137, 345, 346, - /* 140 */ 404, 20, 404, 100, 408, 384, 408, 112, 113, 114, - /* 150 */ 115, 116, 117, 118, 119, 120, 121, 364, 123, 124, - /* 160 */ 125, 126, 127, 128, 371, 20, 166, 167, 99, 20, - /* 170 */ 373, 102, 172, 173, 20, 8, 9, 380, 100, 12, - /* 180 */ 13, 14, 15, 16, 351, 388, 186, 451, 188, 451, - /* 190 */ 454, 100, 454, 130, 131, 8, 9, 20, 135, 12, - /* 200 */ 13, 14, 15, 16, 22, 469, 470, 469, 470, 376, - /* 210 */ 474, 475, 474, 475, 345, 346, 168, 35, 218, 219, - /* 220 */ 20, 221, 222, 223, 224, 225, 226, 227, 228, 229, - /* 230 */ 230, 231, 232, 233, 234, 235, 236, 237, 238, 12, - /* 240 */ 13, 0, 345, 346, 18, 165, 20, 20, 451, 22, - /* 250 */ 345, 454, 65, 27, 345, 346, 30, 136, 137, 33, - /* 260 */ 33, 364, 35, 64, 336, 33, 469, 470, 371, 361, - /* 270 */ 346, 474, 475, 364, 346, 49, 14, 51, 0, 97, - /* 280 */ 54, 49, 20, 375, 440, 441, 59, 55, 56, 57, - /* 290 */ 58, 59, 65, 385, 389, 20, 109, 373, 255, 72, - /* 300 */ 100, 373, 24, 25, 26, 27, 28, 29, 30, 31, - /* 310 */ 32, 166, 167, 385, 181, 387, 447, 448, 449, 111, - /* 320 */ 451, 452, 242, 454, 97, 99, 4, 100, 100, 14, - /* 330 */ 422, 99, 252, 255, 102, 20, 22, 111, 469, 470, - /* 340 */ 432, 208, 209, 474, 475, 178, 255, 419, 20, 35, - /* 350 */ 422, 427, 165, 425, 426, 427, 428, 429, 430, 431, - /* 360 */ 432, 433, 434, 136, 137, 43, 140, 45, 46, 143, - /* 370 */ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - /* 380 */ 154, 155, 156, 157, 158, 159, 72, 161, 162, 163, - /* 390 */ 14, 15, 16, 166, 167, 336, 155, 3, 18, 172, - /* 400 */ 173, 169, 170, 23, 451, 164, 174, 454, 176, 345, - /* 410 */ 346, 97, 131, 186, 20, 188, 135, 37, 38, 358, - /* 420 */ 359, 41, 469, 470, 386, 387, 194, 474, 475, 242, - /* 430 */ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, - /* 440 */ 60, 61, 62, 63, 385, 218, 219, 280, 221, 222, - /* 450 */ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - /* 460 */ 233, 234, 235, 236, 237, 238, 239, 12, 13, 12, - /* 470 */ 13, 14, 15, 16, 20, 20, 195, 22, 22, 198, - /* 480 */ 100, 424, 201, 255, 203, 67, 68, 69, 33, 336, - /* 490 */ 35, 35, 74, 75, 76, 101, 168, 218, 80, 346, - /* 500 */ 186, 100, 188, 85, 86, 87, 88, 450, 373, 91, - /* 510 */ 446, 447, 448, 449, 59, 451, 452, 341, 138, 336, - /* 520 */ 65, 345, 354, 347, 345, 346, 373, 72, 393, 394, - /* 530 */ 362, 341, 218, 219, 171, 345, 47, 347, 385, 239, - /* 540 */ 387, 241, 361, 364, 265, 266, 267, 268, 269, 270, - /* 550 */ 271, 48, 97, 97, 100, 100, 375, 365, 178, 179, - /* 560 */ 180, 336, 168, 183, 346, 373, 385, 404, 385, 239, - /* 570 */ 130, 346, 419, 381, 35, 422, 196, 197, 425, 426, - /* 580 */ 427, 428, 429, 430, 369, 432, 185, 207, 187, 100, - /* 590 */ 210, 136, 137, 213, 214, 215, 216, 217, 373, 435, - /* 600 */ 8, 9, 438, 422, 12, 13, 14, 15, 16, 391, - /* 610 */ 385, 72, 387, 432, 451, 345, 346, 454, 217, 345, - /* 620 */ 72, 166, 167, 260, 261, 262, 336, 172, 173, 476, - /* 630 */ 477, 416, 469, 470, 364, 255, 44, 474, 475, 199, - /* 640 */ 200, 186, 0, 188, 419, 0, 21, 422, 345, 346, - /* 650 */ 425, 426, 427, 428, 429, 430, 255, 432, 404, 34, - /* 660 */ 435, 36, 437, 438, 439, 358, 359, 364, 443, 444, - /* 670 */ 396, 168, 398, 218, 219, 385, 221, 222, 223, 224, - /* 680 */ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - /* 690 */ 235, 236, 237, 238, 12, 13, 14, 345, 346, 345, - /* 700 */ 336, 35, 20, 451, 22, 451, 454, 336, 454, 255, - /* 710 */ 346, 336, 67, 68, 69, 33, 364, 35, 336, 74, - /* 720 */ 75, 76, 470, 469, 470, 80, 474, 475, 474, 475, - /* 730 */ 85, 86, 87, 88, 345, 346, 91, 373, 72, 8, - /* 740 */ 9, 59, 14, 12, 13, 14, 15, 16, 20, 385, - /* 750 */ 396, 387, 398, 364, 72, 436, 385, 438, 8, 9, - /* 760 */ 385, 44, 12, 13, 14, 15, 16, 385, 345, 346, - /* 770 */ 59, 129, 130, 131, 132, 133, 134, 135, 14, 97, - /* 780 */ 345, 346, 100, 419, 20, 373, 422, 364, 336, 425, - /* 790 */ 426, 427, 428, 429, 430, 4, 432, 111, 346, 364, - /* 800 */ 348, 437, 373, 439, 12, 13, 394, 443, 444, 380, - /* 810 */ 19, 100, 451, 102, 20, 454, 424, 388, 136, 137, - /* 820 */ 456, 0, 345, 346, 33, 373, 382, 35, 464, 385, - /* 830 */ 72, 470, 101, 345, 346, 474, 475, 385, 0, 387, - /* 840 */ 49, 364, 450, 353, 374, 54, 373, 353, 166, 167, - /* 850 */ 59, 101, 2, 380, 172, 173, 345, 346, 8, 9, - /* 860 */ 370, 388, 12, 13, 14, 15, 16, 0, 186, 379, - /* 870 */ 188, 419, 345, 379, 422, 364, 20, 425, 426, 427, - /* 880 */ 428, 429, 430, 336, 432, 409, 345, 346, 346, 437, - /* 890 */ 99, 439, 336, 102, 166, 443, 444, 1, 2, 404, - /* 900 */ 218, 219, 64, 221, 222, 223, 224, 225, 226, 227, - /* 910 */ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, - /* 920 */ 238, 12, 13, 396, 336, 398, 345, 346, 373, 20, - /* 930 */ 166, 22, 385, 391, 346, 447, 448, 449, 336, 451, - /* 940 */ 452, 385, 33, 388, 35, 364, 451, 336, 3, 454, - /* 950 */ 129, 130, 131, 132, 133, 134, 135, 346, 436, 348, - /* 960 */ 438, 373, 168, 365, 469, 470, 255, 4, 59, 474, - /* 970 */ 475, 373, 336, 385, 351, 387, 345, 346, 380, 381, - /* 980 */ 188, 72, 345, 346, 373, 39, 388, 385, 447, 448, - /* 990 */ 449, 368, 451, 452, 277, 364, 385, 101, 387, 376, - /* 1000 */ 336, 364, 37, 365, 345, 346, 97, 419, 129, 100, - /* 1010 */ 422, 373, 133, 425, 426, 427, 428, 429, 430, 381, - /* 1020 */ 432, 385, 404, 364, 168, 437, 374, 439, 336, 81, - /* 1030 */ 419, 443, 444, 422, 20, 374, 425, 426, 427, 428, - /* 1040 */ 429, 430, 361, 432, 382, 136, 137, 385, 437, 385, - /* 1050 */ 439, 336, 464, 44, 443, 444, 375, 8, 9, 345, - /* 1060 */ 346, 12, 13, 14, 15, 16, 385, 374, 103, 451, - /* 1070 */ 105, 106, 454, 108, 336, 166, 167, 385, 364, 212, - /* 1080 */ 336, 172, 173, 373, 346, 20, 348, 469, 470, 141, - /* 1090 */ 142, 381, 474, 475, 129, 186, 366, 188, 133, 369, - /* 1100 */ 385, 8, 9, 422, 423, 12, 13, 14, 15, 16, - /* 1110 */ 336, 373, 164, 432, 129, 130, 131, 132, 133, 134, - /* 1120 */ 135, 360, 374, 385, 363, 387, 374, 218, 219, 385, - /* 1130 */ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - /* 1140 */ 231, 232, 233, 234, 235, 236, 237, 238, 12, 13, - /* 1150 */ 136, 137, 382, 45, 46, 385, 20, 419, 22, 385, - /* 1160 */ 422, 336, 336, 425, 426, 427, 428, 429, 430, 33, - /* 1170 */ 432, 35, 346, 373, 348, 437, 336, 439, 345, 346, - /* 1180 */ 380, 443, 444, 373, 44, 336, 172, 173, 388, 336, - /* 1190 */ 380, 336, 253, 254, 42, 59, 44, 364, 388, 373, - /* 1200 */ 254, 346, 22, 348, 345, 346, 0, 42, 72, 44, - /* 1210 */ 385, 385, 0, 387, 202, 35, 204, 168, 111, 256, - /* 1220 */ 275, 104, 13, 364, 107, 385, 104, 13, 373, 107, - /* 1230 */ 362, 166, 104, 97, 385, 107, 100, 0, 385, 65, - /* 1240 */ 385, 101, 387, 104, 35, 419, 107, 44, 422, 35, - /* 1250 */ 44, 425, 426, 427, 428, 429, 430, 0, 432, 22, - /* 1260 */ 35, 49, 0, 437, 0, 439, 44, 160, 44, 443, - /* 1270 */ 444, 44, 136, 137, 419, 59, 44, 422, 44, 22, - /* 1280 */ 425, 426, 427, 428, 429, 430, 22, 432, 279, 136, - /* 1290 */ 137, 44, 437, 35, 439, 44, 12, 13, 443, 444, - /* 1300 */ 1, 2, 166, 167, 101, 100, 22, 337, 172, 173, - /* 1310 */ 395, 467, 50, 478, 361, 110, 13, 33, 102, 35, - /* 1320 */ 44, 44, 186, 101, 188, 101, 44, 44, 101, 44, - /* 1330 */ 349, 44, 44, 101, 44, 101, 44, 44, 35, 44, - /* 1340 */ 361, 461, 373, 59, 349, 395, 344, 346, 101, 395, - /* 1350 */ 384, 453, 101, 471, 218, 219, 72, 221, 222, 223, - /* 1360 */ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - /* 1370 */ 234, 235, 236, 237, 238, 336, 13, 101, 101, 445, - /* 1380 */ 455, 97, 257, 101, 101, 346, 101, 348, 101, 101, - /* 1390 */ 49, 101, 218, 101, 101, 421, 101, 420, 35, 20, - /* 1400 */ 413, 201, 418, 353, 413, 353, 406, 184, 42, 392, - /* 1410 */ 20, 395, 373, 188, 392, 165, 390, 20, 345, 345, - /* 1420 */ 392, 390, 390, 98, 385, 357, 387, 96, 356, 345, - /* 1430 */ 95, 355, 345, 345, 345, 20, 338, 48, 342, 338, - /* 1440 */ 413, 342, 20, 353, 387, 353, 188, 20, 20, 347, - /* 1450 */ 405, 347, 53, 353, 338, 345, 353, 205, 419, 353, - /* 1460 */ 385, 422, 353, 350, 425, 426, 427, 428, 429, 430, - /* 1470 */ 186, 432, 188, 353, 336, 345, 437, 350, 439, 338, - /* 1480 */ 385, 417, 443, 444, 346, 373, 415, 373, 373, 192, - /* 1490 */ 385, 373, 373, 100, 373, 413, 373, 336, 351, 373, - /* 1500 */ 191, 351, 218, 219, 373, 373, 373, 346, 190, 412, - /* 1510 */ 264, 373, 345, 460, 460, 231, 232, 233, 234, 235, - /* 1520 */ 236, 237, 411, 385, 387, 387, 263, 385, 272, 395, - /* 1530 */ 395, 385, 463, 385, 373, 177, 385, 460, 459, 410, - /* 1540 */ 462, 274, 273, 400, 400, 421, 385, 258, 387, 458, - /* 1550 */ 278, 457, 281, 346, 473, 276, 254, 419, 472, 479, - /* 1560 */ 422, 20, 345, 425, 426, 427, 428, 429, 430, 424, - /* 1570 */ 432, 351, 351, 347, 20, 437, 398, 439, 385, 400, - /* 1580 */ 419, 443, 444, 422, 385, 336, 425, 426, 427, 428, - /* 1590 */ 429, 430, 400, 432, 170, 346, 385, 1, 437, 397, - /* 1600 */ 439, 100, 369, 385, 443, 444, 351, 346, 442, 100, - /* 1610 */ 351, 336, 377, 385, 385, 19, 385, 363, 345, 351, - /* 1620 */ 36, 346, 373, 0, 414, 339, 407, 367, 0, 33, - /* 1630 */ 352, 401, 338, 367, 385, 334, 387, 401, 0, 42, - /* 1640 */ 0, 367, 35, 211, 35, 49, 35, 35, 373, 211, - /* 1650 */ 0, 55, 56, 57, 58, 59, 35, 35, 211, 336, - /* 1660 */ 385, 211, 387, 0, 0, 35, 0, 22, 419, 346, - /* 1670 */ 0, 422, 35, 206, 425, 426, 427, 428, 429, 430, - /* 1680 */ 0, 432, 194, 0, 194, 188, 437, 195, 439, 186, - /* 1690 */ 0, 0, 443, 444, 419, 99, 373, 422, 102, 0, - /* 1700 */ 425, 426, 427, 428, 429, 430, 182, 432, 385, 181, - /* 1710 */ 387, 0, 0, 0, 439, 47, 0, 0, 443, 444, - /* 1720 */ 42, 0, 336, 0, 0, 0, 0, 0, 0, 0, - /* 1730 */ 134, 155, 346, 35, 0, 155, 0, 0, 0, 0, - /* 1740 */ 0, 0, 419, 0, 0, 422, 0, 0, 425, 426, - /* 1750 */ 427, 428, 429, 430, 0, 432, 0, 0, 0, 373, - /* 1760 */ 0, 0, 439, 139, 42, 169, 443, 444, 0, 0, - /* 1770 */ 174, 385, 0, 387, 0, 0, 0, 22, 0, 0, - /* 1780 */ 0, 0, 0, 48, 22, 0, 22, 35, 0, 59, - /* 1790 */ 194, 59, 0, 48, 0, 0, 47, 44, 39, 0, - /* 1800 */ 14, 59, 0, 0, 39, 419, 40, 336, 422, 42, - /* 1810 */ 0, 425, 426, 427, 428, 429, 430, 346, 432, 177, - /* 1820 */ 47, 0, 39, 0, 47, 439, 35, 0, 35, 443, - /* 1830 */ 444, 0, 0, 0, 0, 39, 66, 39, 49, 49, - /* 1840 */ 336, 35, 0, 39, 373, 0, 49, 35, 39, 49, - /* 1850 */ 346, 0, 0, 0, 35, 0, 385, 109, 387, 22, - /* 1860 */ 35, 44, 44, 35, 35, 35, 0, 0, 22, 0, - /* 1870 */ 35, 336, 22, 35, 35, 35, 22, 373, 107, 35, - /* 1880 */ 22, 346, 35, 35, 0, 0, 0, 51, 20, 385, - /* 1890 */ 419, 387, 35, 422, 35, 22, 425, 426, 427, 428, - /* 1900 */ 429, 430, 336, 432, 0, 35, 35, 35, 373, 101, - /* 1910 */ 439, 100, 346, 378, 100, 444, 35, 22, 168, 0, - /* 1920 */ 385, 22, 387, 419, 193, 0, 422, 0, 259, 425, - /* 1930 */ 426, 427, 428, 429, 430, 336, 432, 3, 44, 373, - /* 1940 */ 189, 48, 3, 100, 378, 346, 48, 44, 47, 44, - /* 1950 */ 101, 385, 168, 387, 419, 168, 100, 422, 98, 96, - /* 1960 */ 425, 426, 427, 428, 429, 430, 101, 432, 44, 47, - /* 1970 */ 466, 170, 373, 44, 259, 101, 100, 100, 100, 100, - /* 1980 */ 175, 101, 44, 101, 385, 419, 387, 35, 422, 101, - /* 1990 */ 35, 425, 426, 427, 428, 429, 430, 336, 432, 35, - /* 2000 */ 35, 35, 35, 101, 47, 47, 44, 346, 101, 0, - /* 2010 */ 0, 0, 336, 0, 100, 39, 47, 100, 419, 101, - /* 2020 */ 100, 422, 346, 100, 425, 426, 427, 428, 429, 430, - /* 2030 */ 100, 432, 101, 336, 373, 171, 0, 39, 110, 47, - /* 2040 */ 100, 44, 98, 346, 169, 98, 385, 2, 387, 373, - /* 2050 */ 22, 100, 47, 240, 378, 101, 100, 22, 35, 47, - /* 2060 */ 101, 385, 35, 387, 101, 35, 259, 468, 253, 101, - /* 2070 */ 373, 100, 100, 100, 100, 35, 101, 100, 100, 218, - /* 2080 */ 419, 111, 385, 422, 387, 101, 425, 426, 427, 428, - /* 2090 */ 429, 430, 101, 432, 100, 419, 101, 35, 422, 336, - /* 2100 */ 100, 425, 426, 427, 428, 429, 430, 220, 432, 346, - /* 2110 */ 35, 122, 122, 44, 35, 101, 419, 100, 122, 422, - /* 2120 */ 100, 122, 425, 426, 427, 428, 429, 430, 22, 432, - /* 2130 */ 66, 434, 100, 100, 35, 65, 373, 35, 477, 35, - /* 2140 */ 35, 378, 94, 35, 35, 35, 35, 44, 385, 72, - /* 2150 */ 387, 35, 35, 35, 22, 35, 35, 35, 72, 35, - /* 2160 */ 35, 35, 336, 35, 35, 22, 35, 0, 35, 39, - /* 2170 */ 0, 35, 346, 35, 39, 0, 49, 336, 39, 0, - /* 2180 */ 35, 39, 419, 49, 0, 422, 49, 346, 425, 426, - /* 2190 */ 427, 428, 429, 430, 35, 432, 49, 35, 0, 373, - /* 2200 */ 22, 21, 20, 22, 378, 22, 21, 480, 480, 480, - /* 2210 */ 480, 385, 480, 387, 373, 480, 480, 480, 480, 480, - /* 2220 */ 480, 480, 480, 480, 480, 480, 385, 336, 387, 480, - /* 2230 */ 480, 480, 480, 480, 480, 480, 480, 346, 480, 480, - /* 2240 */ 480, 480, 480, 480, 480, 419, 480, 336, 422, 480, - /* 2250 */ 480, 425, 426, 427, 428, 429, 430, 346, 432, 480, - /* 2260 */ 419, 480, 480, 422, 373, 480, 425, 426, 427, 428, - /* 2270 */ 429, 430, 480, 432, 480, 480, 385, 480, 387, 480, - /* 2280 */ 480, 480, 480, 480, 373, 480, 480, 480, 480, 480, - /* 2290 */ 480, 480, 480, 480, 480, 480, 385, 336, 387, 480, - /* 2300 */ 480, 480, 480, 480, 480, 480, 480, 346, 480, 480, - /* 2310 */ 419, 480, 480, 422, 480, 480, 425, 426, 427, 428, - /* 2320 */ 429, 430, 336, 432, 480, 480, 480, 480, 480, 480, - /* 2330 */ 419, 480, 346, 422, 373, 480, 425, 426, 427, 428, - /* 2340 */ 429, 430, 480, 432, 480, 480, 385, 480, 387, 480, - /* 2350 */ 480, 480, 480, 480, 480, 336, 480, 480, 480, 373, - /* 2360 */ 480, 480, 480, 480, 480, 346, 480, 480, 480, 480, - /* 2370 */ 480, 385, 480, 387, 480, 480, 480, 480, 480, 480, - /* 2380 */ 419, 480, 480, 422, 480, 336, 425, 426, 427, 428, - /* 2390 */ 429, 430, 373, 432, 480, 346, 480, 480, 480, 480, - /* 2400 */ 480, 480, 480, 480, 385, 419, 387, 480, 422, 480, - /* 2410 */ 480, 425, 426, 427, 428, 429, 430, 480, 432, 480, - /* 2420 */ 480, 336, 373, 480, 480, 480, 480, 480, 480, 480, - /* 2430 */ 480, 346, 480, 480, 385, 480, 387, 480, 419, 480, - /* 2440 */ 480, 422, 480, 336, 425, 426, 427, 428, 429, 430, - /* 2450 */ 480, 432, 480, 346, 480, 480, 480, 480, 373, 480, - /* 2460 */ 480, 480, 480, 480, 480, 480, 480, 480, 419, 480, - /* 2470 */ 385, 422, 387, 480, 425, 426, 427, 428, 429, 430, - /* 2480 */ 373, 432, 480, 480, 480, 480, 480, 480, 480, 480, - /* 2490 */ 480, 480, 385, 480, 387, 480, 480, 480, 480, 480, - /* 2500 */ 480, 480, 480, 480, 419, 480, 480, 422, 480, 336, - /* 2510 */ 425, 426, 427, 428, 429, 430, 480, 432, 480, 346, - /* 2520 */ 480, 480, 480, 480, 480, 480, 419, 480, 336, 422, - /* 2530 */ 480, 480, 425, 426, 427, 428, 429, 430, 346, 432, - /* 2540 */ 480, 480, 480, 480, 480, 480, 373, 480, 480, 480, - /* 2550 */ 480, 480, 480, 480, 480, 480, 480, 480, 385, 480, - /* 2560 */ 387, 480, 480, 480, 480, 373, 480, 480, 480, 480, - /* 2570 */ 480, 480, 480, 480, 480, 480, 480, 385, 480, 387, - /* 2580 */ 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, - /* 2590 */ 480, 480, 419, 480, 336, 422, 480, 480, 425, 426, - /* 2600 */ 427, 428, 429, 430, 346, 432, 480, 480, 480, 480, - /* 2610 */ 480, 419, 480, 336, 422, 480, 480, 425, 426, 427, - /* 2620 */ 428, 429, 430, 346, 432, 480, 480, 480, 480, 480, - /* 2630 */ 480, 373, 480, 480, 480, 480, 480, 480, 480, 480, - /* 2640 */ 480, 480, 480, 385, 336, 387, 480, 480, 480, 480, - /* 2650 */ 373, 480, 480, 480, 346, 480, 480, 480, 480, 480, - /* 2660 */ 480, 480, 385, 480, 387, 480, 480, 480, 480, 480, - /* 2670 */ 480, 480, 480, 480, 480, 480, 480, 419, 480, 480, - /* 2680 */ 422, 373, 480, 425, 426, 427, 428, 429, 430, 480, - /* 2690 */ 432, 480, 480, 385, 480, 387, 419, 480, 480, 422, - /* 2700 */ 480, 480, 425, 426, 427, 428, 429, 430, 336, 432, - /* 2710 */ 480, 480, 480, 480, 480, 480, 480, 480, 346, 480, - /* 2720 */ 480, 480, 480, 480, 480, 480, 480, 419, 480, 336, - /* 2730 */ 422, 480, 480, 425, 426, 427, 428, 429, 430, 346, - /* 2740 */ 432, 480, 480, 480, 480, 373, 480, 480, 480, 480, - /* 2750 */ 480, 480, 480, 480, 480, 480, 480, 385, 336, 387, - /* 2760 */ 480, 480, 480, 480, 480, 480, 373, 480, 346, 480, - /* 2770 */ 480, 480, 480, 480, 480, 480, 480, 480, 385, 480, - /* 2780 */ 387, 480, 480, 480, 480, 480, 480, 480, 480, 480, - /* 2790 */ 480, 419, 480, 480, 422, 373, 480, 425, 426, 427, - /* 2800 */ 428, 429, 430, 480, 432, 480, 480, 385, 480, 387, - /* 2810 */ 480, 480, 419, 480, 480, 422, 336, 480, 425, 426, - /* 2820 */ 427, 428, 429, 430, 480, 432, 346, 480, 480, 480, - /* 2830 */ 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, - /* 2840 */ 480, 419, 480, 480, 422, 480, 336, 425, 426, 427, - /* 2850 */ 428, 429, 430, 373, 432, 480, 346, 480, 480, 480, - /* 2860 */ 480, 480, 480, 480, 480, 385, 336, 387, 480, 480, - /* 2870 */ 480, 480, 480, 480, 480, 480, 346, 480, 480, 480, - /* 2880 */ 480, 480, 480, 373, 480, 480, 480, 480, 480, 480, - /* 2890 */ 480, 480, 480, 480, 480, 385, 480, 387, 480, 419, - /* 2900 */ 480, 480, 422, 373, 480, 425, 426, 427, 428, 429, - /* 2910 */ 430, 480, 432, 480, 336, 385, 480, 387, 480, 480, - /* 2920 */ 480, 480, 480, 480, 346, 480, 480, 480, 480, 419, - /* 2930 */ 480, 336, 422, 480, 480, 425, 426, 427, 428, 429, - /* 2940 */ 430, 346, 432, 480, 480, 480, 480, 480, 480, 419, - /* 2950 */ 480, 373, 422, 480, 480, 425, 426, 427, 428, 429, - /* 2960 */ 430, 480, 432, 385, 480, 387, 480, 480, 373, 480, - /* 2970 */ 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, - /* 2980 */ 385, 480, 387, 480, 480, 480, 480, 480, 480, 480, - /* 2990 */ 480, 480, 480, 480, 480, 480, 480, 419, 480, 480, - /* 3000 */ 422, 480, 480, 425, 426, 427, 428, 429, 430, 480, - /* 3010 */ 432, 480, 480, 480, 419, 480, 480, 422, 480, 480, - /* 3020 */ 425, 426, 427, 428, 429, 430, 480, 432, + /* 120 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + /* 130 */ 448, 449, 450, 451, 99, 453, 454, 21, 138, 139, + /* 140 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 114, + /* 150 */ 115, 116, 117, 118, 119, 120, 121, 122, 123, 20, + /* 160 */ 125, 126, 127, 128, 129, 130, 138, 139, 168, 169, + /* 170 */ 347, 348, 8, 9, 174, 175, 12, 13, 14, 15, + /* 180 */ 16, 131, 132, 133, 134, 135, 136, 137, 188, 366, + /* 190 */ 190, 102, 347, 12, 13, 131, 373, 8, 9, 135, + /* 200 */ 406, 12, 13, 14, 15, 16, 131, 132, 133, 134, + /* 210 */ 135, 136, 137, 20, 170, 342, 35, 20, 345, 346, + /* 220 */ 220, 221, 66, 223, 224, 225, 226, 227, 228, 229, + /* 230 */ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + /* 240 */ 240, 12, 13, 398, 338, 400, 18, 453, 20, 20, + /* 250 */ 456, 22, 1, 2, 348, 27, 67, 389, 30, 20, + /* 260 */ 20, 33, 33, 102, 35, 471, 472, 69, 70, 71, + /* 270 */ 476, 477, 404, 405, 76, 77, 78, 49, 363, 51, + /* 280 */ 82, 375, 33, 55, 4, 87, 88, 89, 90, 0, + /* 290 */ 61, 93, 377, 387, 375, 389, 67, 375, 49, 4, + /* 300 */ 111, 382, 387, 74, 382, 56, 57, 58, 59, 390, + /* 310 */ 61, 375, 390, 24, 25, 26, 27, 28, 29, 30, + /* 320 */ 31, 32, 337, 43, 339, 45, 46, 421, 99, 101, + /* 330 */ 424, 102, 396, 427, 428, 429, 430, 431, 432, 424, + /* 340 */ 434, 113, 102, 426, 180, 439, 257, 441, 375, 434, + /* 350 */ 101, 445, 446, 104, 103, 382, 167, 385, 406, 66, + /* 360 */ 388, 389, 410, 390, 458, 168, 169, 138, 139, 452, + /* 370 */ 142, 190, 466, 145, 146, 147, 148, 149, 150, 151, + /* 380 */ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + /* 390 */ 343, 163, 164, 165, 347, 20, 349, 168, 169, 0, + /* 400 */ 20, 347, 348, 174, 175, 453, 8, 9, 456, 3, + /* 410 */ 12, 13, 14, 15, 16, 375, 37, 188, 257, 190, + /* 420 */ 171, 172, 382, 471, 472, 176, 20, 178, 476, 477, + /* 430 */ 390, 335, 389, 244, 245, 246, 247, 248, 249, 250, + /* 440 */ 251, 252, 253, 254, 401, 196, 282, 404, 405, 220, + /* 450 */ 221, 348, 223, 224, 225, 226, 227, 228, 229, 230, + /* 460 */ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + /* 470 */ 241, 12, 13, 355, 355, 367, 347, 102, 375, 20, + /* 480 */ 347, 22, 338, 375, 105, 347, 107, 108, 338, 110, + /* 490 */ 372, 383, 33, 453, 35, 220, 456, 257, 348, 381, + /* 500 */ 381, 103, 406, 449, 450, 451, 410, 453, 454, 103, + /* 510 */ 131, 471, 472, 338, 135, 375, 476, 477, 138, 139, + /* 520 */ 61, 347, 348, 348, 391, 375, 67, 398, 83, 400, + /* 530 */ 390, 387, 429, 74, 347, 348, 398, 387, 400, 389, + /* 540 */ 366, 173, 267, 268, 269, 270, 271, 272, 273, 453, + /* 550 */ 375, 338, 456, 258, 174, 175, 157, 4, 99, 49, + /* 560 */ 353, 102, 387, 20, 389, 166, 56, 471, 472, 59, + /* 570 */ 60, 421, 476, 477, 424, 0, 170, 427, 428, 429, + /* 580 */ 430, 431, 432, 241, 434, 378, 8, 9, 143, 144, + /* 590 */ 12, 13, 14, 15, 16, 21, 421, 138, 139, 424, + /* 600 */ 387, 113, 427, 428, 429, 430, 431, 432, 34, 434, + /* 610 */ 36, 166, 437, 14, 439, 440, 441, 467, 468, 20, + /* 620 */ 445, 446, 375, 20, 132, 133, 22, 168, 169, 137, + /* 630 */ 262, 263, 264, 174, 175, 426, 449, 450, 451, 35, + /* 640 */ 453, 454, 395, 396, 69, 70, 71, 188, 375, 190, + /* 650 */ 133, 76, 77, 78, 137, 102, 383, 82, 338, 113, + /* 660 */ 14, 452, 87, 88, 89, 90, 20, 338, 93, 131, + /* 670 */ 132, 133, 134, 135, 136, 137, 61, 348, 74, 220, + /* 680 */ 221, 103, 223, 224, 225, 226, 227, 228, 229, 230, + /* 690 */ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + /* 700 */ 12, 13, 14, 99, 375, 102, 74, 387, 20, 35, + /* 710 */ 22, 20, 102, 22, 197, 338, 387, 200, 389, 104, + /* 720 */ 203, 33, 205, 35, 2, 348, 35, 350, 347, 348, + /* 730 */ 8, 9, 347, 348, 12, 13, 14, 15, 16, 39, + /* 740 */ 347, 348, 338, 426, 53, 61, 74, 366, 74, 61, + /* 750 */ 421, 366, 375, 424, 347, 348, 427, 428, 429, 430, + /* 760 */ 431, 432, 74, 434, 387, 406, 389, 168, 439, 452, + /* 770 */ 441, 2, 338, 366, 445, 446, 35, 8, 9, 12, + /* 780 */ 13, 12, 13, 14, 15, 16, 102, 99, 104, 22, + /* 790 */ 102, 387, 188, 0, 190, 466, 44, 187, 421, 189, + /* 800 */ 33, 424, 35, 338, 427, 428, 429, 430, 431, 432, + /* 810 */ 257, 434, 453, 348, 168, 456, 439, 13, 441, 347, + /* 820 */ 348, 387, 445, 446, 220, 221, 138, 139, 61, 219, + /* 830 */ 471, 472, 347, 348, 376, 476, 477, 367, 366, 35, + /* 840 */ 375, 74, 449, 450, 451, 375, 453, 454, 241, 456, + /* 850 */ 243, 366, 387, 383, 389, 103, 168, 169, 338, 66, + /* 860 */ 257, 338, 174, 175, 471, 472, 99, 257, 375, 476, + /* 870 */ 477, 347, 348, 360, 361, 382, 188, 363, 190, 453, + /* 880 */ 376, 453, 456, 390, 456, 338, 421, 347, 348, 424, + /* 890 */ 366, 377, 427, 428, 429, 430, 431, 432, 472, 434, + /* 900 */ 472, 387, 476, 477, 476, 477, 366, 387, 220, 221, + /* 910 */ 387, 223, 224, 225, 226, 227, 228, 229, 230, 231, + /* 920 */ 232, 233, 234, 235, 236, 237, 238, 239, 240, 12, + /* 930 */ 13, 190, 347, 348, 387, 338, 338, 20, 424, 22, + /* 940 */ 22, 257, 3, 478, 479, 348, 367, 350, 434, 376, + /* 950 */ 33, 366, 35, 35, 375, 188, 256, 190, 338, 8, + /* 960 */ 9, 338, 383, 12, 13, 14, 15, 16, 368, 8, + /* 970 */ 9, 371, 375, 12, 13, 14, 15, 16, 61, 20, + /* 980 */ 347, 348, 388, 389, 387, 387, 389, 220, 221, 347, + /* 990 */ 348, 74, 347, 348, 347, 348, 22, 0, 406, 366, + /* 1000 */ 233, 234, 235, 236, 237, 238, 239, 387, 366, 35, + /* 1010 */ 387, 366, 348, 366, 20, 376, 99, 99, 421, 102, + /* 1020 */ 20, 424, 22, 338, 427, 428, 429, 430, 431, 432, + /* 1030 */ 132, 434, 4, 348, 384, 350, 439, 387, 441, 347, + /* 1040 */ 348, 384, 445, 446, 387, 453, 167, 19, 456, 338, + /* 1050 */ 61, 347, 348, 53, 183, 138, 139, 393, 366, 338, + /* 1060 */ 375, 33, 338, 471, 472, 347, 348, 20, 476, 477, + /* 1070 */ 366, 338, 387, 99, 389, 347, 348, 49, 347, 348, + /* 1080 */ 20, 210, 211, 55, 366, 168, 169, 360, 361, 61, + /* 1090 */ 101, 174, 175, 104, 366, 45, 46, 366, 387, 201, + /* 1100 */ 202, 14, 15, 16, 14, 188, 421, 190, 387, 424, + /* 1110 */ 20, 387, 427, 428, 429, 430, 431, 432, 338, 434, + /* 1120 */ 387, 170, 406, 244, 439, 338, 441, 168, 338, 101, + /* 1130 */ 445, 446, 104, 254, 338, 255, 256, 220, 221, 348, + /* 1140 */ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + /* 1150 */ 233, 234, 235, 236, 237, 238, 239, 240, 12, 13, + /* 1160 */ 348, 338, 363, 438, 170, 440, 20, 387, 22, 453, + /* 1170 */ 0, 348, 456, 350, 387, 362, 377, 387, 365, 33, + /* 1180 */ 438, 35, 440, 387, 393, 113, 387, 471, 472, 22, + /* 1190 */ 48, 384, 476, 477, 387, 42, 0, 44, 375, 42, + /* 1200 */ 106, 44, 35, 109, 0, 393, 106, 61, 44, 109, + /* 1210 */ 387, 214, 389, 13, 0, 106, 277, 170, 109, 49, + /* 1220 */ 74, 0, 106, 424, 425, 109, 22, 204, 44, 206, + /* 1230 */ 170, 44, 44, 434, 162, 35, 22, 44, 44, 44, + /* 1240 */ 44, 138, 139, 22, 421, 99, 44, 424, 102, 67, + /* 1250 */ 427, 428, 429, 430, 431, 432, 44, 434, 47, 44, + /* 1260 */ 44, 0, 439, 35, 441, 102, 44, 103, 445, 446, + /* 1270 */ 44, 1, 2, 44, 44, 112, 44, 13, 13, 44, + /* 1280 */ 44, 44, 44, 44, 138, 139, 376, 103, 35, 376, + /* 1290 */ 103, 103, 376, 411, 364, 339, 103, 103, 397, 35, + /* 1300 */ 35, 480, 469, 18, 351, 103, 463, 363, 23, 363, + /* 1310 */ 375, 50, 170, 102, 168, 169, 351, 397, 103, 103, + /* 1320 */ 174, 175, 37, 38, 346, 103, 41, 74, 348, 103, + /* 1330 */ 397, 386, 103, 103, 188, 103, 190, 52, 103, 103, + /* 1340 */ 103, 103, 103, 455, 447, 473, 457, 62, 63, 64, + /* 1350 */ 65, 259, 423, 49, 422, 338, 20, 415, 203, 355, + /* 1360 */ 420, 355, 415, 186, 42, 348, 220, 221, 408, 223, + /* 1370 */ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + /* 1380 */ 234, 235, 236, 237, 238, 239, 240, 102, 20, 394, + /* 1390 */ 397, 167, 375, 394, 392, 20, 347, 394, 347, 392, + /* 1400 */ 392, 100, 220, 359, 387, 98, 389, 97, 347, 347, + /* 1410 */ 358, 357, 347, 347, 20, 340, 415, 48, 190, 340, + /* 1420 */ 344, 344, 355, 20, 338, 140, 389, 20, 355, 349, + /* 1430 */ 20, 407, 349, 355, 348, 347, 350, 355, 421, 355, + /* 1440 */ 355, 424, 54, 352, 427, 428, 429, 430, 431, 432, + /* 1450 */ 355, 434, 340, 352, 340, 347, 439, 387, 441, 207, + /* 1460 */ 419, 375, 445, 446, 375, 180, 181, 182, 375, 102, + /* 1470 */ 185, 375, 375, 387, 279, 389, 417, 375, 415, 375, + /* 1480 */ 375, 375, 375, 198, 199, 375, 338, 353, 375, 194, + /* 1490 */ 193, 353, 192, 281, 209, 414, 348, 212, 350, 347, + /* 1500 */ 215, 216, 217, 218, 219, 387, 387, 421, 397, 389, + /* 1510 */ 424, 413, 338, 427, 428, 429, 430, 431, 432, 397, + /* 1520 */ 434, 266, 348, 375, 387, 439, 462, 441, 265, 412, + /* 1530 */ 402, 445, 446, 462, 387, 387, 387, 389, 402, 465, + /* 1540 */ 274, 387, 257, 179, 276, 283, 275, 260, 423, 375, + /* 1550 */ 481, 278, 280, 348, 256, 20, 426, 347, 349, 353, + /* 1560 */ 461, 387, 20, 389, 402, 400, 353, 387, 387, 421, + /* 1570 */ 387, 402, 424, 387, 459, 427, 428, 429, 430, 431, + /* 1580 */ 432, 172, 434, 460, 387, 464, 338, 439, 462, 441, + /* 1590 */ 387, 399, 102, 445, 446, 421, 348, 353, 424, 475, + /* 1600 */ 353, 427, 428, 429, 430, 431, 432, 474, 434, 102, + /* 1610 */ 444, 371, 379, 439, 387, 441, 365, 348, 36, 445, + /* 1620 */ 446, 347, 341, 375, 340, 369, 409, 369, 353, 369, + /* 1630 */ 354, 0, 336, 0, 416, 387, 0, 389, 42, 0, + /* 1640 */ 35, 213, 35, 35, 403, 403, 35, 338, 0, 213, + /* 1650 */ 35, 35, 213, 0, 213, 0, 35, 348, 35, 22, + /* 1660 */ 0, 208, 0, 196, 0, 196, 190, 197, 188, 421, + /* 1670 */ 0, 0, 424, 338, 0, 427, 428, 429, 430, 431, + /* 1680 */ 432, 0, 434, 348, 375, 184, 183, 439, 0, 441, + /* 1690 */ 0, 47, 0, 445, 446, 0, 387, 0, 389, 42, + /* 1700 */ 0, 0, 0, 0, 0, 0, 0, 0, 157, 338, + /* 1710 */ 375, 35, 0, 157, 0, 0, 0, 0, 0, 348, + /* 1720 */ 42, 0, 387, 0, 389, 0, 0, 0, 0, 0, + /* 1730 */ 421, 0, 0, 424, 0, 0, 427, 428, 429, 430, + /* 1740 */ 431, 432, 0, 434, 0, 0, 375, 0, 0, 0, + /* 1750 */ 441, 0, 22, 0, 445, 446, 421, 0, 387, 424, + /* 1760 */ 389, 141, 427, 428, 429, 430, 431, 432, 0, 434, + /* 1770 */ 0, 0, 22, 338, 22, 35, 441, 0, 0, 0, + /* 1780 */ 445, 446, 179, 348, 48, 48, 0, 49, 0, 0, + /* 1790 */ 35, 0, 421, 35, 61, 424, 35, 338, 427, 428, + /* 1800 */ 429, 430, 431, 432, 61, 434, 39, 348, 49, 49, + /* 1810 */ 375, 39, 441, 39, 0, 61, 445, 446, 42, 35, + /* 1820 */ 39, 14, 387, 0, 389, 0, 39, 47, 0, 44, + /* 1830 */ 0, 0, 0, 40, 375, 39, 0, 47, 0, 47, + /* 1840 */ 0, 68, 39, 35, 49, 0, 387, 35, 389, 49, + /* 1850 */ 39, 0, 35, 49, 39, 0, 421, 35, 49, 424, + /* 1860 */ 39, 338, 427, 428, 429, 430, 431, 432, 0, 434, + /* 1870 */ 0, 348, 0, 0, 111, 109, 441, 35, 22, 0, + /* 1880 */ 421, 446, 1, 424, 35, 35, 427, 428, 429, 430, + /* 1890 */ 431, 432, 44, 434, 35, 35, 35, 35, 375, 35, + /* 1900 */ 19, 35, 44, 380, 35, 22, 35, 0, 22, 0, + /* 1910 */ 387, 22, 389, 0, 33, 22, 51, 35, 0, 338, + /* 1920 */ 35, 0, 35, 0, 22, 20, 35, 468, 102, 348, + /* 1930 */ 49, 35, 35, 0, 170, 338, 103, 56, 57, 58, + /* 1940 */ 59, 102, 61, 35, 421, 348, 22, 424, 0, 22, + /* 1950 */ 427, 428, 429, 430, 431, 432, 375, 434, 0, 0, + /* 1960 */ 195, 380, 48, 3, 170, 102, 191, 100, 387, 172, + /* 1970 */ 389, 170, 375, 44, 261, 177, 48, 103, 102, 44, + /* 1980 */ 44, 103, 101, 103, 387, 104, 389, 103, 98, 47, + /* 1990 */ 102, 44, 3, 47, 102, 44, 338, 102, 44, 35, + /* 2000 */ 102, 35, 421, 103, 103, 424, 348, 261, 427, 428, + /* 2010 */ 429, 430, 431, 432, 35, 434, 35, 136, 421, 35, + /* 2020 */ 35, 424, 338, 261, 427, 428, 429, 430, 431, 432, + /* 2030 */ 47, 434, 348, 375, 103, 103, 44, 47, 255, 0, + /* 2040 */ 0, 0, 0, 102, 39, 387, 47, 389, 173, 0, + /* 2050 */ 39, 102, 171, 103, 47, 103, 112, 176, 338, 375, + /* 2060 */ 44, 242, 47, 102, 380, 102, 2, 470, 348, 102, + /* 2070 */ 171, 387, 102, 389, 100, 100, 22, 196, 102, 421, + /* 2080 */ 103, 103, 424, 103, 102, 427, 428, 429, 430, 431, + /* 2090 */ 432, 47, 434, 102, 338, 375, 102, 102, 22, 103, + /* 2100 */ 102, 113, 35, 103, 348, 421, 35, 387, 424, 389, + /* 2110 */ 102, 427, 428, 429, 430, 431, 432, 103, 434, 35, + /* 2120 */ 338, 102, 35, 220, 103, 102, 222, 103, 35, 102, + /* 2130 */ 348, 375, 103, 35, 102, 102, 380, 479, 44, 102, + /* 2140 */ 35, 421, 124, 387, 424, 389, 124, 427, 428, 429, + /* 2150 */ 430, 431, 432, 102, 434, 124, 436, 375, 124, 22, + /* 2160 */ 68, 35, 380, 67, 35, 35, 35, 35, 35, 387, + /* 2170 */ 35, 389, 44, 74, 35, 96, 35, 421, 35, 35, + /* 2180 */ 424, 22, 35, 427, 428, 429, 430, 431, 432, 35, + /* 2190 */ 434, 35, 74, 35, 22, 338, 35, 35, 35, 35, + /* 2200 */ 35, 0, 35, 421, 49, 348, 424, 39, 0, 427, + /* 2210 */ 428, 429, 430, 431, 432, 338, 434, 35, 49, 39, + /* 2220 */ 0, 0, 35, 49, 39, 348, 35, 49, 39, 0, + /* 2230 */ 35, 35, 375, 0, 22, 21, 482, 22, 22, 21, + /* 2240 */ 482, 482, 20, 482, 387, 482, 389, 482, 482, 482, + /* 2250 */ 482, 482, 375, 482, 482, 482, 482, 482, 482, 482, + /* 2260 */ 482, 482, 482, 482, 387, 482, 389, 482, 482, 482, + /* 2270 */ 482, 482, 482, 482, 482, 482, 482, 482, 421, 482, + /* 2280 */ 482, 424, 482, 338, 427, 428, 429, 430, 431, 432, + /* 2290 */ 482, 434, 482, 348, 482, 482, 482, 482, 421, 482, + /* 2300 */ 338, 424, 482, 482, 427, 428, 429, 430, 431, 432, + /* 2310 */ 348, 434, 482, 482, 482, 482, 482, 482, 482, 482, + /* 2320 */ 375, 482, 482, 482, 482, 482, 482, 482, 482, 482, + /* 2330 */ 482, 482, 387, 482, 389, 482, 482, 375, 482, 482, + /* 2340 */ 482, 482, 482, 482, 482, 482, 482, 482, 338, 387, + /* 2350 */ 482, 389, 482, 482, 482, 482, 482, 482, 348, 482, + /* 2360 */ 482, 482, 482, 482, 482, 482, 421, 482, 338, 424, + /* 2370 */ 482, 482, 427, 428, 429, 430, 431, 432, 348, 434, + /* 2380 */ 482, 482, 482, 421, 482, 375, 424, 482, 482, 427, + /* 2390 */ 428, 429, 430, 431, 432, 482, 434, 387, 338, 389, + /* 2400 */ 482, 482, 482, 482, 482, 375, 482, 482, 348, 482, + /* 2410 */ 482, 482, 482, 482, 482, 482, 338, 387, 482, 389, + /* 2420 */ 482, 482, 482, 482, 482, 482, 348, 482, 482, 482, + /* 2430 */ 482, 421, 482, 482, 424, 375, 482, 427, 428, 429, + /* 2440 */ 430, 431, 432, 482, 434, 482, 338, 387, 482, 389, + /* 2450 */ 482, 421, 482, 375, 424, 482, 348, 427, 428, 429, + /* 2460 */ 430, 431, 432, 482, 434, 387, 482, 389, 482, 482, + /* 2470 */ 482, 482, 482, 482, 482, 482, 338, 482, 482, 482, + /* 2480 */ 482, 421, 482, 375, 424, 482, 348, 427, 428, 429, + /* 2490 */ 430, 431, 432, 482, 434, 387, 482, 389, 482, 421, + /* 2500 */ 482, 482, 424, 482, 482, 427, 428, 429, 430, 431, + /* 2510 */ 432, 482, 434, 375, 482, 482, 482, 482, 482, 482, + /* 2520 */ 482, 482, 482, 482, 338, 387, 482, 389, 482, 421, + /* 2530 */ 482, 482, 424, 482, 348, 427, 428, 429, 430, 431, + /* 2540 */ 432, 482, 434, 482, 338, 482, 482, 482, 482, 482, + /* 2550 */ 482, 482, 482, 482, 348, 482, 482, 482, 482, 421, + /* 2560 */ 482, 375, 424, 482, 482, 427, 428, 429, 430, 431, + /* 2570 */ 432, 482, 434, 387, 482, 389, 482, 482, 482, 482, + /* 2580 */ 482, 375, 482, 482, 482, 482, 482, 482, 482, 482, + /* 2590 */ 482, 482, 482, 387, 482, 389, 482, 482, 482, 482, + /* 2600 */ 482, 482, 482, 482, 482, 482, 482, 421, 482, 482, + /* 2610 */ 424, 482, 482, 427, 428, 429, 430, 431, 432, 482, + /* 2620 */ 434, 482, 338, 482, 482, 482, 482, 421, 482, 482, + /* 2630 */ 424, 482, 348, 427, 428, 429, 430, 431, 432, 338, + /* 2640 */ 434, 482, 482, 482, 482, 482, 482, 482, 482, 348, + /* 2650 */ 482, 482, 482, 482, 482, 482, 482, 482, 482, 375, + /* 2660 */ 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, + /* 2670 */ 482, 387, 482, 389, 482, 482, 375, 482, 482, 482, + /* 2680 */ 482, 482, 482, 482, 482, 482, 482, 338, 387, 482, + /* 2690 */ 389, 482, 482, 482, 482, 482, 482, 348, 482, 482, + /* 2700 */ 482, 482, 482, 482, 482, 421, 482, 338, 424, 482, + /* 2710 */ 482, 427, 428, 429, 430, 431, 432, 348, 434, 482, + /* 2720 */ 482, 482, 421, 482, 375, 424, 482, 482, 427, 428, + /* 2730 */ 429, 430, 431, 432, 482, 434, 387, 338, 389, 482, + /* 2740 */ 482, 482, 482, 482, 375, 482, 482, 348, 482, 482, + /* 2750 */ 482, 482, 482, 482, 482, 338, 387, 482, 389, 482, + /* 2760 */ 482, 482, 482, 482, 482, 348, 482, 482, 482, 482, + /* 2770 */ 421, 482, 482, 424, 375, 482, 427, 428, 429, 430, + /* 2780 */ 431, 432, 482, 434, 482, 338, 387, 482, 389, 482, + /* 2790 */ 421, 482, 375, 424, 482, 348, 427, 428, 429, 430, + /* 2800 */ 431, 432, 482, 434, 387, 482, 389, 482, 482, 482, + /* 2810 */ 482, 482, 482, 482, 482, 338, 482, 482, 482, 482, + /* 2820 */ 421, 482, 375, 424, 482, 348, 427, 428, 429, 430, + /* 2830 */ 431, 432, 482, 434, 387, 482, 389, 482, 421, 482, + /* 2840 */ 482, 424, 482, 482, 427, 428, 429, 430, 431, 432, + /* 2850 */ 482, 434, 375, 482, 482, 482, 482, 482, 482, 482, + /* 2860 */ 482, 482, 482, 338, 387, 482, 389, 482, 421, 482, + /* 2870 */ 482, 424, 482, 348, 427, 428, 429, 430, 431, 432, + /* 2880 */ 482, 434, 482, 338, 482, 482, 482, 482, 482, 482, + /* 2890 */ 482, 482, 482, 348, 482, 482, 482, 482, 421, 482, + /* 2900 */ 375, 424, 482, 482, 427, 428, 429, 430, 431, 432, + /* 2910 */ 482, 434, 387, 482, 389, 482, 482, 482, 482, 482, + /* 2920 */ 375, 482, 482, 482, 482, 482, 482, 482, 482, 482, + /* 2930 */ 482, 482, 387, 482, 389, 482, 482, 482, 482, 482, + /* 2940 */ 482, 482, 482, 482, 482, 482, 421, 482, 482, 424, + /* 2950 */ 482, 482, 427, 428, 429, 430, 431, 432, 482, 434, + /* 2960 */ 482, 482, 482, 482, 482, 482, 421, 482, 482, 424, + /* 2970 */ 482, 482, 427, 428, 429, 430, 431, 432, 482, 434, + /* 2980 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 2990 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3000 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3010 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3020 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3030 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3040 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3050 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3060 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3070 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3080 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3090 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3100 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3110 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3120 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3130 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3140 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3150 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3160 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3170 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3180 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3190 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3200 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3210 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3220 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3230 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3240 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3250 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3260 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3270 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3280 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3290 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3300 */ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + /* 3310 */ 335, 335, 335, 335, 335, }; -#define YY_SHIFT_COUNT (771) +#define YY_SHIFT_COUNT (786) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2198) +#define YY_SHIFT_MAX (2233) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 380, 0, 227, 0, 455, 455, 455, 455, 455, 455, - /* 10 */ 455, 455, 455, 455, 455, 455, 682, 909, 909, 1136, - /* 20 */ 909, 909, 909, 909, 909, 909, 909, 909, 909, 909, - /* 30 */ 909, 909, 909, 909, 909, 909, 909, 909, 909, 909, - /* 40 */ 909, 909, 909, 909, 909, 909, 909, 909, 909, 909, - /* 50 */ 909, 78, 454, 401, 200, 711, 43, 228, 43, 200, - /* 60 */ 200, 1284, 43, 1284, 1284, 91, 43, 18, 1014, 149, - /* 70 */ 149, 1014, 322, 322, 145, 121, 262, 262, 149, 149, - /* 80 */ 149, 149, 149, 149, 149, 154, 149, 149, 6, 18, - /* 90 */ 149, 149, 177, 149, 18, 149, 154, 149, 154, 18, - /* 100 */ 149, 149, 18, 149, 18, 18, 18, 149, 199, 226, - /* 110 */ 187, 187, 418, 50, 314, 314, 314, 314, 314, 314, - /* 120 */ 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, - /* 130 */ 314, 314, 314, 965, 394, 145, 121, 539, 328, 328, - /* 140 */ 328, 838, 300, 300, 539, 275, 275, 275, 6, 208, - /* 150 */ 330, 18, 548, 18, 548, 548, 686, 758, 35, 35, - /* 160 */ 35, 35, 35, 35, 35, 35, 1596, 645, 15, 48, - /* 170 */ 167, 279, 32, 363, 792, 792, 728, 764, 33, 794, - /* 180 */ 1108, 315, 879, 856, 939, 946, 945, 939, 1152, 963, - /* 190 */ 1065, 1125, 1341, 1379, 1200, 6, 1379, 6, 1223, 1366, - /* 200 */ 1390, 1366, 1250, 1397, 1397, 1366, 1250, 1250, 1325, 1331, - /* 210 */ 1397, 1335, 1397, 1397, 1397, 1415, 1389, 1415, 1389, 1379, - /* 220 */ 6, 1422, 6, 1427, 1428, 6, 1427, 6, 6, 6, - /* 230 */ 1397, 6, 1399, 1399, 1415, 18, 18, 18, 18, 18, - /* 240 */ 18, 18, 18, 18, 18, 18, 1397, 1415, 548, 548, - /* 250 */ 548, 1252, 1393, 1379, 199, 1297, 1309, 1422, 199, 1318, - /* 260 */ 1397, 1390, 1390, 548, 1246, 1263, 548, 1246, 1263, 548, - /* 270 */ 548, 18, 1256, 1358, 1246, 1267, 1269, 1289, 1125, 1271, - /* 280 */ 1272, 1279, 1302, 275, 1541, 1397, 1427, 199, 199, 1554, - /* 290 */ 1263, 548, 548, 548, 548, 548, 1263, 548, 1424, 199, - /* 300 */ 686, 199, 275, 1501, 1509, 548, 758, 1397, 199, 1584, - /* 310 */ 1415, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3028, - /* 320 */ 34, 232, 278, 791, 731, 592, 750, 642, 16, 850, - /* 330 */ 1049, 821, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, - /* 340 */ 1093, 985, 281, 457, 457, 948, 133, 241, 69, 182, - /* 350 */ 456, 625, 440, 63, 63, 376, 896, 80, 376, 376, - /* 360 */ 376, 1212, 867, 1140, 1180, 1165, 1107, 1206, 1117, 1122, - /* 370 */ 1128, 1139, 1209, 1214, 1237, 1257, 1264, 1012, 1203, 1222, - /* 380 */ 1216, 1224, 1227, 1232, 1153, 717, 1009, 503, 1234, 1247, - /* 390 */ 1251, 1276, 1277, 1282, 1299, 1283, 1174, 1285, 489, 1287, - /* 400 */ 1288, 1290, 1292, 1293, 1295, 1205, 1225, 1258, 1303, 1363, - /* 410 */ 666, 1262, 1623, 1628, 1638, 1597, 1640, 1607, 1432, 1609, - /* 420 */ 1611, 1612, 1438, 1650, 1621, 1622, 1447, 1663, 1450, 1664, - /* 430 */ 1630, 1666, 1645, 1670, 1637, 1467, 1680, 1488, 1683, 1490, - /* 440 */ 1492, 1497, 1503, 1690, 1691, 1699, 1524, 1528, 1711, 1712, - /* 450 */ 1668, 1713, 1716, 1717, 1678, 1721, 1723, 1724, 1725, 1726, - /* 460 */ 1727, 1728, 1729, 1576, 1698, 1734, 1580, 1736, 1737, 1738, - /* 470 */ 1739, 1740, 1741, 1743, 1744, 1746, 1747, 1754, 1756, 1757, - /* 480 */ 1758, 1760, 1761, 1722, 1768, 1769, 1772, 1774, 1775, 1776, - /* 490 */ 1755, 1778, 1779, 1780, 1624, 1781, 1782, 1762, 1735, 1764, - /* 500 */ 1745, 1785, 1730, 1752, 1788, 1732, 1792, 1742, 1794, 1795, - /* 510 */ 1767, 1759, 1753, 1749, 1773, 1786, 1777, 1799, 1766, 1765, - /* 520 */ 1802, 1803, 1810, 1783, 1642, 1821, 1823, 1831, 1770, 1832, - /* 530 */ 1833, 1791, 1789, 1796, 1827, 1793, 1790, 1798, 1834, 1806, - /* 540 */ 1797, 1804, 1842, 1812, 1800, 1809, 1845, 1851, 1852, 1853, - /* 550 */ 1748, 1771, 1819, 1837, 1855, 1825, 1828, 1829, 1830, 1835, - /* 560 */ 1838, 1839, 1817, 1818, 1840, 1844, 1846, 1847, 1866, 1850, - /* 570 */ 1867, 1854, 1836, 1869, 1858, 1848, 1884, 1857, 1885, 1859, - /* 580 */ 1886, 1873, 1868, 1870, 1871, 1872, 1808, 1811, 1904, 1750, - /* 590 */ 1814, 1731, 1881, 1895, 1919, 1751, 1899, 1784, 1801, 1925, - /* 600 */ 1927, 1787, 1805, 1934, 1894, 1669, 1843, 1849, 1856, 1893, - /* 610 */ 1860, 1898, 1863, 1865, 1903, 1905, 1874, 1876, 1877, 1878, - /* 620 */ 1880, 1924, 1901, 1922, 1879, 1929, 1715, 1882, 1888, 1939, - /* 630 */ 1938, 1807, 1952, 1955, 1964, 1965, 1966, 1967, 1902, 1907, - /* 640 */ 1957, 1815, 1962, 1958, 2009, 2010, 2011, 2013, 1914, 1976, - /* 650 */ 1749, 1969, 1917, 1918, 1931, 1920, 1923, 1864, 1930, 2036, - /* 660 */ 1998, 1875, 1940, 1928, 1749, 1992, 1997, 1944, 1813, 1947, - /* 670 */ 2045, 2028, 1861, 1951, 1954, 1956, 1959, 1971, 1963, 2005, - /* 680 */ 1972, 1973, 2012, 1968, 2035, 1887, 1974, 1970, 1975, 2023, - /* 690 */ 2027, 1977, 1984, 2030, 1978, 1991, 2040, 1994, 1995, 2062, - /* 700 */ 2000, 2014, 2075, 2017, 1989, 1990, 1996, 1999, 2020, 2069, - /* 710 */ 2032, 2079, 2033, 2069, 2069, 2106, 2064, 2070, 2099, 2102, - /* 720 */ 2104, 2105, 2108, 2109, 2110, 2111, 2077, 2048, 2103, 2116, - /* 730 */ 2117, 2118, 2132, 2120, 2121, 2122, 2086, 1817, 2124, 1818, - /* 740 */ 2125, 2126, 2128, 2129, 2143, 2131, 2167, 2133, 2127, 2130, - /* 750 */ 2170, 2136, 2134, 2135, 2175, 2138, 2137, 2139, 2179, 2145, - /* 760 */ 2147, 2142, 2184, 2159, 2162, 2198, 2178, 2180, 2181, 2183, - /* 770 */ 2185, 2182, + /* 0 */ 1285, 0, 229, 0, 459, 459, 459, 459, 459, 459, + /* 10 */ 459, 459, 459, 459, 459, 459, 688, 917, 917, 1146, + /* 20 */ 917, 917, 917, 917, 917, 917, 917, 917, 917, 917, + /* 30 */ 917, 917, 917, 917, 917, 917, 917, 917, 917, 917, + /* 40 */ 917, 917, 917, 917, 917, 917, 917, 917, 917, 917, + /* 50 */ 917, 240, 603, 610, 375, 684, 89, 161, 89, 375, + /* 60 */ 375, 767, 89, 767, 767, 553, 89, 56, 380, 139, + /* 70 */ 139, 380, 280, 280, 197, 28, 48, 48, 139, 139, + /* 80 */ 139, 139, 139, 139, 139, 193, 139, 139, 156, 56, + /* 90 */ 139, 139, 239, 139, 56, 139, 193, 139, 193, 56, + /* 100 */ 139, 139, 56, 139, 56, 56, 56, 139, 293, 228, + /* 110 */ 189, 189, 198, 116, 604, 604, 604, 604, 604, 604, + /* 120 */ 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, + /* 130 */ 604, 604, 604, 379, 406, 197, 28, 674, 994, 994, + /* 140 */ 994, 793, 607, 607, 674, 543, 543, 543, 156, 488, + /* 150 */ 342, 56, 632, 56, 632, 632, 546, 672, 35, 35, + /* 160 */ 35, 35, 35, 35, 35, 35, 1881, 575, 15, 44, + /* 170 */ 164, 275, 691, 368, 181, 181, 599, 646, 1000, 1047, + /* 180 */ 1050, 1090, 64, 1060, 880, 700, 939, 880, 1153, 295, + /* 190 */ 959, 1092, 1304, 1336, 1155, 156, 1336, 156, 1177, 1322, + /* 200 */ 1368, 1322, 1224, 1375, 1375, 1322, 1224, 1224, 1301, 1307, + /* 210 */ 1375, 1310, 1375, 1375, 1375, 1394, 1369, 1394, 1369, 1336, + /* 220 */ 156, 1403, 156, 1407, 1410, 156, 1407, 156, 156, 156, + /* 230 */ 1375, 156, 1388, 1388, 1394, 56, 56, 56, 56, 56, + /* 240 */ 56, 56, 56, 56, 56, 56, 1375, 1394, 632, 632, + /* 250 */ 632, 1252, 1367, 1336, 293, 1295, 1297, 1403, 293, 1300, + /* 260 */ 1375, 1368, 1368, 632, 1255, 1263, 632, 1255, 1263, 632, + /* 270 */ 632, 56, 1266, 1364, 1255, 1268, 1271, 1287, 1092, 1262, + /* 280 */ 1272, 1273, 1298, 543, 1535, 1375, 1407, 293, 293, 1542, + /* 290 */ 1263, 632, 632, 632, 632, 632, 1263, 632, 1409, 293, + /* 300 */ 546, 293, 543, 1490, 1507, 632, 672, 1375, 293, 1582, + /* 310 */ 1394, 2980, 2980, 2980, 2980, 2980, 2980, 2980, 2980, 2980, + /* 320 */ 34, 249, 289, 1028, 398, 57, 578, 50, 722, 769, + /* 330 */ 951, 75, 961, 961, 961, 961, 961, 961, 961, 961, + /* 340 */ 961, 538, 517, 65, 65, 445, 510, 871, 399, 989, + /* 350 */ 918, 974, 574, 898, 492, 492, 1087, 251, 879, 1087, + /* 360 */ 1087, 1087, 1170, 997, 752, 1167, 1157, 1072, 1196, 1094, + /* 370 */ 1100, 1109, 1116, 804, 1200, 1204, 1214, 1221, 1023, 1164, + /* 380 */ 1184, 615, 1187, 1188, 1193, 1103, 1195, 1212, 1142, 1194, + /* 390 */ 1202, 1215, 1216, 1222, 1226, 1270, 1229, 1182, 1230, 1211, + /* 400 */ 1232, 1235, 1236, 1237, 1238, 1239, 1163, 741, 1228, 1264, + /* 410 */ 1265, 1253, 1261, 1631, 1633, 1636, 1596, 1639, 1605, 1428, + /* 420 */ 1607, 1608, 1611, 1436, 1648, 1615, 1616, 1439, 1653, 1441, + /* 430 */ 1655, 1621, 1670, 1637, 1660, 1623, 1453, 1662, 1467, 1664, + /* 440 */ 1469, 1470, 1476, 1480, 1671, 1674, 1681, 1501, 1503, 1688, + /* 450 */ 1690, 1644, 1692, 1695, 1697, 1657, 1700, 1701, 1702, 1703, + /* 460 */ 1704, 1705, 1706, 1707, 1551, 1676, 1712, 1556, 1714, 1715, + /* 470 */ 1716, 1717, 1718, 1723, 1725, 1726, 1727, 1728, 1729, 1731, + /* 480 */ 1732, 1734, 1735, 1742, 1678, 1721, 1744, 1745, 1747, 1748, + /* 490 */ 1749, 1730, 1751, 1753, 1757, 1620, 1768, 1770, 1750, 1736, + /* 500 */ 1752, 1737, 1771, 1733, 1740, 1777, 1743, 1778, 1754, 1779, + /* 510 */ 1786, 1755, 1738, 1767, 1788, 1758, 1759, 1772, 1789, 1761, + /* 520 */ 1760, 1774, 1791, 1784, 1814, 1776, 1781, 1785, 1780, 1790, + /* 530 */ 1807, 1792, 1823, 1793, 1787, 1825, 1828, 1830, 1796, 1603, + /* 540 */ 1831, 1832, 1836, 1773, 1838, 1840, 1808, 1795, 1803, 1845, + /* 550 */ 1812, 1800, 1811, 1851, 1817, 1804, 1815, 1855, 1822, 1809, + /* 560 */ 1821, 1868, 1870, 1872, 1873, 1763, 1766, 1842, 1856, 1879, + /* 570 */ 1849, 1850, 1859, 1860, 1861, 1862, 1864, 1848, 1858, 1866, + /* 580 */ 1869, 1883, 1871, 1907, 1886, 1909, 1889, 1865, 1913, 1893, + /* 590 */ 1882, 1918, 1885, 1921, 1887, 1923, 1902, 1905, 1891, 1896, + /* 600 */ 1897, 1833, 1826, 1933, 1764, 1839, 1765, 1908, 1924, 1948, + /* 610 */ 1775, 1927, 1794, 1797, 1958, 1959, 1801, 1798, 1960, 1929, + /* 620 */ 1713, 1863, 1874, 1876, 1914, 1867, 1928, 1890, 1878, 1935, + /* 630 */ 1936, 1880, 1888, 1892, 1895, 1884, 1947, 1942, 1946, 1898, + /* 640 */ 1951, 1746, 1900, 1901, 1989, 1954, 1762, 1964, 1966, 1979, + /* 650 */ 1981, 1984, 1985, 1931, 1932, 1983, 1783, 1992, 1990, 2039, + /* 660 */ 2040, 2041, 2042, 1941, 2005, 1780, 1999, 1949, 1950, 1952, + /* 670 */ 1961, 1963, 1875, 1967, 2049, 2011, 1899, 1970, 1944, 1780, + /* 680 */ 2007, 2016, 1974, 1819, 1975, 2064, 2054, 1903, 1976, 1977, + /* 690 */ 1982, 1978, 1991, 1980, 2015, 1994, 1995, 2044, 1996, 2076, + /* 700 */ 1904, 1998, 1988, 2000, 2067, 2071, 2008, 2014, 2084, 2019, + /* 710 */ 2021, 2087, 2023, 2024, 2093, 2027, 2029, 2098, 2032, 2018, + /* 720 */ 2022, 2031, 2034, 2033, 2094, 2037, 2105, 2051, 2094, 2094, + /* 730 */ 2137, 2092, 2096, 2126, 2129, 2130, 2131, 2132, 2133, 2135, + /* 740 */ 2139, 2099, 2079, 2128, 2141, 2143, 2144, 2159, 2147, 2154, + /* 750 */ 2156, 2118, 1848, 2158, 1858, 2161, 2162, 2163, 2164, 2172, + /* 760 */ 2165, 2201, 2167, 2155, 2168, 2208, 2182, 2169, 2180, 2220, + /* 770 */ 2187, 2174, 2185, 2221, 2191, 2178, 2189, 2229, 2195, 2196, + /* 780 */ 2233, 2212, 2214, 2215, 2216, 2218, 2222, }; #define YY_REDUCE_COUNT (319) -#define YY_REDUCE_MIN (-386) -#define YY_REDUCE_MAX (2595) +#define YY_REDUCE_MIN (-445) +#define YY_REDUCE_MAX (2545) static const short yy_reduce_ofst[] = { - /* 0 */ -264, 364, 225, 588, 452, 611, 738, 826, 855, 1039, - /* 10 */ 1138, 1161, 1249, 1275, 1323, 1386, -72, -336, 153, 1471, - /* 20 */ 1504, 1535, 1566, 1599, 1661, 1676, 1697, 1763, 1826, 1841, - /* 30 */ 1891, 1911, 1961, 1986, 2019, 2049, 2085, 2107, 2173, 2192, - /* 40 */ 2258, 2277, 2308, 2372, 2393, 2422, 2480, 2510, 2530, 2578, - /* 50 */ 2595, -131, -203, -262, 64, 163, 254, 495, 618, 488, - /* 60 */ 541, 681, -47, -92, 181, 252, 361, 598, -376, -207, - /* 70 */ -103, -386, -338, -209, 135, -379, 176, 190, -258, -91, - /* 80 */ 179, 270, 303, 389, 423, 274, 435, 477, 490, 429, - /* 90 */ 511, 581, -76, 352, 473, 631, 354, 637, 527, -315, - /* 100 */ 659, 714, 800, 833, 192, 810, 638, 859, 623, -95, - /* 110 */ -156, -156, 168, -316, 59, 183, 290, 371, 375, 382, - /* 120 */ 547, 556, 602, 636, 664, 692, 715, 744, 774, 825, - /* 130 */ 840, 849, 853, -239, -351, 412, 38, 61, -351, 57, - /* 140 */ 392, -167, 319, 522, 307, -343, 218, 542, 494, 215, - /* 150 */ 164, 710, 444, 555, 662, 770, 730, 761, -365, 470, - /* 160 */ 652, 661, 693, 748, 752, 693, 476, 868, 970, 915, - /* 170 */ 835, 844, 981, 880, 953, 979, 969, 969, 995, 950, - /* 180 */ 1002, 1001, 966, 954, 898, 898, 882, 898, 934, 925, - /* 190 */ 969, 974, 977, 987, 984, 1050, 991, 1052, 1000, 1017, - /* 200 */ 1016, 1022, 1026, 1073, 1074, 1028, 1031, 1032, 1068, 1072, - /* 210 */ 1084, 1076, 1087, 1088, 1089, 1098, 1096, 1101, 1099, 1027, - /* 220 */ 1090, 1057, 1092, 1102, 1045, 1100, 1104, 1103, 1106, 1109, - /* 230 */ 1110, 1120, 1113, 1127, 1116, 1112, 1114, 1115, 1118, 1119, - /* 240 */ 1121, 1123, 1126, 1131, 1132, 1133, 1130, 1141, 1075, 1095, - /* 250 */ 1105, 1064, 1071, 1082, 1147, 1097, 1111, 1137, 1150, 1129, - /* 260 */ 1167, 1134, 1135, 1142, 1053, 1143, 1146, 1054, 1144, 1148, - /* 270 */ 1151, 969, 1069, 1078, 1077, 1079, 1091, 1094, 1124, 1080, - /* 280 */ 1081, 1086, 898, 1207, 1145, 1217, 1226, 1220, 1221, 1178, - /* 290 */ 1179, 1193, 1199, 1211, 1218, 1228, 1192, 1229, 1202, 1255, - /* 300 */ 1233, 1259, 1261, 1166, 1235, 1231, 1254, 1273, 1268, 1286, - /* 310 */ 1294, 1219, 1210, 1230, 1236, 1260, 1266, 1274, 1278, 1301, + /* 0 */ 96, -94, 175, 329, 377, 597, 685, 823, 1086, 1148, + /* 10 */ 1017, 1174, 1248, 1309, 1335, 1371, -338, 150, 465, 1435, + /* 20 */ 1459, 1523, 1581, 1597, 1658, 1684, 1720, 1756, 1782, 1857, + /* 30 */ 1877, 1945, 1962, 2010, 2030, 2060, 2078, 2108, 2138, 2186, + /* 40 */ 2206, 2284, 2301, 2349, 2369, 2399, 2417, 2447, 2477, 2525, + /* 50 */ 2545, 393, 40, -48, -318, -206, 359, 592, 716, 54, + /* 60 */ 187, 799, -445, -85, 514, 426, 428, -366, 43, -345, + /* 70 */ -177, -132, -258, -127, 247, -28, -324, 47, 174, 381, + /* 80 */ 385, 407, 472, 485, 524, -155, 540, 585, 118, -81, + /* 90 */ 633, 642, 103, 645, -78, 647, 129, 692, 138, 108, + /* 100 */ 704, 718, -27, 728, 470, 493, 579, 731, -315, 133, + /* 110 */ -438, -438, -256, -15, 144, 213, 320, 404, 434, 520, + /* 120 */ 523, 547, 598, 620, 623, 711, 721, 724, 733, 780, + /* 130 */ 787, 790, 796, -368, -83, -64, 594, 513, -83, 209, + /* 140 */ 317, 207, 725, 742, 727, 664, 791, 812, 119, -364, + /* 150 */ -355, 273, 650, 140, 657, 807, 600, 813, 458, 504, + /* 160 */ 573, 639, 910, 913, 916, 910, 882, 930, 956, 901, + /* 170 */ 821, 833, 953, 843, 944, 946, 935, 935, 965, 920, + /* 180 */ 978, 980, 945, 933, 888, 888, 872, 888, 897, 889, + /* 190 */ 935, 929, 932, 942, 940, 1004, 947, 1006, 960, 995, + /* 200 */ 993, 999, 1002, 1049, 1051, 1003, 1007, 1008, 1044, 1052, + /* 210 */ 1061, 1054, 1062, 1065, 1066, 1075, 1076, 1079, 1077, 1001, + /* 220 */ 1067, 1037, 1073, 1080, 1024, 1078, 1083, 1082, 1084, 1085, + /* 230 */ 1088, 1095, 1091, 1101, 1112, 1089, 1093, 1096, 1097, 1102, + /* 240 */ 1104, 1105, 1106, 1107, 1110, 1113, 1108, 1114, 1070, 1118, + /* 250 */ 1119, 1041, 1059, 1063, 1134, 1081, 1098, 1120, 1138, 1117, + /* 260 */ 1152, 1111, 1122, 1137, 1064, 1128, 1147, 1071, 1136, 1149, + /* 270 */ 1154, 935, 1074, 1121, 1126, 1099, 1123, 1115, 1125, 1069, + /* 280 */ 1124, 1133, 888, 1205, 1130, 1210, 1209, 1206, 1213, 1165, + /* 290 */ 1162, 1180, 1181, 1183, 1186, 1197, 1169, 1203, 1192, 1244, + /* 300 */ 1240, 1247, 1269, 1166, 1233, 1227, 1251, 1274, 1275, 1281, + /* 310 */ 1284, 1217, 1218, 1241, 1242, 1256, 1258, 1260, 1276, 1296, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 10 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 20 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 30 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 40 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 50 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 60 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 70 */ 1734, 1734, 1734, 1734, 2007, 1734, 1734, 1734, 1734, 1734, - /* 80 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1816, 1734, - /* 90 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 100 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1814, 2000, - /* 110 */ 2225, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 120 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 130 */ 1734, 1734, 1734, 1734, 2237, 1734, 1734, 1734, 2237, 2237, - /* 140 */ 2237, 1814, 2197, 2197, 1734, 1734, 1734, 1734, 1816, 2067, - /* 150 */ 1734, 1734, 1734, 1734, 1734, 1734, 1935, 1734, 1734, 1734, - /* 160 */ 1734, 1734, 1959, 1734, 1734, 1734, 2059, 1734, 1734, 2262, - /* 170 */ 2318, 1734, 1734, 2265, 1734, 1734, 1734, 1734, 1734, 2012, - /* 180 */ 1734, 1734, 1889, 2252, 2229, 2243, 2302, 2230, 2227, 2246, - /* 190 */ 1734, 2256, 1734, 1734, 2081, 1816, 1734, 1816, 2046, 2005, - /* 200 */ 1734, 2005, 2002, 1734, 1734, 2005, 2002, 2002, 1878, 1874, - /* 210 */ 1734, 1872, 1734, 1734, 1734, 1734, 1781, 1734, 1781, 1734, - /* 220 */ 1816, 1734, 1816, 1734, 1734, 1816, 1734, 1816, 1816, 1816, - /* 230 */ 1734, 1816, 1794, 1794, 1734, 1734, 1734, 1734, 1734, 1734, - /* 240 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 250 */ 1734, 2079, 2065, 1734, 1814, 2057, 2055, 1734, 1814, 2053, - /* 260 */ 1734, 1734, 1734, 1734, 2273, 2271, 1734, 2273, 2271, 1734, - /* 270 */ 1734, 1734, 2287, 2283, 2273, 2291, 2289, 2258, 2256, 2321, - /* 280 */ 2308, 2304, 2243, 1734, 1734, 1734, 1734, 1814, 1814, 1734, - /* 290 */ 2271, 1734, 1734, 1734, 1734, 1734, 2271, 1734, 1734, 1814, - /* 300 */ 1734, 1814, 1734, 1734, 1905, 1734, 1734, 1734, 1814, 1766, - /* 310 */ 1734, 2048, 2070, 2030, 2030, 1938, 1938, 1938, 1817, 1739, - /* 320 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 330 */ 1734, 1734, 2286, 2285, 2152, 1734, 2201, 2200, 2199, 2190, - /* 340 */ 2151, 1901, 1734, 2150, 2149, 1734, 1734, 1734, 1734, 1734, - /* 350 */ 1734, 1734, 1734, 2021, 2020, 2143, 1734, 1734, 2144, 2142, - /* 360 */ 2141, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 370 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 380 */ 1734, 1734, 1734, 1734, 1734, 2305, 2309, 1734, 1734, 1734, - /* 390 */ 1734, 1734, 1734, 1734, 2226, 1734, 1734, 1734, 2125, 1734, - /* 400 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 410 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 420 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 430 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 440 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 450 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 460 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 470 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 480 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 490 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 500 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 510 */ 1734, 1734, 1771, 2130, 1734, 1734, 1734, 1734, 1734, 1734, - /* 520 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 530 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 540 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 550 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 560 */ 1734, 1734, 1855, 1854, 1734, 1734, 1734, 1734, 1734, 1734, - /* 570 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 580 */ 1734, 1734, 1734, 1734, 1734, 1734, 2134, 1734, 1734, 1734, - /* 590 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 600 */ 1734, 1734, 1734, 2301, 2259, 1734, 1734, 1734, 1734, 1734, - /* 610 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 620 */ 1734, 1734, 1734, 2125, 1734, 2284, 1734, 1734, 2299, 1734, - /* 630 */ 2303, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 2236, 2232, - /* 640 */ 1734, 1734, 2228, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 650 */ 2133, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 660 */ 1734, 1734, 1734, 1734, 2124, 1734, 2187, 1734, 1734, 1734, - /* 670 */ 2221, 1734, 1734, 2172, 1734, 1734, 1734, 1734, 1734, 1734, - /* 680 */ 1734, 1734, 1734, 2134, 1734, 2137, 1734, 1734, 1734, 1734, - /* 690 */ 1734, 1932, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 700 */ 1734, 1734, 1734, 1734, 1917, 1915, 1914, 1913, 1734, 1945, - /* 710 */ 1734, 1734, 1734, 1941, 1940, 1734, 1734, 1734, 1734, 1734, - /* 720 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1835, 1734, - /* 730 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1827, 1734, 1826, - /* 740 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 750 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 760 */ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734, - /* 770 */ 1734, 1734, + /* 0 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 10 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 20 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 30 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 40 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 50 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 60 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 70 */ 1753, 1753, 1753, 1753, 2030, 1753, 1753, 1753, 1753, 1753, + /* 80 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1839, 1753, + /* 90 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 100 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1837, 2023, + /* 110 */ 2248, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 120 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 130 */ 1753, 1753, 1753, 1753, 2260, 1753, 1753, 1753, 2260, 2260, + /* 140 */ 2260, 1837, 2220, 2220, 1753, 1753, 1753, 1753, 1839, 2090, + /* 150 */ 1753, 1753, 1753, 1753, 1753, 1753, 1958, 1753, 1753, 1753, + /* 160 */ 1753, 1753, 1982, 1753, 1753, 1753, 2082, 1753, 1753, 2285, + /* 170 */ 2341, 1753, 1753, 2288, 1753, 1753, 1753, 1753, 1753, 2035, + /* 180 */ 1753, 1753, 1912, 2275, 2252, 2266, 2325, 2253, 2250, 2269, + /* 190 */ 1753, 2279, 1753, 1753, 2104, 1839, 1753, 1839, 2069, 2028, + /* 200 */ 1753, 2028, 2025, 1753, 1753, 2028, 2025, 2025, 1901, 1897, + /* 210 */ 1753, 1895, 1753, 1753, 1753, 1753, 1800, 1753, 1800, 1753, + /* 220 */ 1839, 1753, 1839, 1753, 1753, 1839, 1753, 1839, 1839, 1839, + /* 230 */ 1753, 1839, 1814, 1814, 1753, 1753, 1753, 1753, 1753, 1753, + /* 240 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 250 */ 1753, 2102, 2088, 1753, 1837, 2080, 2078, 1753, 1837, 2076, + /* 260 */ 1753, 1753, 1753, 1753, 2296, 2294, 1753, 2296, 2294, 1753, + /* 270 */ 1753, 1753, 2310, 2306, 2296, 2314, 2312, 2281, 2279, 2344, + /* 280 */ 2331, 2327, 2266, 1753, 1753, 1753, 1753, 1837, 1837, 1753, + /* 290 */ 2294, 1753, 1753, 1753, 1753, 1753, 2294, 1753, 1753, 1837, + /* 300 */ 1753, 1837, 1753, 1753, 1928, 1753, 1753, 1753, 1837, 1785, + /* 310 */ 1753, 2071, 2093, 2053, 2053, 1961, 1961, 1961, 1840, 1758, + /* 320 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 330 */ 1753, 1753, 2309, 2308, 2175, 1753, 2224, 2223, 2222, 2213, + /* 340 */ 2174, 1924, 1753, 2173, 2172, 1753, 1753, 1753, 1753, 1753, + /* 350 */ 1753, 1753, 1753, 1753, 2044, 2043, 2166, 1753, 1753, 2167, + /* 360 */ 2165, 2164, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 370 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 380 */ 1753, 1753, 1753, 1753, 1753, 1753, 2328, 2332, 1753, 1753, + /* 390 */ 1753, 1753, 1753, 1753, 1753, 2249, 1753, 1753, 1753, 2148, + /* 400 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 410 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 420 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 430 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 440 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 450 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 460 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 470 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 480 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 490 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 500 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 510 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 520 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1790, 2153, 1753, + /* 530 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 540 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 550 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 560 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 570 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1878, 1877, 1753, + /* 580 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 590 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 600 */ 1753, 2157, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 610 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 2324, 2282, + /* 620 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 630 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 2148, 1753, + /* 640 */ 2307, 1753, 1753, 2322, 1753, 2326, 1753, 1753, 1753, 1753, + /* 650 */ 1753, 1753, 1753, 2259, 2255, 1753, 1753, 2251, 1753, 1753, + /* 660 */ 1753, 1753, 1753, 1753, 1753, 2156, 1753, 1753, 1753, 1753, + /* 670 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 2147, + /* 680 */ 1753, 2210, 1753, 1753, 1753, 2244, 1753, 1753, 2195, 1753, + /* 690 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 2157, 1753, + /* 700 */ 2160, 1753, 1753, 1753, 1753, 1753, 1955, 1753, 1753, 1753, + /* 710 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1940, + /* 720 */ 1938, 1937, 1936, 1753, 1968, 1753, 1753, 1753, 1964, 1963, + /* 730 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 740 */ 1753, 1753, 1753, 1858, 1753, 1753, 1753, 1753, 1753, 1753, + /* 750 */ 1753, 1753, 1850, 1753, 1849, 1753, 1753, 1753, 1753, 1753, + /* 760 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 770 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, + /* 780 */ 1753, 1753, 1753, 1753, 1753, 1753, 1753, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1098,6 +1127,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* DNODE => nothing */ 0, /* PORT => nothing */ 0, /* DNODES => nothing */ + 0, /* RESTORE => nothing */ 0, /* NK_IPTOKEN => nothing */ 0, /* FORCE => nothing */ 0, /* LOCAL => nothing */ @@ -1105,6 +1135,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* BNODE => nothing */ 0, /* SNODE => nothing */ 0, /* MNODE => nothing */ + 0, /* VNODE => nothing */ 0, /* DATABASE => nothing */ 0, /* USE => nothing */ 0, /* FLUSH => nothing */ @@ -1144,7 +1175,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* MAX_SPEED => nothing */ 0, /* START => nothing */ 0, /* TIMESTAMP => nothing */ - 282, /* END => ABORT */ + 284, /* END => ABORT */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ 0, /* NK_RP => nothing */ @@ -1329,56 +1360,56 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 282, /* AFTER => ABORT */ - 282, /* ATTACH => ABORT */ - 282, /* BEFORE => ABORT */ - 282, /* BEGIN => ABORT */ - 282, /* BITAND => ABORT */ - 282, /* BITNOT => ABORT */ - 282, /* BITOR => ABORT */ - 282, /* BLOCKS => ABORT */ - 282, /* CHANGE => ABORT */ - 282, /* COMMA => ABORT */ - 282, /* CONCAT => ABORT */ - 282, /* CONFLICT => ABORT */ - 282, /* COPY => ABORT */ - 282, /* DEFERRED => ABORT */ - 282, /* DELIMITERS => ABORT */ - 282, /* DETACH => ABORT */ - 282, /* DIVIDE => ABORT */ - 282, /* DOT => ABORT */ - 282, /* EACH => ABORT */ - 282, /* FAIL => ABORT */ - 282, /* FILE => ABORT */ - 282, /* FOR => ABORT */ - 282, /* GLOB => ABORT */ - 282, /* ID => ABORT */ - 282, /* IMMEDIATE => ABORT */ - 282, /* IMPORT => ABORT */ - 282, /* INITIALLY => ABORT */ - 282, /* INSTEAD => ABORT */ - 282, /* ISNULL => ABORT */ - 282, /* KEY => ABORT */ - 282, /* MODULES => ABORT */ - 282, /* NK_BITNOT => ABORT */ - 282, /* NK_SEMI => ABORT */ - 282, /* NOTNULL => ABORT */ - 282, /* OF => ABORT */ - 282, /* PLUS => ABORT */ - 282, /* PRIVILEGE => ABORT */ - 282, /* RAISE => ABORT */ - 282, /* RESTRICT => ABORT */ - 282, /* ROW => ABORT */ - 282, /* SEMI => ABORT */ - 282, /* STAR => ABORT */ - 282, /* STATEMENT => ABORT */ - 282, /* STRICT => ABORT */ - 282, /* STRING => ABORT */ - 282, /* TIMES => ABORT */ - 282, /* VALUES => ABORT */ - 282, /* VARIABLE => ABORT */ - 282, /* VIEW => ABORT */ - 282, /* WAL => ABORT */ + 284, /* AFTER => ABORT */ + 284, /* ATTACH => ABORT */ + 284, /* BEFORE => ABORT */ + 284, /* BEGIN => ABORT */ + 284, /* BITAND => ABORT */ + 284, /* BITNOT => ABORT */ + 284, /* BITOR => ABORT */ + 284, /* BLOCKS => ABORT */ + 284, /* CHANGE => ABORT */ + 284, /* COMMA => ABORT */ + 284, /* CONCAT => ABORT */ + 284, /* CONFLICT => ABORT */ + 284, /* COPY => ABORT */ + 284, /* DEFERRED => ABORT */ + 284, /* DELIMITERS => ABORT */ + 284, /* DETACH => ABORT */ + 284, /* DIVIDE => ABORT */ + 284, /* DOT => ABORT */ + 284, /* EACH => ABORT */ + 284, /* FAIL => ABORT */ + 284, /* FILE => ABORT */ + 284, /* FOR => ABORT */ + 284, /* GLOB => ABORT */ + 284, /* ID => ABORT */ + 284, /* IMMEDIATE => ABORT */ + 284, /* IMPORT => ABORT */ + 284, /* INITIALLY => ABORT */ + 284, /* INSTEAD => ABORT */ + 284, /* ISNULL => ABORT */ + 284, /* KEY => ABORT */ + 284, /* MODULES => ABORT */ + 284, /* NK_BITNOT => ABORT */ + 284, /* NK_SEMI => ABORT */ + 284, /* NOTNULL => ABORT */ + 284, /* OF => ABORT */ + 284, /* PLUS => ABORT */ + 284, /* PRIVILEGE => ABORT */ + 284, /* RAISE => ABORT */ + 284, /* RESTRICT => ABORT */ + 284, /* ROW => ABORT */ + 284, /* SEMI => ABORT */ + 284, /* STAR => ABORT */ + 284, /* STATEMENT => ABORT */ + 284, /* STRICT => ABORT */ + 284, /* STRING => ABORT */ + 284, /* TIMES => ABORT */ + 284, /* VALUES => ABORT */ + 284, /* VARIABLE => ABORT */ + 284, /* VIEW => ABORT */ + 284, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1518,434 +1549,436 @@ static const char *const yyTokenName[] = { /* 49 */ "DNODE", /* 50 */ "PORT", /* 51 */ "DNODES", - /* 52 */ "NK_IPTOKEN", - /* 53 */ "FORCE", - /* 54 */ "LOCAL", - /* 55 */ "QNODE", - /* 56 */ "BNODE", - /* 57 */ "SNODE", - /* 58 */ "MNODE", - /* 59 */ "DATABASE", - /* 60 */ "USE", - /* 61 */ "FLUSH", - /* 62 */ "TRIM", - /* 63 */ "COMPACT", - /* 64 */ "IF", - /* 65 */ "NOT", - /* 66 */ "EXISTS", - /* 67 */ "BUFFER", - /* 68 */ "CACHEMODEL", - /* 69 */ "CACHESIZE", - /* 70 */ "COMP", - /* 71 */ "DURATION", - /* 72 */ "NK_VARIABLE", - /* 73 */ "MAXROWS", - /* 74 */ "MINROWS", - /* 75 */ "KEEP", - /* 76 */ "PAGES", - /* 77 */ "PAGESIZE", - /* 78 */ "TSDB_PAGESIZE", - /* 79 */ "PRECISION", - /* 80 */ "REPLICA", - /* 81 */ "VGROUPS", - /* 82 */ "SINGLE_STABLE", - /* 83 */ "RETENTIONS", - /* 84 */ "SCHEMALESS", - /* 85 */ "WAL_LEVEL", - /* 86 */ "WAL_FSYNC_PERIOD", - /* 87 */ "WAL_RETENTION_PERIOD", - /* 88 */ "WAL_RETENTION_SIZE", - /* 89 */ "WAL_ROLL_PERIOD", - /* 90 */ "WAL_SEGMENT_SIZE", - /* 91 */ "STT_TRIGGER", - /* 92 */ "TABLE_PREFIX", - /* 93 */ "TABLE_SUFFIX", - /* 94 */ "NK_COLON", - /* 95 */ "MAX_SPEED", - /* 96 */ "START", - /* 97 */ "TIMESTAMP", - /* 98 */ "END", - /* 99 */ "TABLE", - /* 100 */ "NK_LP", - /* 101 */ "NK_RP", - /* 102 */ "STABLE", - /* 103 */ "ADD", - /* 104 */ "COLUMN", - /* 105 */ "MODIFY", - /* 106 */ "RENAME", - /* 107 */ "TAG", - /* 108 */ "SET", - /* 109 */ "NK_EQ", - /* 110 */ "USING", - /* 111 */ "TAGS", - /* 112 */ "BOOL", - /* 113 */ "TINYINT", - /* 114 */ "SMALLINT", - /* 115 */ "INT", - /* 116 */ "INTEGER", - /* 117 */ "BIGINT", - /* 118 */ "FLOAT", - /* 119 */ "DOUBLE", - /* 120 */ "BINARY", - /* 121 */ "NCHAR", - /* 122 */ "UNSIGNED", - /* 123 */ "JSON", - /* 124 */ "VARCHAR", - /* 125 */ "MEDIUMBLOB", - /* 126 */ "BLOB", - /* 127 */ "VARBINARY", - /* 128 */ "DECIMAL", - /* 129 */ "COMMENT", - /* 130 */ "MAX_DELAY", - /* 131 */ "WATERMARK", - /* 132 */ "ROLLUP", - /* 133 */ "TTL", - /* 134 */ "SMA", - /* 135 */ "DELETE_MARK", - /* 136 */ "FIRST", - /* 137 */ "LAST", - /* 138 */ "SHOW", - /* 139 */ "PRIVILEGES", - /* 140 */ "DATABASES", - /* 141 */ "TABLES", - /* 142 */ "STABLES", - /* 143 */ "MNODES", - /* 144 */ "QNODES", - /* 145 */ "FUNCTIONS", - /* 146 */ "INDEXES", - /* 147 */ "ACCOUNTS", - /* 148 */ "APPS", - /* 149 */ "CONNECTIONS", - /* 150 */ "LICENCES", - /* 151 */ "GRANTS", - /* 152 */ "QUERIES", - /* 153 */ "SCORES", - /* 154 */ "TOPICS", - /* 155 */ "VARIABLES", - /* 156 */ "CLUSTER", - /* 157 */ "BNODES", - /* 158 */ "SNODES", - /* 159 */ "TRANSACTIONS", - /* 160 */ "DISTRIBUTED", - /* 161 */ "CONSUMERS", - /* 162 */ "SUBSCRIPTIONS", - /* 163 */ "VNODES", - /* 164 */ "ALIVE", - /* 165 */ "LIKE", - /* 166 */ "TBNAME", - /* 167 */ "QTAGS", - /* 168 */ "AS", - /* 169 */ "INDEX", - /* 170 */ "FUNCTION", - /* 171 */ "INTERVAL", - /* 172 */ "COUNT", - /* 173 */ "LAST_ROW", - /* 174 */ "TOPIC", - /* 175 */ "META", - /* 176 */ "CONSUMER", - /* 177 */ "GROUP", - /* 178 */ "DESC", - /* 179 */ "DESCRIBE", - /* 180 */ "RESET", - /* 181 */ "QUERY", - /* 182 */ "CACHE", - /* 183 */ "EXPLAIN", - /* 184 */ "ANALYZE", - /* 185 */ "VERBOSE", - /* 186 */ "NK_BOOL", - /* 187 */ "RATIO", - /* 188 */ "NK_FLOAT", - /* 189 */ "OUTPUTTYPE", - /* 190 */ "AGGREGATE", - /* 191 */ "BUFSIZE", - /* 192 */ "LANGUAGE", - /* 193 */ "REPLACE", - /* 194 */ "STREAM", - /* 195 */ "INTO", - /* 196 */ "PAUSE", - /* 197 */ "RESUME", - /* 198 */ "TRIGGER", - /* 199 */ "AT_ONCE", - /* 200 */ "WINDOW_CLOSE", - /* 201 */ "IGNORE", - /* 202 */ "EXPIRED", - /* 203 */ "FILL_HISTORY", - /* 204 */ "UPDATE", - /* 205 */ "SUBTABLE", - /* 206 */ "UNTREATED", - /* 207 */ "KILL", - /* 208 */ "CONNECTION", - /* 209 */ "TRANSACTION", - /* 210 */ "BALANCE", - /* 211 */ "VGROUP", - /* 212 */ "LEADER", - /* 213 */ "MERGE", - /* 214 */ "REDISTRIBUTE", - /* 215 */ "SPLIT", - /* 216 */ "DELETE", - /* 217 */ "INSERT", - /* 218 */ "NULL", - /* 219 */ "NK_QUESTION", - /* 220 */ "NK_ARROW", - /* 221 */ "ROWTS", - /* 222 */ "QSTART", - /* 223 */ "QEND", - /* 224 */ "QDURATION", - /* 225 */ "WSTART", - /* 226 */ "WEND", - /* 227 */ "WDURATION", - /* 228 */ "IROWTS", - /* 229 */ "ISFILLED", - /* 230 */ "CAST", - /* 231 */ "NOW", - /* 232 */ "TODAY", - /* 233 */ "TIMEZONE", - /* 234 */ "CLIENT_VERSION", - /* 235 */ "SERVER_VERSION", - /* 236 */ "SERVER_STATUS", - /* 237 */ "CURRENT_USER", - /* 238 */ "CASE", - /* 239 */ "WHEN", - /* 240 */ "THEN", - /* 241 */ "ELSE", - /* 242 */ "BETWEEN", - /* 243 */ "IS", - /* 244 */ "NK_LT", - /* 245 */ "NK_GT", - /* 246 */ "NK_LE", - /* 247 */ "NK_GE", - /* 248 */ "NK_NE", - /* 249 */ "MATCH", - /* 250 */ "NMATCH", - /* 251 */ "CONTAINS", - /* 252 */ "IN", - /* 253 */ "JOIN", - /* 254 */ "INNER", - /* 255 */ "SELECT", - /* 256 */ "DISTINCT", - /* 257 */ "WHERE", - /* 258 */ "PARTITION", - /* 259 */ "BY", - /* 260 */ "SESSION", - /* 261 */ "STATE_WINDOW", - /* 262 */ "EVENT_WINDOW", - /* 263 */ "SLIDING", - /* 264 */ "FILL", - /* 265 */ "VALUE", - /* 266 */ "VALUE_F", - /* 267 */ "NONE", - /* 268 */ "PREV", - /* 269 */ "NULL_F", - /* 270 */ "LINEAR", - /* 271 */ "NEXT", - /* 272 */ "HAVING", - /* 273 */ "RANGE", - /* 274 */ "EVERY", - /* 275 */ "ORDER", - /* 276 */ "SLIMIT", - /* 277 */ "SOFFSET", - /* 278 */ "LIMIT", - /* 279 */ "OFFSET", - /* 280 */ "ASC", - /* 281 */ "NULLS", - /* 282 */ "ABORT", - /* 283 */ "AFTER", - /* 284 */ "ATTACH", - /* 285 */ "BEFORE", - /* 286 */ "BEGIN", - /* 287 */ "BITAND", - /* 288 */ "BITNOT", - /* 289 */ "BITOR", - /* 290 */ "BLOCKS", - /* 291 */ "CHANGE", - /* 292 */ "COMMA", - /* 293 */ "CONCAT", - /* 294 */ "CONFLICT", - /* 295 */ "COPY", - /* 296 */ "DEFERRED", - /* 297 */ "DELIMITERS", - /* 298 */ "DETACH", - /* 299 */ "DIVIDE", - /* 300 */ "DOT", - /* 301 */ "EACH", - /* 302 */ "FAIL", - /* 303 */ "FILE", - /* 304 */ "FOR", - /* 305 */ "GLOB", - /* 306 */ "ID", - /* 307 */ "IMMEDIATE", - /* 308 */ "IMPORT", - /* 309 */ "INITIALLY", - /* 310 */ "INSTEAD", - /* 311 */ "ISNULL", - /* 312 */ "KEY", - /* 313 */ "MODULES", - /* 314 */ "NK_BITNOT", - /* 315 */ "NK_SEMI", - /* 316 */ "NOTNULL", - /* 317 */ "OF", - /* 318 */ "PLUS", - /* 319 */ "PRIVILEGE", - /* 320 */ "RAISE", - /* 321 */ "RESTRICT", - /* 322 */ "ROW", - /* 323 */ "SEMI", - /* 324 */ "STAR", - /* 325 */ "STATEMENT", - /* 326 */ "STRICT", - /* 327 */ "STRING", - /* 328 */ "TIMES", - /* 329 */ "VALUES", - /* 330 */ "VARIABLE", - /* 331 */ "VIEW", - /* 332 */ "WAL", - /* 333 */ "cmd", - /* 334 */ "account_options", - /* 335 */ "alter_account_options", - /* 336 */ "literal", - /* 337 */ "alter_account_option", - /* 338 */ "user_name", - /* 339 */ "sysinfo_opt", - /* 340 */ "privileges", - /* 341 */ "priv_level", - /* 342 */ "with_opt", - /* 343 */ "priv_type_list", - /* 344 */ "priv_type", - /* 345 */ "db_name", - /* 346 */ "table_name", - /* 347 */ "topic_name", - /* 348 */ "search_condition", - /* 349 */ "dnode_endpoint", - /* 350 */ "force_opt", - /* 351 */ "not_exists_opt", - /* 352 */ "db_options", - /* 353 */ "exists_opt", - /* 354 */ "alter_db_options", - /* 355 */ "speed_opt", - /* 356 */ "start_opt", - /* 357 */ "end_opt", - /* 358 */ "integer_list", - /* 359 */ "variable_list", - /* 360 */ "retention_list", - /* 361 */ "signed", - /* 362 */ "alter_db_option", - /* 363 */ "retention", - /* 364 */ "full_table_name", - /* 365 */ "column_def_list", - /* 366 */ "tags_def_opt", - /* 367 */ "table_options", - /* 368 */ "multi_create_clause", - /* 369 */ "tags_def", - /* 370 */ "multi_drop_clause", - /* 371 */ "alter_table_clause", - /* 372 */ "alter_table_options", - /* 373 */ "column_name", - /* 374 */ "type_name", - /* 375 */ "signed_literal", - /* 376 */ "create_subtable_clause", - /* 377 */ "specific_cols_opt", - /* 378 */ "expression_list", - /* 379 */ "drop_table_clause", - /* 380 */ "col_name_list", - /* 381 */ "column_def", - /* 382 */ "duration_list", - /* 383 */ "rollup_func_list", - /* 384 */ "alter_table_option", - /* 385 */ "duration_literal", - /* 386 */ "rollup_func_name", - /* 387 */ "function_name", - /* 388 */ "col_name", - /* 389 */ "db_name_cond_opt", - /* 390 */ "like_pattern_opt", - /* 391 */ "table_name_cond", - /* 392 */ "from_db_opt", - /* 393 */ "tag_list_opt", - /* 394 */ "tag_item", - /* 395 */ "column_alias", - /* 396 */ "full_index_name", - /* 397 */ "index_options", - /* 398 */ "index_name", - /* 399 */ "func_list", - /* 400 */ "sliding_opt", - /* 401 */ "sma_stream_opt", - /* 402 */ "func", - /* 403 */ "sma_func_name", - /* 404 */ "query_or_subquery", - /* 405 */ "cgroup_name", - /* 406 */ "analyze_opt", - /* 407 */ "explain_options", - /* 408 */ "insert_query", - /* 409 */ "or_replace_opt", - /* 410 */ "agg_func_opt", - /* 411 */ "bufsize_opt", - /* 412 */ "language_opt", - /* 413 */ "stream_name", - /* 414 */ "stream_options", - /* 415 */ "col_list_opt", - /* 416 */ "tag_def_or_ref_opt", - /* 417 */ "subtable_opt", - /* 418 */ "ignore_opt", - /* 419 */ "expression", - /* 420 */ "dnode_list", - /* 421 */ "where_clause_opt", - /* 422 */ "literal_func", - /* 423 */ "literal_list", - /* 424 */ "table_alias", - /* 425 */ "expr_or_subquery", - /* 426 */ "pseudo_column", - /* 427 */ "column_reference", - /* 428 */ "function_expression", - /* 429 */ "case_when_expression", - /* 430 */ "star_func", - /* 431 */ "star_func_para_list", - /* 432 */ "noarg_func", - /* 433 */ "other_para_list", - /* 434 */ "star_func_para", - /* 435 */ "when_then_list", - /* 436 */ "case_when_else_opt", - /* 437 */ "common_expression", - /* 438 */ "when_then_expr", - /* 439 */ "predicate", - /* 440 */ "compare_op", - /* 441 */ "in_op", - /* 442 */ "in_predicate_value", - /* 443 */ "boolean_value_expression", - /* 444 */ "boolean_primary", - /* 445 */ "from_clause_opt", - /* 446 */ "table_reference_list", - /* 447 */ "table_reference", - /* 448 */ "table_primary", - /* 449 */ "joined_table", - /* 450 */ "alias_opt", - /* 451 */ "subquery", - /* 452 */ "parenthesized_joined_table", - /* 453 */ "join_type", - /* 454 */ "query_specification", - /* 455 */ "set_quantifier_opt", - /* 456 */ "select_list", - /* 457 */ "partition_by_clause_opt", - /* 458 */ "range_opt", - /* 459 */ "every_opt", - /* 460 */ "fill_opt", - /* 461 */ "twindow_clause_opt", - /* 462 */ "group_by_clause_opt", - /* 463 */ "having_clause_opt", - /* 464 */ "select_item", - /* 465 */ "partition_list", - /* 466 */ "partition_item", - /* 467 */ "fill_mode", - /* 468 */ "group_by_list", - /* 469 */ "query_expression", - /* 470 */ "query_simple", - /* 471 */ "order_by_clause_opt", - /* 472 */ "slimit_clause_opt", - /* 473 */ "limit_clause_opt", - /* 474 */ "union_query_expression", - /* 475 */ "query_simple_or_subquery", - /* 476 */ "sort_specification_list", - /* 477 */ "sort_specification", - /* 478 */ "ordering_specification_opt", - /* 479 */ "null_ordering_opt", + /* 52 */ "RESTORE", + /* 53 */ "NK_IPTOKEN", + /* 54 */ "FORCE", + /* 55 */ "LOCAL", + /* 56 */ "QNODE", + /* 57 */ "BNODE", + /* 58 */ "SNODE", + /* 59 */ "MNODE", + /* 60 */ "VNODE", + /* 61 */ "DATABASE", + /* 62 */ "USE", + /* 63 */ "FLUSH", + /* 64 */ "TRIM", + /* 65 */ "COMPACT", + /* 66 */ "IF", + /* 67 */ "NOT", + /* 68 */ "EXISTS", + /* 69 */ "BUFFER", + /* 70 */ "CACHEMODEL", + /* 71 */ "CACHESIZE", + /* 72 */ "COMP", + /* 73 */ "DURATION", + /* 74 */ "NK_VARIABLE", + /* 75 */ "MAXROWS", + /* 76 */ "MINROWS", + /* 77 */ "KEEP", + /* 78 */ "PAGES", + /* 79 */ "PAGESIZE", + /* 80 */ "TSDB_PAGESIZE", + /* 81 */ "PRECISION", + /* 82 */ "REPLICA", + /* 83 */ "VGROUPS", + /* 84 */ "SINGLE_STABLE", + /* 85 */ "RETENTIONS", + /* 86 */ "SCHEMALESS", + /* 87 */ "WAL_LEVEL", + /* 88 */ "WAL_FSYNC_PERIOD", + /* 89 */ "WAL_RETENTION_PERIOD", + /* 90 */ "WAL_RETENTION_SIZE", + /* 91 */ "WAL_ROLL_PERIOD", + /* 92 */ "WAL_SEGMENT_SIZE", + /* 93 */ "STT_TRIGGER", + /* 94 */ "TABLE_PREFIX", + /* 95 */ "TABLE_SUFFIX", + /* 96 */ "NK_COLON", + /* 97 */ "MAX_SPEED", + /* 98 */ "START", + /* 99 */ "TIMESTAMP", + /* 100 */ "END", + /* 101 */ "TABLE", + /* 102 */ "NK_LP", + /* 103 */ "NK_RP", + /* 104 */ "STABLE", + /* 105 */ "ADD", + /* 106 */ "COLUMN", + /* 107 */ "MODIFY", + /* 108 */ "RENAME", + /* 109 */ "TAG", + /* 110 */ "SET", + /* 111 */ "NK_EQ", + /* 112 */ "USING", + /* 113 */ "TAGS", + /* 114 */ "BOOL", + /* 115 */ "TINYINT", + /* 116 */ "SMALLINT", + /* 117 */ "INT", + /* 118 */ "INTEGER", + /* 119 */ "BIGINT", + /* 120 */ "FLOAT", + /* 121 */ "DOUBLE", + /* 122 */ "BINARY", + /* 123 */ "NCHAR", + /* 124 */ "UNSIGNED", + /* 125 */ "JSON", + /* 126 */ "VARCHAR", + /* 127 */ "MEDIUMBLOB", + /* 128 */ "BLOB", + /* 129 */ "VARBINARY", + /* 130 */ "DECIMAL", + /* 131 */ "COMMENT", + /* 132 */ "MAX_DELAY", + /* 133 */ "WATERMARK", + /* 134 */ "ROLLUP", + /* 135 */ "TTL", + /* 136 */ "SMA", + /* 137 */ "DELETE_MARK", + /* 138 */ "FIRST", + /* 139 */ "LAST", + /* 140 */ "SHOW", + /* 141 */ "PRIVILEGES", + /* 142 */ "DATABASES", + /* 143 */ "TABLES", + /* 144 */ "STABLES", + /* 145 */ "MNODES", + /* 146 */ "QNODES", + /* 147 */ "FUNCTIONS", + /* 148 */ "INDEXES", + /* 149 */ "ACCOUNTS", + /* 150 */ "APPS", + /* 151 */ "CONNECTIONS", + /* 152 */ "LICENCES", + /* 153 */ "GRANTS", + /* 154 */ "QUERIES", + /* 155 */ "SCORES", + /* 156 */ "TOPICS", + /* 157 */ "VARIABLES", + /* 158 */ "CLUSTER", + /* 159 */ "BNODES", + /* 160 */ "SNODES", + /* 161 */ "TRANSACTIONS", + /* 162 */ "DISTRIBUTED", + /* 163 */ "CONSUMERS", + /* 164 */ "SUBSCRIPTIONS", + /* 165 */ "VNODES", + /* 166 */ "ALIVE", + /* 167 */ "LIKE", + /* 168 */ "TBNAME", + /* 169 */ "QTAGS", + /* 170 */ "AS", + /* 171 */ "INDEX", + /* 172 */ "FUNCTION", + /* 173 */ "INTERVAL", + /* 174 */ "COUNT", + /* 175 */ "LAST_ROW", + /* 176 */ "TOPIC", + /* 177 */ "META", + /* 178 */ "CONSUMER", + /* 179 */ "GROUP", + /* 180 */ "DESC", + /* 181 */ "DESCRIBE", + /* 182 */ "RESET", + /* 183 */ "QUERY", + /* 184 */ "CACHE", + /* 185 */ "EXPLAIN", + /* 186 */ "ANALYZE", + /* 187 */ "VERBOSE", + /* 188 */ "NK_BOOL", + /* 189 */ "RATIO", + /* 190 */ "NK_FLOAT", + /* 191 */ "OUTPUTTYPE", + /* 192 */ "AGGREGATE", + /* 193 */ "BUFSIZE", + /* 194 */ "LANGUAGE", + /* 195 */ "REPLACE", + /* 196 */ "STREAM", + /* 197 */ "INTO", + /* 198 */ "PAUSE", + /* 199 */ "RESUME", + /* 200 */ "TRIGGER", + /* 201 */ "AT_ONCE", + /* 202 */ "WINDOW_CLOSE", + /* 203 */ "IGNORE", + /* 204 */ "EXPIRED", + /* 205 */ "FILL_HISTORY", + /* 206 */ "UPDATE", + /* 207 */ "SUBTABLE", + /* 208 */ "UNTREATED", + /* 209 */ "KILL", + /* 210 */ "CONNECTION", + /* 211 */ "TRANSACTION", + /* 212 */ "BALANCE", + /* 213 */ "VGROUP", + /* 214 */ "LEADER", + /* 215 */ "MERGE", + /* 216 */ "REDISTRIBUTE", + /* 217 */ "SPLIT", + /* 218 */ "DELETE", + /* 219 */ "INSERT", + /* 220 */ "NULL", + /* 221 */ "NK_QUESTION", + /* 222 */ "NK_ARROW", + /* 223 */ "ROWTS", + /* 224 */ "QSTART", + /* 225 */ "QEND", + /* 226 */ "QDURATION", + /* 227 */ "WSTART", + /* 228 */ "WEND", + /* 229 */ "WDURATION", + /* 230 */ "IROWTS", + /* 231 */ "ISFILLED", + /* 232 */ "CAST", + /* 233 */ "NOW", + /* 234 */ "TODAY", + /* 235 */ "TIMEZONE", + /* 236 */ "CLIENT_VERSION", + /* 237 */ "SERVER_VERSION", + /* 238 */ "SERVER_STATUS", + /* 239 */ "CURRENT_USER", + /* 240 */ "CASE", + /* 241 */ "WHEN", + /* 242 */ "THEN", + /* 243 */ "ELSE", + /* 244 */ "BETWEEN", + /* 245 */ "IS", + /* 246 */ "NK_LT", + /* 247 */ "NK_GT", + /* 248 */ "NK_LE", + /* 249 */ "NK_GE", + /* 250 */ "NK_NE", + /* 251 */ "MATCH", + /* 252 */ "NMATCH", + /* 253 */ "CONTAINS", + /* 254 */ "IN", + /* 255 */ "JOIN", + /* 256 */ "INNER", + /* 257 */ "SELECT", + /* 258 */ "DISTINCT", + /* 259 */ "WHERE", + /* 260 */ "PARTITION", + /* 261 */ "BY", + /* 262 */ "SESSION", + /* 263 */ "STATE_WINDOW", + /* 264 */ "EVENT_WINDOW", + /* 265 */ "SLIDING", + /* 266 */ "FILL", + /* 267 */ "VALUE", + /* 268 */ "VALUE_F", + /* 269 */ "NONE", + /* 270 */ "PREV", + /* 271 */ "NULL_F", + /* 272 */ "LINEAR", + /* 273 */ "NEXT", + /* 274 */ "HAVING", + /* 275 */ "RANGE", + /* 276 */ "EVERY", + /* 277 */ "ORDER", + /* 278 */ "SLIMIT", + /* 279 */ "SOFFSET", + /* 280 */ "LIMIT", + /* 281 */ "OFFSET", + /* 282 */ "ASC", + /* 283 */ "NULLS", + /* 284 */ "ABORT", + /* 285 */ "AFTER", + /* 286 */ "ATTACH", + /* 287 */ "BEFORE", + /* 288 */ "BEGIN", + /* 289 */ "BITAND", + /* 290 */ "BITNOT", + /* 291 */ "BITOR", + /* 292 */ "BLOCKS", + /* 293 */ "CHANGE", + /* 294 */ "COMMA", + /* 295 */ "CONCAT", + /* 296 */ "CONFLICT", + /* 297 */ "COPY", + /* 298 */ "DEFERRED", + /* 299 */ "DELIMITERS", + /* 300 */ "DETACH", + /* 301 */ "DIVIDE", + /* 302 */ "DOT", + /* 303 */ "EACH", + /* 304 */ "FAIL", + /* 305 */ "FILE", + /* 306 */ "FOR", + /* 307 */ "GLOB", + /* 308 */ "ID", + /* 309 */ "IMMEDIATE", + /* 310 */ "IMPORT", + /* 311 */ "INITIALLY", + /* 312 */ "INSTEAD", + /* 313 */ "ISNULL", + /* 314 */ "KEY", + /* 315 */ "MODULES", + /* 316 */ "NK_BITNOT", + /* 317 */ "NK_SEMI", + /* 318 */ "NOTNULL", + /* 319 */ "OF", + /* 320 */ "PLUS", + /* 321 */ "PRIVILEGE", + /* 322 */ "RAISE", + /* 323 */ "RESTRICT", + /* 324 */ "ROW", + /* 325 */ "SEMI", + /* 326 */ "STAR", + /* 327 */ "STATEMENT", + /* 328 */ "STRICT", + /* 329 */ "STRING", + /* 330 */ "TIMES", + /* 331 */ "VALUES", + /* 332 */ "VARIABLE", + /* 333 */ "VIEW", + /* 334 */ "WAL", + /* 335 */ "cmd", + /* 336 */ "account_options", + /* 337 */ "alter_account_options", + /* 338 */ "literal", + /* 339 */ "alter_account_option", + /* 340 */ "user_name", + /* 341 */ "sysinfo_opt", + /* 342 */ "privileges", + /* 343 */ "priv_level", + /* 344 */ "with_opt", + /* 345 */ "priv_type_list", + /* 346 */ "priv_type", + /* 347 */ "db_name", + /* 348 */ "table_name", + /* 349 */ "topic_name", + /* 350 */ "search_condition", + /* 351 */ "dnode_endpoint", + /* 352 */ "force_opt", + /* 353 */ "not_exists_opt", + /* 354 */ "db_options", + /* 355 */ "exists_opt", + /* 356 */ "alter_db_options", + /* 357 */ "speed_opt", + /* 358 */ "start_opt", + /* 359 */ "end_opt", + /* 360 */ "integer_list", + /* 361 */ "variable_list", + /* 362 */ "retention_list", + /* 363 */ "signed", + /* 364 */ "alter_db_option", + /* 365 */ "retention", + /* 366 */ "full_table_name", + /* 367 */ "column_def_list", + /* 368 */ "tags_def_opt", + /* 369 */ "table_options", + /* 370 */ "multi_create_clause", + /* 371 */ "tags_def", + /* 372 */ "multi_drop_clause", + /* 373 */ "alter_table_clause", + /* 374 */ "alter_table_options", + /* 375 */ "column_name", + /* 376 */ "type_name", + /* 377 */ "signed_literal", + /* 378 */ "create_subtable_clause", + /* 379 */ "specific_cols_opt", + /* 380 */ "expression_list", + /* 381 */ "drop_table_clause", + /* 382 */ "col_name_list", + /* 383 */ "column_def", + /* 384 */ "duration_list", + /* 385 */ "rollup_func_list", + /* 386 */ "alter_table_option", + /* 387 */ "duration_literal", + /* 388 */ "rollup_func_name", + /* 389 */ "function_name", + /* 390 */ "col_name", + /* 391 */ "db_name_cond_opt", + /* 392 */ "like_pattern_opt", + /* 393 */ "table_name_cond", + /* 394 */ "from_db_opt", + /* 395 */ "tag_list_opt", + /* 396 */ "tag_item", + /* 397 */ "column_alias", + /* 398 */ "full_index_name", + /* 399 */ "index_options", + /* 400 */ "index_name", + /* 401 */ "func_list", + /* 402 */ "sliding_opt", + /* 403 */ "sma_stream_opt", + /* 404 */ "func", + /* 405 */ "sma_func_name", + /* 406 */ "query_or_subquery", + /* 407 */ "cgroup_name", + /* 408 */ "analyze_opt", + /* 409 */ "explain_options", + /* 410 */ "insert_query", + /* 411 */ "or_replace_opt", + /* 412 */ "agg_func_opt", + /* 413 */ "bufsize_opt", + /* 414 */ "language_opt", + /* 415 */ "stream_name", + /* 416 */ "stream_options", + /* 417 */ "col_list_opt", + /* 418 */ "tag_def_or_ref_opt", + /* 419 */ "subtable_opt", + /* 420 */ "ignore_opt", + /* 421 */ "expression", + /* 422 */ "dnode_list", + /* 423 */ "where_clause_opt", + /* 424 */ "literal_func", + /* 425 */ "literal_list", + /* 426 */ "table_alias", + /* 427 */ "expr_or_subquery", + /* 428 */ "pseudo_column", + /* 429 */ "column_reference", + /* 430 */ "function_expression", + /* 431 */ "case_when_expression", + /* 432 */ "star_func", + /* 433 */ "star_func_para_list", + /* 434 */ "noarg_func", + /* 435 */ "other_para_list", + /* 436 */ "star_func_para", + /* 437 */ "when_then_list", + /* 438 */ "case_when_else_opt", + /* 439 */ "common_expression", + /* 440 */ "when_then_expr", + /* 441 */ "predicate", + /* 442 */ "compare_op", + /* 443 */ "in_op", + /* 444 */ "in_predicate_value", + /* 445 */ "boolean_value_expression", + /* 446 */ "boolean_primary", + /* 447 */ "from_clause_opt", + /* 448 */ "table_reference_list", + /* 449 */ "table_reference", + /* 450 */ "table_primary", + /* 451 */ "joined_table", + /* 452 */ "alias_opt", + /* 453 */ "subquery", + /* 454 */ "parenthesized_joined_table", + /* 455 */ "join_type", + /* 456 */ "query_specification", + /* 457 */ "set_quantifier_opt", + /* 458 */ "select_list", + /* 459 */ "partition_by_clause_opt", + /* 460 */ "range_opt", + /* 461 */ "every_opt", + /* 462 */ "fill_opt", + /* 463 */ "twindow_clause_opt", + /* 464 */ "group_by_clause_opt", + /* 465 */ "having_clause_opt", + /* 466 */ "select_item", + /* 467 */ "partition_list", + /* 468 */ "partition_item", + /* 469 */ "fill_mode", + /* 470 */ "group_by_list", + /* 471 */ "query_expression", + /* 472 */ "query_simple", + /* 473 */ "order_by_clause_opt", + /* 474 */ "slimit_clause_opt", + /* 475 */ "limit_clause_opt", + /* 476 */ "union_query_expression", + /* 477 */ "query_simple_or_subquery", + /* 478 */ "sort_specification_list", + /* 479 */ "sort_specification", + /* 480 */ "ordering_specification_opt", + /* 481 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2007,539 +2040,543 @@ static const char *const yyRuleName[] = { /* 51 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING", /* 52 */ "cmd ::= ALTER ALL DNODES NK_STRING", /* 53 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING", - /* 54 */ "dnode_endpoint ::= NK_STRING", - /* 55 */ "dnode_endpoint ::= NK_ID", - /* 56 */ "dnode_endpoint ::= NK_IPTOKEN", - /* 57 */ "force_opt ::=", - /* 58 */ "force_opt ::= FORCE", - /* 59 */ "cmd ::= ALTER LOCAL NK_STRING", - /* 60 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", - /* 61 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", - /* 62 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", - /* 63 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", - /* 64 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", - /* 65 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", - /* 66 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", - /* 67 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", - /* 68 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", - /* 69 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", - /* 70 */ "cmd ::= DROP DATABASE exists_opt db_name", - /* 71 */ "cmd ::= USE db_name", - /* 72 */ "cmd ::= ALTER DATABASE db_name alter_db_options", - /* 73 */ "cmd ::= FLUSH DATABASE db_name", - /* 74 */ "cmd ::= TRIM DATABASE db_name speed_opt", - /* 75 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", - /* 76 */ "not_exists_opt ::= IF NOT EXISTS", - /* 77 */ "not_exists_opt ::=", - /* 78 */ "exists_opt ::= IF EXISTS", - /* 79 */ "exists_opt ::=", - /* 80 */ "db_options ::=", - /* 81 */ "db_options ::= db_options BUFFER NK_INTEGER", - /* 82 */ "db_options ::= db_options CACHEMODEL NK_STRING", - /* 83 */ "db_options ::= db_options CACHESIZE NK_INTEGER", - /* 84 */ "db_options ::= db_options COMP NK_INTEGER", - /* 85 */ "db_options ::= db_options DURATION NK_INTEGER", - /* 86 */ "db_options ::= db_options DURATION NK_VARIABLE", - /* 87 */ "db_options ::= db_options MAXROWS NK_INTEGER", - /* 88 */ "db_options ::= db_options MINROWS NK_INTEGER", - /* 89 */ "db_options ::= db_options KEEP integer_list", - /* 90 */ "db_options ::= db_options KEEP variable_list", - /* 91 */ "db_options ::= db_options PAGES NK_INTEGER", - /* 92 */ "db_options ::= db_options PAGESIZE NK_INTEGER", - /* 93 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", - /* 94 */ "db_options ::= db_options PRECISION NK_STRING", - /* 95 */ "db_options ::= db_options REPLICA NK_INTEGER", - /* 96 */ "db_options ::= db_options VGROUPS NK_INTEGER", - /* 97 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", - /* 98 */ "db_options ::= db_options RETENTIONS retention_list", - /* 99 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", - /* 100 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", - /* 101 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", - /* 102 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", - /* 103 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 104 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", - /* 105 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 106 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", - /* 107 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", - /* 108 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", - /* 109 */ "db_options ::= db_options TABLE_PREFIX signed", - /* 110 */ "db_options ::= db_options TABLE_SUFFIX signed", - /* 111 */ "alter_db_options ::= alter_db_option", - /* 112 */ "alter_db_options ::= alter_db_options alter_db_option", - /* 113 */ "alter_db_option ::= BUFFER NK_INTEGER", - /* 114 */ "alter_db_option ::= CACHEMODEL NK_STRING", - /* 115 */ "alter_db_option ::= CACHESIZE NK_INTEGER", - /* 116 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", - /* 117 */ "alter_db_option ::= KEEP integer_list", - /* 118 */ "alter_db_option ::= KEEP variable_list", - /* 119 */ "alter_db_option ::= PAGES NK_INTEGER", - /* 120 */ "alter_db_option ::= REPLICA NK_INTEGER", - /* 121 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", - /* 122 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", - /* 123 */ "alter_db_option ::= MINROWS NK_INTEGER", - /* 124 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", - /* 125 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 126 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", - /* 127 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 128 */ "integer_list ::= NK_INTEGER", - /* 129 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", - /* 130 */ "variable_list ::= NK_VARIABLE", - /* 131 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", - /* 132 */ "retention_list ::= retention", - /* 133 */ "retention_list ::= retention_list NK_COMMA retention", - /* 134 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", - /* 135 */ "speed_opt ::=", - /* 136 */ "speed_opt ::= MAX_SPEED NK_INTEGER", - /* 137 */ "start_opt ::=", - /* 138 */ "start_opt ::= START WITH NK_INTEGER", - /* 139 */ "start_opt ::= START WITH NK_STRING", - /* 140 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", - /* 141 */ "end_opt ::=", - /* 142 */ "end_opt ::= END WITH NK_INTEGER", - /* 143 */ "end_opt ::= END WITH NK_STRING", - /* 144 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", - /* 145 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 146 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 147 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 148 */ "cmd ::= DROP TABLE multi_drop_clause", - /* 149 */ "cmd ::= DROP STABLE exists_opt full_table_name", - /* 150 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 151 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 152 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 153 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", - /* 154 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 155 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 156 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 157 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 158 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 159 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 160 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 161 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", - /* 162 */ "multi_create_clause ::= create_subtable_clause", - /* 163 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 164 */ "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", - /* 165 */ "multi_drop_clause ::= drop_table_clause", - /* 166 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", - /* 167 */ "drop_table_clause ::= exists_opt full_table_name", - /* 168 */ "specific_cols_opt ::=", - /* 169 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 170 */ "full_table_name ::= table_name", - /* 171 */ "full_table_name ::= db_name NK_DOT table_name", - /* 172 */ "column_def_list ::= column_def", - /* 173 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 174 */ "column_def ::= column_name type_name", - /* 175 */ "type_name ::= BOOL", - /* 176 */ "type_name ::= TINYINT", - /* 177 */ "type_name ::= SMALLINT", - /* 178 */ "type_name ::= INT", - /* 179 */ "type_name ::= INTEGER", - /* 180 */ "type_name ::= BIGINT", - /* 181 */ "type_name ::= FLOAT", - /* 182 */ "type_name ::= DOUBLE", - /* 183 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 184 */ "type_name ::= TIMESTAMP", - /* 185 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 186 */ "type_name ::= TINYINT UNSIGNED", - /* 187 */ "type_name ::= SMALLINT UNSIGNED", - /* 188 */ "type_name ::= INT UNSIGNED", - /* 189 */ "type_name ::= BIGINT UNSIGNED", - /* 190 */ "type_name ::= JSON", - /* 191 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 192 */ "type_name ::= MEDIUMBLOB", - /* 193 */ "type_name ::= BLOB", - /* 194 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 195 */ "type_name ::= DECIMAL", - /* 196 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 197 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 198 */ "tags_def_opt ::=", - /* 199 */ "tags_def_opt ::= tags_def", - /* 200 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", - /* 201 */ "table_options ::=", - /* 202 */ "table_options ::= table_options COMMENT NK_STRING", - /* 203 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 204 */ "table_options ::= table_options WATERMARK duration_list", - /* 205 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 206 */ "table_options ::= table_options TTL NK_INTEGER", - /* 207 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 208 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 209 */ "alter_table_options ::= alter_table_option", - /* 210 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 211 */ "alter_table_option ::= COMMENT NK_STRING", - /* 212 */ "alter_table_option ::= TTL NK_INTEGER", - /* 213 */ "duration_list ::= duration_literal", - /* 214 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 215 */ "rollup_func_list ::= rollup_func_name", - /* 216 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 217 */ "rollup_func_name ::= function_name", - /* 218 */ "rollup_func_name ::= FIRST", - /* 219 */ "rollup_func_name ::= LAST", - /* 220 */ "col_name_list ::= col_name", - /* 221 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 222 */ "col_name ::= column_name", - /* 223 */ "cmd ::= SHOW DNODES", - /* 224 */ "cmd ::= SHOW USERS", - /* 225 */ "cmd ::= SHOW USER PRIVILEGES", - /* 226 */ "cmd ::= SHOW DATABASES", - /* 227 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", - /* 228 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 229 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 230 */ "cmd ::= SHOW MNODES", - /* 231 */ "cmd ::= SHOW QNODES", - /* 232 */ "cmd ::= SHOW FUNCTIONS", - /* 233 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 234 */ "cmd ::= SHOW STREAMS", - /* 235 */ "cmd ::= SHOW ACCOUNTS", - /* 236 */ "cmd ::= SHOW APPS", - /* 237 */ "cmd ::= SHOW CONNECTIONS", - /* 238 */ "cmd ::= SHOW LICENCES", - /* 239 */ "cmd ::= SHOW GRANTS", - /* 240 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 241 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 242 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 243 */ "cmd ::= SHOW QUERIES", - /* 244 */ "cmd ::= SHOW SCORES", - /* 245 */ "cmd ::= SHOW TOPICS", - /* 246 */ "cmd ::= SHOW VARIABLES", - /* 247 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 248 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 249 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 250 */ "cmd ::= SHOW BNODES", - /* 251 */ "cmd ::= SHOW SNODES", - /* 252 */ "cmd ::= SHOW CLUSTER", - /* 253 */ "cmd ::= SHOW TRANSACTIONS", - /* 254 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 255 */ "cmd ::= SHOW CONSUMERS", - /* 256 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 257 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 258 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 259 */ "cmd ::= SHOW VNODES NK_INTEGER", - /* 260 */ "cmd ::= SHOW VNODES NK_STRING", - /* 261 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 262 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 263 */ "db_name_cond_opt ::=", - /* 264 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 265 */ "like_pattern_opt ::=", - /* 266 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 267 */ "table_name_cond ::= table_name", - /* 268 */ "from_db_opt ::=", - /* 269 */ "from_db_opt ::= FROM db_name", - /* 270 */ "tag_list_opt ::=", - /* 271 */ "tag_list_opt ::= tag_item", - /* 272 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 273 */ "tag_item ::= TBNAME", - /* 274 */ "tag_item ::= QTAGS", - /* 275 */ "tag_item ::= column_name", - /* 276 */ "tag_item ::= column_name column_alias", - /* 277 */ "tag_item ::= column_name AS column_alias", - /* 278 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options", - /* 279 */ "cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP", - /* 280 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 281 */ "full_index_name ::= index_name", - /* 282 */ "full_index_name ::= db_name NK_DOT index_name", - /* 283 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 284 */ "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", - /* 285 */ "func_list ::= func", - /* 286 */ "func_list ::= func_list NK_COMMA func", - /* 287 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 288 */ "sma_func_name ::= function_name", - /* 289 */ "sma_func_name ::= COUNT", - /* 290 */ "sma_func_name ::= FIRST", - /* 291 */ "sma_func_name ::= LAST", - /* 292 */ "sma_func_name ::= LAST_ROW", - /* 293 */ "sma_stream_opt ::=", - /* 294 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 295 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 296 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 297 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 298 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", - /* 299 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", - /* 300 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", - /* 301 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", - /* 302 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 303 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 304 */ "cmd ::= DESC full_table_name", - /* 305 */ "cmd ::= DESCRIBE full_table_name", - /* 306 */ "cmd ::= RESET QUERY CACHE", - /* 307 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 308 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 309 */ "analyze_opt ::=", - /* 310 */ "analyze_opt ::= ANALYZE", - /* 311 */ "explain_options ::=", - /* 312 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 313 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 314 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 315 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 316 */ "agg_func_opt ::=", - /* 317 */ "agg_func_opt ::= AGGREGATE", - /* 318 */ "bufsize_opt ::=", - /* 319 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 320 */ "language_opt ::=", - /* 321 */ "language_opt ::= LANGUAGE NK_STRING", - /* 322 */ "or_replace_opt ::=", - /* 323 */ "or_replace_opt ::= OR REPLACE", - /* 324 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", - /* 325 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 326 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 327 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 328 */ "col_list_opt ::=", - /* 329 */ "col_list_opt ::= NK_LP col_name_list NK_RP", - /* 330 */ "tag_def_or_ref_opt ::=", - /* 331 */ "tag_def_or_ref_opt ::= tags_def", - /* 332 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", - /* 333 */ "stream_options ::=", - /* 334 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 335 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 336 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 337 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 338 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 339 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 340 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 341 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 342 */ "subtable_opt ::=", - /* 343 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 344 */ "ignore_opt ::=", - /* 345 */ "ignore_opt ::= IGNORE UNTREATED", - /* 346 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 347 */ "cmd ::= KILL QUERY NK_STRING", - /* 348 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 349 */ "cmd ::= BALANCE VGROUP", - /* 350 */ "cmd ::= BALANCE VGROUP LEADER", - /* 351 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 352 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 353 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 354 */ "dnode_list ::= DNODE NK_INTEGER", - /* 355 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 356 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 357 */ "cmd ::= query_or_subquery", - /* 358 */ "cmd ::= insert_query", - /* 359 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 360 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 361 */ "literal ::= NK_INTEGER", - /* 362 */ "literal ::= NK_FLOAT", - /* 363 */ "literal ::= NK_STRING", - /* 364 */ "literal ::= NK_BOOL", - /* 365 */ "literal ::= TIMESTAMP NK_STRING", - /* 366 */ "literal ::= duration_literal", - /* 367 */ "literal ::= NULL", - /* 368 */ "literal ::= NK_QUESTION", - /* 369 */ "duration_literal ::= NK_VARIABLE", - /* 370 */ "signed ::= NK_INTEGER", - /* 371 */ "signed ::= NK_PLUS NK_INTEGER", - /* 372 */ "signed ::= NK_MINUS NK_INTEGER", - /* 373 */ "signed ::= NK_FLOAT", - /* 374 */ "signed ::= NK_PLUS NK_FLOAT", - /* 375 */ "signed ::= NK_MINUS NK_FLOAT", - /* 376 */ "signed_literal ::= signed", - /* 377 */ "signed_literal ::= NK_STRING", - /* 378 */ "signed_literal ::= NK_BOOL", - /* 379 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 380 */ "signed_literal ::= duration_literal", - /* 381 */ "signed_literal ::= NULL", - /* 382 */ "signed_literal ::= literal_func", - /* 383 */ "signed_literal ::= NK_QUESTION", - /* 384 */ "literal_list ::= signed_literal", - /* 385 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 386 */ "db_name ::= NK_ID", - /* 387 */ "table_name ::= NK_ID", - /* 388 */ "column_name ::= NK_ID", - /* 389 */ "function_name ::= NK_ID", - /* 390 */ "table_alias ::= NK_ID", - /* 391 */ "column_alias ::= NK_ID", - /* 392 */ "user_name ::= NK_ID", - /* 393 */ "topic_name ::= NK_ID", - /* 394 */ "stream_name ::= NK_ID", - /* 395 */ "cgroup_name ::= NK_ID", - /* 396 */ "index_name ::= NK_ID", - /* 397 */ "expr_or_subquery ::= expression", - /* 398 */ "expression ::= literal", - /* 399 */ "expression ::= pseudo_column", - /* 400 */ "expression ::= column_reference", - /* 401 */ "expression ::= function_expression", - /* 402 */ "expression ::= case_when_expression", - /* 403 */ "expression ::= NK_LP expression NK_RP", - /* 404 */ "expression ::= NK_PLUS expr_or_subquery", - /* 405 */ "expression ::= NK_MINUS expr_or_subquery", - /* 406 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 407 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 408 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 409 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 410 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 411 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 412 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 413 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 414 */ "expression_list ::= expr_or_subquery", - /* 415 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 416 */ "column_reference ::= column_name", - /* 417 */ "column_reference ::= table_name NK_DOT column_name", - /* 418 */ "pseudo_column ::= ROWTS", - /* 419 */ "pseudo_column ::= TBNAME", - /* 420 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 421 */ "pseudo_column ::= QSTART", - /* 422 */ "pseudo_column ::= QEND", - /* 423 */ "pseudo_column ::= QDURATION", - /* 424 */ "pseudo_column ::= WSTART", - /* 425 */ "pseudo_column ::= WEND", - /* 426 */ "pseudo_column ::= WDURATION", - /* 427 */ "pseudo_column ::= IROWTS", - /* 428 */ "pseudo_column ::= ISFILLED", - /* 429 */ "pseudo_column ::= QTAGS", - /* 430 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 431 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 432 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 433 */ "function_expression ::= literal_func", - /* 434 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 435 */ "literal_func ::= NOW", - /* 436 */ "noarg_func ::= NOW", - /* 437 */ "noarg_func ::= TODAY", - /* 438 */ "noarg_func ::= TIMEZONE", - /* 439 */ "noarg_func ::= DATABASE", - /* 440 */ "noarg_func ::= CLIENT_VERSION", - /* 441 */ "noarg_func ::= SERVER_VERSION", - /* 442 */ "noarg_func ::= SERVER_STATUS", - /* 443 */ "noarg_func ::= CURRENT_USER", - /* 444 */ "noarg_func ::= USER", - /* 445 */ "star_func ::= COUNT", - /* 446 */ "star_func ::= FIRST", - /* 447 */ "star_func ::= LAST", - /* 448 */ "star_func ::= LAST_ROW", - /* 449 */ "star_func_para_list ::= NK_STAR", - /* 450 */ "star_func_para_list ::= other_para_list", - /* 451 */ "other_para_list ::= star_func_para", - /* 452 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 453 */ "star_func_para ::= expr_or_subquery", - /* 454 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 455 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 456 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 457 */ "when_then_list ::= when_then_expr", - /* 458 */ "when_then_list ::= when_then_list when_then_expr", - /* 459 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 460 */ "case_when_else_opt ::=", - /* 461 */ "case_when_else_opt ::= ELSE common_expression", - /* 462 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 463 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 464 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 465 */ "predicate ::= expr_or_subquery IS NULL", - /* 466 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 467 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 468 */ "compare_op ::= NK_LT", - /* 469 */ "compare_op ::= NK_GT", - /* 470 */ "compare_op ::= NK_LE", - /* 471 */ "compare_op ::= NK_GE", - /* 472 */ "compare_op ::= NK_NE", - /* 473 */ "compare_op ::= NK_EQ", - /* 474 */ "compare_op ::= LIKE", - /* 475 */ "compare_op ::= NOT LIKE", - /* 476 */ "compare_op ::= MATCH", - /* 477 */ "compare_op ::= NMATCH", - /* 478 */ "compare_op ::= CONTAINS", - /* 479 */ "in_op ::= IN", - /* 480 */ "in_op ::= NOT IN", - /* 481 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 482 */ "boolean_value_expression ::= boolean_primary", - /* 483 */ "boolean_value_expression ::= NOT boolean_primary", - /* 484 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 485 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 486 */ "boolean_primary ::= predicate", - /* 487 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 488 */ "common_expression ::= expr_or_subquery", - /* 489 */ "common_expression ::= boolean_value_expression", - /* 490 */ "from_clause_opt ::=", - /* 491 */ "from_clause_opt ::= FROM table_reference_list", - /* 492 */ "table_reference_list ::= table_reference", - /* 493 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 494 */ "table_reference ::= table_primary", - /* 495 */ "table_reference ::= joined_table", - /* 496 */ "table_primary ::= table_name alias_opt", - /* 497 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 498 */ "table_primary ::= subquery alias_opt", - /* 499 */ "table_primary ::= parenthesized_joined_table", - /* 500 */ "alias_opt ::=", - /* 501 */ "alias_opt ::= table_alias", - /* 502 */ "alias_opt ::= AS table_alias", - /* 503 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 504 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 505 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 506 */ "join_type ::=", - /* 507 */ "join_type ::= INNER", - /* 508 */ "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", - /* 509 */ "set_quantifier_opt ::=", - /* 510 */ "set_quantifier_opt ::= DISTINCT", - /* 511 */ "set_quantifier_opt ::= ALL", - /* 512 */ "select_list ::= select_item", - /* 513 */ "select_list ::= select_list NK_COMMA select_item", - /* 514 */ "select_item ::= NK_STAR", - /* 515 */ "select_item ::= common_expression", - /* 516 */ "select_item ::= common_expression column_alias", - /* 517 */ "select_item ::= common_expression AS column_alias", - /* 518 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 519 */ "where_clause_opt ::=", - /* 520 */ "where_clause_opt ::= WHERE search_condition", - /* 521 */ "partition_by_clause_opt ::=", - /* 522 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 523 */ "partition_list ::= partition_item", - /* 524 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 525 */ "partition_item ::= expr_or_subquery", - /* 526 */ "partition_item ::= expr_or_subquery column_alias", - /* 527 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 528 */ "twindow_clause_opt ::=", - /* 529 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 530 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 531 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 532 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 533 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 534 */ "sliding_opt ::=", - /* 535 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 536 */ "fill_opt ::=", - /* 537 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 538 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 539 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 540 */ "fill_mode ::= NONE", - /* 541 */ "fill_mode ::= PREV", - /* 542 */ "fill_mode ::= NULL", - /* 543 */ "fill_mode ::= NULL_F", - /* 544 */ "fill_mode ::= LINEAR", - /* 545 */ "fill_mode ::= NEXT", - /* 546 */ "group_by_clause_opt ::=", - /* 547 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 548 */ "group_by_list ::= expr_or_subquery", - /* 549 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 550 */ "having_clause_opt ::=", - /* 551 */ "having_clause_opt ::= HAVING search_condition", - /* 552 */ "range_opt ::=", - /* 553 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 554 */ "every_opt ::=", - /* 555 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 556 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 557 */ "query_simple ::= query_specification", - /* 558 */ "query_simple ::= union_query_expression", - /* 559 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 560 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 561 */ "query_simple_or_subquery ::= query_simple", - /* 562 */ "query_simple_or_subquery ::= subquery", - /* 563 */ "query_or_subquery ::= query_expression", - /* 564 */ "query_or_subquery ::= subquery", - /* 565 */ "order_by_clause_opt ::=", - /* 566 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 567 */ "slimit_clause_opt ::=", - /* 568 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 569 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 570 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 571 */ "limit_clause_opt ::=", - /* 572 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 573 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 574 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 575 */ "subquery ::= NK_LP query_expression NK_RP", - /* 576 */ "subquery ::= NK_LP subquery NK_RP", - /* 577 */ "search_condition ::= common_expression", - /* 578 */ "sort_specification_list ::= sort_specification", - /* 579 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 580 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 581 */ "ordering_specification_opt ::=", - /* 582 */ "ordering_specification_opt ::= ASC", - /* 583 */ "ordering_specification_opt ::= DESC", - /* 584 */ "null_ordering_opt ::=", - /* 585 */ "null_ordering_opt ::= NULLS FIRST", - /* 586 */ "null_ordering_opt ::= NULLS LAST", + /* 54 */ "cmd ::= RESTORE DNODE NK_INTEGER", + /* 55 */ "dnode_endpoint ::= NK_STRING", + /* 56 */ "dnode_endpoint ::= NK_ID", + /* 57 */ "dnode_endpoint ::= NK_IPTOKEN", + /* 58 */ "force_opt ::=", + /* 59 */ "force_opt ::= FORCE", + /* 60 */ "cmd ::= ALTER LOCAL NK_STRING", + /* 61 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", + /* 62 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", + /* 63 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", + /* 64 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER", + /* 65 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", + /* 66 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", + /* 67 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", + /* 68 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", + /* 69 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", + /* 70 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", + /* 71 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER", + /* 72 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER", + /* 73 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", + /* 74 */ "cmd ::= DROP DATABASE exists_opt db_name", + /* 75 */ "cmd ::= USE db_name", + /* 76 */ "cmd ::= ALTER DATABASE db_name alter_db_options", + /* 77 */ "cmd ::= FLUSH DATABASE db_name", + /* 78 */ "cmd ::= TRIM DATABASE db_name speed_opt", + /* 79 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", + /* 80 */ "not_exists_opt ::= IF NOT EXISTS", + /* 81 */ "not_exists_opt ::=", + /* 82 */ "exists_opt ::= IF EXISTS", + /* 83 */ "exists_opt ::=", + /* 84 */ "db_options ::=", + /* 85 */ "db_options ::= db_options BUFFER NK_INTEGER", + /* 86 */ "db_options ::= db_options CACHEMODEL NK_STRING", + /* 87 */ "db_options ::= db_options CACHESIZE NK_INTEGER", + /* 88 */ "db_options ::= db_options COMP NK_INTEGER", + /* 89 */ "db_options ::= db_options DURATION NK_INTEGER", + /* 90 */ "db_options ::= db_options DURATION NK_VARIABLE", + /* 91 */ "db_options ::= db_options MAXROWS NK_INTEGER", + /* 92 */ "db_options ::= db_options MINROWS NK_INTEGER", + /* 93 */ "db_options ::= db_options KEEP integer_list", + /* 94 */ "db_options ::= db_options KEEP variable_list", + /* 95 */ "db_options ::= db_options PAGES NK_INTEGER", + /* 96 */ "db_options ::= db_options PAGESIZE NK_INTEGER", + /* 97 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", + /* 98 */ "db_options ::= db_options PRECISION NK_STRING", + /* 99 */ "db_options ::= db_options REPLICA NK_INTEGER", + /* 100 */ "db_options ::= db_options VGROUPS NK_INTEGER", + /* 101 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", + /* 102 */ "db_options ::= db_options RETENTIONS retention_list", + /* 103 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", + /* 104 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", + /* 105 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", + /* 106 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", + /* 107 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 108 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", + /* 109 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 110 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", + /* 111 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", + /* 112 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", + /* 113 */ "db_options ::= db_options TABLE_PREFIX signed", + /* 114 */ "db_options ::= db_options TABLE_SUFFIX signed", + /* 115 */ "alter_db_options ::= alter_db_option", + /* 116 */ "alter_db_options ::= alter_db_options alter_db_option", + /* 117 */ "alter_db_option ::= BUFFER NK_INTEGER", + /* 118 */ "alter_db_option ::= CACHEMODEL NK_STRING", + /* 119 */ "alter_db_option ::= CACHESIZE NK_INTEGER", + /* 120 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", + /* 121 */ "alter_db_option ::= KEEP integer_list", + /* 122 */ "alter_db_option ::= KEEP variable_list", + /* 123 */ "alter_db_option ::= PAGES NK_INTEGER", + /* 124 */ "alter_db_option ::= REPLICA NK_INTEGER", + /* 125 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", + /* 126 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", + /* 127 */ "alter_db_option ::= MINROWS NK_INTEGER", + /* 128 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", + /* 129 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 130 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", + /* 131 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 132 */ "integer_list ::= NK_INTEGER", + /* 133 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", + /* 134 */ "variable_list ::= NK_VARIABLE", + /* 135 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", + /* 136 */ "retention_list ::= retention", + /* 137 */ "retention_list ::= retention_list NK_COMMA retention", + /* 138 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", + /* 139 */ "speed_opt ::=", + /* 140 */ "speed_opt ::= MAX_SPEED NK_INTEGER", + /* 141 */ "start_opt ::=", + /* 142 */ "start_opt ::= START WITH NK_INTEGER", + /* 143 */ "start_opt ::= START WITH NK_STRING", + /* 144 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", + /* 145 */ "end_opt ::=", + /* 146 */ "end_opt ::= END WITH NK_INTEGER", + /* 147 */ "end_opt ::= END WITH NK_STRING", + /* 148 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", + /* 149 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 150 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 151 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 152 */ "cmd ::= DROP TABLE multi_drop_clause", + /* 153 */ "cmd ::= DROP STABLE exists_opt full_table_name", + /* 154 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 155 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 156 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 157 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", + /* 158 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 159 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 160 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 161 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 162 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 163 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 164 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 165 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", + /* 166 */ "multi_create_clause ::= create_subtable_clause", + /* 167 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 168 */ "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", + /* 169 */ "multi_drop_clause ::= drop_table_clause", + /* 170 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", + /* 171 */ "drop_table_clause ::= exists_opt full_table_name", + /* 172 */ "specific_cols_opt ::=", + /* 173 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 174 */ "full_table_name ::= table_name", + /* 175 */ "full_table_name ::= db_name NK_DOT table_name", + /* 176 */ "column_def_list ::= column_def", + /* 177 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 178 */ "column_def ::= column_name type_name", + /* 179 */ "type_name ::= BOOL", + /* 180 */ "type_name ::= TINYINT", + /* 181 */ "type_name ::= SMALLINT", + /* 182 */ "type_name ::= INT", + /* 183 */ "type_name ::= INTEGER", + /* 184 */ "type_name ::= BIGINT", + /* 185 */ "type_name ::= FLOAT", + /* 186 */ "type_name ::= DOUBLE", + /* 187 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 188 */ "type_name ::= TIMESTAMP", + /* 189 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 190 */ "type_name ::= TINYINT UNSIGNED", + /* 191 */ "type_name ::= SMALLINT UNSIGNED", + /* 192 */ "type_name ::= INT UNSIGNED", + /* 193 */ "type_name ::= BIGINT UNSIGNED", + /* 194 */ "type_name ::= JSON", + /* 195 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 196 */ "type_name ::= MEDIUMBLOB", + /* 197 */ "type_name ::= BLOB", + /* 198 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 199 */ "type_name ::= DECIMAL", + /* 200 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 201 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 202 */ "tags_def_opt ::=", + /* 203 */ "tags_def_opt ::= tags_def", + /* 204 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", + /* 205 */ "table_options ::=", + /* 206 */ "table_options ::= table_options COMMENT NK_STRING", + /* 207 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 208 */ "table_options ::= table_options WATERMARK duration_list", + /* 209 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 210 */ "table_options ::= table_options TTL NK_INTEGER", + /* 211 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 212 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 213 */ "alter_table_options ::= alter_table_option", + /* 214 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 215 */ "alter_table_option ::= COMMENT NK_STRING", + /* 216 */ "alter_table_option ::= TTL NK_INTEGER", + /* 217 */ "duration_list ::= duration_literal", + /* 218 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 219 */ "rollup_func_list ::= rollup_func_name", + /* 220 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 221 */ "rollup_func_name ::= function_name", + /* 222 */ "rollup_func_name ::= FIRST", + /* 223 */ "rollup_func_name ::= LAST", + /* 224 */ "col_name_list ::= col_name", + /* 225 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 226 */ "col_name ::= column_name", + /* 227 */ "cmd ::= SHOW DNODES", + /* 228 */ "cmd ::= SHOW USERS", + /* 229 */ "cmd ::= SHOW USER PRIVILEGES", + /* 230 */ "cmd ::= SHOW DATABASES", + /* 231 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", + /* 232 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 233 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 234 */ "cmd ::= SHOW MNODES", + /* 235 */ "cmd ::= SHOW QNODES", + /* 236 */ "cmd ::= SHOW FUNCTIONS", + /* 237 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 238 */ "cmd ::= SHOW STREAMS", + /* 239 */ "cmd ::= SHOW ACCOUNTS", + /* 240 */ "cmd ::= SHOW APPS", + /* 241 */ "cmd ::= SHOW CONNECTIONS", + /* 242 */ "cmd ::= SHOW LICENCES", + /* 243 */ "cmd ::= SHOW GRANTS", + /* 244 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 245 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 246 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 247 */ "cmd ::= SHOW QUERIES", + /* 248 */ "cmd ::= SHOW SCORES", + /* 249 */ "cmd ::= SHOW TOPICS", + /* 250 */ "cmd ::= SHOW VARIABLES", + /* 251 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 252 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 253 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 254 */ "cmd ::= SHOW BNODES", + /* 255 */ "cmd ::= SHOW SNODES", + /* 256 */ "cmd ::= SHOW CLUSTER", + /* 257 */ "cmd ::= SHOW TRANSACTIONS", + /* 258 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 259 */ "cmd ::= SHOW CONSUMERS", + /* 260 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 261 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 262 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 263 */ "cmd ::= SHOW VNODES NK_INTEGER", + /* 264 */ "cmd ::= SHOW VNODES NK_STRING", + /* 265 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 266 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 267 */ "db_name_cond_opt ::=", + /* 268 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 269 */ "like_pattern_opt ::=", + /* 270 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 271 */ "table_name_cond ::= table_name", + /* 272 */ "from_db_opt ::=", + /* 273 */ "from_db_opt ::= FROM db_name", + /* 274 */ "tag_list_opt ::=", + /* 275 */ "tag_list_opt ::= tag_item", + /* 276 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 277 */ "tag_item ::= TBNAME", + /* 278 */ "tag_item ::= QTAGS", + /* 279 */ "tag_item ::= column_name", + /* 280 */ "tag_item ::= column_name column_alias", + /* 281 */ "tag_item ::= column_name AS column_alias", + /* 282 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options", + /* 283 */ "cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP", + /* 284 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 285 */ "full_index_name ::= index_name", + /* 286 */ "full_index_name ::= db_name NK_DOT index_name", + /* 287 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 288 */ "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", + /* 289 */ "func_list ::= func", + /* 290 */ "func_list ::= func_list NK_COMMA func", + /* 291 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 292 */ "sma_func_name ::= function_name", + /* 293 */ "sma_func_name ::= COUNT", + /* 294 */ "sma_func_name ::= FIRST", + /* 295 */ "sma_func_name ::= LAST", + /* 296 */ "sma_func_name ::= LAST_ROW", + /* 297 */ "sma_stream_opt ::=", + /* 298 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 299 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 300 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 301 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 302 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", + /* 303 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", + /* 304 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", + /* 305 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", + /* 306 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 307 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 308 */ "cmd ::= DESC full_table_name", + /* 309 */ "cmd ::= DESCRIBE full_table_name", + /* 310 */ "cmd ::= RESET QUERY CACHE", + /* 311 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 312 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 313 */ "analyze_opt ::=", + /* 314 */ "analyze_opt ::= ANALYZE", + /* 315 */ "explain_options ::=", + /* 316 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 317 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 318 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 319 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 320 */ "agg_func_opt ::=", + /* 321 */ "agg_func_opt ::= AGGREGATE", + /* 322 */ "bufsize_opt ::=", + /* 323 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 324 */ "language_opt ::=", + /* 325 */ "language_opt ::= LANGUAGE NK_STRING", + /* 326 */ "or_replace_opt ::=", + /* 327 */ "or_replace_opt ::= OR REPLACE", + /* 328 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", + /* 329 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 330 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 331 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 332 */ "col_list_opt ::=", + /* 333 */ "col_list_opt ::= NK_LP col_name_list NK_RP", + /* 334 */ "tag_def_or_ref_opt ::=", + /* 335 */ "tag_def_or_ref_opt ::= tags_def", + /* 336 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", + /* 337 */ "stream_options ::=", + /* 338 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 339 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 340 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 341 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 342 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 343 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 344 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 345 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 346 */ "subtable_opt ::=", + /* 347 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 348 */ "ignore_opt ::=", + /* 349 */ "ignore_opt ::= IGNORE UNTREATED", + /* 350 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 351 */ "cmd ::= KILL QUERY NK_STRING", + /* 352 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 353 */ "cmd ::= BALANCE VGROUP", + /* 354 */ "cmd ::= BALANCE VGROUP LEADER", + /* 355 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 356 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 357 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 358 */ "dnode_list ::= DNODE NK_INTEGER", + /* 359 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 360 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 361 */ "cmd ::= query_or_subquery", + /* 362 */ "cmd ::= insert_query", + /* 363 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 364 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 365 */ "literal ::= NK_INTEGER", + /* 366 */ "literal ::= NK_FLOAT", + /* 367 */ "literal ::= NK_STRING", + /* 368 */ "literal ::= NK_BOOL", + /* 369 */ "literal ::= TIMESTAMP NK_STRING", + /* 370 */ "literal ::= duration_literal", + /* 371 */ "literal ::= NULL", + /* 372 */ "literal ::= NK_QUESTION", + /* 373 */ "duration_literal ::= NK_VARIABLE", + /* 374 */ "signed ::= NK_INTEGER", + /* 375 */ "signed ::= NK_PLUS NK_INTEGER", + /* 376 */ "signed ::= NK_MINUS NK_INTEGER", + /* 377 */ "signed ::= NK_FLOAT", + /* 378 */ "signed ::= NK_PLUS NK_FLOAT", + /* 379 */ "signed ::= NK_MINUS NK_FLOAT", + /* 380 */ "signed_literal ::= signed", + /* 381 */ "signed_literal ::= NK_STRING", + /* 382 */ "signed_literal ::= NK_BOOL", + /* 383 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 384 */ "signed_literal ::= duration_literal", + /* 385 */ "signed_literal ::= NULL", + /* 386 */ "signed_literal ::= literal_func", + /* 387 */ "signed_literal ::= NK_QUESTION", + /* 388 */ "literal_list ::= signed_literal", + /* 389 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 390 */ "db_name ::= NK_ID", + /* 391 */ "table_name ::= NK_ID", + /* 392 */ "column_name ::= NK_ID", + /* 393 */ "function_name ::= NK_ID", + /* 394 */ "table_alias ::= NK_ID", + /* 395 */ "column_alias ::= NK_ID", + /* 396 */ "user_name ::= NK_ID", + /* 397 */ "topic_name ::= NK_ID", + /* 398 */ "stream_name ::= NK_ID", + /* 399 */ "cgroup_name ::= NK_ID", + /* 400 */ "index_name ::= NK_ID", + /* 401 */ "expr_or_subquery ::= expression", + /* 402 */ "expression ::= literal", + /* 403 */ "expression ::= pseudo_column", + /* 404 */ "expression ::= column_reference", + /* 405 */ "expression ::= function_expression", + /* 406 */ "expression ::= case_when_expression", + /* 407 */ "expression ::= NK_LP expression NK_RP", + /* 408 */ "expression ::= NK_PLUS expr_or_subquery", + /* 409 */ "expression ::= NK_MINUS expr_or_subquery", + /* 410 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 411 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 412 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 413 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 414 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 415 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 416 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 417 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 418 */ "expression_list ::= expr_or_subquery", + /* 419 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 420 */ "column_reference ::= column_name", + /* 421 */ "column_reference ::= table_name NK_DOT column_name", + /* 422 */ "pseudo_column ::= ROWTS", + /* 423 */ "pseudo_column ::= TBNAME", + /* 424 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 425 */ "pseudo_column ::= QSTART", + /* 426 */ "pseudo_column ::= QEND", + /* 427 */ "pseudo_column ::= QDURATION", + /* 428 */ "pseudo_column ::= WSTART", + /* 429 */ "pseudo_column ::= WEND", + /* 430 */ "pseudo_column ::= WDURATION", + /* 431 */ "pseudo_column ::= IROWTS", + /* 432 */ "pseudo_column ::= ISFILLED", + /* 433 */ "pseudo_column ::= QTAGS", + /* 434 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 435 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 436 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 437 */ "function_expression ::= literal_func", + /* 438 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 439 */ "literal_func ::= NOW", + /* 440 */ "noarg_func ::= NOW", + /* 441 */ "noarg_func ::= TODAY", + /* 442 */ "noarg_func ::= TIMEZONE", + /* 443 */ "noarg_func ::= DATABASE", + /* 444 */ "noarg_func ::= CLIENT_VERSION", + /* 445 */ "noarg_func ::= SERVER_VERSION", + /* 446 */ "noarg_func ::= SERVER_STATUS", + /* 447 */ "noarg_func ::= CURRENT_USER", + /* 448 */ "noarg_func ::= USER", + /* 449 */ "star_func ::= COUNT", + /* 450 */ "star_func ::= FIRST", + /* 451 */ "star_func ::= LAST", + /* 452 */ "star_func ::= LAST_ROW", + /* 453 */ "star_func_para_list ::= NK_STAR", + /* 454 */ "star_func_para_list ::= other_para_list", + /* 455 */ "other_para_list ::= star_func_para", + /* 456 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 457 */ "star_func_para ::= expr_or_subquery", + /* 458 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 459 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 460 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 461 */ "when_then_list ::= when_then_expr", + /* 462 */ "when_then_list ::= when_then_list when_then_expr", + /* 463 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 464 */ "case_when_else_opt ::=", + /* 465 */ "case_when_else_opt ::= ELSE common_expression", + /* 466 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 467 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 468 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 469 */ "predicate ::= expr_or_subquery IS NULL", + /* 470 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 471 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 472 */ "compare_op ::= NK_LT", + /* 473 */ "compare_op ::= NK_GT", + /* 474 */ "compare_op ::= NK_LE", + /* 475 */ "compare_op ::= NK_GE", + /* 476 */ "compare_op ::= NK_NE", + /* 477 */ "compare_op ::= NK_EQ", + /* 478 */ "compare_op ::= LIKE", + /* 479 */ "compare_op ::= NOT LIKE", + /* 480 */ "compare_op ::= MATCH", + /* 481 */ "compare_op ::= NMATCH", + /* 482 */ "compare_op ::= CONTAINS", + /* 483 */ "in_op ::= IN", + /* 484 */ "in_op ::= NOT IN", + /* 485 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 486 */ "boolean_value_expression ::= boolean_primary", + /* 487 */ "boolean_value_expression ::= NOT boolean_primary", + /* 488 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 489 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 490 */ "boolean_primary ::= predicate", + /* 491 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 492 */ "common_expression ::= expr_or_subquery", + /* 493 */ "common_expression ::= boolean_value_expression", + /* 494 */ "from_clause_opt ::=", + /* 495 */ "from_clause_opt ::= FROM table_reference_list", + /* 496 */ "table_reference_list ::= table_reference", + /* 497 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 498 */ "table_reference ::= table_primary", + /* 499 */ "table_reference ::= joined_table", + /* 500 */ "table_primary ::= table_name alias_opt", + /* 501 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 502 */ "table_primary ::= subquery alias_opt", + /* 503 */ "table_primary ::= parenthesized_joined_table", + /* 504 */ "alias_opt ::=", + /* 505 */ "alias_opt ::= table_alias", + /* 506 */ "alias_opt ::= AS table_alias", + /* 507 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 508 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 509 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 510 */ "join_type ::=", + /* 511 */ "join_type ::= INNER", + /* 512 */ "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", + /* 513 */ "set_quantifier_opt ::=", + /* 514 */ "set_quantifier_opt ::= DISTINCT", + /* 515 */ "set_quantifier_opt ::= ALL", + /* 516 */ "select_list ::= select_item", + /* 517 */ "select_list ::= select_list NK_COMMA select_item", + /* 518 */ "select_item ::= NK_STAR", + /* 519 */ "select_item ::= common_expression", + /* 520 */ "select_item ::= common_expression column_alias", + /* 521 */ "select_item ::= common_expression AS column_alias", + /* 522 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 523 */ "where_clause_opt ::=", + /* 524 */ "where_clause_opt ::= WHERE search_condition", + /* 525 */ "partition_by_clause_opt ::=", + /* 526 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 527 */ "partition_list ::= partition_item", + /* 528 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 529 */ "partition_item ::= expr_or_subquery", + /* 530 */ "partition_item ::= expr_or_subquery column_alias", + /* 531 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 532 */ "twindow_clause_opt ::=", + /* 533 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 534 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 535 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 536 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 537 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 538 */ "sliding_opt ::=", + /* 539 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 540 */ "fill_opt ::=", + /* 541 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 542 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 543 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 544 */ "fill_mode ::= NONE", + /* 545 */ "fill_mode ::= PREV", + /* 546 */ "fill_mode ::= NULL", + /* 547 */ "fill_mode ::= NULL_F", + /* 548 */ "fill_mode ::= LINEAR", + /* 549 */ "fill_mode ::= NEXT", + /* 550 */ "group_by_clause_opt ::=", + /* 551 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 552 */ "group_by_list ::= expr_or_subquery", + /* 553 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 554 */ "having_clause_opt ::=", + /* 555 */ "having_clause_opt ::= HAVING search_condition", + /* 556 */ "range_opt ::=", + /* 557 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 558 */ "every_opt ::=", + /* 559 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 560 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 561 */ "query_simple ::= query_specification", + /* 562 */ "query_simple ::= union_query_expression", + /* 563 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 564 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 565 */ "query_simple_or_subquery ::= query_simple", + /* 566 */ "query_simple_or_subquery ::= subquery", + /* 567 */ "query_or_subquery ::= query_expression", + /* 568 */ "query_or_subquery ::= subquery", + /* 569 */ "order_by_clause_opt ::=", + /* 570 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 571 */ "slimit_clause_opt ::=", + /* 572 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 573 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 574 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 575 */ "limit_clause_opt ::=", + /* 576 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 577 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 578 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 579 */ "subquery ::= NK_LP query_expression NK_RP", + /* 580 */ "subquery ::= NK_LP subquery NK_RP", + /* 581 */ "search_condition ::= common_expression", + /* 582 */ "sort_specification_list ::= sort_specification", + /* 583 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 584 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 585 */ "ordering_specification_opt ::=", + /* 586 */ "ordering_specification_opt ::= ASC", + /* 587 */ "ordering_specification_opt ::= DESC", + /* 588 */ "null_ordering_opt ::=", + /* 589 */ "null_ordering_opt ::= NULLS FIRST", + /* 590 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2666,211 +2703,241 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 333: /* cmd */ - case 336: /* literal */ - case 342: /* with_opt */ - case 348: /* search_condition */ - case 352: /* db_options */ - case 354: /* alter_db_options */ - case 356: /* start_opt */ - case 357: /* end_opt */ - case 361: /* signed */ - case 363: /* retention */ - case 364: /* full_table_name */ - case 367: /* table_options */ - case 371: /* alter_table_clause */ - case 372: /* alter_table_options */ - case 375: /* signed_literal */ - case 376: /* create_subtable_clause */ - case 379: /* drop_table_clause */ - case 381: /* column_def */ - case 385: /* duration_literal */ - case 386: /* rollup_func_name */ - case 388: /* col_name */ - case 389: /* db_name_cond_opt */ - case 390: /* like_pattern_opt */ - case 391: /* table_name_cond */ - case 392: /* from_db_opt */ - case 394: /* tag_item */ - case 396: /* full_index_name */ - case 397: /* index_options */ - case 400: /* sliding_opt */ - case 401: /* sma_stream_opt */ - case 402: /* func */ - case 404: /* query_or_subquery */ - case 407: /* explain_options */ - case 408: /* insert_query */ - case 414: /* stream_options */ - case 417: /* subtable_opt */ - case 419: /* expression */ - case 421: /* where_clause_opt */ - case 422: /* literal_func */ - case 425: /* expr_or_subquery */ - case 426: /* pseudo_column */ - case 427: /* column_reference */ - case 428: /* function_expression */ - case 429: /* case_when_expression */ - case 434: /* star_func_para */ - case 436: /* case_when_else_opt */ - case 437: /* common_expression */ - case 438: /* when_then_expr */ - case 439: /* predicate */ - case 442: /* in_predicate_value */ - case 443: /* boolean_value_expression */ - case 444: /* boolean_primary */ - case 445: /* from_clause_opt */ - case 446: /* table_reference_list */ - case 447: /* table_reference */ - case 448: /* table_primary */ - case 449: /* joined_table */ - case 451: /* subquery */ - case 452: /* parenthesized_joined_table */ - case 454: /* query_specification */ - case 458: /* range_opt */ - case 459: /* every_opt */ - case 460: /* fill_opt */ - case 461: /* twindow_clause_opt */ - case 463: /* having_clause_opt */ - case 464: /* select_item */ - case 466: /* partition_item */ - case 469: /* query_expression */ - case 470: /* query_simple */ - case 472: /* slimit_clause_opt */ - case 473: /* limit_clause_opt */ - case 474: /* union_query_expression */ - case 475: /* query_simple_or_subquery */ - case 477: /* sort_specification */ + case 335: /* cmd */ + case 338: /* literal */ + case 344: /* with_opt */ + case 350: /* search_condition */ + case 354: /* db_options */ + case 356: /* alter_db_options */ + case 358: /* start_opt */ + case 359: /* end_opt */ + case 363: /* signed */ + case 365: /* retention */ + case 366: /* full_table_name */ + case 369: /* table_options */ + case 373: /* alter_table_clause */ + case 374: /* alter_table_options */ + case 377: /* signed_literal */ + case 378: /* create_subtable_clause */ + case 381: /* drop_table_clause */ + case 383: /* column_def */ + case 387: /* duration_literal */ + case 388: /* rollup_func_name */ + case 390: /* col_name */ + case 391: /* db_name_cond_opt */ + case 392: /* like_pattern_opt */ + case 393: /* table_name_cond */ + case 394: /* from_db_opt */ + case 396: /* tag_item */ + case 398: /* full_index_name */ + case 399: /* index_options */ + case 402: /* sliding_opt */ + case 403: /* sma_stream_opt */ + case 404: /* func */ + case 406: /* query_or_subquery */ + case 409: /* explain_options */ + case 410: /* insert_query */ + case 416: /* stream_options */ + case 419: /* subtable_opt */ + case 421: /* expression */ + case 423: /* where_clause_opt */ + case 424: /* literal_func */ + case 427: /* expr_or_subquery */ + case 428: /* pseudo_column */ + case 429: /* column_reference */ + case 430: /* function_expression */ + case 431: /* case_when_expression */ + case 436: /* star_func_para */ + case 438: /* case_when_else_opt */ + case 439: /* common_expression */ + case 440: /* when_then_expr */ + case 441: /* predicate */ + case 444: /* in_predicate_value */ + case 445: /* boolean_value_expression */ + case 446: /* boolean_primary */ + case 447: /* from_clause_opt */ + case 448: /* table_reference_list */ + case 449: /* table_reference */ + case 450: /* table_primary */ + case 451: /* joined_table */ + case 453: /* subquery */ + case 454: /* parenthesized_joined_table */ + case 456: /* query_specification */ + case 460: /* range_opt */ + case 461: /* every_opt */ + case 462: /* fill_opt */ + case 463: /* twindow_clause_opt */ + case 465: /* having_clause_opt */ + case 466: /* select_item */ + case 468: /* partition_item */ + case 471: /* query_expression */ + case 472: /* query_simple */ + case 474: /* slimit_clause_opt */ + case 475: /* limit_clause_opt */ + case 476: /* union_query_expression */ + case 477: /* query_simple_or_subquery */ + case 479: /* sort_specification */ { - nodesDestroyNode((yypminor->yy872)); +#line 7 "sql.y" + nodesDestroyNode((yypminor->yy164)); +#line 2784 "sql.c" } break; - case 334: /* account_options */ - case 335: /* alter_account_options */ - case 337: /* alter_account_option */ - case 355: /* speed_opt */ - case 411: /* bufsize_opt */ + case 336: /* account_options */ + case 337: /* alter_account_options */ + case 339: /* alter_account_option */ + case 357: /* speed_opt */ + case 413: /* bufsize_opt */ { +#line 54 "sql.y" +#line 2795 "sql.c" } break; - case 338: /* user_name */ - case 345: /* db_name */ - case 346: /* table_name */ - case 347: /* topic_name */ - case 349: /* dnode_endpoint */ - case 373: /* column_name */ - case 387: /* function_name */ - case 395: /* column_alias */ - case 398: /* index_name */ - case 403: /* sma_func_name */ - case 405: /* cgroup_name */ - case 412: /* language_opt */ - case 413: /* stream_name */ - case 424: /* table_alias */ - case 430: /* star_func */ - case 432: /* noarg_func */ - case 450: /* alias_opt */ + case 340: /* user_name */ + case 347: /* db_name */ + case 348: /* table_name */ + case 349: /* topic_name */ + case 351: /* dnode_endpoint */ + case 375: /* column_name */ + case 389: /* function_name */ + case 397: /* column_alias */ + case 400: /* index_name */ + case 405: /* sma_func_name */ + case 407: /* cgroup_name */ + case 414: /* language_opt */ + case 415: /* stream_name */ + case 426: /* table_alias */ + case 432: /* star_func */ + case 434: /* noarg_func */ + case 452: /* alias_opt */ { +#line 728 "sql.y" +#line 2818 "sql.c" } break; - case 339: /* sysinfo_opt */ + case 341: /* sysinfo_opt */ { +#line 92 "sql.y" +#line 2825 "sql.c" } break; - case 340: /* privileges */ - case 343: /* priv_type_list */ - case 344: /* priv_type */ + case 342: /* privileges */ + case 345: /* priv_type_list */ + case 346: /* priv_type */ { +#line 101 "sql.y" +#line 2834 "sql.c" } break; - case 341: /* priv_level */ + case 343: /* priv_level */ { +#line 117 "sql.y" +#line 2841 "sql.c" } break; - case 350: /* force_opt */ - case 351: /* not_exists_opt */ - case 353: /* exists_opt */ - case 406: /* analyze_opt */ - case 409: /* or_replace_opt */ - case 410: /* agg_func_opt */ - case 418: /* ignore_opt */ - case 455: /* set_quantifier_opt */ + case 352: /* force_opt */ + case 353: /* not_exists_opt */ + case 355: /* exists_opt */ + case 408: /* analyze_opt */ + case 411: /* or_replace_opt */ + case 412: /* agg_func_opt */ + case 420: /* ignore_opt */ + case 457: /* set_quantifier_opt */ { +#line 144 "sql.y" +#line 2855 "sql.c" } break; - case 358: /* integer_list */ - case 359: /* variable_list */ - case 360: /* retention_list */ - case 365: /* column_def_list */ - case 366: /* tags_def_opt */ - case 368: /* multi_create_clause */ - case 369: /* tags_def */ - case 370: /* multi_drop_clause */ - case 377: /* specific_cols_opt */ - case 378: /* expression_list */ - case 380: /* col_name_list */ - case 382: /* duration_list */ - case 383: /* rollup_func_list */ - case 393: /* tag_list_opt */ - case 399: /* func_list */ - case 415: /* col_list_opt */ - case 416: /* tag_def_or_ref_opt */ - case 420: /* dnode_list */ - case 423: /* literal_list */ - case 431: /* star_func_para_list */ - case 433: /* other_para_list */ - case 435: /* when_then_list */ - case 456: /* select_list */ - case 457: /* partition_by_clause_opt */ - case 462: /* group_by_clause_opt */ - case 465: /* partition_list */ - case 468: /* group_by_list */ - case 471: /* order_by_clause_opt */ - case 476: /* sort_specification_list */ + case 360: /* integer_list */ + case 361: /* variable_list */ + case 362: /* retention_list */ + case 367: /* column_def_list */ + case 368: /* tags_def_opt */ + case 370: /* multi_create_clause */ + case 371: /* tags_def */ + case 372: /* multi_drop_clause */ + case 379: /* specific_cols_opt */ + case 380: /* expression_list */ + case 382: /* col_name_list */ + case 384: /* duration_list */ + case 385: /* rollup_func_list */ + case 395: /* tag_list_opt */ + case 401: /* func_list */ + case 417: /* col_list_opt */ + case 418: /* tag_def_or_ref_opt */ + case 422: /* dnode_list */ + case 425: /* literal_list */ + case 433: /* star_func_para_list */ + case 435: /* other_para_list */ + case 437: /* when_then_list */ + case 458: /* select_list */ + case 459: /* partition_by_clause_opt */ + case 464: /* group_by_clause_opt */ + case 467: /* partition_list */ + case 470: /* group_by_list */ + case 473: /* order_by_clause_opt */ + case 478: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy664)); +#line 264 "sql.y" + nodesDestroyList((yypminor->yy72)); +#line 2890 "sql.c" } break; - case 362: /* alter_db_option */ - case 384: /* alter_table_option */ + case 364: /* alter_db_option */ + case 386: /* alter_table_option */ { +#line 237 "sql.y" +#line 2898 "sql.c" } break; - case 374: /* type_name */ + case 376: /* type_name */ { +#line 358 "sql.y" +#line 2905 "sql.c" } break; - case 440: /* compare_op */ - case 441: /* in_op */ + case 442: /* compare_op */ + case 443: /* in_op */ { +#line 916 "sql.y" +#line 2913 "sql.c" } break; - case 453: /* join_type */ + case 455: /* join_type */ { +#line 992 "sql.y" +#line 2920 "sql.c" } break; - case 467: /* fill_mode */ + case 469: /* fill_mode */ { +#line 1067 "sql.y" +#line 2927 "sql.c" } break; - case 478: /* ordering_specification_opt */ + case 480: /* ordering_specification_opt */ { +#line 1150 "sql.y" +#line 2934 "sql.c" } break; - case 479: /* null_ordering_opt */ + case 481: /* null_ordering_opt */ { +#line 1156 "sql.y" +#line 2941 "sql.c" } break; /********* End destructor definitions *****************************************/ @@ -2996,15 +3063,18 @@ static YYACTIONTYPE yy_find_shift_action( do{ i = yy_shift_ofst[stateno]; assert( i>=0 ); - /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */ + assert( i<=YY_ACTTAB_COUNT ); + assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); assert( iLookAhead!=YYNOCODE ); assert( iLookAhead < YYNTOKEN ); i += iLookAhead; - if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){ + assert( i<(int)YY_NLOOKAHEAD ); + if( yy_lookahead[i]!=iLookAhead ){ #ifdef YYFALLBACK YYCODETYPE iFallback; /* Fallback token */ - if( iLookAhead %s\n", @@ -3019,16 +3089,8 @@ static YYACTIONTYPE yy_find_shift_action( #ifdef YYWILDCARD { int j = i - iLookAhead + YYWILDCARD; - if( -#if YY_SHIFT_MIN+YYWILDCARD<0 - j>=0 && -#endif -#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT - j0 - ){ + assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) ); + if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){ #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", @@ -3042,6 +3104,7 @@ static YYACTIONTYPE yy_find_shift_action( #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ + assert( i>=0 && iyytos; #ifndef NDEBUG if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ - yysize = yyRuleInfo[yyruleno].nrhs; + yysize = yyRuleInfoNRhs[yyruleno]; if( yysize ){ - fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n", + fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", yyTracePrompt, - yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno); + yyruleno, yyRuleName[yyruleno], + yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){ yypParser->yyhwm++; @@ -3841,15 +4503,21 @@ static YYACTIONTYPE yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ +#line 50 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,334,&yymsp[0].minor); +#line 4509 "sql.c" + yy_destructor(yypParser,336,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ +#line 51 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,335,&yymsp[0].minor); +#line 4515 "sql.c" + yy_destructor(yypParser,337,&yymsp[0].minor); break; case 2: /* account_options ::= */ +#line 55 "sql.y" { } +#line 4521 "sql.c" break; case 3: /* account_options ::= account_options PPS literal */ case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4); @@ -3860,20 +4528,26 @@ 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,334,&yymsp[-2].minor); +{ yy_destructor(yypParser,336,&yymsp[-2].minor); +#line 56 "sql.y" { } - yy_destructor(yypParser,336,&yymsp[0].minor); +#line 4535 "sql.c" + yy_destructor(yypParser,338,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,337,&yymsp[0].minor); +{ yy_destructor(yypParser,339,&yymsp[0].minor); +#line 68 "sql.y" { } +#line 4543 "sql.c" } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,335,&yymsp[-1].minor); +{ yy_destructor(yypParser,337,&yymsp[-1].minor); +#line 69 "sql.y" { } - yy_destructor(yypParser,337,&yymsp[0].minor); +#line 4550 "sql.c" + yy_destructor(yypParser,339,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3886,1617 +4560,2413 @@ static YYACTIONTYPE yy_reduce( case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21); case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); +#line 73 "sql.y" { } - yy_destructor(yypParser,336,&yymsp[0].minor); +#line 4566 "sql.c" + yy_destructor(yypParser,338,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy929, &yymsp[-1].minor.yy0, yymsp[0].minor.yy503); } +#line 85 "sql.y" +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy497, &yymsp[-1].minor.yy0, yymsp[0].minor.yy563); } +#line 4572 "sql.c" break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +#line 86 "sql.y" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy497, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +#line 4577 "sql.c" break; case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +#line 87 "sql.y" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy497, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +#line 4582 "sql.c" break; case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy929, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +#line 88 "sql.y" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy497, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +#line 4587 "sql.c" break; case 28: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy929); } +#line 89 "sql.y" +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy497); } +#line 4592 "sql.c" break; case 29: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy503 = 1; } +#line 93 "sql.y" +{ yymsp[1].minor.yy563 = 1; } +#line 4597 "sql.c" break; case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy503 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +#line 94 "sql.y" +{ yymsp[-1].minor.yy563 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +#line 4602 "sql.c" break; case 31: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy669, &yymsp[-3].minor.yy57, &yymsp[0].minor.yy929, yymsp[-2].minor.yy872); } +#line 97 "sql.y" +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy693, &yymsp[-3].minor.yy953, &yymsp[0].minor.yy497, yymsp[-2].minor.yy164); } +#line 4607 "sql.c" break; case 32: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy669, &yymsp[-3].minor.yy57, &yymsp[0].minor.yy929, yymsp[-2].minor.yy872); } +#line 98 "sql.y" +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy693, &yymsp[-3].minor.yy953, &yymsp[0].minor.yy497, yymsp[-2].minor.yy164); } +#line 4612 "sql.c" break; case 33: /* privileges ::= ALL */ -{ yymsp[0].minor.yy669 = PRIVILEGE_TYPE_ALL; } +#line 102 "sql.y" +{ yymsp[0].minor.yy693 = PRIVILEGE_TYPE_ALL; } +#line 4617 "sql.c" break; case 34: /* privileges ::= priv_type_list */ case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36); -{ yylhsminor.yy669 = yymsp[0].minor.yy669; } - yymsp[0].minor.yy669 = yylhsminor.yy669; +#line 103 "sql.y" +{ yylhsminor.yy693 = yymsp[0].minor.yy693; } +#line 4623 "sql.c" + yymsp[0].minor.yy693 = yylhsminor.yy693; break; case 35: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy669 = PRIVILEGE_TYPE_SUBSCRIBE; } +#line 104 "sql.y" +{ yymsp[0].minor.yy693 = PRIVILEGE_TYPE_SUBSCRIBE; } +#line 4629 "sql.c" break; case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy669 = yymsp[-2].minor.yy669 | yymsp[0].minor.yy669; } - yymsp[-2].minor.yy669 = yylhsminor.yy669; +#line 109 "sql.y" +{ yylhsminor.yy693 = yymsp[-2].minor.yy693 | yymsp[0].minor.yy693; } +#line 4634 "sql.c" + yymsp[-2].minor.yy693 = yylhsminor.yy693; break; case 38: /* priv_type ::= READ */ -{ yymsp[0].minor.yy669 = PRIVILEGE_TYPE_READ; } +#line 113 "sql.y" +{ yymsp[0].minor.yy693 = PRIVILEGE_TYPE_READ; } +#line 4640 "sql.c" break; case 39: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy669 = PRIVILEGE_TYPE_WRITE; } +#line 114 "sql.y" +{ yymsp[0].minor.yy693 = PRIVILEGE_TYPE_WRITE; } +#line 4645 "sql.c" break; case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy57.first = yymsp[-2].minor.yy0; yylhsminor.yy57.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy57 = yylhsminor.yy57; +#line 118 "sql.y" +{ yylhsminor.yy953.first = yymsp[-2].minor.yy0; yylhsminor.yy953.second = yymsp[0].minor.yy0; } +#line 4650 "sql.c" + yymsp[-2].minor.yy953 = yylhsminor.yy953; break; case 41: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy57.first = yymsp[-2].minor.yy929; yylhsminor.yy57.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy57 = yylhsminor.yy57; +#line 119 "sql.y" +{ yylhsminor.yy953.first = yymsp[-2].minor.yy497; yylhsminor.yy953.second = yymsp[0].minor.yy0; } +#line 4656 "sql.c" + yymsp[-2].minor.yy953 = yylhsminor.yy953; break; case 42: /* priv_level ::= db_name NK_DOT table_name */ -{ yylhsminor.yy57.first = yymsp[-2].minor.yy929; yylhsminor.yy57.second = yymsp[0].minor.yy929; } - yymsp[-2].minor.yy57 = yylhsminor.yy57; +#line 120 "sql.y" +{ yylhsminor.yy953.first = yymsp[-2].minor.yy497; yylhsminor.yy953.second = yymsp[0].minor.yy497; } +#line 4662 "sql.c" + yymsp[-2].minor.yy953 = yylhsminor.yy953; break; case 43: /* priv_level ::= topic_name */ -{ yylhsminor.yy57.first = yymsp[0].minor.yy929; yylhsminor.yy57.second = nil_token; } - yymsp[0].minor.yy57 = yylhsminor.yy57; +#line 121 "sql.y" +{ yylhsminor.yy953.first = yymsp[0].minor.yy497; yylhsminor.yy953.second = nil_token; } +#line 4668 "sql.c" + yymsp[0].minor.yy953 = yylhsminor.yy953; break; case 44: /* with_opt ::= */ - case 137: /* start_opt ::= */ yytestcase(yyruleno==137); - case 141: /* end_opt ::= */ yytestcase(yyruleno==141); - case 265: /* like_pattern_opt ::= */ yytestcase(yyruleno==265); - case 342: /* subtable_opt ::= */ yytestcase(yyruleno==342); - case 460: /* case_when_else_opt ::= */ yytestcase(yyruleno==460); - case 490: /* from_clause_opt ::= */ yytestcase(yyruleno==490); - case 519: /* where_clause_opt ::= */ yytestcase(yyruleno==519); - case 528: /* twindow_clause_opt ::= */ yytestcase(yyruleno==528); - case 534: /* sliding_opt ::= */ yytestcase(yyruleno==534); - case 536: /* fill_opt ::= */ yytestcase(yyruleno==536); - case 550: /* having_clause_opt ::= */ yytestcase(yyruleno==550); - case 552: /* range_opt ::= */ yytestcase(yyruleno==552); - case 554: /* every_opt ::= */ yytestcase(yyruleno==554); - case 567: /* slimit_clause_opt ::= */ yytestcase(yyruleno==567); - case 571: /* limit_clause_opt ::= */ yytestcase(yyruleno==571); -{ yymsp[1].minor.yy872 = NULL; } + case 141: /* start_opt ::= */ yytestcase(yyruleno==141); + case 145: /* end_opt ::= */ yytestcase(yyruleno==145); + case 269: /* like_pattern_opt ::= */ yytestcase(yyruleno==269); + case 346: /* subtable_opt ::= */ yytestcase(yyruleno==346); + case 464: /* case_when_else_opt ::= */ yytestcase(yyruleno==464); + case 494: /* from_clause_opt ::= */ yytestcase(yyruleno==494); + case 523: /* where_clause_opt ::= */ yytestcase(yyruleno==523); + case 532: /* twindow_clause_opt ::= */ yytestcase(yyruleno==532); + case 538: /* sliding_opt ::= */ yytestcase(yyruleno==538); + case 540: /* fill_opt ::= */ yytestcase(yyruleno==540); + case 554: /* having_clause_opt ::= */ yytestcase(yyruleno==554); + case 556: /* range_opt ::= */ yytestcase(yyruleno==556); + case 558: /* every_opt ::= */ yytestcase(yyruleno==558); + case 571: /* slimit_clause_opt ::= */ yytestcase(yyruleno==571); + case 575: /* limit_clause_opt ::= */ yytestcase(yyruleno==575); +#line 123 "sql.y" +{ yymsp[1].minor.yy164 = NULL; } +#line 4689 "sql.c" break; case 45: /* with_opt ::= WITH search_condition */ - case 491: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==491); - case 520: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==520); - case 551: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==551); -{ yymsp[-1].minor.yy872 = yymsp[0].minor.yy872; } + case 495: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==495); + case 524: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==524); + case 555: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==555); +#line 124 "sql.y" +{ yymsp[-1].minor.yy164 = yymsp[0].minor.yy164; } +#line 4697 "sql.c" break; case 46: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy929, NULL); } +#line 127 "sql.y" +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy497, NULL); } +#line 4702 "sql.c" break; case 47: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0); } +#line 128 "sql.y" +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy497, &yymsp[0].minor.yy0); } +#line 4707 "sql.c" break; case 48: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy857); } +#line 129 "sql.y" +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy441); } +#line 4712 "sql.c" break; case 49: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy857); } +#line 130 "sql.y" +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy497, yymsp[0].minor.yy441); } +#line 4717 "sql.c" break; case 50: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ +#line 131 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } +#line 4722 "sql.c" break; case 51: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ +#line 132 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } +#line 4727 "sql.c" break; case 52: /* cmd ::= ALTER ALL DNODES NK_STRING */ +#line 133 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } +#line 4732 "sql.c" break; case 53: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ +#line 134 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } +#line 4737 "sql.c" break; - case 54: /* dnode_endpoint ::= NK_STRING */ - case 55: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==55); - case 56: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==56); - case 289: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==289); - case 290: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==290); - case 291: /* sma_func_name ::= LAST */ yytestcase(yyruleno==291); - case 292: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==292); - case 386: /* db_name ::= NK_ID */ yytestcase(yyruleno==386); - case 387: /* table_name ::= NK_ID */ yytestcase(yyruleno==387); - case 388: /* column_name ::= NK_ID */ yytestcase(yyruleno==388); - case 389: /* function_name ::= NK_ID */ yytestcase(yyruleno==389); - case 390: /* table_alias ::= NK_ID */ yytestcase(yyruleno==390); - case 391: /* column_alias ::= NK_ID */ yytestcase(yyruleno==391); - case 392: /* user_name ::= NK_ID */ yytestcase(yyruleno==392); - case 393: /* topic_name ::= NK_ID */ yytestcase(yyruleno==393); - case 394: /* stream_name ::= NK_ID */ yytestcase(yyruleno==394); - case 395: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==395); - case 396: /* index_name ::= NK_ID */ yytestcase(yyruleno==396); - case 436: /* noarg_func ::= NOW */ yytestcase(yyruleno==436); - case 437: /* noarg_func ::= TODAY */ yytestcase(yyruleno==437); - case 438: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==438); - case 439: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==439); - case 440: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==440); - case 441: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==441); - case 442: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==442); - case 443: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==443); - case 444: /* noarg_func ::= USER */ yytestcase(yyruleno==444); - case 445: /* star_func ::= COUNT */ yytestcase(yyruleno==445); - case 446: /* star_func ::= FIRST */ yytestcase(yyruleno==446); - case 447: /* star_func ::= LAST */ yytestcase(yyruleno==447); - case 448: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==448); -{ yylhsminor.yy929 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy929 = yylhsminor.yy929; + case 54: /* cmd ::= RESTORE DNODE NK_INTEGER */ +#line 135 "sql.y" +{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); } +#line 4742 "sql.c" break; - case 57: /* force_opt ::= */ - case 77: /* not_exists_opt ::= */ yytestcase(yyruleno==77); - case 79: /* exists_opt ::= */ yytestcase(yyruleno==79); - case 309: /* analyze_opt ::= */ yytestcase(yyruleno==309); - case 316: /* agg_func_opt ::= */ yytestcase(yyruleno==316); - case 322: /* or_replace_opt ::= */ yytestcase(yyruleno==322); - case 344: /* ignore_opt ::= */ yytestcase(yyruleno==344); - case 509: /* set_quantifier_opt ::= */ yytestcase(yyruleno==509); -{ yymsp[1].minor.yy857 = false; } + case 55: /* dnode_endpoint ::= NK_STRING */ + case 56: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==56); + case 57: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==57); + case 293: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==293); + case 294: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==294); + case 295: /* sma_func_name ::= LAST */ yytestcase(yyruleno==295); + case 296: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==296); + case 390: /* db_name ::= NK_ID */ yytestcase(yyruleno==390); + case 391: /* table_name ::= NK_ID */ yytestcase(yyruleno==391); + case 392: /* column_name ::= NK_ID */ yytestcase(yyruleno==392); + case 393: /* function_name ::= NK_ID */ yytestcase(yyruleno==393); + case 394: /* table_alias ::= NK_ID */ yytestcase(yyruleno==394); + case 395: /* column_alias ::= NK_ID */ yytestcase(yyruleno==395); + case 396: /* user_name ::= NK_ID */ yytestcase(yyruleno==396); + case 397: /* topic_name ::= NK_ID */ yytestcase(yyruleno==397); + case 398: /* stream_name ::= NK_ID */ yytestcase(yyruleno==398); + case 399: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==399); + case 400: /* index_name ::= NK_ID */ yytestcase(yyruleno==400); + case 440: /* noarg_func ::= NOW */ yytestcase(yyruleno==440); + case 441: /* noarg_func ::= TODAY */ yytestcase(yyruleno==441); + case 442: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==442); + case 443: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==443); + case 444: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==444); + case 445: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==445); + case 446: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==446); + case 447: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==447); + case 448: /* noarg_func ::= USER */ yytestcase(yyruleno==448); + case 449: /* star_func ::= COUNT */ yytestcase(yyruleno==449); + case 450: /* star_func ::= FIRST */ yytestcase(yyruleno==450); + case 451: /* star_func ::= LAST */ yytestcase(yyruleno==451); + case 452: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==452); +#line 139 "sql.y" +{ yylhsminor.yy497 = yymsp[0].minor.yy0; } +#line 4777 "sql.c" + yymsp[0].minor.yy497 = yylhsminor.yy497; break; - case 58: /* force_opt ::= FORCE */ - case 310: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==310); - case 317: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==317); - case 510: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==510); -{ yymsp[0].minor.yy857 = true; } + case 58: /* force_opt ::= */ + case 81: /* not_exists_opt ::= */ yytestcase(yyruleno==81); + case 83: /* exists_opt ::= */ yytestcase(yyruleno==83); + case 313: /* analyze_opt ::= */ yytestcase(yyruleno==313); + case 320: /* agg_func_opt ::= */ yytestcase(yyruleno==320); + case 326: /* or_replace_opt ::= */ yytestcase(yyruleno==326); + case 348: /* ignore_opt ::= */ yytestcase(yyruleno==348); + case 513: /* set_quantifier_opt ::= */ yytestcase(yyruleno==513); +#line 145 "sql.y" +{ yymsp[1].minor.yy441 = false; } +#line 4790 "sql.c" break; - case 59: /* cmd ::= ALTER LOCAL NK_STRING */ + case 59: /* force_opt ::= FORCE */ + case 314: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==314); + case 321: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==321); + case 514: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==514); +#line 146 "sql.y" +{ yymsp[0].minor.yy441 = true; } +#line 4798 "sql.c" + break; + case 60: /* cmd ::= ALTER LOCAL NK_STRING */ +#line 149 "sql.y" { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } +#line 4803 "sql.c" break; - case 60: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + case 61: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ +#line 150 "sql.y" { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } +#line 4808 "sql.c" break; - case 61: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + case 62: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ +#line 153 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } +#line 4813 "sql.c" break; - case 62: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + case 63: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ +#line 154 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } +#line 4818 "sql.c" break; - case 63: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + case 64: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ +#line 155 "sql.y" +{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); } +#line 4823 "sql.c" + break; + case 65: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ +#line 158 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } +#line 4828 "sql.c" break; - case 64: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + case 66: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ +#line 159 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } +#line 4833 "sql.c" break; - case 65: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + case 67: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ +#line 162 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } +#line 4838 "sql.c" break; - case 66: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + case 68: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ +#line 163 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } +#line 4843 "sql.c" break; - case 67: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + case 69: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ +#line 166 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } +#line 4848 "sql.c" break; - case 68: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + case 70: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ +#line 167 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } +#line 4853 "sql.c" break; - case 69: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy857, &yymsp[-1].minor.yy929, yymsp[0].minor.yy872); } + case 71: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ +#line 168 "sql.y" +{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); } +#line 4858 "sql.c" break; - case 70: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy857, &yymsp[0].minor.yy929); } + case 72: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ +#line 171 "sql.y" +{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } +#line 4863 "sql.c" break; - case 71: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy929); } + case 73: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ +#line 174 "sql.y" +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy441, &yymsp[-1].minor.yy497, yymsp[0].minor.yy164); } +#line 4868 "sql.c" break; - case 72: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy872); } + case 74: /* cmd ::= DROP DATABASE exists_opt db_name */ +#line 175 "sql.y" +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy441, &yymsp[0].minor.yy497); } +#line 4873 "sql.c" break; - case 73: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy929); } + case 75: /* cmd ::= USE db_name */ +#line 176 "sql.y" +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy497); } +#line 4878 "sql.c" break; - case 74: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy580); } + case 76: /* cmd ::= ALTER DATABASE db_name alter_db_options */ +#line 177 "sql.y" +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy497, yymsp[0].minor.yy164); } +#line 4883 "sql.c" break; - case 75: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy929, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } + case 77: /* cmd ::= FLUSH DATABASE db_name */ +#line 178 "sql.y" +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy497); } +#line 4888 "sql.c" break; - case 76: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy857 = true; } + case 78: /* cmd ::= TRIM DATABASE db_name speed_opt */ +#line 179 "sql.y" +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy497, yymsp[0].minor.yy560); } +#line 4893 "sql.c" break; - case 78: /* exists_opt ::= IF EXISTS */ - case 323: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==323); - case 345: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==345); -{ yymsp[-1].minor.yy857 = true; } + case 79: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ +#line 180 "sql.y" +{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy497, yymsp[-1].minor.yy164, yymsp[0].minor.yy164); } +#line 4898 "sql.c" break; - case 80: /* db_options ::= */ -{ yymsp[1].minor.yy872 = createDefaultDatabaseOptions(pCxt); } + case 80: /* not_exists_opt ::= IF NOT EXISTS */ +#line 184 "sql.y" +{ yymsp[-2].minor.yy441 = true; } +#line 4903 "sql.c" break; - case 81: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 82: /* exists_opt ::= IF EXISTS */ + case 327: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==327); + case 349: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==349); +#line 189 "sql.y" +{ yymsp[-1].minor.yy441 = true; } +#line 4910 "sql.c" break; - case 82: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 84: /* db_options ::= */ +#line 192 "sql.y" +{ yymsp[1].minor.yy164 = createDefaultDatabaseOptions(pCxt); } +#line 4915 "sql.c" break; - case 83: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 85: /* db_options ::= db_options BUFFER NK_INTEGER */ +#line 193 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } +#line 4920 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 84: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 86: /* db_options ::= db_options CACHEMODEL NK_STRING */ +#line 194 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } +#line 4926 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 85: /* db_options ::= db_options DURATION NK_INTEGER */ - case 86: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==86); -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 87: /* db_options ::= db_options CACHESIZE NK_INTEGER */ +#line 195 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } +#line 4932 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 87: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 88: /* db_options ::= db_options COMP NK_INTEGER */ +#line 196 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_COMP, &yymsp[0].minor.yy0); } +#line 4938 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 88: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 89: /* db_options ::= db_options DURATION NK_INTEGER */ + case 90: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==90); +#line 197 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } +#line 4945 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 89: /* db_options ::= db_options KEEP integer_list */ - case 90: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==90); -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_KEEP, yymsp[0].minor.yy664); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 91: /* db_options ::= db_options MAXROWS NK_INTEGER */ +#line 199 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } +#line 4951 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 91: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 92: /* db_options ::= db_options MINROWS NK_INTEGER */ +#line 200 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } +#line 4957 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 92: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 93: /* db_options ::= db_options KEEP integer_list */ + case 94: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==94); +#line 201 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_KEEP, yymsp[0].minor.yy72); } +#line 4964 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 93: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 95: /* db_options ::= db_options PAGES NK_INTEGER */ +#line 203 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } +#line 4970 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 94: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 96: /* db_options ::= db_options PAGESIZE NK_INTEGER */ +#line 204 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } +#line 4976 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 95: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 97: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ +#line 205 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } +#line 4982 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 96: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 98: /* db_options ::= db_options PRECISION NK_STRING */ +#line 206 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } +#line 4988 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 97: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 99: /* db_options ::= db_options REPLICA NK_INTEGER */ +#line 207 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } +#line 4994 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 98: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_RETENTIONS, yymsp[0].minor.yy664); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 100: /* db_options ::= db_options VGROUPS NK_INTEGER */ +#line 209 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } +#line 5000 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 99: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 101: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ +#line 210 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } +#line 5006 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 100: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 102: /* db_options ::= db_options RETENTIONS retention_list */ +#line 211 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_RETENTIONS, yymsp[0].minor.yy72); } +#line 5012 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 101: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 103: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ +#line 212 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } +#line 5018 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 102: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 104: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ +#line 213 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_WAL, &yymsp[0].minor.yy0); } +#line 5024 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 103: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 105: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ +#line 214 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } +#line 5030 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; + break; + case 106: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ +#line 215 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } +#line 5036 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; + break; + case 107: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ +#line 216 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-3].minor.yy872, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-3].minor.yy164, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; +#line 5046 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 104: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 108: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ +#line 221 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } +#line 5052 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 105: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 109: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ +#line 222 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-3].minor.yy872, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-3].minor.yy164, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; +#line 5062 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 106: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 110: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ +#line 227 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } +#line 5068 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 107: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 111: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ +#line 228 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } +#line 5074 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 108: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 112: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ +#line 229 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } +#line 5080 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 109: /* db_options ::= db_options TABLE_PREFIX signed */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy872); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 113: /* db_options ::= db_options TABLE_PREFIX signed */ +#line 230 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy164); } +#line 5086 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 110: /* db_options ::= db_options TABLE_SUFFIX signed */ -{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy872); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 114: /* db_options ::= db_options TABLE_SUFFIX signed */ +#line 231 "sql.y" +{ yylhsminor.yy164 = setDatabaseOption(pCxt, yymsp[-2].minor.yy164, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy164); } +#line 5092 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 111: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy872 = createAlterDatabaseOptions(pCxt); yylhsminor.yy872 = setAlterDatabaseOption(pCxt, yylhsminor.yy872, &yymsp[0].minor.yy605); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 115: /* alter_db_options ::= alter_db_option */ +#line 233 "sql.y" +{ yylhsminor.yy164 = createAlterDatabaseOptions(pCxt); yylhsminor.yy164 = setAlterDatabaseOption(pCxt, yylhsminor.yy164, &yymsp[0].minor.yy761); } +#line 5098 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 112: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy872 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy872, &yymsp[0].minor.yy605); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; + case 116: /* alter_db_options ::= alter_db_options alter_db_option */ +#line 234 "sql.y" +{ yylhsminor.yy164 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy164, &yymsp[0].minor.yy761); } +#line 5104 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 113: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy605.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } + case 117: /* alter_db_option ::= BUFFER NK_INTEGER */ +#line 238 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5110 "sql.c" break; - case 114: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy605.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } + case 118: /* alter_db_option ::= CACHEMODEL NK_STRING */ +#line 239 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5115 "sql.c" break; - case 115: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy605.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } + case 119: /* alter_db_option ::= CACHESIZE NK_INTEGER */ +#line 240 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5120 "sql.c" break; - case 116: /* 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; } + case 120: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ +#line 241 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5125 "sql.c" break; - case 117: /* alter_db_option ::= KEEP integer_list */ - case 118: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==118); -{ yymsp[-1].minor.yy605.type = DB_OPTION_KEEP; yymsp[-1].minor.yy605.pList = yymsp[0].minor.yy664; } + case 121: /* alter_db_option ::= KEEP integer_list */ + case 122: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==122); +#line 242 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_KEEP; yymsp[-1].minor.yy761.pList = yymsp[0].minor.yy72; } +#line 5131 "sql.c" break; - case 119: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy605.type = DB_OPTION_PAGES; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } + case 123: /* alter_db_option ::= PAGES NK_INTEGER */ +#line 244 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_PAGES; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5136 "sql.c" break; - case 120: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy605.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } + case 124: /* alter_db_option ::= REPLICA NK_INTEGER */ +#line 245 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5141 "sql.c" break; - case 121: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy605.type = DB_OPTION_WAL; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } + case 125: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ +#line 247 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_WAL; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5146 "sql.c" break; - case 122: /* 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; } + case 126: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ +#line 248 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5151 "sql.c" break; - case 123: /* alter_db_option ::= MINROWS NK_INTEGER */ -{ yymsp[-1].minor.yy605.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } + case 127: /* alter_db_option ::= MINROWS NK_INTEGER */ +#line 249 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5156 "sql.c" break; - case 124: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy605.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } + case 128: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ +#line 250 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5161 "sql.c" break; - case 125: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 129: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ +#line 251 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy605.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy605.val = t; + yymsp[-2].minor.yy761.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy761.val = t; } +#line 5170 "sql.c" break; - case 126: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -{ yymsp[-1].minor.yy605.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } + case 130: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ +#line 256 "sql.y" +{ yymsp[-1].minor.yy761.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5175 "sql.c" break; - case 127: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 131: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ +#line 257 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy605.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy605.val = t; + yymsp[-2].minor.yy761.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy761.val = t; } - break; - case 128: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy664 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy664 = yylhsminor.yy664; - break; - case 129: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 355: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==355); -{ yylhsminor.yy664 = addNodeToList(pCxt, yymsp[-2].minor.yy664, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy664 = yylhsminor.yy664; - break; - case 130: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy664 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy664 = yylhsminor.yy664; - break; - case 131: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy664 = addNodeToList(pCxt, yymsp[-2].minor.yy664, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy664 = yylhsminor.yy664; - break; - case 132: /* retention_list ::= retention */ - case 162: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==162); - case 165: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==165); - case 172: /* column_def_list ::= column_def */ yytestcase(yyruleno==172); - case 215: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==215); - case 220: /* col_name_list ::= col_name */ yytestcase(yyruleno==220); - case 271: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==271); - case 285: /* func_list ::= func */ yytestcase(yyruleno==285); - case 384: /* literal_list ::= signed_literal */ yytestcase(yyruleno==384); - case 451: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==451); - case 457: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==457); - case 512: /* select_list ::= select_item */ yytestcase(yyruleno==512); - case 523: /* partition_list ::= partition_item */ yytestcase(yyruleno==523); - case 578: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==578); -{ yylhsminor.yy664 = createNodeList(pCxt, yymsp[0].minor.yy872); } - yymsp[0].minor.yy664 = yylhsminor.yy664; - break; - case 133: /* retention_list ::= retention_list NK_COMMA retention */ - case 166: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==166); - case 173: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==173); - case 216: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==216); - case 221: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==221); - case 272: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==272); - case 286: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==286); - case 385: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==385); - case 452: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==452); - case 513: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==513); - case 524: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==524); - case 579: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==579); -{ yylhsminor.yy664 = addNodeToList(pCxt, yymsp[-2].minor.yy664, yymsp[0].minor.yy872); } - yymsp[-2].minor.yy664 = yylhsminor.yy664; - break; - case 134: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy872 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; - break; - case 135: /* speed_opt ::= */ - case 318: /* bufsize_opt ::= */ yytestcase(yyruleno==318); -{ yymsp[1].minor.yy580 = 0; } - break; - case 136: /* speed_opt ::= MAX_SPEED NK_INTEGER */ - case 319: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==319); -{ yymsp[-1].minor.yy580 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } - break; - case 138: /* start_opt ::= START WITH NK_INTEGER */ - case 142: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==142); -{ yymsp[-2].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - break; - case 139: /* start_opt ::= START WITH NK_STRING */ - case 143: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==143); -{ yymsp[-2].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } - break; - case 140: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ - case 144: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==144); -{ yymsp[-3].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } - break; - case 145: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 147: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==147); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy857, yymsp[-5].minor.yy872, yymsp[-3].minor.yy664, yymsp[-1].minor.yy664, yymsp[0].minor.yy872); } - break; - case 146: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy664); } - break; - case 148: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy664); } - break; - case 149: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy857, yymsp[0].minor.yy872); } - break; - case 150: /* cmd ::= ALTER TABLE alter_table_clause */ - case 357: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==357); - case 358: /* cmd ::= insert_query */ yytestcase(yyruleno==358); -{ pCxt->pRootNode = yymsp[0].minor.yy872; } - break; - case 151: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy872); } - break; - case 152: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy872 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; - break; - case 153: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy872 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy929, yymsp[0].minor.yy784); } - yymsp[-4].minor.yy872 = yylhsminor.yy872; - break; - case 154: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy872 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy872, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy929); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; - break; - case 155: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy872 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy929, yymsp[0].minor.yy784); } - yymsp[-4].minor.yy872 = yylhsminor.yy872; - break; - case 156: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy872 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } - yymsp[-4].minor.yy872 = yylhsminor.yy872; - break; - case 157: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy872 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy929, yymsp[0].minor.yy784); } - yymsp[-4].minor.yy872 = yylhsminor.yy872; - break; - case 158: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy872 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy872, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy929); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; - break; - case 159: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy872 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy929, yymsp[0].minor.yy784); } - yymsp[-4].minor.yy872 = yylhsminor.yy872; - break; - case 160: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy872 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } - yymsp[-4].minor.yy872 = yylhsminor.yy872; - break; - case 161: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy872 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy872, &yymsp[-2].minor.yy929, yymsp[0].minor.yy872); } - yymsp[-5].minor.yy872 = yylhsminor.yy872; - break; - case 163: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 458: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==458); -{ yylhsminor.yy664 = addNodeToList(pCxt, yymsp[-1].minor.yy664, yymsp[0].minor.yy872); } - yymsp[-1].minor.yy664 = yylhsminor.yy664; - break; - case 164: /* 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.yy872 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy857, yymsp[-8].minor.yy872, yymsp[-6].minor.yy872, yymsp[-5].minor.yy664, yymsp[-2].minor.yy664, yymsp[0].minor.yy872); } - yymsp[-9].minor.yy872 = yylhsminor.yy872; - break; - case 167: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy872 = createDropTableClause(pCxt, yymsp[-1].minor.yy857, yymsp[0].minor.yy872); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; - break; - case 168: /* specific_cols_opt ::= */ - case 198: /* tags_def_opt ::= */ yytestcase(yyruleno==198); - case 270: /* tag_list_opt ::= */ yytestcase(yyruleno==270); - case 328: /* col_list_opt ::= */ yytestcase(yyruleno==328); - case 330: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==330); - case 521: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==521); - case 546: /* group_by_clause_opt ::= */ yytestcase(yyruleno==546); - case 565: /* order_by_clause_opt ::= */ yytestcase(yyruleno==565); -{ yymsp[1].minor.yy664 = NULL; } - break; - case 169: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 329: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==329); -{ yymsp[-2].minor.yy664 = yymsp[-1].minor.yy664; } - break; - case 170: /* full_table_name ::= table_name */ -{ yylhsminor.yy872 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy929, NULL); } - yymsp[0].minor.yy872 = yylhsminor.yy872; - break; - case 171: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy872 = createRealTableNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929, NULL); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; - break; - case 174: /* column_def ::= column_name type_name */ -{ yylhsminor.yy872 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy929, yymsp[0].minor.yy784, NULL); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; - break; - case 175: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BOOL); } - break; - case 176: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_TINYINT); } - break; - case 177: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_SMALLINT); } - break; - case 178: /* type_name ::= INT */ - case 179: /* type_name ::= INTEGER */ yytestcase(yyruleno==179); -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_INT); } - break; - case 180: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BIGINT); } - break; - case 181: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_FLOAT); } - break; - case 182: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_DOUBLE); } - break; - case 183: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } - break; - case 184: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } - break; - case 185: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } - break; - case 186: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UTINYINT); } - break; - case 187: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_USMALLINT); } - break; - case 188: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UINT); } - break; - case 189: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UBIGINT); } - break; - case 190: /* type_name ::= JSON */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_JSON); } - break; - case 191: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } - break; - case 192: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } - break; - case 193: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BLOB); } - break; - case 194: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } - break; - case 195: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); } - break; - case 196: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); } - break; - case 197: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); } - break; - case 199: /* tags_def_opt ::= tags_def */ - case 331: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==331); - case 450: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==450); -{ yylhsminor.yy664 = yymsp[0].minor.yy664; } - yymsp[0].minor.yy664 = yylhsminor.yy664; - break; - case 200: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ - case 332: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==332); -{ yymsp[-3].minor.yy664 = yymsp[-1].minor.yy664; } - break; - case 201: /* table_options ::= */ -{ yymsp[1].minor.yy872 = createDefaultTableOptions(pCxt); } - break; - case 202: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-2].minor.yy872, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; - break; - case 203: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-2].minor.yy872, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy664); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; - break; - case 204: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-2].minor.yy872, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy664); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; - break; - case 205: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-4].minor.yy872, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy664); } - yymsp[-4].minor.yy872 = yylhsminor.yy872; - break; - case 206: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-2].minor.yy872, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; - break; - case 207: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-4].minor.yy872, TABLE_OPTION_SMA, yymsp[-1].minor.yy664); } - yymsp[-4].minor.yy872 = yylhsminor.yy872; - break; - case 208: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-2].minor.yy872, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy664); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; - break; - case 209: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy872 = createAlterTableOptions(pCxt); yylhsminor.yy872 = setTableOption(pCxt, yylhsminor.yy872, yymsp[0].minor.yy605.type, &yymsp[0].minor.yy605.val); } - yymsp[0].minor.yy872 = yylhsminor.yy872; - break; - case 210: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-1].minor.yy872, yymsp[0].minor.yy605.type, &yymsp[0].minor.yy605.val); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; - break; - case 211: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy605.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } - break; - case 212: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy605.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } - break; - case 213: /* duration_list ::= duration_literal */ - case 414: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==414); -{ yylhsminor.yy664 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } - yymsp[0].minor.yy664 = yylhsminor.yy664; - break; - case 214: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 415: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==415); -{ yylhsminor.yy664 = addNodeToList(pCxt, yymsp[-2].minor.yy664, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } - yymsp[-2].minor.yy664 = yylhsminor.yy664; - break; - case 217: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy872 = createFunctionNode(pCxt, &yymsp[0].minor.yy929, NULL); } - yymsp[0].minor.yy872 = yylhsminor.yy872; - break; - case 218: /* rollup_func_name ::= FIRST */ - case 219: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==219); - case 274: /* tag_item ::= QTAGS */ yytestcase(yyruleno==274); -{ yylhsminor.yy872 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy872 = yylhsminor.yy872; - break; - case 222: /* col_name ::= column_name */ - case 275: /* tag_item ::= column_name */ yytestcase(yyruleno==275); -{ yylhsminor.yy872 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy929); } - yymsp[0].minor.yy872 = yylhsminor.yy872; - break; - case 223: /* cmd ::= SHOW DNODES */ +#line 5184 "sql.c" + break; + case 132: /* integer_list ::= NK_INTEGER */ +#line 265 "sql.y" +{ yylhsminor.yy72 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +#line 5189 "sql.c" + yymsp[0].minor.yy72 = yylhsminor.yy72; + break; + case 133: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ + case 359: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==359); +#line 266 "sql.y" +{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-2].minor.yy72, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +#line 5196 "sql.c" + yymsp[-2].minor.yy72 = yylhsminor.yy72; + break; + case 134: /* variable_list ::= NK_VARIABLE */ +#line 270 "sql.y" +{ yylhsminor.yy72 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } +#line 5202 "sql.c" + yymsp[0].minor.yy72 = yylhsminor.yy72; + break; + case 135: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ +#line 271 "sql.y" +{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-2].minor.yy72, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } +#line 5208 "sql.c" + yymsp[-2].minor.yy72 = yylhsminor.yy72; + break; + case 136: /* retention_list ::= retention */ + case 166: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==166); + case 169: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==169); + case 176: /* column_def_list ::= column_def */ yytestcase(yyruleno==176); + case 219: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==219); + case 224: /* col_name_list ::= col_name */ yytestcase(yyruleno==224); + case 275: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==275); + case 289: /* func_list ::= func */ yytestcase(yyruleno==289); + case 388: /* literal_list ::= signed_literal */ yytestcase(yyruleno==388); + case 455: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==455); + case 461: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==461); + case 516: /* select_list ::= select_item */ yytestcase(yyruleno==516); + case 527: /* partition_list ::= partition_item */ yytestcase(yyruleno==527); + case 582: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==582); +#line 275 "sql.y" +{ yylhsminor.yy72 = createNodeList(pCxt, yymsp[0].minor.yy164); } +#line 5227 "sql.c" + yymsp[0].minor.yy72 = yylhsminor.yy72; + break; + case 137: /* retention_list ::= retention_list NK_COMMA retention */ + case 170: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==170); + case 177: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==177); + case 220: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==220); + case 225: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==225); + case 276: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==276); + case 290: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==290); + case 389: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==389); + case 456: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==456); + case 517: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==517); + case 528: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==528); + case 583: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==583); +#line 276 "sql.y" +{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-2].minor.yy72, yymsp[0].minor.yy164); } +#line 5244 "sql.c" + yymsp[-2].minor.yy72 = yylhsminor.yy72; + break; + case 138: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ +#line 278 "sql.y" +{ yylhsminor.yy164 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } +#line 5250 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; + break; + case 139: /* speed_opt ::= */ + case 322: /* bufsize_opt ::= */ yytestcase(yyruleno==322); +#line 282 "sql.y" +{ yymsp[1].minor.yy560 = 0; } +#line 5257 "sql.c" + break; + case 140: /* speed_opt ::= MAX_SPEED NK_INTEGER */ + case 323: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==323); +#line 283 "sql.y" +{ yymsp[-1].minor.yy560 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } +#line 5263 "sql.c" + break; + case 142: /* start_opt ::= START WITH NK_INTEGER */ + case 146: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==146); +#line 286 "sql.y" +{ yymsp[-2].minor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +#line 5269 "sql.c" + break; + case 143: /* start_opt ::= START WITH NK_STRING */ + case 147: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==147); +#line 287 "sql.y" +{ yymsp[-2].minor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +#line 5275 "sql.c" + break; + case 144: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ + case 148: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==148); +#line 288 "sql.y" +{ yymsp[-3].minor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +#line 5281 "sql.c" + break; + case 149: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + case 151: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==151); +#line 297 "sql.y" +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy441, yymsp[-5].minor.yy164, yymsp[-3].minor.yy72, yymsp[-1].minor.yy72, yymsp[0].minor.yy164); } +#line 5287 "sql.c" + break; + case 150: /* cmd ::= CREATE TABLE multi_create_clause */ +#line 298 "sql.y" +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy72); } +#line 5292 "sql.c" + break; + case 152: /* cmd ::= DROP TABLE multi_drop_clause */ +#line 301 "sql.y" +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy72); } +#line 5297 "sql.c" + break; + case 153: /* cmd ::= DROP STABLE exists_opt full_table_name */ +#line 302 "sql.y" +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy441, yymsp[0].minor.yy164); } +#line 5302 "sql.c" + break; + case 154: /* cmd ::= ALTER TABLE alter_table_clause */ + case 361: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==361); + case 362: /* cmd ::= insert_query */ yytestcase(yyruleno==362); +#line 304 "sql.y" +{ pCxt->pRootNode = yymsp[0].minor.yy164; } +#line 5309 "sql.c" + break; + case 155: /* cmd ::= ALTER STABLE alter_table_clause */ +#line 305 "sql.y" +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy164); } +#line 5314 "sql.c" + break; + case 156: /* alter_table_clause ::= full_table_name alter_table_options */ +#line 307 "sql.y" +{ yylhsminor.yy164 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy164, yymsp[0].minor.yy164); } +#line 5319 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; + break; + case 157: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ +#line 309 "sql.y" +{ yylhsminor.yy164 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy164, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy497, yymsp[0].minor.yy700); } +#line 5325 "sql.c" + yymsp[-4].minor.yy164 = yylhsminor.yy164; + break; + case 158: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ +#line 310 "sql.y" +{ yylhsminor.yy164 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy164, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy497); } +#line 5331 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; + break; + case 159: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ +#line 312 "sql.y" +{ yylhsminor.yy164 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy164, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy497, yymsp[0].minor.yy700); } +#line 5337 "sql.c" + yymsp[-4].minor.yy164 = yylhsminor.yy164; + break; + case 160: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ +#line 314 "sql.y" +{ yylhsminor.yy164 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy164, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy497, &yymsp[0].minor.yy497); } +#line 5343 "sql.c" + yymsp[-4].minor.yy164 = yylhsminor.yy164; + break; + case 161: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ +#line 316 "sql.y" +{ yylhsminor.yy164 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy164, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy497, yymsp[0].minor.yy700); } +#line 5349 "sql.c" + yymsp[-4].minor.yy164 = yylhsminor.yy164; + break; + case 162: /* alter_table_clause ::= full_table_name DROP TAG column_name */ +#line 317 "sql.y" +{ yylhsminor.yy164 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy164, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy497); } +#line 5355 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; + break; + case 163: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ +#line 319 "sql.y" +{ yylhsminor.yy164 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy164, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy497, yymsp[0].minor.yy700); } +#line 5361 "sql.c" + yymsp[-4].minor.yy164 = yylhsminor.yy164; + break; + case 164: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ +#line 321 "sql.y" +{ yylhsminor.yy164 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy164, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy497, &yymsp[0].minor.yy497); } +#line 5367 "sql.c" + yymsp[-4].minor.yy164 = yylhsminor.yy164; + break; + case 165: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ +#line 323 "sql.y" +{ yylhsminor.yy164 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy164, &yymsp[-2].minor.yy497, yymsp[0].minor.yy164); } +#line 5373 "sql.c" + yymsp[-5].minor.yy164 = yylhsminor.yy164; + break; + case 167: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 462: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==462); +#line 328 "sql.y" +{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-1].minor.yy72, yymsp[0].minor.yy164); } +#line 5380 "sql.c" + yymsp[-1].minor.yy72 = yylhsminor.yy72; + break; + case 168: /* 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 */ +#line 332 "sql.y" +{ yylhsminor.yy164 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy441, yymsp[-8].minor.yy164, yymsp[-6].minor.yy164, yymsp[-5].minor.yy72, yymsp[-2].minor.yy72, yymsp[0].minor.yy164); } +#line 5386 "sql.c" + yymsp[-9].minor.yy164 = yylhsminor.yy164; + break; + case 171: /* drop_table_clause ::= exists_opt full_table_name */ +#line 339 "sql.y" +{ yylhsminor.yy164 = createDropTableClause(pCxt, yymsp[-1].minor.yy441, yymsp[0].minor.yy164); } +#line 5392 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; + break; + case 172: /* specific_cols_opt ::= */ + case 202: /* tags_def_opt ::= */ yytestcase(yyruleno==202); + case 274: /* tag_list_opt ::= */ yytestcase(yyruleno==274); + case 332: /* col_list_opt ::= */ yytestcase(yyruleno==332); + case 334: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==334); + case 525: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==525); + case 550: /* group_by_clause_opt ::= */ yytestcase(yyruleno==550); + case 569: /* order_by_clause_opt ::= */ yytestcase(yyruleno==569); +#line 343 "sql.y" +{ yymsp[1].minor.yy72 = NULL; } +#line 5405 "sql.c" + break; + case 173: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 333: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==333); +#line 344 "sql.y" +{ yymsp[-2].minor.yy72 = yymsp[-1].minor.yy72; } +#line 5411 "sql.c" + break; + case 174: /* full_table_name ::= table_name */ +#line 346 "sql.y" +{ yylhsminor.yy164 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy497, NULL); } +#line 5416 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; + break; + case 175: /* full_table_name ::= db_name NK_DOT table_name */ +#line 347 "sql.y" +{ yylhsminor.yy164 = createRealTableNode(pCxt, &yymsp[-2].minor.yy497, &yymsp[0].minor.yy497, NULL); } +#line 5422 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; + break; + case 178: /* column_def ::= column_name type_name */ +#line 354 "sql.y" +{ yylhsminor.yy164 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy497, yymsp[0].minor.yy700, NULL); } +#line 5428 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; + break; + case 179: /* type_name ::= BOOL */ +#line 359 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_BOOL); } +#line 5434 "sql.c" + break; + case 180: /* type_name ::= TINYINT */ +#line 360 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_TINYINT); } +#line 5439 "sql.c" + break; + case 181: /* type_name ::= SMALLINT */ +#line 361 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +#line 5444 "sql.c" + break; + case 182: /* type_name ::= INT */ + case 183: /* type_name ::= INTEGER */ yytestcase(yyruleno==183); +#line 362 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_INT); } +#line 5450 "sql.c" + break; + case 184: /* type_name ::= BIGINT */ +#line 364 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_BIGINT); } +#line 5455 "sql.c" + break; + case 185: /* type_name ::= FLOAT */ +#line 365 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_FLOAT); } +#line 5460 "sql.c" + break; + case 186: /* type_name ::= DOUBLE */ +#line 366 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +#line 5465 "sql.c" + break; + case 187: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ +#line 367 "sql.y" +{ yymsp[-3].minor.yy700 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +#line 5470 "sql.c" + break; + case 188: /* type_name ::= TIMESTAMP */ +#line 368 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +#line 5475 "sql.c" + break; + case 189: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ +#line 369 "sql.y" +{ yymsp[-3].minor.yy700 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +#line 5480 "sql.c" + break; + case 190: /* type_name ::= TINYINT UNSIGNED */ +#line 370 "sql.y" +{ yymsp[-1].minor.yy700 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +#line 5485 "sql.c" + break; + case 191: /* type_name ::= SMALLINT UNSIGNED */ +#line 371 "sql.y" +{ yymsp[-1].minor.yy700 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +#line 5490 "sql.c" + break; + case 192: /* type_name ::= INT UNSIGNED */ +#line 372 "sql.y" +{ yymsp[-1].minor.yy700 = createDataType(TSDB_DATA_TYPE_UINT); } +#line 5495 "sql.c" + break; + case 193: /* type_name ::= BIGINT UNSIGNED */ +#line 373 "sql.y" +{ yymsp[-1].minor.yy700 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +#line 5500 "sql.c" + break; + case 194: /* type_name ::= JSON */ +#line 374 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_JSON); } +#line 5505 "sql.c" + break; + case 195: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ +#line 375 "sql.y" +{ yymsp[-3].minor.yy700 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +#line 5510 "sql.c" + break; + case 196: /* type_name ::= MEDIUMBLOB */ +#line 376 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +#line 5515 "sql.c" + break; + case 197: /* type_name ::= BLOB */ +#line 377 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_BLOB); } +#line 5520 "sql.c" + break; + case 198: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ +#line 378 "sql.y" +{ yymsp[-3].minor.yy700 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +#line 5525 "sql.c" + break; + case 199: /* type_name ::= DECIMAL */ +#line 379 "sql.y" +{ yymsp[0].minor.yy700 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +#line 5530 "sql.c" + break; + case 200: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ +#line 380 "sql.y" +{ yymsp[-3].minor.yy700 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +#line 5535 "sql.c" + break; + case 201: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ +#line 381 "sql.y" +{ yymsp[-5].minor.yy700 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +#line 5540 "sql.c" + break; + case 203: /* tags_def_opt ::= tags_def */ + case 335: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==335); + case 454: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==454); +#line 386 "sql.y" +{ yylhsminor.yy72 = yymsp[0].minor.yy72; } +#line 5547 "sql.c" + yymsp[0].minor.yy72 = yylhsminor.yy72; + break; + case 204: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ + case 336: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==336); +#line 390 "sql.y" +{ yymsp[-3].minor.yy72 = yymsp[-1].minor.yy72; } +#line 5554 "sql.c" + break; + case 205: /* table_options ::= */ +#line 392 "sql.y" +{ yymsp[1].minor.yy164 = createDefaultTableOptions(pCxt); } +#line 5559 "sql.c" + break; + case 206: /* table_options ::= table_options COMMENT NK_STRING */ +#line 393 "sql.y" +{ yylhsminor.yy164 = setTableOption(pCxt, yymsp[-2].minor.yy164, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } +#line 5564 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; + break; + case 207: /* table_options ::= table_options MAX_DELAY duration_list */ +#line 394 "sql.y" +{ yylhsminor.yy164 = setTableOption(pCxt, yymsp[-2].minor.yy164, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy72); } +#line 5570 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; + break; + case 208: /* table_options ::= table_options WATERMARK duration_list */ +#line 395 "sql.y" +{ yylhsminor.yy164 = setTableOption(pCxt, yymsp[-2].minor.yy164, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy72); } +#line 5576 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; + break; + case 209: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ +#line 396 "sql.y" +{ yylhsminor.yy164 = setTableOption(pCxt, yymsp[-4].minor.yy164, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy72); } +#line 5582 "sql.c" + yymsp[-4].minor.yy164 = yylhsminor.yy164; + break; + case 210: /* table_options ::= table_options TTL NK_INTEGER */ +#line 397 "sql.y" +{ yylhsminor.yy164 = setTableOption(pCxt, yymsp[-2].minor.yy164, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } +#line 5588 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; + break; + case 211: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ +#line 398 "sql.y" +{ yylhsminor.yy164 = setTableOption(pCxt, yymsp[-4].minor.yy164, TABLE_OPTION_SMA, yymsp[-1].minor.yy72); } +#line 5594 "sql.c" + yymsp[-4].minor.yy164 = yylhsminor.yy164; + break; + case 212: /* table_options ::= table_options DELETE_MARK duration_list */ +#line 399 "sql.y" +{ yylhsminor.yy164 = setTableOption(pCxt, yymsp[-2].minor.yy164, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy72); } +#line 5600 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; + break; + case 213: /* alter_table_options ::= alter_table_option */ +#line 401 "sql.y" +{ yylhsminor.yy164 = createAlterTableOptions(pCxt); yylhsminor.yy164 = setTableOption(pCxt, yylhsminor.yy164, yymsp[0].minor.yy761.type, &yymsp[0].minor.yy761.val); } +#line 5606 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; + break; + case 214: /* alter_table_options ::= alter_table_options alter_table_option */ +#line 402 "sql.y" +{ yylhsminor.yy164 = setTableOption(pCxt, yymsp[-1].minor.yy164, yymsp[0].minor.yy761.type, &yymsp[0].minor.yy761.val); } +#line 5612 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; + break; + case 215: /* alter_table_option ::= COMMENT NK_STRING */ +#line 406 "sql.y" +{ yymsp[-1].minor.yy761.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5618 "sql.c" + break; + case 216: /* alter_table_option ::= TTL NK_INTEGER */ +#line 407 "sql.y" +{ yymsp[-1].minor.yy761.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy761.val = yymsp[0].minor.yy0; } +#line 5623 "sql.c" + break; + case 217: /* duration_list ::= duration_literal */ + case 418: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==418); +#line 411 "sql.y" +{ yylhsminor.yy72 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy164)); } +#line 5629 "sql.c" + yymsp[0].minor.yy72 = yylhsminor.yy72; + break; + case 218: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 419: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==419); +#line 412 "sql.y" +{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-2].minor.yy72, releaseRawExprNode(pCxt, yymsp[0].minor.yy164)); } +#line 5636 "sql.c" + yymsp[-2].minor.yy72 = yylhsminor.yy72; + break; + case 221: /* rollup_func_name ::= function_name */ +#line 419 "sql.y" +{ yylhsminor.yy164 = createFunctionNode(pCxt, &yymsp[0].minor.yy497, NULL); } +#line 5642 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; + break; + case 222: /* rollup_func_name ::= FIRST */ + case 223: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==223); + case 278: /* tag_item ::= QTAGS */ yytestcase(yyruleno==278); +#line 420 "sql.y" +{ yylhsminor.yy164 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } +#line 5650 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; + break; + case 226: /* col_name ::= column_name */ + case 279: /* tag_item ::= column_name */ yytestcase(yyruleno==279); +#line 428 "sql.y" +{ yylhsminor.yy164 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy497); } +#line 5657 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; + break; + case 227: /* cmd ::= SHOW DNODES */ +#line 431 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } +#line 5663 "sql.c" break; - case 224: /* cmd ::= SHOW USERS */ + case 228: /* cmd ::= SHOW USERS */ +#line 432 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } +#line 5668 "sql.c" break; - case 225: /* cmd ::= SHOW USER PRIVILEGES */ + case 229: /* cmd ::= SHOW USER PRIVILEGES */ +#line 433 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } +#line 5673 "sql.c" break; - case 226: /* cmd ::= SHOW DATABASES */ + case 230: /* cmd ::= SHOW DATABASES */ +#line 434 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } +#line 5678 "sql.c" break; - case 227: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy872, yymsp[0].minor.yy872, OP_TYPE_LIKE); } + case 231: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ +#line 435 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy164, yymsp[0].minor.yy164, OP_TYPE_LIKE); } +#line 5683 "sql.c" break; - case 228: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy872, yymsp[0].minor.yy872, OP_TYPE_LIKE); } + case 232: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ +#line 436 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy164, yymsp[0].minor.yy164, OP_TYPE_LIKE); } +#line 5688 "sql.c" break; - case 229: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy872, NULL, OP_TYPE_LIKE); } + case 233: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ +#line 437 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy164, NULL, OP_TYPE_LIKE); } +#line 5693 "sql.c" break; - case 230: /* cmd ::= SHOW MNODES */ + case 234: /* cmd ::= SHOW MNODES */ +#line 438 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } +#line 5698 "sql.c" break; - case 231: /* cmd ::= SHOW QNODES */ + case 235: /* cmd ::= SHOW QNODES */ +#line 440 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } +#line 5703 "sql.c" break; - case 232: /* cmd ::= SHOW FUNCTIONS */ + case 236: /* cmd ::= SHOW FUNCTIONS */ +#line 441 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } +#line 5708 "sql.c" break; - case 233: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy872, yymsp[-1].minor.yy872, OP_TYPE_EQUAL); } + case 237: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ +#line 442 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy164, yymsp[-1].minor.yy164, OP_TYPE_EQUAL); } +#line 5713 "sql.c" break; - case 234: /* cmd ::= SHOW STREAMS */ + case 238: /* cmd ::= SHOW STREAMS */ +#line 443 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } +#line 5718 "sql.c" break; - case 235: /* cmd ::= SHOW ACCOUNTS */ + case 239: /* cmd ::= SHOW ACCOUNTS */ +#line 444 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } +#line 5723 "sql.c" break; - case 236: /* cmd ::= SHOW APPS */ + case 240: /* cmd ::= SHOW APPS */ +#line 445 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } +#line 5728 "sql.c" break; - case 237: /* cmd ::= SHOW CONNECTIONS */ + case 241: /* cmd ::= SHOW CONNECTIONS */ +#line 446 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } +#line 5733 "sql.c" break; - case 238: /* cmd ::= SHOW LICENCES */ - case 239: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==239); + case 242: /* cmd ::= SHOW LICENCES */ + case 243: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==243); +#line 447 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } +#line 5739 "sql.c" break; - case 240: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy929); } + case 244: /* cmd ::= SHOW CREATE DATABASE db_name */ +#line 449 "sql.y" +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy497); } +#line 5744 "sql.c" break; - case 241: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy872); } + case 245: /* cmd ::= SHOW CREATE TABLE full_table_name */ +#line 450 "sql.y" +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy164); } +#line 5749 "sql.c" break; - case 242: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy872); } + case 246: /* cmd ::= SHOW CREATE STABLE full_table_name */ +#line 451 "sql.y" +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy164); } +#line 5754 "sql.c" break; - case 243: /* cmd ::= SHOW QUERIES */ + case 247: /* cmd ::= SHOW QUERIES */ +#line 452 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } +#line 5759 "sql.c" break; - case 244: /* cmd ::= SHOW SCORES */ + case 248: /* cmd ::= SHOW SCORES */ +#line 453 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } +#line 5764 "sql.c" break; - case 245: /* cmd ::= SHOW TOPICS */ + case 249: /* cmd ::= SHOW TOPICS */ +#line 454 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } +#line 5769 "sql.c" break; - case 246: /* cmd ::= SHOW VARIABLES */ - case 247: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==247); + case 250: /* cmd ::= SHOW VARIABLES */ + case 251: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==251); +#line 455 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } +#line 5775 "sql.c" break; - case 248: /* cmd ::= SHOW LOCAL VARIABLES */ + case 252: /* cmd ::= SHOW LOCAL VARIABLES */ +#line 457 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } +#line 5780 "sql.c" break; - case 249: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy872); } + case 253: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ +#line 458 "sql.y" +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy164); } +#line 5785 "sql.c" break; - case 250: /* cmd ::= SHOW BNODES */ + case 254: /* cmd ::= SHOW BNODES */ +#line 459 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } +#line 5790 "sql.c" break; - case 251: /* cmd ::= SHOW SNODES */ + case 255: /* cmd ::= SHOW SNODES */ +#line 460 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } +#line 5795 "sql.c" break; - case 252: /* cmd ::= SHOW CLUSTER */ + case 256: /* cmd ::= SHOW CLUSTER */ +#line 461 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } +#line 5800 "sql.c" break; - case 253: /* cmd ::= SHOW TRANSACTIONS */ + case 257: /* cmd ::= SHOW TRANSACTIONS */ +#line 462 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } +#line 5805 "sql.c" break; - case 254: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy872); } + case 258: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ +#line 463 "sql.y" +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy164); } +#line 5810 "sql.c" break; - case 255: /* cmd ::= SHOW CONSUMERS */ + case 259: /* cmd ::= SHOW CONSUMERS */ +#line 464 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } +#line 5815 "sql.c" break; - case 256: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 260: /* cmd ::= SHOW SUBSCRIPTIONS */ +#line 465 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } +#line 5820 "sql.c" break; - case 257: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy872, yymsp[-1].minor.yy872, OP_TYPE_EQUAL); } + case 261: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ +#line 466 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy164, yymsp[-1].minor.yy164, OP_TYPE_EQUAL); } +#line 5825 "sql.c" break; - case 258: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy872, yymsp[0].minor.yy872, yymsp[-3].minor.yy664); } + case 262: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ +#line 467 "sql.y" +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy164, yymsp[0].minor.yy164, yymsp[-3].minor.yy72); } +#line 5830 "sql.c" break; - case 259: /* cmd ::= SHOW VNODES NK_INTEGER */ + case 263: /* cmd ::= SHOW VNODES NK_INTEGER */ +#line 468 "sql.y" { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } +#line 5835 "sql.c" break; - case 260: /* cmd ::= SHOW VNODES NK_STRING */ + case 264: /* cmd ::= SHOW VNODES NK_STRING */ +#line 469 "sql.y" { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); } +#line 5840 "sql.c" break; - case 261: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy872, QUERY_NODE_SHOW_DB_ALIVE_STMT); } + case 265: /* cmd ::= SHOW db_name_cond_opt ALIVE */ +#line 471 "sql.y" +{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy164, QUERY_NODE_SHOW_DB_ALIVE_STMT); } +#line 5845 "sql.c" break; - case 262: /* cmd ::= SHOW CLUSTER ALIVE */ + case 266: /* cmd ::= SHOW CLUSTER ALIVE */ +#line 472 "sql.y" { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } +#line 5850 "sql.c" break; - case 263: /* db_name_cond_opt ::= */ - case 268: /* from_db_opt ::= */ yytestcase(yyruleno==268); -{ yymsp[1].minor.yy872 = createDefaultDatabaseCondValue(pCxt); } + case 267: /* db_name_cond_opt ::= */ + case 272: /* from_db_opt ::= */ yytestcase(yyruleno==272); +#line 474 "sql.y" +{ yymsp[1].minor.yy164 = createDefaultDatabaseCondValue(pCxt); } +#line 5856 "sql.c" break; - case 264: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy872 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy929); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; + case 268: /* db_name_cond_opt ::= db_name NK_DOT */ +#line 475 "sql.y" +{ yylhsminor.yy164 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy497); } +#line 5861 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 266: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 270: /* like_pattern_opt ::= LIKE NK_STRING */ +#line 478 "sql.y" +{ yymsp[-1].minor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +#line 5867 "sql.c" break; - case 267: /* table_name_cond ::= table_name */ -{ yylhsminor.yy872 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 271: /* table_name_cond ::= table_name */ +#line 480 "sql.y" +{ yylhsminor.yy164 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy497); } +#line 5872 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 269: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy872 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy929); } + case 273: /* from_db_opt ::= FROM db_name */ +#line 483 "sql.y" +{ yymsp[-1].minor.yy164 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy497); } +#line 5878 "sql.c" break; - case 273: /* tag_item ::= TBNAME */ -{ yylhsminor.yy872 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 277: /* tag_item ::= TBNAME */ +#line 491 "sql.y" +{ yylhsminor.yy164 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } +#line 5883 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 276: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy872 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy929), &yymsp[0].minor.yy929); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; + case 280: /* tag_item ::= column_name column_alias */ +#line 494 "sql.y" +{ yylhsminor.yy164 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy497), &yymsp[0].minor.yy497); } +#line 5889 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 277: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy872 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy929), &yymsp[0].minor.yy929); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 281: /* tag_item ::= column_name AS column_alias */ +#line 495 "sql.y" +{ yylhsminor.yy164 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy497), &yymsp[0].minor.yy497); } +#line 5895 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 278: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy857, yymsp[-3].minor.yy872, yymsp[-1].minor.yy872, NULL, yymsp[0].minor.yy872); } + case 282: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ +#line 499 "sql.y" +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy441, yymsp[-3].minor.yy164, yymsp[-1].minor.yy164, NULL, yymsp[0].minor.yy164); } +#line 5901 "sql.c" break; - case 279: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy857, yymsp[-5].minor.yy872, yymsp[-3].minor.yy872, yymsp[-1].minor.yy664, NULL); } + case 283: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ +#line 501 "sql.y" +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy441, yymsp[-5].minor.yy164, yymsp[-3].minor.yy164, yymsp[-1].minor.yy72, NULL); } +#line 5906 "sql.c" break; - case 280: /* cmd ::= DROP INDEX exists_opt full_index_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy857, yymsp[0].minor.yy872); } + case 284: /* cmd ::= DROP INDEX exists_opt full_index_name */ +#line 502 "sql.y" +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy441, yymsp[0].minor.yy164); } +#line 5911 "sql.c" break; - case 281: /* full_index_name ::= index_name */ -{ yylhsminor.yy872 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy929); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 285: /* full_index_name ::= index_name */ +#line 504 "sql.y" +{ yylhsminor.yy164 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy497); } +#line 5916 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 282: /* full_index_name ::= db_name NK_DOT index_name */ -{ yylhsminor.yy872 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 286: /* full_index_name ::= db_name NK_DOT index_name */ +#line 505 "sql.y" +{ yylhsminor.yy164 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy497, &yymsp[0].minor.yy497); } +#line 5922 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 283: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy872 = createIndexOption(pCxt, yymsp[-7].minor.yy664, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), NULL, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } + case 287: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ +#line 508 "sql.y" +{ yymsp[-9].minor.yy164 = createIndexOption(pCxt, yymsp[-7].minor.yy72, releaseRawExprNode(pCxt, yymsp[-3].minor.yy164), NULL, yymsp[-1].minor.yy164, yymsp[0].minor.yy164); } +#line 5928 "sql.c" break; - case 284: /* 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.yy872 = createIndexOption(pCxt, yymsp[-9].minor.yy664, releaseRawExprNode(pCxt, yymsp[-5].minor.yy872), releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } + case 288: /* 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 */ +#line 511 "sql.y" +{ yymsp[-11].minor.yy164 = createIndexOption(pCxt, yymsp[-9].minor.yy72, releaseRawExprNode(pCxt, yymsp[-5].minor.yy164), releaseRawExprNode(pCxt, yymsp[-3].minor.yy164), yymsp[-1].minor.yy164, yymsp[0].minor.yy164); } +#line 5933 "sql.c" break; - case 287: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy872 = createFunctionNode(pCxt, &yymsp[-3].minor.yy929, yymsp[-1].minor.yy664); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; + case 291: /* func ::= sma_func_name NK_LP expression_list NK_RP */ +#line 518 "sql.y" +{ yylhsminor.yy164 = createFunctionNode(pCxt, &yymsp[-3].minor.yy497, yymsp[-1].minor.yy72); } +#line 5938 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 288: /* sma_func_name ::= function_name */ - case 501: /* alias_opt ::= table_alias */ yytestcase(yyruleno==501); -{ yylhsminor.yy929 = yymsp[0].minor.yy929; } - yymsp[0].minor.yy929 = yylhsminor.yy929; + case 292: /* sma_func_name ::= function_name */ + case 505: /* alias_opt ::= table_alias */ yytestcase(yyruleno==505); +#line 522 "sql.y" +{ yylhsminor.yy497 = yymsp[0].minor.yy497; } +#line 5945 "sql.c" + yymsp[0].minor.yy497 = yylhsminor.yy497; break; - case 293: /* sma_stream_opt ::= */ - case 333: /* stream_options ::= */ yytestcase(yyruleno==333); -{ yymsp[1].minor.yy872 = createStreamOptions(pCxt); } + case 297: /* sma_stream_opt ::= */ + case 337: /* stream_options ::= */ yytestcase(yyruleno==337); +#line 528 "sql.y" +{ yymsp[1].minor.yy164 = createStreamOptions(pCxt); } +#line 5952 "sql.c" break; - case 294: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy872)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy872); yylhsminor.yy872 = yymsp[-2].minor.yy872; } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 298: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ +#line 529 "sql.y" +{ ((SStreamOptions*)yymsp[-2].minor.yy164)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy164); yylhsminor.yy164 = yymsp[-2].minor.yy164; } +#line 5957 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 295: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy872)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy872); yylhsminor.yy872 = yymsp[-2].minor.yy872; } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 299: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ +#line 530 "sql.y" +{ ((SStreamOptions*)yymsp[-2].minor.yy164)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy164); yylhsminor.yy164 = yymsp[-2].minor.yy164; } +#line 5963 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 296: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy872)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy872); yylhsminor.yy872 = yymsp[-2].minor.yy872; } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 300: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ +#line 531 "sql.y" +{ ((SStreamOptions*)yymsp[-2].minor.yy164)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy164); yylhsminor.yy164 = yymsp[-2].minor.yy164; } +#line 5969 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 297: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy857, &yymsp[-2].minor.yy929, yymsp[0].minor.yy872); } + case 301: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ +#line 534 "sql.y" +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy441, &yymsp[-2].minor.yy497, yymsp[0].minor.yy164); } +#line 5975 "sql.c" break; - case 298: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy857, &yymsp[-3].minor.yy929, &yymsp[0].minor.yy929, false); } + case 302: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ +#line 535 "sql.y" +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy441, &yymsp[-3].minor.yy497, &yymsp[0].minor.yy497, false); } +#line 5980 "sql.c" break; - case 299: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy857, &yymsp[-5].minor.yy929, &yymsp[0].minor.yy929, true); } + case 303: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ +#line 537 "sql.y" +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy441, &yymsp[-5].minor.yy497, &yymsp[0].minor.yy497, true); } +#line 5985 "sql.c" break; - case 300: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy857, &yymsp[-3].minor.yy929, yymsp[0].minor.yy872, false); } + case 304: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ +#line 539 "sql.y" +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy441, &yymsp[-3].minor.yy497, yymsp[0].minor.yy164, false); } +#line 5990 "sql.c" break; - case 301: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy857, &yymsp[-5].minor.yy929, yymsp[0].minor.yy872, true); } + case 305: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ +#line 541 "sql.y" +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy441, &yymsp[-5].minor.yy497, yymsp[0].minor.yy164, true); } +#line 5995 "sql.c" break; - case 302: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy857, &yymsp[0].minor.yy929); } + case 306: /* cmd ::= DROP TOPIC exists_opt topic_name */ +#line 542 "sql.y" +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy441, &yymsp[0].minor.yy497); } +#line 6000 "sql.c" break; - case 303: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy857, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929); } + case 307: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +#line 543 "sql.y" +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy441, &yymsp[-2].minor.yy497, &yymsp[0].minor.yy497); } +#line 6005 "sql.c" break; - case 304: /* cmd ::= DESC full_table_name */ - case 305: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==305); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy872); } + case 308: /* cmd ::= DESC full_table_name */ + case 309: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==309); +#line 546 "sql.y" +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy164); } +#line 6011 "sql.c" break; - case 306: /* cmd ::= RESET QUERY CACHE */ + case 310: /* cmd ::= RESET QUERY CACHE */ +#line 550 "sql.y" { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } +#line 6016 "sql.c" break; - case 307: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 308: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==308); -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy857, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } + case 311: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 312: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==312); +#line 553 "sql.y" +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy441, yymsp[-1].minor.yy164, yymsp[0].minor.yy164); } +#line 6022 "sql.c" break; - case 311: /* explain_options ::= */ -{ yymsp[1].minor.yy872 = createDefaultExplainOptions(pCxt); } + case 315: /* explain_options ::= */ +#line 561 "sql.y" +{ yymsp[1].minor.yy164 = createDefaultExplainOptions(pCxt); } +#line 6027 "sql.c" break; - case 312: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy872 = setExplainVerbose(pCxt, yymsp[-2].minor.yy872, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 316: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +#line 562 "sql.y" +{ yylhsminor.yy164 = setExplainVerbose(pCxt, yymsp[-2].minor.yy164, &yymsp[0].minor.yy0); } +#line 6032 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 313: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy872 = setExplainRatio(pCxt, yymsp[-2].minor.yy872, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 317: /* explain_options ::= explain_options RATIO NK_FLOAT */ +#line 563 "sql.y" +{ yylhsminor.yy164 = setExplainRatio(pCxt, yymsp[-2].minor.yy164, &yymsp[0].minor.yy0); } +#line 6038 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 314: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy857, yymsp[-9].minor.yy857, &yymsp[-6].minor.yy929, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy784, yymsp[-1].minor.yy580, &yymsp[0].minor.yy929, yymsp[-10].minor.yy857); } + case 318: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ +#line 568 "sql.y" +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy441, yymsp[-9].minor.yy441, &yymsp[-6].minor.yy497, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy700, yymsp[-1].minor.yy560, &yymsp[0].minor.yy497, yymsp[-10].minor.yy441); } +#line 6044 "sql.c" break; - case 315: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy857, &yymsp[0].minor.yy929); } + case 319: /* cmd ::= DROP FUNCTION exists_opt function_name */ +#line 569 "sql.y" +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy441, &yymsp[0].minor.yy497); } +#line 6049 "sql.c" break; - case 320: /* language_opt ::= */ -{ yymsp[1].minor.yy929 = nil_token; } + case 324: /* language_opt ::= */ +#line 583 "sql.y" +{ yymsp[1].minor.yy497 = nil_token; } +#line 6054 "sql.c" break; - case 321: /* language_opt ::= LANGUAGE NK_STRING */ -{ yymsp[-1].minor.yy929 = yymsp[0].minor.yy0; } + case 325: /* language_opt ::= LANGUAGE NK_STRING */ +#line 584 "sql.y" +{ yymsp[-1].minor.yy497 = yymsp[0].minor.yy0; } +#line 6059 "sql.c" break; - case 324: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy857, &yymsp[-8].minor.yy929, yymsp[-5].minor.yy872, yymsp[-7].minor.yy872, yymsp[-3].minor.yy664, yymsp[-2].minor.yy872, yymsp[0].minor.yy872, yymsp[-4].minor.yy664); } + case 328: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ +#line 594 "sql.y" +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy441, &yymsp[-8].minor.yy497, yymsp[-5].minor.yy164, yymsp[-7].minor.yy164, yymsp[-3].minor.yy72, yymsp[-2].minor.yy164, yymsp[0].minor.yy164, yymsp[-4].minor.yy72); } +#line 6064 "sql.c" break; - case 325: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy857, &yymsp[0].minor.yy929); } + case 329: /* cmd ::= DROP STREAM exists_opt stream_name */ +#line 595 "sql.y" +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy441, &yymsp[0].minor.yy497); } +#line 6069 "sql.c" break; - case 326: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy857, &yymsp[0].minor.yy929); } + case 330: /* cmd ::= PAUSE STREAM exists_opt stream_name */ +#line 596 "sql.y" +{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy441, &yymsp[0].minor.yy497); } +#line 6074 "sql.c" break; - case 327: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy857, yymsp[-1].minor.yy857, &yymsp[0].minor.yy929); } + case 331: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ +#line 597 "sql.y" +{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy441, yymsp[-1].minor.yy441, &yymsp[0].minor.yy497); } +#line 6079 "sql.c" break; - case 334: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 335: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==335); -{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-2].minor.yy872, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 338: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 339: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==339); +#line 611 "sql.y" +{ yylhsminor.yy164 = setStreamOptions(pCxt, yymsp[-2].minor.yy164, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } +#line 6085 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 336: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-3].minor.yy872, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; + case 340: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ +#line 613 "sql.y" +{ yylhsminor.yy164 = setStreamOptions(pCxt, yymsp[-3].minor.yy164, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy164)); } +#line 6091 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 337: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-2].minor.yy872, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 341: /* stream_options ::= stream_options WATERMARK duration_literal */ +#line 614 "sql.y" +{ yylhsminor.yy164 = setStreamOptions(pCxt, yymsp[-2].minor.yy164, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy164)); } +#line 6097 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 338: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-3].minor.yy872, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; + case 342: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ +#line 615 "sql.y" +{ yylhsminor.yy164 = setStreamOptions(pCxt, yymsp[-3].minor.yy164, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } +#line 6103 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 339: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-2].minor.yy872, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 343: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ +#line 616 "sql.y" +{ yylhsminor.yy164 = setStreamOptions(pCxt, yymsp[-2].minor.yy164, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } +#line 6109 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 340: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-2].minor.yy872, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 344: /* stream_options ::= stream_options DELETE_MARK duration_literal */ +#line 617 "sql.y" +{ yylhsminor.yy164 = setStreamOptions(pCxt, yymsp[-2].minor.yy164, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy164)); } +#line 6115 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 341: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-3].minor.yy872, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; + case 345: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ +#line 618 "sql.y" +{ yylhsminor.yy164 = setStreamOptions(pCxt, yymsp[-3].minor.yy164, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } +#line 6121 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 343: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 535: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==535); - case 555: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==555); -{ yymsp[-3].minor.yy872 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy872); } + case 347: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 539: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==539); + case 559: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==559); +#line 621 "sql.y" +{ yymsp[-3].minor.yy164 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy164); } +#line 6129 "sql.c" break; - case 346: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 350: /* cmd ::= KILL CONNECTION NK_INTEGER */ +#line 629 "sql.y" { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } +#line 6134 "sql.c" break; - case 347: /* cmd ::= KILL QUERY NK_STRING */ + case 351: /* cmd ::= KILL QUERY NK_STRING */ +#line 630 "sql.y" { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } +#line 6139 "sql.c" break; - case 348: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 352: /* cmd ::= KILL TRANSACTION NK_INTEGER */ +#line 631 "sql.y" { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } +#line 6144 "sql.c" break; - case 349: /* cmd ::= BALANCE VGROUP */ + case 353: /* cmd ::= BALANCE VGROUP */ +#line 634 "sql.y" { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } +#line 6149 "sql.c" break; - case 350: /* cmd ::= BALANCE VGROUP LEADER */ + case 354: /* cmd ::= BALANCE VGROUP LEADER */ +#line 635 "sql.y" { pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt); } +#line 6154 "sql.c" break; - case 351: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 355: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ +#line 636 "sql.y" { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } +#line 6159 "sql.c" break; - case 352: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy664); } + case 356: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +#line 637 "sql.y" +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy72); } +#line 6164 "sql.c" break; - case 353: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 357: /* cmd ::= SPLIT VGROUP NK_INTEGER */ +#line 638 "sql.y" { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } +#line 6169 "sql.c" break; - case 354: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy664 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 358: /* dnode_list ::= DNODE NK_INTEGER */ +#line 642 "sql.y" +{ yymsp[-1].minor.yy72 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +#line 6174 "sql.c" break; - case 356: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } + case 360: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ +#line 649 "sql.y" +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy164, yymsp[0].minor.yy164); } +#line 6179 "sql.c" break; - case 359: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ yymsp[-6].minor.yy872 = createInsertStmt(pCxt, yymsp[-4].minor.yy872, yymsp[-2].minor.yy664, yymsp[0].minor.yy872); } + case 363: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ +#line 658 "sql.y" +{ yymsp[-6].minor.yy164 = createInsertStmt(pCxt, yymsp[-4].minor.yy164, yymsp[-2].minor.yy72, yymsp[0].minor.yy164); } +#line 6184 "sql.c" break; - case 360: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -{ yymsp[-3].minor.yy872 = createInsertStmt(pCxt, yymsp[-1].minor.yy872, NULL, yymsp[0].minor.yy872); } + case 364: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ +#line 659 "sql.y" +{ yymsp[-3].minor.yy164 = createInsertStmt(pCxt, yymsp[-1].minor.yy164, NULL, yymsp[0].minor.yy164); } +#line 6189 "sql.c" break; - case 361: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 365: /* literal ::= NK_INTEGER */ +#line 662 "sql.y" +{ yylhsminor.yy164 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } +#line 6194 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 362: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 366: /* literal ::= NK_FLOAT */ +#line 663 "sql.y" +{ yylhsminor.yy164 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } +#line 6200 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 363: /* literal ::= NK_STRING */ -{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 367: /* literal ::= NK_STRING */ +#line 664 "sql.y" +{ yylhsminor.yy164 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } +#line 6206 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 364: /* literal ::= NK_BOOL */ -{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 368: /* literal ::= NK_BOOL */ +#line 665 "sql.y" +{ yylhsminor.yy164 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } +#line 6212 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 365: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; + case 369: /* literal ::= TIMESTAMP NK_STRING */ +#line 666 "sql.y" +{ yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } +#line 6218 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 366: /* literal ::= duration_literal */ - case 376: /* signed_literal ::= signed */ yytestcase(yyruleno==376); - case 397: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==397); - case 398: /* expression ::= literal */ yytestcase(yyruleno==398); - case 399: /* expression ::= pseudo_column */ yytestcase(yyruleno==399); - case 400: /* expression ::= column_reference */ yytestcase(yyruleno==400); - case 401: /* expression ::= function_expression */ yytestcase(yyruleno==401); - case 402: /* expression ::= case_when_expression */ yytestcase(yyruleno==402); - case 433: /* function_expression ::= literal_func */ yytestcase(yyruleno==433); - case 482: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==482); - case 486: /* boolean_primary ::= predicate */ yytestcase(yyruleno==486); - case 488: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==488); - case 489: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==489); - case 492: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==492); - case 494: /* table_reference ::= table_primary */ yytestcase(yyruleno==494); - case 495: /* table_reference ::= joined_table */ yytestcase(yyruleno==495); - case 499: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==499); - case 557: /* query_simple ::= query_specification */ yytestcase(yyruleno==557); - case 558: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==558); - case 561: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==561); - case 563: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==563); -{ yylhsminor.yy872 = yymsp[0].minor.yy872; } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 370: /* literal ::= duration_literal */ + case 380: /* signed_literal ::= signed */ yytestcase(yyruleno==380); + case 401: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==401); + case 402: /* expression ::= literal */ yytestcase(yyruleno==402); + case 403: /* expression ::= pseudo_column */ yytestcase(yyruleno==403); + case 404: /* expression ::= column_reference */ yytestcase(yyruleno==404); + case 405: /* expression ::= function_expression */ yytestcase(yyruleno==405); + case 406: /* expression ::= case_when_expression */ yytestcase(yyruleno==406); + case 437: /* function_expression ::= literal_func */ yytestcase(yyruleno==437); + case 486: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==486); + case 490: /* boolean_primary ::= predicate */ yytestcase(yyruleno==490); + case 492: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==492); + case 493: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==493); + case 496: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==496); + case 498: /* table_reference ::= table_primary */ yytestcase(yyruleno==498); + case 499: /* table_reference ::= joined_table */ yytestcase(yyruleno==499); + case 503: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==503); + case 561: /* query_simple ::= query_specification */ yytestcase(yyruleno==561); + case 562: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==562); + case 565: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==565); + case 567: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==567); +#line 667 "sql.y" +{ yylhsminor.yy164 = yymsp[0].minor.yy164; } +#line 6244 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 367: /* literal ::= NULL */ -{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 371: /* literal ::= NULL */ +#line 668 "sql.y" +{ yylhsminor.yy164 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } +#line 6250 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 368: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 372: /* literal ::= NK_QUESTION */ +#line 669 "sql.y" +{ yylhsminor.yy164 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } +#line 6256 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 369: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 373: /* duration_literal ::= NK_VARIABLE */ +#line 671 "sql.y" +{ yylhsminor.yy164 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } +#line 6262 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 370: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 374: /* signed ::= NK_INTEGER */ +#line 673 "sql.y" +{ yylhsminor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } +#line 6268 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 371: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + case 375: /* signed ::= NK_PLUS NK_INTEGER */ +#line 674 "sql.y" +{ yymsp[-1].minor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } +#line 6274 "sql.c" break; - case 372: /* signed ::= NK_MINUS NK_INTEGER */ + case 376: /* signed ::= NK_MINUS NK_INTEGER */ +#line 675 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; +#line 6283 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 373: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 377: /* signed ::= NK_FLOAT */ +#line 680 "sql.y" +{ yylhsminor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } +#line 6289 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 374: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 378: /* signed ::= NK_PLUS NK_FLOAT */ +#line 681 "sql.y" +{ yymsp[-1].minor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } +#line 6295 "sql.c" break; - case 375: /* signed ::= NK_MINUS NK_FLOAT */ + case 379: /* signed ::= NK_MINUS NK_FLOAT */ +#line 682 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; +#line 6304 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 377: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 381: /* signed_literal ::= NK_STRING */ +#line 689 "sql.y" +{ yylhsminor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +#line 6310 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 378: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 382: /* signed_literal ::= NK_BOOL */ +#line 690 "sql.y" +{ yylhsminor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } +#line 6316 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 379: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 383: /* signed_literal ::= TIMESTAMP NK_STRING */ +#line 691 "sql.y" +{ yymsp[-1].minor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +#line 6322 "sql.c" break; - case 380: /* signed_literal ::= duration_literal */ - case 382: /* signed_literal ::= literal_func */ yytestcase(yyruleno==382); - case 453: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==453); - case 515: /* select_item ::= common_expression */ yytestcase(yyruleno==515); - case 525: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==525); - case 562: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==562); - case 564: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==564); - case 577: /* search_condition ::= common_expression */ yytestcase(yyruleno==577); -{ yylhsminor.yy872 = releaseRawExprNode(pCxt, yymsp[0].minor.yy872); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 384: /* signed_literal ::= duration_literal */ + case 386: /* signed_literal ::= literal_func */ yytestcase(yyruleno==386); + case 457: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==457); + case 519: /* select_item ::= common_expression */ yytestcase(yyruleno==519); + case 529: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==529); + case 566: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==566); + case 568: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==568); + case 581: /* search_condition ::= common_expression */ yytestcase(yyruleno==581); +#line 692 "sql.y" +{ yylhsminor.yy164 = releaseRawExprNode(pCxt, yymsp[0].minor.yy164); } +#line 6334 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 381: /* signed_literal ::= NULL */ -{ yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 385: /* signed_literal ::= NULL */ +#line 693 "sql.y" +{ yylhsminor.yy164 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } +#line 6340 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 383: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy872 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 387: /* signed_literal ::= NK_QUESTION */ +#line 695 "sql.y" +{ yylhsminor.yy164 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } +#line 6346 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 403: /* expression ::= NK_LP expression NK_RP */ - case 487: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==487); - case 576: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==576); -{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy872)); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 407: /* expression ::= NK_LP expression NK_RP */ + case 491: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==491); + case 580: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==580); +#line 756 "sql.y" +{ yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy164)); } +#line 6354 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 404: /* expression ::= NK_PLUS expr_or_subquery */ + case 408: /* expression ::= NK_PLUS expr_or_subquery */ +#line 757 "sql.y" { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy164)); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; +#line 6363 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 405: /* expression ::= NK_MINUS expr_or_subquery */ + case 409: /* expression ::= NK_MINUS expr_or_subquery */ +#line 761 "sql.y" { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy872), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy164), NULL)); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; +#line 6372 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 406: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 410: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ +#line 765 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6382 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 407: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 411: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ +#line 770 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6392 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 408: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 412: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ +#line 775 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6402 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 409: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 413: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ +#line 780 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6412 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 410: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 414: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ +#line 785 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6422 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 411: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 415: /* expression ::= column_reference NK_ARROW NK_STRING */ +#line 790 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6431 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 412: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 416: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ +#line 794 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6441 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 413: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 417: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ +#line 799 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6451 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 416: /* column_reference ::= column_name */ -{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy929, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy929)); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 420: /* column_reference ::= column_name */ +#line 810 "sql.y" +{ yylhsminor.yy164 = createRawExprNode(pCxt, &yymsp[0].minor.yy497, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy497)); } +#line 6457 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 417: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929, createColumnNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy929)); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 421: /* column_reference ::= table_name NK_DOT column_name */ +#line 811 "sql.y" +{ yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy497, &yymsp[0].minor.yy497, createColumnNode(pCxt, &yymsp[-2].minor.yy497, &yymsp[0].minor.yy497)); } +#line 6463 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 418: /* pseudo_column ::= ROWTS */ - case 419: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==419); - case 421: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==421); - case 422: /* pseudo_column ::= QEND */ yytestcase(yyruleno==422); - case 423: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==423); - case 424: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==424); - case 425: /* pseudo_column ::= WEND */ yytestcase(yyruleno==425); - case 426: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==426); - case 427: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==427); - case 428: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==428); - case 429: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==429); - case 435: /* literal_func ::= NOW */ yytestcase(yyruleno==435); -{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 422: /* pseudo_column ::= ROWTS */ + case 423: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==423); + case 425: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==425); + case 426: /* pseudo_column ::= QEND */ yytestcase(yyruleno==426); + case 427: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==427); + case 428: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==428); + case 429: /* pseudo_column ::= WEND */ yytestcase(yyruleno==429); + case 430: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==430); + case 431: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==431); + case 432: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==432); + case 433: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==433); + case 439: /* literal_func ::= NOW */ yytestcase(yyruleno==439); +#line 813 "sql.y" +{ yylhsminor.yy164 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } +#line 6480 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 420: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy929)))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 424: /* pseudo_column ::= table_name NK_DOT TBNAME */ +#line 815 "sql.y" +{ yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy497, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy497)))); } +#line 6486 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 430: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 431: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==431); -{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy929, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy929, yymsp[-1].minor.yy664)); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; + case 434: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 435: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==435); +#line 826 "sql.y" +{ yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy497, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy497, yymsp[-1].minor.yy72)); } +#line 6493 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 432: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), yymsp[-1].minor.yy784)); } - yymsp[-5].minor.yy872 = yylhsminor.yy872; + case 436: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ +#line 829 "sql.y" +{ yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy164), yymsp[-1].minor.yy700)); } +#line 6499 "sql.c" + yymsp[-5].minor.yy164 = yylhsminor.yy164; break; - case 434: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy929, NULL)); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 438: /* literal_func ::= noarg_func NK_LP NK_RP */ +#line 832 "sql.y" +{ yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy497, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy497, NULL)); } +#line 6505 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 449: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy664 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy664 = yylhsminor.yy664; + case 453: /* star_func_para_list ::= NK_STAR */ +#line 856 "sql.y" +{ yylhsminor.yy72 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } +#line 6511 "sql.c" + yymsp[0].minor.yy72 = yylhsminor.yy72; break; - case 454: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 518: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==518); -{ yylhsminor.yy872 = createColumnNode(pCxt, &yymsp[-2].minor.yy929, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 458: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 522: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==522); +#line 865 "sql.y" +{ yylhsminor.yy164 = createColumnNode(pCxt, &yymsp[-2].minor.yy497, &yymsp[0].minor.yy0); } +#line 6518 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 455: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy664, yymsp[-1].minor.yy872)); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; + case 459: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +#line 868 "sql.y" +{ yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy72, yymsp[-1].minor.yy164)); } +#line 6524 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 456: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), yymsp[-2].minor.yy664, yymsp[-1].minor.yy872)); } - yymsp[-4].minor.yy872 = yylhsminor.yy872; + case 460: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +#line 870 "sql.y" +{ yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy164), yymsp[-2].minor.yy72, yymsp[-1].minor.yy164)); } +#line 6530 "sql.c" + yymsp[-4].minor.yy164 = yylhsminor.yy164; break; - case 459: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy872 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } + case 463: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +#line 877 "sql.y" +{ yymsp[-3].minor.yy164 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164)); } +#line 6536 "sql.c" break; - case 461: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy872 = releaseRawExprNode(pCxt, yymsp[0].minor.yy872); } + case 465: /* case_when_else_opt ::= ELSE common_expression */ +#line 880 "sql.y" +{ yymsp[-1].minor.yy164 = releaseRawExprNode(pCxt, yymsp[0].minor.yy164); } +#line 6541 "sql.c" break; - case 462: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 467: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==467); + case 466: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 471: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==471); +#line 883 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy380, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy796, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6551 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 463: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 467: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ +#line 890 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy872), releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy164), releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-4].minor.yy872 = yylhsminor.yy872; +#line 6561 "sql.c" + yymsp[-4].minor.yy164 = yylhsminor.yy164; break; - case 464: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 468: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ +#line 896 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy872), releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy164), releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-5].minor.yy872 = yylhsminor.yy872; +#line 6571 "sql.c" + yymsp[-5].minor.yy164 = yylhsminor.yy164; break; - case 465: /* predicate ::= expr_or_subquery IS NULL */ + case 469: /* predicate ::= expr_or_subquery IS NULL */ +#line 901 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), NULL)); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6580 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 466: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 470: /* predicate ::= expr_or_subquery IS NOT NULL */ +#line 905 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy164), NULL)); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; +#line 6589 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 468: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_THAN; } + case 472: /* compare_op ::= NK_LT */ +#line 917 "sql.y" +{ yymsp[0].minor.yy796 = OP_TYPE_LOWER_THAN; } +#line 6595 "sql.c" break; - case 469: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_THAN; } + case 473: /* compare_op ::= NK_GT */ +#line 918 "sql.y" +{ yymsp[0].minor.yy796 = OP_TYPE_GREATER_THAN; } +#line 6600 "sql.c" break; - case 470: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_EQUAL; } + case 474: /* compare_op ::= NK_LE */ +#line 919 "sql.y" +{ yymsp[0].minor.yy796 = OP_TYPE_LOWER_EQUAL; } +#line 6605 "sql.c" break; - case 471: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_EQUAL; } + case 475: /* compare_op ::= NK_GE */ +#line 920 "sql.y" +{ yymsp[0].minor.yy796 = OP_TYPE_GREATER_EQUAL; } +#line 6610 "sql.c" break; - case 472: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy380 = OP_TYPE_NOT_EQUAL; } + case 476: /* compare_op ::= NK_NE */ +#line 921 "sql.y" +{ yymsp[0].minor.yy796 = OP_TYPE_NOT_EQUAL; } +#line 6615 "sql.c" break; - case 473: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy380 = OP_TYPE_EQUAL; } + case 477: /* compare_op ::= NK_EQ */ +#line 922 "sql.y" +{ yymsp[0].minor.yy796 = OP_TYPE_EQUAL; } +#line 6620 "sql.c" break; - case 474: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy380 = OP_TYPE_LIKE; } + case 478: /* compare_op ::= LIKE */ +#line 923 "sql.y" +{ yymsp[0].minor.yy796 = OP_TYPE_LIKE; } +#line 6625 "sql.c" break; - case 475: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_LIKE; } + case 479: /* compare_op ::= NOT LIKE */ +#line 924 "sql.y" +{ yymsp[-1].minor.yy796 = OP_TYPE_NOT_LIKE; } +#line 6630 "sql.c" break; - case 476: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy380 = OP_TYPE_MATCH; } + case 480: /* compare_op ::= MATCH */ +#line 925 "sql.y" +{ yymsp[0].minor.yy796 = OP_TYPE_MATCH; } +#line 6635 "sql.c" break; - case 477: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy380 = OP_TYPE_NMATCH; } + case 481: /* compare_op ::= NMATCH */ +#line 926 "sql.y" +{ yymsp[0].minor.yy796 = OP_TYPE_NMATCH; } +#line 6640 "sql.c" break; - case 478: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy380 = OP_TYPE_JSON_CONTAINS; } + case 482: /* compare_op ::= CONTAINS */ +#line 927 "sql.y" +{ yymsp[0].minor.yy796 = OP_TYPE_JSON_CONTAINS; } +#line 6645 "sql.c" break; - case 479: /* in_op ::= IN */ -{ yymsp[0].minor.yy380 = OP_TYPE_IN; } + case 483: /* in_op ::= IN */ +#line 931 "sql.y" +{ yymsp[0].minor.yy796 = OP_TYPE_IN; } +#line 6650 "sql.c" break; - case 480: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_IN; } + case 484: /* in_op ::= NOT IN */ +#line 932 "sql.y" +{ yymsp[-1].minor.yy796 = OP_TYPE_NOT_IN; } +#line 6655 "sql.c" break; - case 481: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy664)); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 485: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +#line 934 "sql.y" +{ yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy72)); } +#line 6660 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 483: /* boolean_value_expression ::= NOT boolean_primary */ + case 487: /* boolean_value_expression ::= NOT boolean_primary */ +#line 938 "sql.y" { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy872), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy164), NULL)); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; +#line 6669 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 484: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 488: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ +#line 943 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6679 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 485: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 489: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ +#line 949 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); - yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy164); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy164); + yylhsminor.yy164 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; +#line 6689 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 493: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy872 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy872, yymsp[0].minor.yy872, NULL); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 497: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +#line 967 "sql.y" +{ yylhsminor.yy164 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy164, yymsp[0].minor.yy164, NULL); } +#line 6695 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 496: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy872 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; + case 500: /* table_primary ::= table_name alias_opt */ +#line 973 "sql.y" +{ yylhsminor.yy164 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy497, &yymsp[0].minor.yy497); } +#line 6701 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 497: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy872 = createRealTableNode(pCxt, &yymsp[-3].minor.yy929, &yymsp[-1].minor.yy929, &yymsp[0].minor.yy929); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; + case 501: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +#line 974 "sql.y" +{ yylhsminor.yy164 = createRealTableNode(pCxt, &yymsp[-3].minor.yy497, &yymsp[-1].minor.yy497, &yymsp[0].minor.yy497); } +#line 6707 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 498: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy872 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy872), &yymsp[0].minor.yy929); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; + case 502: /* table_primary ::= subquery alias_opt */ +#line 975 "sql.y" +{ yylhsminor.yy164 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy164), &yymsp[0].minor.yy497); } +#line 6713 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 500: /* alias_opt ::= */ -{ yymsp[1].minor.yy929 = nil_token; } + case 504: /* alias_opt ::= */ +#line 980 "sql.y" +{ yymsp[1].minor.yy497 = nil_token; } +#line 6719 "sql.c" break; - case 502: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy929 = yymsp[0].minor.yy929; } + case 506: /* alias_opt ::= AS table_alias */ +#line 982 "sql.y" +{ yymsp[-1].minor.yy497 = yymsp[0].minor.yy497; } +#line 6724 "sql.c" break; - case 503: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 504: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==504); -{ yymsp[-2].minor.yy872 = yymsp[-1].minor.yy872; } + case 507: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 508: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==508); +#line 984 "sql.y" +{ yymsp[-2].minor.yy164 = yymsp[-1].minor.yy164; } +#line 6730 "sql.c" break; - case 505: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy872 = createJoinTableNode(pCxt, yymsp[-4].minor.yy852, yymsp[-5].minor.yy872, yymsp[-2].minor.yy872, yymsp[0].minor.yy872); } - yymsp[-5].minor.yy872 = yylhsminor.yy872; + case 509: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +#line 989 "sql.y" +{ yylhsminor.yy164 = createJoinTableNode(pCxt, yymsp[-4].minor.yy196, yymsp[-5].minor.yy164, yymsp[-2].minor.yy164, yymsp[0].minor.yy164); } +#line 6735 "sql.c" + yymsp[-5].minor.yy164 = yylhsminor.yy164; break; - case 506: /* join_type ::= */ -{ yymsp[1].minor.yy852 = JOIN_TYPE_INNER; } + case 510: /* join_type ::= */ +#line 993 "sql.y" +{ yymsp[1].minor.yy196 = JOIN_TYPE_INNER; } +#line 6741 "sql.c" break; - case 507: /* join_type ::= INNER */ -{ yymsp[0].minor.yy852 = JOIN_TYPE_INNER; } + case 511: /* join_type ::= INNER */ +#line 994 "sql.y" +{ yymsp[0].minor.yy196 = JOIN_TYPE_INNER; } +#line 6746 "sql.c" break; - case 508: /* 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 512: /* 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 */ +#line 1000 "sql.y" { - yymsp[-11].minor.yy872 = createSelectStmt(pCxt, yymsp[-10].minor.yy857, yymsp[-9].minor.yy664, yymsp[-8].minor.yy872); - yymsp[-11].minor.yy872 = addWhereClause(pCxt, yymsp[-11].minor.yy872, yymsp[-7].minor.yy872); - yymsp[-11].minor.yy872 = addPartitionByClause(pCxt, yymsp[-11].minor.yy872, yymsp[-6].minor.yy664); - yymsp[-11].minor.yy872 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy872, yymsp[-2].minor.yy872); - yymsp[-11].minor.yy872 = addGroupByClause(pCxt, yymsp[-11].minor.yy872, yymsp[-1].minor.yy664); - yymsp[-11].minor.yy872 = addHavingClause(pCxt, yymsp[-11].minor.yy872, yymsp[0].minor.yy872); - yymsp[-11].minor.yy872 = addRangeClause(pCxt, yymsp[-11].minor.yy872, yymsp[-5].minor.yy872); - yymsp[-11].minor.yy872 = addEveryClause(pCxt, yymsp[-11].minor.yy872, yymsp[-4].minor.yy872); - yymsp[-11].minor.yy872 = addFillClause(pCxt, yymsp[-11].minor.yy872, yymsp[-3].minor.yy872); + yymsp[-11].minor.yy164 = createSelectStmt(pCxt, yymsp[-10].minor.yy441, yymsp[-9].minor.yy72, yymsp[-8].minor.yy164); + yymsp[-11].minor.yy164 = addWhereClause(pCxt, yymsp[-11].minor.yy164, yymsp[-7].minor.yy164); + yymsp[-11].minor.yy164 = addPartitionByClause(pCxt, yymsp[-11].minor.yy164, yymsp[-6].minor.yy72); + yymsp[-11].minor.yy164 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy164, yymsp[-2].minor.yy164); + yymsp[-11].minor.yy164 = addGroupByClause(pCxt, yymsp[-11].minor.yy164, yymsp[-1].minor.yy72); + yymsp[-11].minor.yy164 = addHavingClause(pCxt, yymsp[-11].minor.yy164, yymsp[0].minor.yy164); + yymsp[-11].minor.yy164 = addRangeClause(pCxt, yymsp[-11].minor.yy164, yymsp[-5].minor.yy164); + yymsp[-11].minor.yy164 = addEveryClause(pCxt, yymsp[-11].minor.yy164, yymsp[-4].minor.yy164); + yymsp[-11].minor.yy164 = addFillClause(pCxt, yymsp[-11].minor.yy164, yymsp[-3].minor.yy164); } +#line 6761 "sql.c" break; - case 511: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy857 = false; } + case 515: /* set_quantifier_opt ::= ALL */ +#line 1016 "sql.y" +{ yymsp[0].minor.yy441 = false; } +#line 6766 "sql.c" break; - case 514: /* select_item ::= NK_STAR */ -{ yylhsminor.yy872 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy872 = yylhsminor.yy872; + case 518: /* select_item ::= NK_STAR */ +#line 1023 "sql.y" +{ yylhsminor.yy164 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } +#line 6771 "sql.c" + yymsp[0].minor.yy164 = yylhsminor.yy164; break; - case 516: /* select_item ::= common_expression column_alias */ - case 526: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==526); -{ yylhsminor.yy872 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy872), &yymsp[0].minor.yy929); } - yymsp[-1].minor.yy872 = yylhsminor.yy872; + case 520: /* select_item ::= common_expression column_alias */ + case 530: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==530); +#line 1025 "sql.y" +{ yylhsminor.yy164 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy164), &yymsp[0].minor.yy497); } +#line 6778 "sql.c" + yymsp[-1].minor.yy164 = yylhsminor.yy164; break; - case 517: /* select_item ::= common_expression AS column_alias */ - case 527: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==527); -{ yylhsminor.yy872 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), &yymsp[0].minor.yy929); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 521: /* select_item ::= common_expression AS column_alias */ + case 531: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==531); +#line 1026 "sql.y" +{ yylhsminor.yy164 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), &yymsp[0].minor.yy497); } +#line 6785 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 522: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 547: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==547); - case 566: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==566); -{ yymsp[-2].minor.yy664 = yymsp[0].minor.yy664; } + case 526: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 551: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==551); + case 570: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==570); +#line 1035 "sql.y" +{ yymsp[-2].minor.yy72 = yymsp[0].minor.yy72; } +#line 6793 "sql.c" break; - case 529: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy872 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), releaseRawExprNode(pCxt, yymsp[-1].minor.yy872)); } + case 533: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +#line 1048 "sql.y" +{ yymsp[-5].minor.yy164 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy164), releaseRawExprNode(pCxt, yymsp[-1].minor.yy164)); } +#line 6798 "sql.c" break; - case 530: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy872 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy872)); } + case 534: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +#line 1049 "sql.y" +{ yymsp[-3].minor.yy164 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy164)); } +#line 6803 "sql.c" break; - case 531: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy872 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), NULL, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } + case 535: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +#line 1051 "sql.y" +{ yymsp[-5].minor.yy164 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy164), NULL, yymsp[-1].minor.yy164, yymsp[0].minor.yy164); } +#line 6808 "sql.c" break; - case 532: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy872 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy872), releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } + case 536: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +#line 1054 "sql.y" +{ yymsp[-7].minor.yy164 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy164), releaseRawExprNode(pCxt, yymsp[-3].minor.yy164), yymsp[-1].minor.yy164, yymsp[0].minor.yy164); } +#line 6813 "sql.c" break; - case 533: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy872 = createEventWindowNode(pCxt, yymsp[-3].minor.yy872, yymsp[0].minor.yy872); } + case 537: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +#line 1056 "sql.y" +{ yymsp[-6].minor.yy164 = createEventWindowNode(pCxt, yymsp[-3].minor.yy164, yymsp[0].minor.yy164); } +#line 6818 "sql.c" break; - case 537: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy872 = createFillNode(pCxt, yymsp[-1].minor.yy294, NULL); } + case 541: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +#line 1062 "sql.y" +{ yymsp[-3].minor.yy164 = createFillNode(pCxt, yymsp[-1].minor.yy446, NULL); } +#line 6823 "sql.c" break; - case 538: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy872 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy664)); } + case 542: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ +#line 1063 "sql.y" +{ yymsp[-5].minor.yy164 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy72)); } +#line 6828 "sql.c" break; - case 539: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy872 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy664)); } + case 543: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ +#line 1064 "sql.y" +{ yymsp[-5].minor.yy164 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy72)); } +#line 6833 "sql.c" break; - case 540: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy294 = FILL_MODE_NONE; } + case 544: /* fill_mode ::= NONE */ +#line 1068 "sql.y" +{ yymsp[0].minor.yy446 = FILL_MODE_NONE; } +#line 6838 "sql.c" break; - case 541: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy294 = FILL_MODE_PREV; } + case 545: /* fill_mode ::= PREV */ +#line 1069 "sql.y" +{ yymsp[0].minor.yy446 = FILL_MODE_PREV; } +#line 6843 "sql.c" break; - case 542: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy294 = FILL_MODE_NULL; } + case 546: /* fill_mode ::= NULL */ +#line 1070 "sql.y" +{ yymsp[0].minor.yy446 = FILL_MODE_NULL; } +#line 6848 "sql.c" break; - case 543: /* fill_mode ::= NULL_F */ -{ yymsp[0].minor.yy294 = FILL_MODE_NULL_F; } + case 547: /* fill_mode ::= NULL_F */ +#line 1071 "sql.y" +{ yymsp[0].minor.yy446 = FILL_MODE_NULL_F; } +#line 6853 "sql.c" break; - case 544: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy294 = FILL_MODE_LINEAR; } + case 548: /* fill_mode ::= LINEAR */ +#line 1072 "sql.y" +{ yymsp[0].minor.yy446 = FILL_MODE_LINEAR; } +#line 6858 "sql.c" break; - case 545: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy294 = FILL_MODE_NEXT; } + case 549: /* fill_mode ::= NEXT */ +#line 1073 "sql.y" +{ yymsp[0].minor.yy446 = FILL_MODE_NEXT; } +#line 6863 "sql.c" break; - case 548: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy664 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[0].minor.yy664 = yylhsminor.yy664; + case 552: /* group_by_list ::= expr_or_subquery */ +#line 1082 "sql.y" +{ yylhsminor.yy72 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } +#line 6868 "sql.c" + yymsp[0].minor.yy72 = yylhsminor.yy72; break; - case 549: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy664 = addNodeToList(pCxt, yymsp[-2].minor.yy664, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-2].minor.yy664 = yylhsminor.yy664; + case 553: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +#line 1083 "sql.y" +{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-2].minor.yy72, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy164))); } +#line 6874 "sql.c" + yymsp[-2].minor.yy72 = yylhsminor.yy72; break; - case 553: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy872 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), releaseRawExprNode(pCxt, yymsp[-1].minor.yy872)); } + case 557: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +#line 1090 "sql.y" +{ yymsp[-5].minor.yy164 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy164), releaseRawExprNode(pCxt, yymsp[-1].minor.yy164)); } +#line 6880 "sql.c" break; - case 556: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 560: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ +#line 1097 "sql.y" { - yylhsminor.yy872 = addOrderByClause(pCxt, yymsp[-3].minor.yy872, yymsp[-2].minor.yy664); - yylhsminor.yy872 = addSlimitClause(pCxt, yylhsminor.yy872, yymsp[-1].minor.yy872); - yylhsminor.yy872 = addLimitClause(pCxt, yylhsminor.yy872, yymsp[0].minor.yy872); + yylhsminor.yy164 = addOrderByClause(pCxt, yymsp[-3].minor.yy164, yymsp[-2].minor.yy72); + yylhsminor.yy164 = addSlimitClause(pCxt, yylhsminor.yy164, yymsp[-1].minor.yy164); + yylhsminor.yy164 = addLimitClause(pCxt, yylhsminor.yy164, yymsp[0].minor.yy164); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; +#line 6889 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 559: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy872 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy872, yymsp[0].minor.yy872); } - yymsp[-3].minor.yy872 = yylhsminor.yy872; + case 563: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +#line 1107 "sql.y" +{ yylhsminor.yy164 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy164, yymsp[0].minor.yy164); } +#line 6895 "sql.c" + yymsp[-3].minor.yy164 = yylhsminor.yy164; break; - case 560: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy872 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy872, yymsp[0].minor.yy872); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 564: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +#line 1109 "sql.y" +{ yylhsminor.yy164 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy164, yymsp[0].minor.yy164); } +#line 6901 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 568: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 572: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==572); -{ yymsp[-1].minor.yy872 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 572: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 576: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==576); +#line 1123 "sql.y" +{ yymsp[-1].minor.yy164 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } +#line 6908 "sql.c" break; - case 569: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 573: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==573); -{ yymsp[-3].minor.yy872 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 573: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 577: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==577); +#line 1124 "sql.y" +{ yymsp[-3].minor.yy164 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } +#line 6914 "sql.c" break; - case 570: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 574: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==574); -{ yymsp[-3].minor.yy872 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 574: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 578: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==578); +#line 1125 "sql.y" +{ yymsp[-3].minor.yy164 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } +#line 6920 "sql.c" break; - case 575: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy872); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 579: /* subquery ::= NK_LP query_expression NK_RP */ +#line 1133 "sql.y" +{ yylhsminor.yy164 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy164); } +#line 6925 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 580: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy872 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), yymsp[-1].minor.yy578, yymsp[0].minor.yy457); } - yymsp[-2].minor.yy872 = yylhsminor.yy872; + case 584: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +#line 1147 "sql.y" +{ yylhsminor.yy164 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy164), yymsp[-1].minor.yy550, yymsp[0].minor.yy517); } +#line 6931 "sql.c" + yymsp[-2].minor.yy164 = yylhsminor.yy164; break; - case 581: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy578 = ORDER_ASC; } + case 585: /* ordering_specification_opt ::= */ +#line 1151 "sql.y" +{ yymsp[1].minor.yy550 = ORDER_ASC; } +#line 6937 "sql.c" break; - case 582: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy578 = ORDER_ASC; } + case 586: /* ordering_specification_opt ::= ASC */ +#line 1152 "sql.y" +{ yymsp[0].minor.yy550 = ORDER_ASC; } +#line 6942 "sql.c" break; - case 583: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy578 = ORDER_DESC; } + case 587: /* ordering_specification_opt ::= DESC */ +#line 1153 "sql.y" +{ yymsp[0].minor.yy550 = ORDER_DESC; } +#line 6947 "sql.c" break; - case 584: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy457 = NULL_ORDER_DEFAULT; } + case 588: /* null_ordering_opt ::= */ +#line 1157 "sql.y" +{ yymsp[1].minor.yy517 = NULL_ORDER_DEFAULT; } +#line 6952 "sql.c" break; - case 585: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy457 = NULL_ORDER_FIRST; } + case 589: /* null_ordering_opt ::= NULLS FIRST */ +#line 1158 "sql.y" +{ yymsp[-1].minor.yy517 = NULL_ORDER_FIRST; } +#line 6957 "sql.c" break; - case 586: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy457 = NULL_ORDER_LAST; } + case 590: /* null_ordering_opt ::= NULLS LAST */ +#line 1159 "sql.y" +{ yymsp[-1].minor.yy517 = NULL_ORDER_LAST; } +#line 6962 "sql.c" break; default: break; /********** End reduce actions ************************************************/ }; - assert( yyrulenoerrCode) { if(TOKEN.z) { @@ -5560,6 +7031,7 @@ static void yy_syntax_error( } else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z); } +#line 7035 "sql.c" /************ End %syntax_error code ******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE @@ -5785,11 +7257,10 @@ void Parse( */ int ParseFallback(int iToken){ #ifdef YYFALLBACK - if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){ - return yyFallback[iToken]; - } + assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ); + return yyFallback[iToken]; #else (void)iToken; -#endif return 0; +#endif } diff --git a/source/libs/parser/test/parAlterToBalanceTest.cpp b/source/libs/parser/test/parAlterToBalanceTest.cpp index db74e66d2b..d137029a14 100644 --- a/source/libs/parser/test/parAlterToBalanceTest.cpp +++ b/source/libs/parser/test/parAlterToBalanceTest.cpp @@ -875,4 +875,4 @@ TEST_F(ParserInitialATest, balanceVgroupLeader) { run("BALANCE VGROUP LEADER"); } -} // namespace ParserTest \ No newline at end of file +} // namespace ParserTest diff --git a/source/libs/parser/test/parExplainToSyncdbTest.cpp b/source/libs/parser/test/parExplainToSyncdbTest.cpp index 7f2cc05204..014374af7e 100644 --- a/source/libs/parser/test/parExplainToSyncdbTest.cpp +++ b/source/libs/parser/test/parExplainToSyncdbTest.cpp @@ -187,6 +187,63 @@ TEST_F(ParserExplainToSyncdbTest, redistributeVgroup) { run("REDISTRIBUTE VGROUP 5 DNODE 10 DNODE 20 DNODE 30"); } +TEST_F(ParserExplainToSyncdbTest, restoreDnode) { + useDb("root", "test"); + + SRestoreDnodeReq expect = {0}; + + auto clearRestoreDnodeReq = [&]() { memset(&expect, 0, sizeof(SRestoreDnodeReq)); }; + + auto setRestoreDnodeReq = [&](int32_t dnodeId, int8_t type) { + expect.dnodeId = dnodeId; + expect.restoreType = type; + }; + + setCheckDdlFunc([&](const SQuery* pQuery, ParserStage stage) { + int32_t expectNodeType = 0; + switch (expect.restoreType) { + case RESTORE_TYPE__ALL: + expectNodeType = QUERY_NODE_RESTORE_DNODE_STMT; + break; + case RESTORE_TYPE__MNODE: + expectNodeType = QUERY_NODE_RESTORE_MNODE_STMT; + break; + case RESTORE_TYPE__VNODE: + expectNodeType = QUERY_NODE_RESTORE_VNODE_STMT; + break; + case RESTORE_TYPE__QNODE: + expectNodeType = QUERY_NODE_RESTORE_QNODE_STMT; + break; + default: + break; + } + ASSERT_EQ(nodeType(pQuery->pRoot), expectNodeType); + ASSERT_EQ(pQuery->pCmdMsg->msgType, TDMT_MND_RESTORE_DNODE); + SRestoreDnodeReq req = {0}; + ASSERT_EQ(tDeserializeSRestoreDnodeReq(pQuery->pCmdMsg->pMsg, pQuery->pCmdMsg->msgLen, &req), TSDB_CODE_SUCCESS); + ASSERT_EQ(req.dnodeId, expect.dnodeId); + ASSERT_EQ(req.restoreType, expect.restoreType); + }); + + setRestoreDnodeReq(1, RESTORE_TYPE__ALL); + run("RESTORE DNODE 1"); + clearRestoreDnodeReq(); + + setRestoreDnodeReq(2, RESTORE_TYPE__MNODE); + run("RESTORE MNODE ON DNODE 2"); + clearRestoreDnodeReq(); + + setRestoreDnodeReq(1, RESTORE_TYPE__VNODE); + run("RESTORE VNODE ON DNODE 1"); + clearRestoreDnodeReq(); + + setRestoreDnodeReq(2, RESTORE_TYPE__QNODE); + run("RESTORE QNODE ON DNODE 2"); + clearRestoreDnodeReq(); +} + + + // todo reset query cache TEST_F(ParserExplainToSyncdbTest, revoke) { diff --git a/source/libs/tfs/src/tfs.c b/source/libs/tfs/src/tfs.c index 86b36b9b12..bedd14353f 100644 --- a/source/libs/tfs/src/tfs.c +++ b/source/libs/tfs/src/tfs.c @@ -283,6 +283,14 @@ int32_t tfsMkdir(STfs *pTfs, const char *rname) { return 0; } +bool tfsDirExistAt(STfs *pTfs, const char *rname, SDiskID diskId) { + STfsDisk *pDisk = TFS_DISK_AT(pTfs, diskId); + char aname[TMPNAME_LEN]; + + snprintf(aname, TMPNAME_LEN, "%s%s%s", pDisk->path, TD_DIRSEP, rname); + return taosDirExist(aname); +} + int32_t tfsRmdir(STfs *pTfs, const char *rname) { if (rname[0] == 0) { return 0; diff --git a/source/util/src/terror.c b/source/util/src/terror.c index ee20f0f524..58c7300bee 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -321,6 +321,9 @@ TAOS_DEFINE_ERROR(TSDB_CODE_QNODE_NOT_DEPLOYED, "Qnode not deployed") TAOS_DEFINE_ERROR(TSDB_CODE_SNODE_NOT_FOUND, "Snode not found") TAOS_DEFINE_ERROR(TSDB_CODE_SNODE_ALREADY_DEPLOYED, "Snode already deployed") TAOS_DEFINE_ERROR(TSDB_CODE_SNODE_NOT_DEPLOYED, "Snode not deployed") +TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_NOT_CATCH_UP, "Mnode didn't catch the leader") +TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_ALREADY_IS_VOTER, "Mnode already is a leader") +TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_ONLY_TWO_MNODE, "Only two mnodes exist") // vnode TAOS_DEFINE_ERROR(TSDB_CODE_VND_INVALID_VGROUP_ID, "Vnode is closed or removed") @@ -336,6 +339,9 @@ TAOS_DEFINE_ERROR(TSDB_CODE_VND_NO_AVAIL_BUFPOOL, "No availabe buffer po TAOS_DEFINE_ERROR(TSDB_CODE_VND_STOPPED, "Vnode stopped") TAOS_DEFINE_ERROR(TSDB_CODE_VND_DUP_REQUEST, "Duplicate write request") TAOS_DEFINE_ERROR(TSDB_CODE_VND_QUERY_BUSY, "Query busy") +TAOS_DEFINE_ERROR(TSDB_CODE_VND_NOT_CATCH_UP, "Vnode didn't catch up its leader") +TAOS_DEFINE_ERROR(TSDB_CODE_VND_ALREADY_IS_VOTER, "Vnode already is a voter") +TAOS_DEFINE_ERROR(TSDB_CODE_VND_DIR_ALREADY_EXIST, "Vnode directory already exist") // tsdb TAOS_DEFINE_ERROR(TSDB_CODE_TDB_INVALID_TABLE_ID, "Invalid table ID") @@ -399,9 +405,9 @@ TAOS_DEFINE_ERROR(TSDB_CODE_QRY_QWORKER_QUIT, "Vnode/Qnode is quitti // grant TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_EXPIRED, "License expired") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DNODE_LIMITED, "DNode creation limited by licence") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DNODE_LIMITED, "DNode creation limited by license") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_ACCT_LIMITED, "Account creation limited by license") -TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TIMESERIES_LIMITED, "Table creation limited by license") +TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TIMESERIES_LIMITED, "Time series limited by license") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DB_LIMITED, "DB creation limited by license") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_USER_LIMITED, "User creation limited by license") TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CONN_LIMITED, "Conn creation limited by license") @@ -595,23 +601,16 @@ TAOS_DEFINE_ERROR(TSDB_CODE_SML_INTERNAL_ERROR, "Internal error") //tsma TAOS_DEFINE_ERROR(TSDB_CODE_TSMA_INIT_FAILED, "Tsma init failed") TAOS_DEFINE_ERROR(TSDB_CODE_TSMA_ALREADY_EXIST, "Tsma already exists") -TAOS_DEFINE_ERROR(TSDB_CODE_TSMA_NO_INDEX_IN_META, "No tsma index in meta") TAOS_DEFINE_ERROR(TSDB_CODE_TSMA_INVALID_ENV, "Invalid tsma env") TAOS_DEFINE_ERROR(TSDB_CODE_TSMA_INVALID_STAT, "Invalid tsma state") TAOS_DEFINE_ERROR(TSDB_CODE_TSMA_INVALID_PTR, "Invalid tsma pointer") TAOS_DEFINE_ERROR(TSDB_CODE_TSMA_INVALID_PARA, "Invalid tsma parameters") -TAOS_DEFINE_ERROR(TSDB_CODE_TSMA_NO_INDEX_IN_CACHE, "No tsma index in cache") //rsma TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_INVALID_ENV, "Invalid rsma env") TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_INVALID_STAT, "Invalid rsma state") TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_QTASKINFO_CREATE, "Rsma qtaskinfo creation error") -TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_FS_COMMIT, "Rsma fs commit error") -TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_REMOVE_EXISTS, "Rsma remove exists") -TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_FETCH_MSG_MSSED_UP, "Rsma fetch msg is messed up") -TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_EMPTY_INFO, "Rsma info is empty") TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_INVALID_SCHEMA, "Rsma invalid schema") -TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_REGEX_MATCH, "Rsma regex match") TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_STREAM_STATE_OPEN, "Rsma stream state open") TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_STREAM_STATE_COMMIT, "Rsma stream state commit") TAOS_DEFINE_ERROR(TSDB_CODE_RSMA_FS_REF, "Rsma fs ref error") diff --git a/tests/ci/Dockerfile b/tests/ci/Dockerfile index 594bcc902d..213570dfb2 100644 --- a/tests/ci/Dockerfile +++ b/tests/ci/Dockerfile @@ -2,7 +2,7 @@ FROM python:3.8 RUN pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple RUN pip3 install pandas psutil fabric2 requests faker simplejson toml pexpect tzlocal distro RUN apt-get update -RUN apt-get install -y psmisc sudo tree libjansson-dev libsnappy-dev liblzma-dev libz-dev zlib1g pkg-config build-essential valgrind \ +RUN apt-get install -y psmisc sudo tree libgeos-dev libjansson-dev libsnappy-dev liblzma-dev libz-dev zlib1g pkg-config build-essential valgrind \ vim libjemalloc-dev openssh-server screen sshpass net-tools dirmngr gnupg apt-transport-https ca-certificates software-properties-common r-base iputils-ping RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 RUN add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/' @@ -45,4 +45,4 @@ RUN pip3 uninstall -y taostest COPY repository/TDinternal /home/TDinternal COPY repository/taos-connector-python /home/taos-connector-python RUN sh -c "cd /home/taos-connector-python; pip3 install ." -COPY setup.sh /home/setup.sh \ No newline at end of file +COPY setup.sh /home/setup.sh diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 3ec1b03657..3e656c0302 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -57,9 +57,9 @@ ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim ,,y,script,./test.sh -f tsim/dnode/vnode_clean.sim -,,y,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim -,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim -,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica3.sim +,,y,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim +,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim +,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica3.sim ,,y,script,./test.sh -f tsim/import/basic.sim ,,y,script,./test.sh -f tsim/import/commit.sim ,,y,script,./test.sh -f tsim/import/large.sim @@ -332,9 +332,9 @@ ,,y,script,./test.sh -f tsim/catalog/alterInCurrent.sim ,,y,script,./test.sh -f tsim/scalar/in.sim ,,y,script,./test.sh -f tsim/scalar/scalar.sim -,,y,script,./test.sh -f tsim/scalar/filter.sim -,,y,script,./test.sh -f tsim/scalar/caseWhen.sim -,,y,script,./test.sh -f tsim/scalar/tsConvert.sim +,,y,script,./test.sh -f tsim/scalar/filter.sim +,,y,script,./test.sh -f tsim/scalar/caseWhen.sim +,,y,script,./test.sh -f tsim/scalar/tsConvert.sim ,,y,script,./test.sh -f tsim/alter/cached_schema_after_alter.sim ,,y,script,./test.sh -f tsim/alter/dnode.sim ,,y,script,./test.sh -f tsim/alter/table.sim @@ -811,7 +811,8 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertData.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertData.py -N 6 -M 3 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py -N 6 -M 3 -#,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py -N 6 -M 3 -n 3 +#,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py -N 6 -M 3 -n 3 +,,n,system-test,python3 ./test.py -f 6-cluster/manually-test/6dnode3mnodeInsertLessDataAlterRep3to1to3.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeAdd1Ddnoe.py -N 7 -M 3 -C 6 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeAdd1Ddnoe.py -N 7 -M 3 -C 6 -n 3 diff --git a/tests/script/sh/checkAsan.sh b/tests/script/sh/checkAsan.sh index b6cb4f6280..0077ca4e0e 100755 --- a/tests/script/sh/checkAsan.sh +++ b/tests/script/sh/checkAsan.sh @@ -55,7 +55,9 @@ python_error=`cat ${LOG_DIR}/*.info | grep -w "stack" | wc -l` # /home/chr/TDengine/source/libs/scalar/src/filter.c:3149:14: runtime error: applying non-zero offset 18446744073709551615 to null pointer # /home/TDinternal/community/source/libs/scalar/src/sclvector.c:1109:66: runtime error: signed integer overflow: 9223372034707292160 + 1676867897049 cannot be represented in type 'long int' -runtime_error=`cat ${LOG_DIR}/*.asan | grep "runtime error" | grep -v "trees.c:873" | grep -v "sclfunc.c.*outside the range of representable values of type"| grep -v "signed integer overflow" |grep -v "strerror.c"| grep -v "asan_malloc_linux.cc" |wc -l` +#0 0x7f2d64f5a808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144 +#1 0x7f2d63fcf459 in strerror /build/glibc-SzIz7B/glibc-2.31/string/strerror.c:38 +runtime_error=`cat ${LOG_DIR}/*.asan | grep "runtime error" | grep -v "trees.c:873" | grep -v "sclfunc.c.*outside the range of representable values of type"| grep -v "signed integer overflow" |grep -v "strerror.c"| grep -v "asan_malloc_linux.cc" |grep -v "strerror.c"|wc -l` echo -e "\033[44;32;1m"asan error_num: $error_num"\033[0m" echo -e "\033[44;32;1m"asan memory_leak: $memory_leak"\033[0m" diff --git a/tests/system-test/2-query/interp.py b/tests/system-test/2-query/interp.py index ddf3f2534d..cdbfa0de84 100644 --- a/tests/system-test/2-query/interp.py +++ b/tests/system-test/2-query/interp.py @@ -23,6 +23,8 @@ class TDTestCase: stbname = "stb" ctbname1 = "ctb1" ctbname2 = "ctb2" + ctbname3 = "ctb3" + num_of_ctables = 3 tdSql.prepare() @@ -816,17 +818,26 @@ class TDTestCase: ) tdSql.execute( - f'''create table if not exists {dbname}.{ctbname2} using {dbname}.{stbname} tags(1) + f'''create table if not exists {dbname}.{ctbname2} using {dbname}.{stbname} tags(2) ''' ) - tdSql.execute(f"insert into {dbname}.{ctbname1} values ('2020-02-01 00:00:05', 5, 5, 5, 5, 5.0, 5.0, true, 'varchar', 'nchar')") - tdSql.execute(f"insert into {dbname}.{ctbname1} values ('2020-02-01 00:00:10', 10, 10, 10, 10, 10.0, 10.0, true, 'varchar', 'nchar')") - tdSql.execute(f"insert into {dbname}.{ctbname1} values ('2020-02-01 00:00:15', 15, 15, 15, 15, 15.0, 15.0, true, 'varchar', 'nchar')") + tdSql.execute( + f'''create table if not exists {dbname}.{ctbname3} using {dbname}.{stbname} tags(3) + ''' + ) - tdSql.execute(f"insert into {dbname}.{ctbname2} values ('2020-02-02 00:00:05', 5, 5, 5, 5, 5.0, 5.0, true, 'varchar', 'nchar')") - tdSql.execute(f"insert into {dbname}.{ctbname2} values ('2020-02-02 00:00:10', 10, 10, 10, 10, 10.0, 10.0, true, 'varchar', 'nchar')") - tdSql.execute(f"insert into {dbname}.{ctbname2} values ('2020-02-02 00:00:15', 15, 15, 15, 15, 15.0, 15.0, true, 'varchar', 'nchar')") + tdSql.execute(f"insert into {dbname}.{ctbname1} values ('2020-02-01 00:00:01', 1, 1, 1, 1, 1.0, 1.0, true, 'varchar', 'nchar')") + tdSql.execute(f"insert into {dbname}.{ctbname1} values ('2020-02-01 00:00:07', 7, 7, 7, 7, 7.0, 7.0, true, 'varchar', 'nchar')") + tdSql.execute(f"insert into {dbname}.{ctbname1} values ('2020-02-01 00:00:13', 13, 13, 13, 13, 13.0, 13.0, true, 'varchar', 'nchar')") + + tdSql.execute(f"insert into {dbname}.{ctbname2} values ('2020-02-01 00:00:03', 3, 3, 3, 3, 3.0, 3.0, true, 'varchar', 'nchar')") + tdSql.execute(f"insert into {dbname}.{ctbname2} values ('2020-02-01 00:00:09', 9, 9, 9, 9, 9.0, 9.0, true, 'varchar', 'nchar')") + tdSql.execute(f"insert into {dbname}.{ctbname2} values ('2020-02-01 00:00:15', 15, 15, 15, 15, 15.0, 15.0, true, 'varchar', 'nchar')") + + tdSql.execute(f"insert into {dbname}.{ctbname3} values ('2020-02-01 00:00:05', 5, 5, 5, 5, 5.0, 5.0, true, 'varchar', 'nchar')") + tdSql.execute(f"insert into {dbname}.{ctbname3} values ('2020-02-01 00:00:11', 11, 11, 11, 11, 11.0, 11.0, true, 'varchar', 'nchar')") + tdSql.execute(f"insert into {dbname}.{ctbname3} values ('2020-02-01 00:00:17', 17, 17, 17, 17, 17.0, 17.0, true, 'varchar', 'nchar')") tdSql.execute(f"flush database {dbname}"); @@ -834,7 +845,7 @@ class TDTestCase: # test fill null ## | {. | | .} | - tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-11 00:00:05') every(1d) fill(null)") + tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-11 00:00:06') every(1d) fill(null)") tdSql.checkRows(11) tdSql.checkData(0, 0, 5) tdSql.checkData(1, 0, None) @@ -881,7 +892,7 @@ class TDTestCase: # test fill value ## | {. | | .} | - tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-11 00:00:05') every(1d) fill(value, 1)") + tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-11 00:00:06') every(1d) fill(value, 1)") tdSql.checkRows(11) tdSql.checkData(0, 0, 5) tdSql.checkData(1, 0, 1) @@ -895,7 +906,7 @@ class TDTestCase: tdSql.checkData(9, 0, 1) tdSql.checkData(10, 0, 15) - ## | . | {} | . | + # | . | {} | . | tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-03 00:00:05', '2020-02-07 00:00:05') every(1d) fill(value, 1)") tdSql.checkRows(5) tdSql.checkData(0, 0, 1) @@ -928,7 +939,7 @@ class TDTestCase: # test fill prev ## | {. | | .} | - tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-11 00:00:05') every(1d) fill(prev)") + tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-11 00:00:06') every(1d) fill(prev)") tdSql.checkRows(11) tdSql.checkData(0, 0, 5) tdSql.checkData(1, 0, 5) @@ -973,7 +984,7 @@ class TDTestCase: # test fill next ## | {. | | .} | - tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-11 00:00:05') every(1d) fill(next)") + tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-11 00:00:06') every(1d) fill(next)") tdSql.checkRows(11) tdSql.checkData(0, 0, 5) tdSql.checkData(1, 0, 15) @@ -1015,7 +1026,7 @@ class TDTestCase: # test fill linear ## | {. | | .} | - tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-11 00:00:05') every(1d) fill(linear)") + tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-11 00:00:06') every(1d) fill(linear)") tdSql.checkRows(11) tdSql.checkData(0, 0, 5) tdSql.checkData(1, 0, 6) @@ -2391,19 +2402,516 @@ class TDTestCase: - tdLog.printNoPrefix("==========step13:stable cases") + tdLog.printNoPrefix("==========step13:test stable cases") - tdSql.error(f"select interp(c0) from {dbname}.{stbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(null)") - #tdSql.checkRows(13) + # select interp from supertable + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(null)") + tdSql.checkRows(19) - #tdSql.query(f"select interp(c0) from {dbname}.{ctbname1} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(null)") - #tdSql.checkRows(13) + tdSql.checkData(0, 2, None) + tdSql.checkData(1, 2, 1) + tdSql.checkData(2, 2, None) + tdSql.checkData(3, 2, 3) + tdSql.checkData(4, 2, None) + tdSql.checkData(5, 2, 5) + tdSql.checkData(6, 2, None) + tdSql.checkData(7, 2, 7) + tdSql.checkData(8, 2, None) + tdSql.checkData(9, 2, 9) + tdSql.checkData(10, 2, None) + tdSql.checkData(11, 2, 11) + tdSql.checkData(12, 2, None) + tdSql.checkData(13, 2, 13) + tdSql.checkData(14, 2, None) + tdSql.checkData(15, 2, 15) + tdSql.checkData(16, 2, None) + tdSql.checkData(17, 2, 17) + tdSql.checkData(18, 2, None) - tdSql.error(f"select interp(c0) from {dbname}.{stbname} partition by tbname range('2020-02-01 00:00:04', '2020-02-02 00:00:16') every(1s) fill(null)") - #tdSql.checkRows(13) + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(value, 0)") + tdSql.checkRows(19) + + tdSql.checkData(0, 2, 0) + tdSql.checkData(1, 2, 1) + tdSql.checkData(2, 2, 0) + tdSql.checkData(3, 2, 3) + tdSql.checkData(4, 2, 0) + tdSql.checkData(5, 2, 5) + tdSql.checkData(6, 2, 0) + tdSql.checkData(7, 2, 7) + tdSql.checkData(8, 2, 0) + tdSql.checkData(9, 2, 9) + tdSql.checkData(10, 2, 0) + tdSql.checkData(11, 2, 11) + tdSql.checkData(12, 2, 0) + tdSql.checkData(13, 2, 13) + tdSql.checkData(14, 2, 0) + tdSql.checkData(15, 2, 15) + tdSql.checkData(16, 2, 0) + tdSql.checkData(17, 2, 17) + tdSql.checkData(18, 2, 0) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(prev)") + tdSql.checkRows(18) + + tdSql.checkData(0, 0, '2020-02-01 00:00:01.000') + tdSql.checkData(0, 1, False) + + tdSql.checkData(0, 2, 1) + tdSql.checkData(1, 2, 1) + tdSql.checkData(2, 2, 3) + tdSql.checkData(3, 2, 3) + tdSql.checkData(4, 2, 5) + tdSql.checkData(5, 2, 5) + tdSql.checkData(6, 2, 7) + tdSql.checkData(7, 2, 7) + tdSql.checkData(8, 2, 9) + tdSql.checkData(9, 2, 9) + tdSql.checkData(10, 2, 11) + tdSql.checkData(11, 2, 11) + tdSql.checkData(12, 2, 13) + tdSql.checkData(13, 2, 13) + tdSql.checkData(14, 2, 15) + tdSql.checkData(15, 2, 15) + tdSql.checkData(16, 2, 17) + tdSql.checkData(17, 2, 17) + + tdSql.checkData(17, 0, '2020-02-01 00:00:18.000') + tdSql.checkData(17, 1, True) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(next)") + tdSql.checkRows(18) + + tdSql.checkData(0, 0, '2020-02-01 00:00:00.000') + tdSql.checkData(0, 1, True) + + tdSql.checkData(0, 2, 1) + tdSql.checkData(1, 2, 1) + tdSql.checkData(2, 2, 3) + tdSql.checkData(3, 2, 3) + tdSql.checkData(4, 2, 5) + tdSql.checkData(5, 2, 5) + tdSql.checkData(6, 2, 7) + tdSql.checkData(7, 2, 7) + tdSql.checkData(8, 2, 9) + tdSql.checkData(9, 2, 9) + tdSql.checkData(10, 2, 11) + tdSql.checkData(11, 2, 11) + tdSql.checkData(12, 2, 13) + tdSql.checkData(13, 2, 13) + tdSql.checkData(14, 2, 15) + tdSql.checkData(15, 2, 15) + tdSql.checkData(16, 2, 17) + tdSql.checkData(17, 2, 17) + + tdSql.checkData(17, 0, '2020-02-01 00:00:17.000') + tdSql.checkData(17, 1, False) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(17) + + tdSql.checkData(0, 2, 1) + tdSql.checkData(1, 2, 2) + tdSql.checkData(2, 2, 3) + tdSql.checkData(3, 2, 4) + tdSql.checkData(4, 2, 5) + tdSql.checkData(5, 2, 6) + tdSql.checkData(6, 2, 7) + tdSql.checkData(7, 2, 8) + tdSql.checkData(8, 2, 9) + tdSql.checkData(9, 2, 10) + tdSql.checkData(10, 2, 11) + tdSql.checkData(11, 2, 12) + tdSql.checkData(12, 2, 13) + tdSql.checkData(13, 2, 14) + tdSql.checkData(14, 2, 15) + tdSql.checkData(15, 2, 16) + tdSql.checkData(16, 2, 17) + + # select interp from supertable partition by tbname + + tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(null)") + + point_idx = {1, 7, 13, 22, 28, 34, 43, 49, 55} + point_dict = {1:1, 7:7, 13:13, 22:3, 28:9, 34:15, 43:5, 49:11, 55:17} + rows_per_partition = 19 + tdSql.checkRows(rows_per_partition * num_of_ctables) + for i in range(num_of_ctables): + for j in range(rows_per_partition): + row = j + i * rows_per_partition + tdSql.checkData(row, 0, f'ctb{i + 1}') + tdSql.checkData(j, 1, f'2020-02-01 00:00:{j}.000') + if row in point_idx: + tdSql.checkData(row, 2, False) + else: + tdSql.checkData(row, 2, True) + + if row in point_idx: + tdSql.checkData(row, 3, point_dict[row]) + else: + tdSql.checkData(row, 3, None) + + tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(value, 0)") + + point_idx = {1, 7, 13, 22, 28, 34, 43, 49, 55} + point_dict = {1:1, 7:7, 13:13, 22:3, 28:9, 34:15, 43:5, 49:11, 55:17} + rows_per_partition = 19 + tdSql.checkRows(rows_per_partition * num_of_ctables) + for i in range(num_of_ctables): + for j in range(rows_per_partition): + row = j + i * rows_per_partition + tdSql.checkData(row, 0, f'ctb{i + 1}') + tdSql.checkData(j, 1, f'2020-02-01 00:00:{j}.000') + if row in point_idx: + tdSql.checkData(row, 2, False) + else: + tdSql.checkData(row, 2, True) + + if row in point_idx: + tdSql.checkData(row, 3, point_dict[row]) + else: + tdSql.checkData(row, 3, 0) + + tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(prev)") + + tdSql.checkRows(48) + for i in range(0, 18): + tdSql.checkData(i, 0, 'ctb1') + + for i in range(18, 34): + tdSql.checkData(i, 0, 'ctb2') + + for i in range(34, 48): + tdSql.checkData(i, 0, 'ctb3') + + tdSql.checkData(0, 1, '2020-02-01 00:00:01.000') + tdSql.checkData(17, 1, '2020-02-01 00:00:18.000') + + tdSql.checkData(18, 1, '2020-02-01 00:00:03.000') + tdSql.checkData(33, 1, '2020-02-01 00:00:18.000') + + tdSql.checkData(34, 1, '2020-02-01 00:00:05.000') + tdSql.checkData(47, 1, '2020-02-01 00:00:18.000') + + for i in range(0, 6): + tdSql.checkData(i, 3, 1) + + for i in range(6, 12): + tdSql.checkData(i, 3, 7) + + for i in range(12, 18): + tdSql.checkData(i, 3, 13) + + for i in range(18, 24): + tdSql.checkData(i, 3, 3) + + for i in range(24, 30): + tdSql.checkData(i, 3, 9) + + for i in range(30, 34): + tdSql.checkData(i, 3, 15) + + for i in range(34, 40): + tdSql.checkData(i, 3, 5) + + for i in range(40, 46): + tdSql.checkData(i, 3, 11) + + for i in range(46, 48): + tdSql.checkData(i, 3, 17) + + tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(next)") + + tdSql.checkRows(48) + for i in range(0, 14): + tdSql.checkData(i, 0, 'ctb1') + + for i in range(14, 30): + tdSql.checkData(i, 0, 'ctb2') + + for i in range(30, 48): + tdSql.checkData(i, 0, 'ctb3') + + tdSql.checkData(0, 1, '2020-02-01 00:00:00.000') + tdSql.checkData(13, 1, '2020-02-01 00:00:13.000') + + tdSql.checkData(14, 1, '2020-02-01 00:00:00.000') + tdSql.checkData(29, 1, '2020-02-01 00:00:15.000') + + tdSql.checkData(30, 1, '2020-02-01 00:00:00.000') + tdSql.checkData(47, 1, '2020-02-01 00:00:17.000') + + for i in range(0, 2): + tdSql.checkData(i, 3, 1) + + for i in range(2, 8): + tdSql.checkData(i, 3, 7) + + for i in range(8, 14): + tdSql.checkData(i, 3, 13) + + for i in range(14, 18): + tdSql.checkData(i, 3, 3) + + for i in range(18, 24): + tdSql.checkData(i, 3, 9) + + for i in range(24, 30): + tdSql.checkData(i, 3, 15) + + for i in range(30, 36): + tdSql.checkData(i, 3, 5) + + for i in range(36, 42): + tdSql.checkData(i, 3, 11) + + for i in range(42, 48): + tdSql.checkData(i, 3, 17) + + tdSql.query(f"select tbname, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + + tdSql.checkRows(39) + for i in range(0, 13): + tdSql.checkData(i, 0, 'ctb1') + + for i in range(13, 26): + tdSql.checkData(i, 0, 'ctb2') + + for i in range(26, 39): + tdSql.checkData(i, 0, 'ctb3') + + tdSql.checkData(0, 1, '2020-02-01 00:00:01.000') + tdSql.checkData(12, 1, '2020-02-01 00:00:13.000') + + tdSql.checkData(13, 1, '2020-02-01 00:00:03.000') + tdSql.checkData(25, 1, '2020-02-01 00:00:15.000') + + tdSql.checkData(26, 1, '2020-02-01 00:00:05.000') + tdSql.checkData(38, 1, '2020-02-01 00:00:17.000') + + for i in range(0, 13): + tdSql.checkData(i, 3, i + 1) + + for i in range(13, 26): + tdSql.checkData(i, 3, i - 10) + + for i in range(26, 39): + tdSql.checkData(i, 3, i - 21) + + # select interp from supertable partition by column + + tdSql.query(f"select c0, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by c0 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(null)") + tdSql.checkRows(171) + + tdSql.query(f"select c0, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by c0 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(value, 0)") + tdSql.checkRows(171) + + tdSql.query(f"select c0, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by c0 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(prev)") + tdSql.checkRows(90) + + tdSql.query(f"select c0, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by c0 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(next)") + tdSql.checkRows(90) + + tdSql.query(f"select c0, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by c0 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(9) + + # select interp from supertable partition by tag + + tdSql.query(f"select t1, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by t1 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(null)") + tdSql.checkRows(57) + + tdSql.query(f"select t1, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by t1 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(value, 0)") + tdSql.checkRows(57) + + tdSql.query(f"select t1, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by t1 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(prev)") + tdSql.checkRows(48) + + tdSql.query(f"select t1, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by t1 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(next)") + tdSql.checkRows(48) + + tdSql.query(f"select t1, _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by t1 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(39) + + # select interp from supertable filter + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where ts between '2020-02-01 00:00:01.000' and '2020-02-01 00:00:13.000' range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(13) + + for i in range(13): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where c0 <= 13 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(13) + + for i in range(13): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where t1 = 1 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(13) + + for i in range(13): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where tbname = 'ctb1' range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(13) + + for i in range(13): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where ts between '2020-02-01 00:00:01.000' and '2020-02-01 00:00:13.000' partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(27) + + for i in range(13): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where c0 <= 13 partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(27) + + for i in range(13): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where t1 = 1 partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(13) + + for i in range(13): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where tbname = 'ctb1' partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(13) + + for i in range(13): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + # select interp from supertable filter limit + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 13") + tdSql.checkRows(13) + + for i in range(13): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 20") + tdSql.checkRows(17) + + for i in range(17): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where ts between '2020-02-01 00:00:01.000' and '2020-02-01 00:00:13.000' range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 10") + tdSql.checkRows(10) + + for i in range(10): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where c0 <= 13 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 10") + tdSql.checkRows(10) + + for i in range(10): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where t1 = 1 range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 10") + tdSql.checkRows(10) + + for i in range(10): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where tbname = 'ctb1' range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 10") + tdSql.checkRows(10) + + for i in range(10): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 13") + tdSql.checkRows(13) + + for i in range(13): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 40") + tdSql.checkRows(39) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where ts between '2020-02-01 00:00:01.000' and '2020-02-01 00:00:13.000' partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 10") + tdSql.checkRows(10) + + for i in range(10): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where c0 <= 13 partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 10") + tdSql.checkRows(10) + + for i in range(10): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where t1 = 1 partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 10") + tdSql.checkRows(10) + + for i in range(10): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} where tbname = 'ctb1' partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear) limit 10") + tdSql.checkRows(10) + + for i in range(10): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 1) + + # select interp from supertable with scalar expression + + tdSql.query(f"select _irowts, _isfilled, interp(1 + 1) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(17) + + for i in range(17): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, 2.0) + + tdSql.query(f"select _irowts, _isfilled, interp(c0 + 1) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(17) + + for i in range(17): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, i + 2) + + tdSql.query(f"select _irowts, _isfilled, interp(c0 * 2) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(17) + + for i in range(17): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, (i + 1) * 2) + + tdSql.query(f"select _irowts, _isfilled, interp(c0 + c1) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(linear)") + tdSql.checkRows(17) + + for i in range(17): + tdSql.checkData(i, 0, f'2020-02-01 00:00:{i + 1}.000') + tdSql.checkData(i, 2, (i + 1) * 2) + + # check duplicate timestamp + + # add duplicate timestamp for different child tables + tdSql.execute(f"insert into {dbname}.{ctbname1} values ('2020-02-01 00:00:15', 15, 15, 15, 15, 15.0, 15.0, true, 'varchar', 'nchar')") + + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:14') every(1s) fill(null)") + tdSql.error(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:15') every(1s) fill(null)") + tdSql.error(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(null)") + tdSql.query(f"select _irowts, _isfilled, interp(c0) from {dbname}.{stbname} partition by tbname range('2020-02-01 00:00:00', '2020-02-01 00:00:18') every(1s) fill(null)") - #tdSql.query(f"select _irowts,interp(c0) from {dbname}.{stbname} partition by tbname range('2020-02-01 00:00:04', '2020-02-02 00:00:16') every(1h) fill(prev)") - #tdSql.query(f"select tbname,_irowts,interp(c0) from {dbname}.{stbname} partition by tbname range('2020-02-01 00:00:04', '2020-02-02 00:00:16') every(1h) fill(prev)") tdLog.printNoPrefix("======step 14: test interp pseudo columns") tdSql.error(f"select _irowts, c6 from {dbname}.{tbname}") diff --git a/tests/system-test/2-query/odbc.py b/tests/system-test/2-query/odbc.py index a05e057042..f7851ad04b 100644 --- a/tests/system-test/2-query/odbc.py +++ b/tests/system-test/2-query/odbc.py @@ -22,7 +22,8 @@ class TDTestCase: tdSql.execute("insert into db.ctb using db.stb tags(1) (ts, c1) values (now, 1)") tdSql.query("select count(*) from information_schema.ins_columns") - tdSql.checkData(0, 0, 277) + # enterprise version: 285, community version: 277 + tdSql.checkData(0, 0, 285) tdSql.query("select * from information_schema.ins_columns where table_name = 'ntb'") tdSql.checkRows(14) diff --git a/tests/system-test/6-cluster/clusterCommonCheck.py b/tests/system-test/6-cluster/clusterCommonCheck.py index f5926321da..7aa2ba06b9 100644 --- a/tests/system-test/6-cluster/clusterCommonCheck.py +++ b/tests/system-test/6-cluster/clusterCommonCheck.py @@ -251,17 +251,17 @@ class ClusterComCheck: count+=1 elif self.db_replica == 3 : vgroup_status_first=[tdSql.queryResult[0][4],tdSql.queryResult[0][6],tdSql.queryResult[0][8]] - + vgroup_status_last=[tdSql.queryResult[last_number][4],tdSql.queryResult[last_number][6],tdSql.queryResult[last_number][8]] if vgroup_status_first.count('leader') == 1 and vgroup_status_first.count('follower') == 2: if vgroup_status_last.count('leader') == 1 and vgroup_status_last.count('follower') == 2: ready_time= (count + 1) - tdLog.success(f"all vgroups of {db_name} are ready in {ready_time} s") + tdLog.success(f"elections of {db_name} all vgroups are ready in {ready_time} s") return True count+=1 else: tdLog.debug(tdSql.queryResult) - tdLog.notice(f"all vgroups leader of {db_name} is selected {count}s ") + tdLog.notice(f"elections of {db_name} all vgroups are failed in{count}s ") caller = inspect.getframeinfo(inspect.stack()[1][0]) args = (caller.filename, caller.lineno) tdLog.exit("%s(%d) failed " % args) diff --git a/tests/system-test/6-cluster/manually-test/6dnode3mnodeInsertDataRebootAlterRep1-3.py b/tests/system-test/6-cluster/manually-test/6dnode3mnodeInsertDataRebootAlterRep1-3.py new file mode 100644 index 0000000000..aa3ed8e3fd --- /dev/null +++ b/tests/system-test/6-cluster/manually-test/6dnode3mnodeInsertDataRebootAlterRep1-3.py @@ -0,0 +1,222 @@ +import taos +import sys +import time +import os + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import TDDnodes +from util.dnodes import TDDnode +from util.cluster import * +sys.path.append("./6-cluster") +from clusterCommonCreate import * +from clusterCommonCheck import clusterComCheck + +import time +import socket +import subprocess +from multiprocessing import Process +import threading +import time +import inspect +import ctypes + +class TDTestCase: + + def init(self, conn, logSql, replicaVar=1): + tdLog.debug(f"start to excute {__file__}") + self.TDDnodes = None + tdSql.init(conn.cursor()) + self.host = socket.gethostname() + + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root) - len("/build/bin")] + break + return buildPath + + def _async_raise(self, tid, exctype): + """raises the exception, performs cleanup if needed""" + if not inspect.isclass(exctype): + exctype = type(exctype) + res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) + if res == 0: + raise ValueError("invalid thread id") + elif res != 1: + # """if it returns a number greater than one, you're in trouble, + # and you should call it again with exc=NULL to revert the effect""" + ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None) + raise SystemError("PyThreadState_SetAsyncExc failed") + + def stopThread(self,thread): + self._async_raise(thread.ident, SystemExit) + + + def insertData(self,countstart,countstop): + # fisrt add data : db\stable\childtable\general table + + for couti in range(countstart,countstop): + tdLog.debug("drop database if exists db%d" %couti) + tdSql.execute("drop database if exists db%d" %couti) + print("create database if not exists db%d replica 1 duration 300" %couti) + tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) + tdSql.execute("use db%d" %couti) + tdSql.execute( + '''create table stb1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + tags (t1 int) + ''' + ) + tdSql.execute( + ''' + create table t1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + ''' + ) + for i in range(4): + tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') + + + def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): + tdLog.printNoPrefix("======== test case 1: ") + paraDict = {'dbName': 'db0_0', + 'dropFlag': 1, + 'event': '', + 'vgroups': 4, + 'replica': 1, + 'stbName': 'stb', + 'stbNumbers': 2, + 'colPrefix': 'c', + 'tagPrefix': 't', + 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'ctbPrefix': 'ctb', + 'ctbNum': 1000, + 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 + "rowsPerTbl": 100, + "batchNum": 5000 + } + + dnodeNumbers = int(dnodeNumbers) + mnodeNums = int(mnodeNums) + vnodeNumbers = int(dnodeNumbers-mnodeNums) + allctbNumbers = (paraDict['stbNumbers']*paraDict["ctbNum"]) + rowsPerStb = paraDict["ctbNum"]*paraDict["rowsPerTbl"] + rowsall = rowsPerStb*paraDict['stbNumbers'] + dbNumbers = 1 + replica3 = 3 + tdLog.info("first check dnode and mnode") + tdSql.query("select * from information_schema.ins_dnodes;") + tdSql.checkData(0,1,'%s:6030'%self.host) + tdSql.checkData(4,1,'%s:6430'%self.host) + clusterComCheck.checkDnodes(dnodeNumbers) + + #check mnode status + tdLog.info("check mnode status") + clusterComCheck.checkMnodeStatus(mnodeNums) + + # add some error operations and + tdLog.info("Confirm the status of the dnode again") + tdSql.error("create mnode on dnode 2") + tdSql.query("select * from information_schema.ins_dnodes;") + print(tdSql.queryResult) + clusterComCheck.checkDnodes(dnodeNumbers) + + # create database and stable + clusterComCreate.create_database(tdSql, paraDict["dbName"],paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']) + tdLog.info("Take turns stopping Mnodes ") + + tdDnodes=cluster.dnodes + stopcount =0 + threads=[] + + # create stable:stb_0 + stableName= paraDict['stbName'] + newTdSql=tdCom.newTdSql() + clusterComCreate.create_stables(newTdSql, paraDict["dbName"],stableName,paraDict['stbNumbers']) + #create child table:ctb_0 + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + clusterComCreate.create_ctable(newTdSql, paraDict["dbName"],stableName,stableName, paraDict['ctbNum']) + #insert date + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"]))) + for tr in threads: + tr.start() + TdSqlEx=tdCom.newTdSql() + tdLog.info("alter database db0_0 replica 3") + TdSqlEx.execute('alter database db0_0 replica 3') + while stopcount < restartNumbers: + tdLog.info(" restart loop: %d"%stopcount ) + if stopRole == "mnode": + for i in range(mnodeNums): + tdDnodes[i].stoptaosd() + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + elif stopRole == "vnode": + for i in range(vnodeNumbers): + tdDnodes[i+mnodeNums].stoptaosd() + # sleep(10) + tdDnodes[i+mnodeNums].starttaosd() + # sleep(10) + elif stopRole == "dnode": + for i in range(dnodeNumbers): + tdDnodes[i].stoptaosd() + # tdLog.info('select cast(c2 as nchar(10)) from db0_0.stb_1;') + # TdSqlEx.execute('select cast(c2 as nchar(10)) from db0_0.stb_1;') + # tdLog.info('select avg(c1) from db0_0.stb_0 interval(10s);') + # TdSqlEx.execute('select avg(c1) from db0_0.stb_0 interval(10s);') + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + # dnodeNumbers don't include database of schema + if clusterComCheck.checkDnodes(dnodeNumbers): + tdLog.info("123") + else: + print("456") + + self.stopThread(threads) + tdLog.exit("one or more of dnodes failed to start ") + # self.check3mnode() + stopcount+=1 + + for tr in threads: + tr.join() + clusterComCheck.checkDnodes(dnodeNumbers) + clusterComCheck.checkDbRows(dbNumbers) + # clusterComCheck.checkDb(dbNumbers,1,paraDict["dbName"]) + + # tdSql.execute("use %s" %(paraDict["dbName"])) + tdSql.query("show %s.stables"%(paraDict["dbName"])) + tdSql.checkRows(paraDict["stbNumbers"]) + # for i in range(paraDict['stbNumbers']): + # stableName= '%s.%s_%d'%(paraDict["dbName"],paraDict['stbName'],i) + # tdSql.query("select count(*) from %s"%stableName) + # tdSql.checkData(0,0,rowsPerStb) + clusterComCheck.check_vgroups_status(vgroup_numbers=paraDict["vgroups"],db_replica=replica3,db_name=paraDict["dbName"],count_number=240) + def run(self): + # print(self.master_dnode.cfgDict) + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=4,stopRole='dnode') + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/6-cluster/manually-test/6dnode3mnodeInsertLessDataAlterRep3to1to3.py b/tests/system-test/6-cluster/manually-test/6dnode3mnodeInsertLessDataAlterRep3to1to3.py index ed7b99a880..fede19ca3a 100644 --- a/tests/system-test/6-cluster/manually-test/6dnode3mnodeInsertLessDataAlterRep3to1to3.py +++ b/tests/system-test/6-cluster/manually-test/6dnode3mnodeInsertLessDataAlterRep3to1to3.py @@ -177,7 +177,7 @@ class TDTestCase: tdSql.query("select count(*) from %s"%stableName) tdSql.checkData(0,0,rowsPerStb) - clusterComCheck.check_vgroups_status(vgroup_numbers=paraDict["vgroups"],db_replica=replica1,db_name=paraDict["dbName"],count_number=20) + clusterComCheck.check_vgroups_status(vgroup_numbers=paraDict["vgroups"],db_replica=replica1,db_name=paraDict["dbName"],count_number=40) sleep(5) tdLog.info(f"show transactions;alter database db0_0 replica {replica3};") TdSqlEx.execute(f'show transactions;') diff --git a/tests/system-test/6-cluster/manually-test/6dnode3mnodeStopDnodeInsertDatatb.py b/tests/system-test/6-cluster/manually-test/6dnode3mnodeStopDnodeInsertDatatb.py index e02af29a05..ee48b973c9 100644 --- a/tests/system-test/6-cluster/manually-test/6dnode3mnodeStopDnodeInsertDatatb.py +++ b/tests/system-test/6-cluster/manually-test/6dnode3mnodeStopDnodeInsertDatatb.py @@ -64,11 +64,11 @@ class TDTestCase: self._async_raise(thread.ident, SystemExit) - def insertData(self,dbname,tableCount,rowsPerCount): + def insertData(self,dbname,tableCount,rowsPerCount,vgroups): # tableCount : create table number # rowsPerCount : rows per table # fisrt add data : db\stable\childtable\general table - os.system(f"taosBenchmark -d {dbname} -n {tableCount} -t {rowsPerCount} -z 1 -k 10000 -y ") + os.system(f"taosBenchmark -d {dbname} -n {tableCount} -t {rowsPerCount} -v {vgroups} -z 1 -k 10000 -y ") def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): @@ -76,10 +76,10 @@ class TDTestCase: paraDict = {'dbName': 'db0_0', 'dropFlag': 1, 'event': '', - 'vgroups': 4, + 'vgroups': 6, 'replica': 1, - 'stbName': 'stb', - 'stbNumbers': 2, + 'stbName': 'meters', + 'stbNumbers': 1, 'colPrefix': 'c', 'tagPrefix': 't', 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], @@ -124,7 +124,7 @@ class TDTestCase: threads=[] # create stable:stb_0 - threads.append(threading.Thread(target=self.insertData, args=(paraDict["dbName"],paraDict["ctbNum"],paraDict["rowsPerTbl"]))) + threads.append(threading.Thread(target=self.insertData, args=(paraDict["dbName"],paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["vgroups"]))) for tr in threads: tr.start() TdSqlEx=tdCom.newTdSql() @@ -174,10 +174,13 @@ class TDTestCase: # tdSql.execute("use %s" %(paraDict["dbName"])) tdSql.query("show %s.stables"%(paraDict["dbName"])) tdSql.checkRows(paraDict["stbNumbers"]) - for i in range(paraDict['stbNumbers']): - stableName= '%s.%s_%d'%(paraDict["dbName"],paraDict['stbName'],i) - tdSql.query("select count(*) from %s"%stableName) - tdSql.checkData(0,0,rowsPerStb) + # for i in range(paraDict['stbNumbers']): + # stableName= '%s.%s_%d'%(paraDict["dbName"],paraDict['stbName'],i) + # tdSql.query("select count(*) from %s"%stableName) + # tdSql.checkData(0,0,rowsPerStb) + stableName= '%s.%s'%(paraDict["dbName"],paraDict['stbName']) + tdSql.query("select count(*) from %s"%stableName) + tdSql.checkData(0,0,rowsall) clusterComCheck.check_vgroups_status(vgroup_numbers=paraDict["vgroups"],db_replica=3,db_name=paraDict["dbName"],count_number=240) def run(self): # print(self.master_dnode.cfgDict)