diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in
index 13a81f88ea..37dd448b87 100644
--- a/cmake/taostools_CMakeLists.txt.in
+++ b/cmake/taostools_CMakeLists.txt.in
@@ -2,7 +2,7 @@
# taos-tools
ExternalProject_Add(taos-tools
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
- GIT_TAG 0cd564a
+ GIT_TAG 6a2d9fc
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
diff --git a/docs/en/01-index.md b/docs/en/01-index.md
index 13552ea9dc..296cd96898 100644
--- a/docs/en/01-index.md
+++ b/docs/en/01-index.md
@@ -1,6 +1,7 @@
---
title: TDengine Documentation
sidebar_label: Documentation Home
+description: This website contains the user manuals for TDengine, an open-source, cloud-native time-series database optimized for IoT, Connected Cars, and Industrial IoT.
slug: /
---
diff --git a/docs/en/02-intro/index.md b/docs/en/02-intro/index.md
index a60bfab2cc..95dd4324f1 100644
--- a/docs/en/02-intro/index.md
+++ b/docs/en/02-intro/index.md
@@ -1,5 +1,6 @@
---
title: Introduction
+description: This document introduces the major features, competitive advantages, typical use cases, and benchmarks of TDengine.
toc_max_heading_level: 2
---
diff --git a/docs/en/04-concept/index.md b/docs/en/04-concept/index.md
index 0b1b226c17..771a061c31 100644
--- a/docs/en/04-concept/index.md
+++ b/docs/en/04-concept/index.md
@@ -1,5 +1,6 @@
---
title: Concepts
+description: This document describes the basic concepts of TDengine, including the supertable.
---
In order to explain the basic concepts and provide some sample code, the TDengine documentation smart meters as a typical time series use case. We assume the following: 1. Each smart meter collects three metrics i.e. current, voltage, and phase; 2. There are multiple smart meters; 3. Each meter has static attributes like location and group ID. Based on this, collected data will look similar to the following table:
diff --git a/docs/en/05-get-started/01-docker.md b/docs/en/05-get-started/01-docker.md
index ac273daba4..42e6861674 100644
--- a/docs/en/05-get-started/01-docker.md
+++ b/docs/en/05-get-started/01-docker.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Docker
title: Quick Install on Docker
+sidebar_label: Docker
+description: This document describes how to install TDengine in a Docker container and perform queries and inserts.
---
This document describes how to install TDengine in a Docker container and perform queries and inserts.
diff --git a/docs/en/05-get-started/03-package.md b/docs/en/05-get-started/03-package.md
index 54d2e046c2..a0c1d93983 100644
--- a/docs/en/05-get-started/03-package.md
+++ b/docs/en/05-get-started/03-package.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Package
title: Quick Install from Package
+sidebar_label: Package
+description: This document describes how to install TDengine on Linux, Windows, and macOS and perform queries and inserts.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/05-get-started/index.md b/docs/en/05-get-started/index.md
index 12cfa22c69..66573a89cd 100644
--- a/docs/en/05-get-started/index.md
+++ b/docs/en/05-get-started/index.md
@@ -1,6 +1,6 @@
---
title: Get Started
-description: This article describes how to install TDengine and test its performance.
+description: This document describes how to install TDengine on various platforms.
---
import GitHubSVG from './github.svg'
diff --git a/docs/en/07-develop/01-connect/index.md b/docs/en/07-develop/01-connect/index.md
index 45bbaa2751..913c24f189 100644
--- a/docs/en/07-develop/01-connect/index.md
+++ b/docs/en/07-develop/01-connect/index.md
@@ -1,7 +1,7 @@
---
-sidebar_label: Connect
title: Connect to TDengine
-description: "How to establish connections to TDengine and how to install and use TDengine connectors."
+sidebar_label: Connect
+description: This document describes how to establish connections to TDengine and how to install and use TDengine connectors.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/07-develop/02-model/index.mdx b/docs/en/07-develop/02-model/index.mdx
index 19a239805f..db5a259cfe 100644
--- a/docs/en/07-develop/02-model/index.mdx
+++ b/docs/en/07-develop/02-model/index.mdx
@@ -1,5 +1,6 @@
---
title: Data Model
+description: This document describes the data model of TDengine.
---
The data model employed by TDengine is similar to that of a relational database. You have to create databases and tables. You must design the data model based on your own business and application requirements. You should design the [STable](/concept/#super-table-stable) (an abbreviation for super table) schema to fit your data. This chapter will explain the big picture without getting into syntactical details.
diff --git a/docs/en/07-develop/03-insert-data/01-sql-writing.mdx b/docs/en/07-develop/03-insert-data/01-sql-writing.mdx
index f2168645ff..32ba53a0cb 100644
--- a/docs/en/07-develop/03-insert-data/01-sql-writing.mdx
+++ b/docs/en/07-develop/03-insert-data/01-sql-writing.mdx
@@ -1,5 +1,6 @@
---
title: Insert Using SQL
+description: This document describes how to insert data into TDengine using SQL.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/07-develop/03-insert-data/20-kafka-writting.mdx b/docs/en/07-develop/03-insert-data/20-kafka-writting.mdx
index ffb969a8a6..89ca10b669 100644
--- a/docs/en/07-develop/03-insert-data/20-kafka-writting.mdx
+++ b/docs/en/07-develop/03-insert-data/20-kafka-writting.mdx
@@ -1,5 +1,6 @@
---
title: Write from Kafka
+description: This document describes how to insert data into TDengine using Kafka.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx b/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx
index fc5644850c..c559883d26 100644
--- a/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx
+++ b/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx
@@ -1,6 +1,7 @@
---
-sidebar_label: InfluxDB Line Protocol
title: InfluxDB Line Protocol
+sidebar_label: InfluxDB Line Protocol
+description: This document describes how to insert data into TDengine using the InfluxDB Line Protocol.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/07-develop/03-insert-data/40-opentsdb-telnet.mdx b/docs/en/07-develop/03-insert-data/40-opentsdb-telnet.mdx
index 5d3f25dca9..30bc3b87bf 100644
--- a/docs/en/07-develop/03-insert-data/40-opentsdb-telnet.mdx
+++ b/docs/en/07-develop/03-insert-data/40-opentsdb-telnet.mdx
@@ -1,6 +1,7 @@
---
-sidebar_label: OpenTSDB Line Protocol
title: OpenTSDB Line Protocol
+sidebar_label: OpenTSDB Line Protocol
+description: This document describes how to insert data into TDengine using the OpenTSDB Line Protocol.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx b/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx
index 214580c179..e9db130241 100644
--- a/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx
+++ b/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx
@@ -1,6 +1,7 @@
---
-sidebar_label: OpenTSDB JSON Protocol
title: OpenTSDB JSON Protocol
+sidebar_label: OpenTSDB JSON Protocol
+description: This document describes how to insert data into TDengine using the OpenTSDB JSON protocol.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/07-develop/03-insert-data/60-high-volume.md b/docs/en/07-develop/03-insert-data/60-high-volume.md
index 272a138813..d5afa8ef6e 100644
--- a/docs/en/07-develop/03-insert-data/60-high-volume.md
+++ b/docs/en/07-develop/03-insert-data/60-high-volume.md
@@ -1,6 +1,7 @@
---
-sidebar_label: High Performance Writing
title: High Performance Writing
+sidebar_label: High Performance Writing
+description: This document describes how to achieve high performance when writing data into TDengine.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/07-develop/03-insert-data/index.md b/docs/en/07-develop/03-insert-data/index.md
index 1a71e719a5..15f8f4ee9e 100644
--- a/docs/en/07-develop/03-insert-data/index.md
+++ b/docs/en/07-develop/03-insert-data/index.md
@@ -1,5 +1,6 @@
---
title: Insert Data
+description: This document describes how to insert data into TDengine.
---
TDengine supports multiple protocols of inserting data, including SQL, InfluxDB Line protocol, OpenTSDB Telnet protocol, and OpenTSDB JSON protocol. Data can be inserted row by row, or in batches. Data from one or more collection points can be inserted simultaneously. Data can be inserted with multiple threads, and out of order data and historical data can be inserted as well. InfluxDB Line protocol, OpenTSDB Telnet protocol and OpenTSDB JSON protocol are the 3 kinds of schemaless insert protocols supported by TDengine. It's not necessary to create STables and tables in advance if using schemaless protocols, and the schemas can be adjusted automatically based on the data being inserted.
diff --git a/docs/en/07-develop/04-query-data/index.mdx b/docs/en/07-develop/04-query-data/index.mdx
index 38dc98d1ff..7e167bb4f3 100644
--- a/docs/en/07-develop/04-query-data/index.mdx
+++ b/docs/en/07-develop/04-query-data/index.mdx
@@ -1,6 +1,6 @@
---
title: Query Data
-description: "This chapter introduces major query functionalities and how to perform sync and async query using connectors."
+description: This document describes how to query data in TDengine and how to perform synchronous and asynchronous queries using connectors.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/07-develop/06-stream.md b/docs/en/07-develop/06-stream.md
index 36f903ee9a..125173e60b 100644
--- a/docs/en/07-develop/06-stream.md
+++ b/docs/en/07-develop/06-stream.md
@@ -1,7 +1,7 @@
---
-sidebar_label: Stream Processing
-description: "The TDengine stream processing engine combines data inserts, preprocessing, analytics, real-time computation, and alerting into a single component."
title: Stream Processing
+sidebar_label: Stream Processing
+description: This document describes the stream processing component of TDengine.
---
Raw time-series data is often cleaned and preprocessed before being permanently stored in a database. In a traditional time-series solution, this generally requires the deployment of stream processing systems such as Kafka or Flink. However, the complexity of such systems increases the cost of development and maintenance.
diff --git a/docs/en/07-develop/08-cache.md b/docs/en/07-develop/08-cache.md
index 82a4787016..6a6ca3e594 100644
--- a/docs/en/07-develop/08-cache.md
+++ b/docs/en/07-develop/08-cache.md
@@ -1,7 +1,7 @@
---
-sidebar_label: Caching
title: Caching
-description: "This document describes the caching component of TDengine."
+sidebar_label: Caching
+description: This document describes the caching component of TDengine.
---
TDengine uses various kinds of caching techniques to efficiently write and query data. This document describes the caching component of TDengine.
diff --git a/docs/en/07-develop/09-udf.md b/docs/en/07-develop/09-udf.md
index 699b3ebe5f..553a7b932b 100644
--- a/docs/en/07-develop/09-udf.md
+++ b/docs/en/07-develop/09-udf.md
@@ -1,7 +1,7 @@
---
-sidebar_label: UDF
title: User-Defined Functions (UDF)
-description: "You can define your own scalar and aggregate functions to expand the query capabilities of TDengine."
+sidebar_label: UDF
+description: This document describes how to create user-defined functions (UDF), your own scalar and aggregate functions that can expand the query capabilities of TDengine.
---
The built-in functions of TDengine may not be sufficient for the use cases of every application. In this case, you can define custom functions for use in TDengine queries. These are known as user-defined functions (UDF). A user-defined function takes one column of data or the result of a subquery as its input.
diff --git a/docs/en/07-develop/index.md b/docs/en/07-develop/index.md
index 34649d32a2..8f80b82b97 100644
--- a/docs/en/07-develop/index.md
+++ b/docs/en/07-develop/index.md
@@ -1,5 +1,6 @@
---
title: Developer Guide
+description: This document describes how to use the various components of TDengine from a developer's perspective.
---
Before creating an application to process time-series data with TDengine, consider the following:
diff --git a/docs/en/10-deployment/01-deploy.md b/docs/en/10-deployment/01-deploy.md
index 5dfcd3108d..da00e21a7e 100644
--- a/docs/en/10-deployment/01-deploy.md
+++ b/docs/en/10-deployment/01-deploy.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Manual Deployment
title: Manual Deployment and Management
+sidebar_label: Manual Deployment
+description: This document describes how to deploy TDengine on a server.
---
## Prerequisites
diff --git a/docs/en/10-deployment/03-k8s.md b/docs/en/10-deployment/03-k8s.md
index b0aa677713..49e61caafc 100644
--- a/docs/en/10-deployment/03-k8s.md
+++ b/docs/en/10-deployment/03-k8s.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Kubernetes
title: Deploying a TDengine Cluster in Kubernetes
+sidebar_label: Kubernetes
+description: This document describes how to deploy TDengine on Kubernetes.
---
TDengine is a cloud-native time-series database that can be deployed on Kubernetes. This document gives a step-by-step description of how you can use YAML files to create a TDengine cluster and introduces common operations for TDengine in a Kubernetes environment.
diff --git a/docs/en/10-deployment/05-helm.md b/docs/en/10-deployment/05-helm.md
index 90baa5f445..aa61717669 100644
--- a/docs/en/10-deployment/05-helm.md
+++ b/docs/en/10-deployment/05-helm.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Helm
title: Use Helm to deploy TDengine
+sidebar_label: Helm
+description: This document describes how to deploy TDengine on Kubernetes by using Helm.
---
Helm is a package manager for Kubernetes that can provide more capabilities in deploying on Kubernetes.
diff --git a/docs/en/10-deployment/index.md b/docs/en/10-deployment/index.md
index 7054a33e4a..865fbc2da5 100644
--- a/docs/en/10-deployment/index.md
+++ b/docs/en/10-deployment/index.md
@@ -1,5 +1,6 @@
---
title: Deployment
+description: This document describes how to deploy a TDengine cluster on a server, on Kubernetes, and by using Helm.
---
TDengine has a native distributed design and provides the ability to scale out. A few nodes can form a TDengine cluster. If you need higher processing power, you just need to add more nodes into the cluster. TDengine uses virtual node technology to virtualize a node into multiple virtual nodes to achieve load balancing. At the same time, TDengine can group virtual nodes on different nodes into virtual node groups, and use the replication mechanism to ensure the high availability of the system. The cluster feature of TDengine is completely open source.
diff --git a/docs/en/12-taos-sql/01-data-type.md b/docs/en/12-taos-sql/01-data-type.md
index 60046629a4..641fd3cbb7 100644
--- a/docs/en/12-taos-sql/01-data-type.md
+++ b/docs/en/12-taos-sql/01-data-type.md
@@ -1,7 +1,7 @@
---
-sidebar_label: Data Types
title: Data Types
-description: 'TDengine supports a variety of data types including timestamp, float, JSON and many others.'
+sidebar_label: Data Types
+description: This document describes the data types that TDengine supports.
---
## Timestamp
diff --git a/docs/en/12-taos-sql/02-database.md b/docs/en/12-taos-sql/02-database.md
index 059f124ea5..280d72697c 100644
--- a/docs/en/12-taos-sql/02-database.md
+++ b/docs/en/12-taos-sql/02-database.md
@@ -1,7 +1,7 @@
---
-sidebar_label: Database
title: Database
-description: "create and drop database, show or change database parameters"
+sidebar_label: Database
+description: This document describes how to create and perform operations on databases.
---
## Create a Database
diff --git a/docs/en/12-taos-sql/03-table.md b/docs/en/12-taos-sql/03-table.md
index 6d12b8c730..f61d1f5147 100644
--- a/docs/en/12-taos-sql/03-table.md
+++ b/docs/en/12-taos-sql/03-table.md
@@ -1,5 +1,6 @@
---
title: Table
+description: This document describes how to create and perform operations on standard tables and subtables.
---
## Create Table
diff --git a/docs/en/12-taos-sql/04-stable.md b/docs/en/12-taos-sql/04-stable.md
index 8a7c713f8c..5b316d0d24 100644
--- a/docs/en/12-taos-sql/04-stable.md
+++ b/docs/en/12-taos-sql/04-stable.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Supertable
title: Supertable
+sidebar_label: Supertable
+description: This document describes how to create and perform operations on supertables.
---
## Create a Supertable
diff --git a/docs/en/12-taos-sql/05-insert.md b/docs/en/12-taos-sql/05-insert.md
index 9141211db5..c22357abfa 100644
--- a/docs/en/12-taos-sql/05-insert.md
+++ b/docs/en/12-taos-sql/05-insert.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Insert
title: Insert
+sidebar_label: Insert
+description: This document describes how to insert data into TDengine.
---
## Syntax
@@ -27,7 +28,7 @@ INSERT INTO tb_name [(field1_name, ...)] subquery
2. The precision of a timestamp depends on its format. The precision configured for the database affects only timestamps that are inserted as long integers (UNIX time). Timestamps inserted as date and time strings are not affected. As an example, the timestamp 2021-07-13 16:16:48 is equivalent to 1626164208 in UNIX time. This UNIX time is modified to 1626164208000 for databases with millisecond precision, 1626164208000000 for databases with microsecond precision, and 1626164208000000000 for databases with nanosecond precision.
3. If you want to insert multiple rows simultaneously, do not use the NOW function in the timestamp. Using the NOW function in this situation will cause multiple rows to have the same timestamp and prevent them from being stored correctly. This is because the NOW function obtains the current time on the client, and multiple instances of NOW in a single statement will return the same time.
- The earliest timestamp that you can use when inserting data is equal to the current time on the server minus the value of the KEEP parameter. The latest timestamp that you can use when inserting data is equal to the current time on the server plus the value of the DURATION parameter. You can configure the KEEP and DURATION parameters when you create a database. The default values are 3650 days for the KEEP parameter and 10 days for the DURATION parameter.
+ The earliest timestamp that you can use when inserting data is equal to the current time on the server minus the value of the KEEP parameter (You can configure the KEEP parameter when you create a database and the default value is 3650 days). The latest timestamp you can use when inserting data depends on the PRECISION parameter (You can configure the PRECISION parameter when you create a database, ms means milliseconds, us means microseconds, ns means nanoseconds, and the default value is milliseconds). If the timestamp precision is milliseconds or microseconds, the latest timestamp is the Unix epoch (January 1st, 1970 at 00:00:00.000 UTC) plus 1000 years, that is, January 1st, 2970 at 00:00:00.000 UTC; If the timestamp precision is nanoseconds, the latest timestamp is the Unix epoch plus 292 years, that is, January 1st, 2262 at 00:00:00.000000000 UTC.
**Syntax**
diff --git a/docs/en/12-taos-sql/06-select.md b/docs/en/12-taos-sql/06-select.md
index ee06a7be2d..183ab58726 100644
--- a/docs/en/12-taos-sql/06-select.md
+++ b/docs/en/12-taos-sql/06-select.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Select
title: Select
+sidebar_label: Select
+description: This document describes how to query data in TDengine.
---
## Syntax
diff --git a/docs/en/12-taos-sql/08-delete-data.mdx b/docs/en/12-taos-sql/08-delete-data.mdx
index 999c467ad0..f91a89a7eb 100644
--- a/docs/en/12-taos-sql/08-delete-data.mdx
+++ b/docs/en/12-taos-sql/08-delete-data.mdx
@@ -1,7 +1,7 @@
---
-sidebar_label: Delete Data
-description: "Delete data from table or Stable"
title: Delete Data
+sidebar_label: Delete Data
+description: This document describes how to delete data from TDengine.
---
TDengine provides the functionality of deleting data from a table or STable according to specified time range, it can be used to cleanup abnormal data generated due to device failure.
diff --git a/docs/en/12-taos-sql/10-function.md b/docs/en/12-taos-sql/10-function.md
index 802eb259bf..b2d44f1a1d 100644
--- a/docs/en/12-taos-sql/10-function.md
+++ b/docs/en/12-taos-sql/10-function.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Functions
title: Functions
+sidebar_label: Functions
+description: This document describes the standard SQL functions available in TDengine.
toc_max_heading_level: 4
---
diff --git a/docs/en/12-taos-sql/12-distinguished.md b/docs/en/12-taos-sql/12-distinguished.md
index 0763e85a53..536fd8ffc3 100644
--- a/docs/en/12-taos-sql/12-distinguished.md
+++ b/docs/en/12-taos-sql/12-distinguished.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Time-Series Extensions
title: Time-Series Extensions
+sidebar_label: Time-Series Extensions
+description: This document describes the extended functions specific to time-series data processing available in TDengine.
---
As a purpose-built database for storing and processing time-series data, TDengine provides time-series-specific extensions to standard SQL.
diff --git a/docs/en/12-taos-sql/13-tmq.md b/docs/en/12-taos-sql/13-tmq.md
index befab4f4f0..1a805c76fb 100644
--- a/docs/en/12-taos-sql/13-tmq.md
+++ b/docs/en/12-taos-sql/13-tmq.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Data Subscription
title: Data Subscription
+sidebar_label: Data Subscription
+description: This document describes the SQL statements related to the data subscription component of TDengine.
---
The information in this document is related to the TDengine data subscription feature.
diff --git a/docs/en/12-taos-sql/14-stream.md b/docs/en/12-taos-sql/14-stream.md
index e70e962668..b8f6c3a163 100644
--- a/docs/en/12-taos-sql/14-stream.md
+++ b/docs/en/12-taos-sql/14-stream.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Stream Processing
title: Stream Processing
+sidebar_label: Stream Processing
+description: This document describes the SQL statements related to the stream processing component of TDengine.
---
Raw time-series data is often cleaned and preprocessed before being permanently stored in a database. Stream processing components like Kafka, Flink, and Spark are often deployed alongside a time-series database to handle these operations, increasing system complexity and maintenance costs.
diff --git a/docs/en/12-taos-sql/16-operators.md b/docs/en/12-taos-sql/16-operators.md
index c426e28793..32ad4e7075 100644
--- a/docs/en/12-taos-sql/16-operators.md
+++ b/docs/en/12-taos-sql/16-operators.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Operators
title: Operators
+sidebar_label: Operators
+description: This document describes the SQL operators available in TDengine.
---
## Arithmetic Operators
diff --git a/docs/en/12-taos-sql/17-json.md b/docs/en/12-taos-sql/17-json.md
index 77f7743033..b2494e0cc1 100644
--- a/docs/en/12-taos-sql/17-json.md
+++ b/docs/en/12-taos-sql/17-json.md
@@ -1,6 +1,7 @@
---
-sidebar_label: JSON Type
title: JSON Type
+sidebar_label: JSON Type
+description: This document describes the JSON data type in TDengine.
---
diff --git a/docs/en/12-taos-sql/18-escape.md b/docs/en/12-taos-sql/18-escape.md
index a2ae40de98..85e4610e44 100644
--- a/docs/en/12-taos-sql/18-escape.md
+++ b/docs/en/12-taos-sql/18-escape.md
@@ -1,5 +1,6 @@
---
title: Escape Characters
+description: This document describes the usage of escape characters in TDengine.
---
## Escape Characters
diff --git a/docs/en/12-taos-sql/19-limit.md b/docs/en/12-taos-sql/19-limit.md
index f00ec90f57..654fae7560 100644
--- a/docs/en/12-taos-sql/19-limit.md
+++ b/docs/en/12-taos-sql/19-limit.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Name and Size Limits
title: Name and Size Limits
+sidebar_label: Name and Size Limits
+description: This document describes the name and size limits in TDengine.
---
## Naming Rules
diff --git a/docs/en/12-taos-sql/20-keywords.md b/docs/en/12-taos-sql/20-keywords.md
index 23f85947e3..a2191c87ee 100644
--- a/docs/en/12-taos-sql/20-keywords.md
+++ b/docs/en/12-taos-sql/20-keywords.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Reserved Keywords
title: Reserved Keywords
+sidebar_label: Reserved Keywords
+description: This document describes the reserved keywords in TDengine that cannot be used in object names.
---
## Keyword List
diff --git a/docs/en/12-taos-sql/21-node.md b/docs/en/12-taos-sql/21-node.md
index a0d49ab208..8a5069e66f 100644
--- a/docs/en/12-taos-sql/21-node.md
+++ b/docs/en/12-taos-sql/21-node.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Cluster
title: Cluster
+sidebar_label: Cluster
+description: This document describes the SQL statements related to cluster management in TDengine.
---
The physical entities that form TDengine clusters are known as data nodes (dnodes). Each dnode is a process running on the operating system of the physical machine. Dnodes can contain virtual nodes (vnodes), which store time-series data. Virtual nodes are formed into vgroups, which have 1 or 3 vnodes depending on the replica setting. If you want to enable replication on your cluster, it must contain at least three nodes. Dnodes can also contain management nodes (mnodes). Each cluster has up to three mnodes. Finally, dnodes can contain query nodes (qnodes), which compute time-series data, thus separating compute from storage. A single dnode can contain a vnode, qnode, and mnode.
diff --git a/docs/en/12-taos-sql/22-meta.md b/docs/en/12-taos-sql/22-meta.md
index 1cd759742a..d2bc72f047 100644
--- a/docs/en/12-taos-sql/22-meta.md
+++ b/docs/en/12-taos-sql/22-meta.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Metadata
title: Information_Schema Database
+sidebar_label: Metadata
+description: This document describes how to use the INFORMATION_SCHEMA database in TDengine.
---
TDengine includes a built-in database named `INFORMATION_SCHEMA` to provide access to database metadata, system information, and status information. This information includes database names, table names, and currently running SQL statements. All information related to TDengine maintenance is stored in this database. It contains several read-only tables. These tables are more accurately described as views, and they do not correspond to specific files. You can query these tables but cannot write data to them. The INFORMATION_SCHEMA database is intended to provide a unified method for SHOW commands to access data. However, using SELECT ... FROM INFORMATION_SCHEMA.tablename offers several advantages over SHOW commands:
diff --git a/docs/en/12-taos-sql/23-perf.md b/docs/en/12-taos-sql/23-perf.md
index 29cf3af6ab..fc369ec663 100644
--- a/docs/en/12-taos-sql/23-perf.md
+++ b/docs/en/12-taos-sql/23-perf.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Statistics
title: Performance_Schema Database
+sidebar_label: Statistics
+description: This document describes how to use the PERFORMANCE_SCHEMA database in TDengine.
---
TDengine includes a built-in database named `PERFORMANCE_SCHEMA` to provide access to database performance statistics. This document introduces the tables of PERFORMANCE_SCHEMA and their structure.
diff --git a/docs/en/12-taos-sql/24-show.md b/docs/en/12-taos-sql/24-show.md
index f70d86570e..dc1db956a0 100644
--- a/docs/en/12-taos-sql/24-show.md
+++ b/docs/en/12-taos-sql/24-show.md
@@ -1,6 +1,7 @@
---
-sidebar_label: SHOW Statement
title: SHOW Statement for Metadata
+sidebar_label: SHOW Statement
+description: This document describes how to use the SHOW statement in TDengine.
---
`SHOW` command can be used to get brief system information. To get details about metatadata, information, and status in the system, please use `select` to query the tables in database `INFORMATION_SCHEMA`.
diff --git a/docs/en/12-taos-sql/25-grant.md b/docs/en/12-taos-sql/25-grant.md
index f895567c62..8b4c439352 100644
--- a/docs/en/12-taos-sql/25-grant.md
+++ b/docs/en/12-taos-sql/25-grant.md
@@ -1,7 +1,7 @@
---
-sidebar_label: Access Control
title: User and Access Control
-description: Manage user and user's permission
+sidebar_label: Access Control
+description: This document describes how to manage users and permissions in TDengine.
---
This document describes how to manage permissions in TDengine.
diff --git a/docs/en/12-taos-sql/26-udf.md b/docs/en/12-taos-sql/26-udf.md
index 977f3bcc08..249fcd3b54 100644
--- a/docs/en/12-taos-sql/26-udf.md
+++ b/docs/en/12-taos-sql/26-udf.md
@@ -1,6 +1,7 @@
---
-sidebar_label: User-Defined Functions
title: User-Defined Functions (UDF)
+sidebar_label: User-Defined Functions
+description: This document describes the SQL statements related to user-defined functions (UDF) in TDengine.
---
You can create user-defined functions and import them into TDengine.
diff --git a/docs/en/12-taos-sql/27-index.md b/docs/en/12-taos-sql/27-index.md
index 7d09bc43ab..7586e4af76 100644
--- a/docs/en/12-taos-sql/27-index.md
+++ b/docs/en/12-taos-sql/27-index.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Index
-title: Using Indices
+title: Indexing
+sidebar_label: Indexing
+description: This document describes the SQL statements related to indexing in TDengine.
---
TDengine supports SMA and FULLTEXT indexing.
diff --git a/docs/en/12-taos-sql/28-recovery.md b/docs/en/12-taos-sql/28-recovery.md
index e869ffc45f..b4da25ea0c 100644
--- a/docs/en/12-taos-sql/28-recovery.md
+++ b/docs/en/12-taos-sql/28-recovery.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Error Recovery
title: Error Recovery
+sidebar_label: Error Recovery
+description: This document describes the SQL statements related to error recovery in TDengine.
---
In a complex environment, connections and query tasks may encounter errors or fail to return in a reasonable time. If this occurs, you can terminate the connection or task.
diff --git a/docs/en/12-taos-sql/29-changes.md b/docs/en/12-taos-sql/29-changes.md
index f288cd7545..341791d675 100644
--- a/docs/en/12-taos-sql/29-changes.md
+++ b/docs/en/12-taos-sql/29-changes.md
@@ -1,7 +1,7 @@
---
-sidebar_label: Changes in TDengine 3.0
title: Changes in TDengine 3.0
-description: "This document explains how TDengine SQL has changed in version 3.0."
+sidebar_label: Changes in TDengine 3.0
+description: This document describes how TDengine SQL has changed in version 3.0 compared with previous versions.
---
## Basic SQL Elements
diff --git a/docs/en/12-taos-sql/index.md b/docs/en/12-taos-sql/index.md
index a5ffc9dc8d..276f84f21b 100644
--- a/docs/en/12-taos-sql/index.md
+++ b/docs/en/12-taos-sql/index.md
@@ -1,6 +1,6 @@
---
title: TDengine SQL
-description: 'The syntax supported by TDengine SQL '
+description: This document describes the syntax and functions supported by TDengine SQL.
---
This section explains the syntax of SQL to perform operations on databases, tables and STables, insert data, select data and use functions. We also provide some tips that can be used in TDengine SQL. If you have previous experience with SQL this section will be fairly easy to understand. If you do not have previous experience with SQL, you'll come to appreciate the simplicity and power of SQL. TDengine SQL has been enhanced in version 3.0, and the query engine has been rearchitected. For information about how TDengine SQL has changed, see [Changes in TDengine 3.0](../taos-sql/changes).
diff --git a/docs/en/13-operation/01-pkg-install.md b/docs/en/13-operation/01-pkg-install.md
index d7713b943f..6e6c4aaebf 100644
--- a/docs/en/13-operation/01-pkg-install.md
+++ b/docs/en/13-operation/01-pkg-install.md
@@ -1,6 +1,6 @@
---
title: Install and Uninstall
-description: Install, Uninstall, Start, Stop and Upgrade
+description: This document describes how to install, upgrade, and uninstall TDengine.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/13-operation/02-planning.mdx b/docs/en/13-operation/02-planning.mdx
index 2dffa7bb87..37ef6aae26 100644
--- a/docs/en/13-operation/02-planning.mdx
+++ b/docs/en/13-operation/02-planning.mdx
@@ -1,6 +1,7 @@
---
-sidebar_label: Resource Planning
title: Resource Planning
+sidebar_label: Resource Planning
+description: This document describes how to plan compute and storage resources for your TDengine cluster.
---
It is important to plan computing and storage resources if using TDengine to build an IoT, time-series or Big Data platform. How to plan the CPU, memory and disk resources required, will be described in this chapter.
diff --git a/docs/en/13-operation/03-tolerance.md b/docs/en/13-operation/03-tolerance.md
index 21a5a90282..4f33748e68 100644
--- a/docs/en/13-operation/03-tolerance.md
+++ b/docs/en/13-operation/03-tolerance.md
@@ -1,5 +1,6 @@
---
title: Fault Tolerance and Disaster Recovery
+description: This document describes how TDengine provides fault tolerance and disaster recovery.
---
## Fault Tolerance
diff --git a/docs/en/13-operation/07-import.md b/docs/en/13-operation/07-import.md
index 8362cec1ab..e95824e927 100644
--- a/docs/en/13-operation/07-import.md
+++ b/docs/en/13-operation/07-import.md
@@ -1,5 +1,6 @@
---
title: Data Import
+description: This document describes how to import data into TDengine.
---
There are multiple ways of importing data provided by TDengine: import with script, import from data file, import using `taosdump`.
diff --git a/docs/en/13-operation/08-export.md b/docs/en/13-operation/08-export.md
index 5780de42fa..bffda36e23 100644
--- a/docs/en/13-operation/08-export.md
+++ b/docs/en/13-operation/08-export.md
@@ -1,5 +1,6 @@
---
title: Data Export
+description: This document describes how to export data from TDengine.
---
There are two ways of exporting data from a TDengine cluster:
diff --git a/docs/en/13-operation/10-monitor.md b/docs/en/13-operation/10-monitor.md
index 74a5564a2a..346b874059 100644
--- a/docs/en/13-operation/10-monitor.md
+++ b/docs/en/13-operation/10-monitor.md
@@ -1,5 +1,6 @@
---
title: TDengine Monitoring
+description: This document describes how to monitor your TDengine cluster.
---
After TDengine is started, it automatically writes monitoring data including CPU, memory and disk usage, bandwidth, number of requests, disk I/O speed, slow queries, into a designated database at a predefined interval through taosKeeper. Additionally, some important system operations, like logon, create user, drop database, and alerts and warnings generated in TDengine are written into the `log` database too. A system operator can view the data in `log` database from TDengine CLI or from a web console.
diff --git a/docs/en/13-operation/17-diagnose.md b/docs/en/13-operation/17-diagnose.md
index fa202a23ea..9d42b3ebbc 100644
--- a/docs/en/13-operation/17-diagnose.md
+++ b/docs/en/13-operation/17-diagnose.md
@@ -1,5 +1,6 @@
---
title: Problem Diagnostics
+description: This document describes how to diagnose issues with your TDengine cluster.
---
## Network Connection Diagnostics
diff --git a/docs/en/13-operation/index.md b/docs/en/13-operation/index.md
index c64749c40e..8b386dc19a 100644
--- a/docs/en/13-operation/index.md
+++ b/docs/en/13-operation/index.md
@@ -1,5 +1,6 @@
---
title: Administration
+description: This document describes how to perform management operations on your TDengine cluster from an administrator's perspective.
---
This chapter is mainly written for system administrators. It covers download, install/uninstall, data import/export, system monitoring, user management, connection management, capacity planning and system optimization.
diff --git a/docs/en/14-reference/02-rest-api/02-rest-api.mdx b/docs/en/14-reference/02-rest-api/02-rest-api.mdx
index 09e40b956f..b138d69bfc 100644
--- a/docs/en/14-reference/02-rest-api/02-rest-api.mdx
+++ b/docs/en/14-reference/02-rest-api/02-rest-api.mdx
@@ -1,5 +1,6 @@
---
title: REST API
+description: This document describes the TDengine REST API.
---
To support the development of various types of applications and platforms, TDengine provides an API that conforms to REST principles; namely REST API. To minimize the learning cost, unlike REST APIs for other database engines, TDengine allows insertion of SQL commands in the BODY of an HTTP POST request, to operate the database.
diff --git a/docs/en/14-reference/03-connector/03-cpp.mdx b/docs/en/14-reference/03-connector/03-cpp.mdx
index 906d56ab15..3bd7b7f4c6 100644
--- a/docs/en/14-reference/03-connector/03-cpp.mdx
+++ b/docs/en/14-reference/03-connector/03-cpp.mdx
@@ -1,6 +1,7 @@
---
-sidebar_label: C/C++
title: C/C++ Connector
+sidebar_label: C/C++
+description: This document describes the TDengine C/C++ connector.
---
C/C++ developers can use TDengine's client driver and the C/C++ connector, to develop their applications to connect to TDengine clusters for data writing, querying, and other functions. To use the C/C++ connector you must include the TDengine header file _taos.h_, which lists the function prototypes of the provided APIs. The application also needs to link to the corresponding dynamic libraries on the platform where it is located.
diff --git a/docs/en/14-reference/03-connector/04-java.mdx b/docs/en/14-reference/03-connector/04-java.mdx
index c37738b3f8..61ce166069 100644
--- a/docs/en/14-reference/03-connector/04-java.mdx
+++ b/docs/en/14-reference/03-connector/04-java.mdx
@@ -1,8 +1,8 @@
---
-toc_max_heading_level: 4
-sidebar_label: Java
title: TDengine Java Connector
-description: The TDengine Java Connector is implemented on the standard JDBC API and provides native and REST connectors.
+sidebar_label: Java
+description: This document describes the TDengine Java Connector.
+toc_max_heading_level: 4
---
import Tabs from '@theme/Tabs';
diff --git a/docs/en/14-reference/03-connector/05-go.mdx b/docs/en/14-reference/03-connector/05-go.mdx
index 60407c0735..da2f54708f 100644
--- a/docs/en/14-reference/03-connector/05-go.mdx
+++ b/docs/en/14-reference/03-connector/05-go.mdx
@@ -1,7 +1,8 @@
---
-toc_max_heading_level: 4
-sidebar_label: Go
title: TDengine Go Connector
+sidebar_label: Go
+description: This document describes the TDengine Go connector.
+toc_max_heading_level: 4
---
import Tabs from '@theme/Tabs';
diff --git a/docs/en/14-reference/03-connector/06-rust.mdx b/docs/en/14-reference/03-connector/06-rust.mdx
index 4e2a7848dc..6e84859610 100644
--- a/docs/en/14-reference/03-connector/06-rust.mdx
+++ b/docs/en/14-reference/03-connector/06-rust.mdx
@@ -1,7 +1,8 @@
---
-toc_max_heading_level: 4
-sidebar_label: Rust
title: TDengine Rust Connector
+sidebar_label: Rust
+description: This document describes the TDengine Rust connector.
+toc_max_heading_level: 4
---
import Tabs from '@theme/Tabs';
diff --git a/docs/en/14-reference/03-connector/07-python.mdx b/docs/en/14-reference/03-connector/07-python.mdx
index d593c3f133..146da268a8 100644
--- a/docs/en/14-reference/03-connector/07-python.mdx
+++ b/docs/en/14-reference/03-connector/07-python.mdx
@@ -1,7 +1,7 @@
---
-sidebar_label: Python
title: TDengine Python Connector
-description: "taospy is the official Python connector for TDengine. taospy provides a rich API that makes it easy for Python applications to use TDengine. tasopy wraps both the native and REST interfaces of TDengine, corresponding to the two submodules of tasopy: taos and taosrest. In addition to wrapping the native and REST interfaces, taospy also provides a programming interface that conforms to the Python Data Access Specification (PEP 249), making it easy to integrate taospy with many third-party tools, such as SQLAlchemy and pandas."
+sidebar_label: Python
+description: This document describes taospy, the TDengine Python connector.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/14-reference/03-connector/08-node.mdx b/docs/en/14-reference/03-connector/08-node.mdx
index a36cf0efc9..83479f91da 100644
--- a/docs/en/14-reference/03-connector/08-node.mdx
+++ b/docs/en/14-reference/03-connector/08-node.mdx
@@ -1,7 +1,8 @@
---
-toc_max_heading_level: 4
-sidebar_label: Node.js
title: TDengine Node.js Connector
+sidebar_label: Node.js
+description: This document describes the TDengine Node.js connector.
+toc_max_heading_level: 4
---
import Tabs from "@theme/Tabs";
@@ -59,9 +60,19 @@ Please refer to [version support list](/reference/connector#version-support)
- `python` (recommended for `v2.7` , `v3.x.x` currently not supported)
- `@tdengine/client` 3.0.0 supports Node.js LTS v10.9.0 or later and Node.js LTS v12.8.0 or later. Older versions may be incompatible.
- `make`
-- C compiler, [GCC](https://gcc.gnu.org) v4.8.5 or higher
+- C compiler, [GCC](https://gcc.gnu.org) v4.8.5 or later.
+
+
+
+- `python` (recommended for `v2.7` , `v3.x.x` currently not supported)
+- `@tdengine/client` 3.0.0 currently supports Node.js from v12.22.12, but only later versions of v12. Other versions may be incompatible.
+- `make`
+- C compiler, [GCC](https://gcc.gnu.org) v4.8.5 or later.
+
+
+
- Installation method 1
@@ -249,4 +260,4 @@ let cursor = conn.cursor();
## API Reference
-[API Reference](https://docs.taosdata.com/api/td2.0-connector/)
\ No newline at end of file
+[API Reference](https://docs.taosdata.com/api/td2.0-connector/)
diff --git a/docs/en/14-reference/03-connector/09-csharp.mdx b/docs/en/14-reference/03-connector/09-csharp.mdx
index 756e948bd2..e984967fb7 100644
--- a/docs/en/14-reference/03-connector/09-csharp.mdx
+++ b/docs/en/14-reference/03-connector/09-csharp.mdx
@@ -1,7 +1,8 @@
---
-toc_max_heading_level: 4
-sidebar_label: C#
title: C# Connector
+sidebar_label: C#
+description: This document describes the TDengine C# connector.
+toc_max_heading_level: 4
---
import Tabs from '@theme/Tabs';
diff --git a/docs/en/14-reference/03-connector/10-php.mdx b/docs/en/14-reference/03-connector/10-php.mdx
index 87f8616f9e..fd00d11239 100644
--- a/docs/en/14-reference/03-connector/10-php.mdx
+++ b/docs/en/14-reference/03-connector/10-php.mdx
@@ -1,6 +1,7 @@
---
-sidebar_label: PHP
title: PHP Connector
+sidebar_label: PHP
+description: This document describes the TDengine PHP connector.
---
`php-tdengine` is the TDengine PHP connector provided by TDengine community. In particular, it supports Swoole coroutine.
diff --git a/docs/en/14-reference/03-connector/index.mdx b/docs/en/14-reference/03-connector/index.mdx
index da3aae8309..2df73b8592 100644
--- a/docs/en/14-reference/03-connector/index.mdx
+++ b/docs/en/14-reference/03-connector/index.mdx
@@ -1,5 +1,6 @@
---
title: Connector
+description: This document describes the connectors that TDengine provides to interface with various programming languages.
---
TDengine provides a rich set of APIs (application development interface). To facilitate users to develop their applications quickly, TDengine supports connectors for multiple programming languages, including official connectors for C/C++, Java, Python, Go, Node.js, C#, and Rust. These connectors support connecting to TDengine clusters using both native interfaces (taosc) and REST interfaces (not supported in a few languages yet). Community developers have also contributed several unofficial connectors, such as the ADO.NET connector, the Lua connector, and the PHP connector.
diff --git a/docs/en/14-reference/04-taosadapter.md b/docs/en/14-reference/04-taosadapter.md
index 9eb6cb9213..c1ec97b647 100644
--- a/docs/en/14-reference/04-taosadapter.md
+++ b/docs/en/14-reference/04-taosadapter.md
@@ -1,7 +1,7 @@
---
-title: "taosAdapter"
-description: "taosAdapter is a TDengine companion tool that acts as a bridge and adapter between TDengine clusters and applications. It provides an easy-to-use and efficient way to ingest data directly from data collection agent software such as Telegraf, StatsD, collectd, etc. It also provides an InfluxDB/OpenTSDB compatible data ingestion interface, allowing InfluxDB/OpenTSDB applications to be seamlessly ported to TDengine."
-sidebar_label: "taosAdapter"
+title: taosAdapter
+sidebar_label: taosAdapter
+description: This document describes how to use taosAdapter, a TDengine companion tool that acts as a bridge and adapter between TDengine clusters and applications.
---
import Prometheus from "./_prometheus.mdx"
diff --git a/docs/en/14-reference/05-taosbenchmark.md b/docs/en/14-reference/05-taosbenchmark.md
index 4017b12be9..9828d71ece 100644
--- a/docs/en/14-reference/05-taosbenchmark.md
+++ b/docs/en/14-reference/05-taosbenchmark.md
@@ -1,8 +1,8 @@
---
title: taosBenchmark
sidebar_label: taosBenchmark
+description: This document describes how to use taosBenchmark, a tool for testing the performance of TDengine.
toc_max_heading_level: 4
-description: "taosBenchmark (once called taosdemo ) is a tool for testing the performance of TDengine."
---
# Introduction
diff --git a/docs/en/14-reference/06-taosdump.md b/docs/en/14-reference/06-taosdump.md
index 9c63b4dc03..dcfc068a3d 100644
--- a/docs/en/14-reference/06-taosdump.md
+++ b/docs/en/14-reference/06-taosdump.md
@@ -1,6 +1,6 @@
---
title: taosdump
-description: "taosdump is a tool that supports backing up data from a running TDengine cluster and restoring the backed up data to the same, or another running TDengine cluster."
+description: This document describes how to use taosdump, a tool for backing up and restoring the data in a TDengine cluster.
---
## Introduction
diff --git a/docs/en/14-reference/07-tdinsight/index.md b/docs/en/14-reference/07-tdinsight/index.md
index d03c16a8bc..1c58dd6a76 100644
--- a/docs/en/14-reference/07-tdinsight/index.md
+++ b/docs/en/14-reference/07-tdinsight/index.md
@@ -1,6 +1,7 @@
---
title: TDinsight - Grafana-based Zero-Dependency Monitoring Solution for TDengine
sidebar_label: TDinsight
+description: This document describes TDinsight, a monitoring solution for TDengine.
---
TDinsight is a solution for monitoring TDengine using the builtin native monitoring database and [Grafana].
diff --git a/docs/en/14-reference/08-taos-shell.md b/docs/en/14-reference/08-taos-shell.md
index 68e2f08765..7833ac861f 100644
--- a/docs/en/14-reference/08-taos-shell.md
+++ b/docs/en/14-reference/08-taos-shell.md
@@ -1,7 +1,7 @@
---
title: TDengine Command Line Interface (CLI)
sidebar_label: Command Line Interface
-description: Instructions and tips for using the TDengine CLI
+description: This document describes how to use the TDengine CLI.
---
The TDengine command-line interface (hereafter referred to as `TDengine CLI`) is the simplest way for users to manipulate and interact with TDengine instances.
diff --git a/docs/en/14-reference/09-support-platform/index.md b/docs/en/14-reference/09-support-platform/index.md
index 061294f016..7dfa8ac93a 100644
--- a/docs/en/14-reference/09-support-platform/index.md
+++ b/docs/en/14-reference/09-support-platform/index.md
@@ -1,6 +1,6 @@
---
title: List of supported platforms
-description: "List of platforms supported by TDengine server, client, and connector"
+description: This document describes the supported platforms for the TDengine server, client, and connectors.
---
## List of supported platforms for TDengine server
diff --git a/docs/en/14-reference/11-docker/index.md b/docs/en/14-reference/11-docker/index.md
index 89987c456f..b9278c6961 100644
--- a/docs/en/14-reference/11-docker/index.md
+++ b/docs/en/14-reference/11-docker/index.md
@@ -1,6 +1,6 @@
---
title: Deploying TDengine with Docker
-description: "This chapter focuses on starting the TDengine service in a container and accessing it."
+description: This chapter describes how to start and access TDengine in a Docker container.
---
This chapter describes how to start the TDengine service in a container and access it. Users can control the behavior of the service in the container by using environment variables on the docker run command-line or in the docker-compose file.
diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md
index 9e56a0b0bf..afa9f5a8ae 100644
--- a/docs/en/14-reference/12-config/index.md
+++ b/docs/en/14-reference/12-config/index.md
@@ -1,6 +1,6 @@
---
title: Configuration Parameters
-description: "Configuration parameters for client and server in TDengine"
+description: This document describes the configuration parameters for the TDengine server and client.
---
## Configuration File on Server Side
@@ -162,11 +162,7 @@ The parameters described in this document by the effect that they have on the sy
| Meaning | Execution policy for query statements |
| Unit | None |
| Default | 1 |
-| Value Range | 1: Run queries on vnodes and not on qnodes
-
-2: Run subtasks without scan operators on qnodes and subtasks with scan operators on vnodes.
-
-3: Only run scan operators on vnodes; run all other operators on qnodes. |
+| Value Range | 1: Run queries on vnodes and not on qnodes; 2: Run subtasks without scan operators on qnodes and subtasks with scan operators on vnodes; 3: Only run scan operators on vnodes, and run all other operators on qnodes. |
### querySmaOptimize
@@ -176,11 +172,7 @@ The parameters described in this document by the effect that they have on the sy
| Meaning | SMA index optimization policy |
| Unit | None |
| Default Value | 0 |
-| Notes |
-
-0: Disable SMA indexing and perform all queries on non-indexed data.
-
-1: Enable SMA indexing and perform queries from suitable statements on precomputation results.|
+| Notes |0: Disable SMA indexing and perform all queries on non-indexed data; 1: Enable SMA indexing and perform queries from suitable statements on precomputation results.|
### countAlwaysReturnValue
diff --git a/docs/en/14-reference/12-directory.md b/docs/en/14-reference/12-directory.md
index 19b036418f..651892c8b2 100644
--- a/docs/en/14-reference/12-directory.md
+++ b/docs/en/14-reference/12-directory.md
@@ -1,6 +1,6 @@
---
title: File directory structure
-description: "TDengine installation directory description"
+description: This document describes the structure of the TDengine directory after installation.
---
After TDengine is installed, the following directories or files will be created in the system by default.
diff --git a/docs/en/14-reference/13-schemaless/13-schemaless.md b/docs/en/14-reference/13-schemaless/13-schemaless.md
index a97a54af02..caedd76df8 100644
--- a/docs/en/14-reference/13-schemaless/13-schemaless.md
+++ b/docs/en/14-reference/13-schemaless/13-schemaless.md
@@ -1,6 +1,6 @@
---
title: Schemaless Writing
-description: 'The Schemaless write method eliminates the need to create super tables/sub tables in advance and automatically creates the storage structure corresponding to the data, as it is written to the interface.'
+description: This document describes how to use the schemaless write component of TDengine.
---
In IoT applications, data is collected for many purposes such as intelligent control, business analysis, device monitoring and so on. Due to changes in business or functional requirements or changes in device hardware, the application logic and even the data collected may change. Schemaless writing automatically creates storage structures for your data as it is being written to TDengine, so that you do not need to create supertables in advance. When necessary, schemaless writing
diff --git a/docs/en/14-reference/14-taosKeeper.md b/docs/en/14-reference/14-taosKeeper.md
index 665bc75380..0b4a1fbd60 100644
--- a/docs/en/14-reference/14-taosKeeper.md
+++ b/docs/en/14-reference/14-taosKeeper.md
@@ -1,7 +1,7 @@
---
sidebar_label: taosKeeper
title: taosKeeper
-description: exports TDengine monitoring metrics.
+description: This document describes how to use taosKeeper, a tool for exporting TDengine monitoring metrics.
---
## Introduction
diff --git a/docs/en/14-reference/index.md b/docs/en/14-reference/index.md
index f3a64913d0..bc8ec69965 100644
--- a/docs/en/14-reference/index.md
+++ b/docs/en/14-reference/index.md
@@ -1,5 +1,6 @@
---
title: Reference
+description: This document describes TDengine connectors and utilities.
---
This section describes the TDengine connectors and utilities.
diff --git a/docs/en/20-third-party/01-grafana.mdx b/docs/en/20-third-party/01-grafana.mdx
index ca32ce8afc..b33e1c1199 100644
--- a/docs/en/20-third-party/01-grafana.mdx
+++ b/docs/en/20-third-party/01-grafana.mdx
@@ -1,6 +1,7 @@
---
-sidebar_label: Grafana
title: Grafana
+sidebar_label: Grafana
+description: This document describes how to integrate TDengine with Grafana.
---
import Tabs from "@theme/Tabs";
diff --git a/docs/en/20-third-party/02-prometheus.md b/docs/en/20-third-party/02-prometheus.md
index ef9b9cb637..bfdd3d015e 100644
--- a/docs/en/20-third-party/02-prometheus.md
+++ b/docs/en/20-third-party/02-prometheus.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Prometheus
title: Prometheus writing and reading
+sidebar_label: Prometheus
+description: This document describes how to integrate TDengine with Prometheus.
---
import Prometheus from "../14-reference/_prometheus.mdx"
diff --git a/docs/en/20-third-party/03-telegraf.md b/docs/en/20-third-party/03-telegraf.md
index 8f3cab0e57..7e99b84eab 100644
--- a/docs/en/20-third-party/03-telegraf.md
+++ b/docs/en/20-third-party/03-telegraf.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Telegraf
title: Telegraf writing
+sidebar_label: Telegraf
+description: This document describes how to integrate TDengine with Telegraf.
---
import Telegraf from "../14-reference/_telegraf.mdx"
diff --git a/docs/en/20-third-party/05-collectd.md b/docs/en/20-third-party/05-collectd.md
index 5b52e3b7bc..d8c8e7f81d 100644
--- a/docs/en/20-third-party/05-collectd.md
+++ b/docs/en/20-third-party/05-collectd.md
@@ -1,6 +1,7 @@
---
-sidebar_label: collectd
title: collectd writing
+sidebar_label: collectd
+description: This document describes how to integrate TDengine with collectd.
---
import CollectD from "../14-reference/_collectd.mdx"
diff --git a/docs/en/20-third-party/06-statsd.md b/docs/en/20-third-party/06-statsd.md
index b861a48ecd..ea428e9cdb 100644
--- a/docs/en/20-third-party/06-statsd.md
+++ b/docs/en/20-third-party/06-statsd.md
@@ -1,6 +1,7 @@
---
-sidebar_label: StatsD
title: StatsD Writing
+sidebar_label: StatsD
+description: This document describes how to integrate TDengine with StatsD.
---
import StatsD from "../14-reference/_statsd.mdx"
diff --git a/docs/en/20-third-party/07-icinga2.md b/docs/en/20-third-party/07-icinga2.md
index 167b6a4303..540aae8689 100644
--- a/docs/en/20-third-party/07-icinga2.md
+++ b/docs/en/20-third-party/07-icinga2.md
@@ -1,6 +1,7 @@
---
-sidebar_label: icinga2
title: icinga2 writing
+sidebar_label: icinga2
+description: This document describes how to integrate TDengine with icinga2.
---
import Icinga2 from "../14-reference/_icinga2.mdx"
diff --git a/docs/en/20-third-party/08-tcollector.md b/docs/en/20-third-party/08-tcollector.md
index b604a2d712..f1c0ecd44d 100644
--- a/docs/en/20-third-party/08-tcollector.md
+++ b/docs/en/20-third-party/08-tcollector.md
@@ -1,6 +1,7 @@
---
-sidebar_label: TCollector
title: TCollector writing
+sidebar_label: TCollector
+description: This document describes how to integrate TDengine with TCollector.
---
import TCollector from "../14-reference/_tcollector.mdx"
diff --git a/docs/en/20-third-party/09-emq-broker.md b/docs/en/20-third-party/09-emq-broker.md
index 2ead1bbaf4..10ce0174ed 100644
--- a/docs/en/20-third-party/09-emq-broker.md
+++ b/docs/en/20-third-party/09-emq-broker.md
@@ -1,6 +1,7 @@
---
-sidebar_label: EMQX Broker
title: EMQX Broker writing
+sidebar_label: EMQX Broker
+description: This document describes how to integrate TDengine with the EMQX broker.
---
MQTT is a popular IoT data transfer protocol. [EMQX](https://github.com/emqx/emqx) is an open-source MQTT Broker software. You can write MQTT data directly to TDengine without any code. You only need to setup "rules" in EMQX Dashboard to create a simple configuration. EMQX supports saving data to TDengine by sending data to a web service and provides a native TDengine driver for direct saving in the Enterprise Edition. Please refer to the [EMQX official documentation](https://www.emqx.io/docs/en/v4.4/rule/rule-engine.html) for details on how to use it.).
diff --git a/docs/en/20-third-party/10-hive-mq-broker.md b/docs/en/20-third-party/10-hive-mq-broker.md
index 828a62ac5b..6c5165596e 100644
--- a/docs/en/20-third-party/10-hive-mq-broker.md
+++ b/docs/en/20-third-party/10-hive-mq-broker.md
@@ -1,6 +1,7 @@
---
-sidebar_label: HiveMQ Broker
title: HiveMQ Broker Writing
+sidebar_label: HiveMQ Broker
+description: This document describes how to integrate TDengine with the HiveMQ broker.
---
[HiveMQ](https://www.hivemq.com/) is an MQTT broker that provides community and enterprise editions. HiveMQ is mainly for enterprise emerging machine-to-machine M2M communication and internal transport, meeting scalability, ease of management, and security features. HiveMQ provides an open-source plug-in development kit. MQTT data can be saved to TDengine via TDengine extension for HiveMQ. For more information, see [HiveMQ TDengine Extension](https://github.com/huskar-t/hivemq-tdengine-extension/blob/b62a26ecc164a310104df57691691b237e091c89/README_EN.md).
diff --git a/docs/en/20-third-party/11-kafka.md b/docs/en/20-third-party/11-kafka.md
index 3e8f7c295d..0998862b2d 100644
--- a/docs/en/20-third-party/11-kafka.md
+++ b/docs/en/20-third-party/11-kafka.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Kafka
title: TDengine Kafka Connector Tutorial
+sidebar_label: Kafka
+description: This document describes how to integrate TDengine with Kafka.
---
TDengine Kafka Connector contains two plugins: TDengine Source Connector and TDengine Sink Connector. Users only need to provide a simple configuration file to synchronize the data of the specified topic in Kafka (batch or real-time) to TDengine or synchronize the data (batch or real-time) of the specified database in TDengine to Kafka.
diff --git a/docs/en/20-third-party/12-google-data-studio.md b/docs/en/20-third-party/12-google-data-studio.md
index fc94f98056..ea6431fa5a 100644
--- a/docs/en/20-third-party/12-google-data-studio.md
+++ b/docs/en/20-third-party/12-google-data-studio.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Google Data Studio
title: Use Google Data Studio to access TDengine
+sidebar_label: Google Data Studio
+description: This document describes how to integrate TDengine with Google Data Studio.
---
Data Studio is a powerful tool for reporting and visualization, offering a wide variety of charts and connectors and making it easy to generate reports based on predefined templates. Its ease of use and robust ecosystem have made it one of the first choices for people working in data analysis.
diff --git a/docs/en/20-third-party/13-Jupyter.md b/docs/en/20-third-party/13-Jupyter.md
index fbd7e530f0..1ac9df1da4 100644
--- a/docs/en/20-third-party/13-Jupyter.md
+++ b/docs/en/20-third-party/13-Jupyter.md
@@ -1,6 +1,7 @@
---
-sidebar_label: JupyterLab
title: Connect JupyterLab to TDengine
+sidebar_label: JupyterLab
+description: This document describes how to integrate TDengine with JupyterLab.
---
JupyterLab is the next generation of the ubiquitous Jupyter Notebook. In this note we show you how to install the TDengine Python connector to connect to TDengine in JupyterLab. You can then insert data and perform queries against the TDengine instance within JupyterLab.
diff --git a/docs/en/20-third-party/index.md b/docs/en/20-third-party/index.md
index 87bd9e0751..6fc8043eef 100644
--- a/docs/en/20-third-party/index.md
+++ b/docs/en/20-third-party/index.md
@@ -1,5 +1,6 @@
---
title: Third Party Tools
+description: This document describes how to integrate TDengine with various third-party tools.
---
Since TDengine supports standard SQL commands, common database connector standards (e.g., JDBC), ORM, and other popular time-series database writing protocols (e.g., InfluxDB Line Protocol, OpenTSDB JSON, OpenTSDB Telnet, etc.), it is very easy to integrate TDengine with other third party tools. You only need to provide simple configuration, the integration can be done without a line of code.
diff --git a/docs/en/21-tdinternal/01-arch.md b/docs/en/21-tdinternal/01-arch.md
index 697ecb98a1..cef05dcc56 100644
--- a/docs/en/21-tdinternal/01-arch.md
+++ b/docs/en/21-tdinternal/01-arch.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Architecture
title: Architecture
+sidebar_label: Architecture
+description: This document describes the architecture of TDengine.
---
## Cluster and Primary Logic Unit
diff --git a/docs/en/21-tdinternal/03-high-availability.md b/docs/en/21-tdinternal/03-high-availability.md
index e2e1c6521e..a0f6ca4ffe 100644
--- a/docs/en/21-tdinternal/03-high-availability.md
+++ b/docs/en/21-tdinternal/03-high-availability.md
@@ -1,6 +1,7 @@
---
-sidebar_label: High Availability
title: High Availability
+sidebar_label: High Availability
+description: This document describes how TDengine implements high availability.
---
## High Availability of Vnode
diff --git a/docs/en/21-tdinternal/04-load-balance.md b/docs/en/21-tdinternal/04-load-balance.md
index 7648398059..73da1c1dd6 100644
--- a/docs/en/21-tdinternal/04-load-balance.md
+++ b/docs/en/21-tdinternal/04-load-balance.md
@@ -1,6 +1,7 @@
---
-sidebar_label: Load Balance
title: Load Balance
+sidebar_label: Load Balance
+description: This document describes how TDengine implements load balancing.
---
The load balance in TDengine is mainly about processing data series data. TDengine employes builtin hash algorithm to distribute all the tables, sub-tables and their data of a database across all the vgroups that belongs to the database. Each table or sub-table can only be handled by a single vgroup, while each vgroup can process multiple table or sub-table.
diff --git a/docs/en/21-tdinternal/index.md b/docs/en/21-tdinternal/index.md
index 999d6f89ff..4f08467543 100644
--- a/docs/en/21-tdinternal/index.md
+++ b/docs/en/21-tdinternal/index.md
@@ -1,5 +1,6 @@
---
title: TDengine Inside
+description: This document describes the internals of TDengine from an architectural perspective.
---
```mdx-code-block
diff --git a/docs/en/25-application/01-telegraf.md b/docs/en/25-application/01-telegraf.md
index 65fb08ee67..e043aebcb6 100644
--- a/docs/en/25-application/01-telegraf.md
+++ b/docs/en/25-application/01-telegraf.md
@@ -1,6 +1,7 @@
---
-sidebar_label: TDengine + Telegraf + Grafana
title: Quickly Build IT DevOps Visualization System with TDengine + Telegraf + Grafana
+sidebar_label: TDengine + Telegraf + Grafana
+description: This document describes how to create an IT visualization system by integrating TDengine with Telegraf and Grafana.
---
## Background
diff --git a/docs/en/25-application/02-collectd.md b/docs/en/25-application/02-collectd.md
index 97412b2309..6ac7253fc4 100644
--- a/docs/en/25-application/02-collectd.md
+++ b/docs/en/25-application/02-collectd.md
@@ -1,6 +1,7 @@
---
-sidebar_label: TDengine + collectd/StatsD + Grafana
title: Quickly build an IT DevOps visualization system using TDengine + collectd/StatsD + Grafana
+sidebar_label: TDengine + collectd/StatsD + Grafana
+description: This document describes how to build an IT visualization system by integrating TDengine with Grafana and collectd or StatsD.
---
## Background
diff --git a/docs/en/25-application/03-immigrate.md b/docs/en/25-application/03-immigrate.md
index 1aabaa43e7..30d069e4e2 100644
--- a/docs/en/25-application/03-immigrate.md
+++ b/docs/en/25-application/03-immigrate.md
@@ -1,6 +1,7 @@
---
-sidebar_label: OpenTSDB Migration to TDengine
title: Best Practices for Migrating OpenTSDB Applications to TDengine
+sidebar_label: OpenTSDB Migration to TDengine
+description: This document describes the best practices for migrating an OpenTSDB application to TDengine.
---
As a distributed, scalable, distributed time-series database platform based on HBase, and thanks to its first-mover advantage, OpenTSDB is widely used for monitoring in DevOps. However, as new technologies like cloud computing, microservices, and containerization technology has developed rapidly, Enterprise-level services are becoming more and more diverse and the architecture is becoming more complex.
diff --git a/docs/en/25-application/index.md b/docs/en/25-application/index.md
index 5383a00c67..178fef47b6 100644
--- a/docs/en/25-application/index.md
+++ b/docs/en/25-application/index.md
@@ -1,5 +1,6 @@
---
title: Application Practice
+description: This document describes some examples of building systems around TDengine.
---
```mdx-code-block
diff --git a/docs/en/27-train-faq/01-faq.md b/docs/en/27-train-faq/01-faq.md
index 7650e97365..9e7f4f8e0d 100644
--- a/docs/en/27-train-faq/01-faq.md
+++ b/docs/en/27-train-faq/01-faq.md
@@ -1,5 +1,6 @@
---
title: Frequently Asked Questions
+description: This document describes the frequently asked questions about TDengine.
---
## Submit an Issue
diff --git a/docs/en/27-train-faq/index.md b/docs/en/27-train-faq/index.md
index 2cb87aab00..cc55a41559 100644
--- a/docs/en/27-train-faq/index.md
+++ b/docs/en/27-train-faq/index.md
@@ -1,5 +1,6 @@
---
title: FAQ & Others
+description: This document describes common issues related with TDengine.
---
```mdx-code-block
diff --git a/docs/en/28-releases/01-tdengine.md b/docs/en/28-releases/01-tdengine.md
index 83ea3eb5e6..a6a28e04c4 100644
--- a/docs/en/28-releases/01-tdengine.md
+++ b/docs/en/28-releases/01-tdengine.md
@@ -1,7 +1,7 @@
---
-sidebar_label: TDengine
title: TDengine Release History and Download Links
-description: TDengine release history, Release Notes and download links.
+sidebar_label: TDengine
+description: This document provides download links for all released versions of TDengine 3.0.
---
TDengine 3.x installation packages can be downloaded at the following links:
diff --git a/docs/en/28-releases/02-tools.md b/docs/en/28-releases/02-tools.md
index 97fed654f2..3c1dc32f8d 100644
--- a/docs/en/28-releases/02-tools.md
+++ b/docs/en/28-releases/02-tools.md
@@ -1,7 +1,7 @@
---
-sidebar_label: taosTools
title: taosTools Release History and Download Links
-description: taosTools release history, Release Notes, download links.
+sidebar_label: taosTools
+description: This document provides download links for all released versions of taosTools compatible with TDengine 3.0.
---
taosTools installation packages can be downloaded at the following links:
diff --git a/docs/en/28-releases/index.md b/docs/en/28-releases/index.md
index c01c99cdce..d1f93c3b9b 100644
--- a/docs/en/28-releases/index.md
+++ b/docs/en/28-releases/index.md
@@ -1,5 +1,6 @@
---
title: Releases
+description: This document describes TDengine products that have been released.
---
```mdx-code-block
diff --git a/docs/examples/csharp/wsConnect/wsConnect.csproj b/docs/examples/csharp/wsConnect/wsConnect.csproj
index 6d78be6e7a..c7988b6e9c 100644
--- a/docs/examples/csharp/wsConnect/wsConnect.csproj
+++ b/docs/examples/csharp/wsConnect/wsConnect.csproj
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
diff --git a/docs/examples/csharp/wsInsert/wsInsert.csproj b/docs/examples/csharp/wsInsert/wsInsert.csproj
index 95bfbdea3d..5aa419b2c8 100644
--- a/docs/examples/csharp/wsInsert/wsInsert.csproj
+++ b/docs/examples/csharp/wsInsert/wsInsert.csproj
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
enable
diff --git a/docs/examples/csharp/wsQuery/wsQuery.csproj b/docs/examples/csharp/wsQuery/wsQuery.csproj
index e5c2cf767c..bcc7c19a59 100644
--- a/docs/examples/csharp/wsQuery/wsQuery.csproj
+++ b/docs/examples/csharp/wsQuery/wsQuery.csproj
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
enable
diff --git a/docs/examples/csharp/wsStmt/wsStmt.csproj b/docs/examples/csharp/wsStmt/wsStmt.csproj
index e5c2cf767c..bcc7c19a59 100644
--- a/docs/examples/csharp/wsStmt/wsStmt.csproj
+++ b/docs/examples/csharp/wsStmt/wsStmt.csproj
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
enable
diff --git a/docs/examples/node/restexample/connect.js b/docs/examples/node/restexample/connect.js
index bb027d4fe8..f36472b4c0 100644
--- a/docs/examples/node/restexample/connect.js
+++ b/docs/examples/node/restexample/connect.js
@@ -3,18 +3,14 @@ const { options, connect } = require("@tdengine/rest");
async function test() {
options.path = "/rest/sql";
options.host = "localhost";
+ options.port = 6041;
let conn = connect(options);
let cursor = conn.cursor();
try {
let res = await cursor.query("SELECT server_version()");
- res.toString();
+ console.log("res.getResult()",res.getResult());
} catch (err) {
console.log(err);
}
}
test();
-
-// output:
-// server_version() |
-// ===================
-// 3.0.0.0 |
diff --git a/docs/examples/python/connection_usage_native_reference.py b/docs/examples/python/connection_usage_native_reference.py
index 8b754ec722..0a23c5f95b 100644
--- a/docs/examples/python/connection_usage_native_reference.py
+++ b/docs/examples/python/connection_usage_native_reference.py
@@ -42,4 +42,4 @@ print(data)
# ANCHOR_END: query
-conn.close()
+conn.close()
\ No newline at end of file
diff --git a/docs/examples/python/kafka_example.py b/docs/examples/python/kafka_example.py
index 43f9183f7e..5b81706ef7 100644
--- a/docs/examples/python/kafka_example.py
+++ b/docs/examples/python/kafka_example.py
@@ -106,8 +106,8 @@ class Consumer(object):
for task in self.tasks:
while not task.done():
pass
- if self.pool is not None:
- self.pool.shutdown()
+ if self.pool is not None:
+ self.pool.shutdown()
# clean data
if self.config.get('clean_after_testing'):
diff --git a/docs/zh/08-connector/35-node.mdx b/docs/zh/08-connector/35-node.mdx
index 35c28e3b9f..f2aff41da2 100644
--- a/docs/zh/08-connector/35-node.mdx
+++ b/docs/zh/08-connector/35-node.mdx
@@ -62,6 +62,16 @@ REST 连接器支持所有能运行 Node.js 的平台。
- C 语言编译器,[GCC](https://gcc.gnu.org) v4.8.5 或更高版本
+
+
+
+- `python` (建议`v2.7` , `v3.x.x` 目前还不支持)
+- `@tdengine/client` 3.0.0 目前是只支持 Node.js v12.22.12 或 v12 的更高版本;其他版本可能存在包兼容性的问题
+- `make`
+- C 语言编译器,[GCC](https://gcc.gnu.org) v4.8.5 或更高版本
+
+
+
- 安装方法 1
diff --git a/docs/zh/12-taos-sql/02-database.md b/docs/zh/12-taos-sql/02-database.md
index fc35da8636..b0a84af6dc 100644
--- a/docs/zh/12-taos-sql/02-database.md
+++ b/docs/zh/12-taos-sql/02-database.md
@@ -142,7 +142,7 @@ SHOW DATABASES;
### 显示一个数据库的创建语句
```
-SHOW CREATE DATABASE db_name;
+SHOW CREATE DATABASE db_name \G;
```
常用于数据库迁移。对一个已经存在的数据库,返回其创建语句;在另一个集群中执行该语句,就能得到一个设置完全相同的 Database。
@@ -150,7 +150,7 @@ SHOW CREATE DATABASE db_name;
### 查看数据库参数
```sql
-SELECT * FROM INFORMATION_SCHEMA.INS_DATABASES WHERE NAME='DBNAME' \G;
+SELECT * FROM INFORMATION_SCHEMA.INS_DATABASES WHERE NAME='db_name' \G;
```
会列出指定数据库的配置参数,并且每行只显示一个参数。
@@ -177,4 +177,4 @@ REDISTRIBUTE VGROUP vgroup_no DNODE dnode_id1 [DNODE dnode_id2] [DNODE dnode_id3
BALANCE VGROUP
```
-自动调整集群所有vgroup中的vnode分布,相当于在vnode级别对集群进行数据的负载均衡操作。
\ No newline at end of file
+自动调整集群所有vgroup中的vnode分布,相当于在vnode级别对集群进行数据的负载均衡操作。
diff --git a/docs/zh/12-taos-sql/05-insert.md b/docs/zh/12-taos-sql/05-insert.md
index ccb8f40b21..b72754b154 100644
--- a/docs/zh/12-taos-sql/05-insert.md
+++ b/docs/zh/12-taos-sql/05-insert.md
@@ -28,7 +28,7 @@ INSERT INTO tb_name [(field1_name, ...)] subquery
2. 时间戳不同的格式语法会有不同的精度影响。字符串格式的时间戳写法不受所在 DATABASE 的时间精度设置影响;而长整形格式的时间戳写法会受到所在 DATABASE 的时间精度设置影响。例如,时间戳"2021-07-13 16:16:48"的 UNIX 秒数为 1626164208。则其在毫秒精度下需要写作 1626164208000,在微秒精度设置下就需要写为 1626164208000000,纳秒精度设置下需要写为 1626164208000000000。
3. 一次插入多行数据时,不要把首列的时间戳的值都写 NOW。否则会导致语句中的多条记录使用相同的时间戳,于是就可能出现相互覆盖以致这些数据行无法全部被正确保存。其原因在于,NOW 函数在执行中会被解析为所在 SQL 语句的客户端执行时间,出现在同一语句中的多个 NOW 标记也就会被替换为完全相同的时间戳取值。
- 允许插入的最老记录的时间戳,是相对于当前服务器时间,减去配置的 KEEP 值(数据保留的天数)。允许插入的最新记录的时间戳,是相对于当前服务器时间,加上配置的 DURATION 值(数据文件存储数据的时间跨度,单位为天)。KEEP 和 DURATION 都是可以在创建数据库时指定的,缺省值分别是 3650 天和 10 天。
+ 允许插入的最老记录的时间戳,是相对于当前服务器时间,减去配置的 KEEP 值(数据保留的天数, 可以在创建数据库时指定,缺省值是 3650 天)。允许插入的最新记录的时间戳,取决于数据库的 PRECISION 值(时间戳精度, 可以在创建数据库时指定, ms 表示毫秒,us 表示微秒,ns 表示纳秒,默认毫秒):如果是毫秒或微秒, 取值为 1970 年 1 月 1 日 00:00:00.000 UTC 加上 1000 年, 即 2970 年 1 月 1 日 00:00:00.000 UTC; 如果是纳秒, 取值为 1970 年 1 月 1 日 00:00:00.000000000 UTC 加上 292 年, 即 2262 年 1 月 1 日 00:00:00.000000000 UTC。
**语法说明**
diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md
index 503f692764..28b409de30 100644
--- a/docs/zh/14-reference/12-config/index.md
+++ b/docs/zh/14-reference/12-config/index.md
@@ -162,11 +162,7 @@ taos --dump-config
| 含义 | 查询语句的执行策略 |
| 单位 | 无 |
| 缺省值 | 1 |
-| 补充说明 | 1: 只使用 vnode,不使用 qnode |
-
-2: 没有扫描算子的子任务在 qnode 执行,带扫描算子的子任务在 vnode 执行
-
-3: vnode 只运行扫描算子,其余算子均在 qnode 执行 |
+| 补充说明 | 1: 只使用 vnode,不使用 qnode; 2: 没有扫描算子的子任务在 qnode 执行,带扫描算子的子任务在 vnode 执行; 3: vnode 只运行扫描算子,其余算子均在 qnode 执行 |
### querySmaOptimize
@@ -176,11 +172,7 @@ taos --dump-config
| 含义 | sma index 的优化策略 |
| 单位 | 无 |
| 缺省值 | 0 |
-| 补充说明 |
-
-0: 表示不使用 sma index,永远从原始数据进行查询
-
-1: 表示使用 sma index,对符合的语句,直接从预计算的结果进行查询 |
+| 补充说明 |0: 表示不使用 sma index,永远从原始数据进行查询; 1: 表示使用 sma index,对符合的语句,直接从预计算的结果进行查询 |
### maxNumOfDistinctRes
@@ -389,7 +381,7 @@ charset 的有效值是 UTF-8。
| 属性 | 说明 |
| -------- | -------------------------------------------- |
| 适用范围 | 服务端和客户端均适用 |
-| 含义 | 当日志文件夹的磁盘大小小于该值时,停止写日志 |
+| 含义 | 当日志文件夹所在磁盘可用空间大小小于该值时,停止写日志 |
| 单位 | GB |
| 缺省值 | 1.0 |
diff --git a/examples/nodejs/node-example-raw.js b/examples/nodejs/node-example-raw.js
deleted file mode 100644
index 058a50c4c3..0000000000
--- a/examples/nodejs/node-example-raw.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/* This example is to show how to use the td-connector through the cursor only and is a bit more raw.
- * No promises, object wrappers around data, functions that prettify the data, or anything.
- * The cursor will generally use callback functions over promises, and return and store the raw data from the C Interface.
- * It is advised to use the td-connector through the cursor and the TaosQuery class amongst other higher level APIs.
-*/
-
-// Get the td-connector package
-const taos = require('td2.0-connector');
-
-/* We will connect to TDengine by passing an object comprised of connection options to taos.connect and store the
- * connection to the variable conn
- */
-/*
- * Connection Options
- * host: the host to connect to
- * user: the use to login as
- * password: the password for the above user to login
- * config: the location of the taos.cfg file, by default it is in /etc/taos
- * port: the port we connect through
- */
-var conn = taos.connect({host:"127.0.0.1", user:"root", password:"taosdata", config:"/etc/taos",port:0});
-
-// Initialize our TDengineCursor, which we use to interact with TDengine
-var c1 = conn.cursor();
-
-// c1.execute(query) will execute the query
-// Let's create a database named db
-try {
- c1.execute('create database if not exists db;');
-}
-catch(err) {
- conn.close();
- throw err;
-}
-
-// Now we will use database db
-try {
- c1.execute('use db;');
-}
-catch (err) {
- conn.close();
- throw err;
-}
-
-// Let's create a table called weather
-// which stores some weather data like humidity, AQI (air quality index), temperature, and some notes as text
-try {
- c1.execute('create table if not exists weather (ts timestamp, humidity smallint, aqi int, temperature float, notes binary(30));');
-}
-catch (err) {
- conn.close();
- throw err;
-}
-
-// Let's get the description of the table weather
-try {
- c1.execute('describe db.weather');
-}
-catch (err) {
- conn.close();
- throw err;
-}
-
-// To get results, we run the function c1.fetchall()
-// It only returns the query results as an array of result rows, but also stores the latest results in c1.data
-try {
- var tableDesc = c1.fetchall(); // The description variable here is equal to c1.data;
- console.log(tableDesc);
-}
-catch (err) {
- conn.close();
- throw err;
-}
-
-// Let's try to insert some random generated data to test with
-
-let stime = new Date();
-let interval = 1000;
-
-// Timestamps must be in the form of "YYYY-MM-DD HH:MM:SS.MMM" if they are in milliseconds
-// "YYYY-MM-DD HH:MM:SS.MMMMMM" if they are in microseconds
-// Thus, we create the following function to convert a javascript Date object to the correct formatting
-function convertDateToTS(date) {
- let tsArr = date.toISOString().split("T")
- return "\"" + tsArr[0] + " " + tsArr[1].substring(0, tsArr[1].length-1) + "\"";
-}
-
-try {
- for (let i = 0; i < 10000; i++) {
- stime.setMilliseconds(stime.getMilliseconds() + interval);
- let insertData = [convertDateToTS(stime),
- parseInt(Math.random()*100),
- parseInt(Math.random()*300),
- parseFloat(Math.random()*10 + 30),
- "\"random note!\""];
- c1.execute('insert into db.weather values(' + insertData.join(',') + ' );');
- }
-}
-catch (err) {
- conn.close();
- throw err;
-}
-
-// Now let's look at our newly inserted data
-var retrievedData;
-try {
- c1.execute('select * from db.weather;')
- retrievedData = c1.fetchall();
-
- // c1.fields stores the names of each column retrieved
- console.log(c1.fields);
- console.log(retrievedData);
- // timestamps retrieved are always JS Date Objects
- // Numbers are numbers, big ints are big ints, and strings are strings
-}
-catch (err) {
- conn.close();
- throw err;
-}
-
-// Let's try running some basic functions
-try {
- c1.execute('select count(*), avg(temperature), max(temperature), min(temperature), stddev(temperature) from db.weather;')
- c1.fetchall();
- console.log(c1.fields);
- console.log(c1.data);
-}
-catch(err) {
- conn.close();
- throw err;
-}
-
-conn.close();
-
-// Feel free to fork this repository or copy this code and start developing your own apps and backends with NodeJS and TDengine!
diff --git a/examples/nodejs/node-example.js b/examples/nodejs/node-example.js
deleted file mode 100644
index bfdd9e49a0..0000000000
--- a/examples/nodejs/node-example.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/* This example is to show the preferred way to use the td-connector */
-/* To run, enter node path/to/node-example.js */
-// Get the td-connector package
-const taos = require('td2.0-connector');
-
-/* We will connect to TDengine by passing an object comprised of connection options to taos.connect and store the
- * connection to the variable conn
- */
-/*
- * Connection Options
- * host: the host to connect to
- * user: the use to login as
- * password: the password for the above user to login
- * config: the location of the taos.cfg file, by default it is in /etc/taos
- * port: the port we connect through
- */
-var conn = taos.connect({host:"127.0.0.1", user:"root", password:"taosdata", config:"/etc/taos",port:0});
-
-// Initialize our TDengineCursor, which we use to interact with TDengine
-var c1 = conn.cursor();
-
-// c1.query(query) will return a TaosQuery object, of which then we can execute. The execute function then returns a promise
-// Let's create a database named db
-try {
- c1.execute('create database if not exists db;');
- //var query = c1.query('create database if not exists db;');
- //query.execute();
-}
-catch(err) {
- conn.close();
- throw err;
-}
-
-// Now we will use database db. As this query won't return any results,
-// we can simplify the code and directly use the c1.execute() function. No need for a TaosQuery object to wrap around the query
-try {
- c1.execute('use db;');
-}
-catch (err) {
- conn.close();
- throw err;
-}
-
-// Let's create a table called weather
-// which stores some weather data like humidity, AQI (air quality index), temperature, and some notes as text
-// We can also immedietely execute a TaosQuery object by passing true as the secodn argument
-// This will then return a promise that we can then attach a callback function to
-try {
- var promise = c1.query('create table if not exists weather (ts timestamp, humidity smallint, aqi int, temperature float, notes binary(30));', true);
- promise.then(function(){
- console.log("Table created!");
- }).catch(function() {
- console.log("Table couldn't be created.")
- });
-}
-catch (err) {
- conn.close();
- throw err;
-}
-
-// Let's get the description of the table weather
-// When using a TaosQuery object and then executing it, upon success it returns a TaosResult object, which is a wrapper around the
-// retrieved data and allows us to easily access data and manipulate or display it.
-try {
- c1.query('describe db.weather;').execute().then(function(result){
- // Result is an instance of TaosResult and has the function pretty() which instantly logs a prettified version to the console
- result.pretty();
- });
-}
-catch (err) {
- conn.close();
- throw err;
-}
-
-
-Date.prototype.Format = function(fmt){
- var o = {
- 'M+': this.getMonth() + 1,
- 'd+': this.getDate(),
- 'H+': this.getHours(),
- 'm+': this.getMinutes(),
- 's+': this.getSeconds(),
- 'S+': this.getMilliseconds()
- };
- if (/(y+)/.test(fmt)) {
- fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
- }
- for (var k in o) {
- if (new RegExp('(' + k + ')').test(fmt)) {
- fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(String(o[k]).length)));
- }
- }
- return fmt;
-}
-
-
-// Let's try to insert some random generated data to test with
-// We will use the bind function of the TaosQuery object to easily bind values to question marks in the query
-// For Timestamps, a normal Datetime object or TaosTimestamp or milliseconds can be passed in through the bind function
-let stime = new Date();
-let interval = 1000;
-try {
- for (let i = 0; i < 1000; i++) {
- stime.setMilliseconds(stime.getMilliseconds() + interval);
-
- //console.log(stime.Format('yyyy-MM-dd HH:mm:ss.SSS'));
-
- let insertData = [stime,
- parseInt(Math.random()*100),
- parseInt(Math.random()*300),
- parseFloat(Math.random()*10 + 30),
- "Note"];
- //c1.execute('insert into db.weather values(' + insertData.join(',') + ' );');
-
- //var query = c1.query('insert into db.weather values(?, ?, ?, ?, ?);').bind(insertData);
- //query.execute();
- c1.execute('insert into db.weather values(\"'+stime.Format('yyyy-MM-dd HH:mm:ss.SSS')+'\",'+parseInt(Math.random() * 100)+','+parseInt(Math.random() * 300)+','+parseFloat(Math.random()*10 + 30)+',"Note");');
- }
-}catch (err) {
- conn.close();
- throw err;
-}
-
-// Now let's look at our newly inserted data
-var retrievedData;
-try {
- c1.query('select * from db.weather limit 5 offset 100;', true).then(function(result){
- //result.pretty();
- console.log('=========>'+JSON.stringify(result));
- // Neat!
- });
-
-}
-catch (err) {
- conn.close();
- throw err;
-}
-
-// Let's try running some basic functions
-try {
- c1.query('select count(*), avg(temperature), max(temperature), min(temperature), stddev(temperature) from db.weather;', true)
- .then(function(result) {
- result.pretty();
- })
-}
-catch(err) {
- conn.close();
- throw err;
-}
-
-conn.close();
-
-// Feel free to fork this repository or copy this code and start developing your own apps and backends with NodeJS and TDengine!
diff --git a/examples/nodejs/nodejsChecker.js b/examples/nodejs/nodejsChecker.js
index e634a54ea1..58b27dad67 100644
--- a/examples/nodejs/nodejsChecker.js
+++ b/examples/nodejs/nodejsChecker.js
@@ -1,29 +1,27 @@
-const taos = require('td2.0-connector');
-//const taos = require('../../../src/connector/nodejs/');
-
+const taos = require("@tdengine/client");
var host = null;
var port = 6030;
for(var i = 2; i < global.process.argv.length; i++){
- var key = global.process.argv[i].split("=")[0];
- var value = global.process.argv[i].split("=")[1];
-
- if("host" == key){
- host = value;
- }
- if("port" == key){
- port = value;
- }
+ var key = global.process.argv[i].split("=")[0];
+ var value = global.process.argv[i].split("=")[1];
+
+ if("host" == key){
+ host = value;
+ }
+ if("port" == key){
+ port = value;
+ }
}
if(host == null){
- console.log("Usage: node nodejsChecker.js host= port=");
- process.exit(0);
+ console.log("Usage: node nodejsChecker.js host= port=");
+ process.exit(0);
}
// establish connection
var conn = taos.connect({host:host, user:"root", password:"taosdata",port:port});
-var cursor = conn.cursor();
+var cursor = conn.cursor();
// create database
executeSql("create database if not exists test", 0);
// use db
@@ -40,22 +38,22 @@ executeQuery("select * from test.weather");
conn.close();
function executeQuery(sql){
- var start = new Date().getTime();
- var promise = cursor.query(sql, true);
- var end = new Date().getTime();
- promise.then(function(result){
- printSql(sql, result != null,(end - start));
- result.pretty();
- });
+ var start = new Date().getTime();
+ var promise = cursor.query(sql, true);
+ var end = new Date().getTime();
+ promise.then(function(result){
+ printSql(sql, result != null,(end - start));
+ result.pretty();
+ });
}
function executeSql(sql, affectRows){
- var start = new Date().getTime();
- var promise = cursor.execute(sql);
- var end = new Date().getTime();
- printSql(sql, promise == affectRows, (end - start));
+ var start = new Date().getTime();
+ var promise = cursor.execute(sql);
+ var end = new Date().getTime();
+ printSql(sql, promise == affectRows, (end - start));
}
function printSql(sql, succeed, cost){
- console.log("[ "+(succeed ? "OK" : "ERROR!")+" ] time cost: " + cost + " ms, execute statement ====> " + sql);
-}
+ console.log("[ "+(succeed ? "OK" : "ERROR!")+" ] time cost: " + cost + " ms, execute statement ====> " + sql);
+}
\ No newline at end of file
diff --git a/examples/nodejs/test1970.js b/examples/nodejs/test1970.js
deleted file mode 100644
index 5177a7371e..0000000000
--- a/examples/nodejs/test1970.js
+++ /dev/null
@@ -1,125 +0,0 @@
-const taos = require('td2.0-connector');
-var conn = taos.connect({host:"127.0.0.1", user:"root", password:"taosdata", config:"/etc/taos",port:0})
-var c1 = conn.cursor(); // Initializing a new cursor
-
-let stime = new Date();
-let interval = 1000;
-
-function convertDateToTS(date) {
- let tsArr = date.toISOString().split("T")
- return "\"" + tsArr[0] + " " + tsArr[1].substring(0, tsArr[1].length - 1) + "\"";
-}
-
-function R(l, r) {
- return Math.random() * (r - l) - r;
-}
-
-function randomBool() {
- if (Math.random() < 0.5) {
- return true;
- }
- return false;
-}
-
-// Initialize
-const dbname = "nodejs_1970_db";
-const tbname = "t1";
-
-let dropDB = "drop database if exists " + dbname
-console.log(dropDB);//asdasdasd
-c1.execute(dropDB);///asdasd
-
-let createDB = "create database " + dbname + " keep 36500"
-console.log(createDB);
-c1.execute(createDB);
-
-let useTbl = "use " + dbname
-console.log(useTbl)
-c1.execute(useTbl);
-
-let createTbl = "create table if not exists " + tbname + "(ts timestamp,id int)"
-console.log(createTbl);
-c1.execute(createTbl);
-
-//1969-12-31 23:59:59.999
-//1970-01-01 00:00:00.000
-//1970-01-01 07:59:59.999
-//1970-01-01 08:00:00.000a
-//1628928479484 2021-08-14 08:07:59.484
-let sql1 = "insert into " + dbname + "." + tbname + " values('1969-12-31 23:59:59.999',1)"
-console.log(sql1);
-c1.execute(sql1);
-
-let sql2 = "insert into " + dbname + "." + tbname + " values('1970-01-01 00:00:00.000',2)"
-console.log(sql2);
-c1.execute(sql2);
-
-let sql3 = "insert into " + dbname + "." + tbname + " values('1970-01-01 07:59:59.999',3)"
-console.log(sql3);
-c1.execute(sql3);
-
-let sql4 = "insert into " + dbname + "." + tbname + " values('1970-01-01 08:00:00.000',4)"
-console.log(sql4);
-c1.execute(sql4);
-
-let sql5 = "insert into " + dbname + "." + tbname + " values('2021-08-14 08:07:59.484',5)"
-console.log(sql5);
-c1.execute(sql5);
-
-// Select
-let query1 = "select * from " + dbname + "." + tbname
-console.log(query1);
-c1.execute(query1);
-
-var d = c1.fetchall();
-console.log(c1.fields);
-for (let i = 0; i < d.length; i++)
- console.log(d[i][0].valueOf());
-
-//initialize
-let initSql1 = "drop table if exists " + tbname
-console.log(initSql1);
-c1.execute(initSql1);
-
-console.log(createTbl);
-c1.execute(createTbl);
-c1.execute(useTbl)
-
-//-28800001 1969-12-31 23:59:59.999
-//-28800000 1970-01-01 00:00:00.000
-//-1 1970-01-01 07:59:59.999
-//0 1970-01-01 08:00:00.00
-//1628928479484 2021-08-14 08:07:59.484
-let sql11 = "insert into " + dbname + "." + tbname + " values(-28800001,11)";
-console.log(sql11);
-c1.execute(sql11);
-
-let sql12 = "insert into " + dbname + "." + tbname + " values(-28800000,12)"
-console.log(sql12);
-c1.execute(sql12);
-
-let sql13 = "insert into " + dbname + "." + tbname + " values(-1,13)"
-console.log(sql13);
-c1.execute(sql13);
-
-let sql14 = "insert into " + dbname + "." + tbname + " values(0,14)"
-console.log(sql14);
-c1.execute(sql14);
-
-let sql15 = "insert into " + dbname + "." + tbname + " values(1628928479484,15)"
-console.log(sql15);
-c1.execute(sql15);
-
-// Select
-console.log(query1);
-c1.execute(query1);
-
-var d = c1.fetchall();
-console.log(c1.fields);
-for (let i = 0; i < d.length; i++)
- console.log(d[i][0].valueOf());
-
-setTimeout(function () {
- conn.close();
-}, 2000);
-
diff --git a/include/common/tmsg.h b/include/common/tmsg.h
index 68c1744ad2..e65b07f084 100644
--- a/include/common/tmsg.h
+++ b/include/common/tmsg.h
@@ -1279,6 +1279,25 @@ typedef struct {
int32_t tSerializeSAlterVnodeReplicaReq(void* buf, int32_t bufLen, SAlterVnodeReplicaReq* pReq);
int32_t tDeserializeSAlterVnodeReplicaReq(void* buf, int32_t bufLen, SAlterVnodeReplicaReq* pReq);
+typedef struct {
+ int32_t vgId;
+ int8_t disable;
+} SDisableVnodeWriteReq;
+
+int32_t tSerializeSDisableVnodeWriteReq(void* buf, int32_t bufLen, SDisableVnodeWriteReq* pReq);
+int32_t tDeserializeSDisableVnodeWriteReq(void* buf, int32_t bufLen, SDisableVnodeWriteReq* pReq);
+
+typedef struct {
+ int32_t srcVgId;
+ int32_t dstVgId;
+ uint32_t hashBegin;
+ uint32_t hashEnd;
+ int64_t reserved;
+} SAlterVnodeHashRangeReq;
+
+int32_t tSerializeSAlterVnodeHashRangeReq(void* buf, int32_t bufLen, SAlterVnodeHashRangeReq* pReq);
+int32_t tDeserializeSAlterVnodeHashRangeReq(void* buf, int32_t bufLen, SAlterVnodeHashRangeReq* pReq);
+
typedef struct {
SMsgHead header;
char dbFName[TSDB_DB_FNAME_LEN];
diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h
index 7833bdf139..44ee26ef24 100644
--- a/include/common/tmsgdef.h
+++ b/include/common/tmsgdef.h
@@ -220,6 +220,7 @@ enum {
TD_DEF_MSG_TYPE(TDMT_VND_DROP_TTL_TABLE, "vnode-drop-ttl-stb", NULL, NULL)
TD_DEF_MSG_TYPE(TDMT_VND_TRIM, "vnode-trim", NULL, NULL)
TD_DEF_MSG_TYPE(TDMT_VND_COMMIT, "vnode-commit", NULL, NULL)
+ TD_DEF_MSG_TYPE(TDMT_VND_DISABLE_WRITE, "vnode-disable-write", NULL, NULL)
TD_DEF_MSG_TYPE(TDMT_VND_MAX_MSG, "vnd-max", NULL, NULL)
TD_NEW_MSG_SEG(TDMT_SCH_MSG)
diff --git a/include/libs/parser/parser.h b/include/libs/parser/parser.h
index 8f22745973..51b285cddd 100644
--- a/include/libs/parser/parser.h
+++ b/include/libs/parser/parser.h
@@ -86,10 +86,11 @@ void qCleanupKeywordsTable();
int32_t qBuildStmtOutput(SQuery* pQuery, SHashObj* pVgHash, SHashObj* pBlockHash);
int32_t qResetStmtDataBlock(STableDataCxt* block, bool keepBuf);
int32_t qCloneStmtDataBlock(STableDataCxt** pDst, STableDataCxt* pSrc, bool reset);
-int32_t qRebuildStmtDataBlock(STableDataCxt** pDst, STableDataCxt* pSrc, uint64_t uid, uint64_t suid, int32_t vgId, bool rebuildCreateTb);
+int32_t qRebuildStmtDataBlock(STableDataCxt** pDst, STableDataCxt* pSrc, uint64_t uid, uint64_t suid, int32_t vgId,
+ bool rebuildCreateTb);
void qDestroyStmtDataBlock(STableDataCxt* pBlock);
STableMeta* qGetTableMetaInDataBlock(STableDataCxt* pDataBlock);
-int32_t qCloneCurrentTbData(STableDataCxt* pDataBlock, SSubmitTbData **pData);
+int32_t qCloneCurrentTbData(STableDataCxt* pDataBlock, SSubmitTbData** pData);
int32_t qStmtBindParams(SQuery* pQuery, TAOS_MULTI_BIND* pParams, int32_t colIdx);
int32_t qStmtParseQuerySql(SParseContext* pCxt, SQuery* pQuery);
@@ -104,18 +105,20 @@ void destroyBoundColumnInfo(void* pBoundInfo);
int32_t qCreateSName(SName* pName, const char* pTableName, int32_t acctId, char* dbName, char* msgBuf,
int32_t msgBufLen);
-void qDestroyBoundColInfo(void* pInfo);
+void qDestroyBoundColInfo(void* pInfo);
-SQuery* smlInitHandle();
-int32_t smlBuildRow(STableDataCxt* pTableCxt);
-int32_t smlBuildCol(STableDataCxt* pTableCxt, SSchema* schema, void *kv, int32_t index);
+SQuery* smlInitHandle();
+int32_t smlBuildRow(STableDataCxt* pTableCxt);
+int32_t smlBuildCol(STableDataCxt* pTableCxt, SSchema* schema, void* kv, int32_t index);
STableDataCxt* smlInitTableDataCtx(SQuery* query, STableMeta* pTableMeta);
-int32_t smlBindData(SQuery* handle, bool dataFormat, SArray* tags, SArray* colsSchema, SArray* cols, STableMeta* pTableMeta,
- char* tableName, const char* sTableName, int32_t sTableNameLen, int32_t ttl, char* msgBuf, int16_t msgBufLen);
+int32_t smlBindData(SQuery* handle, bool dataFormat, SArray* tags, SArray* colsSchema, SArray* cols,
+ STableMeta* pTableMeta, char* tableName, const char* sTableName, int32_t sTableNameLen, int32_t ttl,
+ char* msgBuf, int16_t msgBufLen);
int32_t smlBuildOutput(SQuery* handle, SHashObj* pVgHash);
-int rawBlockBindData(SQuery *query, STableMeta* pTableMeta, void* data, SVCreateTbReq* pCreateTb, TAOS_FIELD *fields, int numFields);
+int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreateTbReq* pCreateTb, TAOS_FIELD* fields,
+ int numFields);
int32_t rewriteToVnodeModifyOpStmt(SQuery* pQuery, SArray* pBufArray);
SArray* serializeVgroupsCreateTableBatch(SHashObj* pVgroupHashmap);
diff --git a/include/libs/tfs/tfs.h b/include/libs/tfs/tfs.h
index 3af75e0eaf..cbf1d60e35 100644
--- a/include/libs/tfs/tfs.h
+++ b/include/libs/tfs/tfs.h
@@ -150,7 +150,7 @@ int32_t tfsRmdir(STfs *pTfs, const char *rname);
* @param nrname The rel name of new file.
* @return int32_t 0 for success, -1 for failure.
*/
-int32_t tfsRename(STfs *pTfs, char *orname, char *nrname);
+int32_t tfsRename(STfs *pTfs, const char *orname, const char *nrname);
/**
* @brief Init file object in tfs.
diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh
index 7f95ca3d72..dfdbaa6fdd 100755
--- a/packaging/tools/install.sh
+++ b/packaging/tools/install.sh
@@ -210,8 +210,8 @@ function install_bin() {
[ -x ${install_main_dir}/bin/${serverName} ] && ${csudo}ln -s ${install_main_dir}/bin/${serverName} ${bin_link_dir}/${serverName} || :
[ -x ${install_main_dir}/bin/${udfdName} ] && ${csudo}ln -s ${install_main_dir}/bin/${udfdName} ${bin_link_dir}/${udfdName} || :
[ -x ${install_main_dir}/bin/${adapterName} ] && ${csudo}ln -s ${install_main_dir}/bin/${adapterName} ${bin_link_dir}/${adapterName} || :
- [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -s ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${demoName} || :
- [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -s ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${benchmarkName} || :
+ [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${demoName} || :
+ [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -sf ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${benchmarkName} || :
[ -x ${install_main_dir}/bin/${dumpName} ] && ${csudo}ln -s ${install_main_dir}/bin/${dumpName} ${bin_link_dir}/${dumpName} || :
[ -x ${install_main_dir}/bin/${xname} ] && ${csudo}ln -s ${install_main_dir}/bin/${xname} ${bin_link_dir}/${xname} || :
[ -x ${install_main_dir}/bin/TDinsight.sh ] && ${csudo}ln -s ${install_main_dir}/bin/TDinsight.sh ${bin_link_dir}/TDinsight.sh || :
@@ -787,7 +787,7 @@ function updateProduct() {
if echo $osinfo | grep -qwi "centos"; then
rpm -q tdengine 2>&1 > /dev/null && rpm_erase tdengine ||:
elif echo $osinfo | grep -qwi "ubuntu"; then
- dpkg -l tdengine 2>&1 > /dev/null && deb_erase tdengine ||:
+ dpkg -l tdengine 2>&1 | grep ii > /dev/null && deb_erase tdengine ||:
fi
tar -zxf ${tarName}
diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c
index fbab1ee08b..2b79fc7388 100644
--- a/source/client/src/clientEnv.c
+++ b/source/client/src/clientEnv.c
@@ -23,12 +23,12 @@
#include "scheduler.h"
#include "tcache.h"
#include "tglobal.h"
+#include "thttp.h"
#include "tmsg.h"
#include "tref.h"
#include "trpc.h"
#include "tsched.h"
#include "ttime.h"
-#include "thttp.h"
#define TSC_VAR_NOT_RELEASE 1
#define TSC_VAR_RELEASED 0
@@ -65,7 +65,7 @@ static int32_t registerRequest(SRequestObj *pRequest, STscObj *pTscObj) {
static void deregisterRequest(SRequestObj *pRequest) {
const static int64_t SLOW_QUERY_INTERVAL = 3000000L; // todo configurable
- if(pRequest == NULL){
+ if (pRequest == NULL) {
tscError("pRequest == NULL");
return;
}
@@ -380,9 +380,9 @@ void doDestroyRequest(void *p) {
}
if (pRequest->syncQuery) {
- if (pRequest->body.param){
- tsem_destroy(&((SSyncQueryParam*)pRequest->body.param)->sem);
- }
+ if (pRequest->body.param) {
+ tsem_destroy(&((SSyncQueryParam *)pRequest->body.param)->sem);
+ }
taosMemoryFree(pRequest->body.param);
}
@@ -406,20 +406,20 @@ static void *tscCrashReportThreadFp(void *param) {
setThreadName("client-crashReport");
char filepath[PATH_MAX] = {0};
snprintf(filepath, sizeof(filepath), "%s%s.taosCrashLog", tsLogDir, TD_DIRSEP);
- char *pMsg = NULL;
- int64_t msgLen = 0;
+ char *pMsg = NULL;
+ int64_t msgLen = 0;
TdFilePtr pFile = NULL;
- bool truncateFile = false;
- int32_t sleepTime = 200;
- int32_t reportPeriodNum = 3600 * 1000 / sleepTime;
- int32_t loopTimes = reportPeriodNum;
+ bool truncateFile = false;
+ int32_t sleepTime = 200;
+ int32_t reportPeriodNum = 3600 * 1000 / sleepTime;
+ int32_t loopTimes = reportPeriodNum;
#ifdef WINDOWS
if (taosCheckCurrentInDll()) {
atexit(crashReportThreadFuncUnexpectedStopped);
}
#endif
-
+
while (1) {
if (clientStop) break;
if (loopTimes++ < reportPeriodNum) {
@@ -449,12 +449,12 @@ static void *tscCrashReportThreadFp(void *param) {
pMsg = NULL;
continue;
}
-
+
if (pFile) {
taosReleaseCrashLogFile(pFile, truncateFile);
truncateFile = false;
}
-
+
taosMsleep(sleepTime);
loopTimes = 0;
}
@@ -467,11 +467,11 @@ int32_t tscCrashReportInit() {
if (!tsEnableCrashReport) {
return 0;
}
-
+
TdThreadAttr thAttr;
taosThreadAttrInit(&thAttr);
taosThreadAttrSetDetachState(&thAttr, PTHREAD_CREATE_JOINABLE);
- TdThread crashReportThread;
+ TdThread crashReportThread;
if (taosThreadCreate(&crashReportThread, &thAttr, tscCrashReportThreadFp, NULL) != 0) {
tscError("failed to create crashReport thread since %s", strerror(errno));
return -1;
@@ -496,26 +496,24 @@ void tscStopCrashReport() {
}
}
-
void tscWriteCrashInfo(int signum, void *sigInfo, void *context) {
- char *pMsg = NULL;
+ char *pMsg = NULL;
const char *flags = "UTL FATAL ";
ELogLevel level = DEBUG_FATAL;
int32_t dflag = 255;
- int64_t msgLen= -1;
+ int64_t msgLen = -1;
if (tsEnableCrashReport) {
if (taosGenCrashJsonMsg(signum, &pMsg, lastClusterId, appInfo.startTime)) {
taosPrintLog(flags, level, dflag, "failed to generate crash json msg");
} else {
- msgLen = strlen(pMsg);
+ msgLen = strlen(pMsg);
}
}
taosLogCrashInfo("taos", pMsg, msgLen, signum, sigInfo);
}
-
void taos_init_imp(void) {
// In the APIs of other program language, taos_cleanup is not available yet.
// So, to make sure taos_cleanup will be invoked to clean up the allocated resource to suppress the valgrind warning.
@@ -570,7 +568,7 @@ void taos_init_imp(void) {
taosThreadMutexInit(&appInfo.mutex, NULL);
tscCrashReportInit();
-
+
tscDebug("client is initialized successfully");
}
@@ -621,6 +619,9 @@ int taos_options_imp(TSDB_OPTION option, const char *str) {
tscError("failed to set cfg:%s to %s since %s", pItem->name, str, terrstr());
} else {
tscInfo("set cfg:%s to %s", pItem->name, str);
+ if (TSDB_OPTION_SHELL_ACTIVITY_TIMER == option || TSDB_OPTION_USE_ADAPTER == option) {
+ code = taosSetCfg(pCfg, pItem->name);
+ }
}
return code;
diff --git a/source/client/src/clientStmt.c b/source/client/src/clientStmt.c
index f5b65371a7..3ed157efef 100644
--- a/source/client/src/clientStmt.c
+++ b/source/client/src/clientStmt.c
@@ -393,7 +393,7 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
if (NULL == pStmt->sql.pTableCache || taosHashGetSize(pStmt->sql.pTableCache) <= 0) {
if (pStmt->bInfo.inExecCache) {
- if(ASSERT(taosHashGetSize(pStmt->exec.pBlockHash) == 1)){
+ if (ASSERT(taosHashGetSize(pStmt->exec.pBlockHash) == 1)) {
tscError("stmtGetFromCache error");
return TSDB_CODE_TSC_STMT_CACHE_ERROR;
}
diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c
index 01c99c6e9e..96f18e5fb6 100644
--- a/source/client/src/clientTmq.c
+++ b/source/client/src/clientTmq.c
@@ -1885,9 +1885,6 @@ int32_t tmq_consumer_close(tmq_t* tmq) {
}
tmq_list_destroy(lst);
-
- /*return rsp;*/
- return 0;
}
taosRemoveRef(tmqMgmt.rsetId, tmq->refId);
return 0;
diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c
index 9b5b32cf69..a4b1be5a12 100644
--- a/source/common/src/tdatablock.c
+++ b/source/common/src/tdatablock.c
@@ -1431,6 +1431,7 @@ SSDataBlock* createOneDataBlock(const SSDataBlock* pDataBlock, bool copyData) {
pBlock->info.rows = 0;
pBlock->info.capacity = 0;
pBlock->info.rowSize = 0;
+ pBlock->info.id = pDataBlock->info.id;
size_t numOfCols = taosArrayGetSize(pDataBlock->pDataBlock);
for (int32_t i = 0; i < numOfCols; ++i) {
diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c
index a9ff9a1e8b..370a232827 100644
--- a/source/common/src/tglobal.c
+++ b/source/common/src/tglobal.c
@@ -76,19 +76,19 @@ bool tsEnableTelem = true;
int32_t tsTelemInterval = 43200;
char tsTelemServer[TSDB_FQDN_LEN] = "telemetry.taosdata.com";
uint16_t tsTelemPort = 80;
-char* tsTelemUri = "/report";
+char *tsTelemUri = "/report";
-bool tsEnableCrashReport = true;
-char* tsClientCrashReportUri = "/ccrashreport";
-char* tsSvrCrashReportUri = "/dcrashreport";
+bool tsEnableCrashReport = true;
+char *tsClientCrashReportUri = "/ccrashreport";
+char *tsSvrCrashReportUri = "/dcrashreport";
// schemaless
char tsSmlTagName[TSDB_COL_NAME_LEN] = "_tag_null";
char tsSmlChildTableName[TSDB_TABLE_NAME_LEN] = ""; // user defined child table name can be specified in tag value.
// If set to empty system will generate table name using MD5 hash.
// true means that the name and order of cols in each line are the same(only for influx protocol)
-//bool tsSmlDataFormat = false;
-//int32_t tsSmlBatchSize = 10000;
+// bool tsSmlDataFormat = false;
+// int32_t tsSmlBatchSize = 10000;
// query
int32_t tsQueryPolicy = 1;
@@ -210,9 +210,7 @@ int32_t taosSetTfsCfg(SConfig *pCfg) {
int32_t taosSetTfsCfg(SConfig *pCfg);
#endif
-struct SConfig *taosGetCfg() {
- return tsCfg;
-}
+struct SConfig *taosGetCfg() { return tsCfg; }
static int32_t taosLoadCfg(SConfig *pCfg, const char **envCmd, const char *inputCfgDir, const char *envFile,
char *apolloUrl) {
@@ -319,8 +317,8 @@ static int32_t taosAddClientCfg(SConfig *pCfg) {
if (cfgAddBool(pCfg, "keepColumnName", tsKeepColumnName, true) != 0) return -1;
if (cfgAddString(pCfg, "smlChildTableName", "", 1) != 0) return -1;
if (cfgAddString(pCfg, "smlTagName", tsSmlTagName, 1) != 0) return -1;
-// if (cfgAddBool(pCfg, "smlDataFormat", tsSmlDataFormat, 1) != 0) return -1;
-// if (cfgAddInt32(pCfg, "smlBatchSize", tsSmlBatchSize, 1, INT32_MAX, true) != 0) return -1;
+ // if (cfgAddBool(pCfg, "smlDataFormat", tsSmlDataFormat, 1) != 0) return -1;
+ // if (cfgAddInt32(pCfg, "smlBatchSize", tsSmlBatchSize, 1, INT32_MAX, true) != 0) return -1;
if (cfgAddInt32(pCfg, "maxMemUsedByInsert", tsMaxMemUsedByInsert, 1, INT32_MAX, true) != 0) return -1;
if (cfgAddInt32(pCfg, "maxRetryWaitTime", tsMaxRetryWaitTime, 0, 86400000, 0) != 0) return -1;
if (cfgAddBool(pCfg, "useAdapter", tsUseAdapter, true) != 0) return -1;
@@ -662,9 +660,9 @@ static int32_t taosSetClientCfg(SConfig *pCfg) {
tstrncpy(tsSmlChildTableName, cfgGetItem(pCfg, "smlChildTableName")->str, TSDB_TABLE_NAME_LEN);
tstrncpy(tsSmlTagName, cfgGetItem(pCfg, "smlTagName")->str, TSDB_COL_NAME_LEN);
-// tsSmlDataFormat = cfgGetItem(pCfg, "smlDataFormat")->bval;
+ // tsSmlDataFormat = cfgGetItem(pCfg, "smlDataFormat")->bval;
-// tsSmlBatchSize = cfgGetItem(pCfg, "smlBatchSize")->i32;
+ // tsSmlBatchSize = cfgGetItem(pCfg, "smlBatchSize")->i32;
tsMaxMemUsedByInsert = cfgGetItem(pCfg, "maxMemUsedByInsert")->i32;
tsShellActivityTimer = cfgGetItem(pCfg, "shellActivityTimer")->i32;
@@ -1048,10 +1046,10 @@ int32_t taosSetCfg(SConfig *pCfg, char *name) {
tstrncpy(tsSmlChildTableName, cfgGetItem(pCfg, "smlChildTableName")->str, TSDB_TABLE_NAME_LEN);
} else if (strcasecmp("smlTagName", name) == 0) {
tstrncpy(tsSmlTagName, cfgGetItem(pCfg, "smlTagName")->str, TSDB_COL_NAME_LEN);
-// } else if (strcasecmp("smlDataFormat", name) == 0) {
-// tsSmlDataFormat = cfgGetItem(pCfg, "smlDataFormat")->bval;
-// } else if (strcasecmp("smlBatchSize", name) == 0) {
-// tsSmlBatchSize = cfgGetItem(pCfg, "smlBatchSize")->i32;
+ // } else if (strcasecmp("smlDataFormat", name) == 0) {
+ // tsSmlDataFormat = cfgGetItem(pCfg, "smlDataFormat")->bval;
+ // } else if (strcasecmp("smlBatchSize", name) == 0) {
+ // tsSmlBatchSize = cfgGetItem(pCfg, "smlBatchSize")->i32;
} else if (strcasecmp("shellActivityTimer", name) == 0) {
tsShellActivityTimer = cfgGetItem(pCfg, "shellActivityTimer")->i32;
} else if (strcasecmp("supportVnodes", name) == 0) {
@@ -1121,6 +1119,8 @@ int32_t taosSetCfg(SConfig *pCfg, char *name) {
tsStartUdfd = cfgGetItem(pCfg, "udf")->bval;
} else if (strcasecmp("uDebugFlag", name) == 0) {
uDebugFlag = cfgGetItem(pCfg, "uDebugFlag")->i32;
+ } else if (strcasecmp("useAdapter", name) == 0) {
+ tsUseAdapter = cfgGetItem(pCfg, "useAdapter")->bval;
}
break;
}
diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c
index d64e5c66e0..f176ccf37f 100644
--- a/source/common/src/tmsg.c
+++ b/source/common/src/tmsg.c
@@ -4114,6 +4114,68 @@ int32_t tDeserializeSAlterVnodeReplicaReq(void *buf, int32_t bufLen, SAlterVnode
return 0;
}
+int32_t tSerializeSDisableVnodeWriteReq(void *buf, int32_t bufLen, SDisableVnodeWriteReq *pReq) {
+ SEncoder encoder = {0};
+ tEncoderInit(&encoder, buf, bufLen);
+
+ if (tStartEncode(&encoder) < 0) return -1;
+ if (tEncodeI32(&encoder, pReq->vgId) < 0) return -1;
+ if (tEncodeI8(&encoder, pReq->disable) < 0) return -1;
+
+ tEndEncode(&encoder);
+
+ int32_t tlen = encoder.pos;
+ tEncoderClear(&encoder);
+ return tlen;
+}
+
+int32_t tDeserializeSDisableVnodeWriteReq(void *buf, int32_t bufLen, SDisableVnodeWriteReq *pReq) {
+ SDecoder decoder = {0};
+ tDecoderInit(&decoder, buf, bufLen);
+
+ if (tStartDecode(&decoder) < 0) return -1;
+ if (tDecodeI32(&decoder, &pReq->vgId) < 0) return -1;
+ if (tDecodeI8(&decoder, &pReq->disable) < 0) return -1;
+
+ tEndDecode(&decoder);
+ tDecoderClear(&decoder);
+ return 0;
+}
+
+int32_t tSerializeSAlterVnodeHashRangeReq(void *buf, int32_t bufLen, SAlterVnodeHashRangeReq *pReq) {
+ SEncoder encoder = {0};
+ tEncoderInit(&encoder, buf, bufLen);
+
+ if (tStartEncode(&encoder) < 0) return -1;
+ if (tEncodeI32(&encoder, pReq->srcVgId) < 0) return -1;
+ if (tEncodeI32(&encoder, pReq->dstVgId) < 0) return -1;
+ if (tEncodeI32(&encoder, pReq->hashBegin) < 0) return -1;
+ if (tEncodeI32(&encoder, pReq->hashEnd) < 0) return -1;
+ if (tEncodeI64(&encoder, pReq->reserved) < 0) return -1;
+
+ tEndEncode(&encoder);
+
+ int32_t tlen = encoder.pos;
+ tEncoderClear(&encoder);
+ return tlen;
+}
+
+int32_t tDeserializeSAlterVnodeHashRangeReq(void *buf, int32_t bufLen, SAlterVnodeHashRangeReq *pReq) {
+ SDecoder decoder = {0};
+ tDecoderInit(&decoder, buf, bufLen);
+
+ if (tStartDecode(&decoder) < 0) return -1;
+ if (tDecodeI32(&decoder, &pReq->srcVgId) < 0) return -1;
+ if (tDecodeI32(&decoder, &pReq->dstVgId) < 0) return -1;
+ if (tDecodeI32(&decoder, &pReq->hashBegin) < 0) return -1;
+ if (tDecodeI32(&decoder, &pReq->hashEnd) < 0) return -1;
+ if (tDecodeI64(&decoder, &pReq->reserved) < 0) return -1;
+
+ tEndDecode(&decoder);
+ tDecoderClear(&decoder);
+ return 0;
+}
+
int32_t tSerializeSKillQueryReq(void *buf, int32_t bufLen, SKillQueryReq *pReq) {
SEncoder encoder = {0};
tEncoderInit(&encoder, buf, bufLen);
diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
index 16fe6c1b91..7d11bc7082 100644
--- a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
+++ b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
@@ -167,6 +167,7 @@ SArray *mmGetMsgHandles() {
if (dmSetMgmtHandle(pArray, TDMT_VND_CREATE_STB_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_ALTER_STB_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_DROP_STB_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
+ if (dmSetMgmtHandle(pArray, TDMT_VND_DROP_TTL_TABLE_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_CREATE_SMA_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_DROP_SMA_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_TMQ_SUBSCRIBE_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
@@ -181,6 +182,7 @@ SArray *mmGetMsgHandles() {
if (dmSetMgmtHandle(pArray, TDMT_VND_ALTER_CONFIRM_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_ALTER_HASHRANGE_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_COMPACT_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
+ if (dmSetMgmtHandle(pArray, TDMT_VND_DISABLE_WRITE_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_SYNC_TIMEOUT, mmPutMsgToSyncQueue, 1) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_SYNC_CLIENT_REQUEST, mmPutMsgToSyncQueue, 1) == NULL) goto _OVER;
diff --git a/source/dnode/mgmt/mgmt_vnode/inc/vmInt.h b/source/dnode/mgmt/mgmt_vnode/inc/vmInt.h
index 6e724f4d43..e3fa2964b7 100644
--- a/source/dnode/mgmt/mgmt_vnode/inc/vmInt.h
+++ b/source/dnode/mgmt/mgmt_vnode/inc/vmInt.h
@@ -54,6 +54,7 @@ typedef struct {
int32_t vgVersion;
int32_t refCount;
int8_t dropped;
+ int8_t disable;
char *path;
SVnode *pImpl;
SMultiWorker pWriteW;
@@ -80,13 +81,15 @@ typedef struct {
SVnodeObj *vmAcquireVnode(SVnodeMgmt *pMgmt, int32_t vgId);
void vmReleaseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode);
int32_t vmOpenVnode(SVnodeMgmt *pMgmt, SWrapperCfg *pCfg, SVnode *pImpl);
-void vmCloseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode);
+void vmCloseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode, bool commitAndRemoveWal);
// vmHandle.c
SArray *vmGetMsgHandles();
int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg);
int32_t vmProcessDropVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg);
-int32_t vmProcessAlterVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg);
+int32_t vmProcessAlterVnodeReplicaReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg);
+int32_t vmProcessDisableVnodeWriteReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg);
+int32_t vmProcessAlterHashRangeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg);
// vmFile.c
int32_t vmGetVnodeListFromFile(SVnodeMgmt *pMgmt, SWrapperCfg **ppCfgs, int32_t *numOfVnodes);
diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
index 47772acbdc..1c1b8e32cd 100644
--- a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
+++ b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
@@ -281,7 +281,94 @@ _OVER:
return code;
}
-int32_t vmProcessAlterVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
+int32_t vmProcessDisableVnodeWriteReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
+ SDisableVnodeWriteReq req = {0};
+ if (tDeserializeSDisableVnodeWriteReq(pMsg->pCont, pMsg->contLen, &req) != 0) {
+ terrno = TSDB_CODE_INVALID_MSG;
+ return -1;
+ }
+
+ dInfo("vgId:%d, vnode write disable:%d", req.vgId, req.disable);
+
+ SVnodeObj *pVnode = vmAcquireVnode(pMgmt, req.vgId);
+ if (pVnode == NULL) {
+ dError("vgId:%d, failed to disable write since %s", req.vgId, terrstr());
+ terrno = TSDB_CODE_VND_NOT_EXIST;
+ return -1;
+ }
+
+ pVnode->disable = req.disable;
+ vmReleaseVnode(pMgmt, pVnode);
+ return 0;
+}
+
+int32_t vmProcessAlterHashRangeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
+ SAlterVnodeHashRangeReq req = {0};
+ if (tDeserializeSAlterVnodeHashRangeReq(pMsg->pCont, pMsg->contLen, &req) != 0) {
+ terrno = TSDB_CODE_INVALID_MSG;
+ return -1;
+ }
+
+ int32_t srcVgId = req.srcVgId;
+ int32_t dstVgId = req.dstVgId;
+ dInfo("vgId:%d, start to alter vnode hashrange[%u, %u), dstVgId:%d", req.srcVgId, req.hashBegin, req.hashEnd,
+ req.dstVgId);
+
+ SVnodeObj *pVnode = vmAcquireVnode(pMgmt, srcVgId);
+ if (pVnode == NULL) {
+ dError("vgId:%d, failed to alter hashrange since %s", srcVgId, terrstr());
+ terrno = TSDB_CODE_VND_NOT_EXIST;
+ return -1;
+ }
+
+ SWrapperCfg wrapperCfg = {
+ .dropped = pVnode->dropped,
+ .vgId = dstVgId,
+ .vgVersion = pVnode->vgVersion,
+ };
+ tstrncpy(wrapperCfg.path, pVnode->path, sizeof(wrapperCfg.path));
+
+ dInfo("vgId:%d, close vnode", srcVgId);
+ vmCloseVnode(pMgmt, pVnode, true);
+
+ char srcPath[TSDB_FILENAME_LEN] = {0};
+ char dstPath[TSDB_FILENAME_LEN] = {0};
+ snprintf(srcPath, TSDB_FILENAME_LEN, "vnode%svnode%d", TD_DIRSEP, srcVgId);
+ snprintf(dstPath, TSDB_FILENAME_LEN, "vnode%svnode%d", TD_DIRSEP, dstVgId);
+
+ dInfo("vgId:%d, alter vnode hashrange at %s", srcVgId, srcPath);
+ if (vnodeAlterHashRange(srcPath, dstPath, &req, pMgmt->pTfs) < 0) {
+ dError("vgId:%d, failed to alter vnode hashrange since %s", srcVgId, terrstr());
+ return -1;
+ }
+
+ dInfo("vgId:%d, start to open vnode", dstVgId);
+ SVnode *pImpl = vnodeOpen(dstPath, pMgmt->pTfs, pMgmt->msgCb);
+ if (pImpl == NULL) {
+ dError("vgId:%d, failed to open vnode at %s since %s", dstVgId, dstPath, terrstr());
+ return -1;
+ }
+
+ if (vmOpenVnode(pMgmt, &wrapperCfg, pImpl) != 0) {
+ dError("vgId:%d, failed to open vnode mgmt since %s", dstVgId, terrstr());
+ return -1;
+ }
+
+ if (vnodeStart(pImpl) != 0) {
+ dError("vgId:%d, failed to start sync since %s", dstVgId, terrstr());
+ return -1;
+ }
+
+ if (vmWriteVnodeListToFile(pMgmt) != 0) {
+ dError("vgId:%d, failed to write vnode list since %s", dstVgId, terrstr());
+ return -1;
+ }
+
+ dInfo("vgId:%d, vnode hashrange is altered", dstVgId);
+ return 0;
+}
+
+int32_t vmProcessAlterVnodeReplicaReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
SAlterVnodeReplicaReq alterReq = {0};
if (tDeserializeSAlterVnodeReplicaReq(pMsg->pCont, pMsg->contLen, &alterReq) != 0) {
terrno = TSDB_CODE_INVALID_MSG;
@@ -289,16 +376,16 @@ int32_t vmProcessAlterVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
}
int32_t vgId = alterReq.vgId;
- dInfo("vgId:%d, start to alter vnode, replica:%d selfIndex:%d strict:%d", alterReq.vgId, alterReq.replica,
- alterReq.selfIndex, alterReq.strict);
+ dInfo("vgId:%d, start to alter vnode, replica:%d selfIndex:%d strict:%d", vgId, alterReq.replica, alterReq.selfIndex,
+ alterReq.strict);
for (int32_t i = 0; i < alterReq.replica; ++i) {
SReplica *pReplica = &alterReq.replicas[i];
- dInfo("vgId:%d, replica:%d ep:%s:%u dnode:%d", alterReq.vgId, i, pReplica->fqdn, pReplica->port, pReplica->port);
+ dInfo("vgId:%d, replica:%d ep:%s:%u dnode:%d", vgId, i, pReplica->fqdn, pReplica->port, pReplica->port);
}
if (alterReq.replica <= 0 || alterReq.selfIndex < 0 || alterReq.selfIndex >= alterReq.replica) {
terrno = TSDB_CODE_INVALID_MSG;
- dError("vgId:%d, failed to alter replica since invalid msg", alterReq.vgId);
+ dError("vgId:%d, failed to alter replica since invalid msg", vgId);
return -1;
}
@@ -306,7 +393,7 @@ int32_t vmProcessAlterVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
if (pReplica->id != pMgmt->pData->dnodeId || pReplica->port != tsServerPort ||
strcmp(pReplica->fqdn, tsLocalFqdn) != 0) {
terrno = TSDB_CODE_INVALID_MSG;
- dError("vgId:%d, dnodeId:%d ep:%s:%u not matched with local dnode", alterReq.vgId, pReplica->id, pReplica->fqdn,
+ dError("vgId:%d, dnodeId:%d ep:%s:%u not matched with local dnode", vgId, pReplica->id, pReplica->fqdn,
pReplica->port);
return -1;
}
@@ -325,13 +412,13 @@ int32_t vmProcessAlterVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
.vgVersion = pVnode->vgVersion,
};
tstrncpy(wrapperCfg.path, pVnode->path, sizeof(wrapperCfg.path));
- vmCloseVnode(pMgmt, pVnode);
+ vmCloseVnode(pMgmt, pVnode, false);
char path[TSDB_FILENAME_LEN] = {0};
snprintf(path, TSDB_FILENAME_LEN, "vnode%svnode%d", TD_DIRSEP, vgId);
dInfo("vgId:%d, start to alter vnode replica at %s", vgId, path);
- if (vnodeAlter(path, &alterReq, pMgmt->pTfs) < 0) {
+ if (vnodeAlterReplica(path, &alterReq, pMgmt->pTfs) < 0) {
dError("vgId:%d, failed to alter vnode at %s since %s", vgId, path, terrstr());
return -1;
}
@@ -387,7 +474,7 @@ int32_t vmProcessDropVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
return -1;
}
- vmCloseVnode(pMgmt, pVnode);
+ vmCloseVnode(pMgmt, pVnode, false);
vmWriteVnodeListToFile(pMgmt);
dInfo("vgId:%d, is dropped", vgId);
@@ -451,7 +538,8 @@ SArray *vmGetMsgHandles() {
if (dmSetMgmtHandle(pArray, TDMT_VND_ALTER_REPLICA, vmPutMsgToMgmtQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_ALTER_CONFIG, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_ALTER_CONFIRM, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
- if (dmSetMgmtHandle(pArray, TDMT_VND_ALTER_HASHRANGE, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
+ if (dmSetMgmtHandle(pArray, TDMT_VND_DISABLE_WRITE, vmPutMsgToMgmtQueue, 0) == NULL) goto _OVER;
+ if (dmSetMgmtHandle(pArray, TDMT_VND_ALTER_HASHRANGE, vmPutMsgToMgmtQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_COMPACT, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_TRIM, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_DND_CREATE_VNODE, vmPutMsgToMgmtQueue, 0) == NULL) goto _OVER;
diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c
index 99ba9b9b3b..8049db9c78 100644
--- a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c
+++ b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c
@@ -76,11 +76,9 @@ int32_t vmOpenVnode(SVnodeMgmt *pMgmt, SWrapperCfg *pCfg, SVnode *pImpl) {
return code;
}
-void vmCloseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode) {
+void vmCloseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode, bool commitAndRemoveWal) {
char path[TSDB_FILENAME_LEN] = {0};
- vnodeProposeCommitOnNeed(pVnode->pImpl);
-
taosThreadRwlockWrlock(&pMgmt->lock);
taosHashRemove(pMgmt->hash, &pVnode->vgId, sizeof(int32_t));
taosThreadRwlockUnlock(&pMgmt->lock);
@@ -124,10 +122,26 @@ void vmCloseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode) {
vnodePostClose(pVnode->pImpl);
vmFreeQueue(pMgmt, pVnode);
+
+ if (commitAndRemoveWal) {
+ dInfo("vgId:%d, commit data", pVnode->vgId);
+ vnodeSyncCommit(pVnode->pImpl);
+ vnodeBegin(pVnode->pImpl);
+ dInfo("vgId:%d, commit data finished", pVnode->vgId);
+ }
+
vnodeClose(pVnode->pImpl);
pVnode->pImpl = NULL;
dInfo("vgId:%d, vnode is closed", pVnode->vgId);
+ if (commitAndRemoveWal) {
+ char path[TSDB_FILENAME_LEN] = {0};
+ snprintf(path, TSDB_FILENAME_LEN, "vnode%svnode%d%swal", TD_DIRSEP, pVnode->vgId, TD_DIRSEP);
+ dInfo("vgId:%d, remove all wals, path:%s", pVnode->vgId, path);
+ tfsRmdir(pMgmt->pTfs, path);
+ tfsMkdir(pMgmt->pTfs, path);
+ }
+
if (pVnode->dropped) {
dInfo("vgId:%d, vnode is destroyed, dropped:%d", pVnode->vgId, pVnode->dropped);
snprintf(path, TSDB_FILENAME_LEN, "vnode%svnode%d", TD_DIRSEP, pVnode->vgId);
@@ -257,7 +271,7 @@ static void *vmCloseVnodeInThread(void *param) {
pMgmt->state.openVnodes, pMgmt->state.totalVnodes);
tmsgReportStartup("vnode-close", stepDesc);
- vmCloseVnode(pMgmt, pVnode);
+ vmCloseVnode(pMgmt, pVnode, false);
}
dInfo("thread:%d, numOfVnodes:%d is closed", pThread->threadIndex, pThread->vnodeNum);
diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
index cd29b11550..600dd3671d 100644
--- a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
+++ b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
@@ -41,7 +41,13 @@ static void vmProcessMgmtQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) {
code = vmProcessDropVnodeReq(pMgmt, pMsg);
break;
case TDMT_VND_ALTER_REPLICA:
- code = vmProcessAlterVnodeReq(pMgmt, pMsg);
+ code = vmProcessAlterVnodeReplicaReq(pMgmt, pMsg);
+ break;
+ case TDMT_VND_DISABLE_WRITE:
+ code = vmProcessDisableVnodeWriteReq(pMgmt, pMsg);
+ break;
+ case TDMT_VND_ALTER_HASHRANGE:
+ code = vmProcessAlterHashRangeReq(pMgmt, pMsg);
break;
default:
terrno = TSDB_CODE_MSG_NOT_PROCESSED;
@@ -191,14 +197,21 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
terrno = TSDB_CODE_NO_DISKSPACE;
code = terrno;
dError("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr(code));
- } else if ((pMsg->msgType == TDMT_VND_SUBMIT) && (grantCheck(TSDB_GRANT_STORAGE) != TSDB_CODE_SUCCESS)) {
+ break;
+ }
+ if (pMsg->msgType == TDMT_VND_SUBMIT && (grantCheck(TSDB_GRANT_STORAGE) != TSDB_CODE_SUCCESS)) {
terrno = TSDB_CODE_VND_NO_WRITE_AUTH;
code = terrno;
dDebug("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr(code));
- } else {
- dGTrace("vgId:%d, msg:%p put into vnode-write queue", pVnode->vgId, pMsg);
- taosWriteQitem(pVnode->pWriteW.queue, pMsg);
+ break;
}
+ if (pMsg->msgType != TDMT_VND_ALTER_CONFIRM && pVnode->disable) {
+ dDebug("vgId:%d, msg:%p put into vnode-write queue failed since its disable", pVnode->vgId, pMsg);
+ terrno = TSDB_CODE_VND_STOPPED;
+ break;
+ }
+ dGTrace("vgId:%d, msg:%p put into vnode-write queue", pVnode->vgId, pMsg);
+ taosWriteQitem(pVnode->pWriteW.queue, pMsg);
break;
case SYNC_QUEUE:
dGTrace("vgId:%d, msg:%p put into vnode-sync queue", pVnode->vgId, pMsg);
diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c
index dcb63f6524..d2b9618c60 100644
--- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c
+++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c
@@ -39,7 +39,7 @@ int32_t dmProcessNodeMsg(SMgmtWrapper *pWrapper, SRpcMsg *pMsg) {
NodeMsgFp msgFp = pWrapper->msgFps[TMSG_INDEX(pMsg->msgType)];
if (msgFp == NULL) {
terrno = TSDB_CODE_MSG_NOT_PROCESSED;
- dGError("msg:%p, not processed since no handler", pMsg);
+ dGError("msg:%p, not processed since no handler, type:%s", pMsg, TMSG_INFO(pMsg->msgType));
return -1;
}
diff --git a/source/dnode/mnode/impl/inc/mndDb.h b/source/dnode/mnode/impl/inc/mndDb.h
index cea0a43b61..9edfd9bf3b 100644
--- a/source/dnode/mnode/impl/inc/mndDb.h
+++ b/source/dnode/mnode/impl/inc/mndDb.h
@@ -30,6 +30,7 @@ int32_t mndValidateDbInfo(SMnode *pMnode, SDbVgVersion *pDbs, int32_t numOfDbs,
int32_t mndExtractDbInfo(SMnode *pMnode, SDbObj *pDb, SUseDbRsp *pRsp, const SUseDbReq *pReq);
bool mndIsDbReady(SMnode *pMnode, SDbObj *pDb);
+SSdbRaw *mndDbActionEncode(SDbObj *pDb);
const char *mndGetDbStr(const char *src);
#ifdef __cplusplus
diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c
index eeb4249217..eb4fc3cdad 100644
--- a/source/dnode/mnode/impl/src/mndConsumer.c
+++ b/source/dnode/mnode/impl/src/mndConsumer.c
@@ -839,10 +839,14 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer,
char *addedTopic = strdup(taosArrayGetP(pNewConsumer->rebNewTopics, 0));
// not exist in current topic
-#if 0
+
+ bool existing = false;
+#if 1
for (int32_t i = 0; i < taosArrayGetSize(pOldConsumer->currentTopics); i++) {
char *topic = taosArrayGetP(pOldConsumer->currentTopics, i);
- A(strcmp(topic, addedTopic) != 0);
+ if (strcmp(topic, addedTopic) == 0) {
+ existing = true;
+ }
}
#endif
@@ -857,8 +861,10 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer,
}
// add to current topic
- taosArrayPush(pOldConsumer->currentTopics, &addedTopic);
- taosArraySort(pOldConsumer->currentTopics, taosArrayCompareString);
+ if (!existing) {
+ taosArrayPush(pOldConsumer->currentTopics, &addedTopic);
+ taosArraySort(pOldConsumer->currentTopics, taosArrayCompareString);
+ }
// set status
if (taosArrayGetSize(pOldConsumer->rebNewTopics) == 0 && taosArrayGetSize(pOldConsumer->rebRemovedTopics) == 0) {
diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c
index 054c02b3b0..1943ab0b0f 100644
--- a/source/dnode/mnode/impl/src/mndDb.c
+++ b/source/dnode/mnode/impl/src/mndDb.c
@@ -32,7 +32,6 @@
#define DB_VER_NUMBER 1
#define DB_RESERVE_SIZE 46
-static SSdbRaw *mndDbActionEncode(SDbObj *pDb);
static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw);
static int32_t mndDbActionInsert(SSdb *pSdb, SDbObj *pDb);
static int32_t mndDbActionDelete(SSdb *pSdb, SDbObj *pDb);
@@ -74,7 +73,7 @@ int32_t mndInitDb(SMnode *pMnode) {
void mndCleanupDb(SMnode *pMnode) {}
-static SSdbRaw *mndDbActionEncode(SDbObj *pDb) {
+SSdbRaw *mndDbActionEncode(SDbObj *pDb) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
int32_t size = sizeof(SDbObj) + pDb->cfg.numOfRetensions * sizeof(SRetention) + DB_RESERVE_SIZE;
@@ -261,6 +260,7 @@ static int32_t mndDbActionUpdate(SSdb *pSdb, SDbObj *pOld, SDbObj *pNew) {
pOld->updateTime = pNew->updateTime;
pOld->cfgVersion = pNew->cfgVersion;
pOld->vgVersion = pNew->vgVersion;
+ pOld->cfg.numOfVgroups = pNew->cfg.numOfVgroups;
pOld->cfg.buffer = pNew->cfg.buffer;
pOld->cfg.pageSize = pNew->cfg.pageSize;
pOld->cfg.pages = pNew->cfg.pages;
diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c
index c243e83a15..52f7190dd6 100644
--- a/source/dnode/mnode/impl/src/mndStb.c
+++ b/source/dnode/mnode/impl/src/mndStb.c
@@ -41,6 +41,7 @@ static int32_t mndProcessTtlTimer(SRpcMsg *pReq);
static int32_t mndProcessCreateStbReq(SRpcMsg *pReq);
static int32_t mndProcessAlterStbReq(SRpcMsg *pReq);
static int32_t mndProcessDropStbReq(SRpcMsg *pReq);
+static int32_t mndProcessDropTtltbReq(SRpcMsg *pReq);
static int32_t mndProcessTableMetaReq(SRpcMsg *pReq);
static int32_t mndRetrieveStb(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows);
static int32_t mndRetrieveStbCol(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows);
@@ -65,6 +66,7 @@ int32_t mndInitStb(SMnode *pMnode) {
mndSetMsgHandle(pMnode, TDMT_MND_ALTER_STB, mndProcessAlterStbReq);
mndSetMsgHandle(pMnode, TDMT_MND_DROP_STB, mndProcessDropStbReq);
mndSetMsgHandle(pMnode, TDMT_VND_CREATE_STB_RSP, mndTransProcessRsp);
+ mndSetMsgHandle(pMnode, TDMT_VND_DROP_TTL_TABLE_RSP, mndProcessDropTtltbReq);
mndSetMsgHandle(pMnode, TDMT_VND_ALTER_STB_RSP, mndTransProcessRsp);
mndSetMsgHandle(pMnode, TDMT_VND_DROP_STB_RSP, mndTransProcessRsp);
mndSetMsgHandle(pMnode, TDMT_MND_TABLE_META, mndProcessTableMetaReq);
@@ -2181,6 +2183,10 @@ static int32_t mndCheckDropStbForStream(SMnode *pMnode, const char *stbFullName,
return 0;
}
+static int32_t mndProcessDropTtltbReq(SRpcMsg *pRsp) {
+ return 0;
+}
+
static int32_t mndProcessDropStbReq(SRpcMsg *pReq) {
SMnode *pMnode = pReq->info.node;
int32_t code = -1;
diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c
index 5c178278c1..0bcd798ed1 100644
--- a/source/dnode/mnode/impl/src/mndVgroup.c
+++ b/source/dnode/mnode/impl/src/mndVgroup.c
@@ -59,6 +59,7 @@ int32_t mndInitVgroup(SMnode *pMnode) {
mndSetMsgHandle(pMnode, TDMT_VND_ALTER_HASHRANGE_RSP, mndTransProcessRsp);
mndSetMsgHandle(pMnode, TDMT_DND_DROP_VNODE_RSP, mndTransProcessRsp);
mndSetMsgHandle(pMnode, TDMT_VND_COMPACT_RSP, mndTransProcessRsp);
+ mndSetMsgHandle(pMnode, TDMT_VND_DISABLE_WRITE_RSP, mndTransProcessRsp);
mndSetMsgHandle(pMnode, TDMT_MND_REDISTRIBUTE_VGROUP, mndProcessRedistributeVgroupMsg);
mndSetMsgHandle(pMnode, TDMT_MND_SPLIT_VGROUP, mndProcessSplitVgroupMsg);
@@ -355,9 +356,7 @@ static void *mndBuildAlterVnodeReplicaReq(SMnode *pMnode, SDbObj *pDb, SVgObj *p
SReplica *pReplica = &alterReq.replicas[v];
SVnodeGid *pVgid = &pVgroup->vnodeGid[v];
SDnodeObj *pVgidDnode = mndAcquireDnode(pMnode, pVgid->dnodeId);
- if (pVgidDnode == NULL) {
- return NULL;
- }
+ if (pVgidDnode == NULL) return NULL;
pReplica->id = pVgidDnode->id;
pReplica->port = pVgidDnode->port;
@@ -397,6 +396,57 @@ static void *mndBuildAlterVnodeReplicaReq(SMnode *pMnode, SDbObj *pDb, SVgObj *p
return pReq;
}
+static void *mndBuildDisableVnodeWriteReq(SMnode *pMnode, SDbObj *pDb, int32_t vgId, int32_t *pContLen) {
+ SDisableVnodeWriteReq disableReq = {
+ .vgId = vgId,
+ .disable = 1,
+ };
+
+ mInfo("vgId:%d, build disable vnode write req", vgId);
+ int32_t contLen = tSerializeSDisableVnodeWriteReq(NULL, 0, &disableReq);
+ if (contLen < 0) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
+
+ void *pReq = taosMemoryMalloc(contLen);
+ if (pReq == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
+
+ tSerializeSDisableVnodeWriteReq(pReq, contLen, &disableReq);
+ *pContLen = contLen;
+ return pReq;
+}
+
+static void *mndBuildAlterVnodeHashRangeReq(SMnode *pMnode, SVgObj *pVgroup, int32_t dstVgId, int32_t *pContLen) {
+ SAlterVnodeHashRangeReq alterReq = {
+ .srcVgId = pVgroup->vgId,
+ .dstVgId = dstVgId,
+ .hashBegin = pVgroup->hashBegin,
+ .hashEnd = pVgroup->hashEnd,
+ };
+
+ mInfo("vgId:%d, build alter vnode hashrange req, dstVgId:%d, begin:%u, end:%u", pVgroup->vgId, dstVgId,
+ pVgroup->hashBegin, pVgroup->hashEnd);
+ int32_t contLen = tSerializeSAlterVnodeHashRangeReq(NULL, 0, &alterReq);
+ if (contLen < 0) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
+
+ void *pReq = taosMemoryMalloc(contLen);
+ if (pReq == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
+
+ tSerializeSAlterVnodeHashRangeReq(pReq, contLen, &alterReq);
+ *pContLen = contLen;
+ return pReq;
+}
+
void *mndBuildDropVnodeReq(SMnode *pMnode, SDnodeObj *pDnode, SDbObj *pDb, SVgObj *pVgroup, int32_t *pContLen) {
SDropVnodeReq dropReq = {0};
dropReq.dnodeId = pDnode->id;
@@ -1036,6 +1086,7 @@ int32_t mndAddAlterVnodeConfirmAction(SMnode *pMnode, STrans *pTrans, SDbObj *pD
STransAction action = {0};
action.epSet = mndGetVgroupEpset(pMnode, pVgroup);
+ mInfo("vgId:%d, build alter vnode confirm req", pVgroup->vgId);
int32_t contLen = sizeof(SMsgHead);
SMsgHead *pHead = taosMemoryMalloc(contLen);
if (pHead == NULL) {
@@ -1060,7 +1111,25 @@ int32_t mndAddAlterVnodeConfirmAction(SMnode *pMnode, STrans *pTrans, SDbObj *pD
return 0;
}
-int32_t mndAddAlterVnodeHashRangeAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup) { return 0; }
+static int32_t mndAddAlterVnodeHashRangeAction(SMnode *pMnode, STrans *pTrans, SVgObj *pVgroup, int32_t dstVgId) {
+ STransAction action = {0};
+ action.epSet = mndGetVgroupEpset(pMnode, pVgroup);
+
+ int32_t contLen = 0;
+ void *pReq = mndBuildAlterVnodeHashRangeReq(pMnode, pVgroup, dstVgId, &contLen);
+ if (pReq == NULL) return -1;
+
+ action.pCont = pReq;
+ action.contLen = contLen;
+ action.msgType = TDMT_VND_ALTER_HASHRANGE;
+
+ if (mndTransAppendRedoAction(pTrans, &action) != 0) {
+ taosMemoryFree(pReq);
+ return -1;
+ }
+
+ return 0;
+}
int32_t mndAddAlterVnodeConfigAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup) {
STransAction action = {0};
@@ -1106,6 +1175,30 @@ int32_t mndAddAlterVnodeReplicaAction(SMnode *pMnode, STrans *pTrans, SDbObj *pD
return 0;
}
+static int32_t mndAddDisableVnodeWriteAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, int32_t dnodeId) {
+ SDnodeObj *pDnode = mndAcquireDnode(pMnode, dnodeId);
+ if (pDnode == NULL) return -1;
+
+ STransAction action = {0};
+ action.epSet = mndGetDnodeEpset(pDnode);
+ mndReleaseDnode(pMnode, pDnode);
+
+ int32_t contLen = 0;
+ void *pReq = mndBuildDisableVnodeWriteReq(pMnode, pDb, pVgroup->vgId, &contLen);
+ if (pReq == NULL) return -1;
+
+ action.pCont = pReq;
+ action.contLen = contLen;
+ action.msgType = TDMT_VND_DISABLE_WRITE;
+
+ if (mndTransAppendRedoAction(pTrans, &action) != 0) {
+ taosMemoryFree(pReq);
+ return -1;
+ }
+
+ return 0;
+}
+
int32_t mndAddDropVnodeAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, SVnodeGid *pVgid,
bool isRedo) {
STransAction action = {0};
@@ -1770,9 +1863,11 @@ static int32_t mndAddAdjustVnodeHashRangeAction(SMnode *pMnode, STrans *pTrans,
}
static int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj *pVgroup) {
- int32_t code = -1;
- STrans *pTrans = NULL;
- SArray *pArray = mndBuildDnodesArray(pMnode, 0);
+ int32_t code = -1;
+ STrans *pTrans = NULL;
+ SSdbRaw *pRaw = NULL;
+ SDbObj dbObj = {0};
+ SArray *pArray = mndBuildDnodesArray(pMnode, 0);
pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq, "split-vgroup");
if (pTrans == NULL) goto _OVER;
@@ -1791,18 +1886,21 @@ static int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj
if (mndAddVnodeToVgroup(pMnode, pTrans, &newVg1, pArray) != 0) goto _OVER;
if (mndAddAlterVnodeReplicaAction(pMnode, pTrans, pDb, &newVg1, newVg1.vnodeGid[0].dnodeId) != 0) goto _OVER;
if (mndAddCreateVnodeAction(pMnode, pTrans, pDb, &newVg1, &newVg1.vnodeGid[1]) != 0) goto _OVER;
- if (mndAddAlterVnodeConfirmAction(pMnode, pTrans, pDb, &newVg1) != 0) goto _OVER;
} else if (newVg1.replica == 3) {
SVnodeGid del1 = {0};
if (mndRemoveVnodeFromVgroup(pMnode, pTrans, &newVg1, pArray, &del1) != 0) goto _OVER;
if (mndAddDropVnodeAction(pMnode, pTrans, pDb, &newVg1, &del1, true) != 0) goto _OVER;
if (mndAddAlterVnodeReplicaAction(pMnode, pTrans, pDb, &newVg1, newVg1.vnodeGid[0].dnodeId) != 0) goto _OVER;
if (mndAddAlterVnodeReplicaAction(pMnode, pTrans, pDb, &newVg1, newVg1.vnodeGid[1].dnodeId) != 0) goto _OVER;
- if (mndAddAlterVnodeConfirmAction(pMnode, pTrans, pDb, &newVg1) != 0) goto _OVER;
} else {
goto _OVER;
}
+ for (int32_t i = 0; i < newVg1.replica; ++i) {
+ if (mndAddDisableVnodeWriteAction(pMnode, pTrans, pDb, &newVg1, newVg1.vnodeGid[i].dnodeId) != 0) goto _OVER;
+ }
+ if (mndAddAlterVnodeConfirmAction(pMnode, pTrans, pDb, &newVg1) != 0) goto _OVER;
+
mInfo("vgId:%d, vgroup info after adjust replica, replica:%d hashBegin:%u hashEnd:%u vnode:0 dnode:%d", newVg1.vgId,
newVg1.replica, newVg1.hashBegin, newVg1.hashEnd, newVg1.vnodeGid[0].dnodeId);
for (int32_t i = 0; i < newVg1.replica; ++i) {
@@ -1820,44 +1918,6 @@ static int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj
memcpy(&newVg2.vnodeGid[0], &newVg2.vnodeGid[1], sizeof(SVnodeGid));
memset(&newVg2.vnodeGid[1], 0, sizeof(SVnodeGid));
- mInfo("vgId:%d, vgroup info after adjust hash, replica:%d hashBegin:%u hashEnd:%u vnode:0 dnode:%d", newVg1.vgId,
- newVg1.replica, newVg1.hashBegin, newVg1.hashEnd, newVg1.vnodeGid[0].dnodeId);
- mInfo("vgId:%d, vgroup info after adjust hash, replica:%d hashBegin:%u hashEnd:%u vnode:0 dnode:%d", newVg2.vgId,
- newVg2.replica, newVg2.hashBegin, newVg2.hashEnd, newVg2.vnodeGid[0].dnodeId);
-
- if (mndAddAlterVnodeHashRangeAction(pMnode, pTrans, pDb, &newVg1) != 0) goto _OVER;
- if (mndAddAlterVnodeHashRangeAction(pMnode, pTrans, pDb, &newVg2) != 0) goto _OVER;
-
-#if 0
- // adjust vgroup replica
- if (pDb->cfg.replications != newVg1.replica) {
- if (mndBuildAlterVgroupAction(pMnode, pTrans, pDb, pDb, &newVg1, pArray) != 0) goto _OVER;
- }
- if (pDb->cfg.replications != newVg2.replica) {
- if (mndBuildAlterVgroupAction(pMnode, pTrans, pDb, pDb, &newVg2, pArray) != 0) goto _OVER;
- }
-#endif
-
- {
- SSdbRaw *pRaw = mndVgroupActionEncode(&newVg1);
- if (pRaw == NULL) return -1;
- if (mndTransAppendCommitlog(pTrans, pRaw) != 0) {
- sdbFreeRaw(pRaw);
- return -1;
- }
- (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY);
- }
-
- {
- SSdbRaw *pRaw = mndVgroupActionEncode(&newVg2);
- if (pRaw == NULL) return -1;
- if (mndTransAppendCommitlog(pTrans, pRaw) != 0) {
- sdbFreeRaw(pRaw);
- return -1;
- }
- (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY);
- }
-
mInfo("vgId:%d, vgroup info after adjust hash, replica:%d hashBegin:%u hashEnd:%u vnode:0 dnode:%d", newVg1.vgId,
newVg1.replica, newVg1.hashBegin, newVg1.hashEnd, newVg1.vnodeGid[0].dnodeId);
for (int32_t i = 0; i < newVg1.replica; ++i) {
@@ -1869,28 +1929,83 @@ static int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj
mInfo("vgId:%d, vnode:%d dnode:%d", newVg2.vgId, i, newVg2.vnodeGid[i].dnodeId);
}
+ int32_t maxVgId = sdbGetMaxId(pMnode->pSdb, SDB_VGROUP);
+ if (mndAddAlterVnodeHashRangeAction(pMnode, pTrans, &newVg1, maxVgId) != 0) goto _OVER;
+ newVg1.vgId = maxVgId;
+
+ maxVgId++;
+ if (mndAddAlterVnodeHashRangeAction(pMnode, pTrans, &newVg2, maxVgId) != 0) goto _OVER;
+ newVg2.vgId = maxVgId;
+
+ // adjust vgroup replica
+ if (pDb->cfg.replications != newVg1.replica) {
+ if (mndBuildAlterVgroupAction(pMnode, pTrans, pDb, pDb, &newVg1, pArray) != 0) goto _OVER;
+ }
+ if (pDb->cfg.replications != newVg2.replica) {
+ if (mndBuildAlterVgroupAction(pMnode, pTrans, pDb, pDb, &newVg2, pArray) != 0) goto _OVER;
+ }
+
+ pRaw = mndVgroupActionEncode(&newVg1);
+ if (pRaw == NULL) goto _OVER;
+ if (mndTransAppendCommitlog(pTrans, pRaw) != 0) goto _OVER;
+ (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY);
+ pRaw = NULL;
+
+ pRaw = mndVgroupActionEncode(&newVg2);
+ if (pRaw == NULL) goto _OVER;
+ if (mndTransAppendCommitlog(pTrans, pRaw) != 0) goto _OVER;
+ (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY);
+ pRaw = NULL;
+
+ pRaw = mndVgroupActionEncode(pVgroup);
+ if (pRaw == NULL) goto _OVER;
+ if (mndTransAppendCommitlog(pTrans, pRaw) != 0) goto _OVER;
+ (void)sdbSetRawStatus(pRaw, SDB_STATUS_DROPPED);
+ pRaw = NULL;
+
+ memcpy(&dbObj, pDb, sizeof(SDbObj));
+ if (dbObj.cfg.pRetensions != NULL) {
+ dbObj.cfg.pRetensions = taosArrayDup(pDb->cfg.pRetensions, NULL);
+ if (dbObj.cfg.pRetensions == NULL) goto _OVER;
+ }
+ dbObj.vgVersion++;
+ dbObj.updateTime = taosGetTimestampMs();
+ dbObj.cfg.numOfVgroups++;
+ pRaw = mndDbActionEncode(&dbObj);
+ if (pRaw == NULL) goto _OVER;
+ if (mndTransAppendCommitlog(pTrans, pRaw) != 0) goto _OVER;
+ (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY);
+ pRaw = NULL;
+
if (mndTransPrepare(pMnode, pTrans) != 0) goto _OVER;
code = 0;
_OVER:
taosArrayDestroy(pArray);
mndTransDrop(pTrans);
+ sdbFreeRaw(pRaw);
+ taosArrayDestroy(dbObj.cfg.pRetensions);
return code;
}
static int32_t mndProcessSplitVgroupMsg(SRpcMsg *pReq) {
SMnode *pMnode = pReq->info.node;
int32_t code = -1;
- int32_t vgId = 2;
SVgObj *pVgroup = NULL;
SDbObj *pDb = NULL;
- mInfo("vgId:%d, start to split", vgId);
+ SSplitVgroupReq req = {0};
+ if (tDeserializeSSplitVgroupReq(pReq->pCont, pReq->contLen, &req) != 0) {
+ terrno = TSDB_CODE_INVALID_MSG;
+ goto _OVER;
+ }
+
+ mInfo("vgId:%d, start to split", req.vgId);
if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_SPLIT_VGROUP) != 0) {
goto _OVER;
}
- pVgroup = mndAcquireVgroup(pMnode, vgId);
+ pVgroup = mndAcquireVgroup(pMnode, req.vgId);
if (pVgroup == NULL) goto _OVER;
pDb = mndAcquireDb(pMnode, pVgroup->dbName);
diff --git a/source/dnode/snode/src/snode.c b/source/dnode/snode/src/snode.c
index 860db20fa8..1d2f4da26b 100644
--- a/source/dnode/snode/src/snode.c
+++ b/source/dnode/snode/src/snode.c
@@ -93,6 +93,8 @@ int32_t sndExpandTask(SSnode *pSnode, SStreamTask *pTask, int64_t ver) {
pTask->exec.executor = qCreateStreamExecTaskInfo(pTask->exec.qmsg, &mgHandle);
ASSERT(pTask->exec.executor);
+ streamSetupTrigger(pTask);
+
return 0;
}
diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h
index 7d368c76c5..db35a7c088 100644
--- a/source/dnode/vnode/inc/vnode.h
+++ b/source/dnode/vnode/inc/vnode.h
@@ -50,13 +50,16 @@ extern const SVnodeCfg vnodeCfgDefault;
int32_t vnodeInit(int32_t nthreads);
void vnodeCleanup();
int32_t vnodeCreate(const char *path, SVnodeCfg *pCfg, STfs *pTfs);
-int32_t vnodeAlter(const char *path, SAlterVnodeReplicaReq *pReq, STfs *pTfs);
+int32_t vnodeAlterReplica(const char *path, SAlterVnodeReplicaReq *pReq, STfs *pTfs);
+int32_t vnodeAlterHashRange(const char *srcPath, const char *dstPath, SAlterVnodeHashRangeReq *pReq, STfs *pTfs);
void vnodeDestroy(const char *path, STfs *pTfs);
SVnode *vnodeOpen(const char *path, STfs *pTfs, SMsgCb msgCb);
void vnodePreClose(SVnode *pVnode);
void vnodePostClose(SVnode *pVnode);
void vnodeSyncCheckTimeout(SVnode *pVnode);
void vnodeClose(SVnode *pVnode);
+int32_t vnodeSyncCommit(SVnode *pVnode);
+int32_t vnodeBegin(SVnode* pVnode);
int32_t vnodeStart(SVnode *pVnode);
void vnodeStop(SVnode *pVnode);
diff --git a/source/dnode/vnode/src/meta/metaCommit.c b/source/dnode/vnode/src/meta/metaCommit.c
index f61930b84c..f597c100d0 100644
--- a/source/dnode/vnode/src/meta/metaCommit.c
+++ b/source/dnode/vnode/src/meta/metaCommit.c
@@ -56,4 +56,7 @@ int metaPrepareAsyncCommit(SMeta *pMeta) {
}
// abort the meta txn
-int metaAbort(SMeta *pMeta) { return tdbAbort(pMeta->pEnv, pMeta->txn); }
+int metaAbort(SMeta *pMeta) {
+ if (!pMeta->txn) return 0;
+ return tdbAbort(pMeta->pEnv, pMeta->txn);
+}
diff --git a/source/dnode/vnode/src/meta/metaOpen.c b/source/dnode/vnode/src/meta/metaOpen.c
index 609ffc58c3..e5bc301fa1 100644
--- a/source/dnode/vnode/src/meta/metaOpen.c
+++ b/source/dnode/vnode/src/meta/metaOpen.c
@@ -203,7 +203,7 @@ _err:
int metaClose(SMeta *pMeta) {
if (pMeta) {
- if (pMeta->pEnv) tdbAbort(pMeta->pEnv, pMeta->txn);
+ if (pMeta->pEnv) metaAbort(pMeta);
if (pMeta->pCache) metaCacheClose(pMeta);
if (pMeta->pIdx) metaCloseIdx(pMeta);
if (pMeta->pStreamDb) tdbTbClose(pMeta->pStreamDb);
diff --git a/source/dnode/vnode/src/tq/tqSink.c b/source/dnode/vnode/src/tq/tqSink.c
index f1103ad48a..3801a25d6d 100644
--- a/source/dnode/vnode/src/tq/tqSink.c
+++ b/source/dnode/vnode/src/tq/tqSink.c
@@ -488,9 +488,7 @@ void tqSinkToTablePipeline2(SStreamTask* pTask, void* vnode, int64_t ver, void*
};
void* pData = colDataGetData(pTagData, rowId);
if (colDataIsNull_s(pTagData, rowId)) {
- tagVal.type = TSDB_DATA_TYPE_NULL;
- tagVal.pData = NULL;
- tagVal.nData = 0;
+ continue;
} else if (IS_VAR_DATA_TYPE(pTagData->info.type)) {
tagVal.nData = varDataLen(pData);
tagVal.pData = varDataVal(pData);
diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c
index a2212292a7..fc0678e3e6 100644
--- a/source/dnode/vnode/src/tsdb/tsdbRead.c
+++ b/source/dnode/vnode/src/tsdb/tsdbRead.c
@@ -218,6 +218,7 @@ static int32_t doBuildDataBlock(STsdbReader* pReader);
static TSDBKEY getCurrentKeyInBuf(STableBlockScanInfo* pScanInfo, STsdbReader* pReader);
static bool hasDataInFileBlock(const SBlockData* pBlockData, const SFileBlockDumpInfo* pDumpInfo);
static void initBlockDumpInfo(STsdbReader* pReader, SDataBlockIter* pBlockIter);
+static int32_t getInitialDelIndex(const SArray* pDelSkyline, int32_t order);
static bool outOfTimeWindow(int64_t ts, STimeWindow* pWindow) { return (ts > pWindow->ekey) || (ts < pWindow->skey); }
@@ -1192,9 +1193,9 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn
int32_t unDumpedRows = asc ? pBlock->nRow - pDumpInfo->rowIndex : pDumpInfo->rowIndex + 1;
tsdbDebug("%p copy file block to sdatablock, global index:%d, table index:%d, brange:%" PRId64 "-%" PRId64
- ", rows:%d, remain:%d, minVer:%" PRId64 ", maxVer:%" PRId64 ", elapsed time:%.2f ms, %s",
+ ", rows:%d, remain:%d, minVer:%" PRId64 ", maxVer:%" PRId64 ", uid:%"PRIu64" elapsed time:%.2f ms, %s",
pReader, pBlockIter->index, pBlockInfo->tbBlockIdx, pBlock->minKey.ts, pBlock->maxKey.ts, dumpedRows,
- unDumpedRows, pBlock->minVer, pBlock->maxVer, elapsedTime, pReader->idStr);
+ unDumpedRows, pBlock->minVer, pBlock->maxVer, pBlockInfo->uid, elapsedTime, pReader->idStr);
return TSDB_CODE_SUCCESS;
}
@@ -2268,17 +2269,17 @@ static int32_t initMemDataIterator(STableBlockScanInfo* pBlockScanInfo, STsdbRea
if (code == TSDB_CODE_SUCCESS) {
pBlockScanInfo->iter.hasVal = (tsdbTbDataIterGet(pBlockScanInfo->iter.iter) != NULL);
- tsdbDebug("%p uid:%" PRId64 ", check data in mem from skey:%" PRId64 ", order:%d, ts range in buf:%" PRId64
+ tsdbDebug("%p uid:%" PRIu64 ", check data in mem from skey:%" PRId64 ", order:%d, ts range in buf:%" PRId64
"-%" PRId64 " %s",
pReader, pBlockScanInfo->uid, startKey.ts, pReader->order, d->minKey, d->maxKey, pReader->idStr);
} else {
- tsdbError("%p uid:%" PRId64 ", failed to create iterator for imem, code:%s, %s", pReader, pBlockScanInfo->uid,
+ tsdbError("%p uid:%" PRIu64 ", failed to create iterator for imem, code:%s, %s", pReader, pBlockScanInfo->uid,
tstrerror(code), pReader->idStr);
return code;
}
}
} else {
- tsdbDebug("%p uid:%" PRId64 ", no data in mem, %s", pReader, pBlockScanInfo->uid, pReader->idStr);
+ tsdbDebug("%p uid:%" PRIu64 ", no data in mem, %s", pReader, pBlockScanInfo->uid, pReader->idStr);
}
STbData* di = NULL;
@@ -2289,17 +2290,17 @@ static int32_t initMemDataIterator(STableBlockScanInfo* pBlockScanInfo, STsdbRea
if (code == TSDB_CODE_SUCCESS) {
pBlockScanInfo->iiter.hasVal = (tsdbTbDataIterGet(pBlockScanInfo->iiter.iter) != NULL);
- tsdbDebug("%p uid:%" PRId64 ", check data in imem from skey:%" PRId64 ", order:%d, ts range in buf:%" PRId64
+ tsdbDebug("%p uid:%" PRIu64 ", check data in imem from skey:%" PRId64 ", order:%d, ts range in buf:%" PRId64
"-%" PRId64 " %s",
pReader, pBlockScanInfo->uid, startKey.ts, pReader->order, di->minKey, di->maxKey, pReader->idStr);
} else {
- tsdbError("%p uid:%" PRId64 ", failed to create iterator for mem, code:%s, %s", pReader, pBlockScanInfo->uid,
+ tsdbError("%p uid:%" PRIu64 ", failed to create iterator for mem, code:%s, %s", pReader, pBlockScanInfo->uid,
tstrerror(code), pReader->idStr);
return code;
}
}
} else {
- tsdbDebug("%p uid:%" PRId64 ", no data in imem, %s", pReader, pBlockScanInfo->uid, pReader->idStr);
+ tsdbDebug("%p uid:%" PRIu64 ", no data in imem, %s", pReader, pBlockScanInfo->uid, pReader->idStr);
}
initDelSkylineIterator(pBlockScanInfo, pReader, d, di);
@@ -2609,6 +2610,14 @@ _end:
void setComposedBlockFlag(STsdbReader* pReader, bool composed) { pReader->status.composedDataBlock = composed; }
+int32_t getInitialDelIndex(const SArray* pDelSkyline, int32_t order) {
+ if (pDelSkyline == NULL) {
+ return 0;
+ }
+
+ return ASCENDING_TRAVERSE(order) ? 0 : taosArrayGetSize(pDelSkyline) - 1;
+}
+
int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader* pReader, STbData* pMemTbData,
STbData* piMemTbData) {
if (pBlockScanInfo->delSkyline != NULL) {
@@ -2626,7 +2635,6 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
if (pIdx != NULL) {
code = tsdbReadDelData(pReader->pDelFReader, pIdx, pDelData);
}
-
if (code != TSDB_CODE_SUCCESS) {
goto _err;
}
@@ -2655,11 +2663,13 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
}
taosArrayDestroy(pDelData);
- pBlockScanInfo->iter.index =
- ASCENDING_TRAVERSE(pReader->order) ? 0 : taosArrayGetSize(pBlockScanInfo->delSkyline) - 1;
- pBlockScanInfo->iiter.index = pBlockScanInfo->iter.index;
- pBlockScanInfo->fileDelIndex = pBlockScanInfo->iter.index;
- pBlockScanInfo->lastBlockDelIndex = pBlockScanInfo->iter.index;
+ int32_t index = getInitialDelIndex(pBlockScanInfo->delSkyline, pReader->order);
+
+ pBlockScanInfo->iter.index = index;
+ pBlockScanInfo->iiter.index = index;
+ pBlockScanInfo->fileDelIndex = index;
+ pBlockScanInfo->lastBlockDelIndex = index;
+
return code;
_err:
@@ -2758,7 +2768,7 @@ static int32_t uidComparFunc(const void* p1, const void* p2) {
}
}
-static void extractOrderedTableUidList(SUidOrderCheckInfo* pOrderCheckInfo, SReaderStatus* pStatus) {
+static void extractOrderedTableUidList(SUidOrderCheckInfo* pOrderCheckInfo, SReaderStatus* pStatus, int32_t order) {
int32_t index = 0;
int32_t total = taosHashGetSize(pStatus->pTableMap);
@@ -2772,7 +2782,21 @@ static void extractOrderedTableUidList(SUidOrderCheckInfo* pOrderCheckInfo, SRea
taosSort(pOrderCheckInfo->tableUidList, total, sizeof(uint64_t), uidComparFunc);
}
-static int32_t initOrderCheckInfo(SUidOrderCheckInfo* pOrderCheckInfo, SReaderStatus* pStatus) {
+// reset the last del file index
+static void resetScanBlockLastBlockDelIndex(SReaderStatus* pStatus, int32_t order) {
+ void* p = taosHashIterate(pStatus->pTableMap, NULL);
+ while (p != NULL) {
+ STableBlockScanInfo* pScanInfo = *(STableBlockScanInfo**)p;
+
+ // reset the last del file index
+ pScanInfo->lastBlockDelIndex = getInitialDelIndex(pScanInfo->delSkyline, order);
+ p = taosHashIterate(pStatus->pTableMap, p);
+ }
+}
+
+static int32_t initOrderCheckInfo(SUidOrderCheckInfo* pOrderCheckInfo, STsdbReader* pReader) {
+ SReaderStatus* pStatus = &pReader->status;
+
int32_t total = taosHashGetSize(pStatus->pTableMap);
if (total == 0) {
return TSDB_CODE_SUCCESS;
@@ -2785,7 +2809,7 @@ static int32_t initOrderCheckInfo(SUidOrderCheckInfo* pOrderCheckInfo, SReaderSt
return TSDB_CODE_OUT_OF_MEMORY;
}
- extractOrderedTableUidList(pOrderCheckInfo, pStatus);
+ extractOrderedTableUidList(pOrderCheckInfo, pStatus, pReader->order);
uint64_t uid = pOrderCheckInfo->tableUidList[0];
pStatus->pTableIter = taosHashGet(pStatus->pTableMap, &uid, sizeof(uid));
} else {
@@ -2802,7 +2826,7 @@ static int32_t initOrderCheckInfo(SUidOrderCheckInfo* pOrderCheckInfo, SReaderSt
}
pOrderCheckInfo->tableUidList = p;
- extractOrderedTableUidList(pOrderCheckInfo, pStatus);
+ extractOrderedTableUidList(pOrderCheckInfo, pStatus, pReader->order);
uid = pOrderCheckInfo->tableUidList[0];
pStatus->pTableIter = taosHashGet(pStatus->pTableMap, &uid, sizeof(uid));
@@ -2822,11 +2846,7 @@ static bool moveToNextTable(SUidOrderCheckInfo* pOrderedCheckInfo, SReaderStatus
uint64_t uid = pOrderedCheckInfo->tableUidList[pOrderedCheckInfo->currentIndex];
pStatus->pTableIter = taosHashGet(pStatus->pTableMap, &uid, sizeof(uid));
- if (pStatus->pTableIter == NULL) {
- return false;
- }
-
- return true;
+ return (pStatus->pTableIter != NULL);
}
static int32_t doLoadLastBlockSequentially(STsdbReader* pReader) {
@@ -2834,7 +2854,7 @@ static int32_t doLoadLastBlockSequentially(STsdbReader* pReader) {
SLastBlockReader* pLastBlockReader = pStatus->fileIter.pLastBlockReader;
SUidOrderCheckInfo* pOrderedCheckInfo = &pStatus->uidCheckInfo;
- int32_t code = initOrderCheckInfo(pOrderedCheckInfo, pStatus);
+ int32_t code = initOrderCheckInfo(pOrderedCheckInfo, pReader);
if (code != TSDB_CODE_SUCCESS || (taosHashGetSize(pStatus->pTableMap) == 0)) {
return code;
}
@@ -2899,6 +2919,8 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) {
SFileDataBlockInfo* pBlockInfo = getCurrentBlockInfo(pBlockIter);
SLastBlockReader* pLastBlockReader = pReader->status.fileIter.pLastBlockReader;
+ ASSERT(pBlockInfo != NULL);
+
if (pBlockInfo != NULL) {
pScanInfo =
*(STableBlockScanInfo**)taosHashGet(pReader->status.pTableMap, &pBlockInfo->uid, sizeof(pBlockInfo->uid));
@@ -2919,7 +2941,7 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) {
initLastBlockReader(pLastBlockReader, pScanInfo, pReader);
TSDBKEY keyInBuf = getCurrentKeyInBuf(pScanInfo, pReader);
- if (pBlockInfo == NULL) { // build data block from last data file
+ /*if (pBlockInfo == NULL) { // build data block from last data file
SBlockData* pBData = &pReader->status.fileBlockData;
tBlockDataReset(pBData);
@@ -2951,7 +2973,7 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) {
pReader, pResBlock->info.id.uid, pResBlock->info.window.skey, pResBlock->info.window.ekey,
pResBlock->info.rows, el, pReader->idStr);
}
- } else if (fileBlockShouldLoad(pReader, pBlockInfo, pBlock, pScanInfo, keyInBuf, pLastBlockReader)) {
+ } else*/ if (fileBlockShouldLoad(pReader, pBlockInfo, pBlock, pScanInfo, keyInBuf, pLastBlockReader)) {
code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData, pScanInfo->uid);
if (code != TSDB_CODE_SUCCESS) {
return code;
@@ -3130,6 +3152,7 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
// this file does not have data files, let's start check the last block file if exists
if (pBlockIter->numOfBlocks == 0) {
+ resetScanBlockLastBlockDelIndex(&pReader->status, pReader->order);
goto _begin;
}
}
@@ -3166,6 +3189,7 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
tBlockDataReset(pBlockData);
resetDataBlockIterator(pBlockIter, pReader->order);
+ resetScanBlockLastBlockDelIndex(&pReader->status, pReader->order);
goto _begin;
} else {
code = initForFirstBlockInFile(pReader, pBlockIter);
@@ -3177,6 +3201,7 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
// this file does not have blocks, let's start check the last block file
if (pBlockIter->numOfBlocks == 0) {
+ resetScanBlockLastBlockDelIndex(&pReader->status, pReader->order);
goto _begin;
}
}
@@ -4019,6 +4044,7 @@ void tsdbReaderClose(STsdbReader* pReader) {
return;
}
+ tsdbAcquireReader(pReader);
{
if (pReader->innerReader[0] != NULL || pReader->innerReader[1] != NULL) {
STsdbReader* p = pReader->innerReader[0];
@@ -4076,10 +4102,12 @@ void tsdbReaderClose(STsdbReader* pReader) {
pReader->pDelIdx = NULL;
}
- qTrace("tsdb/reader: %p, untake snapshot", pReader);
+ qTrace("tsdb/reader-close: %p, untake snapshot", pReader);
tsdbUntakeReadSnap(pReader, pReader->pReadSnap, true);
pReader->pReadSnap = NULL;
+ tsdbReleaseReader(pReader);
+
tsdbUninitReaderLock(pReader);
taosMemoryFree(pReader->status.uidCheckInfo.tableUidList);
diff --git a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c
index af3183a3c4..0e804bc65e 100644
--- a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c
+++ b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c
@@ -1207,7 +1207,7 @@ static int32_t tsdbSnapWriteTableRow(STsdbSnapWriter* pWriter, TSDBROW* pRow) {
TSDB_CHECK_CODE(code, lino, _exit);
}
- tMapDataPutItem(&pWriter->pDIter->dIter.mDataBlk, &dataBlk, tPutDataBlk);
+ tMapDataPutItem(&pWriter->mDataBlk, &dataBlk, tPutDataBlk);
pWriter->pDIter->dIter.iDataBlk++;
} else {
code = tsdbReadDataBlockEx(pWriter->pDataFReader, &dataBlk, &pWriter->pDIter->dIter.bData);
diff --git a/source/dnode/vnode/src/vnd/vnodeBufPool.c b/source/dnode/vnode/src/vnd/vnodeBufPool.c
index b1575fb496..40112c5579 100644
--- a/source/dnode/vnode/src/vnd/vnodeBufPool.c
+++ b/source/dnode/vnode/src/vnd/vnodeBufPool.c
@@ -219,10 +219,10 @@ void vnodeBufPoolAddToFreeList(SVBufPool *pPool) {
if (pPool->node.size != size) {
SVBufPool *pNewPool = NULL;
if (vnodeBufPoolCreate(pVnode, pPool->id, size, &pNewPool) < 0) {
- vWarn("vgId:%d failed to change buffer pool of id %d size from %" PRId64 " to %" PRId64 " since %s",
+ vWarn("vgId:%d, failed to change buffer pool of id %d size from %" PRId64 " to %" PRId64 " since %s",
TD_VID(pVnode), pPool->id, pPool->node.size, size, tstrerror(errno));
} else {
- vInfo("vgId:%d buffer pool of id %d size changed from %" PRId64 " to %" PRId64, TD_VID(pVnode), pPool->id,
+ vInfo("vgId:%d, buffer pool of id %d size changed from %" PRId64 " to %" PRId64, TD_VID(pVnode), pPool->id,
pPool->node.size, size);
vnodeBufPoolDestroy(pPool);
@@ -232,7 +232,7 @@ void vnodeBufPoolAddToFreeList(SVBufPool *pPool) {
}
// add to free list
- vDebug("vgId:%d buffer pool %p of id %d is added to free list", TD_VID(pVnode), pPool, pPool->id);
+ vDebug("vgId:%d, buffer pool %p of id %d is added to free list", TD_VID(pVnode), pPool, pPool->id);
vnodeBufPoolReset(pPool);
pPool->freeNext = pVnode->freeList;
pVnode->freeList = pPool;
@@ -307,7 +307,7 @@ int32_t vnodeBufPoolRecycle(SVBufPool *pPool) {
SVnode *pVnode = pPool->pVnode;
- vDebug("vgId:%d recycle buffer pool %p of id %d", TD_VID(pVnode), pPool, pPool->id);
+ vDebug("vgId:%d, recycle buffer pool %p of id %d", TD_VID(pVnode), pPool, pPool->id);
taosThreadMutexLock(&pPool->mutex);
diff --git a/source/dnode/vnode/src/vnd/vnodeCommit.c b/source/dnode/vnode/src/vnd/vnodeCommit.c
index 3e18da3e74..2441345d82 100644
--- a/source/dnode/vnode/src/vnd/vnodeCommit.c
+++ b/source/dnode/vnode/src/vnd/vnodeCommit.c
@@ -28,10 +28,10 @@ static int32_t vnodeTryRecycleBufPool(SVnode *pVnode) {
if (pVnode->onRecycle == NULL) {
if (pVnode->recycleHead == NULL) {
- vDebug("vgId:%d no recyclable buffer pool", TD_VID(pVnode));
+ vDebug("vgId:%d, no recyclable buffer pool", TD_VID(pVnode));
goto _exit;
} else {
- vDebug("vgId:%d buffer pool %p of id %d on recycle queue, try to recycle", TD_VID(pVnode), pVnode->recycleHead,
+ vDebug("vgId:%d, buffer pool %p of id %d on recycle queue, try to recycle", TD_VID(pVnode), pVnode->recycleHead,
pVnode->recycleHead->id);
pVnode->onRecycle = pVnode->recycleHead;
@@ -50,7 +50,7 @@ static int32_t vnodeTryRecycleBufPool(SVnode *pVnode) {
_exit:
if (code) {
- vError("vgId:%d %s failed since %s", TD_VID(pVnode), __func__, tstrerror(code));
+ vError("vgId:%d, %s failed since %s", TD_VID(pVnode), __func__, tstrerror(code));
}
return code;
}
@@ -65,7 +65,7 @@ static int32_t vnodeGetBufPoolToUse(SVnode *pVnode) {
++nTry;
if (pVnode->freeList) {
- vDebug("vgId:%d allocate free buffer pool on %d try, pPool:%p id:%d", TD_VID(pVnode), nTry, pVnode->freeList,
+ vDebug("vgId:%d, allocate free buffer pool on %d try, pPool:%p id:%d", TD_VID(pVnode), nTry, pVnode->freeList,
pVnode->freeList->id);
pVnode->inUse = pVnode->freeList;
@@ -74,13 +74,13 @@ static int32_t vnodeGetBufPoolToUse(SVnode *pVnode) {
pVnode->inUse->freeNext = NULL;
break;
} else {
- vDebug("vgId:%d no free buffer pool on %d try, try to recycle...", TD_VID(pVnode), nTry);
+ vDebug("vgId:%d, no free buffer pool on %d try, try to recycle...", TD_VID(pVnode), nTry);
code = vnodeTryRecycleBufPool(pVnode);
TSDB_CHECK_CODE(code, lino, _exit);
if (pVnode->freeList == NULL) {
- vDebug("vgId:%d no free buffer pool on %d try, wait %d ms...", TD_VID(pVnode), nTry, WAIT_TIME_MILI_SEC);
+ vDebug("vgId:%d, no free buffer pool on %d try, wait %d ms...", TD_VID(pVnode), nTry, WAIT_TIME_MILI_SEC);
struct timeval tv;
struct timespec ts;
@@ -105,7 +105,7 @@ static int32_t vnodeGetBufPoolToUse(SVnode *pVnode) {
_exit:
taosThreadMutexUnlock(&pVnode->mutex);
if (code) {
- vError("vgId:%d %s failed at line %d since %s", TD_VID(pVnode), __func__, lino, tstrerror(code));
+ vError("vgId:%d, %s failed at line %d since %s", TD_VID(pVnode), __func__, lino, tstrerror(code));
}
return code;
}
@@ -140,7 +140,7 @@ int vnodeBegin(SVnode *pVnode) {
_exit:
if (code) {
terrno = code;
- vError("vgId:%d %s failed at line %d since %s", TD_VID(pVnode), __func__, lino, tstrerror(code));
+ vError("vgId:%d, %s failed at line %d since %s", TD_VID(pVnode), __func__, lino, tstrerror(code));
}
return code;
}
@@ -351,7 +351,7 @@ static void vnodeReturnBufPool(SVnode *pVnode) {
if (nRef == 0) {
vnodeBufPoolAddToFreeList(pPool);
} else if (nRef > 0) {
- vDebug("vgId:%d buffer pool %p of id %d is added to recycle queue", TD_VID(pVnode), pPool, pPool->id);
+ vDebug("vgId:%d, buffer pool %p of id %d is added to recycle queue", TD_VID(pVnode), pPool, pPool->id);
if (pVnode->recycleTail == NULL) {
pPool->recyclePrev = pPool->recycleNext = NULL;
diff --git a/source/dnode/vnode/src/vnd/vnodeOpen.c b/source/dnode/vnode/src/vnd/vnodeOpen.c
index 61cb75b1da..da27b5e4d3 100644
--- a/source/dnode/vnode/src/vnd/vnodeOpen.c
+++ b/source/dnode/vnode/src/vnd/vnodeOpen.c
@@ -58,7 +58,7 @@ int32_t vnodeCreate(const char *path, SVnodeCfg *pCfg, STfs *pTfs) {
return 0;
}
-int32_t vnodeAlter(const char *path, SAlterVnodeReplicaReq *pReq, STfs *pTfs) {
+int32_t vnodeAlterReplica(const char *path, SAlterVnodeReplicaReq *pReq, STfs *pTfs) {
SVnodeInfo info = {0};
char dir[TSDB_FILENAME_LEN] = {0};
int32_t ret = 0;
@@ -107,6 +107,117 @@ int32_t vnodeAlter(const char *path, SAlterVnodeReplicaReq *pReq, STfs *pTfs) {
return 0;
}
+int32_t vnodeRenameVgroupId(const char *srcPath, const char *dstPath, int32_t srcVgId, int32_t dstVgId, STfs *pTfs) {
+ int32_t ret = tfsRename(pTfs, srcPath, dstPath);
+ if (ret != 0) return ret;
+
+ char oldRname[TSDB_FILENAME_LEN] = {0};
+ char newRname[TSDB_FILENAME_LEN] = {0};
+ char tsdbPath[TSDB_FILENAME_LEN] = {0};
+ char tsdbFilePrefix[TSDB_FILENAME_LEN] = {0};
+ snprintf(tsdbPath, TSDB_FILENAME_LEN, "%s%stsdb", dstPath, TD_DIRSEP);
+ snprintf(tsdbFilePrefix, TSDB_FILENAME_LEN, "tsdb%sv", TD_DIRSEP);
+
+ STfsDir *tsdbDir = tfsOpendir(pTfs, tsdbPath);
+ if (tsdbDir == NULL) return 0;
+
+ while (1) {
+ const STfsFile *tsdbFile = tfsReaddir(tsdbDir);
+ if (tsdbFile == NULL) break;
+ if (tsdbFile->rname == NULL) continue;
+ tstrncpy(oldRname, tsdbFile->rname, TSDB_FILENAME_LEN);
+
+ char *tsdbFilePrefixPos = strstr(oldRname, tsdbFilePrefix);
+ if (tsdbFilePrefixPos == NULL) continue;
+
+ int32_t tsdbFileVgId = atoi(tsdbFilePrefixPos + 6);
+ if (tsdbFileVgId == srcVgId) {
+ char *tsdbFileSurfixPos = strstr(tsdbFilePrefixPos, "f");
+ if (tsdbFileSurfixPos == NULL) continue;
+
+ tsdbFilePrefixPos[6] = 0;
+ snprintf(newRname, TSDB_FILENAME_LEN, "%s%d%s", oldRname, dstVgId, tsdbFileSurfixPos);
+ vInfo("vgId:%d, rename file from %s to %s", dstVgId, tsdbFile->rname, newRname);
+
+ ret = tfsRename(pTfs, tsdbFile->rname, newRname);
+ if (ret != 0) {
+ vInfo("vgId:%d, failed to rename file from %s to %s since %s", dstVgId, tsdbFile->rname, newRname, terrstr());
+ tfsClosedir(tsdbDir);
+ return ret;
+ }
+ }
+ }
+
+ tfsClosedir(tsdbDir);
+ return 0;
+}
+
+int32_t vnodeAlterHashRange(const char *srcPath, const char *dstPath, SAlterVnodeHashRangeReq *pReq, STfs *pTfs) {
+ SVnodeInfo info = {0};
+ char dir[TSDB_FILENAME_LEN] = {0};
+ int32_t ret = 0;
+
+ if (pTfs) {
+ snprintf(dir, TSDB_FILENAME_LEN, "%s%s%s", tfsGetPrimaryPath(pTfs), TD_DIRSEP, srcPath);
+ } else {
+ snprintf(dir, TSDB_FILENAME_LEN, "%s", srcPath);
+ }
+
+ // todo add stat file to handle exception while vnode open
+
+ ret = vnodeLoadInfo(dir, &info);
+ if (ret < 0) {
+ vError("vgId:%d, failed to read vnode config from %s since %s", pReq->srcVgId, srcPath, tstrerror(terrno));
+ return -1;
+ }
+
+ vInfo("vgId:%d, start to alter hashrange from [%u, %u) to [%u, %u)", pReq->srcVgId, info.config.hashBegin,
+ info.config.hashEnd, pReq->hashBegin, pReq->hashEnd);
+ info.config.vgId = pReq->dstVgId;
+ info.config.hashBegin = pReq->hashBegin;
+ info.config.hashEnd = pReq->hashEnd;
+ info.config.walCfg.vgId = pReq->dstVgId;
+
+ SSyncCfg *pCfg = &info.config.syncCfg;
+ pCfg->myIndex = 0;
+ pCfg->replicaNum = 1;
+ memset(&pCfg->nodeInfo, 0, sizeof(pCfg->nodeInfo));
+
+ vInfo("vgId:%d, alter vnode replicas to 1", pReq->srcVgId);
+ SNodeInfo *pNode = &pCfg->nodeInfo[0];
+ pNode->nodePort = tsServerPort;
+ tstrncpy(pNode->nodeFqdn, tsLocalFqdn, TSDB_FQDN_LEN);
+ (void)tmsgUpdateDnodeInfo(&pNode->nodeId, &pNode->clusterId, pNode->nodeFqdn, &pNode->nodePort);
+ vInfo("vgId:%d, ep:%s:%u dnode:%d", pReq->srcVgId, pNode->nodeFqdn, pNode->nodePort, pNode->nodeId);
+
+ info.config.syncCfg = *pCfg;
+
+ ret = vnodeSaveInfo(dir, &info);
+ if (ret < 0) {
+ vError("vgId:%d, failed to save vnode config since %s", pReq->dstVgId, tstrerror(terrno));
+ return -1;
+ }
+
+ ret = vnodeCommitInfo(dir, &info);
+ if (ret < 0) {
+ vError("vgId:%d, failed to commit vnode config since %s", pReq->dstVgId, tstrerror(terrno));
+ return -1;
+ }
+
+ vInfo("vgId:%d, start to rename %s to %s", pReq->dstVgId, srcPath, dstPath);
+ ret = vnodeRenameVgroupId(srcPath, dstPath, pReq->srcVgId, pReq->dstVgId, pTfs);
+ if (ret < 0) {
+ vError("vgId:%d, failed to rename vnode from %s to %s since %s", pReq->dstVgId, srcPath, dstPath,
+ tstrerror(terrno));
+ return -1;
+ }
+
+ // todo vnode compact here
+
+ vInfo("vgId:%d, vnode hashrange is altered", info.config.vgId);
+ return 0;
+}
+
void vnodeDestroy(const char *path, STfs *pTfs) {
vInfo("path:%s is removed while destroy vnode", path);
tfsRmdir(pTfs, path);
diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c
index bed61dfd6c..ad907a5595 100644
--- a/source/dnode/vnode/src/vnd/vnodeSvr.c
+++ b/source/dnode/vnode/src/vnd/vnodeSvr.c
@@ -24,7 +24,6 @@ static int32_t vnodeProcessDropTbReq(SVnode *pVnode, int64_t version, void *pReq
static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp);
static int32_t vnodeProcessCreateTSmaReq(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp);
static int32_t vnodeProcessAlterConfirmReq(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp);
-static int32_t vnodeProcessAlterHashRangeReq(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp);
static int32_t vnodeProcessAlterConfigReq(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp);
static int32_t vnodeProcessDropTtlTbReq(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp);
static int32_t vnodeProcessTrimReq(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp);
@@ -314,9 +313,6 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t version, SRp
case TDMT_VND_ALTER_CONFIRM:
vnodeProcessAlterConfirmReq(pVnode, version, pReq, len, pRsp);
break;
- case TDMT_VND_ALTER_HASHRANGE:
- vnodeProcessAlterHashRangeReq(pVnode, version, pReq, len, pRsp);
- break;
case TDMT_VND_ALTER_CONFIG:
vnodeProcessAlterConfigReq(pVnode, version, pReq, len, pRsp);
break;
@@ -1250,16 +1246,6 @@ static int32_t vnodeProcessAlterConfirmReq(SVnode *pVnode, int64_t version, void
return 0;
}
-static int32_t vnodeProcessAlterHashRangeReq(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp) {
- vInfo("vgId:%d, alter hashrange msg will be processed", TD_VID(pVnode));
-
- // todo
- // 1. stop work
- // 2. adjust hash range / compact / remove wals / rename vgroups
- // 3. reload sync
- return 0;
-}
-
static int32_t vnodeProcessAlterConfigReq(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp) {
bool walChanged = false;
bool tsdbChanged = false;
diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h
index 7d33f150ff..d939f7ea77 100644
--- a/source/libs/executor/inc/executorimpl.h
+++ b/source/libs/executor/inc/executorimpl.h
@@ -570,7 +570,7 @@ typedef struct SStreamIntervalOperatorInfo {
SWinKey delKey;
uint64_t numOfDatapack;
SArray* pUpdated;
- SHashObj* pUpdatedMap;
+ SSHashObj* pUpdatedMap;
} SStreamIntervalOperatorInfo;
typedef struct SDataGroupInfo {
@@ -717,9 +717,10 @@ void doBuildResultDatablock(SOperatorInfo* pOperator, SOptrBasicInfo* pbInfo, SG
SDiskbasedBuf* pBuf);
bool hasLimitOffsetInfo(SLimitInfo* pLimitInfo);
+bool hasSlimitOffsetInfo(SLimitInfo* pLimitInfo);
void initLimitInfo(const SNode* pLimit, const SNode* pSLimit, SLimitInfo* pLimitInfo);
void resetLimitInfoForNextGroup(SLimitInfo* pLimitInfo);
-bool applyLimitOffset(SLimitInfo* pLimitInfo, SSDataBlock* pBlock, SExecTaskInfo* pTaskInfo, SOperatorInfo* pOperator);
+bool applyLimitOffset(SLimitInfo* pLimitInfo, SSDataBlock* pBlock, SExecTaskInfo* pTaskInfo);
void applyAggFunctionOnPartialTuples(SExecTaskInfo* taskInfo, SqlFunctionCtx* pCtx, SColumnInfoData* pTimeWindowData,
int32_t offset, int32_t forwardStep, int32_t numOfTotal, int32_t numOfOutput);
diff --git a/source/libs/executor/src/dataDispatcher.c b/source/libs/executor/src/dataDispatcher.c
index a603bffba5..d8efcf50ca 100644
--- a/source/libs/executor/src/dataDispatcher.c
+++ b/source/libs/executor/src/dataDispatcher.c
@@ -77,8 +77,8 @@ static void toDataCacheEntry(SDataDispatchHandle* pHandle, const SInputData* pIn
pBuf->useSize = sizeof(SDataCacheEntry);
pEntry->dataLen = blockEncode(pInput->pData, pEntry->data, numOfCols);
-// ASSERT(pEntry->numOfRows == *(int32_t*)(pEntry->data + 8));
-// ASSERT(pEntry->numOfCols == *(int32_t*)(pEntry->data + 8 + 4));
+ // ASSERT(pEntry->numOfRows == *(int32_t*)(pEntry->data + 8));
+ // ASSERT(pEntry->numOfCols == *(int32_t*)(pEntry->data + 8 + 4));
pBuf->useSize += pEntry->dataLen;
@@ -135,7 +135,7 @@ static int32_t putDataBlock(SDataSinkHandle* pHandle, const SInputData* pInput,
taosFreeQitem(pBuf);
return TSDB_CODE_OUT_OF_MEMORY;
}
-
+
toDataCacheEntry(pDispatcher, pInput, pBuf);
taosWriteQitem(pDispatcher->pDataBlocks, pBuf);
@@ -162,14 +162,16 @@ static void getDataLength(SDataSinkHandle* pHandle, int64_t* pLen, bool* pQueryE
SDataDispatchBuf* pBuf = NULL;
taosReadQitem(pDispatcher->pDataBlocks, (void**)&pBuf);
- memcpy(&pDispatcher->nextOutput, pBuf, sizeof(SDataDispatchBuf));
- taosFreeQitem(pBuf);
+ if (pBuf != NULL) {
+ memcpy(&pDispatcher->nextOutput, pBuf, sizeof(SDataDispatchBuf));
+ taosFreeQitem(pBuf);
+ }
SDataCacheEntry* pEntry = (SDataCacheEntry*)pDispatcher->nextOutput.pData;
*pLen = pEntry->dataLen;
-// ASSERT(pEntry->numOfRows == *(int32_t*)(pEntry->data + 8));
-// ASSERT(pEntry->numOfCols == *(int32_t*)(pEntry->data + 8 + 4));
+ // ASSERT(pEntry->numOfRows == *(int32_t*)(pEntry->data + 8));
+ // ASSERT(pEntry->numOfCols == *(int32_t*)(pEntry->data + 8 + 4));
*pQueryEnd = pDispatcher->queryEnd;
qDebug("got data len %" PRId64 ", row num %d in sink", *pLen,
@@ -192,8 +194,8 @@ static int32_t getDataBlock(SDataSinkHandle* pHandle, SOutputData* pOutput) {
pOutput->numOfCols = pEntry->numOfCols;
pOutput->compressed = pEntry->compressed;
-// ASSERT(pEntry->numOfRows == *(int32_t*)(pEntry->data + 8));
-// ASSERT(pEntry->numOfCols == *(int32_t*)(pEntry->data + 8 + 4));
+ // ASSERT(pEntry->numOfRows == *(int32_t*)(pEntry->data + 8));
+ // ASSERT(pEntry->numOfCols == *(int32_t*)(pEntry->data + 8 + 4));
atomic_sub_fetch_64(&pDispatcher->cachedSize, pEntry->dataLen);
atomic_sub_fetch_64(&gDataSinkStat.cachedSize, pEntry->dataLen);
diff --git a/source/libs/executor/src/exchangeoperator.c b/source/libs/executor/src/exchangeoperator.c
index 037b33dc9f..e5089ab4a9 100644
--- a/source/libs/executor/src/exchangeoperator.c
+++ b/source/libs/executor/src/exchangeoperator.c
@@ -218,10 +218,7 @@ static SSDataBlock* loadRemoteData(SOperatorInfo* pOperator) {
if (status == PROJECT_RETRIEVE_CONTINUE) {
continue;
} else if (status == PROJECT_RETRIEVE_DONE) {
- size_t rows = pBlock->info.rows;
- pExchangeInfo->limitInfo.numOfOutputRows += rows;
-
- if (rows == 0) {
+ if (pBlock->info.rows == 0) {
setOperatorCompleted(pOperator);
return NULL;
} else {
@@ -707,6 +704,8 @@ int32_t prepareLoadRemoteData(SOperatorInfo* pOperator) {
}
int32_t handleLimitOffset(SOperatorInfo* pOperator, SLimitInfo* pLimitInfo, SSDataBlock* pBlock, bool holdDataInBuf) {
+ SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
+
if (pLimitInfo->remainGroupOffset > 0) {
if (pLimitInfo->currentGroupId == 0) { // it is the first group
pLimitInfo->currentGroupId = pBlock->info.id.groupId;
@@ -750,36 +749,20 @@ int32_t handleLimitOffset(SOperatorInfo* pOperator, SLimitInfo* pLimitInfo, SSDa
// set current group id
pLimitInfo->currentGroupId = pBlock->info.id.groupId;
- if (pLimitInfo->remainOffset >= pBlock->info.rows) {
- pLimitInfo->remainOffset -= pBlock->info.rows;
- blockDataCleanup(pBlock);
+ bool limitReached = applyLimitOffset(pLimitInfo, pBlock, pTaskInfo);
+ if (pBlock->info.rows == 0) {
return PROJECT_RETRIEVE_CONTINUE;
- } else if (pLimitInfo->remainOffset < pBlock->info.rows && pLimitInfo->remainOffset > 0) {
- blockDataTrimFirstNRows(pBlock, pLimitInfo->remainOffset);
- pLimitInfo->remainOffset = 0;
- }
-
- // check for the limitation in each group
- if (pLimitInfo->limit.limit >= 0 && pLimitInfo->numOfOutputRows + pBlock->info.rows >= pLimitInfo->limit.limit) {
- int32_t keepRows = (int32_t)(pLimitInfo->limit.limit - pLimitInfo->numOfOutputRows);
- blockDataKeepFirstNRows(pBlock, keepRows);
- if (pLimitInfo->slimit.limit > 0 && pLimitInfo->slimit.limit <= pLimitInfo->numOfOutputGroups) {
+ } else {
+ if (limitReached && (pLimitInfo->slimit.limit > 0 && pLimitInfo->slimit.limit <= pLimitInfo->numOfOutputGroups)) {
setOperatorCompleted(pOperator);
- } else {
- // current group limitation is reached, and future blocks of this group need to be discarded.
- if (pBlock->info.rows == 0) {
- return PROJECT_RETRIEVE_CONTINUE;
- }
+ return PROJECT_RETRIEVE_DONE;
}
-
- return PROJECT_RETRIEVE_DONE;
}
// todo optimize performance
// If there are slimit/soffset value exists, multi-round result can not be packed into one group, since the
// they may not belong to the same group the limit/offset value is not valid in this case.
- if ((!holdDataInBuf) || (pBlock->info.rows >= pOperator->resultInfo.threshold) || pLimitInfo->slimit.offset != -1 ||
- pLimitInfo->slimit.limit != -1) {
+ if ((!holdDataInBuf) || (pBlock->info.rows >= pOperator->resultInfo.threshold) || hasSlimitOffsetInfo(pLimitInfo)) {
return PROJECT_RETRIEVE_DONE;
} else { // not full enough, continue to accumulate the output data in the buffer.
return PROJECT_RETRIEVE_CONTINUE;
diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c
index 1d16a3418d..540b5e90f8 100644
--- a/source/libs/executor/src/executil.c
+++ b/source/libs/executor/src/executil.c
@@ -155,7 +155,7 @@ void initGroupedResultInfo(SGroupResInfo* pGroupResInfo, SSHashObj* pHashmap, in
void initMultiResInfoFromArrayList(SGroupResInfo* pGroupResInfo, SArray* pArrayList) {
if (pGroupResInfo->pRows != NULL) {
- taosArrayDestroyP(pGroupResInfo->pRows, taosMemoryFree);
+ taosArrayDestroy(pGroupResInfo->pRows);
}
pGroupResInfo->pRows = pArrayList;
@@ -1761,6 +1761,10 @@ bool hasLimitOffsetInfo(SLimitInfo* pLimitInfo) {
pLimitInfo->slimit.offset != -1);
}
+bool hasSlimitOffsetInfo(SLimitInfo* pLimitInfo) {
+ return (pLimitInfo->slimit.limit != -1 || pLimitInfo->slimit.offset != -1);
+}
+
void initLimitInfo(const SNode* pLimit, const SNode* pSLimit, SLimitInfo* pLimitInfo) {
SLimit limit = {.limit = getLimit(pLimit), .offset = getOffset(pLimit)};
SLimit slimit = {.limit = getLimit(pSLimit), .offset = getOffset(pSLimit)};
diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c
index 21ef5dfab3..08d7f02f8c 100644
--- a/source/libs/executor/src/executorimpl.c
+++ b/source/libs/executor/src/executorimpl.c
@@ -2589,26 +2589,22 @@ int32_t buildDataBlockFromGroupRes(SOperatorInfo* pOperator, SStreamState* pStat
int32_t numOfRows = getNumOfTotalRes(pGroupResInfo);
for (int32_t i = pGroupResInfo->index; i < numOfRows; i += 1) {
- SResKeyPos* pPos = taosArrayGetP(pGroupResInfo->pRows, i);
+ SWinKey* pKey = taosArrayGet(pGroupResInfo->pRows, i);
int32_t size = 0;
void* pVal = NULL;
- SWinKey key = {
- .ts = *(TSKEY*)pPos->key,
- .groupId = pPos->groupId,
- };
- int32_t code = streamStateGet(pState, &key, &pVal, &size);
+ int32_t code = streamStateGet(pState, pKey, &pVal, &size);
ASSERT(code == 0);
SResultRow* pRow = (SResultRow*)pVal;
doUpdateNumOfRows(pCtx, pRow, numOfExprs, rowEntryOffset);
// no results, continue to check the next one
if (pRow->numOfRows == 0) {
pGroupResInfo->index += 1;
- releaseOutputBuf(pState, &key, pRow);
+ releaseOutputBuf(pState, pKey, pRow);
continue;
}
if (pBlock->info.id.groupId == 0) {
- pBlock->info.id.groupId = pPos->groupId;
+ pBlock->info.id.groupId = pKey->groupId;
void* tbname = NULL;
if (streamStateGetParName(pTaskInfo->streamInfo.pState, pBlock->info.id.groupId, &tbname) < 0) {
pBlock->info.parTbName[0] = 0;
@@ -2618,15 +2614,15 @@ int32_t buildDataBlockFromGroupRes(SOperatorInfo* pOperator, SStreamState* pStat
tdbFree(tbname);
} else {
// current value belongs to different group, it can't be packed into one datablock
- if (pBlock->info.id.groupId != pPos->groupId) {
- releaseOutputBuf(pState, &key, pRow);
+ if (pBlock->info.id.groupId != pKey->groupId) {
+ releaseOutputBuf(pState, pKey, pRow);
break;
}
}
if (pBlock->info.rows + pRow->numOfRows > pBlock->info.capacity) {
ASSERT(pBlock->info.rows > 0);
- releaseOutputBuf(pState, &key, pRow);
+ releaseOutputBuf(pState, pKey, pRow);
break;
}
@@ -2656,7 +2652,7 @@ int32_t buildDataBlockFromGroupRes(SOperatorInfo* pOperator, SStreamState* pStat
}
pBlock->info.rows += pRow->numOfRows;
- releaseOutputBuf(pState, &key, pRow);
+ releaseOutputBuf(pState, pKey, pRow);
}
pBlock->info.dataLoad = 1;
blockDataUpdateTsWindow(pBlock, 0);
diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c
index fb122b077f..9c8137db34 100644
--- a/source/libs/executor/src/groupoperator.c
+++ b/source/libs/executor/src/groupoperator.c
@@ -971,7 +971,7 @@ static SSDataBlock* buildStreamPartitionResult(SOperatorInfo* pOperator) {
void appendCreateTableRow(SStreamState* pState, SExprSupp* pTableSup, SExprSupp* pTagSup, int64_t groupId,
SSDataBlock* pSrcBlock, int32_t rowId, SSDataBlock* pDestBlock) {
void* pValue = NULL;
- if (groupId != 0 && streamStateGetParName(pState, groupId, &pValue) != 0) {
+ if (streamStateGetParName(pState, groupId, &pValue) != 0) {
SSDataBlock* pTmpBlock = blockCopyOneRow(pSrcBlock, rowId);
if (pTableSup->numOfExprs > 0) {
projectApplyFunctions(pTableSup->pExprInfo, pDestBlock, pTmpBlock, pTableSup->pCtx, pTableSup->numOfExprs, NULL);
diff --git a/source/libs/executor/src/projectoperator.c b/source/libs/executor/src/projectoperator.c
index 6c2bcf086d..f84871ea92 100644
--- a/source/libs/executor/src/projectoperator.c
+++ b/source/libs/executor/src/projectoperator.c
@@ -90,7 +90,16 @@ SOperatorInfo* createProjectOperatorInfo(SOperatorInfo* downstream, SProjectPhys
pInfo->binfo.pRes = pResBlock;
pInfo->pFinalRes = createOneDataBlock(pResBlock, false);
- pInfo->mergeDataBlocks = (pTaskInfo->execModel == OPTR_EXEC_MODEL_STREAM) ? false : pProjPhyNode->mergeDataBlock;
+
+ if (pTaskInfo->execModel == OPTR_EXEC_MODEL_STREAM) {
+ pInfo->mergeDataBlocks = false;
+ } else {
+ if (!pProjPhyNode->ignoreGroupId) {
+ pInfo->mergeDataBlocks = false;
+ } else {
+ pInfo->mergeDataBlocks = pProjPhyNode->mergeDataBlock;
+ }
+ }
int32_t numOfRows = 4096;
size_t keyBufSize = sizeof(int64_t) + sizeof(int64_t) + POINTER_BYTES;
@@ -185,36 +194,15 @@ static int32_t doIngroupLimitOffset(SLimitInfo* pLimitInfo, uint64_t groupId, SS
SOperatorInfo* pOperator) {
// set current group id
pLimitInfo->currentGroupId = groupId;
-
- if (pLimitInfo->remainOffset >= pBlock->info.rows) {
- pLimitInfo->remainOffset -= pBlock->info.rows;
- blockDataCleanup(pBlock);
+ bool limitReached = applyLimitOffset(pLimitInfo, pBlock, pOperator->pTaskInfo);
+ if (pBlock->info.rows == 0) {
return PROJECT_RETRIEVE_CONTINUE;
- } else if (pLimitInfo->remainOffset < pBlock->info.rows && pLimitInfo->remainOffset > 0) {
- blockDataTrimFirstNRows(pBlock, pLimitInfo->remainOffset);
- pLimitInfo->remainOffset = 0;
- }
-
- // check for the limitation in each group
- if (pLimitInfo->limit.limit >= 0 && pLimitInfo->numOfOutputRows + pBlock->info.rows >= pLimitInfo->limit.limit) {
- int32_t keepRows = (int32_t)(pLimitInfo->limit.limit - pLimitInfo->numOfOutputRows);
- blockDataKeepFirstNRows(pBlock, keepRows);
-
- // TODO: optimize it later when partition by + limit
- // all retrieved requirement has been fulfilled, let's finish this
- if ((pLimitInfo->slimit.limit == -1 && pLimitInfo->currentGroupId == 0) ||
- (pLimitInfo->slimit.limit > 0 && pLimitInfo->slimit.limit <= pLimitInfo->numOfOutputGroups)) {
+ } else {
+ if (limitReached && (pLimitInfo->slimit.limit > 0 && pLimitInfo->slimit.limit <= pLimitInfo->numOfOutputGroups)) {
setOperatorCompleted(pOperator);
- } else {
- // Even current group is done, there may be many vgroups remain existed, and we need to continue to retrieve data
- // from next group. So let's continue this retrieve process
- if (keepRows == 0) {
- return PROJECT_RETRIEVE_CONTINUE;
- }
}
}
- pLimitInfo->numOfOutputRows += pBlock->info.rows;
return PROJECT_RETRIEVE_DONE;
}
diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c
index 37c33c44e2..a7b9cce7aa 100644
--- a/source/libs/executor/src/scanoperator.c
+++ b/source/libs/executor/src/scanoperator.c
@@ -256,12 +256,11 @@ static void doSetTagColumnData(STableScanBase* pTableScanInfo, SSDataBlock* pBlo
}
}
-// todo handle the slimit info
-bool applyLimitOffset(SLimitInfo* pLimitInfo, SSDataBlock* pBlock, SExecTaskInfo* pTaskInfo, SOperatorInfo* pOperator) {
+bool applyLimitOffset(SLimitInfo* pLimitInfo, SSDataBlock* pBlock, SExecTaskInfo* pTaskInfo) {
SLimit* pLimit = &pLimitInfo->limit;
const char* id = GET_TASKID(pTaskInfo);
- if (pLimit->offset > 0 && pLimitInfo->remainOffset > 0) {
+ if (pLimitInfo->remainOffset > 0) {
if (pLimitInfo->remainOffset >= pBlock->info.rows) {
pLimitInfo->remainOffset -= pBlock->info.rows;
blockDataEmpty(pBlock);
@@ -276,12 +275,14 @@ bool applyLimitOffset(SLimitInfo* pLimitInfo, SSDataBlock* pBlock, SExecTaskInfo
if (pLimit->limit != -1 && pLimit->limit <= (pLimitInfo->numOfOutputRows + pBlock->info.rows)) {
// limit the output rows
int32_t keep = (int32_t)(pLimit->limit - pLimitInfo->numOfOutputRows);
-
blockDataKeepFirstNRows(pBlock, keep);
+
+ pLimitInfo->numOfOutputRows += pBlock->info.rows;
qDebug("output limit %" PRId64 " has reached, %s", pLimit->limit, id);
return true;
}
+ pLimitInfo->numOfOutputRows += pBlock->info.rows;
return false;
}
@@ -397,13 +398,12 @@ static int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanBase* pTableSca
}
}
- bool limitReached = applyLimitOffset(&pTableScanInfo->limitInfo, pBlock, pTaskInfo, pOperator);
+ bool limitReached = applyLimitOffset(&pTableScanInfo->limitInfo, pBlock, pTaskInfo);
if (limitReached) { // set operator flag is done
setOperatorCompleted(pOperator);
}
pCost->totalRows += pBlock->info.rows;
- pTableScanInfo->limitInfo.numOfOutputRows = pCost->totalRows;
return TSDB_CODE_SUCCESS;
}
@@ -1786,7 +1786,7 @@ FETCH_NEXT_BLOCK:
int32_t current = pInfo->validBlockIndex++;
SPackedData* pPacked = taosArrayGet(pInfo->pBlockLists, current);
SSDataBlock* pBlock = pPacked->pDataBlock;
- if (pBlock->info.id.groupId && pBlock->info.parTbName[0]) {
+ if (pBlock->info.parTbName[0]) {
streamStatePutParName(pTaskInfo->streamInfo.pState, pBlock->info.id.groupId, pBlock->info.parTbName);
}
// TODO move into scan
@@ -2714,9 +2714,7 @@ SSDataBlock* getSortedTableMergeScanBlockData(SSortHandle* pHandle, SSDataBlock*
}
}
- applyLimitOffset(&pInfo->limitInfo, pResBlock, pTaskInfo, pOperator);
- pInfo->limitInfo.numOfOutputRows += pResBlock->info.rows;
-
+ applyLimitOffset(&pInfo->limitInfo, pResBlock, pTaskInfo);
qDebug("%s get sorted row block, rows:%d, limit:%"PRId64, GET_TASKID(pTaskInfo), pResBlock->info.rows,
pInfo->limitInfo.numOfOutputRows);
diff --git a/source/libs/executor/src/sortoperator.c b/source/libs/executor/src/sortoperator.c
index 97b4fd9dc4..98ef6b8a36 100644
--- a/source/libs/executor/src/sortoperator.c
+++ b/source/libs/executor/src/sortoperator.c
@@ -222,6 +222,7 @@ SSDataBlock* doSort(SOperatorInfo* pOperator) {
T_LONG_JMP(pTaskInfo->env, code);
}
+ // multi-group case not handle here
SSDataBlock* pBlock = NULL;
while (1) {
pBlock = getSortedBlockData(pInfo->pSortHandle, pInfo->binfo.pRes, pOperator->resultInfo.capacity,
@@ -236,28 +237,14 @@ SSDataBlock* doSort(SOperatorInfo* pOperator) {
continue;
}
- // todo add the limit/offset info
- if (pInfo->limitInfo.remainOffset > 0) {
- if (pInfo->limitInfo.remainOffset >= blockDataGetNumOfRows(pBlock)) {
- pInfo->limitInfo.remainOffset -= pBlock->info.rows;
- continue;
- }
-
- blockDataTrimFirstNRows(pBlock, pInfo->limitInfo.remainOffset);
- pInfo->limitInfo.remainOffset = 0;
+ // there are bugs?
+ bool limitReached = applyLimitOffset(&pInfo->limitInfo, pBlock, pTaskInfo);
+ if (limitReached) {
+ resetLimitInfoForNextGroup(&pInfo->limitInfo);
}
- if (pInfo->limitInfo.limit.limit > 0 &&
- pInfo->limitInfo.limit.limit <= pInfo->limitInfo.numOfOutputRows + blockDataGetNumOfRows(pBlock)) {
- int32_t remain = pInfo->limitInfo.limit.limit - pInfo->limitInfo.numOfOutputRows;
- blockDataKeepFirstNRows(pBlock, remain);
- }
-
- size_t numOfRows = blockDataGetNumOfRows(pBlock);
- pInfo->limitInfo.numOfOutputRows += numOfRows;
- pOperator->resultInfo.totalRows += numOfRows;
-
- if (numOfRows > 0) {
+ pOperator->resultInfo.totalRows += pBlock->info.rows;
+ if (pBlock->info.rows > 0) {
break;
}
}
@@ -557,7 +544,6 @@ typedef struct SMultiwayMergeOperatorInfo {
SSDataBlock* pIntermediateBlock; // to hold the intermediate result
int64_t startTs; // sort start time
bool groupSort;
- bool hasGroupId;
uint64_t groupId;
STupleHandle* prefetchedTuple;
} SMultiwayMergeOperatorInfo;
@@ -604,7 +590,9 @@ int32_t openMultiwayMergeOperator(SOperatorInfo* pOperator) {
return TSDB_CODE_SUCCESS;
}
-static void doGetSortedBlockData(SMultiwayMergeOperatorInfo* pInfo, SSortHandle* pHandle, int32_t capacity, SSDataBlock* p) {
+static void doGetSortedBlockData(SMultiwayMergeOperatorInfo* pInfo, SSortHandle* pHandle, int32_t capacity,
+ SSDataBlock* p, bool* newgroup) {
+ *newgroup = false;
while (1) {
STupleHandle* pTupleHandle = NULL;
@@ -613,8 +601,12 @@ static void doGetSortedBlockData(SMultiwayMergeOperatorInfo* pInfo, SSortHandle*
pTupleHandle = tsortNextTuple(pHandle);
} else {
pTupleHandle = pInfo->prefetchedTuple;
- pInfo->groupId = tsortGetGroupId(pTupleHandle);
pInfo->prefetchedTuple = NULL;
+ uint64_t gid = tsortGetGroupId(pTupleHandle);
+ if (gid != pInfo->groupId) {
+ *newgroup = true;
+ pInfo->groupId = gid;
+ }
}
} else {
pTupleHandle = tsortNextTuple(pHandle);
@@ -627,12 +619,10 @@ static void doGetSortedBlockData(SMultiwayMergeOperatorInfo* pInfo, SSortHandle*
if (pInfo->groupSort) {
uint64_t tupleGroupId = tsortGetGroupId(pTupleHandle);
- if (!pInfo->hasGroupId) {
+ if (pInfo->groupId == 0 || pInfo->groupId == tupleGroupId) {
+ appendOneRowToDataBlock(p, pTupleHandle);
+ p->info.id.groupId = tupleGroupId;
pInfo->groupId = tupleGroupId;
- pInfo->hasGroupId = true;
- appendOneRowToDataBlock(p, pTupleHandle);
- } else if (pInfo->groupId == tupleGroupId) {
- appendOneRowToDataBlock(p, pTupleHandle);
} else {
pInfo->prefetchedTuple = pTupleHandle;
break;
@@ -645,11 +635,6 @@ static void doGetSortedBlockData(SMultiwayMergeOperatorInfo* pInfo, SSortHandle*
break;
}
}
-
- if (pInfo->groupSort) {
- pInfo->hasGroupId = false;
- }
-
}
SSDataBlock* getMultiwaySortedBlockData(SSortHandle* pHandle, SSDataBlock* pDataBlock, SArray* pColMatchInfo,
@@ -673,14 +658,19 @@ SSDataBlock* getMultiwaySortedBlockData(SSortHandle* pHandle, SSDataBlock* pData
}
SSDataBlock* p = pInfo->pIntermediateBlock;
+ bool newgroup = false;
while (1) {
- doGetSortedBlockData(pInfo, pHandle, capacity, p);
+ doGetSortedBlockData(pInfo, pHandle, capacity, p, &newgroup);
if (p->info.rows == 0) {
break;
}
- bool limitReached = applyLimitOffset(&pInfo->limitInfo, p, pTaskInfo, pOperator);
+ if (newgroup) {
+ resetLimitInfoForNextGroup(&pInfo->limitInfo);
+ }
+
+ bool limitReached = applyLimitOffset(&pInfo->limitInfo, p, pTaskInfo);
if (limitReached) {
resetLimitInfoForNextGroup(&pInfo->limitInfo);
}
diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c
index f5ceeeafe7..7cb49c8f54 100644
--- a/source/libs/executor/src/timesliceoperator.c
+++ b/source/libs/executor/src/timesliceoperator.c
@@ -440,6 +440,11 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
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);
if (code != TSDB_CODE_SUCCESS) {
T_LONG_JMP(pTaskInfo->env, code);
@@ -538,6 +543,8 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
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) {
@@ -573,6 +580,11 @@ SOperatorInfo* createTimeSliceOperatorInfo(SOperatorInfo* downstream, SPhysiNode
}
}
+ code = filterInitFromNode((SNode*)pInterpPhyNode->node.pConditions, &pOperator->exprSupp.pFilterInfo, 0);
+ if (code != TSDB_CODE_SUCCESS) {
+ goto _error;
+ }
+
pInfo->tsCol = extractColumnFromColumnNode((SColumnNode*)pInterpPhyNode->pTimeSeries);
pInfo->fillType = convertFillType(pInterpPhyNode->fillMode);
initResultSizeInfo(&pOperator->resultInfo, 4096);
@@ -629,6 +641,7 @@ void destroyTimeSliceOperatorInfo(void* param) {
taosMemoryFree(pKey->end.val);
}
taosArrayDestroy(pInfo->pLinearInfo);
+ cleanupExprSupp(&pInfo->scalarSup);
taosMemoryFree(pInfo->pFillColInfo);
taosMemoryFreeClear(param);
diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c
index eccdcb85bf..38108dcff6 100644
--- a/source/libs/executor/src/timewindowoperator.c
+++ b/source/libs/executor/src/timewindowoperator.c
@@ -639,7 +639,7 @@ static void doInterpUnclosedTimeWindow(SOperatorInfo* pOperatorInfo, int32_t num
if (NULL == pr) {
T_LONG_JMP(pTaskInfo->env, terrno);
}
-
+
ASSERT(pr->offset == p1->offset && pr->pageId == p1->pageId);
if (pr->closed) {
@@ -842,68 +842,61 @@ static int32_t saveResult(SResultWindowInfo winInfo, SSHashObj* pStUpdated) {
return tSimpleHashPut(pStUpdated, &winInfo.sessionWin, sizeof(SSessionKey), &winInfo, sizeof(SResultWindowInfo));
}
-static int32_t saveWinResult(int64_t ts, int32_t pageId, int32_t offset, uint64_t groupId, SHashObj* pUpdatedMap) {
- SResKeyPos* newPos = taosMemoryMalloc(sizeof(SResKeyPos) + sizeof(uint64_t));
- if (newPos == NULL) {
- return TSDB_CODE_OUT_OF_MEMORY;
- }
- newPos->groupId = groupId;
- newPos->pos = (SResultRowPosition){.pageId = pageId, .offset = offset};
- *(int64_t*)newPos->key = ts;
+static int32_t saveWinResult(int64_t ts, uint64_t groupId, SSHashObj* pUpdatedMap) {
SWinKey key = {.ts = ts, .groupId = groupId};
- if (taosHashPut(pUpdatedMap, &key, sizeof(SWinKey), &newPos, sizeof(void*)) != TSDB_CODE_SUCCESS) {
- taosMemoryFree(newPos);
- }
+ tSimpleHashPut(pUpdatedMap, &key, sizeof(SWinKey), NULL, 0);
return TSDB_CODE_SUCCESS;
}
-static int32_t saveWinResultInfo(TSKEY ts, uint64_t groupId, SHashObj* pUpdatedMap) {
- return saveWinResult(ts, -1, -1, groupId, pUpdatedMap);
+static int32_t saveWinResultInfo(TSKEY ts, uint64_t groupId, SSHashObj* pUpdatedMap) {
+ return saveWinResult(ts, groupId, pUpdatedMap);
}
-static void removeResults(SArray* pWins, SHashObj* pUpdatedMap) {
+static void removeResults(SArray* pWins, SSHashObj* pUpdatedMap) {
int32_t size = taosArrayGetSize(pWins);
for (int32_t i = 0; i < size; i++) {
SWinKey* pW = taosArrayGet(pWins, i);
- void* tmp = taosHashGet(pUpdatedMap, pW, sizeof(SWinKey));
+ void* tmp = tSimpleHashGet(pUpdatedMap, pW, sizeof(SWinKey));
if (tmp) {
void* value = *(void**)tmp;
taosMemoryFree(value);
- taosHashRemove(pUpdatedMap, pW, sizeof(SWinKey));
+ tSimpleHashRemove(pUpdatedMap, pW, sizeof(SWinKey));
}
}
}
-int32_t compareWinRes(void* pKey, void* data, int32_t index) {
- SArray* res = (SArray*)data;
- SWinKey* pDataPos = taosArrayGet(res, index);
- SResKeyPos* pRKey = (SResKeyPos*)pKey;
- if (pRKey->groupId > pDataPos->groupId) {
+int32_t compareWinKey(void* pKey, void* data, int32_t index) {
+ SArray* res = (SArray*)data;
+ SWinKey* pDataPos = taosArrayGet(res, index);
+ SWinKey* pWKey = (SWinKey*)pKey;
+
+ if (pWKey->groupId > pDataPos->groupId) {
return 1;
- } else if (pRKey->groupId < pDataPos->groupId) {
+ } else if (pWKey->groupId < pDataPos->groupId) {
return -1;
}
- if (*(int64_t*)pRKey->key > pDataPos->ts) {
+ if (pWKey->ts > pDataPos->ts) {
return 1;
- } else if (*(int64_t*)pRKey->key < pDataPos->ts) {
+ } else if (pWKey->ts < pDataPos->ts) {
return -1;
}
return 0;
}
-static void removeDeleteResults(SHashObj* pUpdatedMap, SArray* pDelWins) {
+static void removeDeleteResults(SSHashObj* pUpdatedMap, SArray* pDelWins) {
taosArraySort(pDelWins, winKeyCmprImpl);
taosArrayRemoveDuplicate(pDelWins, winKeyCmprImpl, NULL);
int32_t delSize = taosArrayGetSize(pDelWins);
- if (taosHashGetSize(pUpdatedMap) == 0 || delSize == 0) {
+ if (tSimpleHashGetSize(pUpdatedMap) == 0 || delSize == 0) {
return;
}
- void* pIte = NULL;
- while ((pIte = taosHashIterate(pUpdatedMap, pIte)) != NULL) {
- SResKeyPos* pResKey = *(SResKeyPos**)pIte;
- int32_t index = binarySearchCom(pDelWins, delSize, pResKey, TSDB_ORDER_DESC, compareWinRes);
- if (index >= 0 && 0 == compareWinRes(pResKey, pDelWins, index)) {
+ void* pIte = NULL;
+ int32_t iter = 0;
+ while ((pIte = tSimpleHashIterate(pUpdatedMap, pIte, &iter)) != NULL) {
+ SWinKey* pResKey = tSimpleHashGetKey(pIte, NULL);
+ int32_t index = binarySearchCom(pDelWins, delSize, pResKey, TSDB_ORDER_DESC, compareWinKey);
+ if (index >= 0 && 0 == compareWinKey(pResKey, pDelWins, index)) {
taosArrayRemove(pDelWins, index);
delSize = taosArrayGetSize(pDelWins);
}
@@ -1318,11 +1311,11 @@ static void setInverFunction(SqlFunctionCtx* pCtx, int32_t num, EStreamType type
}
static void doClearWindowImpl(SResultRowPosition* p1, SDiskbasedBuf* pResultBuf, SExprSupp* pSup, int32_t numOfOutput) {
- SResultRow* pResult = getResultRowByPos(pResultBuf, p1, false);
+ SResultRow* pResult = getResultRowByPos(pResultBuf, p1, false);
if (NULL == pResult) {
return;
}
-
+
SqlFunctionCtx* pCtx = pSup->pCtx;
for (int32_t i = 0; i < numOfOutput; ++i) {
pCtx[i].resultInfo = getResultEntryInfo(pResult, i, pSup->rowEntryInfoOffset);
@@ -1352,7 +1345,7 @@ static bool doDeleteWindow(SOperatorInfo* pOperator, TSKEY ts, uint64_t groupId)
}
static void doDeleteWindows(SOperatorInfo* pOperator, SInterval* pInterval, SSDataBlock* pBlock, SArray* pUpWins,
- SHashObj* pUpdatedMap) {
+ SSHashObj* pUpdatedMap) {
SStreamIntervalOperatorInfo* pInfo = pOperator->info;
SColumnInfoData* pStartTsCol = taosArrayGet(pBlock->pDataBlock, START_TS_COLUMN_INDEX);
TSKEY* startTsCols = (TSKEY*)pStartTsCol->pData;
@@ -1388,28 +1381,21 @@ static void doDeleteWindows(SOperatorInfo* pOperator, SInterval* pInterval, SSDa
taosArrayPush(pUpWins, &winRes);
}
if (pUpdatedMap) {
- void* tmp = taosHashGet(pUpdatedMap, &winRes, sizeof(SWinKey));
- if (tmp) {
- void* value = *(void**)tmp;
- taosMemoryFree(value);
- taosHashRemove(pUpdatedMap, &winRes, sizeof(SWinKey));
- }
+ tSimpleHashRemove(pUpdatedMap, &winRes, sizeof(SWinKey));
}
getNextTimeWindow(pInterval, pInterval->precision, TSDB_ORDER_ASC, &win);
} while (win.ekey <= endTsCols[i]);
}
}
-static int32_t getAllIntervalWindow(SSHashObj* pHashMap, SHashObj* resWins) {
+static int32_t getAllIntervalWindow(SSHashObj* pHashMap, SSHashObj* resWins) {
void* pIte = NULL;
- size_t keyLen = 0;
int32_t iter = 0;
while ((pIte = tSimpleHashIterate(pHashMap, pIte, &iter)) != NULL) {
- void* key = tSimpleHashGetKey(pIte, &keyLen);
- uint64_t groupId = *(uint64_t*)key;
- TSKEY ts = *(int64_t*)((char*)key + sizeof(uint64_t));
- SResultRowPosition* pPos = (SResultRowPosition*)pIte;
- int32_t code = saveWinResult(ts, pPos->pageId, pPos->offset, groupId, resWins);
+ SWinKey* pKey = tSimpleHashGetKey(pIte, NULL);
+ uint64_t groupId = pKey->groupId;
+ TSKEY ts = pKey->ts;
+ int32_t code = saveWinResult(ts, groupId, resWins);
if (code != TSDB_CODE_SUCCESS) {
return code;
}
@@ -1417,36 +1403,16 @@ static int32_t getAllIntervalWindow(SSHashObj* pHashMap, SHashObj* resWins) {
return TSDB_CODE_SUCCESS;
}
-int32_t compareWinKey(void* pKey, void* data, int32_t index) {
- SArray* res = (SArray*)data;
- SWinKey* pDataPos = taosArrayGet(res, index);
- SWinKey* pWKey = (SWinKey*)pKey;
-
- if (pWKey->groupId > pDataPos->groupId) {
- return 1;
- } else if (pWKey->groupId < pDataPos->groupId) {
- return -1;
- }
-
- if (pWKey->ts > pDataPos->ts) {
- return 1;
- } else if (pWKey->ts < pDataPos->ts) {
- return -1;
- }
- return 0;
-}
-
static int32_t closeStreamIntervalWindow(SSHashObj* pHashMap, STimeWindowAggSupp* pTwSup, SInterval* pInterval,
- SHashObj* pPullDataMap, SHashObj* closeWins, SArray* pDelWins,
+ SHashObj* pPullDataMap, SSHashObj* closeWins, SArray* pDelWins,
SOperatorInfo* pOperator) {
qDebug("===stream===close interval window");
void* pIte = NULL;
- size_t keyLen = 0;
int32_t iter = 0;
SStreamIntervalOperatorInfo* pInfo = pOperator->info;
int32_t delSize = taosArrayGetSize(pDelWins);
while ((pIte = tSimpleHashIterate(pHashMap, pIte, &iter)) != NULL) {
- void* key = tSimpleHashGetKey(pIte, &keyLen);
+ void* key = tSimpleHashGetKey(pIte, NULL);
SWinKey* pWinKey = (SWinKey*)key;
if (delSize > 0) {
int32_t index = binarySearchCom(pDelWins, delSize, pWinKey, TSDB_ORDER_DESC, compareWinKey);
@@ -1648,7 +1614,7 @@ void destroyStreamFinalIntervalOperatorInfo(void* param) {
}
nodesDestroyNode((SNode*)pInfo->pPhyNode);
colDataDestroy(&pInfo->twAggSup.timeWindowData);
- cleanupGroupResInfo(&pInfo->groupResInfo);
+ pInfo->groupResInfo.pRows = taosArrayDestroy(pInfo->groupResInfo.pRows);
cleanupExprSupp(&pInfo->scalarSupp);
taosMemoryFreeClear(param);
@@ -2157,7 +2123,7 @@ bool hasIntervalWindow(SStreamState* pState, SWinKey* pKey) {
return TSDB_CODE_SUCCESS == streamStateGet(pState, pKey, NULL, 0);
}
-static void rebuildIntervalWindow(SOperatorInfo* pOperator, SArray* pWinArray, SHashObj* pUpdatedMap) {
+static void rebuildIntervalWindow(SOperatorInfo* pOperator, SArray* pWinArray, SSHashObj* pUpdatedMap) {
SStreamIntervalOperatorInfo* pInfo = pOperator->info;
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
int32_t size = taosArrayGetSize(pWinArray);
@@ -2343,7 +2309,8 @@ static void clearFunctionContext(SExprSupp* pSup) {
}
}
-void doBuildResult(SOperatorInfo* pOperator, SStreamState* pState, SSDataBlock* pBlock, SGroupResInfo* pGroupResInfo) {
+void doBuildStreamIntervalResult(SOperatorInfo* pOperator, SStreamState* pState, SSDataBlock* pBlock,
+ SGroupResInfo* pGroupResInfo) {
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
// set output datablock version
pBlock->info.version = pTaskInfo->version;
@@ -2370,7 +2337,7 @@ static int32_t getNextQualifiedFinalWindow(SInterval* pInterval, STimeWindow* pN
}
static void doStreamIntervalAggImpl(SOperatorInfo* pOperatorInfo, SSDataBlock* pSDataBlock, uint64_t groupId,
- SHashObj* pUpdatedMap) {
+ SSHashObj* pUpdatedMap) {
SStreamIntervalOperatorInfo* pInfo = (SStreamIntervalOperatorInfo*)pOperatorInfo->info;
SResultRowInfo* pResultRowInfo = &(pInfo->binfo.resultRowInfo);
@@ -2478,7 +2445,19 @@ static void doStreamIntervalAggImpl(SOperatorInfo* pOperatorInfo, SSDataBlock* p
pInfo->delKey = key;
}
int32_t prevEndPos = (forwardRows - 1) * step + startPos;
- ASSERT(pSDataBlock->info.window.skey > 0 && pSDataBlock->info.window.ekey > 0);
+ if (pSDataBlock->info.window.skey <= 0 || pSDataBlock->info.window.ekey <= 0) {
+ qError("table uid %" PRIu64 " data block timestamp range may not be calculated! minKey %" PRId64
+ ",maxKey %" PRId64,
+ pSDataBlock->info.id.uid, pSDataBlock->info.window.skey, pSDataBlock->info.window.ekey);
+ blockDataUpdateTsWindow(pSDataBlock, 0);
+
+ // timestamp of the data is incorrect
+ if (pSDataBlock->info.window.skey <= 0 || pSDataBlock->info.window.ekey <= 0) {
+ qError("table uid %" PRIu64 " data block timestamp is out of range! minKey %" PRId64 ",maxKey %" PRId64,
+ pSDataBlock->info.id.uid, pSDataBlock->info.window.skey, pSDataBlock->info.window.ekey);
+ }
+ }
+
if (IS_FINAL_OP(pInfo)) {
startPos = getNextQualifiedFinalWindow(&pInfo->interval, &nextWin, &pSDataBlock->info, tsCols, prevEndPos);
} else {
@@ -2516,7 +2495,7 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
return pInfo->pDelRes;
}
- doBuildResult(pOperator, pInfo->pState, pInfo->binfo.pRes, &pInfo->groupResInfo);
+ doBuildStreamIntervalResult(pOperator, pInfo->pState, pInfo->binfo.pRes, &pInfo->groupResInfo);
if (pInfo->binfo.pRes->info.rows != 0) {
printDataBlock(pInfo->binfo.pRes, IS_FINAL_OP(pInfo) ? "interval final" : "interval semi");
return pInfo->binfo.pRes;
@@ -2543,7 +2522,7 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
return pInfo->pDelRes;
}
- doBuildResult(pOperator, pInfo->pState, pInfo->binfo.pRes, &pInfo->groupResInfo);
+ doBuildStreamIntervalResult(pOperator, pInfo->pState, pInfo->binfo.pRes, &pInfo->groupResInfo);
if (pInfo->binfo.pRes->info.rows != 0) {
printDataBlock(pInfo->binfo.pRes, IS_FINAL_OP(pInfo) ? "interval final" : "interval semi");
return pInfo->binfo.pRes;
@@ -2552,11 +2531,11 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
}
if (!pInfo->pUpdated) {
- pInfo->pUpdated = taosArrayInit(4, POINTER_BYTES);
+ pInfo->pUpdated = taosArrayInit(4, sizeof(SWinKey));
}
if (!pInfo->pUpdatedMap) {
_hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY);
- pInfo->pUpdatedMap = taosHashInit(1024, hashFn, false, HASH_NO_LOCK);
+ pInfo->pUpdatedMap = tSimpleHashInit(1024, hashFn);
}
while (1) {
@@ -2649,13 +2628,14 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
}
pInfo->binfo.pRes->info.watermark = pInfo->twAggSup.maxTs;
- void* pIte = NULL;
- while ((pIte = taosHashIterate(pInfo->pUpdatedMap, pIte)) != NULL) {
+ void* pIte = NULL;
+ int32_t iter = 0;
+ while ((pIte = tSimpleHashIterate(pInfo->pUpdatedMap, pIte, &iter)) != NULL) {
taosArrayPush(pInfo->pUpdated, pIte);
}
- taosHashCleanup(pInfo->pUpdatedMap);
+ tSimpleHashCleanup(pInfo->pUpdatedMap);
pInfo->pUpdatedMap = NULL;
- taosArraySort(pInfo->pUpdated, resultrowComparAsc);
+ taosArraySort(pInfo->pUpdated, winKeyCmprImpl);
initMultiResInfoFromArrayList(&pInfo->groupResInfo, pInfo->pUpdated);
pInfo->pUpdated = NULL;
@@ -2675,7 +2655,7 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
return pInfo->pDelRes;
}
- doBuildResult(pOperator, pInfo->pState, pInfo->binfo.pRes, &pInfo->groupResInfo);
+ doBuildStreamIntervalResult(pOperator, pInfo->pState, pInfo->binfo.pRes, &pInfo->groupResInfo);
if (pInfo->binfo.pRes->info.rows != 0) {
printDataBlock(pInfo->binfo.pRes, IS_FINAL_OP(pInfo) ? "interval final" : "interval semi");
return pInfo->binfo.pRes;
@@ -3239,10 +3219,9 @@ static inline int32_t sessionKeyCompareAsc(const void* pKey1, const void* pKey2)
static int32_t copyUpdateResult(SSHashObj* pStUpdated, SArray* pUpdated) {
void* pIte = NULL;
- size_t keyLen = 0;
int32_t iter = 0;
while ((pIte = tSimpleHashIterate(pStUpdated, pIte, &iter)) != NULL) {
- void* key = tSimpleHashGetKey(pIte, &keyLen);
+ void* key = tSimpleHashGetKey(pIte, NULL);
taosArrayPush(pUpdated, key);
}
taosArraySort(pUpdated, sessionKeyCompareAsc);
@@ -3256,13 +3235,12 @@ void doBuildDeleteDataBlock(SOperatorInfo* pOp, SSHashObj* pStDeleted, SSDataBlo
return;
}
blockDataEnsureCapacity(pBlock, size);
- size_t keyLen = 0;
int32_t iter = 0;
while (((*Ite) = tSimpleHashIterate(pStDeleted, *Ite, &iter)) != NULL) {
if (pBlock->info.rows + 1 > pBlock->info.capacity) {
break;
}
- SSessionKey* res = tSimpleHashGetKey(*Ite, &keyLen);
+ SSessionKey* res = tSimpleHashGetKey(*Ite, NULL);
SColumnInfoData* pStartTsCol = taosArrayGet(pBlock->pDataBlock, START_TS_COLUMN_INDEX);
colDataAppend(pStartTsCol, pBlock->info.rows, (const char*)&res->win.skey, false);
SColumnInfoData* pEndTsCol = taosArrayGet(pBlock->pDataBlock, END_TS_COLUMN_INDEX);
@@ -3351,7 +3329,6 @@ static void rebuildSessionWindow(SOperatorInfo* pOperator, SArray* pWinArray, SS
int32_t closeSessionWindow(SSHashObj* pHashMap, STimeWindowAggSupp* pTwSup, SSHashObj* pClosed) {
void* pIte = NULL;
- size_t keyLen = 0;
int32_t iter = 0;
while ((pIte = tSimpleHashIterate(pHashMap, pIte, &iter)) != NULL) {
SResultWindowInfo* pWinInfo = pIte;
@@ -3362,7 +3339,7 @@ int32_t closeSessionWindow(SSHashObj* pHashMap, STimeWindowAggSupp* pTwSup, SSHa
return code;
}
}
- SSessionKey* pKey = tSimpleHashGetKey(pIte, &keyLen);
+ SSessionKey* pKey = tSimpleHashGetKey(pIte, NULL);
tSimpleHashIterateRemove(pHashMap, pKey, sizeof(SSessionKey), &pIte, &iter);
}
}
@@ -3451,7 +3428,7 @@ static SSDataBlock* doStreamSessionAgg(SOperatorInfo* pOperator) {
pInfo->pUpdated = taosArrayInit(16, sizeof(SSessionKey));
}
if (!pInfo->pStUpdated) {
- _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY);
+ _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY);
pInfo->pStUpdated = tSimpleHashInit(64, hashFn);
}
while (1) {
@@ -3675,7 +3652,7 @@ static SSDataBlock* doStreamSessionSemiAgg(SOperatorInfo* pOperator) {
pInfo->pUpdated = taosArrayInit(16, sizeof(SSessionKey));
}
if (!pInfo->pStUpdated) {
- _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY);
+ _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY);
pInfo->pStUpdated = tSimpleHashInit(64, hashFn);
}
while (1) {
@@ -4006,7 +3983,7 @@ static SSDataBlock* doStreamStateAgg(SOperatorInfo* pOperator) {
pInfo->pUpdated = taosArrayInit(16, sizeof(SSessionKey));
}
if (!pInfo->pSeUpdated) {
- _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY);
+ _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY);
pInfo->pSeUpdated = tSimpleHashInit(64, hashFn);
}
while (1) {
@@ -4761,7 +4738,7 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
return pInfo->pDelRes;
}
- doBuildResult(pOperator, pInfo->pState, pInfo->binfo.pRes, &pInfo->groupResInfo);
+ doBuildStreamIntervalResult(pOperator, pInfo->pState, pInfo->binfo.pRes, &pInfo->groupResInfo);
if (pInfo->binfo.pRes->info.rows > 0) {
printDataBlock(pInfo->binfo.pRes, "single interval");
return pInfo->binfo.pRes;
@@ -4776,14 +4753,13 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
SOperatorInfo* downstream = pOperator->pDownstream[0];
if (!pInfo->pUpdated) {
- pInfo->pUpdated = taosArrayInit(4, POINTER_BYTES);
+ pInfo->pUpdated = taosArrayInit(4, sizeof(SWinKey));
}
if (!pInfo->pUpdatedMap) {
_hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY);
- pInfo->pUpdatedMap = taosHashInit(1024, hashFn, false, HASH_NO_LOCK);
+ pInfo->pUpdatedMap = tSimpleHashInit(1024, hashFn);
}
-
while (1) {
SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream);
if (pBlock == NULL) {
@@ -4832,19 +4808,21 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
}
pOperator->status = OP_RES_TO_RETURN;
removeDeleteResults(pInfo->pUpdatedMap, pInfo->pDelWins);
- closeStreamIntervalWindow(pInfo->aggSup.pResultRowHashTable, &pInfo->twAggSup, &pInfo->interval, NULL, pInfo->pUpdatedMap,
- pInfo->pDelWins, pOperator);
+ closeStreamIntervalWindow(pInfo->aggSup.pResultRowHashTable, &pInfo->twAggSup, &pInfo->interval, NULL,
+ pInfo->pUpdatedMap, pInfo->pDelWins, pOperator);
- void* pIte = NULL;
- while ((pIte = taosHashIterate(pInfo->pUpdatedMap, pIte)) != NULL) {
- taosArrayPush(pInfo->pUpdated, pIte);
+ void* pIte = NULL;
+ int32_t iter = 0;
+ while ((pIte = tSimpleHashIterate(pInfo->pUpdatedMap, pIte, &iter)) != NULL) {
+ SWinKey* pKey = tSimpleHashGetKey(pIte, NULL);
+ taosArrayPush(pInfo->pUpdated, pKey);
}
- taosArraySort(pInfo->pUpdated, resultrowComparAsc);
+ taosArraySort(pInfo->pUpdated, winKeyCmprImpl);
initMultiResInfoFromArrayList(&pInfo->groupResInfo, pInfo->pUpdated);
pInfo->pUpdated = NULL;
blockDataEnsureCapacity(pInfo->binfo.pRes, pOperator->resultInfo.capacity);
- taosHashCleanup(pInfo->pUpdatedMap);
+ tSimpleHashCleanup(pInfo->pUpdatedMap);
pInfo->pUpdatedMap = NULL;
doBuildDeleteResult(pInfo, pInfo->pDelWins, &pInfo->delIndex, pInfo->pDelRes);
@@ -4853,7 +4831,7 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
return pInfo->pDelRes;
}
- doBuildResult(pOperator, pInfo->pState, pInfo->binfo.pRes, &pInfo->groupResInfo);
+ doBuildStreamIntervalResult(pOperator, pInfo->pState, pInfo->binfo.pRes, &pInfo->groupResInfo);
if (pInfo->binfo.pRes->info.rows > 0) {
printDataBlock(pInfo->binfo.pRes, "single interval");
return pInfo->binfo.pRes;
diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c
index 15286aa42a..9d52441976 100644
--- a/source/libs/nodes/src/nodesUtilFuncs.c
+++ b/source/libs/nodes/src/nodesUtilFuncs.c
@@ -436,7 +436,7 @@ SNode* nodesMakeNode(ENodeType type) {
return makeNode(type, sizeof(SShowCreateDatabaseStmt));
case QUERY_NODE_SHOW_DB_ALIVE_STMT:
case QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT:
- return makeNode(type, sizeof(SShowAliveStmt));
+ return makeNode(type, sizeof(SShowAliveStmt));
case QUERY_NODE_SHOW_CREATE_TABLE_STMT:
case QUERY_NODE_SHOW_CREATE_STABLE_STMT:
return makeNode(type, sizeof(SShowCreateTableStmt));
@@ -964,7 +964,7 @@ void nodesDestroyNode(SNode* pNode) {
case QUERY_NODE_SHOW_LICENCES_STMT:
case QUERY_NODE_SHOW_VGROUPS_STMT:
case QUERY_NODE_SHOW_DB_ALIVE_STMT:
- case QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT:
+ case QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT:
case QUERY_NODE_SHOW_TOPICS_STMT:
case QUERY_NODE_SHOW_CONSUMERS_STMT:
case QUERY_NODE_SHOW_CONNECTIONS_STMT:
@@ -1103,6 +1103,8 @@ void nodesDestroyNode(SNode* pNode) {
nodesDestroyNode(pLogicNode->pTspk);
nodesDestroyNode(pLogicNode->pTsEnd);
nodesDestroyNode(pLogicNode->pStateExpr);
+ nodesDestroyNode(pLogicNode->pStartCond);
+ nodesDestroyNode(pLogicNode->pEndCond);
break;
}
case QUERY_NODE_LOGIC_PLAN_FILL: {
diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y
index b8737ea2a2..d2debec7b5 100644
--- a/source/libs/parser/inc/sql.y
+++ b/source/libs/parser/inc/sql.y
@@ -518,6 +518,7 @@ cmd ::= RESET QUERY CACHE.
/************************************************ explain *************************************************************/
cmd ::= EXPLAIN analyze_opt(A) explain_options(B) query_or_subquery(C). { pCxt->pRootNode = createExplainStmt(pCxt, A, B, C); }
+cmd ::= EXPLAIN analyze_opt(A) explain_options(B) insert_query(C). { pCxt->pRootNode = createExplainStmt(pCxt, A, B, C); }
%type analyze_opt { bool }
%destructor analyze_opt { }
@@ -597,9 +598,11 @@ cmd ::= DELETE FROM full_table_name(A) where_clause_opt(B).
cmd ::= query_or_subquery(A). { pCxt->pRootNode = A; }
/************************************************ insert **************************************************************/
-cmd ::= INSERT INTO full_table_name(A)
- NK_LP col_name_list(B) NK_RP query_or_subquery(C). { pCxt->pRootNode = createInsertStmt(pCxt, A, B, C); }
-cmd ::= INSERT INTO full_table_name(A) query_or_subquery(B). { pCxt->pRootNode = createInsertStmt(pCxt, A, NULL, B); }
+cmd ::= insert_query(A). { pCxt->pRootNode = A; }
+
+insert_query(A) ::= INSERT INTO full_table_name(D)
+ NK_LP col_name_list(B) NK_RP query_or_subquery(C). { A = createInsertStmt(pCxt, D, B, C); }
+insert_query(A) ::= INSERT INTO full_table_name(C) query_or_subquery(B). { A = createInsertStmt(pCxt, C, NULL, B); }
/************************************************ literal *************************************************************/
literal(A) ::= NK_INTEGER(B). { A = createRawExprNode(pCxt, &B, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B)); }
diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c
index 3c5d4d506a..630b61bd4b 100644
--- a/source/libs/parser/src/parInsertSql.c
+++ b/source/libs/parser/src/parInsertSql.c
@@ -1693,6 +1693,9 @@ static int32_t getTableSchemaFromMetaData(SInsertParseContext* pCxt, const SMeta
if (TSDB_CODE_SUCCESS == code && !isStb && TSDB_SUPER_TABLE == pStmt->pTableMeta->tableType) {
code = buildInvalidOperationMsg(&pCxt->msg, "insert data into super table is not supported");
}
+ if (TSDB_CODE_SUCCESS == code && isStb) {
+ code = storeTableMeta(pCxt, pStmt);
+ }
if (TSDB_CODE_SUCCESS == code) {
code = getTableVgroupFromMetaData(pMetaData->pTableHash, pStmt, isStb);
}
diff --git a/source/libs/parser/src/parInsertUtil.c b/source/libs/parser/src/parInsertUtil.c
index 7cc93b448f..5791a634df 100644
--- a/source/libs/parser/src/parInsertUtil.c
+++ b/source/libs/parser/src/parInsertUtil.c
@@ -290,7 +290,8 @@ int32_t insGetTableDataCxt(SHashObj* pHash, void* id, int32_t idLen, STableMeta*
}
int32_t code = createTableDataCxt(pTableMeta, pCreateTbReq, pTableCxt, colMode);
if (TSDB_CODE_SUCCESS == code) {
- code = taosHashPut(pHash, id, idLen, pTableCxt, POINTER_BYTES);
+ void* pData = *pTableCxt; // deal scan coverity
+ code = taosHashPut(pHash, id, idLen, &pData, POINTER_BYTES);
}
return code;
}
diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c
index a57a52041d..c8ab370c11 100644
--- a/source/libs/parser/src/parTranslater.c
+++ b/source/libs/parser/src/parTranslater.c
@@ -1550,11 +1550,14 @@ static int32_t translateRepeatScanFunc(STranslateContext* pCxt, SFunctionNode* p
// select percentile() without from clause is also valid
if ((NULL != pTable && (QUERY_NODE_REAL_TABLE != nodeType(pTable) ||
(TSDB_CHILD_TABLE != ((SRealTableNode*)pTable)->pMeta->tableType &&
- TSDB_NORMAL_TABLE != ((SRealTableNode*)pTable)->pMeta->tableType))) ||
- NULL != pSelect->pPartitionByList) {
+ TSDB_NORMAL_TABLE != ((SRealTableNode*)pTable)->pMeta->tableType)))) {
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_ONLY_SUPPORT_SINGLE_TABLE,
"%s is only supported in single table query", pFunc->functionName);
}
+ if (NULL != pSelect->pPartitionByList) {
+ return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_NOT_ALLOWED_FUNC,
+ "%s function is not supported in partition query", pFunc->functionName);
+ }
return TSDB_CODE_SUCCESS;
}
@@ -2979,7 +2982,7 @@ static int32_t checkFill(STranslateContext* pCxt, SFillNode* pFill, SValueNode*
intervalRange = pInterval->datum.i;
}
- if ((timeRange == 0) || (timeRange / intervalRange) >= MAX_INTERVAL_TIME_WINDOW) {
+ if ((timeRange / intervalRange) >= MAX_INTERVAL_TIME_WINDOW) {
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_FILL_TIME_RANGE);
}
@@ -3281,9 +3284,6 @@ static int32_t translateInterp(STranslateContext* pCxt, SSelectStmt* pSelect) {
}
static int32_t translatePartitionBy(STranslateContext* pCxt, SSelectStmt* pSelect) {
- if (NULL == pSelect->pPartitionByList) {
- return TSDB_CODE_SUCCESS;
- }
pCxt->currClause = SQL_CLAUSE_PARTITION_BY;
int32_t code = translateExprList(pCxt, pSelect->pPartitionByList);
if (TSDB_CODE_SUCCESS == code) {
@@ -3517,7 +3517,7 @@ static int32_t translateSetOperProject(STranslateContext* pCxt, SSetOperator* pS
if (comp > 0) {
SNode* pRightFunc = NULL;
int32_t code = createCastFunc(pCxt, pRight, pLeftExpr->resType, &pRightFunc);
- if (TSDB_CODE_SUCCESS != code) {
+ if (TSDB_CODE_SUCCESS != code || NULL == pRightFunc) { // deal scan coverity
return code;
}
REPLACE_LIST2_NODE(pRightFunc);
@@ -3525,7 +3525,7 @@ static int32_t translateSetOperProject(STranslateContext* pCxt, SSetOperator* pS
} else if (comp < 0) {
SNode* pLeftFunc = NULL;
int32_t code = createCastFunc(pCxt, pLeft, pRightExpr->resType, &pLeftFunc);
- if (TSDB_CODE_SUCCESS != code) {
+ if (TSDB_CODE_SUCCESS != code || NULL == pLeftFunc) { // deal scan coverity
return code;
}
REPLACE_LIST1_NODE(pLeftFunc);
@@ -5682,10 +5682,6 @@ static SNode* createNullValue() {
}
static int32_t addNullTagsForExistTable(STranslateContext* pCxt, STableMeta* pMeta, SSelectStmt* pSelect) {
- if (NULL == pMeta) {
- return TSDB_CODE_SUCCESS;
- }
-
int32_t numOfTags = getNumOfTags(pMeta);
int32_t code = TSDB_CODE_SUCCESS;
for (int32_t i = 0; TSDB_CODE_SUCCESS == code && i < numOfTags; ++i) {
@@ -5739,14 +5735,30 @@ static int32_t addSubtableNameToCreateStreamQuery(STranslateContext* pCxt, SCrea
return pCxt->errCode;
}
+static int32_t addNullTagsForCreateTable(STranslateContext* pCxt, SCreateStreamStmt* pStmt) {
+ int32_t code = TSDB_CODE_SUCCESS;
+ for (int32_t i = 0; TSDB_CODE_SUCCESS == code && i < LIST_LENGTH(pStmt->pTags); ++i) {
+ code = nodesListMakeStrictAppend(&((SSelectStmt*)pStmt->pQuery)->pTags, createNullValue());
+ }
+ return code;
+}
+
+static int32_t addNullTagsToCreateStreamQuery(STranslateContext* pCxt, STableMeta* pMeta, SCreateStreamStmt* pStmt) {
+ if (NULL == pMeta) {
+ return addNullTagsForCreateTable(pCxt, pStmt);
+ }
+ return addNullTagsForExistTable(pCxt, pMeta, (SSelectStmt*)pStmt->pQuery);
+}
+
static int32_t addSubtableInfoToCreateStreamQuery(STranslateContext* pCxt, STableMeta* pMeta,
SCreateStreamStmt* pStmt) {
+ int32_t code = TSDB_CODE_SUCCESS;
SSelectStmt* pSelect = (SSelectStmt*)pStmt->pQuery;
if (NULL == pSelect->pPartitionByList) {
- return addNullTagsForExistTable(pCxt, pMeta, pSelect);
+ code = addNullTagsToCreateStreamQuery(pCxt, pMeta, pStmt);
+ } else {
+ code = addTagsToCreateStreamQuery(pCxt, pStmt, pSelect);
}
-
- int32_t code = addTagsToCreateStreamQuery(pCxt, pStmt, pSelect);
if (TSDB_CODE_SUCCESS == code) {
code = addSubtableNameToCreateStreamQuery(pCxt, pStmt, pSelect);
}
@@ -6021,17 +6033,66 @@ static int32_t adjustTagsForExistTable(STranslateContext* pCxt, SCreateStreamStm
return adjustOrderOfTags(pCxt, pStmt->pTags, pMeta, &pSelect->pTags, pReq);
}
+static int32_t adjustTagsForCreateTable(STranslateContext* pCxt, SCreateStreamStmt* pStmt, SCMCreateStreamReq* pReq) {
+ SSelectStmt* pSelect = (SSelectStmt*)pStmt->pQuery;
+ if (NULL == pSelect->pPartitionByList || NULL == pSelect->pTags) {
+ return TSDB_CODE_SUCCESS;
+ }
+
+ SNode* pTagDef = NULL;
+ SNode* pTagExpr = NULL;
+ FORBOTH(pTagDef, pStmt->pTags, pTagExpr, pSelect->pTags) {
+ SColumnDefNode* pDef = (SColumnDefNode*)pTagDef;
+ if (!dataTypeEqual(&pDef->dataType, &((SExprNode*)pTagExpr)->resType)) {
+ SNode* pFunc = NULL;
+ int32_t code = createCastFunc(pCxt, pTagExpr, pDef->dataType, &pFunc);
+ if (TSDB_CODE_SUCCESS != code) {
+ return code;
+ }
+ REPLACE_LIST2_NODE(pFunc);
+ }
+ }
+
+ return TSDB_CODE_SUCCESS;
+}
+
+static int32_t adjustTags(STranslateContext* pCxt, SCreateStreamStmt* pStmt, const STableMeta* pMeta,
+ SCMCreateStreamReq* pReq) {
+ if (NULL == pMeta) {
+ return adjustTagsForCreateTable(pCxt, pStmt, pReq);
+ }
+ return adjustTagsForExistTable(pCxt, pStmt, pMeta, pReq);
+}
+
+static bool isTagDef(SNodeList* pTags) {
+ if (NULL == pTags) {
+ return false;
+ }
+ return QUERY_NODE_COLUMN_DEF == nodeType(nodesListGetNode(pTags, 0));
+}
+
+static bool isTagBound(SNodeList* pTags) {
+ if (NULL == pTags) {
+ return false;
+ }
+ return QUERY_NODE_COLUMN == nodeType(nodesListGetNode(pTags, 0));
+}
+
static int32_t translateStreamTargetTable(STranslateContext* pCxt, SCreateStreamStmt* pStmt, SCMCreateStreamReq* pReq,
STableMeta** pMeta) {
int32_t code = getTableMeta(pCxt, pStmt->targetDbName, pStmt->targetTabName, pMeta);
if (TSDB_CODE_PAR_TABLE_NOT_EXIST == code) {
- if (NULL != pStmt->pCols) {
+ if (NULL != pStmt->pCols || isTagBound(pStmt->pTags)) {
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_TABLE_NOT_EXIST, pStmt->targetTabName);
}
pReq->createStb = STREAM_CREATE_STABLE_TRUE;
pReq->targetStbUid = 0;
return TSDB_CODE_SUCCESS;
} else {
+ if (isTagDef(pStmt->pTags)) {
+ return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Table already exist: %s",
+ pStmt->targetTabName);
+ }
pReq->createStb = STREAM_CREATE_STABLE_FALSE;
pReq->targetStbUid = (*pMeta)->suid;
}
@@ -6057,8 +6118,8 @@ static int32_t buildCreateStreamQuery(STranslateContext* pCxt, SCreateStreamStmt
if (TSDB_CODE_SUCCESS == code && NULL != pMeta) {
code = adjustProjectionsForExistTable(pCxt, pStmt, pMeta, pReq);
}
- if (TSDB_CODE_SUCCESS == code && NULL != pMeta) {
- code = adjustTagsForExistTable(pCxt, pStmt, pMeta, pReq);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = adjustTags(pCxt, pStmt, pMeta, pReq);
}
if (TSDB_CODE_SUCCESS == code) {
getSourceDatabase(pStmt->pQuery, pCxt->pParseCxt->acctId, pReq->sourceDB);
diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c
index c51ed012bd..3814c3a5e4 100644
--- a/source/libs/parser/src/sql.c
+++ b/source/libs/parser/src/sql.c
@@ -104,26 +104,26 @@
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
-#define YYNOCODE 466
+#define YYNOCODE 467
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SToken
typedef union {
int yyinit;
ParseTOKENTYPE yy0;
- int8_t yy27;
- ENullOrder yy89;
- int64_t yy129;
- SToken yy233;
- SAlterOption yy257;
- bool yy397;
- EJoinType yy428;
- EFillMode yy646;
- SNodeList* yy776;
+ EFillMode yy22;
+ ENullOrder yy23;
+ SNode* yy44;
+ int64_t yy91;
+ SAlterOption yy153;
+ bool yy163;
+ int8_t yy169;
+ SDataType yy260;
+ SToken yy455;
+ EOrder yy490;
+ SNodeList* yy684;
+ EOperatorType yy704;
+ EJoinType yy724;
int32_t yy832;
- SDataType yy852;
- EOperatorType yy856;
- EOrder yy870;
- SNode* yy924;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
@@ -140,16 +140,16 @@ typedef union {
#define ParseCTX_STORE
#define YYFALLBACK 1
#define YYNSTATE 737
-#define YYNRULE 557
+#define YYNRULE 559
#define YYNTOKEN 326
#define YY_MAX_SHIFT 736
-#define YY_MIN_SHIFTREDUCE 1090
-#define YY_MAX_SHIFTREDUCE 1646
-#define YY_ERROR_ACTION 1647
-#define YY_ACCEPT_ACTION 1648
-#define YY_NO_ACTION 1649
-#define YY_MIN_REDUCE 1650
-#define YY_MAX_REDUCE 2206
+#define YY_MIN_SHIFTREDUCE 1092
+#define YY_MAX_SHIFTREDUCE 1650
+#define YY_ERROR_ACTION 1651
+#define YY_ACCEPT_ACTION 1652
+#define YY_NO_ACTION 1653
+#define YY_MIN_REDUCE 1654
+#define YY_MAX_REDUCE 2212
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
@@ -216,819 +216,761 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
-#define YY_ACTTAB_COUNT (3084)
+#define YY_ACTTAB_COUNT (2799)
static const YYACTIONTYPE yy_action[] = {
- /* 0 */ 141, 2182, 1923, 2079, 477, 2177, 478, 1686, 2006, 35,
- /* 10 */ 286, 166, 45, 43, 1576, 378, 1758, 1921, 613, 2002,
- /* 20 */ 375, 2181, 1425, 160, 1857, 2178, 2180, 1123, 2020, 1857,
- /* 30 */ 355, 342, 1806, 1506, 2123, 1423, 354, 589, 1580, 1855,
- /* 40 */ 1855, 2177, 38, 37, 1450, 1855, 44, 42, 41, 40,
- /* 50 */ 39, 1650, 1998, 2004, 357, 601, 588, 181, 1501, 2038,
- /* 60 */ 2120, 2178, 590, 636, 18, 1450, 1125, 604, 1128, 1129,
- /* 70 */ 625, 1431, 1988, 349, 642, 130, 129, 128, 127, 126,
- /* 80 */ 125, 124, 123, 122, 45, 43, 139, 44, 42, 41,
- /* 90 */ 40, 39, 375, 165, 1425, 1662, 14, 483, 338, 625,
- /* 100 */ 589, 626, 2019, 479, 2177, 1506, 2055, 1423, 611, 108,
- /* 110 */ 2021, 646, 2023, 2024, 641, 54, 636, 1210, 733, 588,
- /* 120 */ 181, 178, 2182, 2108, 2178, 590, 2177, 369, 2104, 60,
- /* 130 */ 1501, 1450, 1804, 1508, 1509, 350, 18, 348, 347, 1535,
- /* 140 */ 518, 183, 2181, 1431, 520, 1923, 2178, 2179, 85, 2134,
- /* 150 */ 265, 2116, 600, 1212, 132, 599, 2006, 366, 2177, 1425,
- /* 160 */ 1920, 613, 135, 1481, 1491, 1450, 519, 2002, 14, 1507,
- /* 170 */ 1510, 1799, 1423, 588, 181, 48, 1851, 1852, 2178, 590,
- /* 180 */ 531, 530, 529, 628, 1426, 2080, 1424, 1482, 136, 525,
- /* 190 */ 733, 64, 486, 524, 478, 1686, 1536, 49, 523, 528,
- /* 200 */ 1998, 2004, 370, 1434, 522, 1508, 1509, 60, 1431, 1429,
- /* 210 */ 1430, 636, 1480, 1483, 1484, 1485, 1486, 1487, 1488, 1489,
- /* 220 */ 1490, 638, 634, 1499, 1500, 1502, 1503, 1504, 1505, 2,
- /* 230 */ 1142, 579, 1141, 495, 380, 1481, 1491, 1850, 1852, 277,
- /* 240 */ 278, 1507, 1510, 121, 276, 219, 120, 119, 118, 117,
- /* 250 */ 116, 115, 114, 113, 112, 733, 1426, 584, 1424, 38,
- /* 260 */ 37, 1143, 1959, 44, 42, 41, 40, 39, 34, 373,
- /* 270 */ 1530, 1531, 1532, 1533, 1534, 1538, 1539, 1540, 1541, 1451,
- /* 280 */ 184, 1429, 1430, 60, 1480, 1483, 1484, 1485, 1486, 1487,
- /* 290 */ 1488, 1489, 1490, 638, 634, 1499, 1500, 1502, 1503, 1504,
- /* 300 */ 1505, 2, 1648, 11, 45, 43, 1719, 236, 1348, 1349,
- /* 310 */ 1451, 625, 375, 1673, 1425, 585, 580, 574, 612, 1573,
- /* 320 */ 2020, 1426, 11, 1424, 9, 1506, 184, 1423, 1250, 668,
- /* 330 */ 667, 666, 1254, 665, 1256, 1257, 664, 1259, 661, 626,
- /* 340 */ 1265, 658, 1267, 1268, 655, 652, 1429, 1430, 184, 2123,
- /* 350 */ 1501, 2038, 601, 131, 1437, 1857, 18, 1988, 184, 643,
- /* 360 */ 516, 680, 363, 1431, 1988, 493, 642, 1916, 390, 177,
- /* 370 */ 1804, 1855, 531, 530, 529, 2119, 45, 43, 1511, 1449,
- /* 380 */ 136, 525, 1844, 139, 375, 524, 1425, 48, 14, 1902,
- /* 390 */ 523, 528, 1365, 1366, 2019, 105, 522, 1506, 2055, 1423,
- /* 400 */ 189, 108, 2021, 646, 2023, 2024, 641, 626, 636, 140,
- /* 410 */ 733, 142, 565, 148, 2079, 2108, 2177, 1796, 220, 369,
- /* 420 */ 2104, 186, 1501, 1293, 1294, 1508, 1509, 1643, 1364, 1367,
- /* 430 */ 85, 2183, 181, 170, 184, 1431, 2178, 590, 1804, 512,
- /* 440 */ 508, 504, 500, 217, 545, 175, 603, 179, 2116, 2117,
- /* 450 */ 626, 137, 2121, 1800, 626, 1481, 1491, 543, 1857, 541,
- /* 460 */ 46, 1507, 1510, 1651, 418, 38, 37, 1907, 131, 44,
- /* 470 */ 42, 41, 40, 39, 1856, 521, 1426, 1453, 1424, 554,
- /* 480 */ 86, 1804, 733, 215, 121, 1804, 1887, 120, 119, 118,
- /* 490 */ 117, 116, 115, 114, 113, 112, 476, 1508, 1509, 481,
- /* 500 */ 1692, 1429, 1430, 175, 1480, 1483, 1484, 1485, 1486, 1487,
- /* 510 */ 1488, 1489, 1490, 638, 634, 1499, 1500, 1502, 1503, 1504,
- /* 520 */ 1505, 2, 1642, 678, 345, 1906, 485, 1481, 1491, 481,
- /* 530 */ 1692, 38, 37, 1507, 1510, 44, 42, 41, 40, 39,
- /* 540 */ 626, 367, 153, 152, 675, 674, 673, 150, 1426, 163,
- /* 550 */ 1424, 214, 208, 1781, 419, 1431, 213, 1603, 1806, 491,
- /* 560 */ 38, 37, 2038, 1572, 44, 42, 41, 40, 39, 1452,
- /* 570 */ 583, 1804, 612, 1429, 1430, 206, 1480, 1483, 1484, 1485,
- /* 580 */ 1486, 1487, 1488, 1489, 1490, 638, 634, 1499, 1500, 1502,
- /* 590 */ 1503, 1504, 1505, 2, 45, 43, 27, 536, 41, 40,
- /* 600 */ 39, 11, 375, 60, 1425, 1795, 576, 1601, 1602, 1604,
- /* 610 */ 1605, 2182, 546, 626, 582, 1506, 2002, 1423, 1516, 610,
- /* 620 */ 1613, 1916, 245, 612, 1450, 2020, 233, 428, 1452, 38,
- /* 630 */ 37, 626, 1857, 44, 42, 41, 40, 39, 438, 368,
- /* 640 */ 1501, 539, 2123, 99, 1804, 443, 533, 437, 1855, 1998,
- /* 650 */ 2004, 232, 630, 1431, 2080, 268, 2038, 234, 527, 526,
- /* 660 */ 636, 678, 1804, 626, 643, 1797, 45, 43, 2118, 1988,
- /* 670 */ 621, 642, 1916, 1672, 375, 414, 1425, 444, 46, 1706,
- /* 680 */ 153, 152, 675, 674, 673, 150, 2007, 1506, 68, 1423,
- /* 690 */ 413, 67, 412, 60, 1804, 91, 2020, 2002, 235, 2019,
- /* 700 */ 733, 532, 1142, 2055, 1141, 1636, 167, 2021, 646, 2023,
- /* 710 */ 2024, 641, 1501, 636, 267, 1508, 1509, 1988, 1592, 565,
- /* 720 */ 88, 333, 151, 2177, 549, 1431, 547, 2038, 704, 702,
- /* 730 */ 1998, 2004, 671, 1143, 300, 640, 409, 1834, 2183, 181,
- /* 740 */ 1988, 636, 642, 2178, 590, 1481, 1491, 566, 2145, 31,
- /* 750 */ 14, 1507, 1510, 193, 184, 38, 37, 411, 407, 44,
- /* 760 */ 42, 41, 40, 39, 1402, 1403, 1426, 1482, 1424, 1537,
- /* 770 */ 2019, 1975, 733, 267, 2055, 53, 420, 322, 2021, 646,
- /* 780 */ 2023, 2024, 641, 639, 636, 627, 2073, 1508, 1509, 1782,
- /* 790 */ 82, 1429, 1430, 81, 1480, 1483, 1484, 1485, 1486, 1487,
- /* 800 */ 1488, 1489, 1490, 638, 634, 1499, 1500, 1502, 1503, 1504,
- /* 810 */ 1505, 2, 693, 331, 1774, 1448, 328, 1481, 1491, 397,
- /* 820 */ 33, 736, 451, 1507, 1510, 465, 38, 37, 464, 378,
- /* 830 */ 44, 42, 41, 40, 39, 293, 1453, 163, 1426, 1716,
- /* 840 */ 1424, 32, 1671, 434, 184, 466, 1806, 1670, 436, 692,
- /* 850 */ 174, 1542, 495, 8, 1669, 1668, 726, 722, 718, 714,
- /* 860 */ 291, 13, 12, 1429, 1430, 1453, 1480, 1483, 1484, 1485,
- /* 870 */ 1486, 1487, 1488, 1489, 1490, 638, 634, 1499, 1500, 1502,
- /* 880 */ 1503, 1504, 1505, 2, 672, 1793, 1988, 1848, 38, 37,
- /* 890 */ 346, 1988, 44, 42, 41, 40, 39, 106, 1988, 1988,
- /* 900 */ 284, 163, 424, 1789, 458, 710, 709, 708, 707, 385,
- /* 910 */ 1807, 706, 705, 143, 700, 699, 698, 697, 696, 695,
+ /* 0 */ 165, 378, 1666, 601, 477, 626, 478, 1690, 141, 160,
+ /* 10 */ 64, 2085, 45, 43, 1580, 1797, 355, 31, 1810, 131,
+ /* 20 */ 375, 1799, 1429, 38, 37, 1859, 516, 44, 42, 41,
+ /* 30 */ 40, 39, 2008, 1510, 139, 1427, 1808, 2026, 1144, 625,
+ /* 40 */ 1143, 2012, 38, 37, 607, 1454, 44, 42, 41, 40,
+ /* 50 */ 39, 626, 2008, 219, 2129, 38, 37, 175, 1505, 44,
+ /* 60 */ 42, 41, 40, 39, 18, 186, 2004, 2010, 2044, 1145,
+ /* 70 */ 380, 1435, 1652, 1854, 1856, 601, 640, 636, 345, 1910,
+ /* 80 */ 2126, 1994, 1808, 642, 45, 43, 2004, 2010, 357, 565,
+ /* 90 */ 625, 268, 375, 2183, 1429, 1927, 14, 636, 338, 180,
+ /* 100 */ 2122, 2123, 60, 137, 2127, 1510, 139, 1427, 2189, 181,
+ /* 110 */ 1925, 613, 2025, 2184, 590, 48, 2061, 495, 733, 322,
+ /* 120 */ 2027, 646, 2029, 2030, 641, 639, 636, 627, 2079, 60,
+ /* 130 */ 1505, 91, 2187, 1512, 1513, 1454, 18, 476, 388, 1539,
+ /* 140 */ 481, 1696, 387, 1435, 1617, 1252, 668, 667, 666, 1256,
+ /* 150 */ 665, 1258, 1259, 664, 1261, 661, 175, 1267, 658, 1269,
+ /* 160 */ 1270, 655, 652, 1485, 1495, 1927, 48, 1454, 14, 1511,
+ /* 170 */ 1514, 265, 2122, 600, 85, 132, 599, 366, 1911, 2183,
+ /* 180 */ 1924, 613, 680, 565, 1430, 2044, 1428, 2183, 135, 486,
+ /* 190 */ 733, 478, 1690, 583, 588, 181, 1540, 1803, 60, 2184,
+ /* 200 */ 590, 1212, 2189, 181, 49, 1512, 1513, 2184, 590, 1433,
+ /* 210 */ 1434, 60, 1484, 1487, 1488, 1489, 1490, 1491, 1492, 1493,
+ /* 220 */ 1494, 638, 634, 1503, 1504, 1506, 1507, 1508, 1509, 2,
+ /* 230 */ 44, 42, 41, 40, 39, 1485, 1495, 1214, 582, 554,
+ /* 240 */ 121, 1511, 1514, 120, 119, 118, 117, 116, 115, 114,
+ /* 250 */ 113, 112, 1144, 184, 1143, 234, 1430, 625, 1428, 38,
+ /* 260 */ 37, 1455, 420, 44, 42, 41, 40, 39, 34, 373,
+ /* 270 */ 1534, 1535, 1536, 1537, 1538, 1542, 1543, 1544, 1545, 612,
+ /* 280 */ 184, 1433, 1434, 1145, 1484, 1487, 1488, 1489, 1490, 1491,
+ /* 290 */ 1492, 1493, 1494, 638, 634, 1503, 1504, 1506, 1507, 1508,
+ /* 300 */ 1509, 2, 328, 11, 45, 43, 736, 601, 220, 1786,
+ /* 310 */ 1350, 1351, 375, 235, 1429, 407, 1607, 184, 88, 333,
+ /* 320 */ 293, 611, 549, 170, 547, 1510, 493, 1427, 1920, 512,
+ /* 330 */ 508, 504, 500, 217, 612, 174, 409, 405, 139, 1785,
+ /* 340 */ 483, 726, 722, 718, 714, 291, 479, 414, 584, 184,
+ /* 350 */ 1505, 413, 1125, 38, 37, 184, 18, 44, 42, 41,
+ /* 360 */ 40, 39, 184, 1435, 1987, 576, 1605, 1606, 1608, 1609,
+ /* 370 */ 86, 1891, 495, 215, 1295, 1296, 45, 43, 1515, 1405,
+ /* 380 */ 1406, 610, 106, 1920, 375, 284, 1429, 672, 14, 27,
+ /* 390 */ 1852, 1127, 565, 1130, 1131, 592, 2183, 1510, 2129, 1427,
+ /* 400 */ 626, 626, 603, 179, 2122, 2123, 2026, 137, 2127, 565,
+ /* 410 */ 733, 2189, 181, 2183, 131, 54, 2184, 590, 622, 2188,
+ /* 420 */ 1861, 521, 1505, 2183, 2125, 1512, 1513, 1647, 2189, 181,
+ /* 430 */ 1677, 1808, 1808, 2184, 590, 1435, 1860, 2044, 1783, 2187,
+ /* 440 */ 579, 214, 208, 2184, 2186, 643, 213, 678, 1584, 491,
+ /* 450 */ 1994, 1174, 642, 271, 1454, 1485, 1495, 1861, 270, 2188,
+ /* 460 */ 46, 1511, 1514, 2183, 354, 206, 153, 152, 675, 674,
+ /* 470 */ 673, 150, 626, 1859, 1994, 1394, 1430, 239, 1428, 2187,
+ /* 480 */ 1453, 2025, 733, 2184, 2185, 2061, 418, 1175, 167, 2027,
+ /* 490 */ 646, 2029, 2030, 641, 151, 636, 485, 1512, 1513, 481,
+ /* 500 */ 1696, 1433, 1434, 1808, 1484, 1487, 1488, 1489, 1490, 1491,
+ /* 510 */ 1492, 1493, 1494, 638, 634, 1503, 1504, 1506, 1507, 1508,
+ /* 520 */ 1509, 2, 1646, 438, 585, 580, 574, 1485, 1495, 566,
+ /* 530 */ 2151, 1655, 437, 1511, 1514, 35, 286, 38, 37, 11,
+ /* 540 */ 626, 44, 42, 41, 40, 39, 678, 53, 1430, 1457,
+ /* 550 */ 1428, 177, 121, 1723, 419, 120, 119, 118, 117, 116,
+ /* 560 */ 115, 114, 113, 112, 1848, 153, 152, 675, 674, 673,
+ /* 570 */ 150, 1808, 2026, 1433, 1434, 1456, 1484, 1487, 1488, 1489,
+ /* 580 */ 1490, 1491, 1492, 1493, 1494, 638, 634, 1503, 1504, 1506,
+ /* 590 */ 1507, 1508, 1509, 2, 45, 43, 193, 1486, 626, 85,
+ /* 600 */ 1988, 1435, 375, 2044, 1429, 692, 589, 1861, 166, 671,
+ /* 610 */ 2183, 643, 428, 1762, 363, 1510, 1994, 1427, 642, 531,
+ /* 620 */ 530, 529, 1804, 1859, 2188, 588, 181, 136, 525, 1808,
+ /* 630 */ 2184, 590, 524, 82, 2129, 2012, 81, 523, 528, 2013,
+ /* 640 */ 1505, 1456, 1676, 522, 2026, 565, 2008, 2025, 626, 2183,
+ /* 650 */ 2008, 2061, 1906, 1435, 109, 2027, 646, 2029, 2030, 641,
+ /* 660 */ 2124, 636, 443, 189, 2189, 181, 45, 43, 2114, 2184,
+ /* 670 */ 590, 99, 2113, 2110, 375, 2044, 1429, 1654, 46, 1808,
+ /* 680 */ 2004, 2010, 370, 643, 2004, 2010, 1994, 1510, 1994, 1427,
+ /* 690 */ 642, 636, 612, 1801, 245, 636, 41, 40, 39, 105,
+ /* 700 */ 733, 130, 129, 128, 127, 126, 125, 124, 123, 122,
+ /* 710 */ 52, 1541, 1505, 140, 1784, 1512, 1513, 564, 1640, 2025,
+ /* 720 */ 267, 1800, 104, 2061, 626, 1435, 168, 2027, 646, 2029,
+ /* 730 */ 2030, 641, 101, 636, 545, 531, 530, 529, 444, 621,
+ /* 740 */ 1793, 1920, 626, 136, 525, 1485, 1495, 543, 524, 541,
+ /* 750 */ 14, 1511, 1514, 523, 528, 1808, 494, 38, 37, 522,
+ /* 760 */ 1861, 44, 42, 41, 40, 39, 1430, 343, 1428, 13,
+ /* 770 */ 12, 1906, 733, 1808, 1861, 1675, 1859, 680, 591, 2204,
+ /* 780 */ 163, 368, 191, 32, 1455, 1674, 267, 1512, 1513, 1811,
+ /* 790 */ 1859, 1433, 1434, 1546, 1484, 1487, 1488, 1489, 1490, 1491,
+ /* 800 */ 1492, 1493, 1494, 638, 634, 1503, 1504, 1506, 1507, 1508,
+ /* 810 */ 1509, 2, 1795, 331, 1673, 1452, 1672, 1485, 1495, 1994,
+ /* 820 */ 33, 626, 451, 1511, 1514, 465, 38, 37, 464, 1994,
+ /* 830 */ 44, 42, 41, 40, 39, 1805, 1577, 589, 1430, 1720,
+ /* 840 */ 1428, 2183, 367, 434, 1791, 466, 1596, 1520, 436, 11,
+ /* 850 */ 163, 9, 1808, 1454, 1964, 1671, 588, 181, 1994, 1810,
+ /* 860 */ 1994, 2184, 590, 1433, 1434, 1553, 1484, 1487, 1488, 1489,
+ /* 870 */ 1490, 1491, 1492, 1493, 1494, 638, 634, 1503, 1504, 1506,
+ /* 880 */ 1507, 1508, 1509, 2, 277, 278, 670, 38, 37, 276,
+ /* 890 */ 346, 44, 42, 41, 40, 39, 240, 1367, 1368, 1994,
+ /* 900 */ 236, 349, 424, 527, 526, 710, 709, 708, 707, 385,
+ /* 910 */ 560, 706, 705, 143, 700, 699, 698, 697, 696, 695,
/* 920 */ 694, 155, 690, 689, 688, 384, 383, 685, 684, 683,
- /* 930 */ 682, 681, 462, 622, 2181, 456, 455, 454, 453, 450,
+ /* 930 */ 682, 681, 462, 1366, 1369, 456, 455, 454, 453, 450,
/* 940 */ 449, 448, 447, 446, 442, 441, 440, 439, 330, 431,
- /* 950 */ 430, 429, 626, 426, 425, 344, 164, 1549, 607, 1450,
- /* 960 */ 388, 306, 197, 196, 626, 520, 605, 387, 271, 1902,
- /* 970 */ 2020, 1172, 626, 270, 626, 304, 71, 1779, 494, 70,
- /* 980 */ 191, 190, 626, 1804, 1780, 457, 1801, 519, 237, 50,
- /* 990 */ 1391, 3, 239, 1667, 2020, 1804, 561, 202, 473, 471,
- /* 1000 */ 468, 2038, 565, 1804, 565, 1804, 2177, 1173, 2177, 604,
- /* 1010 */ 244, 565, 72, 1804, 1988, 2177, 642, 1666, 626, 1699,
- /* 1020 */ 1665, 2183, 181, 2183, 181, 2038, 2178, 590, 2178, 590,
- /* 1030 */ 2183, 181, 609, 643, 60, 2178, 590, 1988, 1988, 1664,
- /* 1040 */ 642, 534, 381, 626, 2019, 162, 1661, 680, 2055, 1804,
- /* 1050 */ 163, 108, 2021, 646, 2023, 2024, 641, 281, 636, 1806,
- /* 1060 */ 1569, 1988, 80, 178, 1988, 2108, 1660, 593, 2019, 369,
- /* 1070 */ 2104, 596, 2055, 107, 1804, 109, 2021, 646, 2023, 2024,
- /* 1080 */ 641, 2020, 636, 1988, 552, 678, 626, 601, 1791, 2108,
- /* 1090 */ 1988, 2135, 1659, 601, 2105, 1658, 1128, 1129, 676, 626,
- /* 1100 */ 623, 1848, 1482, 1787, 153, 152, 675, 674, 673, 150,
- /* 1110 */ 1988, 1902, 2038, 624, 79, 78, 417, 1804, 139, 188,
- /* 1120 */ 643, 145, 195, 133, 139, 1988, 1657, 642, 565, 2020,
- /* 1130 */ 1804, 670, 2177, 1656, 1857, 1655, 1988, 329, 421, 1988,
- /* 1140 */ 405, 379, 403, 399, 395, 392, 389, 2183, 181, 560,
- /* 1150 */ 1855, 422, 2178, 590, 1654, 2019, 1653, 1433, 677, 2055,
- /* 1160 */ 2038, 1848, 108, 2021, 646, 2023, 2024, 641, 643, 636,
- /* 1170 */ 1988, 2128, 1569, 1988, 2197, 642, 2108, 1988, 151, 1988,
- /* 1180 */ 369, 2104, 180, 2116, 2117, 184, 137, 2121, 182, 2116,
- /* 1190 */ 2117, 2142, 137, 2121, 2020, 626, 225, 592, 1988, 223,
- /* 1200 */ 1988, 52, 227, 2019, 626, 226, 151, 2055, 564, 287,
- /* 1210 */ 108, 2021, 646, 2023, 2024, 641, 62, 636, 382, 1697,
- /* 1220 */ 229, 243, 2197, 228, 2108, 2038, 1804, 231, 369, 2104,
- /* 1230 */ 230, 1397, 249, 643, 2009, 1804, 1645, 1646, 1988, 2155,
- /* 1240 */ 642, 537, 2020, 151, 633, 47, 274, 38, 37, 69,
- /* 1250 */ 149, 44, 42, 41, 40, 39, 151, 13, 12, 1400,
- /* 1260 */ 62, 89, 47, 240, 47, 650, 149, 637, 2019, 1600,
- /* 1270 */ 1663, 1759, 2055, 2038, 104, 108, 2021, 646, 2023, 2024,
- /* 1280 */ 641, 643, 636, 2011, 101, 251, 1988, 2197, 642, 2108,
- /* 1290 */ 686, 594, 151, 369, 2104, 134, 608, 597, 1362, 279,
- /* 1300 */ 2020, 2148, 618, 283, 572, 149, 1693, 687, 1436, 1243,
- /* 1310 */ 262, 218, 1191, 1543, 577, 1492, 2019, 299, 1271, 1275,
- /* 1320 */ 2055, 256, 2039, 108, 2021, 646, 2023, 2024, 641, 1189,
- /* 1330 */ 636, 2038, 386, 372, 371, 2197, 1911, 2108, 1687, 643,
- /* 1340 */ 1845, 369, 2104, 1439, 1988, 1282, 642, 2138, 1280, 602,
- /* 1350 */ 264, 261, 2171, 1, 1506, 728, 1432, 4, 154, 391,
- /* 1360 */ 396, 343, 194, 1384, 294, 423, 1453, 427, 432, 1912,
- /* 1370 */ 2020, 460, 1448, 459, 2019, 445, 1904, 452, 2055, 1501,
- /* 1380 */ 467, 108, 2021, 646, 2023, 2024, 641, 461, 636, 1527,
- /* 1390 */ 469, 470, 1431, 2197, 199, 2108, 472, 474, 1454, 369,
- /* 1400 */ 2104, 2038, 475, 2020, 484, 1456, 487, 205, 1451, 643,
- /* 1410 */ 2127, 207, 488, 1455, 1988, 489, 642, 1457, 490, 210,
- /* 1420 */ 492, 212, 496, 83, 84, 1145, 216, 513, 514, 515,
- /* 1430 */ 517, 111, 1794, 551, 2038, 222, 1965, 332, 1964, 632,
- /* 1440 */ 87, 555, 643, 578, 2019, 147, 1790, 1988, 2055, 642,
- /* 1450 */ 224, 167, 2021, 646, 2023, 2024, 641, 156, 636, 157,
- /* 1460 */ 1792, 1788, 238, 553, 158, 159, 559, 295, 562, 241,
- /* 1470 */ 2154, 616, 2139, 7, 2153, 2149, 171, 2019, 2130, 587,
- /* 1480 */ 569, 2055, 255, 575, 108, 2021, 646, 2023, 2024, 641,
- /* 1490 */ 2020, 636, 556, 2146, 570, 257, 2083, 247, 2108, 250,
- /* 1500 */ 568, 259, 369, 2104, 567, 1440, 358, 1435, 581, 359,
- /* 1510 */ 258, 598, 2200, 2176, 595, 1569, 138, 260, 1452, 606,
- /* 1520 */ 263, 2038, 2124, 362, 269, 94, 1458, 1917, 296, 643,
- /* 1530 */ 1443, 1445, 614, 615, 1988, 297, 642, 1931, 1930, 1929,
- /* 1540 */ 365, 619, 620, 634, 1499, 1500, 1502, 1503, 1504, 1505,
- /* 1550 */ 298, 59, 96, 2089, 98, 2020, 100, 1805, 1775, 648,
- /* 1560 */ 301, 729, 730, 1849, 2019, 290, 51, 325, 2055, 732,
- /* 1570 */ 305, 108, 2021, 646, 2023, 2024, 641, 1982, 636, 310,
- /* 1580 */ 334, 335, 324, 2081, 77, 2108, 2038, 314, 303, 369,
- /* 1590 */ 2104, 1981, 76, 1980, 643, 1979, 1976, 393, 394, 1988,
- /* 1600 */ 1417, 642, 1418, 2020, 187, 398, 1974, 400, 401, 402,
- /* 1610 */ 1973, 404, 1972, 406, 1971, 1970, 408, 410, 1387, 1386,
- /* 1620 */ 1942, 1941, 415, 416, 1940, 1939, 1339, 1895, 1894, 2019,
- /* 1630 */ 2020, 1892, 144, 2055, 2038, 1891, 108, 2021, 646, 2023,
- /* 1640 */ 2024, 641, 643, 636, 1890, 1893, 1889, 1988, 629, 642,
- /* 1650 */ 2108, 1888, 1886, 1885, 369, 2104, 1884, 192, 433, 1883,
- /* 1660 */ 435, 2038, 1897, 1882, 1881, 1880, 1879, 1878, 1877, 643,
- /* 1670 */ 1876, 1875, 1874, 1873, 1988, 146, 642, 2019, 1872, 1871,
- /* 1680 */ 1870, 2055, 1869, 1868, 109, 2021, 646, 2023, 2024, 641,
- /* 1690 */ 1867, 636, 1866, 1865, 1896, 1864, 1863, 1862, 2108, 1341,
- /* 1700 */ 1861, 1860, 2107, 2104, 2019, 1859, 463, 1858, 2055, 2020,
- /* 1710 */ 1722, 109, 2021, 646, 2023, 2024, 641, 1721, 636, 198,
- /* 1720 */ 1218, 1720, 1718, 1682, 1681, 2108, 203, 200, 74, 631,
- /* 1730 */ 2104, 176, 201, 2020, 1131, 2008, 1955, 1949, 480, 1938,
- /* 1740 */ 2038, 1130, 204, 75, 1937, 482, 211, 209, 643, 1915,
- /* 1750 */ 1783, 1165, 1717, 1988, 1715, 642, 1713, 498, 499, 502,
- /* 1760 */ 497, 501, 1711, 506, 2038, 505, 1709, 503, 507, 509,
- /* 1770 */ 511, 1696, 643, 1695, 1678, 1785, 1287, 1988, 1784, 642,
- /* 1780 */ 510, 61, 1286, 644, 221, 1707, 1209, 2055, 1208, 701,
- /* 1790 */ 109, 2021, 646, 2023, 2024, 641, 1207, 636, 1206, 703,
- /* 1800 */ 1700, 1201, 1203, 1202, 2108, 1200, 351, 2019, 337, 2104,
- /* 1810 */ 1698, 2055, 352, 353, 168, 2021, 646, 2023, 2024, 641,
- /* 1820 */ 1677, 636, 535, 1676, 538, 1675, 2020, 540, 542, 544,
- /* 1830 */ 1407, 110, 1406, 548, 1954, 1409, 26, 1393, 65, 1948,
- /* 1840 */ 557, 161, 1936, 1934, 2182, 19, 571, 573, 16, 58,
- /* 1850 */ 253, 2020, 30, 28, 20, 1615, 248, 2038, 63, 254,
- /* 1860 */ 246, 2009, 17, 21, 1630, 643, 591, 2198, 55, 266,
- /* 1870 */ 1988, 558, 642, 1599, 1591, 1629, 169, 252, 356, 242,
- /* 1880 */ 1635, 360, 2038, 29, 1634, 1633, 361, 563, 5, 57,
- /* 1890 */ 643, 1636, 90, 56, 172, 1988, 1566, 642, 1935, 1933,
- /* 1900 */ 2019, 1565, 1932, 1914, 2055, 6, 93, 316, 2021, 646,
- /* 1910 */ 2023, 2024, 641, 2020, 636, 617, 272, 92, 1913, 95,
- /* 1920 */ 22, 101, 285, 273, 1597, 2019, 275, 280, 66, 2055,
- /* 1930 */ 23, 2020, 168, 2021, 646, 2023, 2024, 641, 12, 636,
- /* 1940 */ 97, 1441, 173, 185, 2038, 1496, 1473, 649, 282, 364,
- /* 1950 */ 10, 586, 643, 2058, 635, 1528, 1494, 1988, 36, 642,
- /* 1960 */ 1493, 15, 2038, 1465, 377, 1518, 24, 25, 647, 1272,
- /* 1970 */ 640, 1269, 651, 1517, 653, 1988, 1266, 642, 654, 656,
- /* 1980 */ 645, 657, 659, 662, 1260, 2199, 660, 2019, 1258, 663,
- /* 1990 */ 1249, 2055, 669, 1264, 323, 2021, 646, 2023, 2024, 641,
- /* 2000 */ 102, 636, 103, 1263, 2020, 2019, 288, 1281, 1262, 2055,
- /* 2010 */ 73, 1277, 322, 2021, 646, 2023, 2024, 641, 1163, 636,
- /* 2020 */ 1261, 2074, 1197, 679, 691, 1196, 1195, 1194, 2020, 1193,
- /* 2030 */ 1192, 1190, 1188, 1187, 1186, 2038, 1216, 289, 1184, 1183,
- /* 2040 */ 374, 1182, 1181, 643, 1180, 1179, 1178, 1213, 1988, 1211,
- /* 2050 */ 642, 1175, 1174, 1171, 1170, 1169, 1168, 1714, 711, 2038,
- /* 2060 */ 712, 1712, 715, 713, 376, 717, 1710, 643, 721, 719,
- /* 2070 */ 1708, 723, 1988, 716, 642, 1694, 720, 725, 2019, 724,
- /* 2080 */ 727, 1120, 2055, 1674, 292, 323, 2021, 646, 2023, 2024,
- /* 2090 */ 641, 1427, 636, 731, 2020, 302, 1649, 734, 735, 1649,
- /* 2100 */ 1649, 1649, 2019, 1649, 1649, 1649, 2055, 1649, 1649, 323,
- /* 2110 */ 2021, 646, 2023, 2024, 641, 1649, 636, 2020, 1649, 1649,
- /* 2120 */ 1649, 1649, 1649, 1649, 1649, 2038, 1649, 1649, 1649, 1649,
- /* 2130 */ 1649, 1649, 1649, 643, 1649, 1649, 1649, 1649, 1988, 1649,
- /* 2140 */ 642, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2038, 1649,
- /* 2150 */ 1649, 1649, 1649, 1649, 1649, 1649, 643, 1649, 1649, 1649,
- /* 2160 */ 1649, 1988, 1649, 642, 1649, 1649, 1649, 1649, 550, 1649,
- /* 2170 */ 1649, 1649, 2055, 1649, 1649, 318, 2021, 646, 2023, 2024,
- /* 2180 */ 641, 2020, 636, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2190 */ 1649, 2019, 1649, 1649, 1649, 2055, 1649, 2020, 307, 2021,
- /* 2200 */ 646, 2023, 2024, 641, 1649, 636, 1649, 1649, 1649, 1649,
- /* 2210 */ 1649, 1649, 2038, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2220 */ 643, 1649, 1649, 1649, 1649, 1988, 1649, 642, 2038, 1649,
- /* 2230 */ 1649, 1649, 1649, 1649, 1649, 1649, 643, 1649, 1649, 1649,
- /* 2240 */ 1649, 1988, 1649, 642, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2250 */ 1649, 1649, 1649, 1649, 1649, 2019, 1649, 1649, 1649, 2055,
- /* 2260 */ 1649, 2020, 308, 2021, 646, 2023, 2024, 641, 1649, 636,
- /* 2270 */ 1649, 2019, 1649, 1649, 1649, 2055, 1649, 1649, 309, 2021,
- /* 2280 */ 646, 2023, 2024, 641, 1649, 636, 1649, 2020, 1649, 1649,
- /* 2290 */ 1649, 1649, 2038, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2300 */ 643, 1649, 1649, 1649, 1649, 1988, 1649, 642, 1649, 1649,
- /* 2310 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2038, 1649,
- /* 2320 */ 1649, 1649, 1649, 1649, 1649, 1649, 643, 1649, 1649, 1649,
- /* 2330 */ 1649, 1988, 1649, 642, 1649, 2019, 1649, 1649, 1649, 2055,
- /* 2340 */ 1649, 1649, 315, 2021, 646, 2023, 2024, 641, 1649, 636,
- /* 2350 */ 1649, 2020, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2360 */ 1649, 2019, 1649, 1649, 1649, 2055, 1649, 1649, 319, 2021,
- /* 2370 */ 646, 2023, 2024, 641, 1649, 636, 1649, 1649, 2020, 1649,
- /* 2380 */ 1649, 1649, 2038, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2390 */ 643, 1649, 1649, 1649, 1649, 1988, 1649, 642, 1649, 1649,
- /* 2400 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2038,
- /* 2410 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 643, 1649, 1649,
- /* 2420 */ 1649, 1649, 1988, 1649, 642, 2019, 1649, 1649, 1649, 2055,
- /* 2430 */ 1649, 1649, 311, 2021, 646, 2023, 2024, 641, 1649, 636,
- /* 2440 */ 2020, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2450 */ 1649, 1649, 2019, 1649, 1649, 1649, 2055, 1649, 1649, 320,
- /* 2460 */ 2021, 646, 2023, 2024, 641, 1649, 636, 1649, 1649, 1649,
- /* 2470 */ 1649, 2038, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 643,
- /* 2480 */ 1649, 1649, 1649, 1649, 1988, 1649, 642, 1649, 1649, 1649,
- /* 2490 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2020, 1649,
- /* 2500 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2510 */ 1649, 1649, 1649, 1649, 2019, 1649, 1649, 1649, 2055, 1649,
- /* 2520 */ 1649, 312, 2021, 646, 2023, 2024, 641, 2020, 636, 2038,
- /* 2530 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 643, 1649, 1649,
- /* 2540 */ 1649, 1649, 1988, 1649, 642, 1649, 1649, 1649, 1649, 1649,
- /* 2550 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2038, 1649,
- /* 2560 */ 1649, 1649, 1649, 1649, 1649, 1649, 643, 1649, 1649, 1649,
- /* 2570 */ 1649, 1988, 2019, 642, 1649, 1649, 2055, 1649, 1649, 321,
- /* 2580 */ 2021, 646, 2023, 2024, 641, 2020, 636, 1649, 1649, 1649,
- /* 2590 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2600 */ 1649, 2019, 1649, 1649, 1649, 2055, 1649, 1649, 313, 2021,
- /* 2610 */ 646, 2023, 2024, 641, 1649, 636, 2038, 1649, 1649, 1649,
- /* 2620 */ 1649, 1649, 1649, 1649, 643, 1649, 1649, 1649, 1649, 1988,
- /* 2630 */ 1649, 642, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2640 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2020, 1649,
- /* 2650 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2019,
- /* 2660 */ 1649, 1649, 1649, 2055, 1649, 2020, 326, 2021, 646, 2023,
- /* 2670 */ 2024, 641, 1649, 636, 1649, 1649, 1649, 1649, 1649, 2038,
- /* 2680 */ 1649, 2020, 1649, 1649, 1649, 1649, 1649, 643, 1649, 1649,
- /* 2690 */ 1649, 1649, 1988, 1649, 642, 1649, 2038, 1649, 1649, 1649,
- /* 2700 */ 1649, 1649, 1649, 1649, 643, 1649, 1649, 1649, 1649, 1988,
- /* 2710 */ 1649, 642, 2038, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2720 */ 643, 1649, 2019, 1649, 1649, 1988, 2055, 642, 1649, 327,
- /* 2730 */ 2021, 646, 2023, 2024, 641, 1649, 636, 1649, 1649, 2019,
- /* 2740 */ 1649, 1649, 1649, 2055, 1649, 1649, 2032, 2021, 646, 2023,
- /* 2750 */ 2024, 641, 2020, 636, 1649, 2019, 1649, 1649, 1649, 2055,
- /* 2760 */ 1649, 1649, 2031, 2021, 646, 2023, 2024, 641, 1649, 636,
- /* 2770 */ 2020, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2780 */ 1649, 1649, 1649, 2038, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2790 */ 1649, 643, 1649, 1649, 1649, 1649, 1988, 1649, 642, 1649,
- /* 2800 */ 1649, 2038, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 643,
- /* 2810 */ 1649, 1649, 1649, 1649, 1988, 1649, 642, 1649, 1649, 1649,
- /* 2820 */ 1649, 1649, 1649, 1649, 1649, 1649, 2019, 1649, 2020, 1649,
- /* 2830 */ 2055, 1649, 1649, 2030, 2021, 646, 2023, 2024, 641, 1649,
- /* 2840 */ 636, 1649, 1649, 1649, 2019, 1649, 1649, 1649, 2055, 1649,
- /* 2850 */ 1649, 339, 2021, 646, 2023, 2024, 641, 2020, 636, 2038,
- /* 2860 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 643, 1649, 1649,
- /* 2870 */ 1649, 1649, 1988, 1649, 642, 1649, 1649, 1649, 1649, 1649,
- /* 2880 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2038, 1649,
- /* 2890 */ 1649, 1649, 1649, 1649, 1649, 1649, 643, 1649, 1649, 1649,
- /* 2900 */ 1649, 1988, 2019, 642, 1649, 1649, 2055, 1649, 1649, 340,
- /* 2910 */ 2021, 646, 2023, 2024, 641, 2020, 636, 1649, 1649, 1649,
- /* 2920 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2930 */ 1649, 2019, 1649, 1649, 1649, 2055, 1649, 1649, 336, 2021,
- /* 2940 */ 646, 2023, 2024, 641, 1649, 636, 2038, 1649, 1649, 1649,
- /* 2950 */ 1649, 1649, 1649, 1649, 643, 1649, 1649, 1649, 1649, 1988,
- /* 2960 */ 1649, 642, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 2970 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2020, 1649,
- /* 2980 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2019,
- /* 2990 */ 1649, 1649, 1649, 2055, 1649, 2020, 341, 2021, 646, 2023,
- /* 3000 */ 2024, 641, 1649, 636, 1649, 1649, 1649, 1649, 1649, 2038,
- /* 3010 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 643, 1649, 1649,
- /* 3020 */ 1649, 1649, 1988, 1649, 642, 1649, 2038, 1649, 1649, 1649,
- /* 3030 */ 1649, 1649, 1649, 1649, 643, 1649, 1649, 1649, 1649, 1988,
- /* 3040 */ 1649, 642, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
- /* 3050 */ 1649, 1649, 644, 1649, 1649, 1649, 2055, 1649, 1649, 318,
- /* 3060 */ 2021, 646, 2023, 2024, 641, 1649, 636, 1649, 1649, 2019,
- /* 3070 */ 1649, 1649, 1649, 2055, 1649, 1649, 317, 2021, 646, 2023,
- /* 3080 */ 2024, 641, 1649, 636,
+ /* 950 */ 430, 429, 1457, 426, 425, 344, 164, 676, 552, 626,
+ /* 960 */ 1852, 306, 1670, 350, 1429, 348, 347, 1861, 518, 628,
+ /* 970 */ 2026, 2086, 520, 237, 379, 304, 71, 1427, 593, 70,
+ /* 980 */ 1669, 38, 37, 1859, 8, 44, 42, 41, 40, 39,
+ /* 990 */ 1808, 1855, 1856, 1667, 519, 1668, 1486, 202, 473, 471,
+ /* 1000 */ 468, 2044, 677, 565, 2026, 1852, 1994, 2183, 637, 604,
+ /* 1010 */ 601, 704, 702, 1435, 1994, 626, 642, 300, 1665, 1664,
+ /* 1020 */ 1838, 1663, 2189, 181, 1994, 1662, 1906, 2184, 590, 561,
+ /* 1030 */ 1661, 1660, 1763, 1659, 60, 2044, 458, 195, 1658, 1994,
+ /* 1040 */ 1454, 139, 60, 643, 162, 2025, 1808, 626, 1994, 2061,
+ /* 1050 */ 642, 1457, 108, 2027, 646, 2029, 2030, 641, 1657, 636,
+ /* 1060 */ 733, 605, 1994, 1994, 178, 1994, 2114, 596, 378, 1994,
+ /* 1070 */ 369, 2110, 72, 107, 1994, 1994, 163, 1994, 1808, 2025,
+ /* 1080 */ 1576, 2026, 1994, 2061, 183, 1810, 108, 2027, 646, 2029,
+ /* 1090 */ 2030, 641, 2140, 636, 197, 196, 142, 190, 148, 2085,
+ /* 1100 */ 2114, 630, 1994, 2086, 369, 2110, 182, 2122, 2123, 2154,
+ /* 1110 */ 137, 2127, 2044, 262, 79, 78, 417, 457, 151, 188,
+ /* 1120 */ 604, 693, 80, 1778, 626, 1994, 1430, 642, 1428, 412,
+ /* 1130 */ 2026, 411, 1130, 1131, 51, 520, 3, 329, 609, 1980,
+ /* 1140 */ 403, 1438, 401, 397, 393, 390, 410, 577, 626, 2134,
+ /* 1150 */ 1573, 1433, 1434, 2026, 410, 1808, 2025, 519, 626, 626,
+ /* 1160 */ 2061, 2044, 281, 108, 2027, 646, 2029, 2030, 641, 643,
+ /* 1170 */ 636, 1400, 623, 624, 1994, 178, 642, 2114, 381, 1808,
+ /* 1180 */ 626, 369, 2110, 1486, 2044, 184, 163, 395, 421, 1808,
+ /* 1190 */ 1808, 1573, 643, 184, 287, 1810, 244, 1994, 145, 642,
+ /* 1200 */ 133, 422, 594, 2141, 225, 2025, 218, 223, 151, 2061,
+ /* 1210 */ 2015, 1808, 108, 2027, 646, 2029, 2030, 641, 227, 636,
+ /* 1220 */ 229, 226, 231, 228, 2203, 230, 2114, 62, 2025, 633,
+ /* 1230 */ 369, 2110, 2061, 1710, 1703, 108, 2027, 646, 2029, 2030,
+ /* 1240 */ 641, 2148, 636, 2026, 626, 1701, 243, 2203, 1437, 2114,
+ /* 1250 */ 372, 371, 256, 369, 2110, 532, 534, 2045, 382, 2017,
+ /* 1260 */ 1443, 1403, 249, 151, 2161, 1697, 2026, 537, 1649, 1650,
+ /* 1270 */ 47, 1510, 386, 1436, 2044, 1808, 13, 12, 1915, 678,
+ /* 1280 */ 1604, 1849, 643, 274, 1691, 69, 89, 1994, 2144, 642,
+ /* 1290 */ 602, 686, 1441, 597, 149, 264, 1505, 2044, 153, 152,
+ /* 1300 */ 675, 674, 673, 150, 47, 643, 151, 261, 1, 1435,
+ /* 1310 */ 1994, 62, 642, 1193, 728, 251, 608, 4, 2025, 389,
+ /* 1320 */ 394, 342, 2061, 1364, 687, 108, 2027, 646, 2029, 2030,
+ /* 1330 */ 641, 47, 636, 1387, 2026, 294, 279, 2203, 618, 2114,
+ /* 1340 */ 423, 2025, 650, 369, 2110, 2061, 1191, 283, 108, 2027,
+ /* 1350 */ 646, 2029, 2030, 641, 572, 636, 632, 299, 194, 1245,
+ /* 1360 */ 2203, 536, 2114, 1457, 1547, 2044, 369, 2110, 1916, 427,
+ /* 1370 */ 460, 432, 1452, 643, 1531, 445, 546, 2177, 1994, 149,
+ /* 1380 */ 642, 1908, 452, 151, 1496, 459, 461, 467, 134, 149,
+ /* 1390 */ 233, 469, 470, 199, 2026, 1273, 472, 474, 1458, 1440,
+ /* 1400 */ 475, 484, 1460, 487, 205, 539, 1455, 488, 1459, 2025,
+ /* 1410 */ 533, 489, 1461, 2061, 207, 232, 108, 2027, 646, 2029,
+ /* 1420 */ 2030, 641, 1444, 636, 1439, 2044, 490, 210, 2203, 492,
+ /* 1430 */ 2114, 212, 1277, 643, 369, 2110, 1284, 83, 1994, 84,
+ /* 1440 */ 642, 1282, 154, 216, 496, 2133, 1147, 1447, 1449, 513,
+ /* 1450 */ 514, 1970, 68, 517, 515, 67, 111, 1798, 222, 1794,
+ /* 1460 */ 634, 1503, 1504, 1506, 1507, 1508, 1509, 2026, 224, 2025,
+ /* 1470 */ 553, 156, 157, 2061, 1796, 1792, 108, 2027, 646, 2029,
+ /* 1480 */ 2030, 641, 551, 636, 158, 159, 332, 87, 2089, 1969,
+ /* 1490 */ 2114, 2026, 555, 238, 369, 2110, 147, 562, 2044, 241,
+ /* 1500 */ 295, 556, 559, 569, 2145, 578, 643, 616, 2136, 2155,
+ /* 1510 */ 2160, 1994, 7, 642, 575, 358, 247, 250, 581, 2159,
+ /* 1520 */ 570, 587, 2044, 171, 255, 257, 258, 568, 359, 567,
+ /* 1530 */ 643, 595, 2206, 259, 1573, 1994, 263, 642, 260, 598,
+ /* 1540 */ 2182, 138, 2025, 1456, 2130, 362, 2061, 606, 1462, 108,
+ /* 1550 */ 2027, 646, 2029, 2030, 641, 269, 636, 94, 2026, 614,
+ /* 1560 */ 1921, 2087, 615, 2114, 296, 1935, 2025, 369, 2110, 1934,
+ /* 1570 */ 2061, 1933, 297, 108, 2027, 646, 2029, 2030, 641, 365,
+ /* 1580 */ 636, 2026, 619, 96, 620, 629, 298, 2114, 98, 2044,
+ /* 1590 */ 1809, 369, 2110, 59, 100, 2095, 648, 643, 1853, 290,
+ /* 1600 */ 729, 730, 1994, 1779, 642, 301, 50, 732, 310, 325,
+ /* 1610 */ 334, 324, 2044, 335, 1986, 314, 303, 305, 1985, 1984,
+ /* 1620 */ 643, 76, 1981, 391, 392, 1994, 1420, 642, 1421, 187,
+ /* 1630 */ 396, 1979, 398, 2025, 399, 400, 1978, 2061, 402, 1977,
+ /* 1640 */ 109, 2027, 646, 2029, 2030, 641, 404, 636, 2026, 1976,
+ /* 1650 */ 406, 1975, 408, 77, 2114, 1390, 644, 1389, 631, 2110,
+ /* 1660 */ 2061, 1947, 1946, 109, 2027, 646, 2029, 2030, 641, 1945,
+ /* 1670 */ 636, 2026, 415, 416, 1944, 1943, 1341, 2114, 1899, 2044,
+ /* 1680 */ 1898, 337, 2110, 1896, 144, 1895, 1894, 643, 1897, 1893,
+ /* 1690 */ 1892, 1890, 1994, 1889, 642, 1888, 192, 2026, 433, 1887,
+ /* 1700 */ 435, 1901, 2044, 1886, 1885, 1884, 1883, 1882, 1881, 1880,
+ /* 1710 */ 643, 1879, 1878, 1877, 1876, 1994, 1875, 642, 1874, 1873,
+ /* 1720 */ 1872, 146, 1871, 2025, 1870, 1869, 1900, 2061, 2044, 1868,
+ /* 1730 */ 109, 2027, 646, 2029, 2030, 641, 643, 636, 1867, 1343,
+ /* 1740 */ 1866, 1994, 1865, 642, 2114, 1864, 2025, 1863, 463, 2111,
+ /* 1750 */ 2061, 1862, 1726, 167, 2027, 646, 2029, 2030, 641, 1725,
+ /* 1760 */ 636, 1724, 1220, 2026, 1722, 1686, 1685, 176, 198, 1133,
+ /* 1770 */ 203, 74, 2025, 200, 1132, 204, 2061, 1960, 2014, 316,
+ /* 1780 */ 2027, 646, 2029, 2030, 641, 1954, 636, 75, 201, 1942,
+ /* 1790 */ 2026, 480, 209, 482, 2044, 2152, 211, 1941, 1919, 1787,
+ /* 1800 */ 1721, 1167, 643, 497, 498, 1717, 499, 1994, 1719, 642,
+ /* 1810 */ 501, 502, 503, 1715, 505, 507, 1713, 506, 509, 510,
+ /* 1820 */ 2026, 2044, 1700, 586, 1699, 511, 364, 1682, 1789, 643,
+ /* 1830 */ 1289, 1288, 1788, 1711, 1994, 701, 642, 1211, 2025, 61,
+ /* 1840 */ 221, 1210, 2061, 1704, 535, 168, 2027, 646, 2029, 2030,
+ /* 1850 */ 641, 2044, 636, 1209, 1208, 703, 1205, 1203, 1204, 640,
+ /* 1860 */ 1202, 351, 352, 1702, 1994, 2025, 642, 353, 1681, 2061,
+ /* 1870 */ 110, 538, 323, 2027, 646, 2029, 2030, 641, 1680, 636,
+ /* 1880 */ 1679, 2026, 540, 542, 544, 1412, 1410, 1959, 1409, 26,
+ /* 1890 */ 548, 1396, 65, 1953, 557, 2025, 1940, 2026, 2205, 2061,
+ /* 1900 */ 1938, 2188, 322, 2027, 646, 2029, 2030, 641, 55, 636,
+ /* 1910 */ 19, 2080, 2044, 28, 558, 2026, 16, 374, 58, 253,
+ /* 1920 */ 643, 573, 246, 356, 242, 1994, 161, 642, 2044, 254,
+ /* 1930 */ 571, 1619, 2015, 376, 248, 563, 643, 63, 1603, 1595,
+ /* 1940 */ 169, 1994, 5, 642, 6, 252, 2044, 30, 20, 21,
+ /* 1950 */ 29, 90, 1634, 17, 643, 1639, 2025, 1640, 1633, 1994,
+ /* 1960 */ 2061, 642, 360, 323, 2027, 646, 2029, 2030, 641, 266,
+ /* 1970 */ 636, 1638, 2025, 1637, 2026, 361, 2061, 57, 1570, 323,
+ /* 1980 */ 2027, 646, 2029, 2030, 641, 1569, 636, 1939, 172, 1937,
+ /* 1990 */ 550, 1936, 1918, 2026, 2061, 56, 93, 318, 2027, 646,
+ /* 2000 */ 2029, 2030, 641, 92, 636, 2044, 272, 22, 1917, 273,
+ /* 2010 */ 1601, 275, 280, 643, 617, 66, 95, 97, 1994, 285,
+ /* 2020 */ 642, 12, 23, 282, 2044, 1445, 101, 2064, 635, 1532,
+ /* 2030 */ 173, 1522, 643, 185, 1500, 36, 10, 1994, 15, 642,
+ /* 2040 */ 1521, 1498, 1497, 1469, 24, 1477, 25, 649, 1274, 2025,
+ /* 2050 */ 647, 377, 651, 2061, 1251, 1271, 307, 2027, 646, 2029,
+ /* 2060 */ 2030, 641, 2026, 636, 653, 654, 656, 1268, 2025, 657,
+ /* 2070 */ 645, 1262, 2061, 659, 662, 308, 2027, 646, 2029, 2030,
+ /* 2080 */ 641, 660, 636, 2026, 1266, 1260, 663, 1265, 1264, 669,
+ /* 2090 */ 102, 1263, 288, 2044, 103, 1283, 73, 1279, 1165, 679,
+ /* 2100 */ 1199, 643, 1198, 1197, 1196, 1195, 1994, 1194, 642, 1192,
+ /* 2110 */ 691, 2026, 1190, 1189, 2044, 1188, 1218, 289, 1186, 1183,
+ /* 2120 */ 1185, 1184, 643, 1182, 1181, 1180, 1215, 1994, 1213, 642,
+ /* 2130 */ 1177, 1176, 2026, 1173, 1172, 1171, 1170, 2025, 1718, 711,
+ /* 2140 */ 712, 2061, 2044, 1716, 309, 2027, 646, 2029, 2030, 641,
+ /* 2150 */ 643, 636, 715, 713, 716, 1994, 1714, 642, 2025, 717,
+ /* 2160 */ 719, 721, 2061, 2044, 720, 315, 2027, 646, 2029, 2030,
+ /* 2170 */ 641, 643, 636, 1712, 723, 724, 1994, 1698, 642, 725,
+ /* 2180 */ 727, 2026, 1122, 1678, 292, 731, 2025, 1431, 302, 734,
+ /* 2190 */ 2061, 735, 1653, 319, 2027, 646, 2029, 2030, 641, 2026,
+ /* 2200 */ 636, 1653, 1653, 1653, 1653, 1653, 1653, 2025, 1653, 1653,
+ /* 2210 */ 1653, 2061, 2044, 1653, 311, 2027, 646, 2029, 2030, 641,
+ /* 2220 */ 643, 636, 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653,
+ /* 2230 */ 2044, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 643, 1653,
+ /* 2240 */ 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, 1653, 1653,
+ /* 2250 */ 1653, 1653, 1653, 1653, 1653, 1653, 2025, 1653, 2026, 1653,
+ /* 2260 */ 2061, 1653, 1653, 320, 2027, 646, 2029, 2030, 641, 1653,
+ /* 2270 */ 636, 1653, 1653, 1653, 2025, 1653, 2026, 1653, 2061, 1653,
+ /* 2280 */ 1653, 312, 2027, 646, 2029, 2030, 641, 1653, 636, 2044,
+ /* 2290 */ 1653, 1653, 1653, 1653, 1653, 1653, 1653, 643, 1653, 1653,
+ /* 2300 */ 1653, 1653, 1994, 1653, 642, 1653, 1653, 2044, 1653, 1653,
+ /* 2310 */ 1653, 1653, 1653, 1653, 1653, 643, 1653, 1653, 1653, 1653,
+ /* 2320 */ 1994, 1653, 642, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
+ /* 2330 */ 1653, 1653, 1653, 2025, 1653, 2026, 1653, 2061, 1653, 1653,
+ /* 2340 */ 321, 2027, 646, 2029, 2030, 641, 1653, 636, 1653, 1653,
+ /* 2350 */ 1653, 2025, 1653, 1653, 2026, 2061, 1653, 1653, 313, 2027,
+ /* 2360 */ 646, 2029, 2030, 641, 1653, 636, 2044, 1653, 1653, 1653,
+ /* 2370 */ 1653, 1653, 1653, 1653, 643, 1653, 1653, 1653, 1653, 1994,
+ /* 2380 */ 1653, 642, 1653, 1653, 1653, 2044, 1653, 1653, 1653, 1653,
+ /* 2390 */ 1653, 1653, 1653, 643, 1653, 1653, 1653, 1653, 1994, 1653,
+ /* 2400 */ 642, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
+ /* 2410 */ 2025, 1653, 1653, 2026, 2061, 1653, 1653, 326, 2027, 646,
+ /* 2420 */ 2029, 2030, 641, 1653, 636, 1653, 1653, 1653, 1653, 2025,
+ /* 2430 */ 1653, 2026, 1653, 2061, 1653, 1653, 327, 2027, 646, 2029,
+ /* 2440 */ 2030, 641, 1653, 636, 2044, 1653, 1653, 1653, 1653, 1653,
+ /* 2450 */ 1653, 1653, 643, 1653, 1653, 1653, 1653, 1994, 1653, 642,
+ /* 2460 */ 1653, 1653, 2044, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
+ /* 2470 */ 643, 1653, 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653,
+ /* 2480 */ 2026, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 2025, 1653,
+ /* 2490 */ 1653, 1653, 2061, 1653, 1653, 2038, 2027, 646, 2029, 2030,
+ /* 2500 */ 641, 2026, 636, 1653, 1653, 1653, 2025, 1653, 1653, 1653,
+ /* 2510 */ 2061, 2044, 1653, 2037, 2027, 646, 2029, 2030, 641, 643,
+ /* 2520 */ 636, 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, 2026,
+ /* 2530 */ 1653, 1653, 2044, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
+ /* 2540 */ 643, 1653, 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653,
+ /* 2550 */ 2026, 1653, 1653, 1653, 1653, 2025, 1653, 1653, 1653, 2061,
+ /* 2560 */ 2044, 1653, 2036, 2027, 646, 2029, 2030, 641, 643, 636,
+ /* 2570 */ 1653, 1653, 1653, 1994, 1653, 642, 2025, 1653, 1653, 1653,
+ /* 2580 */ 2061, 2044, 1653, 339, 2027, 646, 2029, 2030, 641, 643,
+ /* 2590 */ 636, 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, 1653,
+ /* 2600 */ 1653, 1653, 1653, 1653, 2025, 1653, 1653, 1653, 2061, 1653,
+ /* 2610 */ 1653, 340, 2027, 646, 2029, 2030, 641, 1653, 636, 2026,
+ /* 2620 */ 1653, 1653, 1653, 1653, 1653, 2025, 1653, 1653, 1653, 2061,
+ /* 2630 */ 1653, 1653, 336, 2027, 646, 2029, 2030, 641, 1653, 636,
+ /* 2640 */ 1653, 1653, 1653, 1653, 1653, 2026, 1653, 1653, 1653, 1653,
+ /* 2650 */ 2044, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 643, 1653,
+ /* 2660 */ 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, 1653, 1653,
+ /* 2670 */ 1653, 1653, 1653, 1653, 1653, 1653, 2044, 1653, 1653, 1653,
+ /* 2680 */ 1653, 1653, 1653, 1653, 643, 1653, 1653, 1653, 1653, 1994,
+ /* 2690 */ 1653, 642, 1653, 1653, 2025, 1653, 1653, 1653, 2061, 1653,
+ /* 2700 */ 1653, 341, 2027, 646, 2029, 2030, 641, 1653, 636, 2026,
+ /* 2710 */ 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
+ /* 2720 */ 644, 1653, 1653, 1653, 2061, 1653, 1653, 318, 2027, 646,
+ /* 2730 */ 2029, 2030, 641, 1653, 636, 1653, 1653, 1653, 1653, 1653,
+ /* 2740 */ 2044, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 643, 1653,
+ /* 2750 */ 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, 1653, 1653,
+ /* 2760 */ 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
+ /* 2770 */ 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653,
+ /* 2780 */ 1653, 1653, 1653, 1653, 2025, 1653, 1653, 1653, 2061, 1653,
+ /* 2790 */ 1653, 317, 2027, 646, 2029, 2030, 641, 1653, 636,
};
static const YYCODETYPE yy_lookahead[] = {
- /* 0 */ 420, 436, 375, 423, 333, 440, 335, 336, 362, 425,
- /* 10 */ 426, 344, 12, 13, 14, 352, 349, 390, 391, 373,
- /* 20 */ 20, 456, 22, 360, 360, 460, 461, 4, 329, 360,
- /* 30 */ 367, 367, 369, 33, 409, 35, 367, 436, 14, 376,
- /* 40 */ 376, 440, 8, 9, 20, 376, 12, 13, 14, 15,
- /* 50 */ 16, 0, 406, 407, 408, 337, 455, 456, 58, 360,
- /* 60 */ 435, 460, 461, 417, 64, 20, 43, 368, 45, 46,
- /* 70 */ 20, 71, 373, 37, 375, 24, 25, 26, 27, 28,
- /* 80 */ 29, 30, 31, 32, 12, 13, 368, 12, 13, 14,
- /* 90 */ 15, 16, 20, 328, 22, 330, 96, 14, 64, 20,
- /* 100 */ 436, 337, 403, 20, 440, 33, 407, 35, 20, 410,
- /* 110 */ 411, 412, 413, 414, 415, 351, 417, 35, 118, 455,
- /* 120 */ 456, 422, 436, 424, 460, 461, 440, 428, 429, 96,
- /* 130 */ 58, 20, 368, 133, 134, 99, 64, 101, 102, 105,
- /* 140 */ 104, 442, 456, 71, 108, 375, 460, 461, 343, 450,
- /* 150 */ 432, 433, 434, 71, 436, 437, 362, 387, 440, 22,
- /* 160 */ 390, 391, 357, 163, 164, 20, 130, 373, 96, 169,
- /* 170 */ 170, 366, 35, 455, 456, 96, 374, 375, 460, 461,
- /* 180 */ 66, 67, 68, 421, 184, 423, 186, 163, 74, 75,
- /* 190 */ 118, 4, 333, 79, 335, 336, 162, 96, 84, 85,
- /* 200 */ 406, 407, 408, 35, 90, 133, 134, 96, 71, 209,
- /* 210 */ 210, 417, 212, 213, 214, 215, 216, 217, 218, 219,
+ /* 0 */ 328, 352, 330, 337, 333, 337, 335, 336, 421, 360,
+ /* 10 */ 4, 424, 12, 13, 14, 361, 367, 2, 369, 351,
+ /* 20 */ 20, 362, 22, 8, 9, 376, 358, 12, 13, 14,
+ /* 30 */ 15, 16, 373, 33, 368, 35, 368, 329, 20, 20,
+ /* 40 */ 22, 362, 8, 9, 392, 20, 12, 13, 14, 15,
+ /* 50 */ 16, 337, 373, 35, 410, 8, 9, 360, 58, 12,
+ /* 60 */ 13, 14, 15, 16, 64, 351, 407, 408, 360, 51,
+ /* 70 */ 371, 71, 326, 374, 375, 337, 368, 418, 381, 382,
+ /* 80 */ 436, 373, 368, 375, 12, 13, 407, 408, 409, 437,
+ /* 90 */ 20, 58, 20, 441, 22, 375, 96, 418, 64, 433,
+ /* 100 */ 434, 435, 96, 437, 438, 33, 368, 35, 456, 457,
+ /* 110 */ 390, 391, 404, 461, 462, 96, 408, 63, 118, 411,
+ /* 120 */ 412, 413, 414, 415, 416, 417, 418, 419, 420, 96,
+ /* 130 */ 58, 98, 3, 133, 134, 20, 64, 334, 392, 105,
+ /* 140 */ 337, 338, 396, 71, 97, 109, 110, 111, 112, 113,
+ /* 150 */ 114, 115, 116, 117, 118, 119, 360, 121, 122, 123,
+ /* 160 */ 124, 125, 126, 163, 164, 375, 96, 20, 96, 169,
+ /* 170 */ 170, 433, 434, 435, 343, 437, 438, 387, 382, 441,
+ /* 180 */ 390, 391, 63, 437, 184, 360, 186, 441, 357, 333,
+ /* 190 */ 118, 335, 336, 368, 456, 457, 162, 366, 96, 461,
+ /* 200 */ 462, 35, 456, 457, 96, 133, 134, 461, 462, 209,
+ /* 210 */ 210, 96, 212, 213, 214, 215, 216, 217, 218, 219,
/* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
- /* 230 */ 20, 168, 22, 63, 371, 163, 164, 374, 375, 127,
- /* 240 */ 128, 169, 170, 21, 132, 35, 24, 25, 26, 27,
- /* 250 */ 28, 29, 30, 31, 32, 118, 184, 20, 186, 8,
- /* 260 */ 9, 51, 356, 12, 13, 14, 15, 16, 234, 235,
- /* 270 */ 236, 237, 238, 239, 240, 241, 242, 243, 244, 20,
- /* 280 */ 247, 209, 210, 96, 212, 213, 214, 215, 216, 217,
+ /* 230 */ 12, 13, 14, 15, 16, 163, 164, 71, 413, 107,
+ /* 240 */ 21, 169, 170, 24, 25, 26, 27, 28, 29, 30,
+ /* 250 */ 31, 32, 20, 247, 22, 128, 184, 20, 186, 8,
+ /* 260 */ 9, 20, 337, 12, 13, 14, 15, 16, 234, 235,
+ /* 270 */ 236, 237, 238, 239, 240, 241, 242, 243, 244, 337,
+ /* 280 */ 247, 209, 210, 51, 212, 213, 214, 215, 216, 217,
/* 290 */ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
- /* 300 */ 228, 229, 326, 231, 12, 13, 0, 401, 163, 164,
- /* 310 */ 20, 20, 20, 329, 22, 252, 253, 254, 337, 4,
- /* 320 */ 329, 184, 231, 186, 233, 33, 247, 35, 109, 110,
- /* 330 */ 111, 112, 113, 114, 115, 116, 117, 118, 119, 337,
- /* 340 */ 121, 122, 123, 124, 125, 126, 209, 210, 247, 409,
- /* 350 */ 58, 360, 337, 351, 186, 360, 64, 373, 247, 368,
- /* 360 */ 358, 63, 367, 71, 373, 384, 375, 386, 392, 359,
- /* 370 */ 368, 376, 66, 67, 68, 435, 12, 13, 14, 20,
- /* 380 */ 74, 75, 372, 368, 20, 79, 22, 96, 96, 368,
- /* 390 */ 84, 85, 133, 134, 403, 341, 90, 33, 407, 35,
- /* 400 */ 379, 410, 411, 412, 413, 414, 415, 337, 417, 355,
- /* 410 */ 118, 420, 436, 422, 423, 424, 440, 363, 33, 428,
- /* 420 */ 429, 351, 58, 133, 134, 133, 134, 176, 169, 170,
- /* 430 */ 343, 455, 456, 48, 247, 71, 460, 461, 368, 54,
- /* 440 */ 55, 56, 57, 58, 21, 360, 431, 432, 433, 434,
- /* 450 */ 337, 436, 437, 366, 337, 163, 164, 34, 360, 36,
- /* 460 */ 96, 169, 170, 0, 351, 8, 9, 382, 351, 12,
- /* 470 */ 13, 14, 15, 16, 376, 358, 184, 20, 186, 107,
- /* 480 */ 95, 368, 118, 98, 21, 368, 0, 24, 25, 26,
- /* 490 */ 27, 28, 29, 30, 31, 32, 334, 133, 134, 337,
- /* 500 */ 338, 209, 210, 360, 212, 213, 214, 215, 216, 217,
+ /* 300 */ 228, 229, 377, 231, 12, 13, 19, 337, 33, 0,
+ /* 310 */ 163, 164, 20, 127, 22, 179, 209, 247, 191, 192,
+ /* 320 */ 33, 20, 195, 48, 197, 33, 384, 35, 386, 54,
+ /* 330 */ 55, 56, 57, 58, 337, 48, 200, 201, 368, 0,
+ /* 340 */ 14, 54, 55, 56, 57, 58, 20, 392, 20, 247,
+ /* 350 */ 58, 396, 4, 8, 9, 247, 64, 12, 13, 14,
+ /* 360 */ 15, 16, 247, 71, 392, 258, 259, 260, 261, 262,
+ /* 370 */ 95, 0, 63, 98, 133, 134, 12, 13, 14, 193,
+ /* 380 */ 194, 384, 95, 386, 20, 98, 22, 370, 96, 44,
+ /* 390 */ 373, 43, 437, 45, 46, 266, 441, 33, 410, 35,
+ /* 400 */ 337, 337, 432, 433, 434, 435, 329, 437, 438, 437,
+ /* 410 */ 118, 456, 457, 441, 351, 351, 461, 462, 131, 437,
+ /* 420 */ 360, 358, 58, 441, 436, 133, 134, 176, 456, 457,
+ /* 430 */ 329, 368, 368, 461, 462, 71, 376, 360, 0, 457,
+ /* 440 */ 168, 166, 167, 461, 462, 368, 171, 108, 14, 174,
+ /* 450 */ 373, 35, 375, 166, 20, 163, 164, 360, 171, 437,
+ /* 460 */ 96, 169, 170, 441, 367, 190, 127, 128, 129, 130,
+ /* 470 */ 131, 132, 337, 376, 373, 188, 184, 190, 186, 457,
+ /* 480 */ 20, 404, 118, 461, 462, 408, 351, 71, 411, 412,
+ /* 490 */ 413, 414, 415, 416, 44, 418, 334, 133, 134, 337,
+ /* 500 */ 338, 209, 210, 368, 212, 213, 214, 215, 216, 217,
/* 510 */ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
- /* 520 */ 228, 229, 271, 108, 381, 382, 334, 163, 164, 337,
- /* 530 */ 338, 8, 9, 169, 170, 12, 13, 14, 15, 16,
- /* 540 */ 337, 352, 127, 128, 129, 130, 131, 132, 184, 360,
- /* 550 */ 186, 166, 167, 0, 351, 71, 171, 209, 369, 174,
- /* 560 */ 8, 9, 360, 248, 12, 13, 14, 15, 16, 20,
- /* 570 */ 368, 368, 337, 209, 210, 190, 212, 213, 214, 215,
+ /* 520 */ 228, 229, 271, 152, 252, 253, 254, 163, 164, 452,
+ /* 530 */ 453, 0, 161, 169, 170, 426, 427, 8, 9, 231,
+ /* 540 */ 337, 12, 13, 14, 15, 16, 108, 97, 184, 20,
+ /* 550 */ 186, 359, 21, 0, 351, 24, 25, 26, 27, 28,
+ /* 560 */ 29, 30, 31, 32, 372, 127, 128, 129, 130, 131,
+ /* 570 */ 132, 368, 329, 209, 210, 20, 212, 213, 214, 215,
/* 580 */ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
- /* 590 */ 226, 227, 228, 229, 12, 13, 44, 4, 14, 15,
- /* 600 */ 16, 231, 20, 96, 22, 362, 258, 259, 260, 261,
- /* 610 */ 262, 3, 19, 337, 412, 33, 373, 35, 14, 384,
- /* 620 */ 97, 386, 165, 337, 20, 329, 33, 351, 20, 8,
- /* 630 */ 9, 337, 360, 12, 13, 14, 15, 16, 152, 367,
- /* 640 */ 58, 48, 409, 341, 368, 351, 53, 161, 376, 406,
- /* 650 */ 407, 58, 421, 71, 423, 58, 360, 128, 346, 347,
- /* 660 */ 417, 108, 368, 337, 368, 363, 12, 13, 435, 373,
- /* 670 */ 384, 375, 386, 329, 20, 392, 22, 351, 96, 0,
- /* 680 */ 127, 128, 129, 130, 131, 132, 362, 33, 95, 35,
- /* 690 */ 183, 98, 185, 96, 368, 98, 329, 373, 127, 403,
- /* 700 */ 118, 22, 20, 407, 22, 97, 410, 411, 412, 413,
- /* 710 */ 414, 415, 58, 417, 165, 133, 134, 373, 97, 436,
- /* 720 */ 191, 192, 44, 440, 195, 71, 197, 360, 346, 347,
- /* 730 */ 406, 407, 107, 51, 353, 368, 179, 356, 455, 456,
- /* 740 */ 373, 417, 375, 460, 461, 163, 164, 451, 452, 2,
- /* 750 */ 96, 169, 170, 58, 247, 8, 9, 200, 201, 12,
- /* 760 */ 13, 14, 15, 16, 193, 194, 184, 163, 186, 162,
- /* 770 */ 403, 0, 118, 165, 407, 97, 337, 410, 411, 412,
- /* 780 */ 413, 414, 415, 416, 417, 418, 419, 133, 134, 0,
- /* 790 */ 95, 209, 210, 98, 212, 213, 214, 215, 216, 217,
+ /* 590 */ 226, 227, 228, 229, 12, 13, 58, 163, 337, 343,
+ /* 600 */ 392, 71, 20, 360, 22, 71, 437, 360, 344, 107,
+ /* 610 */ 441, 368, 351, 349, 367, 33, 373, 35, 375, 66,
+ /* 620 */ 67, 68, 366, 376, 3, 456, 457, 74, 75, 368,
+ /* 630 */ 461, 462, 79, 95, 410, 362, 98, 84, 85, 362,
+ /* 640 */ 58, 20, 329, 90, 329, 437, 373, 404, 337, 441,
+ /* 650 */ 373, 408, 368, 71, 411, 412, 413, 414, 415, 416,
+ /* 660 */ 436, 418, 351, 379, 456, 457, 12, 13, 425, 461,
+ /* 670 */ 462, 341, 429, 430, 20, 360, 22, 0, 96, 368,
+ /* 680 */ 407, 408, 409, 368, 407, 408, 373, 33, 373, 35,
+ /* 690 */ 375, 418, 337, 363, 165, 418, 14, 15, 16, 341,
+ /* 700 */ 118, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ /* 710 */ 165, 162, 58, 355, 0, 133, 134, 172, 97, 404,
+ /* 720 */ 165, 363, 96, 408, 337, 71, 411, 412, 413, 414,
+ /* 730 */ 415, 416, 106, 418, 21, 66, 67, 68, 351, 384,
+ /* 740 */ 361, 386, 337, 74, 75, 163, 164, 34, 79, 36,
+ /* 750 */ 96, 169, 170, 84, 85, 368, 351, 8, 9, 90,
+ /* 760 */ 360, 12, 13, 14, 15, 16, 184, 367, 186, 1,
+ /* 770 */ 2, 368, 118, 368, 360, 329, 376, 63, 463, 464,
+ /* 780 */ 360, 367, 379, 234, 20, 329, 165, 133, 134, 369,
+ /* 790 */ 376, 209, 210, 244, 212, 213, 214, 215, 216, 217,
/* 800 */ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
- /* 810 */ 228, 229, 348, 18, 350, 20, 377, 163, 164, 48,
- /* 820 */ 2, 19, 27, 169, 170, 30, 8, 9, 33, 352,
- /* 830 */ 12, 13, 14, 15, 16, 33, 20, 360, 184, 0,
- /* 840 */ 186, 234, 329, 48, 247, 50, 369, 329, 53, 71,
- /* 850 */ 48, 244, 63, 39, 329, 329, 54, 55, 56, 57,
- /* 860 */ 58, 1, 2, 209, 210, 20, 212, 213, 214, 215,
+ /* 810 */ 228, 229, 361, 18, 329, 20, 329, 163, 164, 373,
+ /* 820 */ 2, 337, 27, 169, 170, 30, 8, 9, 33, 373,
+ /* 830 */ 12, 13, 14, 15, 16, 351, 4, 437, 184, 0,
+ /* 840 */ 186, 441, 352, 48, 361, 50, 97, 14, 53, 231,
+ /* 850 */ 360, 233, 368, 20, 356, 329, 456, 457, 373, 369,
+ /* 860 */ 373, 461, 462, 209, 210, 97, 212, 213, 214, 215,
/* 870 */ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
- /* 880 */ 226, 227, 228, 229, 370, 361, 373, 373, 8, 9,
- /* 890 */ 95, 373, 12, 13, 14, 15, 16, 95, 373, 373,
- /* 900 */ 98, 360, 107, 361, 80, 66, 67, 68, 69, 70,
- /* 910 */ 369, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ /* 880 */ 226, 227, 228, 229, 127, 128, 361, 8, 9, 132,
+ /* 890 */ 95, 12, 13, 14, 15, 16, 361, 133, 134, 373,
+ /* 900 */ 402, 37, 107, 346, 347, 66, 67, 68, 69, 70,
+ /* 910 */ 397, 72, 73, 74, 75, 76, 77, 78, 79, 80,
/* 920 */ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
- /* 930 */ 91, 92, 137, 131, 3, 140, 141, 142, 143, 144,
+ /* 930 */ 91, 92, 137, 169, 170, 140, 141, 142, 143, 144,
/* 940 */ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
- /* 950 */ 155, 156, 337, 158, 159, 160, 18, 97, 392, 20,
- /* 960 */ 392, 23, 138, 139, 337, 108, 351, 392, 166, 368,
- /* 970 */ 329, 35, 337, 171, 337, 37, 38, 0, 351, 41,
- /* 980 */ 379, 165, 337, 368, 0, 161, 351, 130, 351, 42,
- /* 990 */ 188, 44, 190, 329, 329, 368, 351, 59, 60, 61,
- /* 1000 */ 62, 360, 436, 368, 436, 368, 440, 71, 440, 368,
- /* 1010 */ 165, 436, 107, 368, 373, 440, 375, 329, 337, 0,
- /* 1020 */ 329, 455, 456, 455, 456, 360, 460, 461, 460, 461,
- /* 1030 */ 455, 456, 351, 368, 96, 460, 461, 373, 373, 329,
- /* 1040 */ 375, 22, 352, 337, 403, 165, 329, 63, 407, 368,
- /* 1050 */ 360, 410, 411, 412, 413, 414, 415, 351, 417, 369,
- /* 1060 */ 246, 373, 157, 422, 373, 424, 329, 44, 403, 428,
- /* 1070 */ 429, 44, 407, 135, 368, 410, 411, 412, 413, 414,
- /* 1080 */ 415, 329, 417, 373, 392, 108, 337, 337, 361, 424,
- /* 1090 */ 373, 450, 329, 337, 429, 329, 45, 46, 370, 337,
- /* 1100 */ 351, 373, 163, 361, 127, 128, 129, 130, 131, 132,
- /* 1110 */ 373, 368, 360, 351, 176, 177, 178, 368, 368, 181,
- /* 1120 */ 368, 42, 379, 44, 368, 373, 329, 375, 436, 329,
- /* 1130 */ 368, 361, 440, 329, 360, 329, 373, 199, 22, 373,
- /* 1140 */ 202, 367, 204, 205, 206, 207, 208, 455, 456, 396,
- /* 1150 */ 376, 35, 460, 461, 329, 403, 329, 35, 370, 407,
- /* 1160 */ 360, 373, 410, 411, 412, 413, 414, 415, 368, 417,
- /* 1170 */ 373, 245, 246, 373, 422, 375, 424, 373, 44, 373,
- /* 1180 */ 428, 429, 432, 433, 434, 247, 436, 437, 432, 433,
- /* 1190 */ 434, 439, 436, 437, 329, 337, 100, 266, 373, 103,
- /* 1200 */ 373, 165, 100, 403, 337, 103, 44, 407, 172, 351,
- /* 1210 */ 410, 411, 412, 413, 414, 415, 44, 417, 351, 0,
- /* 1220 */ 100, 58, 422, 103, 424, 360, 368, 100, 428, 429,
- /* 1230 */ 103, 97, 44, 368, 47, 368, 133, 134, 373, 439,
- /* 1240 */ 375, 22, 329, 44, 64, 44, 44, 8, 9, 44,
- /* 1250 */ 44, 12, 13, 14, 15, 16, 44, 1, 2, 97,
- /* 1260 */ 44, 98, 44, 361, 44, 44, 44, 361, 403, 97,
- /* 1270 */ 330, 349, 407, 360, 96, 410, 411, 412, 413, 414,
- /* 1280 */ 415, 368, 417, 96, 106, 97, 373, 422, 375, 424,
- /* 1290 */ 13, 268, 44, 428, 429, 44, 97, 270, 97, 97,
- /* 1300 */ 329, 383, 97, 97, 439, 44, 0, 13, 186, 97,
- /* 1310 */ 464, 339, 35, 97, 453, 97, 403, 97, 97, 97,
- /* 1320 */ 407, 447, 360, 410, 411, 412, 413, 414, 415, 35,
- /* 1330 */ 417, 360, 339, 12, 13, 422, 383, 424, 336, 368,
- /* 1340 */ 372, 428, 429, 22, 373, 97, 375, 383, 97, 438,
- /* 1350 */ 457, 430, 439, 441, 33, 49, 35, 249, 97, 405,
- /* 1360 */ 48, 404, 42, 182, 394, 380, 20, 380, 378, 383,
- /* 1370 */ 329, 162, 20, 378, 403, 337, 337, 380, 407, 58,
- /* 1380 */ 337, 410, 411, 412, 413, 414, 415, 378, 417, 209,
- /* 1390 */ 94, 345, 71, 422, 337, 424, 337, 337, 20, 428,
- /* 1400 */ 429, 360, 331, 329, 331, 20, 398, 343, 20, 368,
- /* 1410 */ 439, 343, 375, 20, 373, 338, 375, 20, 393, 343,
- /* 1420 */ 338, 343, 337, 343, 343, 52, 343, 340, 340, 331,
- /* 1430 */ 360, 337, 360, 198, 360, 360, 373, 331, 373, 118,
- /* 1440 */ 96, 189, 368, 257, 403, 400, 360, 373, 407, 375,
- /* 1450 */ 360, 410, 411, 412, 413, 414, 415, 360, 417, 360,
- /* 1460 */ 360, 360, 341, 402, 360, 360, 375, 398, 337, 341,
- /* 1470 */ 446, 256, 383, 263, 446, 383, 446, 403, 449, 175,
- /* 1480 */ 373, 407, 448, 373, 410, 411, 412, 413, 414, 415,
- /* 1490 */ 329, 417, 397, 452, 265, 445, 422, 388, 424, 388,
- /* 1500 */ 264, 443, 428, 429, 250, 184, 373, 186, 373, 272,
- /* 1510 */ 444, 269, 465, 459, 267, 246, 368, 405, 20, 337,
- /* 1520 */ 458, 360, 409, 338, 341, 341, 20, 386, 388, 368,
- /* 1530 */ 209, 210, 373, 373, 373, 388, 375, 373, 373, 373,
- /* 1540 */ 373, 167, 385, 222, 223, 224, 225, 226, 227, 228,
- /* 1550 */ 356, 96, 341, 427, 341, 329, 96, 368, 350, 364,
- /* 1560 */ 337, 36, 332, 373, 403, 341, 395, 399, 407, 331,
- /* 1570 */ 327, 410, 411, 412, 413, 414, 415, 0, 417, 354,
- /* 1580 */ 389, 389, 354, 422, 42, 424, 360, 354, 342, 428,
- /* 1590 */ 429, 0, 191, 0, 368, 0, 0, 35, 203, 373,
- /* 1600 */ 35, 375, 35, 329, 35, 203, 0, 35, 35, 203,
- /* 1610 */ 0, 203, 0, 35, 0, 0, 22, 35, 186, 184,
- /* 1620 */ 0, 0, 180, 179, 0, 0, 47, 0, 0, 403,
- /* 1630 */ 329, 0, 42, 407, 360, 0, 410, 411, 412, 413,
- /* 1640 */ 414, 415, 368, 417, 0, 0, 0, 373, 422, 375,
- /* 1650 */ 424, 0, 0, 0, 428, 429, 0, 152, 35, 0,
- /* 1660 */ 152, 360, 0, 0, 0, 0, 0, 0, 0, 368,
- /* 1670 */ 0, 0, 0, 0, 373, 42, 375, 403, 0, 0,
- /* 1680 */ 0, 407, 0, 0, 410, 411, 412, 413, 414, 415,
- /* 1690 */ 0, 417, 0, 0, 0, 0, 0, 0, 424, 22,
- /* 1700 */ 0, 0, 428, 429, 403, 0, 136, 0, 407, 329,
- /* 1710 */ 0, 410, 411, 412, 413, 414, 415, 0, 417, 58,
- /* 1720 */ 35, 0, 0, 0, 0, 424, 42, 58, 39, 428,
- /* 1730 */ 429, 44, 58, 329, 14, 47, 0, 0, 47, 0,
- /* 1740 */ 360, 14, 40, 39, 0, 47, 175, 39, 368, 0,
- /* 1750 */ 0, 65, 0, 373, 0, 375, 0, 48, 39, 48,
- /* 1760 */ 35, 35, 0, 48, 360, 35, 0, 39, 39, 35,
- /* 1770 */ 39, 0, 368, 0, 0, 0, 35, 373, 0, 375,
- /* 1780 */ 48, 105, 22, 403, 103, 0, 35, 407, 35, 44,
- /* 1790 */ 410, 411, 412, 413, 414, 415, 35, 417, 35, 44,
- /* 1800 */ 0, 22, 35, 35, 424, 35, 22, 403, 428, 429,
- /* 1810 */ 0, 407, 22, 22, 410, 411, 412, 413, 414, 415,
- /* 1820 */ 0, 417, 50, 0, 35, 0, 329, 35, 35, 22,
- /* 1830 */ 35, 20, 35, 196, 0, 97, 96, 35, 96, 0,
- /* 1840 */ 22, 187, 0, 0, 3, 44, 230, 255, 251, 44,
- /* 1850 */ 44, 329, 44, 96, 251, 97, 97, 360, 3, 47,
- /* 1860 */ 96, 47, 251, 44, 35, 368, 462, 463, 165, 47,
- /* 1870 */ 373, 165, 375, 97, 97, 35, 96, 96, 165, 167,
- /* 1880 */ 97, 35, 360, 96, 35, 35, 35, 173, 172, 44,
- /* 1890 */ 368, 97, 96, 245, 47, 373, 97, 375, 0, 0,
- /* 1900 */ 403, 97, 0, 0, 407, 172, 39, 410, 411, 412,
- /* 1910 */ 413, 414, 415, 329, 417, 168, 47, 96, 0, 39,
- /* 1920 */ 96, 106, 47, 97, 97, 403, 96, 96, 96, 407,
- /* 1930 */ 44, 329, 410, 411, 412, 413, 414, 415, 2, 417,
- /* 1940 */ 96, 22, 47, 47, 360, 97, 22, 35, 166, 365,
- /* 1950 */ 232, 454, 368, 96, 96, 209, 97, 373, 96, 375,
- /* 1960 */ 97, 96, 360, 97, 35, 230, 96, 96, 107, 97,
- /* 1970 */ 368, 97, 96, 230, 35, 373, 97, 375, 96, 35,
- /* 1980 */ 211, 96, 35, 35, 97, 463, 96, 403, 97, 96,
- /* 1990 */ 22, 407, 108, 120, 410, 411, 412, 413, 414, 415,
- /* 2000 */ 96, 417, 96, 120, 329, 403, 44, 35, 120, 407,
- /* 2010 */ 96, 22, 410, 411, 412, 413, 414, 415, 65, 417,
- /* 2020 */ 120, 419, 35, 64, 93, 35, 35, 35, 329, 35,
- /* 2030 */ 35, 35, 35, 35, 35, 360, 71, 44, 35, 35,
- /* 2040 */ 365, 35, 22, 368, 35, 35, 35, 71, 373, 35,
- /* 2050 */ 375, 35, 35, 35, 35, 22, 35, 0, 35, 360,
- /* 2060 */ 48, 0, 35, 39, 365, 39, 0, 368, 39, 35,
- /* 2070 */ 0, 35, 373, 48, 375, 0, 48, 39, 403, 48,
- /* 2080 */ 35, 35, 407, 0, 22, 410, 411, 412, 413, 414,
- /* 2090 */ 415, 22, 417, 21, 329, 22, 466, 21, 20, 466,
- /* 2100 */ 466, 466, 403, 466, 466, 466, 407, 466, 466, 410,
- /* 2110 */ 411, 412, 413, 414, 415, 466, 417, 329, 466, 466,
- /* 2120 */ 466, 466, 466, 466, 466, 360, 466, 466, 466, 466,
- /* 2130 */ 466, 466, 466, 368, 466, 466, 466, 466, 373, 466,
- /* 2140 */ 375, 466, 466, 466, 466, 466, 466, 466, 360, 466,
- /* 2150 */ 466, 466, 466, 466, 466, 466, 368, 466, 466, 466,
- /* 2160 */ 466, 373, 466, 375, 466, 466, 466, 466, 403, 466,
- /* 2170 */ 466, 466, 407, 466, 466, 410, 411, 412, 413, 414,
- /* 2180 */ 415, 329, 417, 466, 466, 466, 466, 466, 466, 466,
- /* 2190 */ 466, 403, 466, 466, 466, 407, 466, 329, 410, 411,
- /* 2200 */ 412, 413, 414, 415, 466, 417, 466, 466, 466, 466,
- /* 2210 */ 466, 466, 360, 466, 466, 466, 466, 466, 466, 466,
- /* 2220 */ 368, 466, 466, 466, 466, 373, 466, 375, 360, 466,
- /* 2230 */ 466, 466, 466, 466, 466, 466, 368, 466, 466, 466,
- /* 2240 */ 466, 373, 466, 375, 466, 466, 466, 466, 466, 466,
- /* 2250 */ 466, 466, 466, 466, 466, 403, 466, 466, 466, 407,
- /* 2260 */ 466, 329, 410, 411, 412, 413, 414, 415, 466, 417,
- /* 2270 */ 466, 403, 466, 466, 466, 407, 466, 466, 410, 411,
- /* 2280 */ 412, 413, 414, 415, 466, 417, 466, 329, 466, 466,
- /* 2290 */ 466, 466, 360, 466, 466, 466, 466, 466, 466, 466,
- /* 2300 */ 368, 466, 466, 466, 466, 373, 466, 375, 466, 466,
- /* 2310 */ 466, 466, 466, 466, 466, 466, 466, 466, 360, 466,
- /* 2320 */ 466, 466, 466, 466, 466, 466, 368, 466, 466, 466,
- /* 2330 */ 466, 373, 466, 375, 466, 403, 466, 466, 466, 407,
- /* 2340 */ 466, 466, 410, 411, 412, 413, 414, 415, 466, 417,
- /* 2350 */ 466, 329, 466, 466, 466, 466, 466, 466, 466, 466,
- /* 2360 */ 466, 403, 466, 466, 466, 407, 466, 466, 410, 411,
- /* 2370 */ 412, 413, 414, 415, 466, 417, 466, 466, 329, 466,
- /* 2380 */ 466, 466, 360, 466, 466, 466, 466, 466, 466, 466,
- /* 2390 */ 368, 466, 466, 466, 466, 373, 466, 375, 466, 466,
- /* 2400 */ 466, 466, 466, 466, 466, 466, 466, 466, 466, 360,
- /* 2410 */ 466, 466, 466, 466, 466, 466, 466, 368, 466, 466,
- /* 2420 */ 466, 466, 373, 466, 375, 403, 466, 466, 466, 407,
- /* 2430 */ 466, 466, 410, 411, 412, 413, 414, 415, 466, 417,
- /* 2440 */ 329, 466, 466, 466, 466, 466, 466, 466, 466, 466,
- /* 2450 */ 466, 466, 403, 466, 466, 466, 407, 466, 466, 410,
- /* 2460 */ 411, 412, 413, 414, 415, 466, 417, 466, 466, 466,
- /* 2470 */ 466, 360, 466, 466, 466, 466, 466, 466, 466, 368,
- /* 2480 */ 466, 466, 466, 466, 373, 466, 375, 466, 466, 466,
- /* 2490 */ 466, 466, 466, 466, 466, 466, 466, 466, 329, 466,
- /* 2500 */ 466, 466, 466, 466, 466, 466, 466, 466, 466, 466,
- /* 2510 */ 466, 466, 466, 466, 403, 466, 466, 466, 407, 466,
- /* 2520 */ 466, 410, 411, 412, 413, 414, 415, 329, 417, 360,
- /* 2530 */ 466, 466, 466, 466, 466, 466, 466, 368, 466, 466,
- /* 2540 */ 466, 466, 373, 466, 375, 466, 466, 466, 466, 466,
- /* 2550 */ 466, 466, 466, 466, 466, 466, 466, 466, 360, 466,
- /* 2560 */ 466, 466, 466, 466, 466, 466, 368, 466, 466, 466,
- /* 2570 */ 466, 373, 403, 375, 466, 466, 407, 466, 466, 410,
- /* 2580 */ 411, 412, 413, 414, 415, 329, 417, 466, 466, 466,
- /* 2590 */ 466, 466, 466, 466, 466, 466, 466, 466, 466, 466,
- /* 2600 */ 466, 403, 466, 466, 466, 407, 466, 466, 410, 411,
- /* 2610 */ 412, 413, 414, 415, 466, 417, 360, 466, 466, 466,
- /* 2620 */ 466, 466, 466, 466, 368, 466, 466, 466, 466, 373,
- /* 2630 */ 466, 375, 466, 466, 466, 466, 466, 466, 466, 466,
- /* 2640 */ 466, 466, 466, 466, 466, 466, 466, 466, 329, 466,
- /* 2650 */ 466, 466, 466, 466, 466, 466, 466, 466, 466, 403,
- /* 2660 */ 466, 466, 466, 407, 466, 329, 410, 411, 412, 413,
- /* 2670 */ 414, 415, 466, 417, 466, 466, 466, 466, 466, 360,
- /* 2680 */ 466, 329, 466, 466, 466, 466, 466, 368, 466, 466,
- /* 2690 */ 466, 466, 373, 466, 375, 466, 360, 466, 466, 466,
- /* 2700 */ 466, 466, 466, 466, 368, 466, 466, 466, 466, 373,
- /* 2710 */ 466, 375, 360, 466, 466, 466, 466, 466, 466, 466,
- /* 2720 */ 368, 466, 403, 466, 466, 373, 407, 375, 466, 410,
- /* 2730 */ 411, 412, 413, 414, 415, 466, 417, 466, 466, 403,
- /* 2740 */ 466, 466, 466, 407, 466, 466, 410, 411, 412, 413,
- /* 2750 */ 414, 415, 329, 417, 466, 403, 466, 466, 466, 407,
- /* 2760 */ 466, 466, 410, 411, 412, 413, 414, 415, 466, 417,
- /* 2770 */ 329, 466, 466, 466, 466, 466, 466, 466, 466, 466,
- /* 2780 */ 466, 466, 466, 360, 466, 466, 466, 466, 466, 466,
- /* 2790 */ 466, 368, 466, 466, 466, 466, 373, 466, 375, 466,
- /* 2800 */ 466, 360, 466, 466, 466, 466, 466, 466, 466, 368,
- /* 2810 */ 466, 466, 466, 466, 373, 466, 375, 466, 466, 466,
- /* 2820 */ 466, 466, 466, 466, 466, 466, 403, 466, 329, 466,
- /* 2830 */ 407, 466, 466, 410, 411, 412, 413, 414, 415, 466,
- /* 2840 */ 417, 466, 466, 466, 403, 466, 466, 466, 407, 466,
- /* 2850 */ 466, 410, 411, 412, 413, 414, 415, 329, 417, 360,
- /* 2860 */ 466, 466, 466, 466, 466, 466, 466, 368, 466, 466,
- /* 2870 */ 466, 466, 373, 466, 375, 466, 466, 466, 466, 466,
- /* 2880 */ 466, 466, 466, 466, 466, 466, 466, 466, 360, 466,
- /* 2890 */ 466, 466, 466, 466, 466, 466, 368, 466, 466, 466,
- /* 2900 */ 466, 373, 403, 375, 466, 466, 407, 466, 466, 410,
- /* 2910 */ 411, 412, 413, 414, 415, 329, 417, 466, 466, 466,
- /* 2920 */ 466, 466, 466, 466, 466, 466, 466, 466, 466, 466,
- /* 2930 */ 466, 403, 466, 466, 466, 407, 466, 466, 410, 411,
- /* 2940 */ 412, 413, 414, 415, 466, 417, 360, 466, 466, 466,
- /* 2950 */ 466, 466, 466, 466, 368, 466, 466, 466, 466, 373,
- /* 2960 */ 466, 375, 466, 466, 466, 466, 466, 466, 466, 466,
- /* 2970 */ 466, 466, 466, 466, 466, 466, 466, 466, 329, 466,
- /* 2980 */ 466, 466, 466, 466, 466, 466, 466, 466, 466, 403,
- /* 2990 */ 466, 466, 466, 407, 466, 329, 410, 411, 412, 413,
- /* 3000 */ 414, 415, 466, 417, 466, 466, 466, 466, 466, 360,
- /* 3010 */ 466, 466, 466, 466, 466, 466, 466, 368, 466, 466,
- /* 3020 */ 466, 466, 373, 466, 375, 466, 360, 466, 466, 466,
- /* 3030 */ 466, 466, 466, 466, 368, 466, 466, 466, 466, 373,
- /* 3040 */ 466, 375, 466, 466, 466, 466, 466, 466, 466, 466,
- /* 3050 */ 466, 466, 403, 466, 466, 466, 407, 466, 466, 410,
- /* 3060 */ 411, 412, 413, 414, 415, 466, 417, 466, 466, 403,
- /* 3070 */ 466, 466, 466, 407, 466, 466, 410, 411, 412, 413,
- /* 3080 */ 414, 415, 466, 417,
+ /* 950 */ 155, 156, 20, 158, 159, 160, 18, 370, 392, 337,
+ /* 960 */ 373, 23, 329, 99, 22, 101, 102, 360, 104, 422,
+ /* 970 */ 329, 424, 108, 351, 367, 37, 38, 35, 44, 41,
+ /* 980 */ 329, 8, 9, 376, 39, 12, 13, 14, 15, 16,
+ /* 990 */ 368, 374, 375, 330, 130, 329, 163, 59, 60, 61,
+ /* 1000 */ 62, 360, 370, 437, 329, 373, 373, 441, 361, 368,
+ /* 1010 */ 337, 346, 347, 71, 373, 337, 375, 353, 329, 329,
+ /* 1020 */ 356, 329, 456, 457, 373, 329, 368, 461, 462, 351,
+ /* 1030 */ 329, 329, 349, 329, 96, 360, 80, 379, 329, 373,
+ /* 1040 */ 20, 368, 96, 368, 165, 404, 368, 337, 373, 408,
+ /* 1050 */ 375, 20, 411, 412, 413, 414, 415, 416, 329, 418,
+ /* 1060 */ 118, 351, 373, 373, 423, 373, 425, 44, 352, 373,
+ /* 1070 */ 429, 430, 107, 135, 373, 373, 360, 373, 368, 404,
+ /* 1080 */ 248, 329, 373, 408, 443, 369, 411, 412, 413, 414,
+ /* 1090 */ 415, 416, 451, 418, 138, 139, 421, 165, 423, 424,
+ /* 1100 */ 425, 422, 373, 424, 429, 430, 433, 434, 435, 383,
+ /* 1110 */ 437, 438, 360, 465, 176, 177, 178, 161, 44, 181,
+ /* 1120 */ 368, 348, 157, 350, 337, 373, 184, 375, 186, 183,
+ /* 1130 */ 329, 185, 45, 46, 42, 108, 44, 199, 351, 0,
+ /* 1140 */ 202, 35, 204, 205, 206, 207, 208, 454, 337, 245,
+ /* 1150 */ 246, 209, 210, 329, 208, 368, 404, 130, 337, 337,
+ /* 1160 */ 408, 360, 351, 411, 412, 413, 414, 415, 416, 368,
+ /* 1170 */ 418, 97, 351, 351, 373, 423, 375, 425, 352, 368,
+ /* 1180 */ 337, 429, 430, 163, 360, 247, 360, 48, 22, 368,
+ /* 1190 */ 368, 246, 368, 247, 351, 369, 165, 373, 42, 375,
+ /* 1200 */ 44, 35, 268, 451, 100, 404, 339, 103, 44, 408,
+ /* 1210 */ 47, 368, 411, 412, 413, 414, 415, 416, 100, 418,
+ /* 1220 */ 100, 103, 100, 103, 423, 103, 425, 44, 404, 64,
+ /* 1230 */ 429, 430, 408, 0, 0, 411, 412, 413, 414, 415,
+ /* 1240 */ 416, 440, 418, 329, 337, 0, 58, 423, 35, 425,
+ /* 1250 */ 12, 13, 448, 429, 430, 22, 22, 360, 351, 96,
+ /* 1260 */ 22, 97, 44, 44, 440, 0, 329, 22, 133, 134,
+ /* 1270 */ 44, 33, 339, 35, 360, 368, 1, 2, 383, 108,
+ /* 1280 */ 97, 372, 368, 44, 336, 44, 98, 373, 383, 375,
+ /* 1290 */ 439, 13, 186, 270, 44, 458, 58, 360, 127, 128,
+ /* 1300 */ 129, 130, 131, 132, 44, 368, 44, 431, 442, 71,
+ /* 1310 */ 373, 44, 375, 35, 49, 97, 97, 249, 404, 406,
+ /* 1320 */ 48, 405, 408, 97, 13, 411, 412, 413, 414, 415,
+ /* 1330 */ 416, 44, 418, 182, 329, 394, 97, 423, 97, 425,
+ /* 1340 */ 380, 404, 44, 429, 430, 408, 35, 97, 411, 412,
+ /* 1350 */ 413, 414, 415, 416, 440, 418, 118, 97, 42, 97,
+ /* 1360 */ 423, 4, 425, 20, 97, 360, 429, 430, 383, 380,
+ /* 1370 */ 162, 378, 20, 368, 209, 337, 19, 440, 373, 44,
+ /* 1380 */ 375, 337, 380, 44, 97, 378, 378, 337, 44, 44,
+ /* 1390 */ 33, 94, 345, 337, 329, 97, 337, 337, 20, 186,
+ /* 1400 */ 331, 331, 20, 399, 343, 48, 20, 375, 20, 404,
+ /* 1410 */ 53, 338, 20, 408, 343, 58, 411, 412, 413, 414,
+ /* 1420 */ 415, 416, 184, 418, 186, 360, 393, 343, 423, 338,
+ /* 1430 */ 425, 343, 97, 368, 429, 430, 97, 343, 373, 343,
+ /* 1440 */ 375, 97, 97, 343, 337, 440, 52, 209, 210, 340,
+ /* 1450 */ 340, 373, 95, 360, 331, 98, 337, 360, 360, 360,
+ /* 1460 */ 222, 223, 224, 225, 226, 227, 228, 329, 360, 404,
+ /* 1470 */ 403, 360, 360, 408, 360, 360, 411, 412, 413, 414,
+ /* 1480 */ 415, 416, 198, 418, 360, 360, 331, 96, 423, 373,
+ /* 1490 */ 425, 329, 189, 341, 429, 430, 401, 337, 360, 341,
+ /* 1500 */ 399, 398, 375, 373, 383, 257, 368, 256, 450, 383,
+ /* 1510 */ 447, 373, 263, 375, 373, 373, 388, 388, 373, 447,
+ /* 1520 */ 265, 175, 360, 447, 449, 446, 445, 264, 272, 250,
+ /* 1530 */ 368, 267, 466, 444, 246, 373, 459, 375, 406, 269,
+ /* 1540 */ 460, 368, 404, 20, 410, 338, 408, 337, 20, 411,
+ /* 1550 */ 412, 413, 414, 415, 416, 341, 418, 341, 329, 373,
+ /* 1560 */ 386, 423, 373, 425, 388, 373, 404, 429, 430, 373,
+ /* 1570 */ 408, 373, 388, 411, 412, 413, 414, 415, 416, 373,
+ /* 1580 */ 418, 329, 167, 341, 385, 423, 356, 425, 341, 360,
+ /* 1590 */ 368, 429, 430, 96, 96, 428, 364, 368, 373, 341,
+ /* 1600 */ 36, 332, 373, 350, 375, 337, 395, 331, 354, 400,
+ /* 1610 */ 389, 354, 360, 389, 0, 354, 342, 327, 0, 0,
+ /* 1620 */ 368, 42, 0, 35, 203, 373, 35, 375, 35, 35,
+ /* 1630 */ 203, 0, 35, 404, 35, 203, 0, 408, 203, 0,
+ /* 1640 */ 411, 412, 413, 414, 415, 416, 35, 418, 329, 0,
+ /* 1650 */ 22, 0, 35, 191, 425, 186, 404, 184, 429, 430,
+ /* 1660 */ 408, 0, 0, 411, 412, 413, 414, 415, 416, 0,
+ /* 1670 */ 418, 329, 180, 179, 0, 0, 47, 425, 0, 360,
+ /* 1680 */ 0, 429, 430, 0, 42, 0, 0, 368, 0, 0,
+ /* 1690 */ 0, 0, 373, 0, 375, 0, 152, 329, 35, 0,
+ /* 1700 */ 152, 0, 360, 0, 0, 0, 0, 0, 0, 0,
+ /* 1710 */ 368, 0, 0, 0, 0, 373, 0, 375, 0, 0,
+ /* 1720 */ 0, 42, 0, 404, 0, 0, 0, 408, 360, 0,
+ /* 1730 */ 411, 412, 413, 414, 415, 416, 368, 418, 0, 22,
+ /* 1740 */ 0, 373, 0, 375, 425, 0, 404, 0, 136, 430,
+ /* 1750 */ 408, 0, 0, 411, 412, 413, 414, 415, 416, 0,
+ /* 1760 */ 418, 0, 35, 329, 0, 0, 0, 44, 58, 14,
+ /* 1770 */ 42, 39, 404, 58, 14, 40, 408, 0, 47, 411,
+ /* 1780 */ 412, 413, 414, 415, 416, 0, 418, 39, 58, 0,
+ /* 1790 */ 329, 47, 39, 47, 360, 453, 175, 0, 0, 0,
+ /* 1800 */ 0, 65, 368, 35, 48, 0, 39, 373, 0, 375,
+ /* 1810 */ 35, 48, 39, 0, 35, 39, 0, 48, 35, 48,
+ /* 1820 */ 329, 360, 0, 455, 0, 39, 365, 0, 0, 368,
+ /* 1830 */ 35, 22, 0, 0, 373, 44, 375, 35, 404, 105,
+ /* 1840 */ 103, 35, 408, 0, 50, 411, 412, 413, 414, 415,
+ /* 1850 */ 416, 360, 418, 35, 35, 44, 35, 22, 35, 368,
+ /* 1860 */ 35, 22, 22, 0, 373, 404, 375, 22, 0, 408,
+ /* 1870 */ 20, 35, 411, 412, 413, 414, 415, 416, 0, 418,
+ /* 1880 */ 0, 329, 35, 35, 22, 97, 35, 0, 35, 96,
+ /* 1890 */ 196, 35, 96, 0, 22, 404, 0, 329, 464, 408,
+ /* 1900 */ 0, 3, 411, 412, 413, 414, 415, 416, 165, 418,
+ /* 1910 */ 44, 420, 360, 96, 165, 329, 251, 365, 44, 44,
+ /* 1920 */ 368, 255, 96, 165, 167, 373, 187, 375, 360, 47,
+ /* 1930 */ 230, 97, 47, 365, 97, 173, 368, 3, 97, 97,
+ /* 1940 */ 96, 373, 172, 375, 172, 96, 360, 44, 251, 44,
+ /* 1950 */ 96, 96, 35, 251, 368, 97, 404, 97, 35, 373,
+ /* 1960 */ 408, 375, 35, 411, 412, 413, 414, 415, 416, 47,
+ /* 1970 */ 418, 35, 404, 35, 329, 35, 408, 44, 97, 411,
+ /* 1980 */ 412, 413, 414, 415, 416, 97, 418, 0, 47, 0,
+ /* 1990 */ 404, 0, 0, 329, 408, 245, 39, 411, 412, 413,
+ /* 2000 */ 414, 415, 416, 96, 418, 360, 47, 96, 0, 97,
+ /* 2010 */ 97, 96, 96, 368, 168, 96, 39, 96, 373, 47,
+ /* 2020 */ 375, 2, 44, 166, 360, 22, 106, 96, 96, 209,
+ /* 2030 */ 47, 230, 368, 47, 97, 96, 232, 373, 96, 375,
+ /* 2040 */ 230, 97, 97, 97, 96, 22, 96, 35, 97, 404,
+ /* 2050 */ 107, 35, 96, 408, 22, 97, 411, 412, 413, 414,
+ /* 2060 */ 415, 416, 329, 418, 35, 96, 35, 97, 404, 96,
+ /* 2070 */ 211, 97, 408, 35, 35, 411, 412, 413, 414, 415,
+ /* 2080 */ 416, 96, 418, 329, 120, 97, 96, 120, 120, 108,
+ /* 2090 */ 96, 120, 44, 360, 96, 35, 96, 22, 65, 64,
+ /* 2100 */ 35, 368, 35, 35, 35, 35, 373, 35, 375, 35,
+ /* 2110 */ 93, 329, 35, 35, 360, 35, 71, 44, 35, 22,
+ /* 2120 */ 35, 35, 368, 35, 35, 35, 71, 373, 35, 375,
+ /* 2130 */ 35, 35, 329, 35, 35, 22, 35, 404, 0, 35,
+ /* 2140 */ 48, 408, 360, 0, 411, 412, 413, 414, 415, 416,
+ /* 2150 */ 368, 418, 35, 39, 48, 373, 0, 375, 404, 39,
+ /* 2160 */ 35, 39, 408, 360, 48, 411, 412, 413, 414, 415,
+ /* 2170 */ 416, 368, 418, 0, 35, 48, 373, 0, 375, 39,
+ /* 2180 */ 35, 329, 35, 0, 22, 21, 404, 22, 22, 21,
+ /* 2190 */ 408, 20, 467, 411, 412, 413, 414, 415, 416, 329,
+ /* 2200 */ 418, 467, 467, 467, 467, 467, 467, 404, 467, 467,
+ /* 2210 */ 467, 408, 360, 467, 411, 412, 413, 414, 415, 416,
+ /* 2220 */ 368, 418, 467, 467, 467, 373, 467, 375, 467, 467,
+ /* 2230 */ 360, 467, 467, 467, 467, 467, 467, 467, 368, 467,
+ /* 2240 */ 467, 467, 467, 373, 467, 375, 467, 467, 467, 467,
+ /* 2250 */ 467, 467, 467, 467, 467, 467, 404, 467, 329, 467,
+ /* 2260 */ 408, 467, 467, 411, 412, 413, 414, 415, 416, 467,
+ /* 2270 */ 418, 467, 467, 467, 404, 467, 329, 467, 408, 467,
+ /* 2280 */ 467, 411, 412, 413, 414, 415, 416, 467, 418, 360,
+ /* 2290 */ 467, 467, 467, 467, 467, 467, 467, 368, 467, 467,
+ /* 2300 */ 467, 467, 373, 467, 375, 467, 467, 360, 467, 467,
+ /* 2310 */ 467, 467, 467, 467, 467, 368, 467, 467, 467, 467,
+ /* 2320 */ 373, 467, 375, 467, 467, 467, 467, 467, 467, 467,
+ /* 2330 */ 467, 467, 467, 404, 467, 329, 467, 408, 467, 467,
+ /* 2340 */ 411, 412, 413, 414, 415, 416, 467, 418, 467, 467,
+ /* 2350 */ 467, 404, 467, 467, 329, 408, 467, 467, 411, 412,
+ /* 2360 */ 413, 414, 415, 416, 467, 418, 360, 467, 467, 467,
+ /* 2370 */ 467, 467, 467, 467, 368, 467, 467, 467, 467, 373,
+ /* 2380 */ 467, 375, 467, 467, 467, 360, 467, 467, 467, 467,
+ /* 2390 */ 467, 467, 467, 368, 467, 467, 467, 467, 373, 467,
+ /* 2400 */ 375, 467, 467, 467, 467, 467, 467, 467, 467, 467,
+ /* 2410 */ 404, 467, 467, 329, 408, 467, 467, 411, 412, 413,
+ /* 2420 */ 414, 415, 416, 467, 418, 467, 467, 467, 467, 404,
+ /* 2430 */ 467, 329, 467, 408, 467, 467, 411, 412, 413, 414,
+ /* 2440 */ 415, 416, 467, 418, 360, 467, 467, 467, 467, 467,
+ /* 2450 */ 467, 467, 368, 467, 467, 467, 467, 373, 467, 375,
+ /* 2460 */ 467, 467, 360, 467, 467, 467, 467, 467, 467, 467,
+ /* 2470 */ 368, 467, 467, 467, 467, 373, 467, 375, 467, 467,
+ /* 2480 */ 329, 467, 467, 467, 467, 467, 467, 467, 404, 467,
+ /* 2490 */ 467, 467, 408, 467, 467, 411, 412, 413, 414, 415,
+ /* 2500 */ 416, 329, 418, 467, 467, 467, 404, 467, 467, 467,
+ /* 2510 */ 408, 360, 467, 411, 412, 413, 414, 415, 416, 368,
+ /* 2520 */ 418, 467, 467, 467, 373, 467, 375, 467, 467, 329,
+ /* 2530 */ 467, 467, 360, 467, 467, 467, 467, 467, 467, 467,
+ /* 2540 */ 368, 467, 467, 467, 467, 373, 467, 375, 467, 467,
+ /* 2550 */ 329, 467, 467, 467, 467, 404, 467, 467, 467, 408,
+ /* 2560 */ 360, 467, 411, 412, 413, 414, 415, 416, 368, 418,
+ /* 2570 */ 467, 467, 467, 373, 467, 375, 404, 467, 467, 467,
+ /* 2580 */ 408, 360, 467, 411, 412, 413, 414, 415, 416, 368,
+ /* 2590 */ 418, 467, 467, 467, 373, 467, 375, 467, 467, 467,
+ /* 2600 */ 467, 467, 467, 467, 404, 467, 467, 467, 408, 467,
+ /* 2610 */ 467, 411, 412, 413, 414, 415, 416, 467, 418, 329,
+ /* 2620 */ 467, 467, 467, 467, 467, 404, 467, 467, 467, 408,
+ /* 2630 */ 467, 467, 411, 412, 413, 414, 415, 416, 467, 418,
+ /* 2640 */ 467, 467, 467, 467, 467, 329, 467, 467, 467, 467,
+ /* 2650 */ 360, 467, 467, 467, 467, 467, 467, 467, 368, 467,
+ /* 2660 */ 467, 467, 467, 373, 467, 375, 467, 467, 467, 467,
+ /* 2670 */ 467, 467, 467, 467, 467, 467, 360, 467, 467, 467,
+ /* 2680 */ 467, 467, 467, 467, 368, 467, 467, 467, 467, 373,
+ /* 2690 */ 467, 375, 467, 467, 404, 467, 467, 467, 408, 467,
+ /* 2700 */ 467, 411, 412, 413, 414, 415, 416, 467, 418, 329,
+ /* 2710 */ 467, 467, 467, 467, 467, 467, 467, 467, 467, 467,
+ /* 2720 */ 404, 467, 467, 467, 408, 467, 467, 411, 412, 413,
+ /* 2730 */ 414, 415, 416, 467, 418, 467, 467, 467, 467, 467,
+ /* 2740 */ 360, 467, 467, 467, 467, 467, 467, 467, 368, 467,
+ /* 2750 */ 467, 467, 467, 373, 467, 375, 467, 467, 467, 467,
+ /* 2760 */ 467, 467, 467, 467, 467, 467, 467, 467, 467, 467,
+ /* 2770 */ 467, 467, 467, 467, 467, 467, 467, 467, 467, 467,
+ /* 2780 */ 467, 467, 467, 467, 404, 467, 467, 467, 408, 467,
+ /* 2790 */ 467, 411, 412, 413, 414, 415, 416, 467, 418,
};
#define YY_SHIFT_COUNT (736)
#define YY_SHIFT_MIN (0)
-#define YY_SHIFT_MAX (2083)
+#define YY_SHIFT_MAX (2183)
static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 938, 0, 72, 0, 292, 292, 292, 292, 292, 292,
/* 10 */ 292, 292, 292, 292, 292, 364, 582, 582, 654, 582,
/* 20 */ 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
/* 30 */ 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
- /* 40 */ 582, 582, 582, 582, 582, 582, 582, 582, 79, 111,
- /* 50 */ 291, 507, 597, 33, 101, 33, 291, 291, 1321, 1321,
- /* 60 */ 33, 1321, 1321, 187, 33, 45, 259, 50, 50, 259,
- /* 70 */ 23, 23, 145, 290, 83, 83, 50, 50, 50, 50,
- /* 80 */ 50, 50, 50, 88, 50, 50, 170, 45, 50, 50,
- /* 90 */ 237, 50, 45, 50, 88, 50, 88, 45, 50, 50,
- /* 100 */ 45, 50, 45, 45, 45, 50, 298, 795, 34, 34,
- /* 110 */ 222, 114, 137, 137, 137, 137, 137, 137, 137, 137,
- /* 120 */ 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
- /* 130 */ 137, 36, 608, 145, 290, 789, 82, 549, 549, 549,
- /* 140 */ 984, 91, 91, 82, 359, 359, 359, 372, 370, 45,
- /* 150 */ 484, 45, 484, 484, 625, 778, 219, 219, 219, 219,
- /* 160 */ 219, 219, 219, 219, 802, 463, 306, 457, 251, 348,
- /* 170 */ 210, 63, 24, 604, 682, 816, 1051, 857, 845, 926,
- /* 180 */ 814, 931, 926, 947, 315, 939, 1108, 1312, 1181, 1320,
- /* 190 */ 1346, 1320, 1209, 1352, 1352, 1320, 1209, 1209, 1352, 1296,
- /* 200 */ 1352, 1352, 1352, 1378, 1378, 1385, 170, 1388, 170, 1393,
- /* 210 */ 1397, 170, 1393, 170, 170, 170, 1352, 170, 1373, 1373,
- /* 220 */ 1378, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- /* 230 */ 45, 45, 1352, 1378, 484, 484, 1235, 1344, 1385, 298,
- /* 240 */ 1252, 1388, 298, 1352, 1346, 1346, 484, 1186, 1215, 484,
- /* 250 */ 1186, 1215, 484, 484, 45, 1210, 1304, 1186, 1229, 1236,
- /* 260 */ 1254, 1108, 1237, 1242, 1247, 1269, 359, 1498, 1352, 1393,
- /* 270 */ 298, 298, 1506, 1215, 484, 484, 484, 484, 484, 1215,
- /* 280 */ 484, 1374, 298, 625, 298, 359, 1455, 1460, 484, 778,
- /* 290 */ 1352, 298, 1525, 1378, 3084, 3084, 3084, 3084, 3084, 3084,
- /* 300 */ 3084, 3084, 3084, 839, 385, 51, 593, 523, 552, 621,
- /* 310 */ 553, 747, 818, 880, 977, 1239, 1239, 1239, 1239, 1239,
- /* 320 */ 1239, 1239, 1239, 1239, 415, 529, 75, 75, 824, 557,
- /* 330 */ 486, 695, 423, 571, 112, 112, 584, 860, 607, 584,
- /* 340 */ 584, 584, 678, 771, 1116, 1079, 905, 1096, 1102, 1120,
- /* 350 */ 1127, 679, 1019, 1219, 1134, 1162, 1163, 1172, 1188, 1103,
- /* 360 */ 1023, 1027, 1036, 1199, 1201, 1202, 1205, 1206, 1212, 1256,
- /* 370 */ 1216, 168, 1122, 1180, 1218, 1187, 1220, 1221, 1222, 1248,
- /* 380 */ 1251, 1261, 1178, 1277, 1294, 936, 1306, 1577, 1591, 1401,
- /* 390 */ 1593, 1595, 1542, 1596, 1562, 1395, 1565, 1567, 1569, 1402,
- /* 400 */ 1606, 1572, 1573, 1406, 1610, 1408, 1612, 1578, 1614, 1594,
- /* 410 */ 1615, 1582, 1432, 1435, 1620, 1621, 1442, 1444, 1624, 1625,
- /* 420 */ 1579, 1627, 1628, 1631, 1590, 1635, 1644, 1645, 1646, 1651,
- /* 430 */ 1652, 1653, 1656, 1505, 1623, 1659, 1508, 1662, 1663, 1664,
- /* 440 */ 1665, 1666, 1667, 1668, 1670, 1671, 1672, 1673, 1678, 1679,
- /* 450 */ 1680, 1682, 1683, 1633, 1690, 1692, 1693, 1694, 1695, 1696,
- /* 460 */ 1677, 1697, 1700, 1701, 1570, 1705, 1707, 1710, 1661, 1685,
- /* 470 */ 1717, 1669, 1721, 1674, 1722, 1723, 1684, 1689, 1687, 1688,
- /* 480 */ 1720, 1691, 1727, 1698, 1724, 1702, 1704, 1736, 1737, 1739,
- /* 490 */ 1708, 1571, 1744, 1749, 1750, 1686, 1752, 1754, 1725, 1709,
- /* 500 */ 1719, 1756, 1726, 1711, 1728, 1762, 1730, 1715, 1729, 1766,
- /* 510 */ 1734, 1732, 1731, 1771, 1773, 1774, 1775, 1676, 1681, 1741,
- /* 520 */ 1760, 1778, 1751, 1753, 1761, 1763, 1745, 1755, 1767, 1768,
- /* 530 */ 1779, 1770, 1785, 1784, 1800, 1790, 1772, 1810, 1791, 1789,
- /* 540 */ 1820, 1792, 1823, 1793, 1825, 1807, 1811, 1795, 1797, 1637,
- /* 550 */ 1738, 1740, 1834, 1703, 1742, 1802, 1839, 1654, 1818, 1706,
- /* 560 */ 1712, 1842, 1843, 1713, 1714, 1841, 1801, 1597, 1757, 1758,
- /* 570 */ 1764, 1716, 1616, 1733, 1592, 1759, 1805, 1776, 1780, 1781,
- /* 580 */ 1787, 1777, 1806, 1812, 1814, 1796, 1808, 1603, 1783, 1794,
- /* 590 */ 1855, 1819, 1611, 1829, 1840, 1846, 1849, 1850, 1851, 1799,
- /* 600 */ 1804, 1822, 1648, 1845, 1847, 1898, 1899, 1902, 1903, 1821,
- /* 610 */ 1867, 1688, 1869, 1824, 1826, 1827, 1830, 1831, 1747, 1832,
- /* 620 */ 1918, 1880, 1782, 1844, 1815, 1688, 1875, 1886, 1735, 1718,
- /* 630 */ 1743, 1936, 1919, 1746, 1857, 1848, 1858, 1859, 1862, 1863,
- /* 640 */ 1895, 1865, 1870, 1896, 1866, 1924, 1769, 1871, 1861, 1872,
- /* 650 */ 1912, 1929, 1876, 1874, 1939, 1882, 1879, 1944, 1885, 1887,
- /* 660 */ 1947, 1890, 1891, 1948, 1893, 1873, 1883, 1888, 1900, 1968,
- /* 670 */ 1884, 1904, 1962, 1906, 1972, 1914, 1962, 1962, 1989, 1953,
- /* 680 */ 1959, 1987, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998,
- /* 690 */ 1999, 1965, 1931, 1993, 2003, 2004, 2006, 2020, 2009, 2010,
- /* 700 */ 2011, 1976, 1745, 2014, 1755, 2016, 2017, 2018, 2019, 2033,
- /* 710 */ 2021, 2057, 2023, 2012, 2024, 2061, 2027, 2025, 2026, 2066,
- /* 720 */ 2034, 2028, 2029, 2070, 2036, 2031, 2038, 2075, 2045, 2046,
- /* 730 */ 2083, 2062, 2072, 2069, 2073, 2076, 2078,
+ /* 40 */ 582, 582, 582, 582, 582, 582, 582, 582, 70, 115,
+ /* 50 */ 946, 19, 33, 102, 108, 102, 19, 19, 1238, 1238,
+ /* 60 */ 102, 1238, 1238, 6, 102, 25, 764, 237, 237, 764,
+ /* 70 */ 348, 348, 147, 241, 326, 326, 237, 237, 237, 237,
+ /* 80 */ 237, 237, 237, 301, 237, 237, 54, 25, 237, 237,
+ /* 90 */ 328, 237, 25, 237, 301, 237, 301, 25, 237, 237,
+ /* 100 */ 25, 237, 25, 25, 25, 237, 119, 795, 34, 34,
+ /* 110 */ 219, 669, 942, 942, 942, 942, 942, 942, 942, 942,
+ /* 120 */ 942, 942, 942, 942, 942, 942, 942, 942, 942, 942,
+ /* 130 */ 942, 864, 621, 147, 241, 309, 166, 555, 555, 555,
+ /* 140 */ 714, 618, 618, 166, 460, 460, 460, 132, 308, 25,
+ /* 150 */ 530, 25, 530, 530, 502, 534, 36, 36, 36, 36,
+ /* 160 */ 36, 36, 36, 36, 287, 531, 553, 529, 251, 107,
+ /* 170 */ 18, 272, 434, 833, 232, 932, 1087, 1027, 1031, 904,
+ /* 180 */ 945, 129, 904, 1092, 832, 1020, 1068, 1272, 1151, 1316,
+ /* 190 */ 1343, 1316, 1208, 1352, 1352, 1316, 1208, 1208, 1352, 1297,
+ /* 200 */ 1352, 1352, 1352, 1378, 1378, 1382, 54, 1386, 54, 1388,
+ /* 210 */ 1392, 54, 1388, 54, 54, 54, 1352, 54, 1394, 1394,
+ /* 220 */ 1378, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ /* 230 */ 25, 25, 1352, 1378, 530, 530, 1284, 1391, 1382, 119,
+ /* 240 */ 1303, 1386, 119, 1352, 1343, 1343, 530, 1248, 1251, 530,
+ /* 250 */ 1248, 1251, 530, 530, 25, 1249, 1346, 1248, 1255, 1263,
+ /* 260 */ 1279, 1068, 1256, 1270, 1264, 1288, 460, 1523, 1352, 1388,
+ /* 270 */ 119, 119, 1528, 1251, 530, 530, 530, 530, 530, 1251,
+ /* 280 */ 530, 1415, 119, 502, 119, 460, 1497, 1498, 530, 534,
+ /* 290 */ 1352, 119, 1564, 1378, 2799, 2799, 2799, 2799, 2799, 2799,
+ /* 300 */ 2799, 2799, 2799, 839, 275, 677, 1357, 47, 345, 749,
+ /* 310 */ 339, 15, 818, 879, 438, 973, 973, 973, 973, 973,
+ /* 320 */ 973, 973, 973, 973, 1171, 127, 218, 218, 956, 136,
+ /* 330 */ 371, 538, 713, 186, 757, 757, 682, 768, 549, 682,
+ /* 340 */ 682, 682, 1139, 450, 1166, 1156, 965, 1104, 1118, 1120,
+ /* 350 */ 1122, 1233, 1234, 1245, 1074, 1164, 1188, 1183, 1218, 1135,
+ /* 360 */ 934, 1023, 545, 1219, 1226, 1239, 1241, 1250, 1262, 1275,
+ /* 370 */ 1267, 1106, 1213, 1165, 1287, 1163, 1260, 1298, 1335, 1339,
+ /* 380 */ 1344, 1345, 626, 1278, 1311, 416, 1265, 1614, 1618, 1619,
+ /* 390 */ 1579, 1622, 1588, 1421, 1591, 1593, 1594, 1427, 1631, 1597,
+ /* 400 */ 1599, 1432, 1636, 1435, 1639, 1611, 1649, 1628, 1651, 1617,
+ /* 410 */ 1462, 1469, 1473, 1661, 1662, 1669, 1492, 1494, 1674, 1675,
+ /* 420 */ 1629, 1678, 1680, 1683, 1642, 1685, 1686, 1688, 1689, 1690,
+ /* 430 */ 1691, 1693, 1695, 1544, 1663, 1699, 1548, 1701, 1703, 1704,
+ /* 440 */ 1705, 1706, 1707, 1708, 1709, 1711, 1712, 1713, 1714, 1716,
+ /* 450 */ 1718, 1719, 1720, 1679, 1722, 1724, 1725, 1726, 1729, 1738,
+ /* 460 */ 1717, 1740, 1742, 1745, 1612, 1747, 1751, 1752, 1710, 1727,
+ /* 470 */ 1759, 1715, 1761, 1730, 1764, 1765, 1728, 1732, 1723, 1731,
+ /* 480 */ 1755, 1744, 1760, 1746, 1766, 1735, 1748, 1777, 1785, 1789,
+ /* 490 */ 1753, 1621, 1797, 1798, 1799, 1736, 1800, 1808, 1768, 1756,
+ /* 500 */ 1767, 1805, 1775, 1763, 1773, 1813, 1779, 1769, 1776, 1816,
+ /* 510 */ 1783, 1771, 1786, 1822, 1824, 1827, 1828, 1734, 1737, 1795,
+ /* 520 */ 1809, 1832, 1802, 1806, 1818, 1819, 1791, 1811, 1821, 1823,
+ /* 530 */ 1835, 1825, 1833, 1839, 1843, 1840, 1794, 1863, 1845, 1836,
+ /* 540 */ 1868, 1847, 1878, 1848, 1880, 1862, 1850, 1851, 1853, 1694,
+ /* 550 */ 1788, 1793, 1887, 1743, 1796, 1856, 1893, 1739, 1872, 1749,
+ /* 560 */ 1757, 1896, 1900, 1758, 1762, 1898, 1866, 1665, 1817, 1834,
+ /* 570 */ 1826, 1770, 1700, 1772, 1666, 1837, 1874, 1841, 1844, 1849,
+ /* 580 */ 1854, 1842, 1875, 1882, 1885, 1855, 1903, 1697, 1858, 1860,
+ /* 590 */ 1934, 1905, 1702, 1917, 1923, 1927, 1936, 1938, 1940, 1881,
+ /* 600 */ 1888, 1922, 1750, 1933, 1941, 1987, 1989, 1991, 1992, 1907,
+ /* 610 */ 1957, 1731, 1959, 1911, 1912, 1913, 1915, 1916, 1846, 1919,
+ /* 620 */ 2008, 1977, 1857, 1921, 1920, 1731, 1972, 1978, 1801, 1804,
+ /* 630 */ 1810, 2019, 2003, 1820, 1931, 1937, 1932, 1944, 1939, 1945,
+ /* 640 */ 1983, 1942, 1948, 1986, 1946, 2023, 1859, 1950, 1943, 1951,
+ /* 650 */ 2012, 2016, 1956, 1958, 2029, 1969, 1970, 2031, 1973, 1974,
+ /* 660 */ 2038, 1985, 1988, 2039, 1990, 1964, 1967, 1968, 1971, 2032,
+ /* 670 */ 1981, 1994, 2048, 1998, 2060, 2000, 2048, 2048, 2075, 2033,
+ /* 680 */ 2035, 2065, 2067, 2068, 2069, 2070, 2072, 2074, 2077, 2078,
+ /* 690 */ 2080, 2045, 2017, 2073, 2083, 2085, 2086, 2097, 2088, 2089,
+ /* 700 */ 2090, 2055, 1791, 2093, 1811, 2095, 2096, 2098, 2099, 2113,
+ /* 710 */ 2101, 2138, 2104, 2092, 2114, 2143, 2117, 2106, 2120, 2156,
+ /* 720 */ 2125, 2116, 2122, 2173, 2139, 2127, 2140, 2177, 2145, 2147,
+ /* 730 */ 2183, 2162, 2164, 2165, 2166, 2168, 2171,
};
#define YY_REDUCE_COUNT (302)
-#define YY_REDUCE_MIN (-435)
-#define YY_REDUCE_MAX (2666)
+#define YY_REDUCE_MIN (-413)
+#define YY_REDUCE_MAX (2380)
static const short yy_reduce_ofst[] = {
- /* 0 */ -24, -301, -9, 641, 752, 800, 865, 913, 971, 1074,
- /* 10 */ 1161, 1226, 1274, 1301, 1380, 367, 296, 1404, 665, 1041,
- /* 20 */ 1497, 1522, 1584, 1602, 1675, 1699, 1765, 1788, 1852, 1868,
- /* 30 */ 1932, 1958, 2022, 2049, 2111, 2169, 2198, 2256, 2319, 2336,
- /* 40 */ 2352, 2423, 2441, 2499, 2528, 2586, 2649, 2666, -282, -336,
- /* 50 */ 15, 283, 566, 568, 575, 692, 750, 756, -354, -206,
- /* 60 */ -399, 243, 324, -435, -314, -337, -230, 2, 117, -373,
- /* 70 */ -329, -141, 143, -137, 162, 192, -236, 70, 113, 203,
- /* 80 */ 276, 294, 326, -19, 627, 635, -195, -331, 637, 645,
- /* 90 */ 202, 615, -5, 681, 235, 706, 286, 189, 749, 762,
- /* 100 */ 272, 858, 477, 774, 690, 867, 54, 439, -416, -416,
- /* 110 */ -235, -333, -16, 344, 513, 518, 525, 526, 664, 688,
- /* 120 */ 691, 710, 717, 737, 763, 766, 797, 804, 806, 825,
- /* 130 */ 827, 10, -375, 85, -198, 87, 312, -375, -60, 233,
- /* 140 */ 302, -238, 231, 382, 21, 601, 743, -94, -420, 541,
- /* 150 */ 514, 98, 728, 788, 381, 464, 524, 542, 727, 742,
- /* 160 */ 770, 902, 906, 770, 753, 940, 922, 918, 846, 861,
- /* 170 */ 972, 874, 962, 962, 993, 953, 1002, 968, 964, 911,
- /* 180 */ 911, 893, 911, 921, 912, 962, 954, 957, 970, 985,
- /* 190 */ 986, 987, 990, 1038, 1039, 997, 995, 1009, 1043, 1046,
- /* 200 */ 1057, 1059, 1060, 1071, 1073, 1008, 1064, 1037, 1068, 1077,
- /* 210 */ 1025, 1076, 1082, 1078, 1080, 1081, 1085, 1083, 1087, 1088,
- /* 220 */ 1098, 1070, 1072, 1075, 1086, 1090, 1097, 1099, 1100, 1101,
- /* 230 */ 1104, 1105, 1094, 1106, 1063, 1065, 1061, 1045, 1069, 1121,
- /* 240 */ 1095, 1091, 1128, 1131, 1089, 1092, 1107, 1024, 1109, 1110,
- /* 250 */ 1028, 1111, 1133, 1135, 962, 1029, 1034, 1030, 1050, 1066,
- /* 260 */ 1058, 1112, 1047, 1054, 1062, 911, 1148, 1113, 1182, 1185,
- /* 270 */ 1183, 1184, 1141, 1140, 1159, 1160, 1164, 1165, 1166, 1147,
- /* 280 */ 1167, 1157, 1211, 1194, 1213, 1189, 1126, 1195, 1190, 1208,
- /* 290 */ 1223, 1224, 1230, 1238, 1171, 1168, 1191, 1192, 1225, 1228,
- /* 300 */ 1233, 1246, 1243,
+ /* 0 */ -254, 641, 675, 752, 801, 824, 914, 937, 1005, 1065,
+ /* 10 */ 1138, 1162, 243, 1229, 1252, -292, 77, 315, 1319, 1342,
+ /* 20 */ 1368, 1434, 1461, 1491, 1552, 1568, 1586, 1645, 1664, 1733,
+ /* 30 */ 1754, 1782, 1803, 1852, 1870, 1929, 1947, 2006, 2025, 2084,
+ /* 40 */ 2102, 2151, 2172, 2200, 2221, 2290, 2316, 2380, -262, 400,
+ /* 50 */ -45, -30, -348, -28, 208, 566, -334, 673, -321, 273,
+ /* 60 */ 169, -341, 277, -18, 22, -351, -210, -332, 63, -280,
+ /* 70 */ -329, -144, -303, -301, -197, 162, -286, 64, 135, 203,
+ /* 80 */ 261, 311, 387, -58, 405, 484, -169, 97, 622, 678,
+ /* 90 */ -175, 710, 247, 787, -3, 811, 355, 490, 821, 822,
+ /* 100 */ 414, 843, 716, 607, 826, 907, 358, -75, 109, 109,
+ /* 110 */ -328, 264, 101, 313, 446, 456, 485, 487, 526, 633,
+ /* 120 */ 651, 666, 689, 690, 692, 696, 701, 702, 704, 709,
+ /* 130 */ 729, 192, -356, -204, 617, 256, 557, -356, -12, 224,
+ /* 140 */ 330, 547, 679, 665, 284, 403, 658, 498, -413, 420,
+ /* 150 */ 17, 60, 587, 632, 664, 773, -346, 379, 451, 483,
+ /* 160 */ 525, 535, 647, 525, 513, 663, 683, 726, 648, 693,
+ /* 170 */ 867, 804, 897, 897, 933, 895, 948, 909, 905, 851,
+ /* 180 */ 851, 837, 851, 876, 866, 897, 913, 916, 941, 960,
+ /* 190 */ 985, 989, 993, 1038, 1044, 1002, 1007, 1008, 1050, 1047,
+ /* 200 */ 1056, 1059, 1060, 1069, 1070, 1004, 1061, 1032, 1071, 1073,
+ /* 210 */ 1033, 1084, 1091, 1088, 1094, 1096, 1107, 1100, 1109, 1110,
+ /* 220 */ 1123, 1093, 1097, 1098, 1099, 1108, 1111, 1112, 1114, 1115,
+ /* 230 */ 1124, 1125, 1119, 1155, 1078, 1116, 1067, 1095, 1101, 1152,
+ /* 240 */ 1103, 1127, 1158, 1160, 1121, 1126, 1130, 1063, 1128, 1141,
+ /* 250 */ 1072, 1129, 1142, 1145, 897, 1058, 1075, 1076, 1079, 1081,
+ /* 260 */ 1089, 1132, 1066, 1080, 1077, 851, 1173, 1134, 1210, 1207,
+ /* 270 */ 1214, 1216, 1174, 1176, 1186, 1189, 1192, 1196, 1198, 1184,
+ /* 280 */ 1206, 1199, 1242, 1230, 1247, 1222, 1167, 1232, 1225, 1253,
+ /* 290 */ 1268, 1258, 1269, 1276, 1211, 1209, 1221, 1224, 1254, 1257,
+ /* 300 */ 1261, 1274, 1290,
};
static const YYACTIONTYPE yy_default[] = {
- /* 0 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 10 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 20 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 30 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 40 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 50 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 60 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 70 */ 1647, 1647, 1905, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 80 */ 1647, 1647, 1647, 1647, 1647, 1647, 1726, 1647, 1647, 1647,
- /* 90 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 100 */ 1647, 1647, 1647, 1647, 1647, 1647, 1724, 1898, 2110, 1647,
- /* 110 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 120 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 130 */ 1647, 1647, 2122, 1647, 1647, 1726, 1647, 2122, 2122, 2122,
- /* 140 */ 1724, 2082, 2082, 1647, 1647, 1647, 1647, 1958, 1647, 1647,
- /* 150 */ 1647, 1647, 1647, 1647, 1833, 1647, 1647, 1647, 1647, 1647,
- /* 160 */ 1857, 1647, 1647, 1647, 1950, 1647, 1647, 2147, 2201, 1647,
- /* 170 */ 1647, 2150, 1647, 1647, 1647, 1910, 1647, 1786, 2137, 2114,
- /* 180 */ 2128, 2185, 2115, 2112, 2131, 1647, 2141, 1647, 1943, 1903,
- /* 190 */ 1647, 1903, 1900, 1647, 1647, 1903, 1900, 1900, 1647, 1777,
- /* 200 */ 1647, 1647, 1647, 1647, 1647, 1647, 1726, 1647, 1726, 1647,
- /* 210 */ 1647, 1726, 1647, 1726, 1726, 1726, 1647, 1726, 1704, 1704,
- /* 220 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 230 */ 1647, 1647, 1647, 1647, 1647, 1647, 1968, 1956, 1647, 1724,
- /* 240 */ 1952, 1647, 1724, 1647, 1647, 1647, 1647, 2158, 2156, 1647,
- /* 250 */ 2158, 2156, 1647, 1647, 1647, 2170, 2166, 2158, 2174, 2172,
- /* 260 */ 2143, 2141, 2204, 2191, 2187, 2128, 1647, 1647, 1647, 1647,
- /* 270 */ 1724, 1724, 1647, 2156, 1647, 1647, 1647, 1647, 1647, 2156,
- /* 280 */ 1647, 1647, 1724, 1647, 1724, 1647, 1647, 1802, 1647, 1647,
- /* 290 */ 1647, 1724, 1679, 1647, 1945, 1961, 1928, 1928, 1836, 1836,
- /* 300 */ 1836, 1727, 1652, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 310 */ 1647, 1647, 1647, 1647, 1647, 2169, 2168, 2037, 1647, 2086,
- /* 320 */ 2085, 2084, 2075, 2036, 1798, 1647, 2035, 2034, 1647, 1647,
- /* 330 */ 1647, 1647, 1647, 1647, 1919, 1918, 2028, 1647, 1647, 2029,
- /* 340 */ 2027, 2026, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 350 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 360 */ 2188, 2192, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 2111,
- /* 370 */ 1647, 1647, 1647, 1647, 1647, 2010, 1647, 1647, 1647, 1647,
- /* 380 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 390 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 400 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 410 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 420 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 430 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 440 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 450 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 460 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 470 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1684, 2015,
- /* 480 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 490 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 500 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 510 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 520 */ 1647, 1647, 1647, 1647, 1647, 1647, 1765, 1764, 1647, 1647,
- /* 530 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 540 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 550 */ 2019, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 560 */ 1647, 1647, 1647, 1647, 1647, 2184, 2144, 1647, 1647, 1647,
- /* 570 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 580 */ 1647, 1647, 1647, 1647, 2010, 1647, 2167, 1647, 1647, 2182,
- /* 590 */ 1647, 2186, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 2121,
- /* 600 */ 2117, 1647, 1647, 2113, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 610 */ 1647, 2018, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 620 */ 1647, 1647, 1647, 1647, 1647, 2009, 1647, 2072, 1647, 1647,
- /* 630 */ 1647, 2106, 1647, 1647, 2057, 1647, 1647, 1647, 1647, 1647,
- /* 640 */ 1647, 1647, 1647, 1647, 2019, 1647, 2022, 1647, 1647, 1647,
- /* 650 */ 1647, 1647, 1830, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 660 */ 1647, 1647, 1647, 1647, 1647, 1815, 1813, 1812, 1811, 1647,
- /* 670 */ 1808, 1647, 1843, 1647, 1647, 1647, 1839, 1838, 1647, 1647,
- /* 680 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 690 */ 1647, 1647, 1647, 1745, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 700 */ 1647, 1647, 1737, 1647, 1736, 1647, 1647, 1647, 1647, 1647,
- /* 710 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 720 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647,
- /* 730 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647,
+ /* 0 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 10 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 20 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 30 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 40 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 50 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 60 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 70 */ 1651, 1651, 1909, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 80 */ 1651, 1651, 1651, 1651, 1651, 1651, 1730, 1651, 1651, 1651,
+ /* 90 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 100 */ 1651, 1651, 1651, 1651, 1651, 1651, 1728, 1902, 2116, 1651,
+ /* 110 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 120 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 130 */ 1651, 1651, 2128, 1651, 1651, 1730, 1651, 2128, 2128, 2128,
+ /* 140 */ 1728, 2088, 2088, 1651, 1651, 1651, 1651, 1963, 1651, 1651,
+ /* 150 */ 1651, 1651, 1651, 1651, 1837, 1651, 1651, 1651, 1651, 1651,
+ /* 160 */ 1861, 1651, 1651, 1651, 1955, 1651, 1651, 2153, 2207, 1651,
+ /* 170 */ 1651, 2156, 1651, 1651, 1651, 1914, 1651, 1790, 2143, 2120,
+ /* 180 */ 2134, 2191, 2121, 2118, 2137, 1651, 2147, 1651, 1948, 1907,
+ /* 190 */ 1651, 1907, 1904, 1651, 1651, 1907, 1904, 1904, 1651, 1781,
+ /* 200 */ 1651, 1651, 1651, 1651, 1651, 1651, 1730, 1651, 1730, 1651,
+ /* 210 */ 1651, 1730, 1651, 1730, 1730, 1730, 1651, 1730, 1708, 1708,
+ /* 220 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 230 */ 1651, 1651, 1651, 1651, 1651, 1651, 1973, 1961, 1651, 1728,
+ /* 240 */ 1957, 1651, 1728, 1651, 1651, 1651, 1651, 2164, 2162, 1651,
+ /* 250 */ 2164, 2162, 1651, 1651, 1651, 2176, 2172, 2164, 2180, 2178,
+ /* 260 */ 2149, 2147, 2210, 2197, 2193, 2134, 1651, 1651, 1651, 1651,
+ /* 270 */ 1728, 1728, 1651, 2162, 1651, 1651, 1651, 1651, 1651, 2162,
+ /* 280 */ 1651, 1651, 1728, 1651, 1728, 1651, 1651, 1806, 1651, 1651,
+ /* 290 */ 1651, 1728, 1683, 1651, 1950, 1966, 1932, 1932, 1840, 1840,
+ /* 300 */ 1840, 1731, 1656, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 310 */ 1651, 1651, 1651, 1651, 1651, 2175, 2174, 2043, 1651, 2092,
+ /* 320 */ 2091, 2090, 2081, 2042, 1802, 1651, 2041, 2040, 1651, 1651,
+ /* 330 */ 1651, 1651, 1651, 1651, 1923, 1922, 2034, 1651, 1651, 2035,
+ /* 340 */ 2033, 2032, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 350 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 360 */ 2194, 2198, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 2117,
+ /* 370 */ 1651, 1651, 1651, 1651, 1651, 2016, 1651, 1651, 1651, 1651,
+ /* 380 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 390 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 400 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 410 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 420 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 430 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 440 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 450 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 460 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 470 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1688, 2021,
+ /* 480 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 490 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 500 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 510 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 520 */ 1651, 1651, 1651, 1651, 1651, 1651, 1769, 1768, 1651, 1651,
+ /* 530 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 540 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 550 */ 2025, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 560 */ 1651, 1651, 1651, 1651, 1651, 2190, 2150, 1651, 1651, 1651,
+ /* 570 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 580 */ 1651, 1651, 1651, 1651, 2016, 1651, 2173, 1651, 1651, 2188,
+ /* 590 */ 1651, 2192, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 2127,
+ /* 600 */ 2123, 1651, 1651, 2119, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 610 */ 1651, 2024, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 620 */ 1651, 1651, 1651, 1651, 1651, 2015, 1651, 2078, 1651, 1651,
+ /* 630 */ 1651, 2112, 1651, 1651, 2063, 1651, 1651, 1651, 1651, 1651,
+ /* 640 */ 1651, 1651, 1651, 1651, 2025, 1651, 2028, 1651, 1651, 1651,
+ /* 650 */ 1651, 1651, 1834, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 660 */ 1651, 1651, 1651, 1651, 1651, 1819, 1817, 1816, 1815, 1651,
+ /* 670 */ 1812, 1651, 1847, 1651, 1651, 1651, 1843, 1842, 1651, 1651,
+ /* 680 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 690 */ 1651, 1651, 1651, 1749, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 700 */ 1651, 1651, 1741, 1651, 1740, 1651, 1651, 1651, 1651, 1651,
+ /* 710 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 720 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651,
+ /* 730 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651,
};
/********** End of lemon-generated parsing tables *****************************/
@@ -1857,76 +1799,77 @@ static const char *const yyTokenName[] = {
/* 393 */ "cgroup_name",
/* 394 */ "analyze_opt",
/* 395 */ "explain_options",
- /* 396 */ "agg_func_opt",
- /* 397 */ "bufsize_opt",
- /* 398 */ "stream_name",
- /* 399 */ "stream_options",
- /* 400 */ "col_list_opt",
- /* 401 */ "tag_def_or_ref_opt",
- /* 402 */ "subtable_opt",
- /* 403 */ "expression",
- /* 404 */ "dnode_list",
- /* 405 */ "where_clause_opt",
- /* 406 */ "signed",
- /* 407 */ "literal_func",
- /* 408 */ "literal_list",
- /* 409 */ "table_alias",
- /* 410 */ "expr_or_subquery",
- /* 411 */ "pseudo_column",
- /* 412 */ "column_reference",
- /* 413 */ "function_expression",
- /* 414 */ "case_when_expression",
- /* 415 */ "star_func",
- /* 416 */ "star_func_para_list",
- /* 417 */ "noarg_func",
- /* 418 */ "other_para_list",
- /* 419 */ "star_func_para",
- /* 420 */ "when_then_list",
- /* 421 */ "case_when_else_opt",
- /* 422 */ "common_expression",
- /* 423 */ "when_then_expr",
- /* 424 */ "predicate",
- /* 425 */ "compare_op",
- /* 426 */ "in_op",
- /* 427 */ "in_predicate_value",
- /* 428 */ "boolean_value_expression",
- /* 429 */ "boolean_primary",
- /* 430 */ "from_clause_opt",
- /* 431 */ "table_reference_list",
- /* 432 */ "table_reference",
- /* 433 */ "table_primary",
- /* 434 */ "joined_table",
- /* 435 */ "alias_opt",
- /* 436 */ "subquery",
- /* 437 */ "parenthesized_joined_table",
- /* 438 */ "join_type",
- /* 439 */ "search_condition",
- /* 440 */ "query_specification",
- /* 441 */ "set_quantifier_opt",
- /* 442 */ "select_list",
- /* 443 */ "partition_by_clause_opt",
- /* 444 */ "range_opt",
- /* 445 */ "every_opt",
- /* 446 */ "fill_opt",
- /* 447 */ "twindow_clause_opt",
- /* 448 */ "group_by_clause_opt",
- /* 449 */ "having_clause_opt",
- /* 450 */ "select_item",
- /* 451 */ "partition_list",
- /* 452 */ "partition_item",
- /* 453 */ "fill_mode",
- /* 454 */ "group_by_list",
- /* 455 */ "query_expression",
- /* 456 */ "query_simple",
- /* 457 */ "order_by_clause_opt",
- /* 458 */ "slimit_clause_opt",
- /* 459 */ "limit_clause_opt",
- /* 460 */ "union_query_expression",
- /* 461 */ "query_simple_or_subquery",
- /* 462 */ "sort_specification_list",
- /* 463 */ "sort_specification",
- /* 464 */ "ordering_specification_opt",
- /* 465 */ "null_ordering_opt",
+ /* 396 */ "insert_query",
+ /* 397 */ "agg_func_opt",
+ /* 398 */ "bufsize_opt",
+ /* 399 */ "stream_name",
+ /* 400 */ "stream_options",
+ /* 401 */ "col_list_opt",
+ /* 402 */ "tag_def_or_ref_opt",
+ /* 403 */ "subtable_opt",
+ /* 404 */ "expression",
+ /* 405 */ "dnode_list",
+ /* 406 */ "where_clause_opt",
+ /* 407 */ "signed",
+ /* 408 */ "literal_func",
+ /* 409 */ "literal_list",
+ /* 410 */ "table_alias",
+ /* 411 */ "expr_or_subquery",
+ /* 412 */ "pseudo_column",
+ /* 413 */ "column_reference",
+ /* 414 */ "function_expression",
+ /* 415 */ "case_when_expression",
+ /* 416 */ "star_func",
+ /* 417 */ "star_func_para_list",
+ /* 418 */ "noarg_func",
+ /* 419 */ "other_para_list",
+ /* 420 */ "star_func_para",
+ /* 421 */ "when_then_list",
+ /* 422 */ "case_when_else_opt",
+ /* 423 */ "common_expression",
+ /* 424 */ "when_then_expr",
+ /* 425 */ "predicate",
+ /* 426 */ "compare_op",
+ /* 427 */ "in_op",
+ /* 428 */ "in_predicate_value",
+ /* 429 */ "boolean_value_expression",
+ /* 430 */ "boolean_primary",
+ /* 431 */ "from_clause_opt",
+ /* 432 */ "table_reference_list",
+ /* 433 */ "table_reference",
+ /* 434 */ "table_primary",
+ /* 435 */ "joined_table",
+ /* 436 */ "alias_opt",
+ /* 437 */ "subquery",
+ /* 438 */ "parenthesized_joined_table",
+ /* 439 */ "join_type",
+ /* 440 */ "search_condition",
+ /* 441 */ "query_specification",
+ /* 442 */ "set_quantifier_opt",
+ /* 443 */ "select_list",
+ /* 444 */ "partition_by_clause_opt",
+ /* 445 */ "range_opt",
+ /* 446 */ "every_opt",
+ /* 447 */ "fill_opt",
+ /* 448 */ "twindow_clause_opt",
+ /* 449 */ "group_by_clause_opt",
+ /* 450 */ "having_clause_opt",
+ /* 451 */ "select_item",
+ /* 452 */ "partition_list",
+ /* 453 */ "partition_item",
+ /* 454 */ "fill_mode",
+ /* 455 */ "group_by_list",
+ /* 456 */ "query_expression",
+ /* 457 */ "query_simple",
+ /* 458 */ "order_by_clause_opt",
+ /* 459 */ "slimit_clause_opt",
+ /* 460 */ "limit_clause_opt",
+ /* 461 */ "union_query_expression",
+ /* 462 */ "query_simple_or_subquery",
+ /* 463 */ "sort_specification_list",
+ /* 464 */ "sort_specification",
+ /* 465 */ "ordering_specification_opt",
+ /* 466 */ "null_ordering_opt",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
@@ -2227,270 +2170,272 @@ static const char *const yyRuleName[] = {
/* 290 */ "cmd ::= DESCRIBE full_table_name",
/* 291 */ "cmd ::= RESET QUERY CACHE",
/* 292 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery",
- /* 293 */ "analyze_opt ::=",
- /* 294 */ "analyze_opt ::= ANALYZE",
- /* 295 */ "explain_options ::=",
- /* 296 */ "explain_options ::= explain_options VERBOSE NK_BOOL",
- /* 297 */ "explain_options ::= explain_options RATIO NK_FLOAT",
- /* 298 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt",
- /* 299 */ "cmd ::= DROP FUNCTION exists_opt function_name",
- /* 300 */ "agg_func_opt ::=",
- /* 301 */ "agg_func_opt ::= AGGREGATE",
- /* 302 */ "bufsize_opt ::=",
- /* 303 */ "bufsize_opt ::= BUFSIZE NK_INTEGER",
- /* 304 */ "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",
- /* 305 */ "cmd ::= DROP STREAM exists_opt stream_name",
- /* 306 */ "col_list_opt ::=",
- /* 307 */ "col_list_opt ::= NK_LP col_name_list NK_RP",
- /* 308 */ "tag_def_or_ref_opt ::=",
- /* 309 */ "tag_def_or_ref_opt ::= tags_def",
- /* 310 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP",
- /* 311 */ "stream_options ::=",
- /* 312 */ "stream_options ::= stream_options TRIGGER AT_ONCE",
- /* 313 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE",
- /* 314 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal",
- /* 315 */ "stream_options ::= stream_options WATERMARK duration_literal",
- /* 316 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER",
- /* 317 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER",
- /* 318 */ "subtable_opt ::=",
- /* 319 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP",
- /* 320 */ "cmd ::= KILL CONNECTION NK_INTEGER",
- /* 321 */ "cmd ::= KILL QUERY NK_STRING",
- /* 322 */ "cmd ::= KILL TRANSACTION NK_INTEGER",
- /* 323 */ "cmd ::= BALANCE VGROUP",
- /* 324 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER",
- /* 325 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list",
- /* 326 */ "cmd ::= SPLIT VGROUP NK_INTEGER",
- /* 327 */ "dnode_list ::= DNODE NK_INTEGER",
- /* 328 */ "dnode_list ::= dnode_list DNODE NK_INTEGER",
- /* 329 */ "cmd ::= DELETE FROM full_table_name where_clause_opt",
- /* 330 */ "cmd ::= query_or_subquery",
- /* 331 */ "cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery",
- /* 332 */ "cmd ::= INSERT INTO full_table_name query_or_subquery",
- /* 333 */ "literal ::= NK_INTEGER",
- /* 334 */ "literal ::= NK_FLOAT",
- /* 335 */ "literal ::= NK_STRING",
- /* 336 */ "literal ::= NK_BOOL",
- /* 337 */ "literal ::= TIMESTAMP NK_STRING",
- /* 338 */ "literal ::= duration_literal",
- /* 339 */ "literal ::= NULL",
- /* 340 */ "literal ::= NK_QUESTION",
- /* 341 */ "duration_literal ::= NK_VARIABLE",
- /* 342 */ "signed ::= NK_INTEGER",
- /* 343 */ "signed ::= NK_PLUS NK_INTEGER",
- /* 344 */ "signed ::= NK_MINUS NK_INTEGER",
- /* 345 */ "signed ::= NK_FLOAT",
- /* 346 */ "signed ::= NK_PLUS NK_FLOAT",
- /* 347 */ "signed ::= NK_MINUS NK_FLOAT",
- /* 348 */ "signed_literal ::= signed",
- /* 349 */ "signed_literal ::= NK_STRING",
- /* 350 */ "signed_literal ::= NK_BOOL",
- /* 351 */ "signed_literal ::= TIMESTAMP NK_STRING",
- /* 352 */ "signed_literal ::= duration_literal",
- /* 353 */ "signed_literal ::= NULL",
- /* 354 */ "signed_literal ::= literal_func",
- /* 355 */ "signed_literal ::= NK_QUESTION",
- /* 356 */ "literal_list ::= signed_literal",
- /* 357 */ "literal_list ::= literal_list NK_COMMA signed_literal",
- /* 358 */ "db_name ::= NK_ID",
- /* 359 */ "table_name ::= NK_ID",
- /* 360 */ "column_name ::= NK_ID",
- /* 361 */ "function_name ::= NK_ID",
- /* 362 */ "table_alias ::= NK_ID",
- /* 363 */ "column_alias ::= NK_ID",
- /* 364 */ "user_name ::= NK_ID",
- /* 365 */ "topic_name ::= NK_ID",
- /* 366 */ "stream_name ::= NK_ID",
- /* 367 */ "cgroup_name ::= NK_ID",
- /* 368 */ "index_name ::= NK_ID",
- /* 369 */ "expr_or_subquery ::= expression",
- /* 370 */ "expression ::= literal",
- /* 371 */ "expression ::= pseudo_column",
- /* 372 */ "expression ::= column_reference",
- /* 373 */ "expression ::= function_expression",
- /* 374 */ "expression ::= case_when_expression",
- /* 375 */ "expression ::= NK_LP expression NK_RP",
- /* 376 */ "expression ::= NK_PLUS expr_or_subquery",
- /* 377 */ "expression ::= NK_MINUS expr_or_subquery",
- /* 378 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery",
- /* 379 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery",
- /* 380 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery",
- /* 381 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery",
- /* 382 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery",
- /* 383 */ "expression ::= column_reference NK_ARROW NK_STRING",
- /* 384 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery",
- /* 385 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery",
- /* 386 */ "expression_list ::= expr_or_subquery",
- /* 387 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery",
- /* 388 */ "column_reference ::= column_name",
- /* 389 */ "column_reference ::= table_name NK_DOT column_name",
- /* 390 */ "pseudo_column ::= ROWTS",
- /* 391 */ "pseudo_column ::= TBNAME",
- /* 392 */ "pseudo_column ::= table_name NK_DOT TBNAME",
- /* 393 */ "pseudo_column ::= QSTART",
- /* 394 */ "pseudo_column ::= QEND",
- /* 395 */ "pseudo_column ::= QDURATION",
- /* 396 */ "pseudo_column ::= WSTART",
- /* 397 */ "pseudo_column ::= WEND",
- /* 398 */ "pseudo_column ::= WDURATION",
- /* 399 */ "pseudo_column ::= IROWTS",
- /* 400 */ "pseudo_column ::= ISFILLED",
- /* 401 */ "pseudo_column ::= QTAGS",
- /* 402 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
- /* 403 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
- /* 404 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP",
- /* 405 */ "function_expression ::= literal_func",
- /* 406 */ "literal_func ::= noarg_func NK_LP NK_RP",
- /* 407 */ "literal_func ::= NOW",
- /* 408 */ "noarg_func ::= NOW",
- /* 409 */ "noarg_func ::= TODAY",
- /* 410 */ "noarg_func ::= TIMEZONE",
- /* 411 */ "noarg_func ::= DATABASE",
- /* 412 */ "noarg_func ::= CLIENT_VERSION",
- /* 413 */ "noarg_func ::= SERVER_VERSION",
- /* 414 */ "noarg_func ::= SERVER_STATUS",
- /* 415 */ "noarg_func ::= CURRENT_USER",
- /* 416 */ "noarg_func ::= USER",
- /* 417 */ "star_func ::= COUNT",
- /* 418 */ "star_func ::= FIRST",
- /* 419 */ "star_func ::= LAST",
- /* 420 */ "star_func ::= LAST_ROW",
- /* 421 */ "star_func_para_list ::= NK_STAR",
- /* 422 */ "star_func_para_list ::= other_para_list",
- /* 423 */ "other_para_list ::= star_func_para",
- /* 424 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
- /* 425 */ "star_func_para ::= expr_or_subquery",
- /* 426 */ "star_func_para ::= table_name NK_DOT NK_STAR",
- /* 427 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END",
- /* 428 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END",
- /* 429 */ "when_then_list ::= when_then_expr",
- /* 430 */ "when_then_list ::= when_then_list when_then_expr",
- /* 431 */ "when_then_expr ::= WHEN common_expression THEN common_expression",
- /* 432 */ "case_when_else_opt ::=",
- /* 433 */ "case_when_else_opt ::= ELSE common_expression",
- /* 434 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery",
- /* 435 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery",
- /* 436 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery",
- /* 437 */ "predicate ::= expr_or_subquery IS NULL",
- /* 438 */ "predicate ::= expr_or_subquery IS NOT NULL",
- /* 439 */ "predicate ::= expr_or_subquery in_op in_predicate_value",
- /* 440 */ "compare_op ::= NK_LT",
- /* 441 */ "compare_op ::= NK_GT",
- /* 442 */ "compare_op ::= NK_LE",
- /* 443 */ "compare_op ::= NK_GE",
- /* 444 */ "compare_op ::= NK_NE",
- /* 445 */ "compare_op ::= NK_EQ",
- /* 446 */ "compare_op ::= LIKE",
- /* 447 */ "compare_op ::= NOT LIKE",
- /* 448 */ "compare_op ::= MATCH",
- /* 449 */ "compare_op ::= NMATCH",
- /* 450 */ "compare_op ::= CONTAINS",
- /* 451 */ "in_op ::= IN",
- /* 452 */ "in_op ::= NOT IN",
- /* 453 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
- /* 454 */ "boolean_value_expression ::= boolean_primary",
- /* 455 */ "boolean_value_expression ::= NOT boolean_primary",
- /* 456 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
- /* 457 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
- /* 458 */ "boolean_primary ::= predicate",
- /* 459 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
- /* 460 */ "common_expression ::= expr_or_subquery",
- /* 461 */ "common_expression ::= boolean_value_expression",
- /* 462 */ "from_clause_opt ::=",
- /* 463 */ "from_clause_opt ::= FROM table_reference_list",
- /* 464 */ "table_reference_list ::= table_reference",
- /* 465 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
- /* 466 */ "table_reference ::= table_primary",
- /* 467 */ "table_reference ::= joined_table",
- /* 468 */ "table_primary ::= table_name alias_opt",
- /* 469 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
- /* 470 */ "table_primary ::= subquery alias_opt",
- /* 471 */ "table_primary ::= parenthesized_joined_table",
- /* 472 */ "alias_opt ::=",
- /* 473 */ "alias_opt ::= table_alias",
- /* 474 */ "alias_opt ::= AS table_alias",
- /* 475 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
- /* 476 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
- /* 477 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
- /* 478 */ "join_type ::=",
- /* 479 */ "join_type ::= INNER",
- /* 480 */ "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",
- /* 481 */ "set_quantifier_opt ::=",
- /* 482 */ "set_quantifier_opt ::= DISTINCT",
- /* 483 */ "set_quantifier_opt ::= ALL",
- /* 484 */ "select_list ::= select_item",
- /* 485 */ "select_list ::= select_list NK_COMMA select_item",
- /* 486 */ "select_item ::= NK_STAR",
- /* 487 */ "select_item ::= common_expression",
- /* 488 */ "select_item ::= common_expression column_alias",
- /* 489 */ "select_item ::= common_expression AS column_alias",
- /* 490 */ "select_item ::= table_name NK_DOT NK_STAR",
- /* 491 */ "where_clause_opt ::=",
- /* 492 */ "where_clause_opt ::= WHERE search_condition",
- /* 493 */ "partition_by_clause_opt ::=",
- /* 494 */ "partition_by_clause_opt ::= PARTITION BY partition_list",
- /* 495 */ "partition_list ::= partition_item",
- /* 496 */ "partition_list ::= partition_list NK_COMMA partition_item",
- /* 497 */ "partition_item ::= expr_or_subquery",
- /* 498 */ "partition_item ::= expr_or_subquery column_alias",
- /* 499 */ "partition_item ::= expr_or_subquery AS column_alias",
- /* 500 */ "twindow_clause_opt ::=",
- /* 501 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
- /* 502 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP",
- /* 503 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
- /* 504 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
- /* 505 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition",
- /* 506 */ "sliding_opt ::=",
- /* 507 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
- /* 508 */ "fill_opt ::=",
- /* 509 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
- /* 510 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
- /* 511 */ "fill_mode ::= NONE",
- /* 512 */ "fill_mode ::= PREV",
- /* 513 */ "fill_mode ::= NULL",
- /* 514 */ "fill_mode ::= LINEAR",
- /* 515 */ "fill_mode ::= NEXT",
- /* 516 */ "group_by_clause_opt ::=",
- /* 517 */ "group_by_clause_opt ::= GROUP BY group_by_list",
- /* 518 */ "group_by_list ::= expr_or_subquery",
- /* 519 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery",
- /* 520 */ "having_clause_opt ::=",
- /* 521 */ "having_clause_opt ::= HAVING search_condition",
- /* 522 */ "range_opt ::=",
- /* 523 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP",
- /* 524 */ "every_opt ::=",
- /* 525 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
- /* 526 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt",
- /* 527 */ "query_simple ::= query_specification",
- /* 528 */ "query_simple ::= union_query_expression",
- /* 529 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery",
- /* 530 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery",
- /* 531 */ "query_simple_or_subquery ::= query_simple",
- /* 532 */ "query_simple_or_subquery ::= subquery",
- /* 533 */ "query_or_subquery ::= query_expression",
- /* 534 */ "query_or_subquery ::= subquery",
- /* 535 */ "order_by_clause_opt ::=",
- /* 536 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
- /* 537 */ "slimit_clause_opt ::=",
- /* 538 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
- /* 539 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
- /* 540 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
- /* 541 */ "limit_clause_opt ::=",
- /* 542 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
- /* 543 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
- /* 544 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
- /* 545 */ "subquery ::= NK_LP query_expression NK_RP",
- /* 546 */ "subquery ::= NK_LP subquery NK_RP",
- /* 547 */ "search_condition ::= common_expression",
- /* 548 */ "sort_specification_list ::= sort_specification",
- /* 549 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
- /* 550 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt",
- /* 551 */ "ordering_specification_opt ::=",
- /* 552 */ "ordering_specification_opt ::= ASC",
- /* 553 */ "ordering_specification_opt ::= DESC",
- /* 554 */ "null_ordering_opt ::=",
- /* 555 */ "null_ordering_opt ::= NULLS FIRST",
- /* 556 */ "null_ordering_opt ::= NULLS LAST",
+ /* 293 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query",
+ /* 294 */ "analyze_opt ::=",
+ /* 295 */ "analyze_opt ::= ANALYZE",
+ /* 296 */ "explain_options ::=",
+ /* 297 */ "explain_options ::= explain_options VERBOSE NK_BOOL",
+ /* 298 */ "explain_options ::= explain_options RATIO NK_FLOAT",
+ /* 299 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt",
+ /* 300 */ "cmd ::= DROP FUNCTION exists_opt function_name",
+ /* 301 */ "agg_func_opt ::=",
+ /* 302 */ "agg_func_opt ::= AGGREGATE",
+ /* 303 */ "bufsize_opt ::=",
+ /* 304 */ "bufsize_opt ::= BUFSIZE NK_INTEGER",
+ /* 305 */ "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",
+ /* 306 */ "cmd ::= DROP STREAM exists_opt stream_name",
+ /* 307 */ "col_list_opt ::=",
+ /* 308 */ "col_list_opt ::= NK_LP col_name_list NK_RP",
+ /* 309 */ "tag_def_or_ref_opt ::=",
+ /* 310 */ "tag_def_or_ref_opt ::= tags_def",
+ /* 311 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP",
+ /* 312 */ "stream_options ::=",
+ /* 313 */ "stream_options ::= stream_options TRIGGER AT_ONCE",
+ /* 314 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE",
+ /* 315 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal",
+ /* 316 */ "stream_options ::= stream_options WATERMARK duration_literal",
+ /* 317 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER",
+ /* 318 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER",
+ /* 319 */ "subtable_opt ::=",
+ /* 320 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP",
+ /* 321 */ "cmd ::= KILL CONNECTION NK_INTEGER",
+ /* 322 */ "cmd ::= KILL QUERY NK_STRING",
+ /* 323 */ "cmd ::= KILL TRANSACTION NK_INTEGER",
+ /* 324 */ "cmd ::= BALANCE VGROUP",
+ /* 325 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER",
+ /* 326 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list",
+ /* 327 */ "cmd ::= SPLIT VGROUP NK_INTEGER",
+ /* 328 */ "dnode_list ::= DNODE NK_INTEGER",
+ /* 329 */ "dnode_list ::= dnode_list DNODE NK_INTEGER",
+ /* 330 */ "cmd ::= DELETE FROM full_table_name where_clause_opt",
+ /* 331 */ "cmd ::= query_or_subquery",
+ /* 332 */ "cmd ::= insert_query",
+ /* 333 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery",
+ /* 334 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery",
+ /* 335 */ "literal ::= NK_INTEGER",
+ /* 336 */ "literal ::= NK_FLOAT",
+ /* 337 */ "literal ::= NK_STRING",
+ /* 338 */ "literal ::= NK_BOOL",
+ /* 339 */ "literal ::= TIMESTAMP NK_STRING",
+ /* 340 */ "literal ::= duration_literal",
+ /* 341 */ "literal ::= NULL",
+ /* 342 */ "literal ::= NK_QUESTION",
+ /* 343 */ "duration_literal ::= NK_VARIABLE",
+ /* 344 */ "signed ::= NK_INTEGER",
+ /* 345 */ "signed ::= NK_PLUS NK_INTEGER",
+ /* 346 */ "signed ::= NK_MINUS NK_INTEGER",
+ /* 347 */ "signed ::= NK_FLOAT",
+ /* 348 */ "signed ::= NK_PLUS NK_FLOAT",
+ /* 349 */ "signed ::= NK_MINUS NK_FLOAT",
+ /* 350 */ "signed_literal ::= signed",
+ /* 351 */ "signed_literal ::= NK_STRING",
+ /* 352 */ "signed_literal ::= NK_BOOL",
+ /* 353 */ "signed_literal ::= TIMESTAMP NK_STRING",
+ /* 354 */ "signed_literal ::= duration_literal",
+ /* 355 */ "signed_literal ::= NULL",
+ /* 356 */ "signed_literal ::= literal_func",
+ /* 357 */ "signed_literal ::= NK_QUESTION",
+ /* 358 */ "literal_list ::= signed_literal",
+ /* 359 */ "literal_list ::= literal_list NK_COMMA signed_literal",
+ /* 360 */ "db_name ::= NK_ID",
+ /* 361 */ "table_name ::= NK_ID",
+ /* 362 */ "column_name ::= NK_ID",
+ /* 363 */ "function_name ::= NK_ID",
+ /* 364 */ "table_alias ::= NK_ID",
+ /* 365 */ "column_alias ::= NK_ID",
+ /* 366 */ "user_name ::= NK_ID",
+ /* 367 */ "topic_name ::= NK_ID",
+ /* 368 */ "stream_name ::= NK_ID",
+ /* 369 */ "cgroup_name ::= NK_ID",
+ /* 370 */ "index_name ::= NK_ID",
+ /* 371 */ "expr_or_subquery ::= expression",
+ /* 372 */ "expression ::= literal",
+ /* 373 */ "expression ::= pseudo_column",
+ /* 374 */ "expression ::= column_reference",
+ /* 375 */ "expression ::= function_expression",
+ /* 376 */ "expression ::= case_when_expression",
+ /* 377 */ "expression ::= NK_LP expression NK_RP",
+ /* 378 */ "expression ::= NK_PLUS expr_or_subquery",
+ /* 379 */ "expression ::= NK_MINUS expr_or_subquery",
+ /* 380 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery",
+ /* 381 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery",
+ /* 382 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery",
+ /* 383 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery",
+ /* 384 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery",
+ /* 385 */ "expression ::= column_reference NK_ARROW NK_STRING",
+ /* 386 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery",
+ /* 387 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery",
+ /* 388 */ "expression_list ::= expr_or_subquery",
+ /* 389 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery",
+ /* 390 */ "column_reference ::= column_name",
+ /* 391 */ "column_reference ::= table_name NK_DOT column_name",
+ /* 392 */ "pseudo_column ::= ROWTS",
+ /* 393 */ "pseudo_column ::= TBNAME",
+ /* 394 */ "pseudo_column ::= table_name NK_DOT TBNAME",
+ /* 395 */ "pseudo_column ::= QSTART",
+ /* 396 */ "pseudo_column ::= QEND",
+ /* 397 */ "pseudo_column ::= QDURATION",
+ /* 398 */ "pseudo_column ::= WSTART",
+ /* 399 */ "pseudo_column ::= WEND",
+ /* 400 */ "pseudo_column ::= WDURATION",
+ /* 401 */ "pseudo_column ::= IROWTS",
+ /* 402 */ "pseudo_column ::= ISFILLED",
+ /* 403 */ "pseudo_column ::= QTAGS",
+ /* 404 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
+ /* 405 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
+ /* 406 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP",
+ /* 407 */ "function_expression ::= literal_func",
+ /* 408 */ "literal_func ::= noarg_func NK_LP NK_RP",
+ /* 409 */ "literal_func ::= NOW",
+ /* 410 */ "noarg_func ::= NOW",
+ /* 411 */ "noarg_func ::= TODAY",
+ /* 412 */ "noarg_func ::= TIMEZONE",
+ /* 413 */ "noarg_func ::= DATABASE",
+ /* 414 */ "noarg_func ::= CLIENT_VERSION",
+ /* 415 */ "noarg_func ::= SERVER_VERSION",
+ /* 416 */ "noarg_func ::= SERVER_STATUS",
+ /* 417 */ "noarg_func ::= CURRENT_USER",
+ /* 418 */ "noarg_func ::= USER",
+ /* 419 */ "star_func ::= COUNT",
+ /* 420 */ "star_func ::= FIRST",
+ /* 421 */ "star_func ::= LAST",
+ /* 422 */ "star_func ::= LAST_ROW",
+ /* 423 */ "star_func_para_list ::= NK_STAR",
+ /* 424 */ "star_func_para_list ::= other_para_list",
+ /* 425 */ "other_para_list ::= star_func_para",
+ /* 426 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
+ /* 427 */ "star_func_para ::= expr_or_subquery",
+ /* 428 */ "star_func_para ::= table_name NK_DOT NK_STAR",
+ /* 429 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END",
+ /* 430 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END",
+ /* 431 */ "when_then_list ::= when_then_expr",
+ /* 432 */ "when_then_list ::= when_then_list when_then_expr",
+ /* 433 */ "when_then_expr ::= WHEN common_expression THEN common_expression",
+ /* 434 */ "case_when_else_opt ::=",
+ /* 435 */ "case_when_else_opt ::= ELSE common_expression",
+ /* 436 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery",
+ /* 437 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery",
+ /* 438 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery",
+ /* 439 */ "predicate ::= expr_or_subquery IS NULL",
+ /* 440 */ "predicate ::= expr_or_subquery IS NOT NULL",
+ /* 441 */ "predicate ::= expr_or_subquery in_op in_predicate_value",
+ /* 442 */ "compare_op ::= NK_LT",
+ /* 443 */ "compare_op ::= NK_GT",
+ /* 444 */ "compare_op ::= NK_LE",
+ /* 445 */ "compare_op ::= NK_GE",
+ /* 446 */ "compare_op ::= NK_NE",
+ /* 447 */ "compare_op ::= NK_EQ",
+ /* 448 */ "compare_op ::= LIKE",
+ /* 449 */ "compare_op ::= NOT LIKE",
+ /* 450 */ "compare_op ::= MATCH",
+ /* 451 */ "compare_op ::= NMATCH",
+ /* 452 */ "compare_op ::= CONTAINS",
+ /* 453 */ "in_op ::= IN",
+ /* 454 */ "in_op ::= NOT IN",
+ /* 455 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
+ /* 456 */ "boolean_value_expression ::= boolean_primary",
+ /* 457 */ "boolean_value_expression ::= NOT boolean_primary",
+ /* 458 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
+ /* 459 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
+ /* 460 */ "boolean_primary ::= predicate",
+ /* 461 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
+ /* 462 */ "common_expression ::= expr_or_subquery",
+ /* 463 */ "common_expression ::= boolean_value_expression",
+ /* 464 */ "from_clause_opt ::=",
+ /* 465 */ "from_clause_opt ::= FROM table_reference_list",
+ /* 466 */ "table_reference_list ::= table_reference",
+ /* 467 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
+ /* 468 */ "table_reference ::= table_primary",
+ /* 469 */ "table_reference ::= joined_table",
+ /* 470 */ "table_primary ::= table_name alias_opt",
+ /* 471 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
+ /* 472 */ "table_primary ::= subquery alias_opt",
+ /* 473 */ "table_primary ::= parenthesized_joined_table",
+ /* 474 */ "alias_opt ::=",
+ /* 475 */ "alias_opt ::= table_alias",
+ /* 476 */ "alias_opt ::= AS table_alias",
+ /* 477 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
+ /* 478 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
+ /* 479 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
+ /* 480 */ "join_type ::=",
+ /* 481 */ "join_type ::= INNER",
+ /* 482 */ "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",
+ /* 483 */ "set_quantifier_opt ::=",
+ /* 484 */ "set_quantifier_opt ::= DISTINCT",
+ /* 485 */ "set_quantifier_opt ::= ALL",
+ /* 486 */ "select_list ::= select_item",
+ /* 487 */ "select_list ::= select_list NK_COMMA select_item",
+ /* 488 */ "select_item ::= NK_STAR",
+ /* 489 */ "select_item ::= common_expression",
+ /* 490 */ "select_item ::= common_expression column_alias",
+ /* 491 */ "select_item ::= common_expression AS column_alias",
+ /* 492 */ "select_item ::= table_name NK_DOT NK_STAR",
+ /* 493 */ "where_clause_opt ::=",
+ /* 494 */ "where_clause_opt ::= WHERE search_condition",
+ /* 495 */ "partition_by_clause_opt ::=",
+ /* 496 */ "partition_by_clause_opt ::= PARTITION BY partition_list",
+ /* 497 */ "partition_list ::= partition_item",
+ /* 498 */ "partition_list ::= partition_list NK_COMMA partition_item",
+ /* 499 */ "partition_item ::= expr_or_subquery",
+ /* 500 */ "partition_item ::= expr_or_subquery column_alias",
+ /* 501 */ "partition_item ::= expr_or_subquery AS column_alias",
+ /* 502 */ "twindow_clause_opt ::=",
+ /* 503 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
+ /* 504 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP",
+ /* 505 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
+ /* 506 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
+ /* 507 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition",
+ /* 508 */ "sliding_opt ::=",
+ /* 509 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
+ /* 510 */ "fill_opt ::=",
+ /* 511 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
+ /* 512 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
+ /* 513 */ "fill_mode ::= NONE",
+ /* 514 */ "fill_mode ::= PREV",
+ /* 515 */ "fill_mode ::= NULL",
+ /* 516 */ "fill_mode ::= LINEAR",
+ /* 517 */ "fill_mode ::= NEXT",
+ /* 518 */ "group_by_clause_opt ::=",
+ /* 519 */ "group_by_clause_opt ::= GROUP BY group_by_list",
+ /* 520 */ "group_by_list ::= expr_or_subquery",
+ /* 521 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery",
+ /* 522 */ "having_clause_opt ::=",
+ /* 523 */ "having_clause_opt ::= HAVING search_condition",
+ /* 524 */ "range_opt ::=",
+ /* 525 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP",
+ /* 526 */ "every_opt ::=",
+ /* 527 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
+ /* 528 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt",
+ /* 529 */ "query_simple ::= query_specification",
+ /* 530 */ "query_simple ::= union_query_expression",
+ /* 531 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery",
+ /* 532 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery",
+ /* 533 */ "query_simple_or_subquery ::= query_simple",
+ /* 534 */ "query_simple_or_subquery ::= subquery",
+ /* 535 */ "query_or_subquery ::= query_expression",
+ /* 536 */ "query_or_subquery ::= subquery",
+ /* 537 */ "order_by_clause_opt ::=",
+ /* 538 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
+ /* 539 */ "slimit_clause_opt ::=",
+ /* 540 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
+ /* 541 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
+ /* 542 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
+ /* 543 */ "limit_clause_opt ::=",
+ /* 544 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
+ /* 545 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
+ /* 546 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
+ /* 547 */ "subquery ::= NK_LP query_expression NK_RP",
+ /* 548 */ "subquery ::= NK_LP subquery NK_RP",
+ /* 549 */ "search_condition ::= common_expression",
+ /* 550 */ "sort_specification_list ::= sort_specification",
+ /* 551 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
+ /* 552 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt",
+ /* 553 */ "ordering_specification_opt ::=",
+ /* 554 */ "ordering_specification_opt ::= ASC",
+ /* 555 */ "ordering_specification_opt ::= DESC",
+ /* 556 */ "null_ordering_opt ::=",
+ /* 557 */ "null_ordering_opt ::= NULLS FIRST",
+ /* 558 */ "null_ordering_opt ::= NULLS LAST",
};
#endif /* NDEBUG */
@@ -2645,57 +2590,58 @@ static void yy_destructor(
case 390: /* func */
case 392: /* query_or_subquery */
case 395: /* explain_options */
- case 399: /* stream_options */
- case 402: /* subtable_opt */
- case 403: /* expression */
- case 405: /* where_clause_opt */
- case 406: /* signed */
- case 407: /* literal_func */
- case 410: /* expr_or_subquery */
- case 411: /* pseudo_column */
- case 412: /* column_reference */
- case 413: /* function_expression */
- case 414: /* case_when_expression */
- case 419: /* star_func_para */
- case 421: /* case_when_else_opt */
- case 422: /* common_expression */
- case 423: /* when_then_expr */
- case 424: /* predicate */
- case 427: /* in_predicate_value */
- case 428: /* boolean_value_expression */
- case 429: /* boolean_primary */
- case 430: /* from_clause_opt */
- case 431: /* table_reference_list */
- case 432: /* table_reference */
- case 433: /* table_primary */
- case 434: /* joined_table */
- case 436: /* subquery */
- case 437: /* parenthesized_joined_table */
- case 439: /* search_condition */
- case 440: /* query_specification */
- case 444: /* range_opt */
- case 445: /* every_opt */
- case 446: /* fill_opt */
- case 447: /* twindow_clause_opt */
- case 449: /* having_clause_opt */
- case 450: /* select_item */
- case 452: /* partition_item */
- case 455: /* query_expression */
- case 456: /* query_simple */
- case 458: /* slimit_clause_opt */
- case 459: /* limit_clause_opt */
- case 460: /* union_query_expression */
- case 461: /* query_simple_or_subquery */
- case 463: /* sort_specification */
+ case 396: /* insert_query */
+ case 400: /* stream_options */
+ case 403: /* subtable_opt */
+ case 404: /* expression */
+ case 406: /* where_clause_opt */
+ case 407: /* signed */
+ case 408: /* literal_func */
+ case 411: /* expr_or_subquery */
+ case 412: /* pseudo_column */
+ case 413: /* column_reference */
+ case 414: /* function_expression */
+ case 415: /* case_when_expression */
+ case 420: /* star_func_para */
+ case 422: /* case_when_else_opt */
+ case 423: /* common_expression */
+ case 424: /* when_then_expr */
+ case 425: /* predicate */
+ case 428: /* in_predicate_value */
+ case 429: /* boolean_value_expression */
+ case 430: /* boolean_primary */
+ case 431: /* from_clause_opt */
+ case 432: /* table_reference_list */
+ case 433: /* table_reference */
+ case 434: /* table_primary */
+ case 435: /* joined_table */
+ case 437: /* subquery */
+ case 438: /* parenthesized_joined_table */
+ case 440: /* search_condition */
+ case 441: /* query_specification */
+ case 445: /* range_opt */
+ case 446: /* every_opt */
+ case 447: /* fill_opt */
+ case 448: /* twindow_clause_opt */
+ case 450: /* having_clause_opt */
+ case 451: /* select_item */
+ case 453: /* partition_item */
+ case 456: /* query_expression */
+ case 457: /* query_simple */
+ case 459: /* slimit_clause_opt */
+ case 460: /* limit_clause_opt */
+ case 461: /* union_query_expression */
+ case 462: /* query_simple_or_subquery */
+ case 464: /* sort_specification */
{
- nodesDestroyNode((yypminor->yy924));
+ nodesDestroyNode((yypminor->yy44));
}
break;
case 327: /* account_options */
case 328: /* alter_account_options */
case 330: /* alter_account_option */
case 345: /* speed_opt */
- case 397: /* bufsize_opt */
+ case 398: /* bufsize_opt */
{
}
@@ -2712,11 +2658,11 @@ static void yy_destructor(
case 386: /* index_name */
case 391: /* sma_func_name */
case 393: /* cgroup_name */
- case 398: /* stream_name */
- case 409: /* table_alias */
- case 415: /* star_func */
- case 417: /* noarg_func */
- case 435: /* alias_opt */
+ case 399: /* stream_name */
+ case 410: /* table_alias */
+ case 416: /* star_func */
+ case 418: /* noarg_func */
+ case 436: /* alias_opt */
{
}
@@ -2737,8 +2683,8 @@ static void yy_destructor(
case 341: /* not_exists_opt */
case 343: /* exists_opt */
case 394: /* analyze_opt */
- case 396: /* agg_func_opt */
- case 441: /* set_quantifier_opt */
+ case 397: /* agg_func_opt */
+ case 442: /* set_quantifier_opt */
{
}
@@ -2758,22 +2704,22 @@ static void yy_destructor(
case 371: /* rollup_func_list */
case 381: /* tag_list_opt */
case 387: /* func_list */
- case 400: /* col_list_opt */
- case 401: /* tag_def_or_ref_opt */
- case 404: /* dnode_list */
- case 408: /* literal_list */
- case 416: /* star_func_para_list */
- case 418: /* other_para_list */
- case 420: /* when_then_list */
- case 442: /* select_list */
- case 443: /* partition_by_clause_opt */
- case 448: /* group_by_clause_opt */
- case 451: /* partition_list */
- case 454: /* group_by_list */
- case 457: /* order_by_clause_opt */
- case 462: /* sort_specification_list */
+ case 401: /* col_list_opt */
+ case 402: /* tag_def_or_ref_opt */
+ case 405: /* dnode_list */
+ case 409: /* literal_list */
+ case 417: /* star_func_para_list */
+ case 419: /* other_para_list */
+ case 421: /* when_then_list */
+ case 443: /* select_list */
+ case 444: /* partition_by_clause_opt */
+ case 449: /* group_by_clause_opt */
+ case 452: /* partition_list */
+ case 455: /* group_by_list */
+ case 458: /* order_by_clause_opt */
+ case 463: /* sort_specification_list */
{
- nodesDestroyList((yypminor->yy776));
+ nodesDestroyList((yypminor->yy684));
}
break;
case 349: /* alter_db_option */
@@ -2787,28 +2733,28 @@ static void yy_destructor(
}
break;
- case 425: /* compare_op */
- case 426: /* in_op */
+ case 426: /* compare_op */
+ case 427: /* in_op */
{
}
break;
- case 438: /* join_type */
+ case 439: /* join_type */
{
}
break;
- case 453: /* fill_mode */
+ case 454: /* fill_mode */
{
}
break;
- case 464: /* ordering_specification_opt */
+ case 465: /* ordering_specification_opt */
{
}
break;
- case 465: /* null_ordering_opt */
+ case 466: /* null_ordering_opt */
{
}
@@ -3400,270 +3346,272 @@ static const struct {
{ 326, -2 }, /* (290) cmd ::= DESCRIBE full_table_name */
{ 326, -3 }, /* (291) cmd ::= RESET QUERY CACHE */
{ 326, -4 }, /* (292) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
- { 394, 0 }, /* (293) analyze_opt ::= */
- { 394, -1 }, /* (294) analyze_opt ::= ANALYZE */
- { 395, 0 }, /* (295) explain_options ::= */
- { 395, -3 }, /* (296) explain_options ::= explain_options VERBOSE NK_BOOL */
- { 395, -3 }, /* (297) explain_options ::= explain_options RATIO NK_FLOAT */
- { 326, -10 }, /* (298) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
- { 326, -4 }, /* (299) cmd ::= DROP FUNCTION exists_opt function_name */
- { 396, 0 }, /* (300) agg_func_opt ::= */
- { 396, -1 }, /* (301) agg_func_opt ::= AGGREGATE */
- { 397, 0 }, /* (302) bufsize_opt ::= */
- { 397, -2 }, /* (303) bufsize_opt ::= BUFSIZE NK_INTEGER */
- { 326, -12 }, /* (304) 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 */
- { 326, -4 }, /* (305) cmd ::= DROP STREAM exists_opt stream_name */
- { 400, 0 }, /* (306) col_list_opt ::= */
- { 400, -3 }, /* (307) col_list_opt ::= NK_LP col_name_list NK_RP */
- { 401, 0 }, /* (308) tag_def_or_ref_opt ::= */
- { 401, -1 }, /* (309) tag_def_or_ref_opt ::= tags_def */
- { 401, -4 }, /* (310) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */
- { 399, 0 }, /* (311) stream_options ::= */
- { 399, -3 }, /* (312) stream_options ::= stream_options TRIGGER AT_ONCE */
- { 399, -3 }, /* (313) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
- { 399, -4 }, /* (314) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
- { 399, -3 }, /* (315) stream_options ::= stream_options WATERMARK duration_literal */
- { 399, -4 }, /* (316) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
- { 399, -3 }, /* (317) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
- { 402, 0 }, /* (318) subtable_opt ::= */
- { 402, -4 }, /* (319) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
- { 326, -3 }, /* (320) cmd ::= KILL CONNECTION NK_INTEGER */
- { 326, -3 }, /* (321) cmd ::= KILL QUERY NK_STRING */
- { 326, -3 }, /* (322) cmd ::= KILL TRANSACTION NK_INTEGER */
- { 326, -2 }, /* (323) cmd ::= BALANCE VGROUP */
- { 326, -4 }, /* (324) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
- { 326, -4 }, /* (325) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
- { 326, -3 }, /* (326) cmd ::= SPLIT VGROUP NK_INTEGER */
- { 404, -2 }, /* (327) dnode_list ::= DNODE NK_INTEGER */
- { 404, -3 }, /* (328) dnode_list ::= dnode_list DNODE NK_INTEGER */
- { 326, -4 }, /* (329) cmd ::= DELETE FROM full_table_name where_clause_opt */
- { 326, -1 }, /* (330) cmd ::= query_or_subquery */
- { 326, -7 }, /* (331) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
- { 326, -4 }, /* (332) cmd ::= INSERT INTO full_table_name query_or_subquery */
- { 329, -1 }, /* (333) literal ::= NK_INTEGER */
- { 329, -1 }, /* (334) literal ::= NK_FLOAT */
- { 329, -1 }, /* (335) literal ::= NK_STRING */
- { 329, -1 }, /* (336) literal ::= NK_BOOL */
- { 329, -2 }, /* (337) literal ::= TIMESTAMP NK_STRING */
- { 329, -1 }, /* (338) literal ::= duration_literal */
- { 329, -1 }, /* (339) literal ::= NULL */
- { 329, -1 }, /* (340) literal ::= NK_QUESTION */
- { 373, -1 }, /* (341) duration_literal ::= NK_VARIABLE */
- { 406, -1 }, /* (342) signed ::= NK_INTEGER */
- { 406, -2 }, /* (343) signed ::= NK_PLUS NK_INTEGER */
- { 406, -2 }, /* (344) signed ::= NK_MINUS NK_INTEGER */
- { 406, -1 }, /* (345) signed ::= NK_FLOAT */
- { 406, -2 }, /* (346) signed ::= NK_PLUS NK_FLOAT */
- { 406, -2 }, /* (347) signed ::= NK_MINUS NK_FLOAT */
- { 362, -1 }, /* (348) signed_literal ::= signed */
- { 362, -1 }, /* (349) signed_literal ::= NK_STRING */
- { 362, -1 }, /* (350) signed_literal ::= NK_BOOL */
- { 362, -2 }, /* (351) signed_literal ::= TIMESTAMP NK_STRING */
- { 362, -1 }, /* (352) signed_literal ::= duration_literal */
- { 362, -1 }, /* (353) signed_literal ::= NULL */
- { 362, -1 }, /* (354) signed_literal ::= literal_func */
- { 362, -1 }, /* (355) signed_literal ::= NK_QUESTION */
- { 408, -1 }, /* (356) literal_list ::= signed_literal */
- { 408, -3 }, /* (357) literal_list ::= literal_list NK_COMMA signed_literal */
- { 337, -1 }, /* (358) db_name ::= NK_ID */
- { 368, -1 }, /* (359) table_name ::= NK_ID */
- { 360, -1 }, /* (360) column_name ::= NK_ID */
- { 375, -1 }, /* (361) function_name ::= NK_ID */
- { 409, -1 }, /* (362) table_alias ::= NK_ID */
- { 383, -1 }, /* (363) column_alias ::= NK_ID */
- { 331, -1 }, /* (364) user_name ::= NK_ID */
- { 338, -1 }, /* (365) topic_name ::= NK_ID */
- { 398, -1 }, /* (366) stream_name ::= NK_ID */
- { 393, -1 }, /* (367) cgroup_name ::= NK_ID */
- { 386, -1 }, /* (368) index_name ::= NK_ID */
- { 410, -1 }, /* (369) expr_or_subquery ::= expression */
- { 403, -1 }, /* (370) expression ::= literal */
- { 403, -1 }, /* (371) expression ::= pseudo_column */
- { 403, -1 }, /* (372) expression ::= column_reference */
- { 403, -1 }, /* (373) expression ::= function_expression */
- { 403, -1 }, /* (374) expression ::= case_when_expression */
- { 403, -3 }, /* (375) expression ::= NK_LP expression NK_RP */
- { 403, -2 }, /* (376) expression ::= NK_PLUS expr_or_subquery */
- { 403, -2 }, /* (377) expression ::= NK_MINUS expr_or_subquery */
- { 403, -3 }, /* (378) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
- { 403, -3 }, /* (379) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
- { 403, -3 }, /* (380) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
- { 403, -3 }, /* (381) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
- { 403, -3 }, /* (382) expression ::= expr_or_subquery NK_REM expr_or_subquery */
- { 403, -3 }, /* (383) expression ::= column_reference NK_ARROW NK_STRING */
- { 403, -3 }, /* (384) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
- { 403, -3 }, /* (385) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
- { 365, -1 }, /* (386) expression_list ::= expr_or_subquery */
- { 365, -3 }, /* (387) expression_list ::= expression_list NK_COMMA expr_or_subquery */
- { 412, -1 }, /* (388) column_reference ::= column_name */
- { 412, -3 }, /* (389) column_reference ::= table_name NK_DOT column_name */
- { 411, -1 }, /* (390) pseudo_column ::= ROWTS */
- { 411, -1 }, /* (391) pseudo_column ::= TBNAME */
- { 411, -3 }, /* (392) pseudo_column ::= table_name NK_DOT TBNAME */
- { 411, -1 }, /* (393) pseudo_column ::= QSTART */
- { 411, -1 }, /* (394) pseudo_column ::= QEND */
- { 411, -1 }, /* (395) pseudo_column ::= QDURATION */
- { 411, -1 }, /* (396) pseudo_column ::= WSTART */
- { 411, -1 }, /* (397) pseudo_column ::= WEND */
- { 411, -1 }, /* (398) pseudo_column ::= WDURATION */
- { 411, -1 }, /* (399) pseudo_column ::= IROWTS */
- { 411, -1 }, /* (400) pseudo_column ::= ISFILLED */
- { 411, -1 }, /* (401) pseudo_column ::= QTAGS */
- { 413, -4 }, /* (402) function_expression ::= function_name NK_LP expression_list NK_RP */
- { 413, -4 }, /* (403) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
- { 413, -6 }, /* (404) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
- { 413, -1 }, /* (405) function_expression ::= literal_func */
- { 407, -3 }, /* (406) literal_func ::= noarg_func NK_LP NK_RP */
- { 407, -1 }, /* (407) literal_func ::= NOW */
- { 417, -1 }, /* (408) noarg_func ::= NOW */
- { 417, -1 }, /* (409) noarg_func ::= TODAY */
- { 417, -1 }, /* (410) noarg_func ::= TIMEZONE */
- { 417, -1 }, /* (411) noarg_func ::= DATABASE */
- { 417, -1 }, /* (412) noarg_func ::= CLIENT_VERSION */
- { 417, -1 }, /* (413) noarg_func ::= SERVER_VERSION */
- { 417, -1 }, /* (414) noarg_func ::= SERVER_STATUS */
- { 417, -1 }, /* (415) noarg_func ::= CURRENT_USER */
- { 417, -1 }, /* (416) noarg_func ::= USER */
- { 415, -1 }, /* (417) star_func ::= COUNT */
- { 415, -1 }, /* (418) star_func ::= FIRST */
- { 415, -1 }, /* (419) star_func ::= LAST */
- { 415, -1 }, /* (420) star_func ::= LAST_ROW */
- { 416, -1 }, /* (421) star_func_para_list ::= NK_STAR */
- { 416, -1 }, /* (422) star_func_para_list ::= other_para_list */
- { 418, -1 }, /* (423) other_para_list ::= star_func_para */
- { 418, -3 }, /* (424) other_para_list ::= other_para_list NK_COMMA star_func_para */
- { 419, -1 }, /* (425) star_func_para ::= expr_or_subquery */
- { 419, -3 }, /* (426) star_func_para ::= table_name NK_DOT NK_STAR */
- { 414, -4 }, /* (427) case_when_expression ::= CASE when_then_list case_when_else_opt END */
- { 414, -5 }, /* (428) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
- { 420, -1 }, /* (429) when_then_list ::= when_then_expr */
- { 420, -2 }, /* (430) when_then_list ::= when_then_list when_then_expr */
- { 423, -4 }, /* (431) when_then_expr ::= WHEN common_expression THEN common_expression */
- { 421, 0 }, /* (432) case_when_else_opt ::= */
- { 421, -2 }, /* (433) case_when_else_opt ::= ELSE common_expression */
- { 424, -3 }, /* (434) predicate ::= expr_or_subquery compare_op expr_or_subquery */
- { 424, -5 }, /* (435) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
- { 424, -6 }, /* (436) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
- { 424, -3 }, /* (437) predicate ::= expr_or_subquery IS NULL */
- { 424, -4 }, /* (438) predicate ::= expr_or_subquery IS NOT NULL */
- { 424, -3 }, /* (439) predicate ::= expr_or_subquery in_op in_predicate_value */
- { 425, -1 }, /* (440) compare_op ::= NK_LT */
- { 425, -1 }, /* (441) compare_op ::= NK_GT */
- { 425, -1 }, /* (442) compare_op ::= NK_LE */
- { 425, -1 }, /* (443) compare_op ::= NK_GE */
- { 425, -1 }, /* (444) compare_op ::= NK_NE */
- { 425, -1 }, /* (445) compare_op ::= NK_EQ */
- { 425, -1 }, /* (446) compare_op ::= LIKE */
- { 425, -2 }, /* (447) compare_op ::= NOT LIKE */
- { 425, -1 }, /* (448) compare_op ::= MATCH */
- { 425, -1 }, /* (449) compare_op ::= NMATCH */
- { 425, -1 }, /* (450) compare_op ::= CONTAINS */
- { 426, -1 }, /* (451) in_op ::= IN */
- { 426, -2 }, /* (452) in_op ::= NOT IN */
- { 427, -3 }, /* (453) in_predicate_value ::= NK_LP literal_list NK_RP */
- { 428, -1 }, /* (454) boolean_value_expression ::= boolean_primary */
- { 428, -2 }, /* (455) boolean_value_expression ::= NOT boolean_primary */
- { 428, -3 }, /* (456) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
- { 428, -3 }, /* (457) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
- { 429, -1 }, /* (458) boolean_primary ::= predicate */
- { 429, -3 }, /* (459) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
- { 422, -1 }, /* (460) common_expression ::= expr_or_subquery */
- { 422, -1 }, /* (461) common_expression ::= boolean_value_expression */
- { 430, 0 }, /* (462) from_clause_opt ::= */
- { 430, -2 }, /* (463) from_clause_opt ::= FROM table_reference_list */
- { 431, -1 }, /* (464) table_reference_list ::= table_reference */
- { 431, -3 }, /* (465) table_reference_list ::= table_reference_list NK_COMMA table_reference */
- { 432, -1 }, /* (466) table_reference ::= table_primary */
- { 432, -1 }, /* (467) table_reference ::= joined_table */
- { 433, -2 }, /* (468) table_primary ::= table_name alias_opt */
- { 433, -4 }, /* (469) table_primary ::= db_name NK_DOT table_name alias_opt */
- { 433, -2 }, /* (470) table_primary ::= subquery alias_opt */
- { 433, -1 }, /* (471) table_primary ::= parenthesized_joined_table */
- { 435, 0 }, /* (472) alias_opt ::= */
- { 435, -1 }, /* (473) alias_opt ::= table_alias */
- { 435, -2 }, /* (474) alias_opt ::= AS table_alias */
- { 437, -3 }, /* (475) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
- { 437, -3 }, /* (476) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
- { 434, -6 }, /* (477) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
- { 438, 0 }, /* (478) join_type ::= */
- { 438, -1 }, /* (479) join_type ::= INNER */
- { 440, -12 }, /* (480) 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 */
- { 441, 0 }, /* (481) set_quantifier_opt ::= */
- { 441, -1 }, /* (482) set_quantifier_opt ::= DISTINCT */
- { 441, -1 }, /* (483) set_quantifier_opt ::= ALL */
- { 442, -1 }, /* (484) select_list ::= select_item */
- { 442, -3 }, /* (485) select_list ::= select_list NK_COMMA select_item */
- { 450, -1 }, /* (486) select_item ::= NK_STAR */
- { 450, -1 }, /* (487) select_item ::= common_expression */
- { 450, -2 }, /* (488) select_item ::= common_expression column_alias */
- { 450, -3 }, /* (489) select_item ::= common_expression AS column_alias */
- { 450, -3 }, /* (490) select_item ::= table_name NK_DOT NK_STAR */
- { 405, 0 }, /* (491) where_clause_opt ::= */
- { 405, -2 }, /* (492) where_clause_opt ::= WHERE search_condition */
- { 443, 0 }, /* (493) partition_by_clause_opt ::= */
- { 443, -3 }, /* (494) partition_by_clause_opt ::= PARTITION BY partition_list */
- { 451, -1 }, /* (495) partition_list ::= partition_item */
- { 451, -3 }, /* (496) partition_list ::= partition_list NK_COMMA partition_item */
- { 452, -1 }, /* (497) partition_item ::= expr_or_subquery */
- { 452, -2 }, /* (498) partition_item ::= expr_or_subquery column_alias */
- { 452, -3 }, /* (499) partition_item ::= expr_or_subquery AS column_alias */
- { 447, 0 }, /* (500) twindow_clause_opt ::= */
- { 447, -6 }, /* (501) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
- { 447, -4 }, /* (502) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
- { 447, -6 }, /* (503) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
- { 447, -8 }, /* (504) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
- { 447, -7 }, /* (505) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
- { 388, 0 }, /* (506) sliding_opt ::= */
- { 388, -4 }, /* (507) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
- { 446, 0 }, /* (508) fill_opt ::= */
- { 446, -4 }, /* (509) fill_opt ::= FILL NK_LP fill_mode NK_RP */
- { 446, -6 }, /* (510) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
- { 453, -1 }, /* (511) fill_mode ::= NONE */
- { 453, -1 }, /* (512) fill_mode ::= PREV */
- { 453, -1 }, /* (513) fill_mode ::= NULL */
- { 453, -1 }, /* (514) fill_mode ::= LINEAR */
- { 453, -1 }, /* (515) fill_mode ::= NEXT */
- { 448, 0 }, /* (516) group_by_clause_opt ::= */
- { 448, -3 }, /* (517) group_by_clause_opt ::= GROUP BY group_by_list */
- { 454, -1 }, /* (518) group_by_list ::= expr_or_subquery */
- { 454, -3 }, /* (519) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
- { 449, 0 }, /* (520) having_clause_opt ::= */
- { 449, -2 }, /* (521) having_clause_opt ::= HAVING search_condition */
- { 444, 0 }, /* (522) range_opt ::= */
- { 444, -6 }, /* (523) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
- { 445, 0 }, /* (524) every_opt ::= */
- { 445, -4 }, /* (525) every_opt ::= EVERY NK_LP duration_literal NK_RP */
- { 455, -4 }, /* (526) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
- { 456, -1 }, /* (527) query_simple ::= query_specification */
- { 456, -1 }, /* (528) query_simple ::= union_query_expression */
- { 460, -4 }, /* (529) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
- { 460, -3 }, /* (530) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
- { 461, -1 }, /* (531) query_simple_or_subquery ::= query_simple */
- { 461, -1 }, /* (532) query_simple_or_subquery ::= subquery */
- { 392, -1 }, /* (533) query_or_subquery ::= query_expression */
- { 392, -1 }, /* (534) query_or_subquery ::= subquery */
- { 457, 0 }, /* (535) order_by_clause_opt ::= */
- { 457, -3 }, /* (536) order_by_clause_opt ::= ORDER BY sort_specification_list */
- { 458, 0 }, /* (537) slimit_clause_opt ::= */
- { 458, -2 }, /* (538) slimit_clause_opt ::= SLIMIT NK_INTEGER */
- { 458, -4 }, /* (539) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
- { 458, -4 }, /* (540) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
- { 459, 0 }, /* (541) limit_clause_opt ::= */
- { 459, -2 }, /* (542) limit_clause_opt ::= LIMIT NK_INTEGER */
- { 459, -4 }, /* (543) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
- { 459, -4 }, /* (544) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
- { 436, -3 }, /* (545) subquery ::= NK_LP query_expression NK_RP */
- { 436, -3 }, /* (546) subquery ::= NK_LP subquery NK_RP */
- { 439, -1 }, /* (547) search_condition ::= common_expression */
- { 462, -1 }, /* (548) sort_specification_list ::= sort_specification */
- { 462, -3 }, /* (549) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
- { 463, -3 }, /* (550) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
- { 464, 0 }, /* (551) ordering_specification_opt ::= */
- { 464, -1 }, /* (552) ordering_specification_opt ::= ASC */
- { 464, -1 }, /* (553) ordering_specification_opt ::= DESC */
- { 465, 0 }, /* (554) null_ordering_opt ::= */
- { 465, -2 }, /* (555) null_ordering_opt ::= NULLS FIRST */
- { 465, -2 }, /* (556) null_ordering_opt ::= NULLS LAST */
+ { 326, -4 }, /* (293) cmd ::= EXPLAIN analyze_opt explain_options insert_query */
+ { 394, 0 }, /* (294) analyze_opt ::= */
+ { 394, -1 }, /* (295) analyze_opt ::= ANALYZE */
+ { 395, 0 }, /* (296) explain_options ::= */
+ { 395, -3 }, /* (297) explain_options ::= explain_options VERBOSE NK_BOOL */
+ { 395, -3 }, /* (298) explain_options ::= explain_options RATIO NK_FLOAT */
+ { 326, -10 }, /* (299) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
+ { 326, -4 }, /* (300) cmd ::= DROP FUNCTION exists_opt function_name */
+ { 397, 0 }, /* (301) agg_func_opt ::= */
+ { 397, -1 }, /* (302) agg_func_opt ::= AGGREGATE */
+ { 398, 0 }, /* (303) bufsize_opt ::= */
+ { 398, -2 }, /* (304) bufsize_opt ::= BUFSIZE NK_INTEGER */
+ { 326, -12 }, /* (305) 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 */
+ { 326, -4 }, /* (306) cmd ::= DROP STREAM exists_opt stream_name */
+ { 401, 0 }, /* (307) col_list_opt ::= */
+ { 401, -3 }, /* (308) col_list_opt ::= NK_LP col_name_list NK_RP */
+ { 402, 0 }, /* (309) tag_def_or_ref_opt ::= */
+ { 402, -1 }, /* (310) tag_def_or_ref_opt ::= tags_def */
+ { 402, -4 }, /* (311) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */
+ { 400, 0 }, /* (312) stream_options ::= */
+ { 400, -3 }, /* (313) stream_options ::= stream_options TRIGGER AT_ONCE */
+ { 400, -3 }, /* (314) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
+ { 400, -4 }, /* (315) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
+ { 400, -3 }, /* (316) stream_options ::= stream_options WATERMARK duration_literal */
+ { 400, -4 }, /* (317) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
+ { 400, -3 }, /* (318) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
+ { 403, 0 }, /* (319) subtable_opt ::= */
+ { 403, -4 }, /* (320) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
+ { 326, -3 }, /* (321) cmd ::= KILL CONNECTION NK_INTEGER */
+ { 326, -3 }, /* (322) cmd ::= KILL QUERY NK_STRING */
+ { 326, -3 }, /* (323) cmd ::= KILL TRANSACTION NK_INTEGER */
+ { 326, -2 }, /* (324) cmd ::= BALANCE VGROUP */
+ { 326, -4 }, /* (325) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
+ { 326, -4 }, /* (326) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
+ { 326, -3 }, /* (327) cmd ::= SPLIT VGROUP NK_INTEGER */
+ { 405, -2 }, /* (328) dnode_list ::= DNODE NK_INTEGER */
+ { 405, -3 }, /* (329) dnode_list ::= dnode_list DNODE NK_INTEGER */
+ { 326, -4 }, /* (330) cmd ::= DELETE FROM full_table_name where_clause_opt */
+ { 326, -1 }, /* (331) cmd ::= query_or_subquery */
+ { 326, -1 }, /* (332) cmd ::= insert_query */
+ { 396, -7 }, /* (333) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
+ { 396, -4 }, /* (334) insert_query ::= INSERT INTO full_table_name query_or_subquery */
+ { 329, -1 }, /* (335) literal ::= NK_INTEGER */
+ { 329, -1 }, /* (336) literal ::= NK_FLOAT */
+ { 329, -1 }, /* (337) literal ::= NK_STRING */
+ { 329, -1 }, /* (338) literal ::= NK_BOOL */
+ { 329, -2 }, /* (339) literal ::= TIMESTAMP NK_STRING */
+ { 329, -1 }, /* (340) literal ::= duration_literal */
+ { 329, -1 }, /* (341) literal ::= NULL */
+ { 329, -1 }, /* (342) literal ::= NK_QUESTION */
+ { 373, -1 }, /* (343) duration_literal ::= NK_VARIABLE */
+ { 407, -1 }, /* (344) signed ::= NK_INTEGER */
+ { 407, -2 }, /* (345) signed ::= NK_PLUS NK_INTEGER */
+ { 407, -2 }, /* (346) signed ::= NK_MINUS NK_INTEGER */
+ { 407, -1 }, /* (347) signed ::= NK_FLOAT */
+ { 407, -2 }, /* (348) signed ::= NK_PLUS NK_FLOAT */
+ { 407, -2 }, /* (349) signed ::= NK_MINUS NK_FLOAT */
+ { 362, -1 }, /* (350) signed_literal ::= signed */
+ { 362, -1 }, /* (351) signed_literal ::= NK_STRING */
+ { 362, -1 }, /* (352) signed_literal ::= NK_BOOL */
+ { 362, -2 }, /* (353) signed_literal ::= TIMESTAMP NK_STRING */
+ { 362, -1 }, /* (354) signed_literal ::= duration_literal */
+ { 362, -1 }, /* (355) signed_literal ::= NULL */
+ { 362, -1 }, /* (356) signed_literal ::= literal_func */
+ { 362, -1 }, /* (357) signed_literal ::= NK_QUESTION */
+ { 409, -1 }, /* (358) literal_list ::= signed_literal */
+ { 409, -3 }, /* (359) literal_list ::= literal_list NK_COMMA signed_literal */
+ { 337, -1 }, /* (360) db_name ::= NK_ID */
+ { 368, -1 }, /* (361) table_name ::= NK_ID */
+ { 360, -1 }, /* (362) column_name ::= NK_ID */
+ { 375, -1 }, /* (363) function_name ::= NK_ID */
+ { 410, -1 }, /* (364) table_alias ::= NK_ID */
+ { 383, -1 }, /* (365) column_alias ::= NK_ID */
+ { 331, -1 }, /* (366) user_name ::= NK_ID */
+ { 338, -1 }, /* (367) topic_name ::= NK_ID */
+ { 399, -1 }, /* (368) stream_name ::= NK_ID */
+ { 393, -1 }, /* (369) cgroup_name ::= NK_ID */
+ { 386, -1 }, /* (370) index_name ::= NK_ID */
+ { 411, -1 }, /* (371) expr_or_subquery ::= expression */
+ { 404, -1 }, /* (372) expression ::= literal */
+ { 404, -1 }, /* (373) expression ::= pseudo_column */
+ { 404, -1 }, /* (374) expression ::= column_reference */
+ { 404, -1 }, /* (375) expression ::= function_expression */
+ { 404, -1 }, /* (376) expression ::= case_when_expression */
+ { 404, -3 }, /* (377) expression ::= NK_LP expression NK_RP */
+ { 404, -2 }, /* (378) expression ::= NK_PLUS expr_or_subquery */
+ { 404, -2 }, /* (379) expression ::= NK_MINUS expr_or_subquery */
+ { 404, -3 }, /* (380) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
+ { 404, -3 }, /* (381) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
+ { 404, -3 }, /* (382) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
+ { 404, -3 }, /* (383) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
+ { 404, -3 }, /* (384) expression ::= expr_or_subquery NK_REM expr_or_subquery */
+ { 404, -3 }, /* (385) expression ::= column_reference NK_ARROW NK_STRING */
+ { 404, -3 }, /* (386) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
+ { 404, -3 }, /* (387) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
+ { 365, -1 }, /* (388) expression_list ::= expr_or_subquery */
+ { 365, -3 }, /* (389) expression_list ::= expression_list NK_COMMA expr_or_subquery */
+ { 413, -1 }, /* (390) column_reference ::= column_name */
+ { 413, -3 }, /* (391) column_reference ::= table_name NK_DOT column_name */
+ { 412, -1 }, /* (392) pseudo_column ::= ROWTS */
+ { 412, -1 }, /* (393) pseudo_column ::= TBNAME */
+ { 412, -3 }, /* (394) pseudo_column ::= table_name NK_DOT TBNAME */
+ { 412, -1 }, /* (395) pseudo_column ::= QSTART */
+ { 412, -1 }, /* (396) pseudo_column ::= QEND */
+ { 412, -1 }, /* (397) pseudo_column ::= QDURATION */
+ { 412, -1 }, /* (398) pseudo_column ::= WSTART */
+ { 412, -1 }, /* (399) pseudo_column ::= WEND */
+ { 412, -1 }, /* (400) pseudo_column ::= WDURATION */
+ { 412, -1 }, /* (401) pseudo_column ::= IROWTS */
+ { 412, -1 }, /* (402) pseudo_column ::= ISFILLED */
+ { 412, -1 }, /* (403) pseudo_column ::= QTAGS */
+ { 414, -4 }, /* (404) function_expression ::= function_name NK_LP expression_list NK_RP */
+ { 414, -4 }, /* (405) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
+ { 414, -6 }, /* (406) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
+ { 414, -1 }, /* (407) function_expression ::= literal_func */
+ { 408, -3 }, /* (408) literal_func ::= noarg_func NK_LP NK_RP */
+ { 408, -1 }, /* (409) literal_func ::= NOW */
+ { 418, -1 }, /* (410) noarg_func ::= NOW */
+ { 418, -1 }, /* (411) noarg_func ::= TODAY */
+ { 418, -1 }, /* (412) noarg_func ::= TIMEZONE */
+ { 418, -1 }, /* (413) noarg_func ::= DATABASE */
+ { 418, -1 }, /* (414) noarg_func ::= CLIENT_VERSION */
+ { 418, -1 }, /* (415) noarg_func ::= SERVER_VERSION */
+ { 418, -1 }, /* (416) noarg_func ::= SERVER_STATUS */
+ { 418, -1 }, /* (417) noarg_func ::= CURRENT_USER */
+ { 418, -1 }, /* (418) noarg_func ::= USER */
+ { 416, -1 }, /* (419) star_func ::= COUNT */
+ { 416, -1 }, /* (420) star_func ::= FIRST */
+ { 416, -1 }, /* (421) star_func ::= LAST */
+ { 416, -1 }, /* (422) star_func ::= LAST_ROW */
+ { 417, -1 }, /* (423) star_func_para_list ::= NK_STAR */
+ { 417, -1 }, /* (424) star_func_para_list ::= other_para_list */
+ { 419, -1 }, /* (425) other_para_list ::= star_func_para */
+ { 419, -3 }, /* (426) other_para_list ::= other_para_list NK_COMMA star_func_para */
+ { 420, -1 }, /* (427) star_func_para ::= expr_or_subquery */
+ { 420, -3 }, /* (428) star_func_para ::= table_name NK_DOT NK_STAR */
+ { 415, -4 }, /* (429) case_when_expression ::= CASE when_then_list case_when_else_opt END */
+ { 415, -5 }, /* (430) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
+ { 421, -1 }, /* (431) when_then_list ::= when_then_expr */
+ { 421, -2 }, /* (432) when_then_list ::= when_then_list when_then_expr */
+ { 424, -4 }, /* (433) when_then_expr ::= WHEN common_expression THEN common_expression */
+ { 422, 0 }, /* (434) case_when_else_opt ::= */
+ { 422, -2 }, /* (435) case_when_else_opt ::= ELSE common_expression */
+ { 425, -3 }, /* (436) predicate ::= expr_or_subquery compare_op expr_or_subquery */
+ { 425, -5 }, /* (437) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
+ { 425, -6 }, /* (438) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
+ { 425, -3 }, /* (439) predicate ::= expr_or_subquery IS NULL */
+ { 425, -4 }, /* (440) predicate ::= expr_or_subquery IS NOT NULL */
+ { 425, -3 }, /* (441) predicate ::= expr_or_subquery in_op in_predicate_value */
+ { 426, -1 }, /* (442) compare_op ::= NK_LT */
+ { 426, -1 }, /* (443) compare_op ::= NK_GT */
+ { 426, -1 }, /* (444) compare_op ::= NK_LE */
+ { 426, -1 }, /* (445) compare_op ::= NK_GE */
+ { 426, -1 }, /* (446) compare_op ::= NK_NE */
+ { 426, -1 }, /* (447) compare_op ::= NK_EQ */
+ { 426, -1 }, /* (448) compare_op ::= LIKE */
+ { 426, -2 }, /* (449) compare_op ::= NOT LIKE */
+ { 426, -1 }, /* (450) compare_op ::= MATCH */
+ { 426, -1 }, /* (451) compare_op ::= NMATCH */
+ { 426, -1 }, /* (452) compare_op ::= CONTAINS */
+ { 427, -1 }, /* (453) in_op ::= IN */
+ { 427, -2 }, /* (454) in_op ::= NOT IN */
+ { 428, -3 }, /* (455) in_predicate_value ::= NK_LP literal_list NK_RP */
+ { 429, -1 }, /* (456) boolean_value_expression ::= boolean_primary */
+ { 429, -2 }, /* (457) boolean_value_expression ::= NOT boolean_primary */
+ { 429, -3 }, /* (458) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
+ { 429, -3 }, /* (459) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
+ { 430, -1 }, /* (460) boolean_primary ::= predicate */
+ { 430, -3 }, /* (461) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
+ { 423, -1 }, /* (462) common_expression ::= expr_or_subquery */
+ { 423, -1 }, /* (463) common_expression ::= boolean_value_expression */
+ { 431, 0 }, /* (464) from_clause_opt ::= */
+ { 431, -2 }, /* (465) from_clause_opt ::= FROM table_reference_list */
+ { 432, -1 }, /* (466) table_reference_list ::= table_reference */
+ { 432, -3 }, /* (467) table_reference_list ::= table_reference_list NK_COMMA table_reference */
+ { 433, -1 }, /* (468) table_reference ::= table_primary */
+ { 433, -1 }, /* (469) table_reference ::= joined_table */
+ { 434, -2 }, /* (470) table_primary ::= table_name alias_opt */
+ { 434, -4 }, /* (471) table_primary ::= db_name NK_DOT table_name alias_opt */
+ { 434, -2 }, /* (472) table_primary ::= subquery alias_opt */
+ { 434, -1 }, /* (473) table_primary ::= parenthesized_joined_table */
+ { 436, 0 }, /* (474) alias_opt ::= */
+ { 436, -1 }, /* (475) alias_opt ::= table_alias */
+ { 436, -2 }, /* (476) alias_opt ::= AS table_alias */
+ { 438, -3 }, /* (477) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
+ { 438, -3 }, /* (478) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
+ { 435, -6 }, /* (479) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
+ { 439, 0 }, /* (480) join_type ::= */
+ { 439, -1 }, /* (481) join_type ::= INNER */
+ { 441, -12 }, /* (482) 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 */
+ { 442, 0 }, /* (483) set_quantifier_opt ::= */
+ { 442, -1 }, /* (484) set_quantifier_opt ::= DISTINCT */
+ { 442, -1 }, /* (485) set_quantifier_opt ::= ALL */
+ { 443, -1 }, /* (486) select_list ::= select_item */
+ { 443, -3 }, /* (487) select_list ::= select_list NK_COMMA select_item */
+ { 451, -1 }, /* (488) select_item ::= NK_STAR */
+ { 451, -1 }, /* (489) select_item ::= common_expression */
+ { 451, -2 }, /* (490) select_item ::= common_expression column_alias */
+ { 451, -3 }, /* (491) select_item ::= common_expression AS column_alias */
+ { 451, -3 }, /* (492) select_item ::= table_name NK_DOT NK_STAR */
+ { 406, 0 }, /* (493) where_clause_opt ::= */
+ { 406, -2 }, /* (494) where_clause_opt ::= WHERE search_condition */
+ { 444, 0 }, /* (495) partition_by_clause_opt ::= */
+ { 444, -3 }, /* (496) partition_by_clause_opt ::= PARTITION BY partition_list */
+ { 452, -1 }, /* (497) partition_list ::= partition_item */
+ { 452, -3 }, /* (498) partition_list ::= partition_list NK_COMMA partition_item */
+ { 453, -1 }, /* (499) partition_item ::= expr_or_subquery */
+ { 453, -2 }, /* (500) partition_item ::= expr_or_subquery column_alias */
+ { 453, -3 }, /* (501) partition_item ::= expr_or_subquery AS column_alias */
+ { 448, 0 }, /* (502) twindow_clause_opt ::= */
+ { 448, -6 }, /* (503) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
+ { 448, -4 }, /* (504) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
+ { 448, -6 }, /* (505) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
+ { 448, -8 }, /* (506) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
+ { 448, -7 }, /* (507) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
+ { 388, 0 }, /* (508) sliding_opt ::= */
+ { 388, -4 }, /* (509) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
+ { 447, 0 }, /* (510) fill_opt ::= */
+ { 447, -4 }, /* (511) fill_opt ::= FILL NK_LP fill_mode NK_RP */
+ { 447, -6 }, /* (512) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
+ { 454, -1 }, /* (513) fill_mode ::= NONE */
+ { 454, -1 }, /* (514) fill_mode ::= PREV */
+ { 454, -1 }, /* (515) fill_mode ::= NULL */
+ { 454, -1 }, /* (516) fill_mode ::= LINEAR */
+ { 454, -1 }, /* (517) fill_mode ::= NEXT */
+ { 449, 0 }, /* (518) group_by_clause_opt ::= */
+ { 449, -3 }, /* (519) group_by_clause_opt ::= GROUP BY group_by_list */
+ { 455, -1 }, /* (520) group_by_list ::= expr_or_subquery */
+ { 455, -3 }, /* (521) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
+ { 450, 0 }, /* (522) having_clause_opt ::= */
+ { 450, -2 }, /* (523) having_clause_opt ::= HAVING search_condition */
+ { 445, 0 }, /* (524) range_opt ::= */
+ { 445, -6 }, /* (525) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
+ { 446, 0 }, /* (526) every_opt ::= */
+ { 446, -4 }, /* (527) every_opt ::= EVERY NK_LP duration_literal NK_RP */
+ { 456, -4 }, /* (528) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
+ { 457, -1 }, /* (529) query_simple ::= query_specification */
+ { 457, -1 }, /* (530) query_simple ::= union_query_expression */
+ { 461, -4 }, /* (531) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
+ { 461, -3 }, /* (532) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
+ { 462, -1 }, /* (533) query_simple_or_subquery ::= query_simple */
+ { 462, -1 }, /* (534) query_simple_or_subquery ::= subquery */
+ { 392, -1 }, /* (535) query_or_subquery ::= query_expression */
+ { 392, -1 }, /* (536) query_or_subquery ::= subquery */
+ { 458, 0 }, /* (537) order_by_clause_opt ::= */
+ { 458, -3 }, /* (538) order_by_clause_opt ::= ORDER BY sort_specification_list */
+ { 459, 0 }, /* (539) slimit_clause_opt ::= */
+ { 459, -2 }, /* (540) slimit_clause_opt ::= SLIMIT NK_INTEGER */
+ { 459, -4 }, /* (541) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
+ { 459, -4 }, /* (542) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
+ { 460, 0 }, /* (543) limit_clause_opt ::= */
+ { 460, -2 }, /* (544) limit_clause_opt ::= LIMIT NK_INTEGER */
+ { 460, -4 }, /* (545) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
+ { 460, -4 }, /* (546) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
+ { 437, -3 }, /* (547) subquery ::= NK_LP query_expression NK_RP */
+ { 437, -3 }, /* (548) subquery ::= NK_LP subquery NK_RP */
+ { 440, -1 }, /* (549) search_condition ::= common_expression */
+ { 463, -1 }, /* (550) sort_specification_list ::= sort_specification */
+ { 463, -3 }, /* (551) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
+ { 464, -3 }, /* (552) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
+ { 465, 0 }, /* (553) ordering_specification_opt ::= */
+ { 465, -1 }, /* (554) ordering_specification_opt ::= ASC */
+ { 465, -1 }, /* (555) ordering_specification_opt ::= DESC */
+ { 466, 0 }, /* (556) null_ordering_opt ::= */
+ { 466, -2 }, /* (557) null_ordering_opt ::= NULLS FIRST */
+ { 466, -2 }, /* (558) null_ordering_opt ::= NULLS LAST */
};
static void yy_accept(yyParser*); /* Forward Declaration */
@@ -3800,78 +3748,78 @@ static YYACTIONTYPE yy_reduce(
yy_destructor(yypParser,329,&yymsp[0].minor);
break;
case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
-{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy233, &yymsp[-1].minor.yy0, yymsp[0].minor.yy27); }
+{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy455, &yymsp[-1].minor.yy0, yymsp[0].minor.yy169); }
break;
case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy233, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy455, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
break;
case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy233, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy455, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
break;
case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy233, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy455, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
break;
case 28: /* cmd ::= DROP USER user_name */
-{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy233); }
+{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy455); }
break;
case 29: /* sysinfo_opt ::= */
-{ yymsp[1].minor.yy27 = 1; }
+{ yymsp[1].minor.yy169 = 1; }
break;
case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */
-{ yymsp[-1].minor.yy27 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
+{ yymsp[-1].minor.yy169 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 31: /* cmd ::= GRANT privileges ON priv_level TO user_name */
-{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy129, &yymsp[-2].minor.yy233, &yymsp[0].minor.yy233); }
+{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy91, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); }
break;
case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */
-{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy129, &yymsp[-2].minor.yy233, &yymsp[0].minor.yy233); }
+{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy91, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); }
break;
case 33: /* privileges ::= ALL */
-{ yymsp[0].minor.yy129 = PRIVILEGE_TYPE_ALL; }
+{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_ALL; }
break;
case 34: /* privileges ::= priv_type_list */
case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36);
-{ yylhsminor.yy129 = yymsp[0].minor.yy129; }
- yymsp[0].minor.yy129 = yylhsminor.yy129;
+{ yylhsminor.yy91 = yymsp[0].minor.yy91; }
+ yymsp[0].minor.yy91 = yylhsminor.yy91;
break;
case 35: /* privileges ::= SUBSCRIBE */
-{ yymsp[0].minor.yy129 = PRIVILEGE_TYPE_SUBSCRIBE; }
+{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_SUBSCRIBE; }
break;
case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */
-{ yylhsminor.yy129 = yymsp[-2].minor.yy129 | yymsp[0].minor.yy129; }
- yymsp[-2].minor.yy129 = yylhsminor.yy129;
+{ yylhsminor.yy91 = yymsp[-2].minor.yy91 | yymsp[0].minor.yy91; }
+ yymsp[-2].minor.yy91 = yylhsminor.yy91;
break;
case 38: /* priv_type ::= READ */
-{ yymsp[0].minor.yy129 = PRIVILEGE_TYPE_READ; }
+{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_READ; }
break;
case 39: /* priv_type ::= WRITE */
-{ yymsp[0].minor.yy129 = PRIVILEGE_TYPE_WRITE; }
+{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_WRITE; }
break;
case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */
-{ yylhsminor.yy233 = yymsp[-2].minor.yy0; }
- yymsp[-2].minor.yy233 = yylhsminor.yy233;
+{ yylhsminor.yy455 = yymsp[-2].minor.yy0; }
+ yymsp[-2].minor.yy455 = yylhsminor.yy455;
break;
case 41: /* priv_level ::= db_name NK_DOT NK_STAR */
-{ yylhsminor.yy233 = yymsp[-2].minor.yy233; }
- yymsp[-2].minor.yy233 = yylhsminor.yy233;
+{ yylhsminor.yy455 = yymsp[-2].minor.yy455; }
+ yymsp[-2].minor.yy455 = yylhsminor.yy455;
break;
case 42: /* priv_level ::= topic_name */
case 273: /* sma_func_name ::= function_name */ yytestcase(yyruleno==273);
- case 473: /* alias_opt ::= table_alias */ yytestcase(yyruleno==473);
-{ yylhsminor.yy233 = yymsp[0].minor.yy233; }
- yymsp[0].minor.yy233 = yylhsminor.yy233;
+ case 475: /* alias_opt ::= table_alias */ yytestcase(yyruleno==475);
+{ yylhsminor.yy455 = yymsp[0].minor.yy455; }
+ yymsp[0].minor.yy455 = yylhsminor.yy455;
break;
case 43: /* cmd ::= CREATE DNODE dnode_endpoint */
-{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy233, NULL); }
+{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy455, NULL); }
break;
case 44: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
-{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy233, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0); }
break;
case 45: /* cmd ::= DROP DNODE NK_INTEGER force_opt */
-{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy397); }
+{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy163); }
break;
case 46: /* cmd ::= DROP DNODE dnode_endpoint force_opt */
-{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy233, yymsp[0].minor.yy397); }
+{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy163); }
break;
case 47: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); }
@@ -3892,46 +3840,46 @@ static YYACTIONTYPE yy_reduce(
case 275: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==275);
case 276: /* sma_func_name ::= LAST */ yytestcase(yyruleno==276);
case 277: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==277);
- case 358: /* db_name ::= NK_ID */ yytestcase(yyruleno==358);
- case 359: /* table_name ::= NK_ID */ yytestcase(yyruleno==359);
- case 360: /* column_name ::= NK_ID */ yytestcase(yyruleno==360);
- case 361: /* function_name ::= NK_ID */ yytestcase(yyruleno==361);
- case 362: /* table_alias ::= NK_ID */ yytestcase(yyruleno==362);
- case 363: /* column_alias ::= NK_ID */ yytestcase(yyruleno==363);
- case 364: /* user_name ::= NK_ID */ yytestcase(yyruleno==364);
- case 365: /* topic_name ::= NK_ID */ yytestcase(yyruleno==365);
- case 366: /* stream_name ::= NK_ID */ yytestcase(yyruleno==366);
- case 367: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==367);
- case 368: /* index_name ::= NK_ID */ yytestcase(yyruleno==368);
- case 408: /* noarg_func ::= NOW */ yytestcase(yyruleno==408);
- case 409: /* noarg_func ::= TODAY */ yytestcase(yyruleno==409);
- case 410: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==410);
- case 411: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==411);
- case 412: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==412);
- case 413: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==413);
- case 414: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==414);
- case 415: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==415);
- case 416: /* noarg_func ::= USER */ yytestcase(yyruleno==416);
- case 417: /* star_func ::= COUNT */ yytestcase(yyruleno==417);
- case 418: /* star_func ::= FIRST */ yytestcase(yyruleno==418);
- case 419: /* star_func ::= LAST */ yytestcase(yyruleno==419);
- case 420: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==420);
-{ yylhsminor.yy233 = yymsp[0].minor.yy0; }
- yymsp[0].minor.yy233 = yylhsminor.yy233;
+ case 360: /* db_name ::= NK_ID */ yytestcase(yyruleno==360);
+ case 361: /* table_name ::= NK_ID */ yytestcase(yyruleno==361);
+ case 362: /* column_name ::= NK_ID */ yytestcase(yyruleno==362);
+ case 363: /* function_name ::= NK_ID */ yytestcase(yyruleno==363);
+ case 364: /* table_alias ::= NK_ID */ yytestcase(yyruleno==364);
+ case 365: /* column_alias ::= NK_ID */ yytestcase(yyruleno==365);
+ case 366: /* user_name ::= NK_ID */ yytestcase(yyruleno==366);
+ case 367: /* topic_name ::= NK_ID */ yytestcase(yyruleno==367);
+ case 368: /* stream_name ::= NK_ID */ yytestcase(yyruleno==368);
+ case 369: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==369);
+ case 370: /* index_name ::= NK_ID */ yytestcase(yyruleno==370);
+ case 410: /* noarg_func ::= NOW */ yytestcase(yyruleno==410);
+ case 411: /* noarg_func ::= TODAY */ yytestcase(yyruleno==411);
+ case 412: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==412);
+ case 413: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==413);
+ case 414: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==414);
+ case 415: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==415);
+ case 416: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==416);
+ case 417: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==417);
+ case 418: /* noarg_func ::= USER */ yytestcase(yyruleno==418);
+ case 419: /* star_func ::= COUNT */ yytestcase(yyruleno==419);
+ case 420: /* star_func ::= FIRST */ yytestcase(yyruleno==420);
+ case 421: /* star_func ::= LAST */ yytestcase(yyruleno==421);
+ case 422: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==422);
+{ yylhsminor.yy455 = yymsp[0].minor.yy0; }
+ yymsp[0].minor.yy455 = yylhsminor.yy455;
break;
case 54: /* force_opt ::= */
case 74: /* not_exists_opt ::= */ yytestcase(yyruleno==74);
case 76: /* exists_opt ::= */ yytestcase(yyruleno==76);
- case 293: /* analyze_opt ::= */ yytestcase(yyruleno==293);
- case 300: /* agg_func_opt ::= */ yytestcase(yyruleno==300);
- case 481: /* set_quantifier_opt ::= */ yytestcase(yyruleno==481);
-{ yymsp[1].minor.yy397 = false; }
+ case 294: /* analyze_opt ::= */ yytestcase(yyruleno==294);
+ case 301: /* agg_func_opt ::= */ yytestcase(yyruleno==301);
+ case 483: /* set_quantifier_opt ::= */ yytestcase(yyruleno==483);
+{ yymsp[1].minor.yy163 = false; }
break;
case 55: /* force_opt ::= FORCE */
- case 294: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==294);
- case 301: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==301);
- case 482: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==482);
-{ yymsp[0].minor.yy397 = true; }
+ case 295: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==295);
+ case 302: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==302);
+ case 484: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==484);
+{ yymsp[0].minor.yy163 = true; }
break;
case 56: /* cmd ::= ALTER LOCAL NK_STRING */
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
@@ -3964,209 +3912,209 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); }
break;
case 66: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
-{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy397, &yymsp[-1].minor.yy233, yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy163, &yymsp[-1].minor.yy455, yymsp[0].minor.yy44); }
break;
case 67: /* cmd ::= DROP DATABASE exists_opt db_name */
-{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy397, &yymsp[0].minor.yy233); }
+{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); }
break;
case 68: /* cmd ::= USE db_name */
-{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy233); }
+{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy455); }
break;
case 69: /* cmd ::= ALTER DATABASE db_name alter_db_options */
-{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy233, yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy44); }
break;
case 70: /* cmd ::= FLUSH DATABASE db_name */
-{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy233); }
+{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy455); }
break;
case 71: /* cmd ::= TRIM DATABASE db_name speed_opt */
-{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy233, yymsp[0].minor.yy832); }
+{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy832); }
break;
case 72: /* cmd ::= COMPACT DATABASE db_name */
-{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[0].minor.yy233); }
+{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[0].minor.yy455); }
break;
case 73: /* not_exists_opt ::= IF NOT EXISTS */
-{ yymsp[-2].minor.yy397 = true; }
+{ yymsp[-2].minor.yy163 = true; }
break;
case 75: /* exists_opt ::= IF EXISTS */
-{ yymsp[-1].minor.yy397 = true; }
+{ yymsp[-1].minor.yy163 = true; }
break;
case 77: /* db_options ::= */
-{ yymsp[1].minor.yy924 = createDefaultDatabaseOptions(pCxt); }
+{ yymsp[1].minor.yy44 = createDefaultDatabaseOptions(pCxt); }
break;
case 78: /* db_options ::= db_options BUFFER NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 79: /* db_options ::= db_options CACHEMODEL NK_STRING */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 80: /* db_options ::= db_options CACHESIZE NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 81: /* db_options ::= db_options COMP NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 82: /* db_options ::= db_options DURATION NK_INTEGER */
case 83: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==83);
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 84: /* db_options ::= db_options MAXROWS NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 85: /* db_options ::= db_options MINROWS NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 86: /* db_options ::= db_options KEEP integer_list */
case 87: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==87);
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_KEEP, yymsp[0].minor.yy776); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_KEEP, yymsp[0].minor.yy684); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 88: /* db_options ::= db_options PAGES NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 89: /* db_options ::= db_options PAGESIZE NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 90: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 91: /* db_options ::= db_options PRECISION NK_STRING */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 92: /* db_options ::= db_options REPLICA NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 93: /* db_options ::= db_options VGROUPS NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 94: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 95: /* db_options ::= db_options RETENTIONS retention_list */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_RETENTIONS, yymsp[0].minor.yy776); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_RETENTIONS, yymsp[0].minor.yy684); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 96: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 97: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 98: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 99: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 100: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
- yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-3].minor.yy924, DB_OPTION_WAL_RETENTION_PERIOD, &t);
+ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-3].minor.yy44, DB_OPTION_WAL_RETENTION_PERIOD, &t);
}
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
case 101: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 102: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
- yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-3].minor.yy924, DB_OPTION_WAL_RETENTION_SIZE, &t);
+ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-3].minor.yy44, DB_OPTION_WAL_RETENTION_SIZE, &t);
}
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
case 103: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 104: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 105: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 106: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 107: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */
-{ yylhsminor.yy924 = setDatabaseOption(pCxt, yymsp[-2].minor.yy924, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 108: /* alter_db_options ::= alter_db_option */
-{ yylhsminor.yy924 = createAlterDatabaseOptions(pCxt); yylhsminor.yy924 = setAlterDatabaseOption(pCxt, yylhsminor.yy924, &yymsp[0].minor.yy257); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterDatabaseOptions(pCxt); yylhsminor.yy44 = setAlterDatabaseOption(pCxt, yylhsminor.yy44, &yymsp[0].minor.yy153); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
case 109: /* alter_db_options ::= alter_db_options alter_db_option */
-{ yylhsminor.yy924 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy924, &yymsp[0].minor.yy257); }
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy44, &yymsp[0].minor.yy153); }
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
case 110: /* alter_db_option ::= BUFFER NK_INTEGER */
-{ yymsp[-1].minor.yy257.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy257.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy153.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; }
break;
case 111: /* alter_db_option ::= CACHEMODEL NK_STRING */
-{ yymsp[-1].minor.yy257.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy257.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy153.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; }
break;
case 112: /* alter_db_option ::= CACHESIZE NK_INTEGER */
-{ yymsp[-1].minor.yy257.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy257.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy153.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; }
break;
case 113: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
-{ yymsp[-1].minor.yy257.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy257.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy153.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; }
break;
case 114: /* alter_db_option ::= KEEP integer_list */
case 115: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==115);
-{ yymsp[-1].minor.yy257.type = DB_OPTION_KEEP; yymsp[-1].minor.yy257.pList = yymsp[0].minor.yy776; }
+{ yymsp[-1].minor.yy153.type = DB_OPTION_KEEP; yymsp[-1].minor.yy153.pList = yymsp[0].minor.yy684; }
break;
case 116: /* alter_db_option ::= PAGES NK_INTEGER */
-{ yymsp[-1].minor.yy257.type = DB_OPTION_PAGES; yymsp[-1].minor.yy257.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy153.type = DB_OPTION_PAGES; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; }
break;
case 117: /* alter_db_option ::= REPLICA NK_INTEGER */
-{ yymsp[-1].minor.yy257.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy257.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy153.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; }
break;
case 118: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */
-{ yymsp[-1].minor.yy257.type = DB_OPTION_WAL; yymsp[-1].minor.yy257.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy153.type = DB_OPTION_WAL; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; }
break;
case 119: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */
-{ yymsp[-1].minor.yy257.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy257.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy153.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; }
break;
case 120: /* integer_list ::= NK_INTEGER */
-{ yylhsminor.yy776 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy684 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy684 = yylhsminor.yy684;
break;
case 121: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */
- case 328: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==328);
-{ yylhsminor.yy776 = addNodeToList(pCxt, yymsp[-2].minor.yy776, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 329: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==329);
+{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy684 = yylhsminor.yy684;
break;
case 122: /* variable_list ::= NK_VARIABLE */
-{ yylhsminor.yy776 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy684 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy684 = yylhsminor.yy684;
break;
case 123: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
-{ yylhsminor.yy776 = addNodeToList(pCxt, yymsp[-2].minor.yy776, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy684 = yylhsminor.yy684;
break;
case 124: /* retention_list ::= retention */
case 146: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==146);
@@ -4176,14 +4124,14 @@ static YYACTIONTYPE yy_reduce(
case 205: /* col_name_list ::= col_name */ yytestcase(yyruleno==205);
case 256: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==256);
case 270: /* func_list ::= func */ yytestcase(yyruleno==270);
- case 356: /* literal_list ::= signed_literal */ yytestcase(yyruleno==356);
- case 423: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==423);
- case 429: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==429);
- case 484: /* select_list ::= select_item */ yytestcase(yyruleno==484);
- case 495: /* partition_list ::= partition_item */ yytestcase(yyruleno==495);
- case 548: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==548);
-{ yylhsminor.yy776 = createNodeList(pCxt, yymsp[0].minor.yy924); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+ case 358: /* literal_list ::= signed_literal */ yytestcase(yyruleno==358);
+ case 425: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==425);
+ case 431: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==431);
+ case 486: /* select_list ::= select_item */ yytestcase(yyruleno==486);
+ case 497: /* partition_list ::= partition_item */ yytestcase(yyruleno==497);
+ case 550: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==550);
+{ yylhsminor.yy684 = createNodeList(pCxt, yymsp[0].minor.yy44); }
+ yymsp[0].minor.yy684 = yylhsminor.yy684;
break;
case 125: /* retention_list ::= retention_list NK_COMMA retention */
case 157: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==157);
@@ -4191,276 +4139,277 @@ static YYACTIONTYPE yy_reduce(
case 206: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==206);
case 257: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==257);
case 271: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==271);
- case 357: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==357);
- case 424: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==424);
- case 485: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==485);
- case 496: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==496);
- case 549: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==549);
-{ yylhsminor.yy776 = addNodeToList(pCxt, yymsp[-2].minor.yy776, yymsp[0].minor.yy924); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 359: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==359);
+ case 426: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==426);
+ case 487: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==487);
+ case 498: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==498);
+ case 551: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==551);
+{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, yymsp[0].minor.yy44); }
+ yymsp[-2].minor.yy684 = yylhsminor.yy684;
break;
case 126: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
-{ yylhsminor.yy924 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 127: /* speed_opt ::= */
- case 302: /* bufsize_opt ::= */ yytestcase(yyruleno==302);
+ case 303: /* bufsize_opt ::= */ yytestcase(yyruleno==303);
{ yymsp[1].minor.yy832 = 0; }
break;
case 128: /* speed_opt ::= MAX_SPEED NK_INTEGER */
- case 303: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==303);
+ case 304: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==304);
{ yymsp[-1].minor.yy832 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 129: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
case 131: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==131);
-{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy397, yymsp[-5].minor.yy924, yymsp[-3].minor.yy776, yymsp[-1].minor.yy776, yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy163, yymsp[-5].minor.yy44, yymsp[-3].minor.yy684, yymsp[-1].minor.yy684, yymsp[0].minor.yy44); }
break;
case 130: /* cmd ::= CREATE TABLE multi_create_clause */
-{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy684); }
break;
case 132: /* cmd ::= DROP TABLE multi_drop_clause */
-{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy776); }
+{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy684); }
break;
case 133: /* cmd ::= DROP STABLE exists_opt full_table_name */
-{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy397, yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy163, yymsp[0].minor.yy44); }
break;
case 134: /* cmd ::= ALTER TABLE alter_table_clause */
- case 330: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==330);
-{ pCxt->pRootNode = yymsp[0].minor.yy924; }
+ case 331: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==331);
+ case 332: /* cmd ::= insert_query */ yytestcase(yyruleno==332);
+{ pCxt->pRootNode = yymsp[0].minor.yy44; }
break;
case 135: /* cmd ::= ALTER STABLE alter_table_clause */
-{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy44); }
break;
case 136: /* alter_table_clause ::= full_table_name alter_table_options */
-{ yylhsminor.yy924 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy924, yymsp[0].minor.yy924); }
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); }
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
case 137: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
-{ yylhsminor.yy924 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy924, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy233, yymsp[0].minor.yy852); }
- yymsp[-4].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); }
+ yymsp[-4].minor.yy44 = yylhsminor.yy44;
break;
case 138: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
-{ yylhsminor.yy924 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy924, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy233); }
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy44, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy455); }
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
case 139: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
-{ yylhsminor.yy924 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy924, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy233, yymsp[0].minor.yy852); }
- yymsp[-4].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); }
+ yymsp[-4].minor.yy44 = yylhsminor.yy44;
break;
case 140: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
-{ yylhsminor.yy924 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy924, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy233, &yymsp[0].minor.yy233); }
- yymsp[-4].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); }
+ yymsp[-4].minor.yy44 = yylhsminor.yy44;
break;
case 141: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
-{ yylhsminor.yy924 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy924, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy233, yymsp[0].minor.yy852); }
- yymsp[-4].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); }
+ yymsp[-4].minor.yy44 = yylhsminor.yy44;
break;
case 142: /* alter_table_clause ::= full_table_name DROP TAG column_name */
-{ yylhsminor.yy924 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy924, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy233); }
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy44, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy455); }
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
case 143: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
-{ yylhsminor.yy924 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy924, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy233, yymsp[0].minor.yy852); }
- yymsp[-4].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); }
+ yymsp[-4].minor.yy44 = yylhsminor.yy44;
break;
case 144: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
-{ yylhsminor.yy924 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy924, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy233, &yymsp[0].minor.yy233); }
- yymsp[-4].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); }
+ yymsp[-4].minor.yy44 = yylhsminor.yy44;
break;
case 145: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
-{ yylhsminor.yy924 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy924, &yymsp[-2].minor.yy233, yymsp[0].minor.yy924); }
- yymsp[-5].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy44, &yymsp[-2].minor.yy455, yymsp[0].minor.yy44); }
+ yymsp[-5].minor.yy44 = yylhsminor.yy44;
break;
case 147: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
case 150: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==150);
- case 430: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==430);
-{ yylhsminor.yy776 = addNodeToList(pCxt, yymsp[-1].minor.yy776, yymsp[0].minor.yy924); }
- yymsp[-1].minor.yy776 = yylhsminor.yy776;
+ case 432: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==432);
+{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-1].minor.yy684, yymsp[0].minor.yy44); }
+ yymsp[-1].minor.yy684 = yylhsminor.yy684;
break;
case 148: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */
-{ yylhsminor.yy924 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy397, yymsp[-8].minor.yy924, yymsp[-6].minor.yy924, yymsp[-5].minor.yy776, yymsp[-2].minor.yy776, yymsp[0].minor.yy924); }
- yymsp[-9].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy163, yymsp[-8].minor.yy44, yymsp[-6].minor.yy44, yymsp[-5].minor.yy684, yymsp[-2].minor.yy684, yymsp[0].minor.yy44); }
+ yymsp[-9].minor.yy44 = yylhsminor.yy44;
break;
case 151: /* drop_table_clause ::= exists_opt full_table_name */
-{ yylhsminor.yy924 = createDropTableClause(pCxt, yymsp[-1].minor.yy397, yymsp[0].minor.yy924); }
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createDropTableClause(pCxt, yymsp[-1].minor.yy163, yymsp[0].minor.yy44); }
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
case 152: /* specific_cols_opt ::= */
case 183: /* tags_def_opt ::= */ yytestcase(yyruleno==183);
case 255: /* tag_list_opt ::= */ yytestcase(yyruleno==255);
- case 306: /* col_list_opt ::= */ yytestcase(yyruleno==306);
- case 308: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==308);
- case 493: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==493);
- case 516: /* group_by_clause_opt ::= */ yytestcase(yyruleno==516);
- case 535: /* order_by_clause_opt ::= */ yytestcase(yyruleno==535);
-{ yymsp[1].minor.yy776 = NULL; }
+ case 307: /* col_list_opt ::= */ yytestcase(yyruleno==307);
+ case 309: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==309);
+ case 495: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==495);
+ case 518: /* group_by_clause_opt ::= */ yytestcase(yyruleno==518);
+ case 537: /* order_by_clause_opt ::= */ yytestcase(yyruleno==537);
+{ yymsp[1].minor.yy684 = NULL; }
break;
case 153: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */
- case 307: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==307);
-{ yymsp[-2].minor.yy776 = yymsp[-1].minor.yy776; }
+ case 308: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==308);
+{ yymsp[-2].minor.yy684 = yymsp[-1].minor.yy684; }
break;
case 154: /* full_table_name ::= table_name */
-{ yylhsminor.yy924 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy233, NULL); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy455, NULL); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
case 155: /* full_table_name ::= db_name NK_DOT table_name */
-{ yylhsminor.yy924 = createRealTableNode(pCxt, &yymsp[-2].minor.yy233, &yymsp[0].minor.yy233, NULL); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createRealTableNode(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455, NULL); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 158: /* column_def ::= column_name type_name */
-{ yylhsminor.yy924 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy233, yymsp[0].minor.yy852, NULL); }
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260, NULL); }
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
case 159: /* column_def ::= column_name type_name COMMENT NK_STRING */
-{ yylhsminor.yy924 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy233, yymsp[-2].minor.yy852, &yymsp[0].minor.yy0); }
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy455, yymsp[-2].minor.yy260, &yymsp[0].minor.yy0); }
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
case 160: /* type_name ::= BOOL */
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_BOOL); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_BOOL); }
break;
case 161: /* type_name ::= TINYINT */
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_TINYINT); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_TINYINT); }
break;
case 162: /* type_name ::= SMALLINT */
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
break;
case 163: /* type_name ::= INT */
case 164: /* type_name ::= INTEGER */ yytestcase(yyruleno==164);
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_INT); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_INT); }
break;
case 165: /* type_name ::= BIGINT */
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_BIGINT); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_BIGINT); }
break;
case 166: /* type_name ::= FLOAT */
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_FLOAT); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_FLOAT); }
break;
case 167: /* type_name ::= DOUBLE */
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
break;
case 168: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy852 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
break;
case 169: /* type_name ::= TIMESTAMP */
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
break;
case 170: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy852 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
break;
case 171: /* type_name ::= TINYINT UNSIGNED */
-{ yymsp[-1].minor.yy852 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
+{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
break;
case 172: /* type_name ::= SMALLINT UNSIGNED */
-{ yymsp[-1].minor.yy852 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
+{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
break;
case 173: /* type_name ::= INT UNSIGNED */
-{ yymsp[-1].minor.yy852 = createDataType(TSDB_DATA_TYPE_UINT); }
+{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_UINT); }
break;
case 174: /* type_name ::= BIGINT UNSIGNED */
-{ yymsp[-1].minor.yy852 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
+{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
break;
case 175: /* type_name ::= JSON */
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_JSON); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_JSON); }
break;
case 176: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy852 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
break;
case 177: /* type_name ::= MEDIUMBLOB */
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
break;
case 178: /* type_name ::= BLOB */
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_BLOB); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_BLOB); }
break;
case 179: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy852 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
break;
case 180: /* type_name ::= DECIMAL */
-{ yymsp[0].minor.yy852 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 181: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy852 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+{ yymsp[-3].minor.yy260 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 182: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
-{ yymsp[-5].minor.yy852 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+{ yymsp[-5].minor.yy260 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 184: /* tags_def_opt ::= tags_def */
- case 309: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==309);
- case 422: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==422);
-{ yylhsminor.yy776 = yymsp[0].minor.yy776; }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+ case 310: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==310);
+ case 424: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==424);
+{ yylhsminor.yy684 = yymsp[0].minor.yy684; }
+ yymsp[0].minor.yy684 = yylhsminor.yy684;
break;
case 185: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
- case 310: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==310);
-{ yymsp[-3].minor.yy776 = yymsp[-1].minor.yy776; }
+ case 311: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==311);
+{ yymsp[-3].minor.yy684 = yymsp[-1].minor.yy684; }
break;
case 186: /* table_options ::= */
-{ yymsp[1].minor.yy924 = createDefaultTableOptions(pCxt); }
+{ yymsp[1].minor.yy44 = createDefaultTableOptions(pCxt); }
break;
case 187: /* table_options ::= table_options COMMENT NK_STRING */
-{ yylhsminor.yy924 = setTableOption(pCxt, yymsp[-2].minor.yy924, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 188: /* table_options ::= table_options MAX_DELAY duration_list */
-{ yylhsminor.yy924 = setTableOption(pCxt, yymsp[-2].minor.yy924, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy776); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy684); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 189: /* table_options ::= table_options WATERMARK duration_list */
-{ yylhsminor.yy924 = setTableOption(pCxt, yymsp[-2].minor.yy924, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy776); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy684); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 190: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
-{ yylhsminor.yy924 = setTableOption(pCxt, yymsp[-4].minor.yy924, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy776); }
- yymsp[-4].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-4].minor.yy44, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy684); }
+ yymsp[-4].minor.yy44 = yylhsminor.yy44;
break;
case 191: /* table_options ::= table_options TTL NK_INTEGER */
-{ yylhsminor.yy924 = setTableOption(pCxt, yymsp[-2].minor.yy924, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 192: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
-{ yylhsminor.yy924 = setTableOption(pCxt, yymsp[-4].minor.yy924, TABLE_OPTION_SMA, yymsp[-1].minor.yy776); }
- yymsp[-4].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-4].minor.yy44, TABLE_OPTION_SMA, yymsp[-1].minor.yy684); }
+ yymsp[-4].minor.yy44 = yylhsminor.yy44;
break;
case 193: /* table_options ::= table_options DELETE_MARK duration_list */
-{ yylhsminor.yy924 = setTableOption(pCxt, yymsp[-2].minor.yy924, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy776); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy684); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 194: /* alter_table_options ::= alter_table_option */
-{ yylhsminor.yy924 = createAlterTableOptions(pCxt); yylhsminor.yy924 = setTableOption(pCxt, yylhsminor.yy924, yymsp[0].minor.yy257.type, &yymsp[0].minor.yy257.val); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createAlterTableOptions(pCxt); yylhsminor.yy44 = setTableOption(pCxt, yylhsminor.yy44, yymsp[0].minor.yy153.type, &yymsp[0].minor.yy153.val); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
case 195: /* alter_table_options ::= alter_table_options alter_table_option */
-{ yylhsminor.yy924 = setTableOption(pCxt, yymsp[-1].minor.yy924, yymsp[0].minor.yy257.type, &yymsp[0].minor.yy257.val); }
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-1].minor.yy44, yymsp[0].minor.yy153.type, &yymsp[0].minor.yy153.val); }
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
case 196: /* alter_table_option ::= COMMENT NK_STRING */
-{ yymsp[-1].minor.yy257.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy257.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy153.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; }
break;
case 197: /* alter_table_option ::= TTL NK_INTEGER */
-{ yymsp[-1].minor.yy257.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy257.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy153.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; }
break;
case 198: /* duration_list ::= duration_literal */
- case 386: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==386);
-{ yylhsminor.yy776 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy924)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+ case 388: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==388);
+{ yylhsminor.yy684 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy44)); }
+ yymsp[0].minor.yy684 = yylhsminor.yy684;
break;
case 199: /* duration_list ::= duration_list NK_COMMA duration_literal */
- case 387: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==387);
-{ yylhsminor.yy776 = addNodeToList(pCxt, yymsp[-2].minor.yy776, releaseRawExprNode(pCxt, yymsp[0].minor.yy924)); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 389: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==389);
+{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, releaseRawExprNode(pCxt, yymsp[0].minor.yy44)); }
+ yymsp[-2].minor.yy684 = yylhsminor.yy684;
break;
case 202: /* rollup_func_name ::= function_name */
-{ yylhsminor.yy924 = createFunctionNode(pCxt, &yymsp[0].minor.yy233, NULL); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createFunctionNode(pCxt, &yymsp[0].minor.yy455, NULL); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
case 203: /* rollup_func_name ::= FIRST */
case 204: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==204);
case 259: /* tag_item ::= QTAGS */ yytestcase(yyruleno==259);
-{ yylhsminor.yy924 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
case 207: /* col_name ::= column_name */
case 260: /* tag_item ::= column_name */ yytestcase(yyruleno==260);
-{ yylhsminor.yy924 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy233); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy455); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
case 208: /* cmd ::= SHOW DNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); }
@@ -4475,13 +4424,13 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); }
break;
case 212: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy924, yymsp[0].minor.yy924, OP_TYPE_LIKE); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy44, yymsp[0].minor.yy44, OP_TYPE_LIKE); }
break;
case 213: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy924, yymsp[0].minor.yy924, OP_TYPE_LIKE); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy44, yymsp[0].minor.yy44, OP_TYPE_LIKE); }
break;
case 214: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy924, NULL, OP_TYPE_LIKE); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy44, NULL, OP_TYPE_LIKE); }
break;
case 215: /* cmd ::= SHOW MNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); }
@@ -4493,7 +4442,7 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); }
break;
case 218: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy924, yymsp[-1].minor.yy924, OP_TYPE_EQUAL); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy44, yymsp[-1].minor.yy44, OP_TYPE_EQUAL); }
break;
case 219: /* cmd ::= SHOW STREAMS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); }
@@ -4512,13 +4461,13 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); }
break;
case 225: /* cmd ::= SHOW CREATE DATABASE db_name */
-{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy233); }
+{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy455); }
break;
case 226: /* cmd ::= SHOW CREATE TABLE full_table_name */
-{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy44); }
break;
case 227: /* cmd ::= SHOW CREATE STABLE full_table_name */
-{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy44); }
break;
case 228: /* cmd ::= SHOW QUERIES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); }
@@ -4537,7 +4486,7 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); }
break;
case 234: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
-{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy44); }
break;
case 235: /* cmd ::= SHOW BNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); }
@@ -4552,7 +4501,7 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); }
break;
case 239: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
-{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy44); }
break;
case 240: /* cmd ::= SHOW CONSUMERS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); }
@@ -4561,10 +4510,10 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); }
break;
case 242: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy924, yymsp[-1].minor.yy924, OP_TYPE_EQUAL); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy44, yymsp[-1].minor.yy44, OP_TYPE_EQUAL); }
break;
case 243: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
-{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy924, yymsp[0].minor.yy924, yymsp[-3].minor.yy776); }
+{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy44, yymsp[0].minor.yy44, yymsp[-3].minor.yy684); }
break;
case 244: /* cmd ::= SHOW VNODES NK_INTEGER */
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); }
@@ -4573,755 +4522,756 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); }
break;
case 246: /* cmd ::= SHOW db_name_cond_opt ALIVE */
-{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy924, QUERY_NODE_SHOW_DB_ALIVE_STMT); }
+{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy44, QUERY_NODE_SHOW_DB_ALIVE_STMT); }
break;
case 247: /* cmd ::= SHOW CLUSTER ALIVE */
{ pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); }
break;
case 248: /* db_name_cond_opt ::= */
case 253: /* from_db_opt ::= */ yytestcase(yyruleno==253);
-{ yymsp[1].minor.yy924 = createDefaultDatabaseCondValue(pCxt); }
+{ yymsp[1].minor.yy44 = createDefaultDatabaseCondValue(pCxt); }
break;
case 249: /* db_name_cond_opt ::= db_name NK_DOT */
-{ yylhsminor.yy924 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy233); }
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy455); }
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
case 250: /* like_pattern_opt ::= */
- case 318: /* subtable_opt ::= */ yytestcase(yyruleno==318);
- case 432: /* case_when_else_opt ::= */ yytestcase(yyruleno==432);
- case 462: /* from_clause_opt ::= */ yytestcase(yyruleno==462);
- case 491: /* where_clause_opt ::= */ yytestcase(yyruleno==491);
- case 500: /* twindow_clause_opt ::= */ yytestcase(yyruleno==500);
- case 506: /* sliding_opt ::= */ yytestcase(yyruleno==506);
- case 508: /* fill_opt ::= */ yytestcase(yyruleno==508);
- case 520: /* having_clause_opt ::= */ yytestcase(yyruleno==520);
- case 522: /* range_opt ::= */ yytestcase(yyruleno==522);
- case 524: /* every_opt ::= */ yytestcase(yyruleno==524);
- case 537: /* slimit_clause_opt ::= */ yytestcase(yyruleno==537);
- case 541: /* limit_clause_opt ::= */ yytestcase(yyruleno==541);
-{ yymsp[1].minor.yy924 = NULL; }
+ case 319: /* subtable_opt ::= */ yytestcase(yyruleno==319);
+ case 434: /* case_when_else_opt ::= */ yytestcase(yyruleno==434);
+ case 464: /* from_clause_opt ::= */ yytestcase(yyruleno==464);
+ case 493: /* where_clause_opt ::= */ yytestcase(yyruleno==493);
+ case 502: /* twindow_clause_opt ::= */ yytestcase(yyruleno==502);
+ case 508: /* sliding_opt ::= */ yytestcase(yyruleno==508);
+ case 510: /* fill_opt ::= */ yytestcase(yyruleno==510);
+ case 522: /* having_clause_opt ::= */ yytestcase(yyruleno==522);
+ case 524: /* range_opt ::= */ yytestcase(yyruleno==524);
+ case 526: /* every_opt ::= */ yytestcase(yyruleno==526);
+ case 539: /* slimit_clause_opt ::= */ yytestcase(yyruleno==539);
+ case 543: /* limit_clause_opt ::= */ yytestcase(yyruleno==543);
+{ yymsp[1].minor.yy44 = NULL; }
break;
case 251: /* like_pattern_opt ::= LIKE NK_STRING */
-{ yymsp[-1].minor.yy924 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
+{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
break;
case 252: /* table_name_cond ::= table_name */
-{ yylhsminor.yy924 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy233); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy455); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
case 254: /* from_db_opt ::= FROM db_name */
-{ yymsp[-1].minor.yy924 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy233); }
+{ yymsp[-1].minor.yy44 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy455); }
break;
case 258: /* tag_item ::= TBNAME */
-{ yylhsminor.yy924 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
case 261: /* tag_item ::= column_name column_alias */
-{ yylhsminor.yy924 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy233), &yymsp[0].minor.yy233); }
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy455), &yymsp[0].minor.yy455); }
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
case 262: /* tag_item ::= column_name AS column_alias */
-{ yylhsminor.yy924 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy233), &yymsp[0].minor.yy233); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy455), &yymsp[0].minor.yy455); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 263: /* 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.yy397, yymsp[-3].minor.yy924, yymsp[-1].minor.yy924, NULL, yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy163, yymsp[-3].minor.yy44, yymsp[-1].minor.yy44, NULL, yymsp[0].minor.yy44); }
break;
case 264: /* 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.yy397, yymsp[-5].minor.yy924, yymsp[-3].minor.yy924, yymsp[-1].minor.yy776, NULL); }
+{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy163, yymsp[-5].minor.yy44, yymsp[-3].minor.yy44, yymsp[-1].minor.yy684, NULL); }
break;
case 265: /* cmd ::= DROP INDEX exists_opt full_index_name */
-{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy397, yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy163, yymsp[0].minor.yy44); }
break;
case 266: /* full_index_name ::= index_name */
-{ yylhsminor.yy924 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy233); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy455); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
case 267: /* full_index_name ::= db_name NK_DOT index_name */
-{ yylhsminor.yy924 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy233, &yymsp[0].minor.yy233); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 268: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
-{ yymsp[-9].minor.yy924 = createIndexOption(pCxt, yymsp[-7].minor.yy776, releaseRawExprNode(pCxt, yymsp[-3].minor.yy924), NULL, yymsp[-1].minor.yy924, yymsp[0].minor.yy924); }
+{ yymsp[-9].minor.yy44 = createIndexOption(pCxt, yymsp[-7].minor.yy684, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), NULL, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); }
break;
case 269: /* 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.yy924 = createIndexOption(pCxt, yymsp[-9].minor.yy776, releaseRawExprNode(pCxt, yymsp[-5].minor.yy924), releaseRawExprNode(pCxt, yymsp[-3].minor.yy924), yymsp[-1].minor.yy924, yymsp[0].minor.yy924); }
+{ yymsp[-11].minor.yy44 = createIndexOption(pCxt, yymsp[-9].minor.yy684, releaseRawExprNode(pCxt, yymsp[-5].minor.yy44), releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-1].minor.yy44, yymsp[0].minor.yy44); }
break;
case 272: /* func ::= sma_func_name NK_LP expression_list NK_RP */
-{ yylhsminor.yy924 = createFunctionNode(pCxt, &yymsp[-3].minor.yy233, yymsp[-1].minor.yy776); }
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+{ yylhsminor.yy44 = createFunctionNode(pCxt, &yymsp[-3].minor.yy455, yymsp[-1].minor.yy684); }
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
case 278: /* sma_stream_opt ::= */
- case 311: /* stream_options ::= */ yytestcase(yyruleno==311);
-{ yymsp[1].minor.yy924 = createStreamOptions(pCxt); }
+ case 312: /* stream_options ::= */ yytestcase(yyruleno==312);
+{ yymsp[1].minor.yy44 = createStreamOptions(pCxt); }
break;
case 279: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
- case 315: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==315);
-{ ((SStreamOptions*)yymsp[-2].minor.yy924)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy924); yylhsminor.yy924 = yymsp[-2].minor.yy924; }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 316: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==316);
+{ ((SStreamOptions*)yymsp[-2].minor.yy44)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-2].minor.yy44; }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 280: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
-{ ((SStreamOptions*)yymsp[-2].minor.yy924)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy924); yylhsminor.yy924 = yymsp[-2].minor.yy924; }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ ((SStreamOptions*)yymsp[-2].minor.yy44)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-2].minor.yy44; }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 281: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
-{ ((SStreamOptions*)yymsp[-2].minor.yy924)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy924); yylhsminor.yy924 = yymsp[-2].minor.yy924; }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+{ ((SStreamOptions*)yymsp[-2].minor.yy44)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-2].minor.yy44; }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
case 282: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
-{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy397, &yymsp[-2].minor.yy233, yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy163, &yymsp[-2].minor.yy455, yymsp[0].minor.yy44); }
break;
case 283: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy397, &yymsp[-3].minor.yy233, &yymsp[0].minor.yy233, false); }
+{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy163, &yymsp[-3].minor.yy455, &yymsp[0].minor.yy455, false); }
break;
case 284: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy397, &yymsp[-5].minor.yy233, &yymsp[0].minor.yy233, true); }
+{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy163, &yymsp[-5].minor.yy455, &yymsp[0].minor.yy455, true); }
break;
case 285: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy397, &yymsp[-3].minor.yy233, yymsp[0].minor.yy924, false); }
+{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy163, &yymsp[-3].minor.yy455, yymsp[0].minor.yy44, false); }
break;
case 286: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy397, &yymsp[-5].minor.yy233, yymsp[0].minor.yy924, true); }
+{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy163, &yymsp[-5].minor.yy455, yymsp[0].minor.yy44, true); }
break;
case 287: /* cmd ::= DROP TOPIC exists_opt topic_name */
-{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy397, &yymsp[0].minor.yy233); }
+{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); }
break;
case 288: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
-{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy397, &yymsp[-2].minor.yy233, &yymsp[0].minor.yy233); }
+{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy163, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); }
break;
case 289: /* cmd ::= DESC full_table_name */
case 290: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==290);
-{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy924); }
+{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy44); }
break;
case 291: /* cmd ::= RESET QUERY CACHE */
{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); }
break;
case 292: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
-{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy397, yymsp[-1].minor.yy924, yymsp[0].minor.yy924); }
+ case 293: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==293);
+{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy163, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); }
break;
- case 295: /* explain_options ::= */
-{ yymsp[1].minor.yy924 = createDefaultExplainOptions(pCxt); }
+ case 296: /* explain_options ::= */
+{ yymsp[1].minor.yy44 = createDefaultExplainOptions(pCxt); }
break;
- case 296: /* explain_options ::= explain_options VERBOSE NK_BOOL */
-{ yylhsminor.yy924 = setExplainVerbose(pCxt, yymsp[-2].minor.yy924, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 297: /* explain_options ::= explain_options VERBOSE NK_BOOL */
+{ yylhsminor.yy44 = setExplainVerbose(pCxt, yymsp[-2].minor.yy44, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 297: /* explain_options ::= explain_options RATIO NK_FLOAT */
-{ yylhsminor.yy924 = setExplainRatio(pCxt, yymsp[-2].minor.yy924, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 298: /* explain_options ::= explain_options RATIO NK_FLOAT */
+{ yylhsminor.yy44 = setExplainRatio(pCxt, yymsp[-2].minor.yy44, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 298: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
-{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy397, yymsp[-8].minor.yy397, &yymsp[-5].minor.yy233, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy852, yymsp[0].minor.yy832); }
+ case 299: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
+{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy163, yymsp[-8].minor.yy163, &yymsp[-5].minor.yy455, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy260, yymsp[0].minor.yy832); }
break;
- case 299: /* cmd ::= DROP FUNCTION exists_opt function_name */
-{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy397, &yymsp[0].minor.yy233); }
+ case 300: /* cmd ::= DROP FUNCTION exists_opt function_name */
+{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); }
break;
- case 304: /* 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.yy397, &yymsp[-8].minor.yy233, yymsp[-5].minor.yy924, yymsp[-7].minor.yy924, yymsp[-3].minor.yy776, yymsp[-2].minor.yy924, yymsp[0].minor.yy924, yymsp[-4].minor.yy776); }
+ case 305: /* 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.yy163, &yymsp[-8].minor.yy455, yymsp[-5].minor.yy44, yymsp[-7].minor.yy44, yymsp[-3].minor.yy684, yymsp[-2].minor.yy44, yymsp[0].minor.yy44, yymsp[-4].minor.yy684); }
break;
- case 305: /* cmd ::= DROP STREAM exists_opt stream_name */
-{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy397, &yymsp[0].minor.yy233); }
+ case 306: /* cmd ::= DROP STREAM exists_opt stream_name */
+{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); }
break;
- case 312: /* stream_options ::= stream_options TRIGGER AT_ONCE */
-{ ((SStreamOptions*)yymsp[-2].minor.yy924)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy924 = yymsp[-2].minor.yy924; }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 313: /* stream_options ::= stream_options TRIGGER AT_ONCE */
+{ ((SStreamOptions*)yymsp[-2].minor.yy44)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy44 = yymsp[-2].minor.yy44; }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 313: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
-{ ((SStreamOptions*)yymsp[-2].minor.yy924)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy924 = yymsp[-2].minor.yy924; }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 314: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
+{ ((SStreamOptions*)yymsp[-2].minor.yy44)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy44 = yymsp[-2].minor.yy44; }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 314: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
-{ ((SStreamOptions*)yymsp[-3].minor.yy924)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy924)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy924); yylhsminor.yy924 = yymsp[-3].minor.yy924; }
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+ case 315: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
+{ ((SStreamOptions*)yymsp[-3].minor.yy44)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy44)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-3].minor.yy44; }
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
- case 316: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
-{ ((SStreamOptions*)yymsp[-3].minor.yy924)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy924 = yymsp[-3].minor.yy924; }
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+ case 317: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
+{ ((SStreamOptions*)yymsp[-3].minor.yy44)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy44 = yymsp[-3].minor.yy44; }
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
- case 317: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
-{ ((SStreamOptions*)yymsp[-2].minor.yy924)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy924 = yymsp[-2].minor.yy924; }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 318: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
+{ ((SStreamOptions*)yymsp[-2].minor.yy44)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy44 = yymsp[-2].minor.yy44; }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 319: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
- case 507: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==507);
- case 525: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==525);
-{ yymsp[-3].minor.yy924 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy924); }
+ case 320: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
+ case 509: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==509);
+ case 527: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==527);
+{ yymsp[-3].minor.yy44 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy44); }
break;
- case 320: /* cmd ::= KILL CONNECTION NK_INTEGER */
+ case 321: /* cmd ::= KILL CONNECTION NK_INTEGER */
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); }
break;
- case 321: /* cmd ::= KILL QUERY NK_STRING */
+ case 322: /* cmd ::= KILL QUERY NK_STRING */
{ pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); }
break;
- case 322: /* cmd ::= KILL TRANSACTION NK_INTEGER */
+ case 323: /* cmd ::= KILL TRANSACTION NK_INTEGER */
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); }
break;
- case 323: /* cmd ::= BALANCE VGROUP */
+ case 324: /* cmd ::= BALANCE VGROUP */
{ pCxt->pRootNode = createBalanceVgroupStmt(pCxt); }
break;
- case 324: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
+ case 325: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
break;
- case 325: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
-{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy776); }
+ case 326: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
+{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy684); }
break;
- case 326: /* cmd ::= SPLIT VGROUP NK_INTEGER */
+ case 327: /* cmd ::= SPLIT VGROUP NK_INTEGER */
{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); }
break;
- case 327: /* dnode_list ::= DNODE NK_INTEGER */
-{ yymsp[-1].minor.yy776 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+ case 328: /* dnode_list ::= DNODE NK_INTEGER */
+{ yymsp[-1].minor.yy684 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
break;
- case 329: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
-{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy924, yymsp[0].minor.yy924); }
+ case 330: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
+{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); }
break;
- case 331: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
-{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy924, yymsp[-2].minor.yy776, yymsp[0].minor.yy924); }
+ case 333: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
+{ yymsp[-6].minor.yy44 = createInsertStmt(pCxt, yymsp[-4].minor.yy44, yymsp[-2].minor.yy684, yymsp[0].minor.yy44); }
break;
- case 332: /* cmd ::= INSERT INTO full_table_name query_or_subquery */
-{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy924, NULL, yymsp[0].minor.yy924); }
+ case 334: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */
+{ yymsp[-3].minor.yy44 = createInsertStmt(pCxt, yymsp[-1].minor.yy44, NULL, yymsp[0].minor.yy44); }
break;
- case 333: /* literal ::= NK_INTEGER */
-{ yylhsminor.yy924 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 335: /* literal ::= NK_INTEGER */
+{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 334: /* literal ::= NK_FLOAT */
-{ yylhsminor.yy924 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 336: /* literal ::= NK_FLOAT */
+{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 335: /* literal ::= NK_STRING */
-{ yylhsminor.yy924 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 337: /* literal ::= NK_STRING */
+{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 336: /* literal ::= NK_BOOL */
-{ yylhsminor.yy924 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 338: /* literal ::= NK_BOOL */
+{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 337: /* literal ::= TIMESTAMP NK_STRING */
-{ yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+ case 339: /* literal ::= TIMESTAMP NK_STRING */
+{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
- case 338: /* literal ::= duration_literal */
- case 348: /* signed_literal ::= signed */ yytestcase(yyruleno==348);
- case 369: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==369);
- case 370: /* expression ::= literal */ yytestcase(yyruleno==370);
- case 371: /* expression ::= pseudo_column */ yytestcase(yyruleno==371);
- case 372: /* expression ::= column_reference */ yytestcase(yyruleno==372);
- case 373: /* expression ::= function_expression */ yytestcase(yyruleno==373);
- case 374: /* expression ::= case_when_expression */ yytestcase(yyruleno==374);
- case 405: /* function_expression ::= literal_func */ yytestcase(yyruleno==405);
- case 454: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==454);
- case 458: /* boolean_primary ::= predicate */ yytestcase(yyruleno==458);
- case 460: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==460);
- case 461: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==461);
- case 464: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==464);
- case 466: /* table_reference ::= table_primary */ yytestcase(yyruleno==466);
- case 467: /* table_reference ::= joined_table */ yytestcase(yyruleno==467);
- case 471: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==471);
- case 527: /* query_simple ::= query_specification */ yytestcase(yyruleno==527);
- case 528: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==528);
- case 531: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==531);
- case 533: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==533);
-{ yylhsminor.yy924 = yymsp[0].minor.yy924; }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 340: /* literal ::= duration_literal */
+ case 350: /* signed_literal ::= signed */ yytestcase(yyruleno==350);
+ case 371: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==371);
+ case 372: /* expression ::= literal */ yytestcase(yyruleno==372);
+ case 373: /* expression ::= pseudo_column */ yytestcase(yyruleno==373);
+ case 374: /* expression ::= column_reference */ yytestcase(yyruleno==374);
+ case 375: /* expression ::= function_expression */ yytestcase(yyruleno==375);
+ case 376: /* expression ::= case_when_expression */ yytestcase(yyruleno==376);
+ case 407: /* function_expression ::= literal_func */ yytestcase(yyruleno==407);
+ case 456: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==456);
+ case 460: /* boolean_primary ::= predicate */ yytestcase(yyruleno==460);
+ case 462: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==462);
+ case 463: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==463);
+ case 466: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==466);
+ case 468: /* table_reference ::= table_primary */ yytestcase(yyruleno==468);
+ case 469: /* table_reference ::= joined_table */ yytestcase(yyruleno==469);
+ case 473: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==473);
+ case 529: /* query_simple ::= query_specification */ yytestcase(yyruleno==529);
+ case 530: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==530);
+ case 533: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==533);
+ case 535: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==535);
+{ yylhsminor.yy44 = yymsp[0].minor.yy44; }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 339: /* literal ::= NULL */
-{ yylhsminor.yy924 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 341: /* literal ::= NULL */
+{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 340: /* literal ::= NK_QUESTION */
-{ yylhsminor.yy924 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 342: /* literal ::= NK_QUESTION */
+{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 341: /* duration_literal ::= NK_VARIABLE */
-{ yylhsminor.yy924 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 343: /* duration_literal ::= NK_VARIABLE */
+{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 342: /* signed ::= NK_INTEGER */
-{ yylhsminor.yy924 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 344: /* signed ::= NK_INTEGER */
+{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 343: /* signed ::= NK_PLUS NK_INTEGER */
-{ yymsp[-1].minor.yy924 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
+ case 345: /* signed ::= NK_PLUS NK_INTEGER */
+{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
break;
- case 344: /* signed ::= NK_MINUS NK_INTEGER */
+ case 346: /* signed ::= NK_MINUS NK_INTEGER */
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
- yylhsminor.yy924 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
+ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
}
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
- case 345: /* signed ::= NK_FLOAT */
-{ yylhsminor.yy924 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 347: /* signed ::= NK_FLOAT */
+{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 346: /* signed ::= NK_PLUS NK_FLOAT */
-{ yymsp[-1].minor.yy924 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
+ case 348: /* signed ::= NK_PLUS NK_FLOAT */
+{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
break;
- case 347: /* signed ::= NK_MINUS NK_FLOAT */
+ case 349: /* signed ::= NK_MINUS NK_FLOAT */
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
- yylhsminor.yy924 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
+ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
}
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
- case 349: /* signed_literal ::= NK_STRING */
-{ yylhsminor.yy924 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 351: /* signed_literal ::= NK_STRING */
+{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 350: /* signed_literal ::= NK_BOOL */
-{ yylhsminor.yy924 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 352: /* signed_literal ::= NK_BOOL */
+{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 351: /* signed_literal ::= TIMESTAMP NK_STRING */
-{ yymsp[-1].minor.yy924 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
+ case 353: /* signed_literal ::= TIMESTAMP NK_STRING */
+{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
break;
- case 352: /* signed_literal ::= duration_literal */
- case 354: /* signed_literal ::= literal_func */ yytestcase(yyruleno==354);
- case 425: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==425);
- case 487: /* select_item ::= common_expression */ yytestcase(yyruleno==487);
- case 497: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==497);
- case 532: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==532);
- case 534: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==534);
- case 547: /* search_condition ::= common_expression */ yytestcase(yyruleno==547);
-{ yylhsminor.yy924 = releaseRawExprNode(pCxt, yymsp[0].minor.yy924); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 354: /* signed_literal ::= duration_literal */
+ case 356: /* signed_literal ::= literal_func */ yytestcase(yyruleno==356);
+ case 427: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==427);
+ case 489: /* select_item ::= common_expression */ yytestcase(yyruleno==489);
+ case 499: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==499);
+ case 534: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==534);
+ case 536: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==536);
+ case 549: /* search_condition ::= common_expression */ yytestcase(yyruleno==549);
+{ yylhsminor.yy44 = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 353: /* signed_literal ::= NULL */
-{ yylhsminor.yy924 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 355: /* signed_literal ::= NULL */
+{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 355: /* signed_literal ::= NK_QUESTION */
-{ yylhsminor.yy924 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 357: /* signed_literal ::= NK_QUESTION */
+{ yylhsminor.yy44 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 375: /* expression ::= NK_LP expression NK_RP */
- case 459: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==459);
- case 546: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==546);
-{ yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy924)); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 377: /* expression ::= NK_LP expression NK_RP */
+ case 461: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==461);
+ case 548: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==548);
+{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 376: /* expression ::= NK_PLUS expr_or_subquery */
+ case 378: /* expression ::= NK_PLUS expr_or_subquery */
{
- SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy924));
+ SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy44));
}
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
- case 377: /* expression ::= NK_MINUS expr_or_subquery */
+ case 379: /* expression ::= NK_MINUS expr_or_subquery */
{
- SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy924), NULL));
+ SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy44), NULL));
}
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
- case 378: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
+ case 380: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 379: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
+ case 381: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 380: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */
+ case 382: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 381: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
+ case 383: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 382: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */
+ case 384: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 383: /* expression ::= column_reference NK_ARROW NK_STRING */
+ case 385: /* expression ::= column_reference NK_ARROW NK_STRING */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 384: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
+ case 386: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 385: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
+ case 387: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 388: /* column_reference ::= column_name */
-{ yylhsminor.yy924 = createRawExprNode(pCxt, &yymsp[0].minor.yy233, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy233)); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 390: /* column_reference ::= column_name */
+{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy455, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy455)); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 389: /* column_reference ::= table_name NK_DOT column_name */
-{ yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy233, &yymsp[0].minor.yy233, createColumnNode(pCxt, &yymsp[-2].minor.yy233, &yymsp[0].minor.yy233)); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 391: /* column_reference ::= table_name NK_DOT column_name */
+{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455, createColumnNode(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455)); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 390: /* pseudo_column ::= ROWTS */
- case 391: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==391);
- case 393: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==393);
- case 394: /* pseudo_column ::= QEND */ yytestcase(yyruleno==394);
- case 395: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==395);
- case 396: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==396);
- case 397: /* pseudo_column ::= WEND */ yytestcase(yyruleno==397);
- case 398: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==398);
- case 399: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==399);
- case 400: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==400);
- case 401: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==401);
- case 407: /* literal_func ::= NOW */ yytestcase(yyruleno==407);
-{ yylhsminor.yy924 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 392: /* pseudo_column ::= ROWTS */
+ case 393: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==393);
+ case 395: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==395);
+ case 396: /* pseudo_column ::= QEND */ yytestcase(yyruleno==396);
+ case 397: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==397);
+ case 398: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==398);
+ case 399: /* pseudo_column ::= WEND */ yytestcase(yyruleno==399);
+ case 400: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==400);
+ case 401: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==401);
+ case 402: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==402);
+ case 403: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==403);
+ case 409: /* literal_func ::= NOW */ yytestcase(yyruleno==409);
+{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 392: /* pseudo_column ::= table_name NK_DOT TBNAME */
-{ yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy233, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy233)))); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 394: /* pseudo_column ::= table_name NK_DOT TBNAME */
+{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy455)))); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 402: /* function_expression ::= function_name NK_LP expression_list NK_RP */
- case 403: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==403);
-{ yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy233, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy233, yymsp[-1].minor.yy776)); }
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+ case 404: /* function_expression ::= function_name NK_LP expression_list NK_RP */
+ case 405: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==405);
+{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy455, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy455, yymsp[-1].minor.yy684)); }
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
- case 404: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
-{ yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy924), yymsp[-1].minor.yy852)); }
- yymsp[-5].minor.yy924 = yylhsminor.yy924;
+ case 406: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
+{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-1].minor.yy260)); }
+ yymsp[-5].minor.yy44 = yylhsminor.yy44;
break;
- case 406: /* literal_func ::= noarg_func NK_LP NK_RP */
-{ yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy233, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy233, NULL)); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 408: /* literal_func ::= noarg_func NK_LP NK_RP */
+{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy455, NULL)); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 421: /* star_func_para_list ::= NK_STAR */
-{ yylhsminor.yy776 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+ case 423: /* star_func_para_list ::= NK_STAR */
+{ yylhsminor.yy684 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy684 = yylhsminor.yy684;
break;
- case 426: /* star_func_para ::= table_name NK_DOT NK_STAR */
- case 490: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==490);
-{ yylhsminor.yy924 = createColumnNode(pCxt, &yymsp[-2].minor.yy233, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 428: /* star_func_para ::= table_name NK_DOT NK_STAR */
+ case 492: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==492);
+{ yylhsminor.yy44 = createColumnNode(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 427: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
-{ yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy776, yymsp[-1].minor.yy924)); }
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+ case 429: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
+{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy684, yymsp[-1].minor.yy44)); }
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
- case 428: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
-{ yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy924), yymsp[-2].minor.yy776, yymsp[-1].minor.yy924)); }
- yymsp[-4].minor.yy924 = yylhsminor.yy924;
+ case 430: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
+{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-2].minor.yy684, yymsp[-1].minor.yy44)); }
+ yymsp[-4].minor.yy44 = yylhsminor.yy44;
break;
- case 431: /* when_then_expr ::= WHEN common_expression THEN common_expression */
-{ yymsp[-3].minor.yy924 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)); }
+ case 433: /* when_then_expr ::= WHEN common_expression THEN common_expression */
+{ yymsp[-3].minor.yy44 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)); }
break;
- case 433: /* case_when_else_opt ::= ELSE common_expression */
-{ yymsp[-1].minor.yy924 = releaseRawExprNode(pCxt, yymsp[0].minor.yy924); }
+ case 435: /* case_when_else_opt ::= ELSE common_expression */
+{ yymsp[-1].minor.yy44 = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); }
break;
- case 434: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */
- case 439: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==439);
+ case 436: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */
+ case 441: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==441);
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy856, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy704, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 435: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
+ case 437: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy924), releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy44), releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-4].minor.yy924 = yylhsminor.yy924;
+ yymsp[-4].minor.yy44 = yylhsminor.yy44;
break;
- case 436: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
+ case 438: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy924), releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy44), releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-5].minor.yy924 = yylhsminor.yy924;
+ yymsp[-5].minor.yy44 = yylhsminor.yy44;
break;
- case 437: /* predicate ::= expr_or_subquery IS NULL */
+ case 439: /* predicate ::= expr_or_subquery IS NULL */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), NULL));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), NULL));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 438: /* predicate ::= expr_or_subquery IS NOT NULL */
+ case 440: /* predicate ::= expr_or_subquery IS NOT NULL */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy924), NULL));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), NULL));
}
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
- case 440: /* compare_op ::= NK_LT */
-{ yymsp[0].minor.yy856 = OP_TYPE_LOWER_THAN; }
+ case 442: /* compare_op ::= NK_LT */
+{ yymsp[0].minor.yy704 = OP_TYPE_LOWER_THAN; }
break;
- case 441: /* compare_op ::= NK_GT */
-{ yymsp[0].minor.yy856 = OP_TYPE_GREATER_THAN; }
+ case 443: /* compare_op ::= NK_GT */
+{ yymsp[0].minor.yy704 = OP_TYPE_GREATER_THAN; }
break;
- case 442: /* compare_op ::= NK_LE */
-{ yymsp[0].minor.yy856 = OP_TYPE_LOWER_EQUAL; }
+ case 444: /* compare_op ::= NK_LE */
+{ yymsp[0].minor.yy704 = OP_TYPE_LOWER_EQUAL; }
break;
- case 443: /* compare_op ::= NK_GE */
-{ yymsp[0].minor.yy856 = OP_TYPE_GREATER_EQUAL; }
+ case 445: /* compare_op ::= NK_GE */
+{ yymsp[0].minor.yy704 = OP_TYPE_GREATER_EQUAL; }
break;
- case 444: /* compare_op ::= NK_NE */
-{ yymsp[0].minor.yy856 = OP_TYPE_NOT_EQUAL; }
+ case 446: /* compare_op ::= NK_NE */
+{ yymsp[0].minor.yy704 = OP_TYPE_NOT_EQUAL; }
break;
- case 445: /* compare_op ::= NK_EQ */
-{ yymsp[0].minor.yy856 = OP_TYPE_EQUAL; }
+ case 447: /* compare_op ::= NK_EQ */
+{ yymsp[0].minor.yy704 = OP_TYPE_EQUAL; }
break;
- case 446: /* compare_op ::= LIKE */
-{ yymsp[0].minor.yy856 = OP_TYPE_LIKE; }
+ case 448: /* compare_op ::= LIKE */
+{ yymsp[0].minor.yy704 = OP_TYPE_LIKE; }
break;
- case 447: /* compare_op ::= NOT LIKE */
-{ yymsp[-1].minor.yy856 = OP_TYPE_NOT_LIKE; }
+ case 449: /* compare_op ::= NOT LIKE */
+{ yymsp[-1].minor.yy704 = OP_TYPE_NOT_LIKE; }
break;
- case 448: /* compare_op ::= MATCH */
-{ yymsp[0].minor.yy856 = OP_TYPE_MATCH; }
+ case 450: /* compare_op ::= MATCH */
+{ yymsp[0].minor.yy704 = OP_TYPE_MATCH; }
break;
- case 449: /* compare_op ::= NMATCH */
-{ yymsp[0].minor.yy856 = OP_TYPE_NMATCH; }
+ case 451: /* compare_op ::= NMATCH */
+{ yymsp[0].minor.yy704 = OP_TYPE_NMATCH; }
break;
- case 450: /* compare_op ::= CONTAINS */
-{ yymsp[0].minor.yy856 = OP_TYPE_JSON_CONTAINS; }
+ case 452: /* compare_op ::= CONTAINS */
+{ yymsp[0].minor.yy704 = OP_TYPE_JSON_CONTAINS; }
break;
- case 451: /* in_op ::= IN */
-{ yymsp[0].minor.yy856 = OP_TYPE_IN; }
+ case 453: /* in_op ::= IN */
+{ yymsp[0].minor.yy704 = OP_TYPE_IN; }
break;
- case 452: /* in_op ::= NOT IN */
-{ yymsp[-1].minor.yy856 = OP_TYPE_NOT_IN; }
+ case 454: /* in_op ::= NOT IN */
+{ yymsp[-1].minor.yy704 = OP_TYPE_NOT_IN; }
break;
- case 453: /* in_predicate_value ::= NK_LP literal_list NK_RP */
-{ yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy776)); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 455: /* in_predicate_value ::= NK_LP literal_list NK_RP */
+{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy684)); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 455: /* boolean_value_expression ::= NOT boolean_primary */
+ case 457: /* boolean_value_expression ::= NOT boolean_primary */
{
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy924), NULL));
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy44), NULL));
}
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
- case 456: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
+ case 458: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 457: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
+ case 459: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy924);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy924);
- yylhsminor.yy924 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), releaseRawExprNode(pCxt, yymsp[0].minor.yy924)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44);
+ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)));
}
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 463: /* from_clause_opt ::= FROM table_reference_list */
- case 492: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==492);
- case 521: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==521);
-{ yymsp[-1].minor.yy924 = yymsp[0].minor.yy924; }
+ case 465: /* from_clause_opt ::= FROM table_reference_list */
+ case 494: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==494);
+ case 523: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==523);
+{ yymsp[-1].minor.yy44 = yymsp[0].minor.yy44; }
break;
- case 465: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
-{ yylhsminor.yy924 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy924, yymsp[0].minor.yy924, NULL); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 467: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
+{ yylhsminor.yy44 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy44, yymsp[0].minor.yy44, NULL); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 468: /* table_primary ::= table_name alias_opt */
-{ yylhsminor.yy924 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy233, &yymsp[0].minor.yy233); }
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+ case 470: /* table_primary ::= table_name alias_opt */
+{ yylhsminor.yy44 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); }
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
- case 469: /* table_primary ::= db_name NK_DOT table_name alias_opt */
-{ yylhsminor.yy924 = createRealTableNode(pCxt, &yymsp[-3].minor.yy233, &yymsp[-1].minor.yy233, &yymsp[0].minor.yy233); }
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+ case 471: /* table_primary ::= db_name NK_DOT table_name alias_opt */
+{ yylhsminor.yy44 = createRealTableNode(pCxt, &yymsp[-3].minor.yy455, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); }
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
- case 470: /* table_primary ::= subquery alias_opt */
-{ yylhsminor.yy924 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy924), &yymsp[0].minor.yy233); }
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+ case 472: /* table_primary ::= subquery alias_opt */
+{ yylhsminor.yy44 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44), &yymsp[0].minor.yy455); }
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
- case 472: /* alias_opt ::= */
-{ yymsp[1].minor.yy233 = nil_token; }
+ case 474: /* alias_opt ::= */
+{ yymsp[1].minor.yy455 = nil_token; }
break;
- case 474: /* alias_opt ::= AS table_alias */
-{ yymsp[-1].minor.yy233 = yymsp[0].minor.yy233; }
+ case 476: /* alias_opt ::= AS table_alias */
+{ yymsp[-1].minor.yy455 = yymsp[0].minor.yy455; }
break;
- case 475: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
- case 476: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==476);
-{ yymsp[-2].minor.yy924 = yymsp[-1].minor.yy924; }
+ case 477: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
+ case 478: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==478);
+{ yymsp[-2].minor.yy44 = yymsp[-1].minor.yy44; }
break;
- case 477: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
-{ yylhsminor.yy924 = createJoinTableNode(pCxt, yymsp[-4].minor.yy428, yymsp[-5].minor.yy924, yymsp[-2].minor.yy924, yymsp[0].minor.yy924); }
- yymsp[-5].minor.yy924 = yylhsminor.yy924;
+ case 479: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
+{ yylhsminor.yy44 = createJoinTableNode(pCxt, yymsp[-4].minor.yy724, yymsp[-5].minor.yy44, yymsp[-2].minor.yy44, yymsp[0].minor.yy44); }
+ yymsp[-5].minor.yy44 = yylhsminor.yy44;
break;
- case 478: /* join_type ::= */
-{ yymsp[1].minor.yy428 = JOIN_TYPE_INNER; }
+ case 480: /* join_type ::= */
+{ yymsp[1].minor.yy724 = JOIN_TYPE_INNER; }
break;
- case 479: /* join_type ::= INNER */
-{ yymsp[0].minor.yy428 = JOIN_TYPE_INNER; }
+ case 481: /* join_type ::= INNER */
+{ yymsp[0].minor.yy724 = JOIN_TYPE_INNER; }
break;
- case 480: /* 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 482: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
{
- yymsp[-11].minor.yy924 = createSelectStmt(pCxt, yymsp[-10].minor.yy397, yymsp[-9].minor.yy776, yymsp[-8].minor.yy924);
- yymsp[-11].minor.yy924 = addWhereClause(pCxt, yymsp[-11].minor.yy924, yymsp[-7].minor.yy924);
- yymsp[-11].minor.yy924 = addPartitionByClause(pCxt, yymsp[-11].minor.yy924, yymsp[-6].minor.yy776);
- yymsp[-11].minor.yy924 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy924, yymsp[-2].minor.yy924);
- yymsp[-11].minor.yy924 = addGroupByClause(pCxt, yymsp[-11].minor.yy924, yymsp[-1].minor.yy776);
- yymsp[-11].minor.yy924 = addHavingClause(pCxt, yymsp[-11].minor.yy924, yymsp[0].minor.yy924);
- yymsp[-11].minor.yy924 = addRangeClause(pCxt, yymsp[-11].minor.yy924, yymsp[-5].minor.yy924);
- yymsp[-11].minor.yy924 = addEveryClause(pCxt, yymsp[-11].minor.yy924, yymsp[-4].minor.yy924);
- yymsp[-11].minor.yy924 = addFillClause(pCxt, yymsp[-11].minor.yy924, yymsp[-3].minor.yy924);
+ yymsp[-11].minor.yy44 = createSelectStmt(pCxt, yymsp[-10].minor.yy163, yymsp[-9].minor.yy684, yymsp[-8].minor.yy44);
+ yymsp[-11].minor.yy44 = addWhereClause(pCxt, yymsp[-11].minor.yy44, yymsp[-7].minor.yy44);
+ yymsp[-11].minor.yy44 = addPartitionByClause(pCxt, yymsp[-11].minor.yy44, yymsp[-6].minor.yy684);
+ yymsp[-11].minor.yy44 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy44, yymsp[-2].minor.yy44);
+ yymsp[-11].minor.yy44 = addGroupByClause(pCxt, yymsp[-11].minor.yy44, yymsp[-1].minor.yy684);
+ yymsp[-11].minor.yy44 = addHavingClause(pCxt, yymsp[-11].minor.yy44, yymsp[0].minor.yy44);
+ yymsp[-11].minor.yy44 = addRangeClause(pCxt, yymsp[-11].minor.yy44, yymsp[-5].minor.yy44);
+ yymsp[-11].minor.yy44 = addEveryClause(pCxt, yymsp[-11].minor.yy44, yymsp[-4].minor.yy44);
+ yymsp[-11].minor.yy44 = addFillClause(pCxt, yymsp[-11].minor.yy44, yymsp[-3].minor.yy44);
}
break;
- case 483: /* set_quantifier_opt ::= ALL */
-{ yymsp[0].minor.yy397 = false; }
+ case 485: /* set_quantifier_opt ::= ALL */
+{ yymsp[0].minor.yy163 = false; }
break;
- case 486: /* select_item ::= NK_STAR */
-{ yylhsminor.yy924 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy924 = yylhsminor.yy924;
+ case 488: /* select_item ::= NK_STAR */
+{ yylhsminor.yy44 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy44 = yylhsminor.yy44;
break;
- case 488: /* select_item ::= common_expression column_alias */
- case 498: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==498);
-{ yylhsminor.yy924 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy924), &yymsp[0].minor.yy233); }
- yymsp[-1].minor.yy924 = yylhsminor.yy924;
+ case 490: /* select_item ::= common_expression column_alias */
+ case 500: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==500);
+{ yylhsminor.yy44 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44), &yymsp[0].minor.yy455); }
+ yymsp[-1].minor.yy44 = yylhsminor.yy44;
break;
- case 489: /* select_item ::= common_expression AS column_alias */
- case 499: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==499);
-{ yylhsminor.yy924 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), &yymsp[0].minor.yy233); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 491: /* select_item ::= common_expression AS column_alias */
+ case 501: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==501);
+{ yylhsminor.yy44 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), &yymsp[0].minor.yy455); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 494: /* partition_by_clause_opt ::= PARTITION BY partition_list */
- case 517: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==517);
- case 536: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==536);
-{ yymsp[-2].minor.yy776 = yymsp[0].minor.yy776; }
+ case 496: /* partition_by_clause_opt ::= PARTITION BY partition_list */
+ case 519: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==519);
+ case 538: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==538);
+{ yymsp[-2].minor.yy684 = yymsp[0].minor.yy684; }
break;
- case 501: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
-{ yymsp[-5].minor.yy924 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy924), releaseRawExprNode(pCxt, yymsp[-1].minor.yy924)); }
+ case 503: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
+{ yymsp[-5].minor.yy44 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); }
break;
- case 502: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
-{ yymsp[-3].minor.yy924 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy924)); }
+ case 504: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
+{ yymsp[-3].minor.yy44 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); }
break;
- case 503: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
-{ yymsp[-5].minor.yy924 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy924), NULL, yymsp[-1].minor.yy924, yymsp[0].minor.yy924); }
+ case 505: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
+{ yymsp[-5].minor.yy44 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), NULL, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); }
break;
- case 504: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
-{ yymsp[-7].minor.yy924 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy924), releaseRawExprNode(pCxt, yymsp[-3].minor.yy924), yymsp[-1].minor.yy924, yymsp[0].minor.yy924); }
+ case 506: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
+{ yymsp[-7].minor.yy44 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy44), releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-1].minor.yy44, yymsp[0].minor.yy44); }
break;
- case 505: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
-{ yymsp[-6].minor.yy924 = createEventWindowNode(pCxt, yymsp[-3].minor.yy924, yymsp[0].minor.yy924); }
+ case 507: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
+{ yymsp[-6].minor.yy44 = createEventWindowNode(pCxt, yymsp[-3].minor.yy44, yymsp[0].minor.yy44); }
break;
- case 509: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
-{ yymsp[-3].minor.yy924 = createFillNode(pCxt, yymsp[-1].minor.yy646, NULL); }
+ case 511: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
+{ yymsp[-3].minor.yy44 = createFillNode(pCxt, yymsp[-1].minor.yy22, NULL); }
break;
- case 510: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
-{ yymsp[-5].minor.yy924 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy776)); }
+ case 512: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
+{ yymsp[-5].minor.yy44 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy684)); }
break;
- case 511: /* fill_mode ::= NONE */
-{ yymsp[0].minor.yy646 = FILL_MODE_NONE; }
+ case 513: /* fill_mode ::= NONE */
+{ yymsp[0].minor.yy22 = FILL_MODE_NONE; }
break;
- case 512: /* fill_mode ::= PREV */
-{ yymsp[0].minor.yy646 = FILL_MODE_PREV; }
+ case 514: /* fill_mode ::= PREV */
+{ yymsp[0].minor.yy22 = FILL_MODE_PREV; }
break;
- case 513: /* fill_mode ::= NULL */
-{ yymsp[0].minor.yy646 = FILL_MODE_NULL; }
+ case 515: /* fill_mode ::= NULL */
+{ yymsp[0].minor.yy22 = FILL_MODE_NULL; }
break;
- case 514: /* fill_mode ::= LINEAR */
-{ yymsp[0].minor.yy646 = FILL_MODE_LINEAR; }
+ case 516: /* fill_mode ::= LINEAR */
+{ yymsp[0].minor.yy22 = FILL_MODE_LINEAR; }
break;
- case 515: /* fill_mode ::= NEXT */
-{ yymsp[0].minor.yy646 = FILL_MODE_NEXT; }
+ case 517: /* fill_mode ::= NEXT */
+{ yymsp[0].minor.yy22 = FILL_MODE_NEXT; }
break;
- case 518: /* group_by_list ::= expr_or_subquery */
-{ yylhsminor.yy776 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy924))); }
- yymsp[0].minor.yy776 = yylhsminor.yy776;
+ case 520: /* group_by_list ::= expr_or_subquery */
+{ yylhsminor.yy684 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); }
+ yymsp[0].minor.yy684 = yylhsminor.yy684;
break;
- case 519: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
-{ yylhsminor.yy776 = addNodeToList(pCxt, yymsp[-2].minor.yy776, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy924))); }
- yymsp[-2].minor.yy776 = yylhsminor.yy776;
+ case 521: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
+{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); }
+ yymsp[-2].minor.yy684 = yylhsminor.yy684;
break;
- case 523: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
-{ yymsp[-5].minor.yy924 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy924), releaseRawExprNode(pCxt, yymsp[-1].minor.yy924)); }
+ case 525: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
+{ yymsp[-5].minor.yy44 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); }
break;
- case 526: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
+ case 528: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
{
- yylhsminor.yy924 = addOrderByClause(pCxt, yymsp[-3].minor.yy924, yymsp[-2].minor.yy776);
- yylhsminor.yy924 = addSlimitClause(pCxt, yylhsminor.yy924, yymsp[-1].minor.yy924);
- yylhsminor.yy924 = addLimitClause(pCxt, yylhsminor.yy924, yymsp[0].minor.yy924);
+ yylhsminor.yy44 = addOrderByClause(pCxt, yymsp[-3].minor.yy44, yymsp[-2].minor.yy684);
+ yylhsminor.yy44 = addSlimitClause(pCxt, yylhsminor.yy44, yymsp[-1].minor.yy44);
+ yylhsminor.yy44 = addLimitClause(pCxt, yylhsminor.yy44, yymsp[0].minor.yy44);
}
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
- case 529: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
-{ yylhsminor.yy924 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy924, yymsp[0].minor.yy924); }
- yymsp[-3].minor.yy924 = yylhsminor.yy924;
+ case 531: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
+{ yylhsminor.yy44 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy44, yymsp[0].minor.yy44); }
+ yymsp[-3].minor.yy44 = yylhsminor.yy44;
break;
- case 530: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
-{ yylhsminor.yy924 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy924, yymsp[0].minor.yy924); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 532: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
+{ yylhsminor.yy44 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy44, yymsp[0].minor.yy44); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 538: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
- case 542: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==542);
-{ yymsp[-1].minor.yy924 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
+ case 540: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
+ case 544: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==544);
+{ yymsp[-1].minor.yy44 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
break;
- case 539: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
- case 543: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==543);
-{ yymsp[-3].minor.yy924 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
+ case 541: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
+ case 545: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==545);
+{ yymsp[-3].minor.yy44 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
break;
- case 540: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
- case 544: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==544);
-{ yymsp[-3].minor.yy924 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
+ case 542: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
+ case 546: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==546);
+{ yymsp[-3].minor.yy44 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
break;
- case 545: /* subquery ::= NK_LP query_expression NK_RP */
-{ yylhsminor.yy924 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy924); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 547: /* subquery ::= NK_LP query_expression NK_RP */
+{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy44); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 550: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
-{ yylhsminor.yy924 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy924), yymsp[-1].minor.yy870, yymsp[0].minor.yy89); }
- yymsp[-2].minor.yy924 = yylhsminor.yy924;
+ case 552: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
+{ yylhsminor.yy44 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), yymsp[-1].minor.yy490, yymsp[0].minor.yy23); }
+ yymsp[-2].minor.yy44 = yylhsminor.yy44;
break;
- case 551: /* ordering_specification_opt ::= */
-{ yymsp[1].minor.yy870 = ORDER_ASC; }
+ case 553: /* ordering_specification_opt ::= */
+{ yymsp[1].minor.yy490 = ORDER_ASC; }
break;
- case 552: /* ordering_specification_opt ::= ASC */
-{ yymsp[0].minor.yy870 = ORDER_ASC; }
+ case 554: /* ordering_specification_opt ::= ASC */
+{ yymsp[0].minor.yy490 = ORDER_ASC; }
break;
- case 553: /* ordering_specification_opt ::= DESC */
-{ yymsp[0].minor.yy870 = ORDER_DESC; }
+ case 555: /* ordering_specification_opt ::= DESC */
+{ yymsp[0].minor.yy490 = ORDER_DESC; }
break;
- case 554: /* null_ordering_opt ::= */
-{ yymsp[1].minor.yy89 = NULL_ORDER_DEFAULT; }
+ case 556: /* null_ordering_opt ::= */
+{ yymsp[1].minor.yy23 = NULL_ORDER_DEFAULT; }
break;
- case 555: /* null_ordering_opt ::= NULLS FIRST */
-{ yymsp[-1].minor.yy89 = NULL_ORDER_FIRST; }
+ case 557: /* null_ordering_opt ::= NULLS FIRST */
+{ yymsp[-1].minor.yy23 = NULL_ORDER_FIRST; }
break;
- case 556: /* null_ordering_opt ::= NULLS LAST */
-{ yymsp[-1].minor.yy89 = NULL_ORDER_LAST; }
+ case 558: /* null_ordering_opt ::= NULLS LAST */
+{ yymsp[-1].minor.yy23 = NULL_ORDER_LAST; }
break;
default:
break;
diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c
index fef5bd654e..208f548457 100644
--- a/source/libs/planner/src/planLogicCreater.c
+++ b/source/libs/planner/src/planLogicCreater.c
@@ -374,6 +374,20 @@ static int32_t createScanLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect
code = addDefaultScanCol(pRealTable->pMeta, &pScan->pScanCols);
}
+ if (TSDB_CODE_SUCCESS == code && NULL != pSelect->pTags && NULL == pSelect->pPartitionByList) {
+ pScan->pTags = nodesCloneList(pSelect->pTags);
+ if (NULL == pScan->pTags) {
+ code = TSDB_CODE_OUT_OF_MEMORY;
+ }
+ }
+
+ if (TSDB_CODE_SUCCESS == code && NULL != pSelect->pSubtable && NULL == pSelect->pPartitionByList) {
+ pScan->pSubtable = nodesCloneNode(pSelect->pSubtable);
+ if (NULL == pScan->pSubtable) {
+ code = TSDB_CODE_OUT_OF_MEMORY;
+ }
+ }
+
// set output
if (TSDB_CODE_SUCCESS == code) {
code = createColumnByRewriteExprs(pScan->pScanCols, &pScan->node.pTargets);
@@ -1041,7 +1055,7 @@ static int32_t createProjectLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSel
TSWAP(pProject->node.pLimit, pSelect->pLimit);
TSWAP(pProject->node.pSlimit, pSelect->pSlimit);
- pProject->ignoreGroupId = (NULL == pSelect->pPartitionByList);
+ pProject->ignoreGroupId = pSelect->isSubquery ? true : (NULL == pSelect->pPartitionByList);
pProject->node.groupAction =
(!pSelect->isSubquery && pCxt->pPlanCxt->streamQuery) ? GROUP_ACTION_KEEP : GROUP_ACTION_CLEAR;
pProject->node.requireDataOrder = DATA_ORDER_LEVEL_NONE;
diff --git a/source/libs/planner/src/planSpliter.c b/source/libs/planner/src/planSpliter.c
index 6208fc172a..361cf33d58 100644
--- a/source/libs/planner/src/planSpliter.c
+++ b/source/libs/planner/src/planSpliter.c
@@ -348,7 +348,8 @@ static bool stbSplIsPartTableAgg(SAggLogicNode* pAgg) {
return false;
}
if (NULL != pAgg->pGroupKeys) {
- return stbSplHasPartTbname(pAgg->pGroupKeys) && stbSplNotSystemScan((SLogicNode*)nodesListGetNode(pAgg->node.pChildren, 0));
+ return stbSplHasPartTbname(pAgg->pGroupKeys) &&
+ stbSplNotSystemScan((SLogicNode*)nodesListGetNode(pAgg->node.pChildren, 0));
}
return stbSplHasPartTbname(stbSplGetPartKeys((SLogicNode*)nodesListGetNode(pAgg->node.pChildren, 0)));
}
@@ -559,6 +560,8 @@ static int32_t stbSplCreateMergeNode(SSplitContext* pCxt, SLogicSubplan* pSubpla
if (NULL == pMerge->node.pLimit) {
code = TSDB_CODE_OUT_OF_MEMORY;
}
+ ((SLimitNode*)pSplitNode->pLimit)->limit += ((SLimitNode*)pSplitNode->pLimit)->offset;
+ ((SLimitNode*)pSplitNode->pLimit)->offset = 0;
}
if (TSDB_CODE_SUCCESS == code) {
if (NULL == pSubplan) {
@@ -1039,21 +1042,29 @@ static int32_t stbSplSplitSortNode(SSplitContext* pCxt, SStableSplitInfo* pInfo)
return code;
}
-static int32_t stbSplSplitScanNodeWithoutPartTags(SSplitContext* pCxt, SStableSplitInfo* pInfo) {
- SLogicNode* pSplitNode = pInfo->pSplitNode;
+static int32_t stbSplGetSplitNodeForScan(SStableSplitInfo* pInfo, SLogicNode** pSplitNode) {
+ *pSplitNode = pInfo->pSplitNode;
if (NULL != pInfo->pSplitNode->pParent && QUERY_NODE_LOGIC_PLAN_PROJECT == nodeType(pInfo->pSplitNode->pParent) &&
NULL == pInfo->pSplitNode->pParent->pLimit && NULL == pInfo->pSplitNode->pParent->pSlimit) {
- pSplitNode = pInfo->pSplitNode->pParent;
+ *pSplitNode = pInfo->pSplitNode->pParent;
if (NULL != pInfo->pSplitNode->pLimit) {
- pSplitNode->pLimit = nodesCloneNode(pInfo->pSplitNode->pLimit);
- if (NULL == pSplitNode->pLimit) {
+ (*pSplitNode)->pLimit = nodesCloneNode(pInfo->pSplitNode->pLimit);
+ if (NULL == (*pSplitNode)->pLimit) {
return TSDB_CODE_OUT_OF_MEMORY;
}
((SLimitNode*)pInfo->pSplitNode->pLimit)->limit += ((SLimitNode*)pInfo->pSplitNode->pLimit)->offset;
((SLimitNode*)pInfo->pSplitNode->pLimit)->offset = 0;
}
}
- int32_t code = splCreateExchangeNodeForSubplan(pCxt, pInfo->pSubplan, pSplitNode, SUBPLAN_TYPE_MERGE);
+ return TSDB_CODE_SUCCESS;
+}
+
+static int32_t stbSplSplitScanNodeWithoutPartTags(SSplitContext* pCxt, SStableSplitInfo* pInfo) {
+ SLogicNode* pSplitNode = NULL;
+ int32_t code = stbSplGetSplitNodeForScan(pInfo, &pSplitNode);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = splCreateExchangeNodeForSubplan(pCxt, pInfo->pSubplan, pSplitNode, SUBPLAN_TYPE_MERGE);
+ }
if (TSDB_CODE_SUCCESS == code) {
code = nodesListMakeStrictAppend(&pInfo->pSubplan->pChildren,
(SNode*)splCreateScanSubplan(pCxt, pSplitNode, SPLIT_FLAG_STABLE_SPLIT));
@@ -1063,12 +1074,11 @@ static int32_t stbSplSplitScanNodeWithoutPartTags(SSplitContext* pCxt, SStableSp
}
static int32_t stbSplSplitScanNodeWithPartTags(SSplitContext* pCxt, SStableSplitInfo* pInfo) {
- SLogicNode* pSplitNode = pInfo->pSplitNode;
- if (NULL != pInfo->pSplitNode->pParent && QUERY_NODE_LOGIC_PLAN_PROJECT == nodeType(pInfo->pSplitNode->pParent) &&
- NULL == pInfo->pSplitNode->pParent->pLimit && NULL == pInfo->pSplitNode->pParent->pSlimit) {
- pSplitNode = pInfo->pSplitNode->pParent;
+ SLogicNode* pSplitNode = NULL;
+ int32_t code = stbSplGetSplitNodeForScan(pInfo, &pSplitNode);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = stbSplCreateMergeNode(pCxt, pInfo->pSubplan, pSplitNode, NULL, pSplitNode, true);
}
- int32_t code = stbSplCreateMergeNode(pCxt, pInfo->pSubplan, pSplitNode, NULL, pSplitNode, true);
if (TSDB_CODE_SUCCESS == code) {
code = nodesListMakeStrictAppend(&pInfo->pSubplan->pChildren,
(SNode*)splCreateScanSubplan(pCxt, pSplitNode, SPLIT_FLAG_STABLE_SPLIT));
diff --git a/source/libs/qworker/inc/qwInt.h b/source/libs/qworker/inc/qwInt.h
index 787ef7501d..9553cb97b5 100644
--- a/source/libs/qworker/inc/qwInt.h
+++ b/source/libs/qworker/inc/qwInt.h
@@ -194,6 +194,8 @@ typedef struct SQWorker {
SMsgCb msgCb;
SQWStat stat;
int32_t *destroyed;
+
+ int8_t nodeStopped;
} SQWorker;
typedef struct SQWorkerMgmt {
diff --git a/source/libs/qworker/src/qwUtil.c b/source/libs/qworker/src/qwUtil.c
index fdd2775daa..7ee7c50c96 100644
--- a/source/libs/qworker/src/qwUtil.c
+++ b/source/libs/qworker/src/qwUtil.c
@@ -213,9 +213,15 @@ int32_t qwAcquireTaskCtx(QW_FPARAMS_DEF, SQWTaskCtx **ctx) {
QW_SET_QTID(id, qId, tId, eId);
*ctx = taosHashAcquire(mgmt->ctxHash, id, sizeof(id));
+ int8_t nodeStopped = atomic_load_8(&mgmt->nodeStopped);
if (NULL == (*ctx)) {
- QW_TASK_DLOG_E("task ctx not exist, may be dropped");
- QW_ERR_RET(TSDB_CODE_QRY_TASK_CTX_NOT_EXIST);
+ if (!nodeStopped) {
+ QW_TASK_DLOG_E("task ctx not exist, may be dropped");
+ QW_ERR_RET(TSDB_CODE_QRY_TASK_CTX_NOT_EXIST);
+ } else {
+ QW_TASK_DLOG_E("node stopped");
+ QW_ERR_RET(TSDB_CODE_VND_STOPPED);
+ }
}
return TSDB_CODE_SUCCESS;
@@ -226,9 +232,16 @@ int32_t qwGetTaskCtx(QW_FPARAMS_DEF, SQWTaskCtx **ctx) {
QW_SET_QTID(id, qId, tId, eId);
*ctx = taosHashGet(mgmt->ctxHash, id, sizeof(id));
+ int8_t nodeStopped = atomic_load_8(&mgmt->nodeStopped);
+
if (NULL == (*ctx)) {
- QW_TASK_DLOG_E("task ctx not exist, may be dropped");
- QW_ERR_RET(TSDB_CODE_QRY_TASK_CTX_NOT_EXIST);
+ if (!nodeStopped) {
+ QW_TASK_DLOG_E("task ctx not exist, may be dropped");
+ QW_ERR_RET(TSDB_CODE_QRY_TASK_CTX_NOT_EXIST);
+ } else {
+ QW_TASK_DLOG_E("node stopped");
+ QW_ERR_RET(TSDB_CODE_VND_STOPPED);
+ }
}
return TSDB_CODE_SUCCESS;
diff --git a/source/libs/qworker/src/qworker.c b/source/libs/qworker/src/qworker.c
index 2f712e6eba..1e35529d27 100644
--- a/source/libs/qworker/src/qworker.c
+++ b/source/libs/qworker/src/qworker.c
@@ -1187,6 +1187,9 @@ void qWorkerStopAllTasks(void *qWorkerMgmt) {
uint64_t qId, tId, sId;
int32_t eId;
int64_t rId = 0;
+
+ atomic_store_8(&mgmt->nodeStopped, 1);
+
void *pIter = taosHashIterate(mgmt->ctxHash, NULL);
while (pIter) {
SQWTaskCtx *ctx = (SQWTaskCtx *)pIter;
diff --git a/source/libs/scheduler/src/schJob.c b/source/libs/scheduler/src/schJob.c
index 6a8f81f8c7..1bfbab0591 100644
--- a/source/libs/scheduler/src/schJob.c
+++ b/source/libs/scheduler/src/schJob.c
@@ -234,7 +234,7 @@ int32_t schBuildTaskRalation(SSchJob *pJob, SHashObj *planToTask) {
}
SSchTask *pTask = taosArrayGet(pLevel->subTasks, 0);
- if (SUBPLAN_TYPE_MODIFY != pTask->plan->subplanType) {
+ if (SUBPLAN_TYPE_MODIFY != pTask->plan->subplanType || EXPLAIN_MODE_DISABLE != pJob->attr.explainMode) {
pJob->attr.needFetch = true;
}
}
@@ -484,7 +484,7 @@ int32_t schProcessOnJobFailure(SSchJob *pJob, int32_t errCode) {
if (TSDB_CODE_SCH_IGNORE_ERROR == errCode) {
return TSDB_CODE_SCH_IGNORE_ERROR;
}
-
+
schUpdateJobErrCode(pJob, errCode);
int32_t code = atomic_load_32(&pJob->errCode);
diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c
index e26c8a5c5b..56c3c3ebef 100644
--- a/source/libs/stream/src/streamState.c
+++ b/source/libs/stream/src/streamState.c
@@ -199,7 +199,7 @@ void streamStateClose(SStreamState* pState) {
}
int32_t streamStateBegin(SStreamState* pState) {
- if (tdbBegin(pState->pTdbState->db, &pState->pTdbState->txn, tdbDefaultMalloc, tdbDefaultFree, NULL,
+ if (tdbBegin(pState->pTdbState->db, &pState->pTdbState->txn, NULL, NULL, NULL,
TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED) < 0) {
tdbAbort(pState->pTdbState->db, pState->pTdbState->txn);
return -1;
@@ -215,7 +215,7 @@ int32_t streamStateCommit(SStreamState* pState) {
return -1;
}
- if (tdbBegin(pState->pTdbState->db, &pState->pTdbState->txn, tdbDefaultMalloc, tdbDefaultFree, NULL,
+ if (tdbBegin(pState->pTdbState->db, &pState->pTdbState->txn, NULL, NULL, NULL,
TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED) < 0) {
return -1;
}
@@ -227,7 +227,7 @@ int32_t streamStateAbort(SStreamState* pState) {
return -1;
}
- if (tdbBegin(pState->pTdbState->db, &pState->pTdbState->txn, tdbDefaultMalloc, tdbDefaultFree, NULL,
+ if (tdbBegin(pState->pTdbState->db, &pState->pTdbState->txn, NULL, NULL, NULL,
TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED) < 0) {
return -1;
}
diff --git a/source/libs/sync/inc/syncSnapshot.h b/source/libs/sync/inc/syncSnapshot.h
index 5277e7818f..063b4f51f5 100644
--- a/source/libs/sync/inc/syncSnapshot.h
+++ b/source/libs/sync/inc/syncSnapshot.h
@@ -24,7 +24,7 @@ extern "C" {
#define SYNC_SNAPSHOT_SEQ_INVALID -2
#define SYNC_SNAPSHOT_SEQ_FORCE_CLOSE -3
-#define SYNC_SNAPSHOT_SEQ_PRE_SNAPSHOT -1
+#define SYNC_SNAPSHOT_SEQ_PREP_SNAPSHOT -1
#define SYNC_SNAPSHOT_SEQ_BEGIN 0
#define SYNC_SNAPSHOT_SEQ_END 0x7FFFFFFF
diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c
index 6cc517fda0..bb3bb0d6a4 100644
--- a/source/libs/sync/src/syncPipeline.c
+++ b/source/libs/sync/src/syncPipeline.c
@@ -830,7 +830,7 @@ int32_t syncLogReplMgrReplicateProbe(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sy
pMgr->endIndex = index + 1;
SSyncLogBuffer* pBuf = pNode->pLogBuf;
- sInfo("vgId:%d, probe peer:%" PRIx64 " with msg of index:%" PRId64 " term: %" PRId64 ". mgr (rs:%d): [%" PRId64
+ sTrace("vgId:%d, probe peer:%" PRIx64 " with msg of index:%" PRId64 " term: %" PRId64 ". mgr (rs:%d): [%" PRId64
" %" PRId64 ", %" PRId64 "), buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")",
pNode->vgId, pDestId->addr, index, term, pMgr->restored, pMgr->startIndex, pMgr->matchIndex, pMgr->endIndex,
pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex);
diff --git a/source/libs/sync/src/syncSnapshot.c b/source/libs/sync/src/syncSnapshot.c
index 880c76e4dd..e61bcc9ffc 100644
--- a/source/libs/sync/src/syncSnapshot.c
+++ b/source/libs/sync/src/syncSnapshot.c
@@ -112,7 +112,7 @@ int32_t snapshotSenderStart(SSyncSnapshotSender *pSender) {
pMsg->lastConfigIndex = pSender->snapshot.lastConfigIndex;
pMsg->lastConfig = pSender->lastConfig;
pMsg->startTime = pSender->startTime;
- pMsg->seq = SYNC_SNAPSHOT_SEQ_PRE_SNAPSHOT;
+ pMsg->seq = SYNC_SNAPSHOT_SEQ_PREP_SNAPSHOT;
// event log
syncLogSendSyncSnapshotSend(pSender->pSyncNode, pMsg, "snapshot sender start");
@@ -379,7 +379,7 @@ void snapshotReceiverStart(SSyncSnapshotReceiver *pReceiver, SyncSnapshotSend *p
}
pReceiver->start = true;
- pReceiver->ack = SYNC_SNAPSHOT_SEQ_PRE_SNAPSHOT;
+ pReceiver->ack = SYNC_SNAPSHOT_SEQ_PREP_SNAPSHOT;
pReceiver->term = pReceiver->pSyncNode->raftStore.currentTerm;
pReceiver->fromId = pPreMsg->srcId;
pReceiver->startTime = pPreMsg->startTime;
@@ -527,7 +527,7 @@ SyncIndex syncNodeGetSnapBeginIndex(SSyncNode *ths) {
return snapStart;
}
-static int32_t syncNodeOnSnapshotPre(SSyncNode *pSyncNode, SyncSnapshotSend *pMsg) {
+static int32_t syncNodeOnSnapshotPrep(SSyncNode *pSyncNode, SyncSnapshotSend *pMsg) {
SSyncSnapshotReceiver *pReceiver = pSyncNode->pNewNodeReceiver;
int64_t timeNow = taosGetTimestampMs();
int32_t code = 0;
@@ -565,7 +565,7 @@ _START_RECEIVER:
} else {
// waiting for clock match
while (timeNow < pMsg->startTime) {
- sRInfo(pReceiver, "snapshot receiver pre waitting for true time, now:%" PRId64 ", stime:%" PRId64, timeNow,
+ sRInfo(pReceiver, "snapshot receiver pre waitting for true time, now:%" PRId64 ", startTime:%" PRId64, timeNow,
pMsg->startTime);
taosMsleep(10);
timeNow = taosGetTimestampMs();
@@ -765,7 +765,7 @@ static int32_t syncNodeOnSnapshotEnd(SSyncNode *pSyncNode, SyncSnapshotSend *pMs
// receiver on message
//
-// condition 1, recv SYNC_SNAPSHOT_SEQ_PRE_SNAPSHOT
+// condition 1, recv SYNC_SNAPSHOT_SEQ_PREP_SNAPSHOT
// if receiver already start
// if sender.start-time > receiver.start-time, restart receiver(reply snapshot start)
// if sender.start-time = receiver.start-time, maybe duplicate msg
@@ -809,9 +809,9 @@ int32_t syncNodeOnSnapshot(SSyncNode *pSyncNode, const SRpcMsg *pRpcMsg) {
int32_t code = 0;
if (pSyncNode->state == TAOS_SYNC_STATE_FOLLOWER) {
if (pMsg->term == pSyncNode->raftStore.currentTerm) {
- if (pMsg->seq == SYNC_SNAPSHOT_SEQ_PRE_SNAPSHOT) {
+ if (pMsg->seq == SYNC_SNAPSHOT_SEQ_PREP_SNAPSHOT) {
syncLogRecvSyncSnapshotSend(pSyncNode, pMsg, "process seq pre-snapshot");
- code = syncNodeOnSnapshotPre(pSyncNode, pMsg);
+ code = syncNodeOnSnapshotPrep(pSyncNode, pMsg);
} else if (pMsg->seq == SYNC_SNAPSHOT_SEQ_BEGIN) {
syncLogRecvSyncSnapshotSend(pSyncNode, pMsg, "process seq begin");
code = syncNodeOnSnapshotBegin(pSyncNode, pMsg);
@@ -848,7 +848,7 @@ int32_t syncNodeOnSnapshot(SSyncNode *pSyncNode, const SRpcMsg *pRpcMsg) {
return code;
}
-static int32_t syncNodeOnSnapshotPreRsp(SSyncNode *pSyncNode, SSyncSnapshotSender *pSender, SyncSnapshotRsp *pMsg) {
+static int32_t syncNodeOnSnapshotPrepRsp(SSyncNode *pSyncNode, SSyncSnapshotSender *pSender, SyncSnapshotRsp *pMsg) {
SSnapshot snapshot = {0};
pSyncNode->pFsm->FpGetSnapshotInfo(pSyncNode->pFsm, &snapshot);
@@ -945,8 +945,8 @@ int32_t syncNodeOnSnapshotRsp(SSyncNode *pSyncNode, const SRpcMsg *pRpcMsg) {
if (pMsg->startTime != pSender->startTime) {
syncLogRecvSyncSnapshotRsp(pSyncNode, pMsg, "snapshot sender and receiver time not match");
- sSError(pSender, "sender:%" PRId64 " receiver:%" PRId64 " time not match, code:0x%x", pMsg->startTime,
- pSender->startTime, pMsg->code);
+ sSError(pSender, "sender:%" PRId64 " receiver:%" PRId64 " time not match, error:%s 0x%x", pMsg->startTime,
+ pSender->startTime, tstrerror(pMsg->code), pMsg->code);
terrno = TSDB_CODE_SYN_INTERNAL_ERROR;
goto _ERROR;
}
@@ -961,15 +961,15 @@ int32_t syncNodeOnSnapshotRsp(SSyncNode *pSyncNode, const SRpcMsg *pRpcMsg) {
if (pMsg->code != 0) {
syncLogRecvSyncSnapshotRsp(pSyncNode, pMsg, "receive error code");
- sSError(pSender, "snapshot sender receive error code:0x%x and stop sender", pMsg->code);
+ sSError(pSender, "snapshot sender receive error:%s 0x%x and stop sender", tstrerror(pMsg->code), pMsg->code);
terrno = pMsg->code;
goto _ERROR;
}
// prepare , send begin msg
- if (pMsg->ack == SYNC_SNAPSHOT_SEQ_PRE_SNAPSHOT) {
+ if (pMsg->ack == SYNC_SNAPSHOT_SEQ_PREP_SNAPSHOT) {
syncLogRecvSyncSnapshotRsp(pSyncNode, pMsg, "process seq pre-snapshot");
- return syncNodeOnSnapshotPreRsp(pSyncNode, pSender, pMsg);
+ return syncNodeOnSnapshotPrepRsp(pSyncNode, pSender, pMsg);
}
if (pSender->pReader == NULL || pSender->finish) {
diff --git a/source/libs/sync/src/syncUtil.c b/source/libs/sync/src/syncUtil.c
index b246d9a79d..6a50572cba 100644
--- a/source/libs/sync/src/syncUtil.c
+++ b/source/libs/sync/src/syncUtil.c
@@ -141,20 +141,15 @@ static void syncLogReplMgrStates2Str(SSyncNode* pSyncNode, char* buf, int32_t bu
}
static void syncPeerState2Str(SSyncNode* pSyncNode, char* buf, int32_t bufLen) {
- int32_t len = 1;
-
+ int32_t len = 0;
+ len += snprintf(buf + len, bufLen - len, "%s", "{");
for (int32_t i = 0; i < pSyncNode->replicaNum; ++i) {
SPeerState* pState = syncNodeGetPeerState(pSyncNode, &(pSyncNode->replicasId[i]));
if (pState == NULL) break;
-
- if (i < pSyncNode->replicaNum - 1) {
- len += snprintf(buf + len, bufLen - len, "%d:%" PRId64 " %" PRId64 ", ", i, pState->lastSendIndex,
- pState->lastSendTime);
- } else {
- len += snprintf(buf + len, bufLen - len, "%d:%" PRId64 " %" PRId64 "}", i, pState->lastSendIndex,
- pState->lastSendTime);
- }
+ len += snprintf(buf + len, bufLen - len, "%d:%" PRId64 " %" PRId64 "%s", i, pState->lastSendIndex,
+ pState->lastSendTime, (i < pSyncNode->replicaNum - 1) ? ", " : "");
}
+ len += snprintf(buf + len, bufLen - len, "%s", "}");
}
void syncPrintNodeLog(const char* flags, ELogLevel level, int32_t dflag, SSyncNode* pNode, const char* format, ...) {
@@ -245,7 +240,7 @@ void syncPrintSnapshotSenderLog(const char* flags, ELogLevel level, int32_t dfla
char cfgStr[1024] = "";
syncCfg2SimpleStr(&pNode->raftCfg.cfg, cfgStr, sizeof(cfgStr));
- char peerStr[1024] = "{";
+ char peerStr[1024] = "";
syncPeerState2Str(pNode, peerStr, sizeof(peerStr));
char eventLog[512]; // {0};
@@ -255,20 +250,21 @@ void syncPrintSnapshotSenderLog(const char* flags, ELogLevel level, int32_t dfla
va_end(argpointer);
taosPrintLog(flags, level, dflag,
- "vgId:%d, %s, sync:%s, {%p s-param:%" PRId64 " e-param:%" PRId64 " laindex:%" PRId64 " laterm:%" PRIu64
- " lcindex:%" PRId64
- " seq:%d ack:%d finish:%d replica-index:%d dnode:%d}"
- ", tm:%" PRIu64 ", cmt:%" PRId64 ", fst:%" PRId64 ", lst:%" PRId64 ", min:%" PRId64 ", snap:%" PRId64
- ", snap-tm:%" PRIu64 ", sby:%d, stgy:%d, bch:%d, r-num:%d, lcfg:%" PRId64
- ", chging:%d, rsto:%d, dquorum:%d, elt:%" PRId64 ", hb:%" PRId64 ", %s, %s",
+ "vgId:%d, %s, sync:%s, snap-sender:{%p start:%" PRId64 " end:%" PRId64 " last-index:%" PRId64
+ " last-term:%" PRIu64 " last-cfg:%" PRId64
+ ", seq:%d ack:%d finish:%d, as:%d dnode:%d}"
+ ", term:%" PRIu64 ", commit-index:%" PRId64 ", firstver:%" PRId64 ", lastver:%" PRId64
+ ", min-match:%" PRId64 ", snap:{last-index:%" PRId64 ", term:%" PRIu64
+ "}, standby:%d, batch-sz:%d, replicas:%d, last-cfg:%" PRId64
+ ", chging:%d, restore:%d, quorum:%d, lc-timer:{elect:%" PRId64 ", hb:%" PRId64 "}, peer:%s, cfg:%s",
pNode->vgId, eventLog, syncStr(pNode->state), pSender, pSender->snapshotParam.start,
pSender->snapshotParam.end, pSender->snapshot.lastApplyIndex, pSender->snapshot.lastApplyTerm,
pSender->snapshot.lastConfigIndex, pSender->seq, pSender->ack, pSender->finish, pSender->replicaIndex,
DID(&pNode->replicasId[pSender->replicaIndex]), pNode->raftStore.currentTerm, pNode->commitIndex,
logBeginIndex, logLastIndex, pNode->minMatchIndex, snapshot.lastApplyIndex, snapshot.lastApplyTerm,
- pNode->raftCfg.isStandBy, pNode->raftCfg.snapshotStrategy, pNode->raftCfg.batchSize, pNode->replicaNum,
- pNode->raftCfg.lastConfigIndex, pNode->changing, pNode->restoreFinish, syncNodeDynamicQuorum(pNode),
- pNode->electTimerLogicClock, pNode->heartbeatTimerLogicClockUser, peerStr, cfgStr);
+ pNode->raftCfg.isStandBy, pNode->raftCfg.batchSize, pNode->replicaNum, pNode->raftCfg.lastConfigIndex,
+ pNode->changing, pNode->restoreFinish, syncNodeDynamicQuorum(pNode), pNode->electTimerLogicClock,
+ pNode->heartbeatTimerLogicClockUser, peerStr, cfgStr);
}
void syncPrintSnapshotReceiverLog(const char* flags, ELogLevel level, int32_t dflag, SSyncSnapshotReceiver* pReceiver,
@@ -291,7 +287,7 @@ void syncPrintSnapshotReceiverLog(const char* flags, ELogLevel level, int32_t df
char cfgStr[1024] = "";
syncCfg2SimpleStr(&pNode->raftCfg.cfg, cfgStr, sizeof(cfgStr));
- char peerStr[1024] = "{";
+ char peerStr[1024] = "";
syncPeerState2Str(pNode, peerStr, sizeof(peerStr));
char eventLog[512]; // {0};
@@ -300,22 +296,22 @@ void syncPrintSnapshotReceiverLog(const char* flags, ELogLevel level, int32_t df
int32_t writeLen = vsnprintf(eventLog, sizeof(eventLog), format, argpointer);
va_end(argpointer);
- taosPrintLog(flags, level, dflag,
- "vgId:%d, %s, sync:%s,"
- " {%p start:%d ack:%d term:%" PRIu64 " start-time:%" PRId64 " from dnode:%d s-param:%" PRId64
- " e-param:%" PRId64 " laindex:%" PRId64 " laterm:%" PRIu64 " lcindex:%" PRId64
- "}"
- ", tm:%" PRIu64 ", cmt:%" PRId64 ", fst:%" PRId64 ", lst:%" PRId64 ", min:%" PRId64 ", snap:%" PRId64
- ", snap-tm:%" PRIu64 ", sby:%d, stgy:%d, bch:%d, r-num:%d, lcfg:%" PRId64
- ", chging:%d, rsto:%d, dquorum:%d, elt:%" PRId64 ", hb:%" PRId64 ", %s, %s",
- pNode->vgId, eventLog, syncStr(pNode->state), pReceiver, pReceiver->start, pReceiver->ack,
- pReceiver->term, pReceiver->startTime, DID(&pReceiver->fromId), pReceiver->snapshotParam.start,
- pReceiver->snapshotParam.end, pReceiver->snapshot.lastApplyIndex, pReceiver->snapshot.lastApplyTerm,
- pReceiver->snapshot.lastConfigIndex, pNode->raftStore.currentTerm, pNode->commitIndex, logBeginIndex,
- logLastIndex, pNode->minMatchIndex, snapshot.lastApplyIndex, snapshot.lastApplyTerm,
- pNode->raftCfg.isStandBy, pNode->raftCfg.snapshotStrategy, pNode->raftCfg.batchSize, pNode->replicaNum,
- pNode->raftCfg.lastConfigIndex, pNode->changing, pNode->restoreFinish, syncNodeDynamicQuorum(pNode),
- pNode->electTimerLogicClock, pNode->heartbeatTimerLogicClockUser, peerStr, cfgStr);
+ taosPrintLog(
+ flags, level, dflag,
+ "vgId:%d, %s, sync:%s,"
+ " snap-receiver:{%p started:%d acked:%d term:%" PRIu64 " start-time:%" PRId64 " from-dnode:%d, start:%" PRId64
+ " end:%" PRId64 " last-index:%" PRId64 " last-term:%" PRIu64 " last-cfg:%" PRId64
+ "}"
+ ", term:%" PRIu64 ", commit-index:%" PRId64 ", firstver:%" PRId64 ", lastver:%" PRId64 ", min-match:%" PRId64
+ ", snap:{last-index:%" PRId64 ", last-term:%" PRIu64 "}, standby:%d, batch-sz:%d, replicas:%d, last-cfg:%" PRId64
+ ", chging:%d, restore:%d, quorum:%d, lc-timers:{elect:%" PRId64 ", hb:%" PRId64 "}, peer:%s, cfg:%s",
+ pNode->vgId, eventLog, syncStr(pNode->state), pReceiver, pReceiver->start, pReceiver->ack, pReceiver->term,
+ pReceiver->startTime, DID(&pReceiver->fromId), pReceiver->snapshotParam.start, pReceiver->snapshotParam.end,
+ pReceiver->snapshot.lastApplyIndex, pReceiver->snapshot.lastApplyTerm, pReceiver->snapshot.lastConfigIndex,
+ pNode->raftStore.currentTerm, pNode->commitIndex, logBeginIndex, logLastIndex, pNode->minMatchIndex,
+ snapshot.lastApplyIndex, snapshot.lastApplyTerm, pNode->raftCfg.isStandBy, pNode->raftCfg.batchSize,
+ pNode->replicaNum, pNode->raftCfg.lastConfigIndex, pNode->changing, pNode->restoreFinish,
+ syncNodeDynamicQuorum(pNode), pNode->electTimerLogicClock, pNode->heartbeatTimerLogicClockUser, peerStr, cfgStr);
}
void syncLogRecvTimer(SSyncNode* pSyncNode, const SyncTimeout* pMsg, const char* s) {
@@ -351,13 +347,13 @@ void syncLogSendHeartbeat(SSyncNode* pSyncNode, const SyncHeartbeat* pMsg, bool
int64_t execTime) {
if (printX) {
sNTrace(pSyncNode,
- "send sync-heartbeat to dnode:%d {term:%" PRId64 ", cmt:%" PRId64 ", min-match:%" PRId64 ", ts:%" PRId64
- "}, x",
+ "send sync-heartbeat to dnode:%d {term:%" PRId64 ", commit-index:%" PRId64 ", min-match:%" PRId64
+ ", ts:%" PRId64 "}, x",
DID(&pMsg->destId), pMsg->term, pMsg->commitIndex, pMsg->minMatchIndex, pMsg->timeStamp);
} else {
sNTrace(pSyncNode,
- "send sync-heartbeat to dnode:%d {term:%" PRId64 ", cmt:%" PRId64 ", min-match:%" PRId64 ", ts:%" PRId64
- "}, timer-elapsed:%" PRId64 ", next-exec:%" PRId64,
+ "send sync-heartbeat to dnode:%d {term:%" PRId64 ", commit-index:%" PRId64 ", min-match:%" PRId64
+ ", ts:%" PRId64 "}, timer-elapsed:%" PRId64 ", next-exec:%" PRId64,
DID(&pMsg->destId), pMsg->term, pMsg->commitIndex, pMsg->minMatchIndex, pMsg->timeStamp, timerElapsed,
execTime);
}
@@ -368,14 +364,14 @@ void syncLogRecvHeartbeat(SSyncNode* pSyncNode, const SyncHeartbeat* pMsg, int64
pSyncNode->hbSlowNum++;
sNInfo(pSyncNode,
- "recv sync-heartbeat from dnode:%d slow {term:%" PRId64 ", cmt:%" PRId64 ", min-match:%" PRId64
+ "recv sync-heartbeat from dnode:%d slow {term:%" PRId64 ", commit-index:%" PRId64 ", min-match:%" PRId64
", ts:%" PRId64 "}, %s, net elapsed:%" PRId64,
DID(&pMsg->srcId), pMsg->term, pMsg->commitIndex, pMsg->minMatchIndex, pMsg->timeStamp, s, timeDiff);
}
sNTrace(pSyncNode,
- "recv sync-heartbeat from dnode:%d {term:%" PRId64 ", cmt:%" PRId64 ", min-match:%" PRId64 ", ts:%" PRId64
- "}, %s, net elapsed:%" PRId64,
+ "recv sync-heartbeat from dnode:%d {term:%" PRId64 ", commit-index:%" PRId64 ", min-match:%" PRId64
+ ", ts:%" PRId64 "}, %s, net elapsed:%" PRId64,
DID(&pMsg->srcId), pMsg->term, pMsg->commitIndex, pMsg->minMatchIndex, pMsg->timeStamp, s, timeDiff);
}
@@ -400,67 +396,64 @@ void syncLogRecvHeartbeatReply(SSyncNode* pSyncNode, const SyncHeartbeatReply* p
void syncLogSendSyncSnapshotSend(SSyncNode* pSyncNode, const SyncSnapshotSend* pMsg, const char* s) {
sNDebug(pSyncNode,
- "send sync-snapshot-send to dnode:%d, %s, seq:%d, term:%" PRId64 ", begin:%" PRId64 ", end:%" PRId64
- ", lterm:%" PRId64 ", stime:%" PRId64,
+ "send sync-snapshot-send to dnode:%d, %s, seq:%d, term:%" PRId64 ", begin-index:%" PRId64
+ ", last-index:%" PRId64 ", last-term:%" PRId64 ", start-time:%" PRId64,
DID(&pMsg->destId), s, pMsg->seq, pMsg->term, pMsg->beginIndex, pMsg->lastIndex, pMsg->lastTerm,
pMsg->startTime);
}
void syncLogRecvSyncSnapshotSend(SSyncNode* pSyncNode, const SyncSnapshotSend* pMsg, const char* s) {
sNDebug(pSyncNode,
- "recv sync-snapshot-send from dnode:%d, %s, seq:%d, term:%" PRId64 ", begin:%" PRId64 ", lst:%" PRId64
- ", lterm:%" PRId64 ", stime:%" PRId64 ", len:%u",
+ "recv sync-snapshot-send from dnode:%d, %s, seq:%d, term:%" PRId64 ", begin-index:%" PRId64
+ ", last-index:%" PRId64 ", last-term:%" PRId64 ", start-time:%" PRId64 ", data-len:%u",
DID(&pMsg->srcId), s, pMsg->seq, pMsg->term, pMsg->beginIndex, pMsg->lastIndex, pMsg->lastTerm,
pMsg->startTime, pMsg->dataLen);
}
void syncLogSendSyncSnapshotRsp(SSyncNode* pSyncNode, const SyncSnapshotRsp* pMsg, const char* s) {
sNDebug(pSyncNode,
- "send sync-snapshot-rsp to dnode:%d, %s, ack:%d, term:%" PRId64 ", begin:%" PRId64 ", lst:%" PRId64
- ", lterm:%" PRId64 ", stime:%" PRId64,
+ "send sync-snapshot-rsp to dnode:%d, %s, acked:%d, term:%" PRId64 ", begin-index:%" PRId64
+ ", last-index:%" PRId64 ", last-term:%" PRId64 ", start-time:%" PRId64,
DID(&pMsg->destId), s, pMsg->ack, pMsg->term, pMsg->snapBeginIndex, pMsg->lastIndex, pMsg->lastTerm,
pMsg->startTime);
}
void syncLogRecvSyncSnapshotRsp(SSyncNode* pSyncNode, const SyncSnapshotRsp* pMsg, const char* s) {
sNDebug(pSyncNode,
- "recv sync-snapshot-rsp from dnode:%d, %s, ack:%d, term:%" PRId64 ", begin:%" PRId64 ", lst:%" PRId64
- ", lterm:%" PRId64 ", stime:%" PRId64,
+ "recv sync-snapshot-rsp from dnode:%d, %s, ack:%d, term:%" PRId64 ", begin-index:%" PRId64
+ ", last-index:%" PRId64 ", last-term:%" PRId64 ", start-time:%" PRId64,
DID(&pMsg->srcId), s, pMsg->ack, pMsg->term, pMsg->snapBeginIndex, pMsg->lastIndex, pMsg->lastTerm,
pMsg->startTime);
}
void syncLogRecvAppendEntries(SSyncNode* pSyncNode, const SyncAppendEntries* pMsg, const char* s) {
sNTrace(pSyncNode,
- "recv sync-append-entries from dnode:%d {term:%" PRId64 ", pre-index:%" PRId64 ", pre-term:%" PRId64
- ", cmt:%" PRId64 ", pterm:%" PRId64 ", datalen:%d}, %s",
- DID(&pMsg->srcId), pMsg->term, pMsg->prevLogIndex, pMsg->prevLogTerm, pMsg->commitIndex, pMsg->privateTerm,
- pMsg->dataLen, s);
+ "recv sync-append-entries from dnode:%d {term:%" PRId64 ", prev-log:{index:%" PRId64 ", term:%" PRId64
+ "}, commit-index:%" PRId64 ", datalen:%d}, %s",
+ DID(&pMsg->srcId), pMsg->term, pMsg->prevLogIndex, pMsg->prevLogTerm, pMsg->commitIndex, pMsg->dataLen, s);
}
void syncLogSendAppendEntries(SSyncNode* pSyncNode, const SyncAppendEntries* pMsg, const char* s) {
sNTrace(pSyncNode,
- "send sync-append-entries to dnode:%d, {term:%" PRId64 ", pre-index:%" PRId64 ", pre-term:%" PRId64
- ", lsend-index:%" PRId64 ", cmt:%" PRId64 ", datalen:%d}, %s",
+ "send sync-append-entries to dnode:%d, {term:%" PRId64 ", prev-log:{index:%" PRId64 ", term:%" PRId64
+ "}, index:%" PRId64 ", commit-index:%" PRId64 ", datalen:%d}, %s",
DID(&pMsg->destId), pMsg->term, pMsg->prevLogIndex, pMsg->prevLogTerm, (pMsg->prevLogIndex + 1),
pMsg->commitIndex, pMsg->dataLen, s);
}
-void syncLogRecvRequestVote(SSyncNode* pSyncNode, const SyncRequestVote* pMsg, int32_t voteGranted, const char* s) {
- if (voteGranted == -1) {
- sNInfo(pSyncNode,
- "recv sync-request-vote from dnode:%d, {term:%" PRId64 ", lindex:%" PRId64 ", lterm:%" PRId64 "}, %s",
- DID(&pMsg->srcId), pMsg->term, pMsg->lastLogIndex, pMsg->lastLogTerm, s);
- } else {
- sNInfo(pSyncNode,
- "recv sync-request-vote from dnode:%d, {term:%" PRId64 ", lindex:%" PRId64 ", lterm:%" PRId64
- "}, granted:%d",
- DID(&pMsg->srcId), pMsg->term, pMsg->lastLogIndex, pMsg->lastLogTerm, voteGranted);
- }
+void syncLogRecvRequestVote(SSyncNode* pSyncNode, const SyncRequestVote* pMsg, int32_t voteGranted,
+ const char* errmsg) {
+ char statusMsg[64];
+ snprintf(statusMsg, sizeof(statusMsg), "granted:%d", voteGranted);
+ sNInfo(pSyncNode,
+ "recv sync-request-vote from dnode:%d, {term:%" PRId64 ", last-index:%" PRId64 ", last-term:%" PRId64 "}, %s",
+ DID(&pMsg->srcId), pMsg->term, pMsg->lastLogIndex, pMsg->lastLogTerm,
+ (voteGranted != -1) ? statusMsg : errmsg);
}
void syncLogSendRequestVote(SSyncNode* pNode, const SyncRequestVote* pMsg, const char* s) {
- sNInfo(pNode, "send sync-request-vote to dnode:%d {term:%" PRId64 ", lindex:%" PRId64 ", lterm:%" PRId64 "}, %s",
+ sNInfo(pNode,
+ "send sync-request-vote to dnode:%d {term:%" PRId64 ", last-index:%" PRId64 ", last-term:%" PRId64 "}, %s",
DID(&pMsg->destId), pMsg->term, pMsg->lastLogIndex, pMsg->lastLogTerm, s);
}
diff --git a/source/libs/tdb/src/db/tdbPager.c b/source/libs/tdb/src/db/tdbPager.c
index ced867e938..29b7fa740c 100644
--- a/source/libs/tdb/src/db/tdbPager.c
+++ b/source/libs/tdb/src/db/tdbPager.c
@@ -445,6 +445,11 @@ int tdbPagerAbort(SPager *pPager, TXN *pTxn) {
SPgno journalSize = 0;
int ret;
+ if (pTxn->jfd == 0) {
+ // txn is commited
+ return 0;
+ }
+
// sync the journal file
ret = tdbOsFSync(pTxn->jfd);
if (ret < 0) {
diff --git a/source/libs/tfs/src/tfs.c b/source/libs/tfs/src/tfs.c
index 9a71fc7f30..d73b65c3b5 100644
--- a/source/libs/tfs/src/tfs.c
+++ b/source/libs/tfs/src/tfs.c
@@ -303,7 +303,7 @@ int32_t tfsRmdir(STfs *pTfs, const char *rname) {
return 0;
}
-int32_t tfsRename(STfs *pTfs, char *orname, char *nrname) {
+int32_t tfsRename(STfs *pTfs, const char *orname, const char *nrname) {
char oaname[TMPNAME_LEN] = "\0";
char naname[TMPNAME_LEN] = "\0";
diff --git a/source/util/src/talgo.c b/source/util/src/talgo.c
index a06aac6afe..e373850b3c 100644
--- a/source/util/src/talgo.c
+++ b/source/util/src/talgo.c
@@ -28,14 +28,14 @@ static void median(void *src, int64_t size, int64_t s, int64_t e, const void *pa
void *buf) {
int32_t mid = ((int32_t)(e - s) >> 1u) + (int32_t)s;
- if (comparFn(elePtrAt(src, size, mid), elePtrAt(src, size, s), param) == 1) {
+ if (comparFn(elePtrAt(src, size, mid), elePtrAt(src, size, s), param) > 0) {
doswap(elePtrAt(src, size, mid), elePtrAt(src, size, s), size, buf);
}
- if (comparFn(elePtrAt(src, size, mid), elePtrAt(src, size, e), param) == 1) {
+ if (comparFn(elePtrAt(src, size, mid), elePtrAt(src, size, e), param) > 0) {
doswap(elePtrAt(src, size, mid), elePtrAt(src, size, s), size, buf);
doswap(elePtrAt(src, size, mid), elePtrAt(src, size, e), size, buf);
- } else if (comparFn(elePtrAt(src, size, s), elePtrAt(src, size, e), param) == 1) {
+ } else if (comparFn(elePtrAt(src, size, s), elePtrAt(src, size, e), param) > 0) {
doswap(elePtrAt(src, size, s), elePtrAt(src, size, e), size, buf);
}
@@ -47,7 +47,7 @@ static void tInsertSort(void *src, int64_t size, int32_t s, int32_t e, const voi
void *buf) {
for (int32_t i = s + 1; i <= e; ++i) {
for (int32_t j = i; j > s; --j) {
- if (comparFn(elePtrAt(src, size, j), elePtrAt(src, size, j - 1), param) == -1) {
+ if (comparFn(elePtrAt(src, size, j), elePtrAt(src, size, j - 1), param) < 0) {
doswap(elePtrAt(src, size, j), elePtrAt(src, size, j - 1), size, buf);
} else {
break;
diff --git a/tests/ci/Dockerfile b/tests/ci/Dockerfile
new file mode 100644
index 0000000000..594bcc902d
--- /dev/null
+++ b/tests/ci/Dockerfile
@@ -0,0 +1,48 @@
+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 \
+ 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/'
+RUN apt install -y r-base
+ADD go1.17.6.linux-amd64.tar.gz /usr/local/
+ADD jdk-8u144-linux-x64.tar.gz /usr/local/
+ADD apache-maven-3.8.4-bin.tar.gz /usr/local/
+RUN apt-get install wget -y \
+ && wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
+ && dpkg -i packages-microsoft-prod.deb \
+ && rm packages-microsoft-prod.deb \
+ && apt-get update && apt-get install -y dotnet-sdk-5.0 && apt-get install -y dotnet-sdk-6.0
+ADD node-v12.20.0-linux-x64.tar.gz /usr/local/
+RUN sh -c "rm -f /etc/localtime;ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime;echo \"Asia/Shanghai\" >/etc/timezone"
+COPY id_rsa /root/.ssh/id_rsa
+COPY .m2 /root/.m2
+COPY .nuget /root/.nuget
+COPY .dotnet /root/.dotnet
+COPY .cargo /root/.cargo
+COPY go /root/go
+ADD cmake-3.21.5-linux-x86_64.tar.gz /usr/local/
+RUN echo " export RUSTUP_DIST_SERVER=\"https://rsproxy.cn\" " >> /root/.bashrc
+RUN echo " export RUSTUP_UPDATE_ROOT=\"https://rsproxy.cn/rustup\" " >> /root/.bashrc
+RUN curl https://sh.rustup.rs -o /tmp/rustup-init.sh
+RUN sh /tmp/rustup-init.sh -y
+ENV PATH /usr/local/go/bin:/usr/local/node-v12.20.0-linux-x64/bin:/usr/local/apache-maven-3.8.4/bin:/usr/local/jdk1.8.0_144/bin:/usr/local/cmake-3.21.5-linux-x86_64/bin:/root/.cargo/bin:$PATH
+ENV JAVA_HOME /usr/local/jdk1.8.0_144
+RUN go env -w GOPROXY=https://goproxy.cn
+RUN echo "StrictHostKeyChecking no" >>/etc/ssh/ssh_config
+RUN npm config -g set unsafe-perm
+RUN npm config -g set registry https://registry.npm.taobao.org
+COPY .npm /root/.npm
+RUN R CMD javareconf JAVA_HOME=${JAVA_HOME} JAVA=${JAVA_HOME}/bin/java JAVAC=${JAVA_HOME}/bin/javac JAVAH=${JAVA_HOME}/bin/javah JAR=${JAVA_HOME}/bin/jar
+RUN echo "install.packages(\"RJDBC\", repos=\"http://cran.us.r-project.org\")"|R --no-save
+COPY .gitconfig /root/.gitconfig
+RUN mkdir -p /run/sshd
+COPY id_rsa.pub /root/.ssh/id_rsa.pub
+COPY id_rsa.pub /root/.ssh/authorized_keys
+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
diff --git a/tests/ci/build_image.sh b/tests/ci/build_image.sh
new file mode 100755
index 0000000000..1864df35db
--- /dev/null
+++ b/tests/ci/build_image.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+docker build --no-cache -t taos_test:v1.0 .
+
diff --git a/tests/ci/daily_build_image.sh b/tests/ci/daily_build_image.sh
new file mode 100755
index 0000000000..01148a3aae
--- /dev/null
+++ b/tests/ci/daily_build_image.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+set -x
+
+script_dir=`dirname $0`
+cd $script_dir
+script_dir=`pwd`
+cd $script_dir/repository/taos-connector-python
+git pull
+
+cd $script_dir/repository/TDinternal
+git clean -fxd
+git pull
+
+cd $script_dir/repository/TDinternal/community
+git clean -fxd
+git checkout main
+git pull origin main
+git submodule update --init --recursive
+
+cd $script_dir
+cp $script_dir/repository/TDinternal/community/tests/ci/build_image.sh .
+cp $script_dir/repository/TDinternal/community/tests/ci/daily_build_image.sh .
+
+./build_image.sh || exit 1
+docker image prune -f
+ips="\
+192.168.1.47 \
+192.168.1.48 \
+192.168.1.49 \
+192.168.1.52 \
+192.168.0.215 \
+192.168.0.217 \
+192.168.0.219 \
+"
+
+image=taos_image.tar
+
+docker save taos_test:v1.0 -o $image
+
+for ip in $ips; do
+ echo "scp $image root@$ip:/home/ &"
+ scp $image root@$ip:/home/ &
+done
+wait
+
+for ip in $ips; do
+ echo "ssh root@$ip docker load -i /home/$image &"
+ ssh root@$ip docker load -i /home/$image &
+done
+wait
+
+for ip in $ips; do
+ echo "ssh root@$ip rm -f /home/$image &"
+ ssh root@$ip rm -f /home/$image &
+done
+wait
+
+rm -rf taos_image.tar
+
diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/json/sml_json_alltypes.json b/tests/develop-test/5-taos-tools/taosbenchmark/json/sml_json_alltypes.json
index 62ec0ff9bf..26a08b3fee 100644
--- a/tests/develop-test/5-taos-tools/taosbenchmark/json/sml_json_alltypes.json
+++ b/tests/develop-test/5-taos-tools/taosbenchmark/json/sml_json_alltypes.json
@@ -16,13 +16,7 @@
"databases": [{
"dbinfo": {
"name": "db",
- "drop": "yes",
- "replica": 1,
- "precision": "ms",
- "keep": 36500,
- "minRows": 100,
- "maxRows": 4096,
- "comp":2
+ "drop": "yes"
},
"super_tables": [{
"name": "stb1",
@@ -37,7 +31,7 @@
"line_protocol": "json",
"childtable_limit": 0,
"childtable_offset": 0,
- "insert_rows": 10,
+ "insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
@@ -62,7 +56,7 @@
"line_protocol": "json",
"childtable_limit": 0,
"childtable_offset": 0,
- "insert_rows": 10,
+ "insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
@@ -87,7 +81,7 @@
"line_protocol": "json",
"childtable_limit": 0,
"childtable_offset": 0,
- "insert_rows": 10,
+ "insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
@@ -112,7 +106,7 @@
"line_protocol": "json",
"childtable_limit": 0,
"childtable_offset": 0,
- "insert_rows": 10,
+ "insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
@@ -137,7 +131,7 @@
"line_protocol": "json",
"childtable_limit": 0,
"childtable_offset": 0,
- "insert_rows": 10,
+ "insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
@@ -162,7 +156,7 @@
"line_protocol": "json",
"childtable_limit": 0,
"childtable_offset": 0,
- "insert_rows": 10,
+ "insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
@@ -187,7 +181,7 @@
"line_protocol": "json",
"childtable_limit": 0,
"childtable_offset": 0,
- "insert_rows": 10,
+ "insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
@@ -212,7 +206,7 @@
"line_protocol": "json",
"childtable_limit": 0,
"childtable_offset": 0,
- "insert_rows": 10,
+ "insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
@@ -237,7 +231,7 @@
"line_protocol": "json",
"childtable_limit": 0,
"childtable_offset": 0,
- "insert_rows": 10,
+ "insert_rows": 20,
"insert_interval": 0,
"interlace_rows": 0,
"disorder_ratio": 0,
diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py b/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py
index 789a0ce0a2..0d10741331 100644
--- a/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py
+++ b/tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py
@@ -19,32 +19,38 @@ from util.dnodes import *
class TDTestCase:
def caseDescription(self):
- '''
+ """
[TD-11510] taosBenchmark test cases
- '''
- return
+ """
def init(self, conn, logSql, replicaVar=1):
- self.replicaVar = int(replicaVar)
tdLog.debug("start to execute %s" % __file__)
+ self.replicaVar = int(replicaVar)
tdSql.init(conn.cursor(), logSql)
def getPath(self, tool="taosBenchmark"):
selfPath = os.path.dirname(os.path.realpath(__file__))
- if ("community" in selfPath):
- projPath = selfPath[:selfPath.find("community")]
+ if "community" in selfPath:
+ projPath = selfPath[: selfPath.find("community")]
+ elif "src" in selfPath:
+ projPath = selfPath[: selfPath.find("src")]
+ elif "/tools/" in selfPath:
+ projPath = selfPath[: selfPath.find("/tools/")]
+ elif "/tests/" in selfPath:
+ projPath = selfPath[: selfPath.find("/tests/")]
else:
- projPath = selfPath[:selfPath.find("tests")]
+ tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
+ projPath = "/usr/local/taos/bin/"
paths = []
- for root, dirs, files in os.walk(projPath):
- if ((tool) in files):
+ for root, dummy, files in os.walk(projPath):
+ if (tool) in files:
rootRealPath = os.path.dirname(os.path.realpath(root))
- if ("packaging" not in rootRealPath):
+ if "packaging" not in rootRealPath:
paths.append(os.path.join(root, tool))
break
- if (len(paths) == 0):
+ if len(paths) == 0:
tdLog.exit("taosBenchmark not found!")
return
else:
@@ -52,49 +58,63 @@ class TDTestCase:
return paths[0]
def run(self):
+ tdSql.query("select client_version()")
+ client_ver = "".join(tdSql.queryResult[0])
+ major_ver = client_ver.split(".")[0]
+
binPath = self.getPath()
- cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_json_alltypes.json" %binPath
+ cmd = "%s -f ./5-taos-tools/taosbenchmark/json/sml_json_alltypes.json" % binPath
tdLog.info("%s" % cmd)
os.system("%s" % cmd)
tdSql.execute("reset query cache")
tdSql.query("describe db.stb1")
tdSql.checkData(1, 1, "BOOL")
tdSql.query("describe db.stb2")
- tdSql.checkData(1, 1, "TINYINT")
+ tdSql.checkData(1, 1, "DOUBLE")
tdSql.query("describe db.stb3")
- tdSql.checkData(1, 1, "SMALLINT")
+ tdSql.checkData(1, 1, "DOUBLE")
tdSql.query("describe db.stb4")
- tdSql.checkData(1, 1, "INT")
+ tdSql.checkData(1, 1, "DOUBLE")
tdSql.query("describe db.stb5")
- tdSql.checkData(1, 1, "BIGINT")
+ tdSql.checkData(1, 1, "DOUBLE")
tdSql.query("describe db.stb6")
- tdSql.checkData(1, 1, "FLOAT")
+ tdSql.checkData(1, 1, "DOUBLE")
tdSql.query("describe db.stb7")
tdSql.checkData(1, 1, "DOUBLE")
tdSql.query("describe db.stb8")
- tdSql.checkData(1, 1, "VARCHAR")
- tdSql.checkData(1, 2, 16)
+ if major_ver == "3":
+ tdSql.checkData(1, 1, "VARCHAR")
+ tdSql.checkData(1, 2, 16)
+ else:
+ tdSql.checkData(1, 1, "NCHAR")
+ tdSql.checkData(1, 2, 8)
+
tdSql.query("describe db.stb9")
- tdSql.checkData(1, 1, "NCHAR")
- tdSql.checkData(1, 2, 16)
+ if major_ver == "3":
+ tdSql.checkData(1, 1, "VARCHAR")
+ tdSql.checkData(1, 2, 16)
+ else:
+ tdSql.checkData(1, 1, "NCHAR")
+ tdSql.checkData(1, 2, 8)
+
tdSql.query("select count(*) from db.stb1")
- tdSql.checkData(0, 0, 80)
+ tdSql.checkData(0, 0, 160)
tdSql.query("select count(*) from db.stb2")
- tdSql.checkData(0, 0, 80)
+ tdSql.checkData(0, 0, 160)
tdSql.query("select count(*) from db.stb3")
- tdSql.checkData(0, 0, 80)
+ tdSql.checkData(0, 0, 160)
tdSql.query("select count(*) from db.stb4")
- tdSql.checkData(0, 0, 80)
+ tdSql.checkData(0, 0, 160)
tdSql.query("select count(*) from db.stb5")
- tdSql.checkData(0, 0, 80)
+ tdSql.checkData(0, 0, 160)
tdSql.query("select count(*) from db.stb6")
- tdSql.checkData(0, 0, 80)
+ tdSql.checkData(0, 0, 160)
tdSql.query("select count(*) from db.stb7")
- tdSql.checkData(0, 0, 80)
+ tdSql.checkData(0, 0, 160)
tdSql.query("select count(*) from db.stb8")
- tdSql.checkData(0, 0, 80)
+ tdSql.checkData(0, 0, 160)
tdSql.query("select count(*) from db.stb9")
- tdSql.checkData(0, 0, 80)
+ tdSql.checkData(0, 0, 160)
def stop(self):
tdSql.close()
diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task
index 94d87c705c..3b4f61daee 100644
--- a/tests/parallel_test/cases.task
+++ b/tests/parallel_test/cases.task
@@ -179,6 +179,7 @@
,,y,script,./test.sh -f tsim/query/udf_with_const.sim
,,y,script,./test.sh -f tsim/query/sys_tbname.sim
,,y,script,./test.sh -f tsim/query/groupby.sim
+,,y,script,./test.sh -f tsim/query/event.sim
,,y,script,./test.sh -f tsim/qnode/basic1.sim
,,y,script,./test.sh -f tsim/snode/basic1.sim
,,y,script,./test.sh -f tsim/mnode/basic1.sim
diff --git a/tests/requirements.txt b/tests/requirements.txt
index ce459414c4..cebe5b9d36 100644
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -3,3 +3,4 @@ numpy
fabric2
psutil
pandas
+toml
diff --git a/tests/script/tsim/dnode/split_vgroup_replica1.sim b/tests/script/tsim/dnode/split_vgroup_replica1.sim
index 1bdd322714..51d63d25f4 100644
--- a/tests/script/tsim/dnode/split_vgroup_replica1.sim
+++ b/tests/script/tsim/dnode/split_vgroup_replica1.sim
@@ -11,7 +11,6 @@ system sh/cfg.sh -n dnode1 -c supportVnodes -v 0
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sql connect
-sql create user u1 pass 'taosdata'
print =============== step1 create dnode2
sql create dnode $hostname port 7200
@@ -73,8 +72,21 @@ print =============== step3: create database
sql use d1
sql create table d1.st (ts timestamp, i int) tags (j int)
sql create table d1.c1 using st tags(1)
+sql create table d1.c2 using st tags(2)
+sql create table d1.c3 using st tags(3)
+sql create table d1.c4 using st tags(4)
+sql create table d1.c5 using st tags(5)
+sql insert into d1.c1 values (now, 1);
+sql insert into d1.c2 values (now, 2);
+sql insert into d1.c3 values (now, 3);
+sql insert into d1.c4 values (now, 4);
+sql insert into d1.c5 values (now, 5);
sql show d1.tables
-if $rows != 1 then
+if $rows != 5 then
+ return -1
+endi
+sql select * from d1.st
+if $rows != 5 then
return -1
endi
@@ -82,6 +94,34 @@ print =============== step4: split
print split vgroup 2
sql split vgroup 2
+print =============== step5: check split result
+sql show d1.tables
+#if $rows != 5 then
+# return -1
+#endi
+#sql select * from d1.st
+#if $rows != 5 then
+# return -1
+#endi
+
+print =============== step6: create tables
+sql create table d1.c6 using st tags(6)
+sql create table d1.c7 using st tags(7)
+sql create table d1.c8 using st tags(8)
+sql create table d1.c9 using st tags(9)
+sql insert into d1.c6 values (now, 6);
+sql insert into d1.c7 values (now, 7);
+sql insert into d1.c8 values (now, 8);
+sql insert into d1.c9 values (now, 9);
+sql show d1.tables
+#if $rows != 9 then
+# return -1
+#endi
+#sql select * from d1.st
+#if $rows != 9 then
+# return -1
+#endi
+
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
diff --git a/tests/script/tsim/parser/interp.sim b/tests/script/tsim/parser/interp.sim
index 1b7878178c..e6512a22d7 100644
--- a/tests/script/tsim/parser/interp.sim
+++ b/tests/script/tsim/parser/interp.sim
@@ -72,4 +72,33 @@ sql_error select interp(*) from nt5931 where ts=now
sql_error select interp(*) from st5931 where ts=now
sql_error select interp(*) from ct5931 where ts=now
+sql create stable sta (ts timestamp, f1 double, f2 binary(200)) tags(t1 int);
+sql create table tba1 using sta tags(1);
+sql insert into tba1 values ('2022-04-26 15:15:01', -3.0, "a");
+sql insert into tba1 values ('2022-04-26 15:15:05', 3.0, "b");
+sql select a from (select interp(f1) as a from tba1 where ts >= '2022-04-26 15:15:01' and ts <= '2022-04-26 15:15:05' range('2022-04-26 15:15:01','2022-04-26 15:15:05') every(1s) fill(linear)) where a > 0;
+if $rows != 2 then
+ return -1
+endi
+if $data00 != 1.500000000 then
+ return -1
+endi
+if $data10 != 3.000000000 then
+ return -1
+endi
+
+sql select a from (select interp(f1+1) as a from tba1 where ts >= '2022-04-26 15:15:01' and ts <= '2022-04-26 15:15:05' range('2022-04-26 15:15:01','2022-04-26 15:15:05') every(1s) fill(linear)) where a > 0;
+if $rows != 3 then
+ return -1
+endi
+if $data00 != 1.000000000 then
+ return -1
+endi
+if $data10 != 2.500000000 then
+ return -1
+endi
+if $data20 != 4.000000000 then
+ return -1
+endi
+
system sh/exec.sh -n dnode1 -s stop -x SIGINT
diff --git a/tests/script/tsim/parser/regressiontest.sim b/tests/script/tsim/parser/regressiontest.sim
index 1b127155cb..3ce2b47b44 100644
--- a/tests/script/tsim/parser/regressiontest.sim
+++ b/tests/script/tsim/parser/regressiontest.sim
@@ -63,4 +63,38 @@ if $rows != 8198 then
return -1
endi
+print ===========================> TD-22077 && TD-21877
+sql drop database if exists $db -x step1
+sql create database $db vgroups 1;
+
+sql use $db
+sql create stable st1 (ts timestamp, c int) tags(a int);
+sql create table t1 using st1 tags(1);
+sql create table t2 using st1 tags(2);
+
+$i = 0
+$ts = 1674977959000
+$rowNum = 200
+
+$x = 0
+while $x < $rowNum
+$xs = $x * $delta
+$ts = $ts0 + $xs
+sql insert into t1 values ( $ts , $x )
+sql insert into t2 values ( $ts + 1000a, $x )
+$x = $x + 1
+$ts = $ts + 1000
+endw
+
+sql flush database $db
+
+sql insert into t1 values('2018-09-17 09:00:26', 26);
+sql insert into t2 values('2018-09-17 09:00:25', 25);
+
+sql insert into t2 values('2018-09-17 09:00:30', 30);
+sql flush database reg_db0;
+
+sql delete from st1 where ts<='2018-9-17 09:00:26';
+sql select * from st1;
+
system sh/exec.sh -n dnode1 -s stop -x SIGINT
diff --git a/tests/script/tsim/query/event.sim b/tests/script/tsim/query/event.sim
index adc94a34de..16fe0f4a13 100644
--- a/tests/script/tsim/query/event.sim
+++ b/tests/script/tsim/query/event.sim
@@ -11,20 +11,18 @@ sql use db1;
sql create stable sta (ts timestamp, f1 int, f2 binary(10), f3 bool) tags(t1 int, t2 bool, t3 binary(10));
sql create table tba1 using sta tags(0, false, '0');
sql create table tba2 using sta tags(1, true, '1');
-sql create table tba3 using sta tags(null, null, '');
-sql create table tba4 using sta tags(1, false, null);
-sql create table tba5 using sta tags(3, true, 'aa');
sql insert into tba1 values ('2022-09-26 15:15:01', 0, "a", false);
sql insert into tba1 values ('2022-09-26 15:15:02', 1, "0", true);
sql insert into tba1 values ('2022-09-26 15:15:03', 5, "5", false);
sql insert into tba1 values ('2022-09-26 15:15:04', 3, 'b', false);
sql insert into tba1 values ('2022-09-26 15:15:05', 0, '1', false);
sql insert into tba1 values ('2022-09-26 15:15:06', 2, 'd', true);
-
-sql insert into tba2 values ('2022-09-27 15:15:01', 0, "a", false);
-sql insert into tba2 values ('2022-09-27 15:15:02', 1, "0", true);
-sql insert into tba2 values ('2022-09-27 15:15:03', 5, "5", false);
-sql insert into tba2 values ('2022-09-27 15:15:04', null, null, null);
+sql insert into tba2 values ('2022-09-26 15:15:01', 0, "a", false);
+sql insert into tba2 values ('2022-09-26 15:15:02', 1, "0", true);
+sql insert into tba2 values ('2022-09-26 15:15:03', 5, "5", false);
+sql insert into tba2 values ('2022-09-26 15:15:04', 3, 'b', false);
+sql insert into tba2 values ('2022-09-26 15:15:05', 0, '1', false);
+sql insert into tba2 values ('2022-09-26 15:15:06', 2, 'd', true);
# child table: no window
print ====> select count(*) from tba1 event_window start with f1 = 0 end with f2 = 'c';
@@ -35,7 +33,7 @@ endi
# child table: single row window
print ====> select count(*) from tba1 event_window start with f1 = 0 end with f3 = false;
-sql select count(*) from tba1 event_window start with f1 = 0 end with f3 = false
+sql select count(*) from tba1 event_window start with f1 = 0 end with f3 = false;
if $rows != 2 then
return -1
endi
@@ -66,4 +64,176 @@ if $data10 != 4 then
return -1
endi
+# super table: no window
+print ====> select count(*) from sta event_window start with f1 = 0 end with f2 = 'c';
+sql select count(*) from sta event_window start with f1 = 0 end with f2 = 'c';
+if $rows != 0 then
+ return -1
+endi
+
+# super table: single row window
+print ====> select count(*) from sta event_window start with f1 = 0 end with f3 = false;
+sql select count(*) from sta event_window start with f1 = 0 end with f3 = false;
+if $rows != 4 then
+ return -1
+endi
+if $data00 != 1 then
+ return -1
+endi
+
+# super table: multi rows window
+print ====> select count(*) from sta event_window start with f1 = 0 end with f2 = 'b';
+sql select count(*) from sta event_window start with f1 = 0 end with f2 = 'b';
+if $rows != 1 then
+ return -1
+endi
+if $data00 != 7 then
+ return -1
+endi
+
+# super table: multi windows
+print ====> select count(*) from sta event_window start with f1 >= 0 end with f3 = true;
+sql select count(*) from sta event_window start with f1 >= 0 end with f3 = true;
+if $rows != 4 then
+ return -1
+endi
+if $data00 != 3 then
+ return -1
+endi
+if $data10 != 1 then
+ return -1
+endi
+if $data20 != 7 then
+ return -1
+endi
+if $data30 != 1 then
+ return -1
+endi
+
+# multi-child table: no window
+print ====> select tbname, count(*) from sta partition by tbname event_window start with f1 = 0 end with f2 = 'c';
+sql select tbname, count(*) from sta partition by tbname event_window start with f1 = 0 end with f2 = 'c';
+if $rows != 0 then
+ return -1
+endi
+
+# multi-child table: single row window
+print ====> select tbname, count(*) from sta partition by tbname event_window start with f1 = 0 end with f3 = false;
+sql select tbname, count(*) from sta partition by tbname event_window start with f1 = 0 end with f3 = false;
+if $rows != 4 then
+ return -1
+endi
+if $data01 != 1 then
+ return -1
+endi
+
+# multi-child table: multi rows window
+print ====> select tbname, count(*) from sta partition by tbname event_window start with f1 = 0 end with f2 = 'b';
+sql select tbname, count(*) from sta partition by tbname event_window start with f1 = 0 end with f2 = 'b';
+if $rows != 2 then
+ return -1
+endi
+if $data01 != 4 then
+ return -1
+endi
+if $data11 != 4 then
+ return -1
+endi
+
+# multi-child table: multi windows
+print ====> select tbname, count(*) from sta partition by tbname event_window start with f1 >= 0 end with f3 = true;
+sql select tbname, count(*) from sta partition by tbname event_window start with f1 >= 0 end with f3 = true;
+if $rows != 4 then
+ return -1
+endi
+if $data01 != 2 then
+ return -1
+endi
+if $data11 != 4 then
+ return -1
+endi
+
+# where + partition by
+print ====> select tbname, count(*) from sta where f3 = false partition by tbname event_window start with f1 >0 end with f2 > 0;
+sql select tbname, count(*) from sta where f3 = false partition by tbname event_window start with f1 >0 end with f2 > 0;
+if $rows != 4 then
+ return -1
+endi
+if $data01 != 1 then
+ return -1
+endi
+if $data11 != 2 then
+ return -1
+endi
+
+# where + order by
+print ====> select count(*) cnt from tba1 where f3 = false event_window start with f1 >0 end with f2 > 0 order by cnt desc;
+sql select count(*) cnt from tba1 where f3 = false event_window start with f1 >0 end with f2 > 0 order by cnt desc;
+if $rows != 2 then
+ return -1
+endi
+if $data00 != 2 then
+ return -1
+endi
+if $data10 != 1 then
+ return -1
+endi
+
+# where + partition by + order by
+print ====> select tbname, count(*) cnt from sta where f3 = false partition by tbname event_window start with f1 >0 end with f2 > 0 order by cnt;
+sql select tbname, count(*) cnt from sta where f3 = false partition by tbname event_window start with f1 >0 end with f2 > 0 order by cnt;
+if $rows != 4 then
+ return -1
+endi
+if $data01 != 1 then
+ return -1
+endi
+if $data11 != 1 then
+ return -1
+endi
+
+# where + partition by + order by + limit
+print ====> select tbname, count(*) cnt from sta where f3 = false partition by tbname event_window start with f1 >0 end with f2 > 0 order by cnt limit 2 offset 2;
+sql select tbname, count(*) cnt from sta where f3 = false partition by tbname event_window start with f1 >0 end with f2 > 0 order by cnt limit 2 offset 2;
+if $rows != 2 then
+ return -1
+endi
+if $data01 != 2 then
+ return -1
+endi
+if $data11 != 2 then
+ return -1
+endi
+
+# subquery(where + partition by + order by + limit)
+print ====> select * from (select tbname tname, count(*) cnt from sta where f3 = false partition by tbname event_window start with f1 >0 end with f2 > 0 order by cnt limit 2 offset 2);
+sql select * from (select tbname tname, count(*) cnt from sta where f3 = false partition by tbname event_window start with f1 >0 end with f2 > 0 order by cnt limit 2 offset 2);
+if $rows != 2 then
+ return -1
+endi
+if $data01 != 2 then
+ return -1
+endi
+if $data11 != 2 then
+ return -1
+endi
+
+# subquery + where + partition by + order by + limit
+print ====> select tname, count(*) cnt from (select tbname tname, * from sta) where f3 = false partition by tname event_window start with f1 >0 end with f2 > 0 order by cnt limit 2 offset 2;
+sql select tname, count(*) cnt from (select tbname tname, * from sta) where f3 = false partition by tname event_window start with f1 >0 end with f2 > 0 order by cnt limit 2 offset 2;
+if $rows != 2 then
+ return -1
+endi
+if $data01 != 2 then
+ return -1
+endi
+if $data11 != 2 then
+ return -1
+endi
+
+sql_error select f1, f2 from sta event_window start with f1 >0 end with f2 > 0;
+sql_error select count(*) from sta event_window start with f1 >0 end with f2 > 0 partition by tbname;
+sql_error select count(*) from sta event_window start with f1 >0 end with f2 > 0 group by tbname;
+sql_error select count(*) from sta event_window start with f1 >0 end with f2 > 0 fill(NULL);
+
system sh/exec.sh -n dnode1 -s stop -x SIGINT
diff --git a/tests/script/tsim/stream/basic1.sim b/tests/script/tsim/stream/basic1.sim
index 7bf10df637..c61c7667f8 100644
--- a/tests/script/tsim/stream/basic1.sim
+++ b/tests/script/tsim/stream/basic1.sim
@@ -834,4 +834,57 @@ endi
print ====== test _wstart end
+print insert into ts1 values(-1648791211000,1,2,3)
+
+sql create database test7 vgroups 1;
+sql use test7;
+sql create stable st(ts timestamp, a int, b int , c int) tags(ta int,tb int,tc int);
+sql create table ts1 using st tags(1,1,1);
+sql create stream streams7 trigger at_once into streamt7 as select _wstart, count(*) from ts1 interval(10s) ;
+
+sql insert into ts1 values(1648791211000,1,2,3);
+sql_error insert into ts1 values(-1648791211000,1,2,3);
+
+loop18:
+
+sleep 200
+sql select * from streamt7;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+if $rows != 1 then
+ print =====rows=$rows
+ goto loop18
+endi
+
+if $data01 != 1 then
+ print =====data01=$data01
+ goto loop18
+endi
+
+sql_error insert into ts1 values(-1648791211001,1,2,3) (1648791211001,1,2,3);
+
+sql select _wstart, count(*) from ts1 interval(10s) ;
+
+print $data00 $data01
+print $data10 $data11
+
+loop19:
+
+sleep 200
+sql select * from streamt7;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+if $rows != 1 then
+ print =====rows=$rows
+ goto loop19
+endi
+
system sh/exec.sh -n dnode1 -s stop -x SIGINT
diff --git a/tests/script/tsim/stream/checkStreamSTable.sim b/tests/script/tsim/stream/checkStreamSTable.sim
index 2ed6958196..b60ab0ac05 100644
--- a/tests/script/tsim/stream/checkStreamSTable.sim
+++ b/tests/script/tsim/stream/checkStreamSTable.sim
@@ -19,9 +19,9 @@ sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int);
sql create table t1 using st tags(1,1,1);
sql create table t2 using st tags(2,2,2);
-sql create stable result.streamt0(ts timestamp,a int,b int) tags(ta int,tb int,tc int);
+sql create stable result.streamt0(ts timestamp,a int,b int) tags(ta int,tb varchar(100),tc int);
-sql create stream streams0 trigger at_once into result.streamt0 as select _wstart, count(*) c1, max(a) c2 from st partition by tbname interval(10s);
+sql create stream streams0 trigger at_once into result.streamt0 tags(tb) as select _wstart, count(*) c1, max(a) c2 from st partition by tbname tb interval(10s);
sql insert into t1 values(1648791213000,1,2,3);
sql insert into t2 values(1648791213000,2,2,3);
@@ -61,6 +61,16 @@ if $data02 != 1 then
goto loop0
endi
+if $data03 != NULL then
+ print =====data03=$data03
+ goto loop0
+endi
+
+if $data04 != t1 then
+ print =====data04=$data04
+ goto loop0
+endi
+
if $data11 != 1 then
print =====data11=$data11
goto loop0
@@ -71,6 +81,16 @@ if $data12 != 2 then
goto loop0
endi
+if $data13 != NULL then
+ print =====data13=$data13
+ goto loop0
+endi
+
+if $data14 != t2 then
+ print =====data14=$data14
+ goto loop0
+endi
+
print ===== step3
sql create database result1 vgroups 1;
@@ -83,9 +103,9 @@ sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int);
sql create table t1 using st tags(1,1,1);
sql create table t2 using st tags(2,2,2);
-sql create stable result1.streamt1(ts timestamp,a int,b int,c int) tags(ta bigint unsigned,tb int,tc int);
+sql create stable result1.streamt1(ts timestamp,a int,b int,c int) tags(ta varchar(100),tb int,tc int);
-sql create stream streams1 trigger at_once into result1.streamt1(ts,c,a,b) as select _wstart, count(*) c1, max(a),min(b) c2 from st partition by tbname interval(10s);
+sql create stream streams1 trigger at_once into result1.streamt1(ts,c,a,b) tags(ta) as select _wstart, count(*) c1, max(a),min(b) c2 from st partition by tbname as ta interval(10s);
sql insert into t1 values(1648791213000,10,20,30);
sql insert into t2 values(1648791213000,40,50,60);
@@ -161,7 +181,7 @@ sql create table t2 using st tags(2,2,2);
sql create stable result2.streamt2(ts timestamp, a int , b int) tags(ta varchar(20));
# tag dest 1, source 2
-##sql_error create stream streams2 trigger at_once into result2.streamt2 TAGS(aa varchar(100), ta int) as select _wstart, count(*) c1, max(a) from st partition by tbname as aa, ta interval(10s);
+sql_error create stream streams2 trigger at_once into result2.streamt2 TAGS(aa varchar(100), ta int) as select _wstart, count(*) c1, max(a) from st partition by tbname as aa, ta interval(10s);
# column dest 3, source 4
sql_error create stream streams2 trigger at_once into result2.streamt2 as select _wstart, count(*) c1, max(a), max(b) from st partition by tbname interval(10s);
@@ -173,7 +193,7 @@ sql_error create stream streams2 trigger at_once into result2.streamt2(ts, a, b
sql_error create stream streams2 trigger at_once into result2.streamt2 as select _wstart, count(*) c1 from st partition by tbname interval(10s);
# column dest 3, source 2
-sql create stream streams2 trigger at_once into result2.streamt2(ts, a) as select _wstart, count(*) c1 from st partition by tbname interval(10s);
+sql create stream streams2 trigger at_once into result2.streamt2(ts, a) tags(ta) as select _wstart, count(*) c1 from st partition by tbname as ta interval(10s);
print ===== step5
@@ -252,16 +272,16 @@ sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int);
sql create table t1 using st tags(1,2,3);
sql create table t2 using st tags(4,5,6);
-sql create stable result4.streamt4(ts timestamp,a int,b int,c int, d int) tags(ta int,tb int,tc int);
+sql create stable result4.streamt4(ts timestamp,a int,b int,c int, d int) tags(tg1 int,tg2 int,tg3 int);
-sql create stream streams4 trigger at_once into result4.streamt4(ts,c,a,b) tags(tg2 int, tg3 varchar(100), tg1 bigint) subtable(concat("tbl-", tg1)) as select _wstart, count(*) c1, max(a),min(b) c2 from st partition by ta+1 as tg1, cast(tb as bigint) as tg2, tc as tg3 interval(10s);
+sql create stream streams4 trigger at_once into result4.streamt4(ts,c,a,b) tags(tg2, tg3, tg1) subtable( concat("tbl-", cast(tg1 as varchar(10)) ) ) as select _wstart, count(*) c1, max(a),min(b) c2 from st partition by ta+1 as tg1, cast(tb as bigint) as tg2, tc as tg3 interval(10s);
sql insert into t1 values(1648791213000,10,20,30);
sql insert into t2 values(1648791213000,40,50,60);
$loop_count = 0
-sql select _wstart, count(*) c1, max(a),min(b) c2 from st interval(10s);
+sql select _wstart, count(*) c1, max(a),min(b) c2 from st partition by ta+1 as tg1, cast(tb as bigint) as tg2, tc as tg3 interval(10s);
print $data00, $data01, $data02, $data03
print $data10, $data11, $data12, $data13
print $data20, $data21, $data22, $data23
@@ -275,7 +295,7 @@ if $loop_count == 10 then
return -1
endi
-sql select * from result4.streamt4;
+sql select * from result4.streamt4 order by tg1;
if $rows != 2 then
print =====rows=$rows
@@ -285,7 +305,7 @@ if $rows != 2 then
goto loop2
endi
-if $data01 != 40 then
+if $data01 != 10 then
print =====data01=$data01
goto loop2
endi
@@ -295,7 +315,7 @@ if $data02 != 20 then
goto loop2
endi
-if $data03 != 2 then
+if $data03 != 1 then
print =====data03=$data03
goto loop2
endi
@@ -305,6 +325,26 @@ if $data04 != NULL then
goto loop2
endi
+if $data11 != 40 then
+ print =====data11=$data11
+ goto loop2
+endi
+
+if $data12 != 50 then
+ print =====data12=$data12
+ goto loop2
+endi
+
+if $data13 != 1 then
+ print =====data13=$data13
+ goto loop2
+endi
+
+if $data14 != NULL then
+ print =====data14=$data14
+ goto loop2
+endi
+
print ======over
system sh/stop_dnodes.sh
diff --git a/tests/script/tsim/stream/triggerInterval0.sim b/tests/script/tsim/stream/triggerInterval0.sim
index 7353f026bb..b522dcf035 100644
--- a/tests/script/tsim/stream/triggerInterval0.sim
+++ b/tests/script/tsim/stream/triggerInterval0.sim
@@ -29,69 +29,119 @@ sql insert into t1 values(1648791223001,2,2,3,1.1);
sql insert into t1 values(1648791223002,2,2,3,1.1);
sql insert into t1 values(1648791223003,2,2,3,1.1);
sql insert into t1 values(1648791223001,2,2,3,1.1);
+
+print step 0
+
+$loop_count = 0
+
+loop0:
sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
sql select * from streamt;
+
if $rows != 1 then
print ======$rows
- return -1
+ goto loop0
endi
if $data01 != 1 then
print ======$data01
- return -1
+ goto loop0
endi
sql insert into t1 values(1648791233001,2,2,3,1.1);
+
+print step 1
+
+$loop_count = 0
+
+loop1:
sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
sql select * from streamt;
if $rows != 2 then
print ======$rows
- return -1
+ goto loop1
endi
if $data01 != 1 then
print ======$data01
- return -1
+ goto loop1
endi
if $data11 != 3 then
print ======$data11
- return -1
+ goto loop1
endi
sql insert into t1 values(1648791223004,2,2,3,1.1);
sql insert into t1 values(1648791223004,2,2,3,1.1);
sql insert into t1 values(1648791223005,2,2,3,1.1);
+
+print step 2
+
+$loop_count = 0
+
+loop2:
sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
sql select * from streamt;
if $rows != 2 then
print ======$rows
- return -1
+ goto loop2
endi
+
if $data01 != 1 then
print ======$data01
- return -1
+ goto loop2
endi
if $data11 != 5 then
print ======$data11
- return -1
+ goto loop2
endi
sql insert into t1 values(1648791233002,3,2,3,2.1);
sql insert into t1 values(1648791213002,4,2,3,3.1)
sql insert into t1 values(1648791213002,4,2,3,4.1);
+
+print step 3
+
+$loop_count = 0
+
+loop3:
sleep 300
-sql select * from streamt;
-if $rows != 2 then
- print ======$rows
- return -1
-endi
-if $data01 != 2 then
- print ======$data01
- return -1
-endi
-if $data11 != 5 then
- print ======$data11
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
return -1
endi
+sql select * from streamt;
+if $rows != 2 then
+ print ======$rows
+ goto loop3
+endi
+if $data01 != 2 then
+ print ======$data01
+ goto loop3
+endi
+if $data11 != 5 then
+ print ======$data11
+ goto loop3
+endi
+
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
diff --git a/tests/script/tsim/stream/udTableAndTag0.sim b/tests/script/tsim/stream/udTableAndTag0.sim
index 5cb5c2dd8b..bfc299df0f 100644
--- a/tests/script/tsim/stream/udTableAndTag0.sim
+++ b/tests/script/tsim/stream/udTableAndTag0.sim
@@ -367,6 +367,77 @@ if $data22 != tag-t3 then
goto loop8
endi
+print ===== step6
+print ===== transform tag value
+
+sql drop stream if exists streams1;
+sql drop stream if exists streams2;
+sql drop stream if exists streams3;
+sql drop stream if exists streams4;
+sql drop stream if exists streams5;
+
+sql drop database if exists test1;
+sql drop database if exists test2;
+sql drop database if exists test3;
+sql drop database if exists test4;
+sql drop database if exists test5;
+
+sql drop database if exists result1;
+sql drop database if exists result2;
+sql drop database if exists result3;
+sql drop database if exists result4;
+sql drop database if exists result5;
+
+
+
+sql create database result6 vgroups 1;
+
+sql create database test6 vgroups 4;
+sql use test6;
+
+
+sql create stable st(ts timestamp,a int,b int,c int) tags(ta varchar(20), tb int, tc int);
+sql create table t1 using st tags("1",1,1);
+sql create table t2 using st tags("2",2,2);
+sql create table t3 using st tags("3",3,3);
+
+sql create stream streams6 trigger at_once into result6.streamt6 TAGS(dd int) as select _wstart, count(*) c1 from st partition by concat(ta, "0") as dd, tbname interval(10s);
+sql insert into t1 values(1648791213000,1,1,1) t2 values(1648791213000,2,2,2) t3 values(1648791213000,3,3,3);
+
+
+$loop_count = 0
+loop9:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from result6.streamt6 order by 3;
+
+if $rows != 3 then
+ print =====rows=$rows
+ print $data00 $data10
+ goto loop9
+endi
+
+if $data02 != 10 then
+ print =====data02=$data02
+ goto loop9
+endi
+
+if $data12 != 20 then
+ print =====data12=$data12
+ goto loop9
+endi
+
+if $data22 != 30 then
+ print =====data22=$data22
+ goto loop8
+endi
+
print ======over
system sh/stop_dnodes.sh
diff --git a/tests/script/tsim/stream/udTableAndTag2.sim b/tests/script/tsim/stream/udTableAndTag2.sim
new file mode 100644
index 0000000000..bacc301ad0
--- /dev/null
+++ b/tests/script/tsim/stream/udTableAndTag2.sim
@@ -0,0 +1,515 @@
+system sh/stop_dnodes.sh
+system sh/deploy.sh -n dnode1 -i 1
+
+print ===== step1
+
+system sh/exec.sh -n dnode1 -s start
+sleep 50
+sql connect
+
+print ===== step2
+print ===== table name
+
+sql create database result vgroups 1;
+
+sql create database test vgroups 4;
+sql use test;
+
+
+sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int);
+sql create table t1 using st tags(1,1,1);
+sql create table t2 using st tags(2,2,2);
+
+sql create stream streams1 trigger at_once into result.streamt SUBTABLE("aaa") as select _wstart, count(*) c1 from st interval(10s);
+print ===== insert into 1
+sql insert into t1 values(1648791213000,1,2,3);
+sql insert into t2 values(1648791213000,2,2,3);
+
+$loop_count = 0
+loop0:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select table_name from information_schema.ins_tables where db_name="result" order by 1;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00
+ print $data10
+ goto loop0
+endi
+
+if $data00 != aaa then
+ print =====data00=$data00
+ goto loop0
+endi
+
+
+$loop_count = 0
+loop1:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from result.streamt;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00 $data10
+ goto loop1
+endi
+
+if $data01 != 2 then
+ print =====data01=$data01
+ goto loop1
+endi
+
+# group id
+if $data02 == NULL then
+ print =====data02=$data02
+ goto loop1
+endi
+
+
+print ===== step3
+print ===== column name
+
+sql create database result2 vgroups 1;
+
+sql create database test2 vgroups 4;
+sql use test2;
+
+
+sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int);
+sql create table t1 using st tags(1,1,1);
+sql create table t2 using st tags(2,2,2);
+
+sql create stream streams2 trigger at_once into result2.streamt2 TAGS(cc varchar(100)) as select _wstart, count(*) c1 from st interval(10s);
+print ===== insert into 2
+sql insert into t1 values(1648791213000,1,2,3);
+sql insert into t2 values(1648791213000,2,2,3);
+
+
+$loop_count = 0
+loop2:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+print select tag_name from information_schema.ins_tags where db_name="result2" and stable_name = "streamt2" order by 1;
+
+sql select tag_name from information_schema.ins_tags where db_name="result2" and stable_name = "streamt2" order by 1;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00
+ print $data10
+ goto loop2
+endi
+
+if $data00 != cc then
+ print =====data00=$data00
+ goto loop2
+endi
+
+print sql select cc from result2.streamt2 order by 1;
+
+$loop_count = 0
+loop21:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select cc from result2.streamt2 order by 1;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00
+ print $data10
+ goto loop21
+endi
+
+if $data00 != NULL then
+ print =====data00=$data00
+ goto loop21
+endi
+
+
+$loop_count = 0
+loop3:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from result2.streamt2;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00
+ print $data10
+ goto loop3
+endi
+
+if $data01 != 2 then
+ print =====data01=$data01
+ goto loop3
+endi
+
+if $data02 != NULL then
+ print =====data02=$data02
+ goto loop3
+endi
+
+
+print ===== step4
+print ===== column name + table name
+
+sql create database result3 vgroups 1;
+
+sql create database test3 vgroups 4;
+sql use test3;
+
+
+sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int);
+sql create table t1 using st tags(1,1,1);
+sql create table t2 using st tags(2,2,2);
+
+sql create stream streams3 trigger at_once into result3.streamt3 TAGS(dd varchar(100)) SUBTABLE(concat("tbn-", "1") ) as select _wstart, count(*) c1 from st interval(10s);
+print ===== insert into 3
+sql insert into t1 values(1648791213000,1,2,3);
+sql insert into t2 values(1648791213000,2,2,3);
+
+
+$loop_count = 0
+loop4:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select tag_name from information_schema.ins_tags where db_name="result3" and stable_name = "streamt3" order by 1;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00
+ print $data10
+ goto loop4
+endi
+
+if $data00 != dd then
+ print =====data00=$data00
+ goto loop4
+endi
+
+sql select dd from result3.streamt3 order by 1;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00 $data10
+ goto loop4
+endi
+
+if $data00 != NULL then
+ print =====data00=$data00
+ goto loop4
+endi
+
+$loop_count = 0
+loop5:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from result3.streamt3;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00
+ print $data10
+ goto loop5
+endi
+
+if $data01 != 2 then
+ print =====data01=$data01
+ goto loop5
+endi
+
+if $data02 != NULL then
+ print =====data02=$data02
+ goto loop5
+endi
+
+$loop_count = 0
+loop6:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select table_name from information_schema.ins_tables where db_name="result3" order by 1;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00
+ print $data10
+ goto loop6
+endi
+
+if $data00 != tbn-1 then
+ print =====data00=$data00
+ goto loop6
+endi
+
+print ===== step5
+print ===== tag name + table name
+
+sql create database result4 vgroups 1;
+
+sql create database test4 vgroups 1;
+sql use test4;
+
+
+sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int);
+sql create table t1 using st tags(1,1,1);
+sql create table t2 using st tags(2,2,2);
+sql create table t3 using st tags(3,3,3);
+
+sql create stream streams4 trigger at_once into result4.streamt4 TAGS(dd varchar(100)) SUBTABLE(concat("tbn-", "1")) as select _wstart, count(*) c1 from st interval(10s);
+sql insert into t1 values(1648791213000,1,1,1) t2 values(1648791213000,2,2,2) t3 values(1648791213000,3,3,3);
+
+
+$loop_count = 0
+loop7:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select table_name from information_schema.ins_tables where db_name="result4" order by 1;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00
+ print $data10
+ goto loop7
+endi
+
+if $data00 != tbn-1 then
+ print =====data00=$data00
+ goto loop7
+endi
+
+$loop_count = 0
+loop8:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from result4.streamt4 order by 3;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00 $data10
+ goto loop8
+endi
+
+if $data01 != 3 then
+ print =====data01=$data01
+ goto loop8
+endi
+
+if $data02 != NULL then
+ print =====data02=$data02
+ goto loop8
+endi
+
+
+print ===== step6
+print ===== table name
+
+sql create database result5 vgroups 1;
+
+sql create database test5 vgroups 1;
+sql use test5;
+
+
+sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int);
+sql create table t1 using st tags(1,1,1);
+sql create table t2 using st tags(2,2,2);
+
+sql create stream streams51 trigger at_once into result5.streamt51 SUBTABLE("aaa") as select _wstart, count(*) c1 from st interval(10s);
+sql create stream streams52 trigger at_once into result5.streamt52 TAGS(cc varchar(100)) as select _wstart, count(*) c1 from st interval(10s);
+sql create stream streams53 trigger at_once into result5.streamt53 TAGS(dd varchar(100)) SUBTABLE(concat("aaa-", "1") ) as select _wstart, count(*) c1 from st interval(10s);
+
+sql insert into t1 values(1648791213000,1,2,3);
+sql insert into t2 values(1648791213000,2,2,3);
+
+$loop_count = 0
+loop9:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+print select table_name from information_schema.ins_tables where db_name="result5" order by 1;
+
+sql select table_name from information_schema.ins_tables where db_name="result5" order by 1;
+
+if $rows != 3 then
+ print =====rows=$rows
+ print $data00
+ print $data10
+ print $data20
+ print $data40
+ goto loop9
+endi
+
+if $data00 != aaa then
+ print =====data00=$data00
+ goto loop9
+endi
+
+if $data10 != aaa-1 then
+ print =====data00=$data00
+ goto loop9
+endi
+
+$loop_count = 0
+loop10:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+print sql select tag_name from information_schema.ins_tags where db_name="result5" and stable_name = "streamt52" order by 1;
+
+sql select tag_name from information_schema.ins_tags where db_name="result5" and stable_name = "streamt52" order by 1;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00
+ print $data10
+ goto loop10
+endi
+
+if $data00 != cc then
+ print =====data00=$data00
+ goto loop10
+endi
+
+print sql select tag_name from information_schema.ins_tags where db_name="result5" and stable_name = "streamt53" order by 1;
+
+sql select tag_name from information_schema.ins_tags where db_name="result5" and stable_name = "streamt53" order by 1;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00
+ print $data10
+ goto loop10
+endi
+
+if $data00 != dd then
+ print =====data00=$data00
+ goto loop10
+endi
+
+
+
+
+
+$loop_count = 0
+loop11:
+
+sleep 300
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from result5.streamt51;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00 $data10
+ goto loop11
+endi
+
+if $data01 != 2 then
+ print =====data01=$data01
+ goto loop11
+endi
+
+sql select * from result5.streamt52;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00 $data10
+ goto loop11
+endi
+
+if $data01 != 2 then
+ print =====data01=$data01
+ goto loop11
+endi
+
+sql select * from result5.streamt53;
+
+if $rows != 1 then
+ print =====rows=$rows
+ print $data00 $data10
+ goto loop11
+endi
+
+if $data01 != 2 then
+ print =====data01=$data01
+ goto loop11
+endi
+
+print ======over
+
+system sh/stop_dnodes.sh