diff --git a/.github/workflows/taoskeeper-ci.yml b/.github/workflows/taoskeeper-ci.yml index ba43937029..fbc662ffb2 100644 --- a/.github/workflows/taoskeeper-ci.yml +++ b/.github/workflows/taoskeeper-ci.yml @@ -48,7 +48,7 @@ jobs: working-directory: tools/keeper run: | go mod tidy - go test -v -coverpkg=./... -coverprofile=coverage.out ./... + sudo go test -v -ldflags="-X 'github.com/taosdata/taoskeeper/version.IsEnterprise=true'" -coverpkg=./... -coverprofile=coverage.out ./... go tool cover -func=coverage.out - name: Clean up diff --git a/cmake/cmake.define b/cmake/cmake.define index 3fa99a7c93..ff582261b3 100644 --- a/cmake/cmake.define +++ b/cmake/cmake.define @@ -191,48 +191,11 @@ ELSE() SET(COMPILER_SUPPORT_AVX512VL false) ELSE() CHECK_C_COMPILER_FLAG("-mfma" COMPILER_SUPPORT_FMA) + CHECK_C_COMPILER_FLAG("-mavx" COMPILER_SUPPORT_AVX) + CHECK_C_COMPILER_FLAG("-mavx2" COMPILER_SUPPORT_AVX2) CHECK_C_COMPILER_FLAG("-mavx512f" COMPILER_SUPPORT_AVX512F) CHECK_C_COMPILER_FLAG("-mavx512vbmi" COMPILER_SUPPORT_AVX512BMI) CHECK_C_COMPILER_FLAG("-mavx512vl" COMPILER_SUPPORT_AVX512VL) - - INCLUDE(CheckCSourceRuns) - SET(CMAKE_REQUIRED_FLAGS "-mavx") - check_c_source_runs(" - #include - int main() { - __m256d a, b, c; - double buf[4] = {0}; - a = _mm256_loadu_pd(buf); - b = _mm256_loadu_pd(buf); - c = _mm256_add_pd(a, b); - _mm256_storeu_pd(buf, c); - for (int i = 0; i < sizeof(buf) / sizeof(buf[0]); ++i) { - IF (buf[i] != 0) { - return 1; - } - } - return 0; - } - " COMPILER_SUPPORT_AVX) - - SET(CMAKE_REQUIRED_FLAGS "-mavx2") - check_c_source_runs(" - #include - int main() { - __m256i a, b, c; - int buf[8] = {0}; - a = _mm256_loadu_si256((__m256i *)buf); - b = _mm256_loadu_si256((__m256i *)buf); - c = _mm256_and_si256(a, b); - _mm256_storeu_si256((__m256i *)buf, c); - for (int i = 0; i < sizeof(buf) / sizeof(buf[0]); ++i) { - IF (buf[i] != 0) { - return 1; - } - } - return 0; - } - " COMPILER_SUPPORT_AVX2) ENDIF() IF(COMPILER_SUPPORT_SSE42) diff --git a/docs/examples/node/package.json b/docs/examples/node/package.json index 3f5f54e9d7..14303c8f37 100644 --- a/docs/examples/node/package.json +++ b/docs/examples/node/package.json @@ -4,6 +4,6 @@ "main": "index.js", "license": "MIT", "dependencies": { - "@tdengine/websocket": "^3.1.0" + "@tdengine/websocket": "^3.1.1" } } diff --git a/docs/examples/node/websocketexample/sql_example.js b/docs/examples/node/websocketexample/sql_example.js index 0a09228d97..c120b84d99 100644 --- a/docs/examples/node/websocketexample/sql_example.js +++ b/docs/examples/node/websocketexample/sql_example.js @@ -3,7 +3,6 @@ const taos = require("@tdengine/websocket"); let dsn = 'ws://localhost:6041'; async function createConnect() { - try { let conf = new taos.WSConfig(dsn); conf.setUser('root'); diff --git a/docs/examples/node/websocketexample/tmq_seek_example.js b/docs/examples/node/websocketexample/tmq_seek_example.js index f676efe36f..be4d8ddfa4 100644 --- a/docs/examples/node/websocketexample/tmq_seek_example.js +++ b/docs/examples/node/websocketexample/tmq_seek_example.js @@ -10,7 +10,6 @@ const groupId = "group1"; const clientId = "client1"; async function createConsumer() { - let groupId = "group1"; let clientId = "client1"; let configMap = new Map([ diff --git a/docs/zh/05-basic/03-query.md b/docs/zh/05-basic/03-query.md index 4a1771d5fd..b6f172829a 100644 --- a/docs/zh/05-basic/03-query.md +++ b/docs/zh/05-basic/03-query.md @@ -8,7 +8,7 @@ toc_max_heading_level: 4 ## 基本查询 -为了更好的介绍 TDengine 数据查询,使用 如下 taosBenchmark 命令,生成本章内容需要的时序数据。 +为了更好的介绍 TDengine 数据查询,使用如下 taosBenchmark 命令,生成本章内容需要的时序数据。 ```shell taosBenchmark --start-timestamp=1600000000000 --tables=100 --records=10000000 --time-step=10000 @@ -25,7 +25,7 @@ ORDER BY ts DESC LIMIT 5; ``` -上面的 SQL,从超级表 `meters` 中查询出电压 `voltage` 大于 230 的记录,按时间降序排列,且仅输出前 5 行。查询结果如下: +上面的 SQL,从超级表 `meters` 中查询出电压 `voltage` 大于 230V 的记录,按时间降序排列,且仅输出前 5 行。查询结果如下: ```text ts | current | voltage | phase | groupid | location | diff --git a/docs/zh/06-advanced/06-data-analysis/01-arima.md b/docs/zh/06-advanced/06-data-analysis/01-arima.md index 1668da453c..6799d48887 100644 --- a/docs/zh/06-advanced/06-data-analysis/01-arima.md +++ b/docs/zh/06-advanced/06-data-analysis/01-arima.md @@ -3,8 +3,52 @@ title: "ARIMA" sidebar_label: "ARIMA" --- -本节讲述如何 ARIMA 算法的使用方法。 +本节讲述 ARIMA 算法模型的使用方法。 ## 功能概述 -…… \ No newline at end of file +ARIMA 即自回归移动平均模型(Autoregressive Integrated Moving Average, ARIMA),也记作 ARIMA(p,d,q),是统计模型中最常见的一种用来进行时间序列预测的模型。 +ARIMA模型是一种自回归模型,只需要自变量即可预测后续的值。ARIMA模型要求时序数据是**平稳**,或经过差分处理后平稳,如果是不平稳的数据,**无法**获得正确的结果。 + +>平稳的时间序列:其性质不随观测时间的变化而变化。具有趋势或季节性的时间序列不是平稳时间序列——趋势和季节性使得时间序列在不同时段呈现不同性质。 + +以下参数可以动态输入控制预测过程中生成 合适的 ARIMA 的模型。 + +- p= 自回归模型阶数 +- d= 差分阶数 +- q= 移动平均模型阶数 + + +### 参数 +分析平台中使用自动化的 ARIMA 模型进行计算,因此每次计算的时候会根据输入的数据自动拟合最合适的模型,然后根据该模型进行预测输出结果。 +|参数名称|说明|必填项| +|---|---|---| +|period|输入时间序列数据每个周期包含的数据点个数。如果不设置该参数或则该参数设置为 0, 将使用非季节性/周期性的 ARIMA 模型预测。|选填| +|start_p| 自回归模型阶数的 起始值,0 开始的整数,不推荐大于 10 |选填| +|max_p| 自回归模型阶数的 结束值,0 开始的整数,不推荐大于 10 |选填| +|start_q| 移动平均模型阶数的起始值, 0 开始的整数,不推荐大于 10 |选填| +|max_q| 移动平均模型阶数的结束值, 0 开始的整数,不推荐大于 10 |选填| +|d| 差分阶数|选填| + +`start_p`、`max_p` `start_q` `max_q` 四个参数约束了模型在多大的范围内去搜寻合适的最优解。相同输入数据的条件下,参数范围越大,消耗的资源越多,系统响应的时间越长。 + +### 示例及结果 +针对 i32 列进行数据预测,输入列 i32 每 10 个点是一个周期,start_p 起始是 1, 最大拟合是 5,start_q是1,最大值是5,预测结果中返回 95% 置信区间范围边界。 +``` +FORECAST(i32, "algo=arima,alpha=95,period=10, start_p=1, max_p=5, start_q=1, max_q=5") +``` + +```json5 +{ +"rows": fc_rows, // 预测结果的行数 +"period": period, // 返回结果的周期性,同输入 +"alpha": alpha, // 返回结果的置信区间,同输入 +"algo": "arima", // 返回结果使用的算法 +"mse":mse, // 拟合输入时序数据时候生成模型的最小均方误差(MSE) +"res": res // 列模式的结果 +} +``` + +### 参考文献 +- https://en.wikipedia.org/wiki/Autoregressive_moving-average_model +- https://baike.baidu.com/item/%E8%87%AA%E5%9B%9E%E5%BD%92%E6%BB%91%E5%8A%A8%E5%B9%B3%E5%9D%87%E6%A8%A1%E5%9E%8B/5023931?fromtitle=ARMA%E6%A8%A1%E5%9E%8B&fromid=8048415 diff --git a/docs/zh/06-advanced/06-data-analysis/02-holtwinters.md b/docs/zh/06-advanced/06-data-analysis/02-holtwinters.md new file mode 100644 index 0000000000..470ef46253 --- /dev/null +++ b/docs/zh/06-advanced/06-data-analysis/02-holtwinters.md @@ -0,0 +1,43 @@ +--- +title: "HoltWinters" +sidebar_label: "HoltWinters" +--- + +本节讲述 HoltWinters 算法模型的使用方法。 + +## 功能概述 +HoltWinters模型又称为多次指数平滑模型(EMA)。对含有线性趋势和周期波动的非平稳序列适用,利用指数平滑法让模型参数不断适应非平稳序列的变化,并对未来趋势进行**短期**预测。 +HoltWinters有两种不同的季节性组成部分,当季节变化在该时间序列中大致保持不变时,通常选择**加法模型**;而当季节变化与时间序列的水平成比例变化时,通常选择**乘法模型**。 +该模型对于返回数据也不提供计算的置信区间范围结果。在 95% 置信区间的上下界结果与预测结果相同。 + + +### 参数 + +分析平台中使用自动化的 ARIMA 模型进行计算,因此每次计算的时候会根据输入的数据自动拟合最合适的模型,然后根据该模型进行预测输出结果。 +|参数名称|说明|必填项| +|---|---|---| +|period| 输入时间序列数据每个周期包含的数据点个数。如果不设置该参数或则该参数设置为 0, 将使用一次(简单)指数平滑方式进行数据拟合,并据此进行未来数据的预测|选填| +|trend| 趋势模型使用加法模型还是乘法模型|选填| +|seasonal| 季节性采用加法模型还是乘法模型|选填| + +参数 `trend` 和 `seasonal`的均可以选择 `add` (加法模型)或 `mul`(乘法模型)。 + +### 示例及结果 +针对 i32 列进行数据预测,输入列 i32 每 10 个点是一个周期,趋势采用乘法模型,季节采用乘法模型 +``` +FORECAST(i32, "algo=holtwinters,period=10,trend=mul,seasonal=mul") +``` + +```json5 +{ +"rows": rows, // 结果的行数 +"period": period, // 返回结果的周期性, 该结果与输入的周期性相同,如果没有周期性,该值为 0 +"algo": 'holtwinters' // 返回结果使用的计算模型 +"mse":mse, // 最小均方误差(minmum square error) +"res": res // 具体的结果,按照列形式返回的结果。一般意义上包含了 两列[timestamp][fc_results]。 +} +``` + +### 参考文献 +- https://en.wikipedia.org/wiki/Exponential_smoothing +- https://orangematter.solarwinds.com/2019/12/15/holt-winters-forecasting-simplified/ diff --git a/docs/zh/06-advanced/06-data-analysis/03-anomaly-detection.md b/docs/zh/06-advanced/06-data-analysis/03-anomaly-detection.md new file mode 100644 index 0000000000..8f1e1f064a --- /dev/null +++ b/docs/zh/06-advanced/06-data-analysis/03-anomaly-detection.md @@ -0,0 +1,46 @@ +--- +title: "Anomaly-detection" +sidebar_label: "Anomaly-detection" +--- + +本节讲述 异常检测 算法模型的使用方法。 + +## 概述 +分析平台提供了 6 种异常检查模型,6 种异常检查模型分为 3 个类别,分别属于基于统计的异常检测模型、基于数据密度的检测模型、基于深度学习的异常检测模型。在不指定异常检测使用的方法的情况下,默认调用 iqr 的方法进行计算。 + + +### 统计学异常检测方法 + +- k-sigma[1]: 即 ***68–95–99.7 rule*** 。***k***值默认为3, 即序列均值的 3 倍标准差范围为边界,超过边界的是异常值。KSigma 要求数据整体上服从正态分布,如果一个点偏离均值K倍标准差,则该点被视为异常点. + +|参数名称|说明|是否必选|默认值| +|---|---|---|---| +|k|标准差倍数|选填|3| + + +- IQR[2]:四分位距 (Interquartile range, IQR) 是一种衡量变异性的方法. 四分位数将一个按等级排序的数据集划分为四个相等的部分。即 Q1(第 1 个四分位数)、Q2(第 2 个四分位数)和 Q3(第 3 个四分位数)。IQR 定义为 Q3–Q1,位于 Q3+1.5 。无输入参数。 + +- Grubbs[3]: 又称为 Grubbs' test,即最大标准残差测试。Grubbs 通常用作检验最大值、最小值偏离均值的程度是否为异常,该单变量数据集遵循近似标准正态分布。非正态分布数据集不能使用该方法。无输入参数。 + +- SHESD[4]: 带有季节性的 ESD 检测算法。ESD 可以检测时间序列数据的多异常点。需要指定异常点比例的上界***k***,最差的情况是至多49.9%。数据集的异常比例一般不超过5% + +|参数名称|说明|是否必选|默认值| +|---|---|---|---| +|k|异常点在输入数据集中占比,范围是$`1\le K \le 49.9`$ |选填|5| + + +### 基于数据密度的检测方法 +LOF[5]: 局部离群因子(LOF,又叫局部异常因子)算法是Breunig于2000年提出的一种基于密度的局部离群点检测算法,该方法适用于不同类簇密度分散情况迥异的数据。根据数据点周围的数据密集情况,首先计算每个数据点的一个局部可达密度,然后通过局部可达密度进一步计算得到每个数据点的一个离群因子,该离群因子即标识了一个数据点的离群程度,因子值越大,表示离群程度越高,因子值越小,表示离群程度越低。最后,输出离群程度最大的top(n)个点。 + + +### 基于深度学习的检测方法 +使用自动编码器的异常检测模型。可以对具有周期性的数据具有较好的检测结果。但是使用该模型需要针对输入的时序数据进行训练,同时将训练完成的模型部署到服务目录中,才能够运行与使用。 + + +### 参考文献 +1. https://en.wikipedia.org/wiki/68%E2%80%9395%E2%80%9399.7_rule +2. https://en.wikipedia.org/wiki/Interquartile_range +3. Adikaram, K. K. L. B.; Hussein, M. A.; Effenberger, M.; Becker, T. (2015-01-14). "Data Transformation Technique to Improve the Outlier Detection Power of Grubbs's Test for Data Expected to Follow Linear Relation". Journal of Applied Mathematics. 2015: 1–9. doi:10.1155/2015/708948. +4. Hochenbaum, O. S. Vallis, and A. Kejariwal. 2017. Automatic Anomaly Detection in the Cloud Via Statistical Learning. arXiv preprint arXiv:1704.07706 (2017). +5. Breunig, M. M.; Kriegel, H.-P.; Ng, R. T.; Sander, J. (2000). LOF: Identifying Density-based Local Outliers (PDF). Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data. SIGMOD. pp. 93–104. doi:10.1145/335191.335388. ISBN 1-58113-217-4. + diff --git a/docs/zh/06-advanced/06-data-analysis/addins.md b/docs/zh/06-advanced/06-data-analysis/addins.md new file mode 100644 index 0000000000..867bd9ff23 --- /dev/null +++ b/docs/zh/06-advanced/06-data-analysis/addins.md @@ -0,0 +1,167 @@ +--- +title: "addins" +sidebar_label: "addins" +--- + +本节说明如何将自己开发的新预测算法和异常检测算法整合到 TDengine 分析平台, 并能够通过 SQL 语句进行调用。 + +## 目录结构 + +![数据分析功能架构图](./pic/dir.png) + +|目录|说明| +|---|---| +|taos|Python 源代码目录,其下包含了算法具体保存目录 algo,放置杂项目录 misc, 单元测试和集成测试目录 test。 algo目录下 ad 放置异常检测算法代码, fc 放置预测算法代码| +|script|是安装脚本和发布脚本放置目录| +|model|放置针对数据集完成的训练模型| +|cfg| 配置文件目录| + +## 约定与限制 + +定义异常检测算法的 Python 代码文件 需放在 /taos/algo/ad 目录中,预测算法 Python 代码文件需要放在 /taos/algo/fc 目录中,以确保系统启动的时候能够正常加载对应目录下的 Python 文件。 + + +### 类命名规范 + +算法类的名称需要 以下划线开始,以 Service 结尾。例如:_KsigmaService 是 KSigma 异常检测算法的实现类。 + +### 类继承约定 + +异常检测算法需要从 `AbstractAnomalyDetectionService` 继承,并实现其核心抽象方法 `execute`. +预测算法需要从 `AbstractForecastService` 继承,同样需要实现其核心抽象方法 `execute`。 + +### 类属性初始化 +每个算法实现的类需要静态初始化两个类属性,分别是 + +`name`: 的触发调用关键词,全小写英文字母。 +`desc`:该算法的描述信息。 + +### 核心方法输入与输出约定 + +`execute` 是算法处理的核心方法。调用该方法的时候, `self.list` 已经设置好输入数组。 +异常检测输出结果 + +`execute` 的返回值是长度与 `self.list` 相同的数组,数组位置为 -1 的即为异常值点。例如:输入数组是 [2, 2, 2, 2, 100], 如果 100 是异常点,那么返回值是 [1, 1, 1, 1, -1]。 +预测输出结果 + +对于预测算法, `AbstractForecastService` 的对象属性说明如下: + +|属性名称|说明|默认值| +|---|---|---| +|period|输入时序数据的周期性,多少个数据点表示一个完整的周期。如果没有周期性,那么设置为 0 即可。| 0| +|start_ts|预测数据的开始时间| 0| +|time_step|预测结果的两个数据点之间时间间隔|0 | +|fc_rows|预测结果数量| 0 | +|return_conf|返回结果中是否包含执行区间范围,如果算法计算结果不包含置信区间,那么上界和下界与自身相同| 1| +|conf|执行区间分位数 0.05| + + +预测返回结果如下: +```python +return { + "rows": self.fc_rows, # 预测数据行数 + "period": self.period, # 数据周期性,同输入 + "algo": "holtwinters", # 预测使用的算法 + "mse": mse, # 预测算法的 mse + "res": res # 结果数组 [时间戳数组, 预测结果数组, 预测结果执行区间下界数组,预测结果执行区间上界数组] +} +``` + + +## 示例代码 + +```python +import numpy as np +from service import AbstractAnomalyDetectionService + +# 算法实现类名称 需要以下划线 "_" 开始,并以 Service 结束,如下 _IqrService 是 IQR 异常检测算法的实现类。 +class _IqrService(AbstractAnomalyDetectionService): + """ IQR algorithm 定义类,从 AbstractAnomalyDetectionService 继承,并实现 AbstractAnomalyDetectionService类的抽象函数 """ + + # 定义算法调用关键词,全小写ASCII码(必须添加) + name = 'iqr' + + # 该算法的描述信息(建议添加) + desc = """found the anomaly data according to the inter-quartile range""" + + def __init__(self): + super().__init__() + + def execute(self): + """ execute 是算法实现逻辑的核心实现,直接修改该实现即可 """ + + # self.list 是输入数值列,list 类型,例如:[1,2,3,4,5]。设置 self.list 的方法在父类中已经进行了定义。实现自己的算法,修改该文件即可,以下代码使用自己的实现替换即可。 + #lower = np.quantile(self.list, 0.25) + #upper = np.quantile(self.list, 0.75) + + #min_val = lower - 1.5 * (upper - lower) + #max_val = upper + 1.5 * (upper - lower) + #threshold = [min_val, max_val] + + # 返回值是与输入数值列长度相同的数据列,异常值对应位置是 -1。例如上述输入数据列,返回数值列是 [1, 1, 1, 1, -1],表示 [5] 是异常值。 + return [-1 if k < threshold[0] or k > threshold[1] else 1 for k in self.list] + + + def set_params(self, params): + """该算法无需任何输入参数,直接重载父类该函数,不处理算法参数设置逻辑""" + pass +``` + + +## 单元测试 + +在测试文件目录中的 anomaly_test.py 中增加单元测试用例。 +```python +def test_iqr(self): + """ 测试 _IqrService 类 """ + s = loader.get_service("iqr") + + # 设置需要进行检测的输入数据 + s.set_input_list(AnomalyDetectionTest.input_list) + + # 测试 set_params 的处理逻辑 + try: + s.set_params({"k": 2}) + except ValueError as e: + self.assertEqual(1, 0) + + r = s.execute() + + # 绘制异常检测结果 + draw_ad_results(AnomalyDetectionTest.input_list, r, "iqr") + + # 检查结果 + self.assertEqual(r[-1], -1) + self.assertEqual(len(r), len(AnomalyDetectionTest.input_list)) +``` + +## 需要模型的算法 + +针对特定数据集,进行模型训练的算法,在训练完成后。需要将训练得到的模型保存在 model 目录中。需要注意的是,针对每个算法,需要建立独立的文件夹。例如 auto_encoder 的训练算法在 model 目录下建立了, autoencoder的目录,使用该算法针对不同数据集训练得到的模型,均需要放置在该目录下。 + +训练完成后的模型,使用 joblib 进行保存。 + +并在 model 目录下建立对应的文件夹存放该模型。 + +保存模型的调用,可参考 encoder.py 的方式,用户通过调用 set_params 方法,并指定参数 {"model": "ad_encoder_keras"} 的方式,可以调用该模型进行计算。 + +具体的调用方式如下: + +```python +def test_autoencoder_ad(self): + # 获取特定的算法服务 + s = loader.get_service("ac") + data = self.__load_remote_data_for_ad() + + # 设置异常检查的输入数据 + s.set_input_list(data) + + # 指定调用的模型,该模型是之前针对该数据集进行训练获得 + s.set_params({"model": "ad_encoder_keras"}) + # 执行检查动作,并返回结果 + r = s.execute() + + num_of_error = -(sum(filter(lambda x: x == -1, r))) + self.assertEqual(num_of_error, 109) +``` + diff --git a/docs/zh/06-advanced/06-data-analysis/index.md b/docs/zh/06-advanced/06-data-analysis/index.md index a1ca53d7d0..e3bf2f4158 100644 --- a/docs/zh/06-advanced/06-data-analysis/index.md +++ b/docs/zh/06-advanced/06-data-analysis/index.md @@ -5,9 +5,314 @@ title: 数据分析功能 ## 概述 -TDengine 提供数据分析功能的扩展组件,通过引入 ANode,TDengine 能够支持时间序列的机器学习分析 - -下图展示了数据分析的技术架构。 +TDengine 通过 ANode(AnalysisNode) 是提供数据分析功能的扩展组件,通过 Restful 接口提供分析服务,从而拓展 TDengine 的功能,支持时间序列高级分析功能。 +ANode 是无状态的数据分析节点,集群中可以存在多个 ANode节点,相互之间没有关联。将 ANode 注册到 TDengine 集群以后,通过 SQL 语句即可调用并完成时序分析任务。 +下图是数据分析的技术架构示意图。 ![数据分析功能架构图](./pic/data-analysis.png) +## 安装部署 +### 环境准备 +ANode 的要求节点上准备有 Python 3.10 及以上版本以及相应的Python包自动安装组件 Pip ,同时请确保能够正常连接互联网。 + +### 安装及卸载 +使用专门的 ANode 安装包 TDengine-enterprise-anode-1.x.x.tar.gz 进行 ANode 的安装部署工作,安装过程与 TDengien 的安装流程一致。 + +```bash +tar -xzvf TDengine-enterprise-anode-1.0.0.tar.gz +cd TDengine-enterprise-anode-1.0.0 +sudo ./install.sh +``` + +卸载 ANode,执行命令 `rmtaosanode` 即可。 + +### 其他 +为了避免 ANode 安装后影响目标节点现有的 Python 库。 ANode 使用 Python 虚拟环境运行,安装后的默认 Python 目录处于 `/var/lib/taos/taosanode/venv/`。为了避免反复安装虚拟环境带来的开销,卸载 ANode 并不会自动删除该虚拟环境,如果您确认不需要 Python 的虚拟环境,可以手动删除。 + +## 启动及停止服务 +安装 ANode 以后,可以使用`systemctl`来管理 ANode 的服务。使用如下命令可以启动/停止/检查状态。 + +```bash +systemctl start taosanoded +systemctl stop taosanoded +systemctl status taosanoded +``` + +## 目录及配置说明 +|目录/文件|说明| +|---------------|------| +|/usr/local/taos/taosanode/bin|可执行文件目录| +|/usr/local/taos/taosanode/resource|资源文件目录,链接到文件夹 /var/lib/taos/taosanode/resource/| +|/usr/local/taos/taosanode/lib|库文件目录| +|/var/lib/taos/taosanode/model/|模型文件目录,链接到文件夹 /var/lib/taos/taosanode/model| +|/var/log/taos/taosanode/|日志文件目录| +|/etc/taos/taosanode.ini|配置文件| + +### 配置说明 + +Anode 提供的 RestFul 服务使用 uWSGI 驱动,因此 ANode 的配置和 uWSGI 的配置在同一个配置文件中,具体如下: + +```ini +[uwsgi] +# charset +env=LC_ALL=en_US.UTF-8 + +# ip:port +http = 127.0.0.1:6050 + +# the local unix socket file than communicate to Nginx +#socket = 127.0.0.1:8001 +#socket-timeout=10 + +# base directory +chdir = /usr/local/taos/taosanode/lib + +# initialize python file +wsgi-file = /usr/local/taos/taosanode/lib/app.py + +# invoke app model +callable = app + +# auto remove unix Socket and pid file when stopping +vacuum = true + +# socket exec model +#chmod-socket = 664 + +# uWSGI pid +uid=root + +# uWSGI gid +gid=root + +# main process +master = true + +# the number of worker processes +processes = 2 + +# pid file +pidfile = /usr/local/taos/taosanode/uwsgi.pid + +# enable threads +enable-threads=true + +# the number of threads for each process +threads=2 + +# memory useage report +memory-report = true +reload-mercy = 10 + +# conflict with systemctl, so do NOT uncomment this +# daemonize = /var/log/taos/taosanode/taosanode.log + +# set log +logto = /var/log/taos/taosanode/taosanode.log + +# monitor server +stats = 127.0.0.1:8387 + +# python virtual environment directory +virtualenv = /usr/local/taos/taosanode/venv/ + +[taosanode] +# default app log file +app-log = /var/log/taos/taosanode/taosanode.app.log + +# model storage directory +model-dir=/usr/local/taos/taosanode/model/ + +# default log level +log-level = DEBUG +``` + +**提示** +请勿设置 `daemonize` 参数,该参数会导致 uWSGI 与 systemctl 冲突,从而无法正常启动。 + + +## ANode 基本操作 +### 管理 ANode +#### 创建 ANode +```sql +CREATE ANODE {node_url} +``` +node_url 是提供服务的 ANode 的 IP 和 PORT, 例如:`create anode 'http://localhost:6050'`。启动 ANode 以后如果不注册到 TDengine 集群中,无法提供正常的服务。不建议 ANode 注册到两个或多个集群中。 + +#### 查看 ANode +列出集群中所有的数据分析节点,包括其 `FQDN`, `PORT`, `STATUS`。 +```sql +SHOW ANODES; +``` + +#### 查看提供的时序数据分析服务 + +```SQL +SHOW ANODES FULL; +``` + +#### 强制刷新 TDengine 集群中分析算法缓存 +```SQL +UPDATE ANODE {node_id} +UPDATE ALL ANODES +``` + +#### 删除 ANode +```sql +DROP ANODE {anode_id} +``` +删除 ANode 只是将 ANode 从 TDengine 集群中删除,管理 ANode 的启停仍然需要使用`systemctl`命令。 + +### 时序数据分析功能 + +#### 白噪声检查 + +平台提供 Restful的服务检测输入时间序列是否是白噪声时间序列(White Noise Data, WND),白噪声时间序列及随机数序列。 +此外,分析平台要求输入的数据不能是 , 因此针对的所有数据均默认进行 白噪声检查。当前白噪声检查采用通行的 `Ljung-Box`检验,`Ljung-Box` 统计量检查过程需要遍历整个输入序列并进行计算。 +如果用户能够明确输入序列一定不是白噪声序列,那么可以通过输入参数,指定预测之前忽略该检查,从而节省分析过程的 CPU 计算资源。 +同时支持独立地针对输入序列进行白噪声检测(该检测功能暂不独立对外开放)。 + + +#### 数据重采样和时间戳对齐 + +数据分析平台支持将输入的数据进行重采样的预处理,从而确保输出结果按照用户指定的等间隔进行处理。处理过程分为两种类别: + +- 数据时间戳对齐。由于真实数据时间可能并非严格按照查询指定的时间戳输入。此时数据平台将自动将数据的时间间隔按照指定的时间间隔进行对齐。例如有输入时间序列:[11, 22, 29, 41],用户指定时间间隔为 10,那么该序列将被对齐重整为以下序列 [10, 20, 30, 40]。 +- 数据时间重采样。用户输入的时间序列其采样频率超过了指定的查询需要获得结果的时间间隔,例如输入原始数据是 5, 但是输出结果的频率是 10. [0, 5, 10, 15, 20, 25, 30],那么该输入数据列将重采用为间隔 为 10 的输入序列,其结果如下 [0, 10, 20,30]。[5, 15, 25] 处的数据将被丢弃。 + +需要注意的是,数据输入平台不支持缺失数据补齐后进行的预测分析,如果输入时间序列数据[11, 22, 29, 49],并且用户要求的时间间隔为 10, 重整对齐后的序列是 [10, 20, 30, 50] 那么该序列进行预测分析将返回错误。 + + +#### 时序数据异常检测 +异常检测是针对输入的时序数据,使用预设或用户指定的算法确定时间序列中**可能**出现异常时间序列点,对于时间序列中若干个连续的异常点,将自动合并成为一个连续的(闭区间)异常窗口。对于只有单个点的场景,异常窗口窗口退化成为一个起始时间和结束时间相同的点。 +异常检测生成的异常窗口受检测算法和算法参数的共同影响,对于异常窗口范围内的数据,可以应用 TDengine 提供的聚合和标量函数进行查询或变换处理。 +对于输入时间序列 (1, 20), (2, 22), (3, 91), (4, 120), (5, 18), (6, 19)。系统检测到 (3, 91), (4, 120) 为异常点,那么返回的异常窗口是闭区间 [3, 4]。 + + +##### 语法 + +```SQL +ANOMALY_WINDOW(column_name, option_expr) + +option_expr: {" +algo=expr1 +[,wncheck=1|0] +[,expr2] +"} +``` + +1. `column`:进行时序数据异常检测的输入数据列,当前只支持单列输入,且只能是数值类型,不能是字符类型(例如:`NCHAR` `VARCHAR` `VARBINARY`等类型),**不支持函数表达式**。 +2. `options`:字符串。其中使用 K/V 调用异常检测的算法,及与算法相关的参数。采用 逗号分隔的K/V字符串表示,其中的字符串不需要使用单引号、双引号、或转意号等符号,不能使用中文及其他宽字符。例如:`algo=ksigma, k=2` 表示进行异常检测的算法是 ksigma,该算法接受的输入参数是 2。 +3. 异常检测的结果可以作为外层查询的子查询输入,在 `SELECT` 子句中使用的聚合函数或标量函数与其他类型的窗口查询相同。 +4. 输入数据默认进行白噪声检查,如果检查结果是输入数据是白噪声,将不会有任何(异常)窗口信息返回。 + +**参数说明** +|参数|含义|默认值| +|---|---|---| +|algo|异常检测调用的算法|iqr| +|wncheck|对输入数据列是否进行白噪声检查|取值为0或者1,默认值为 1,表示进行白噪声检查| + +异常检测的返回结果以窗口的形式呈现,因此窗口查询相关的伪列在这种场景下仍然可用。可以使用的伪列如下: +1. `_WSTART`: 异常窗口开始时间戳 +2. `_WEND`:异常窗口结束时间戳 +3. `_WDURATION`:异常窗口持续时间 + +**示例** +```SQL +--- 使用 iqr 算法进行异常检测,检测列 i32 列。 +SELECT _wstart, _wend, SUM(i32) +FROM ai.atb +ANOMALY_WINDOW(i32, "algo=iqr"); + +--- 使用 ksigma 算法进行异常检测,输入参数 k 值为 2,检测列 i32 列 +SELECT _wstart, _wend, SUM(i32) +FROM ai.atb +ANOMALY_WINDOW(i32, "algo=ksigma,k=2"); +``` + +``` +taos> SELECT _wstart, _wend, count(*) FROM ai.atb ANOMAYL_WINDOW(i32); + _wstart | _wend | count(*) | +============================================================================ + 2020-01-01 00:00:16.000 | 2020-01-01 00:00:16.001 | 1 | +Query OK, 1 row(s) in set (0.028946s) +``` + + +**可用异常检测算法** +- iqr +- ksigma +- grubbs +- lof +- shesd +- tac + + +#### 时序数据预测 +数据预测以一段训练数据作为输入,预测接下来一个连续时间区间内,时序数据的趋势。 + +##### 语法 +```SQL +FORECAST(column_expr, option_expr) + +option_expr: {" +algo=expr1 +[,wncheck=1|0] +[,conf=conf_val] +[,every=every_val] +[,rows=rows_val] +[,start=start_ts_val] +[,expr2] +"} + +``` +1. `column_expr`:预测的时序数据列。与异常检测相同,只支持数值类型输入。 +2. `options`:异常检测函数的参数,使用规则与 anomaly_window 相同。预测还支持`conf`, `every`, `rows`, `start`, `rows` 几个参数,其含义如下: + +**参数说明** + +|参数|含义|默认值| +|---|---|---| +|algo|预测分析使用的算法|holtwinters| +|wncheck|白噪声(white noise data)检查|默认值为 1,0 表示不进行检查| +|conf|预测数据的置信区间范围 ,取值范围[0, 100]|95| +|every|预测数据的采样间隔|输入数据的采样间隔| +|start|预测结果的开始时间戳|输入数据最后一个时间戳加上一个采样时间段| +|rows|预测结果的记录数|10| + +1. 预测查询结果新增了三个伪列,具体如下: `_FROWTS`:预测结果的时间戳、`_FLOW`:置信区间下界、`_FHIGH`:置信区间上界, 对于没有置信区间的预测算法,其置信区间同预测结果 +2. 更改参数 `START`:返回预测结果的起始时间,改变这个起始时间不会影响返回的预测数值,只影响起始时间。 +3. `EVERY`:可以与输入数据的采样频率不同。采样频率只能低于或等于输入数据采样频率,不能**高于**输入数据的采样频率。 +4. 对于某些不需要计算置信区间的算法,即使指定了置信区间,返回的结果中其上下界退化成为一个点。 + +**示例** + +```SQL +--- 使用 arima 算法进行预测,预测结果是 10 条记录(默认值),数据进行白噪声检查,默认置信区间 95%. +SELECT _flow, _fhigh, _frowts, FORECAST(i32, "algo=arima") +FROM ai.ftb; + +--- 使用 arima 算法进行预测,输入数据的是周期数据,每10个采样点是一个周期。返回置信区间是 95%. +SELECT _flow, _fhigh, _frowts, FORECAST(i32, "algo=arima,alpha=95,period=10") +FROM ai.ftb; +``` +``` +taos> select _flow, _fhigh, _frowts, forecast(i32) from ai.ftb; + _flow | _fhigh | _frowts | forecast(i32) | +======================================================================================== + 10.5286684 | 41.8038254 | 2020-01-01 00:01:35.001 | 26 | + -21.9861946 | 83.3938904 | 2020-01-01 00:01:36.001 | 30 | + -78.5686035 | 144.6729126 | 2020-01-01 00:01:37.001 | 33 | + -154.9797363 | 230.3057709 | 2020-01-01 00:01:38.001 | 37 | + -253.9852905 | 337.6083984 | 2020-01-01 00:01:39.001 | 41 | + -375.7857971 | 466.4594727 | 2020-01-01 00:01:40.001 | 45 | + -514.8043823 | 622.4426270 | 2020-01-01 00:01:41.001 | 53 | + -680.6343994 | 796.2861328 | 2020-01-01 00:01:42.001 | 57 | + -868.4956665 | 992.8603516 | 2020-01-01 00:01:43.001 | 62 | + -1076.1566162 | 1214.4498291 | 2020-01-01 00:01:44.001 | 69 | +``` + + +**可用预测算法** +- arima +- holtwinters diff --git a/docs/zh/06-advanced/06-data-analysis/pic/data-analysis.png b/docs/zh/06-advanced/06-data-analysis/pic/data-analysis.png index 1598238f2c..44fd82832f 100644 Binary files a/docs/zh/06-advanced/06-data-analysis/pic/data-analysis.png and b/docs/zh/06-advanced/06-data-analysis/pic/data-analysis.png differ diff --git a/docs/zh/06-advanced/06-data-analysis/pic/dir.png b/docs/zh/06-advanced/06-data-analysis/pic/dir.png new file mode 100644 index 0000000000..d5aafb4427 Binary files /dev/null and b/docs/zh/06-advanced/06-data-analysis/pic/dir.png differ diff --git a/docs/zh/14-reference/03-taos-sql/02-database.md b/docs/zh/14-reference/03-taos-sql/02-database.md index 7d040a2c44..24eca97952 100644 --- a/docs/zh/14-reference/03-taos-sql/02-database.md +++ b/docs/zh/14-reference/03-taos-sql/02-database.md @@ -30,6 +30,7 @@ database_option: { | SINGLE_STABLE {0 | 1} | TABLE_PREFIX value | TABLE_SUFFIX value + | DNODES value | TSDB_PAGESIZE value | WAL_LEVEL {1 | 2} | WAL_FSYNC_PERIOD value @@ -63,19 +64,20 @@ database_option: { - MAXROWS:文件块中记录的最大条数,默认为 4096 条。 - MINROWS:文件块中记录的最小条数,默认为 100 条。 - KEEP:表示数据文件保存的天数,缺省值为 3650,取值范围 [1, 365000],且必须大于或等于3倍的 DURATION 参数值。数据库会自动删除保存时间超过 KEEP 值的数据。KEEP 可以使用加单位的表示形式,如 KEEP 100h、KEEP 10d 等,支持 m(分钟)、h(小时)和 d(天)三个单位。也可以不写单位,如 KEEP 50,此时默认单位为天。企业版支持[多级存储](https://docs.taosdata.com/tdinternal/arch/#%E5%A4%9A%E7%BA%A7%E5%AD%98%E5%82%A8)功能, 因此, 可以设置多个保存时间(多个以英文逗号分隔,最多 3 个,满足 keep 0 \<= keep 1 \<= keep 2,如 KEEP 100h,100d,3650d); 社区版不支持多级存储功能(即使配置了多个保存时间, 也不会生效, KEEP 会取最大的保存时间)。 -- STT_TRIGGER:表示落盘文件触发文件合并的个数。默认为 1,范围 1 到 16。对于少表高频场景,此参数建议使用默认配置,或较小的值;而对于多表低频场景,此参数建议配置较大的值。 +- STT_TRIGGER:表示落盘文件触发文件合并的个数。开源版本固定为 1,企业版本可设置范围为 1 到 16。对于少表高频写入场景,此参数建议使用默认配置;而对于多表低频写入场景,此参数建议配置较大的值。 - SINGLE_STABLE:表示此数据库中是否只可以创建一个超级表,用于超级表列非常多的情况。 - 0:表示可以创建多张超级表。 - 1:表示只可以创建一张超级表。 - TABLE_PREFIX:当其为正值时,在决定把一个表分配到哪个 vgroup 时要忽略表名中指定长度的前缀;当其为负值时,在决定把一个表分配到哪个 vgroup 时只使用表名中指定长度的前缀;例如,假定表名为 "v30001",当 TSDB_PREFIX = 2 时 使用 "0001" 来决定分配到哪个 vgroup ,当 TSDB_PREFIX = -2 时使用 "v3" 来决定分配到哪个 vgroup - TABLE_SUFFIX:当其为正值时,在决定把一个表分配到哪个 vgroup 时要忽略表名中指定长度的后缀;当其为负值时,在决定把一个表分配到哪个 vgroup 时只使用表名中指定长度的后缀;例如,假定表名为 "v30001",当 TSDB_SUFFIX = 2 时 使用 "v300" 来决定分配到哪个 vgroup ,当 TSDB_SUFFIX = -2 时使用 "01" 来决定分配到哪个 vgroup。 - TSDB_PAGESIZE:一个 VNODE 中时序数据存储引擎的页大小,单位为 KB,默认为 4 KB。范围为 1 到 16384,即 1 KB到 16 MB。 +- DNODES:指定 VNODE 所在的 DNODE 列表,如 '1,2,3',以逗号区分且字符间不能有空格,仅企业版支持。 - WAL_LEVEL:WAL 级别,默认为 1。 - 1:写 WAL,但不执行 fsync。 - 2:写 WAL,而且执行 fsync。 - WAL_FSYNC_PERIOD:当 WAL_LEVEL 参数设置为 2 时,用于设置落盘的周期。默认为 3000,单位毫秒。最小为 0,表示每次写入立即落盘;最大为 180000,即三分钟。 -- WAL_RETENTION_PERIOD: 为了数据订阅消费,需要WAL日志文件额外保留的最大时长策略。WAL日志清理,不受订阅客户端消费状态影响。单位为 s。默认为 3600,表示在 WAL 保留最近 3600 秒的数据,请根据数据订阅的需要修改这个参数为适当值。 -- WAL_RETENTION_SIZE:为了数据订阅消费,需要WAL日志文件额外保留的最大累计大小策略。单位为 KB。默认为 0,表示累计大小无上限。 +- WAL_RETENTION_PERIOD: 为了数据订阅消费,需要 WAL 日志文件额外保留的最大时长策略。WAL 日志清理,不受订阅客户端消费状态影响。单位为 s。默认为 3600,表示在 WAL 保留最近 3600 秒的数据,请根据数据订阅的需要修改这个参数为适当值。 +- WAL_RETENTION_SIZE:为了数据订阅消费,需要 WAL 日志文件额外保留的最大累计大小策略。单位为 KB。默认为 0,表示累计大小无上限。 ### 创建数据库示例 ```sql diff --git a/docs/zh/14-reference/03-taos-sql/07-tag-index.md b/docs/zh/14-reference/03-taos-sql/07-tag-index.md index 383c5b2a1f..364d465ba3 100644 --- a/docs/zh/14-reference/03-taos-sql/07-tag-index.md +++ b/docs/zh/14-reference/03-taos-sql/07-tag-index.md @@ -11,7 +11,7 @@ description: 使用标签索引提升查询性能 创建索引的语法如下 ```sql -CREATE INDEX index_name ON tbl_name (tagColName) +CREATE INDEX index_name ON tbl_name (tagColName) ``` 其中 `index_name` 为索引名称, `tbl_name` 为超级表名称,`tagColName` 为要在其上建立索引的 tag 列的名称。`tagColName` 的类型不受限制,即任何类型的 tag 列都可以建立索引。 diff --git a/docs/zh/14-reference/05-connector/35-node.mdx b/docs/zh/14-reference/05-connector/35-node.mdx index 6ac34d2471..d9512eae78 100644 --- a/docs/zh/14-reference/05-connector/35-node.mdx +++ b/docs/zh/14-reference/05-connector/35-node.mdx @@ -26,6 +26,7 @@ Node.js 连接器目前仅支持 WebSocket 连接器, 其通过 taosAdapter | Node.js 连接器 版本 | 主要变化 | TDengine 版本 | | :------------------: | :----------------------: | :----------------: | +| 3.1.1 | 优化了数据传输性能 | 3.3.2.0 及更高版本 | | 3.1.0 | 新版本发布,支持 WebSocket 连接 | 3.2.0.0 及更高版本 | ## 处理异常 diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 6ee64bb2e7..cc7bfc36ea 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1338,6 +1338,7 @@ typedef struct { char* sql; int8_t withArbitrator; int8_t encryptAlgorithm; + char dnodeListStr[TSDB_DNODE_LIST_LEN]; } SCreateDbReq; int32_t tSerializeSCreateDbReq(void* buf, int32_t bufLen, SCreateDbReq* pReq); diff --git a/include/common/ttypes.h b/include/common/ttypes.h index 3934553b1c..0ef47cdd12 100644 --- a/include/common/ttypes.h +++ b/include/common/ttypes.h @@ -238,12 +238,26 @@ typedef struct { case TSDB_DATA_TYPE_UBIGINT: \ snprintf(_output, (int32_t)(_outputBytes), "%" PRIu64, *(uint64_t *)(_input)); \ break; \ - case TSDB_DATA_TYPE_FLOAT: \ - snprintf(_output, (int32_t)(_outputBytes), "%f", *(float *)(_input)); \ + case TSDB_DATA_TYPE_FLOAT: { \ + int32_t n = snprintf(_output, (int32_t)(_outputBytes), "%f", *(float *)(_input)); \ + if (n >= (_outputBytes)) { \ + n = snprintf(_output, (int32_t)(_outputBytes), "%.7e", *(float *)(_input)); \ + if (n >= (_outputBytes)) { \ + snprintf(_output, (int32_t)(_outputBytes), "%f", *(float *)(_input)); \ + } \ + } \ break; \ - case TSDB_DATA_TYPE_DOUBLE: \ - snprintf(_output, (int32_t)(_outputBytes), "%f", *(double *)(_input)); \ + } \ + case TSDB_DATA_TYPE_DOUBLE: { \ + int32_t n = snprintf(_output, (int32_t)(_outputBytes), "%f", *(double *)(_input)); \ + if (n >= (_outputBytes)) { \ + snprintf(_output, (int32_t)(_outputBytes), "%.15e", *(double *)(_input)); \ + if (n >= (_outputBytes)) { \ + snprintf(_output, (int32_t)(_outputBytes), "%f", *(double *)(_input)); \ + } \ + } \ break; \ + } \ case TSDB_DATA_TYPE_UINT: \ snprintf(_output, (int32_t)(_outputBytes), "%u", *(uint32_t *)(_input)); \ break; \ diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index bbf2889289..514eddbc24 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -72,6 +72,7 @@ typedef struct SDatabaseOptions { int8_t compressionLevel; int8_t encryptAlgorithm; int32_t daysPerFile; + char dnodeListStr[TSDB_DNODE_LIST_LEN]; char encryptAlgorithmStr[TSDB_ENCRYPT_ALGO_STR_LEN]; SValueNode* pDaysPerFile; int32_t fsyncPeriod; diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 2a67a3cae1..9a8b39b84c 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -352,6 +352,8 @@ int32_t taosGetErrSize(); #define TSDB_CODE_MND_INVALID_SYS_TABLENAME TAOS_DEF_ERROR_CODE(0, 0x039A) #define TSDB_CODE_MND_ENCRYPT_NOT_ALLOW_CHANGE TAOS_DEF_ERROR_CODE(0, 0x039B) #define TSDB_CODE_MND_INVALID_WAL_LEVEL TAOS_DEF_ERROR_CODE(0, 0x039C) +#define TSDB_CODE_MND_INVALID_DNODE_LIST_FMT TAOS_DEF_ERROR_CODE(0, 0x039D) +#define TSDB_CODE_MND_DNODE_LIST_REPEAT TAOS_DEF_ERROR_CODE(0, 0x039E) // mnode-node #define TSDB_CODE_MND_MNODE_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x03A0) diff --git a/include/util/tcompression.h b/include/util/tcompression.h index 1f09b750cb..140b7fe392 100644 --- a/include/util/tcompression.h +++ b/include/util/tcompression.h @@ -152,15 +152,12 @@ int32_t tsDecompressBigint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int // for internal usage int32_t getWordLength(char type); -#ifdef __AVX2__ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, char *const output, const char type); int32_t tsDecompressFloatImpAvx2(const char *input, int32_t nelements, char *output); int32_t tsDecompressDoubleImpAvx2(const char *input, int32_t nelements, char *output); -#endif -#ifdef __AVX512VL__ -void tsDecompressTimestampAvx2(const char *input, int32_t nelements, char *output, bool bigEndian); -void tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output, bool bigEndian); -#endif +int32_t tsDecompressTimestampAvx2(const char *input, int32_t nelements, char *output, bool bigEndian); +int32_t tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output, + bool bigEndian); /************************************************************************* * REGULAR COMPRESSION 2 diff --git a/include/util/tdef.h b/include/util/tdef.h index 2213ad60ac..ba30e78c59 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -41,6 +41,7 @@ extern const int32_t TYPE_BYTES[21]; #define FLOAT_BYTES sizeof(float) #define DOUBLE_BYTES sizeof(double) #define POINTER_BYTES sizeof(void *) +#define M256_BYTES 32 #define TSDB_KEYSIZE sizeof(TSKEY) #define TSDB_NCHAR_SIZE sizeof(TdUcs4) @@ -452,6 +453,7 @@ typedef enum ELogicConditionType { #define TSDB_CACHE_MODEL_LAST_ROW 1 #define TSDB_CACHE_MODEL_LAST_VALUE 2 #define TSDB_CACHE_MODEL_BOTH 3 +#define TSDB_DNODE_LIST_LEN 256 #define TSDB_ENCRYPT_ALGO_STR_LEN 16 #define TSDB_ENCRYPT_ALGO_NONE_STR "none" #define TSDB_ENCRYPT_ALGO_SM4_STR "sm4" diff --git a/source/common/src/tcol.c b/source/common/src/tcol.c index 84027c25b6..923aab12ca 100644 --- a/source/common/src/tcol.c +++ b/source/common/src/tcol.c @@ -363,6 +363,9 @@ int8_t validColEncode(uint8_t type, uint8_t l1) { if (l1 == TSDB_COLVAL_ENCODE_NOCHANGE) { return 1; } + if (l1 == TSDB_COLVAL_ENCODE_DISABLED) { + return 1; + } if (type == TSDB_DATA_TYPE_BOOL) { return TSDB_COLVAL_ENCODE_RLE == l1 ? 1 : 0; } else if (type >= TSDB_DATA_TYPE_TINYINT && type <= TSDB_DATA_TYPE_INT) { diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index c1863d0549..8b55f2c4e9 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -3928,6 +3928,7 @@ int32_t tSerializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) { TAOS_CHECK_EXIT(tEncodeI32(&encoder, pReq->s3ChunkSize)); TAOS_CHECK_EXIT(tEncodeI32(&encoder, pReq->s3KeepLocal)); TAOS_CHECK_EXIT(tEncodeI8(&encoder, pReq->s3Compact)); + TAOS_CHECK_EXIT(tEncodeCStr(&encoder, pReq->dnodeListStr)); tEndEncode(&encoder); @@ -4016,6 +4017,10 @@ int32_t tDeserializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) TAOS_CHECK_EXIT(tDecodeI8(&decoder, &pReq->s3Compact)); } + if (!tDecodeIsEnd(&decoder)) { + TAOS_CHECK_EXIT(tDecodeCStrTo(&decoder, pReq->dnodeListStr)); + } + tEndDecode(&decoder); _exit: diff --git a/source/dnode/mnode/impl/inc/mndDb.h b/source/dnode/mnode/impl/inc/mndDb.h index b72d1386c1..fdb6b5a80b 100644 --- a/source/dnode/mnode/impl/inc/mndDb.h +++ b/source/dnode/mnode/impl/inc/mndDb.h @@ -37,6 +37,7 @@ const char *mndGetDbStr(const char *src); const char *mndGetStableStr(const char *src); int32_t mndProcessCompactDbReq(SRpcMsg *pReq); +int32_t mndCheckDbDnodeList(SMnode *pMnode, char *db, char *dnodeListStr, SArray *dnodeList); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 742db8f450..d2d9b2e8eb 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -70,7 +70,7 @@ typedef enum { MND_OPER_WRITE_DB, MND_OPER_READ_DB, MND_OPER_READ_OR_WRITE_DB, - MND_OPER_SHOW_VARIBALES, + MND_OPER_SHOW_VARIABLES, MND_OPER_SUBSCRIBE, MND_OPER_CREATE_TOPIC, MND_OPER_DROP_TOPIC, diff --git a/source/dnode/mnode/impl/inc/mndVgroup.h b/source/dnode/mnode/impl/inc/mndVgroup.h index 682a51a687..a8a806e497 100644 --- a/source/dnode/mnode/impl/inc/mndVgroup.h +++ b/source/dnode/mnode/impl/inc/mndVgroup.h @@ -35,9 +35,9 @@ void mndSortVnodeGid(SVgObj *pVgroup); int64_t mndGetVnodesMemory(SMnode *pMnode, int32_t dnodeId); int64_t mndGetVgroupMemory(SMnode *pMnode, SDbObj *pDb, SVgObj *pVgroup); -SArray *mndBuildDnodesArray(SMnode *, int32_t exceptDnodeId); +SArray *mndBuildDnodesArray(SMnode *, int32_t exceptDnodeId, SArray *dnodeList); int32_t mndAllocSmaVgroup(SMnode *, SDbObj *pDb, SVgObj *pVgroup); -int32_t mndAllocVgroup(SMnode *, SDbObj *pDb, SVgObj **ppVgroups); +int32_t mndAllocVgroup(SMnode *, SDbObj *pDb, SVgObj **ppVgroups, SArray *dnodeList); int32_t mndAddNewVgPrepareAction(SMnode *, STrans *pTrans, SVgObj *pVg); int32_t mndAddCreateVnodeAction(SMnode *, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, SVnodeGid *pVgid); int32_t mndAddAlterVnodeConfirmAction(SMnode *, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup); diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index aed00af3c1..0d17ccd0b0 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -462,8 +462,8 @@ static int32_t mndCheckDbCfg(SMnode *pMnode, SDbCfg *pCfg) { if (pCfg->cacheLast < TSDB_CACHE_MODEL_NONE || pCfg->cacheLast > TSDB_CACHE_MODEL_BOTH) return code; if (pCfg->hashMethod != 1) return code; if (pCfg->replications > mndGetDnodeSize(pMnode)) { - terrno = TSDB_CODE_MND_NO_ENOUGH_DNODES; - return code; + code = TSDB_CODE_MND_NO_ENOUGH_DNODES; + TAOS_RETURN(code); } if (pCfg->walRetentionPeriod < TSDB_DB_MIN_WAL_RETENTION_PERIOD) return code; if (pCfg->walRetentionSize < TSDB_DB_MIN_WAL_RETENTION_SIZE) return code; @@ -746,7 +746,7 @@ static int32_t mndSetCreateDbUndoActions(SMnode *pMnode, STrans *pTrans, SDbObj TAOS_RETURN(code); } -static int32_t mndCreateDb(SMnode *pMnode, SRpcMsg *pReq, SCreateDbReq *pCreate, SUserObj *pUser) { +static int32_t mndCreateDb(SMnode *pMnode, SRpcMsg *pReq, SCreateDbReq *pCreate, SUserObj *pUser, SArray *dnodeList) { int32_t code = 0; SUserObj newUserObj = {0}; SDbObj dbObj = {0}; @@ -823,7 +823,7 @@ static int32_t mndCreateDb(SMnode *pMnode, SRpcMsg *pReq, SCreateDbReq *pCreate, } SVgObj *pVgroups = NULL; - if ((code = mndAllocVgroup(pMnode, &dbObj, &pVgroups)) != 0) { + if ((code = mndAllocVgroup(pMnode, &dbObj, &pVgroups, dnodeList)) != 0) { mError("db:%s, failed to create, alloc vgroup failed, since %s", pCreate->db, terrstr()); TAOS_RETURN(code); } @@ -925,6 +925,17 @@ _exit: TAOS_RETURN(code); } +#ifndef TD_ENTERPRISE +int32_t mndCheckDbDnodeList(SMnode *pMnode, char *db, char *dnodeListStr, SArray *dnodeList) { + if (dnodeListStr[0] != 0) { + terrno = TSDB_CODE_OPS_NOT_SUPPORT; + return terrno; + } else { + return 0; + } +} +#endif + static int32_t mndProcessCreateDbReq(SRpcMsg *pReq) { SMnode *pMnode = pReq->info.node; int32_t code = -1; @@ -932,6 +943,10 @@ static int32_t mndProcessCreateDbReq(SRpcMsg *pReq) { SDbObj *pDb = NULL; SUserObj *pUser = NULL; SCreateDbReq createReq = {0}; + SArray *dnodeList = NULL; + + dnodeList = taosArrayInit(mndGetDnodeSize(pMnode), sizeof(int32_t)); + TSDB_CHECK_NULL(dnodeList, code, lino, _OVER, TSDB_CODE_OUT_OF_MEMORY); TAOS_CHECK_GOTO(tDeserializeSCreateDbReq(pReq->pCont, pReq->contLen, &createReq), NULL, _OVER); #ifdef WINDOWS @@ -975,9 +990,11 @@ static int32_t mndProcessCreateDbReq(SRpcMsg *pReq) { TAOS_CHECK_GOTO(mndCheckDbEncryptKey(pMnode, &createReq), &lino, _OVER); + TAOS_CHECK_GOTO(mndCheckDbDnodeList(pMnode, createReq.db, createReq.dnodeListStr, dnodeList), &lino, _OVER); + TAOS_CHECK_GOTO(mndAcquireUser(pMnode, pReq->info.conn.user, &pUser), &lino, _OVER); - TAOS_CHECK_GOTO(mndCreateDb(pMnode, pReq, &createReq, pUser), &lino, _OVER); + TAOS_CHECK_GOTO(mndCreateDb(pMnode, pReq, &createReq, pUser, dnodeList), &lino, _OVER); if (code == 0) code = TSDB_CODE_ACTION_IN_PROGRESS; SName name = {0}; @@ -994,6 +1011,7 @@ _OVER: mndReleaseDb(pMnode, pDb); mndReleaseUser(pMnode, pUser); tFreeSCreateDbReq(&createReq); + taosArrayDestroy(dnodeList); TAOS_RETURN(code); } @@ -1168,7 +1186,9 @@ static int32_t mndSetAlterDbRedoActions(SMnode *pMnode, STrans *pTrans, SDbObj * SSdb *pSdb = pMnode->pSdb; void *pIter = NULL; SVgObj *pVgroup = NULL; - SArray *pArray = mndBuildDnodesArray(pMnode, 0); + SArray *pArray = mndBuildDnodesArray(pMnode, 0, NULL); + + TSDB_CHECK_NULL(pArray, code, lino, _err, TSDB_CODE_OUT_OF_MEMORY); while (1) { pIter = sdbFetch(pSdb, SDB_VGROUP, pIter, (void **)&pVgroup); diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 72611c1bfa..08e9886df4 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -1085,7 +1085,7 @@ static int32_t mndProcessShowVariablesReq(SRpcMsg *pReq) { SShowVariablesRsp rsp = {0}; int32_t code = -1; - if (mndCheckOperPrivilege(pReq->info.node, pReq->info.conn.user, MND_OPER_SHOW_VARIBALES) != 0) { + if (mndCheckOperPrivilege(pReq->info.node, pReq->info.conn.user, MND_OPER_SHOW_VARIABLES) != 0) { goto _OVER; } diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index 5a79ac6bc8..913e6e3295 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -717,11 +717,28 @@ static bool mndBuildDnodesArrayFp(SMnode *pMnode, void *pObj, void *p1, void *p2 SDnodeObj *pDnode = pObj; SArray *pArray = p1; int32_t exceptDnodeId = *(int32_t *)p2; + SArray *dnodeList = p3; if (exceptDnodeId == pDnode->id) { return true; } + if (dnodeList != NULL) { + int32_t dnodeListSize = taosArrayGetSize(dnodeList); + if (dnodeListSize > 0) { + bool inDnodeList = false; + for (int32_t index = 0; index < dnodeListSize; ++index) { + int32_t dnodeId = *(int32_t *)taosArrayGet(dnodeList, index); + if (pDnode->id == dnodeId) { + inDnodeList = true; + } + } + if (!inDnodeList) { + return true; + } + } + } + int64_t curMs = taosGetTimestampMs(); bool online = mndIsDnodeOnline(pDnode, curMs); bool isMnode = mndIsMnode(pMnode, pDnode->id); @@ -741,7 +758,7 @@ static bool mndBuildDnodesArrayFp(SMnode *pMnode, void *pObj, void *p1, void *p2 return true; } -SArray *mndBuildDnodesArray(SMnode *pMnode, int32_t exceptDnodeId) { +SArray *mndBuildDnodesArray(SMnode *pMnode, int32_t exceptDnodeId, SArray *dnodeList) { SSdb *pSdb = pMnode->pSdb; int32_t numOfDnodes = mndGetDnodeSize(pMnode); @@ -752,7 +769,7 @@ SArray *mndBuildDnodesArray(SMnode *pMnode, int32_t exceptDnodeId) { } sdbTraverse(pSdb, SDB_DNODE, mndResetDnodesArrayFp, NULL, NULL, NULL); - sdbTraverse(pSdb, SDB_DNODE, mndBuildDnodesArrayFp, pArray, &exceptDnodeId, NULL); + sdbTraverse(pSdb, SDB_DNODE, mndBuildDnodesArrayFp, pArray, &exceptDnodeId, dnodeList); mDebug("build %d dnodes array", (int32_t)taosArrayGetSize(pArray)); for (int32_t i = 0; i < (int32_t)taosArrayGetSize(pArray); ++i) { @@ -845,7 +862,7 @@ static int32_t mndGetAvailableDnode(SMnode *pMnode, SDbObj *pDb, SVgObj *pVgroup int32_t mndAllocSmaVgroup(SMnode *pMnode, SDbObj *pDb, SVgObj *pVgroup) { int32_t code = 0; - SArray *pArray = mndBuildDnodesArray(pMnode, 0); + SArray *pArray = mndBuildDnodesArray(pMnode, 0, NULL); if (pArray == NULL) { code = TSDB_CODE_MND_RETURN_VALUE_NULL; if (terrno != 0) code = terrno; @@ -868,7 +885,7 @@ int32_t mndAllocSmaVgroup(SMnode *pMnode, SDbObj *pDb, SVgObj *pVgroup) { return 0; } -int32_t mndAllocVgroup(SMnode *pMnode, SDbObj *pDb, SVgObj **ppVgroups) { +int32_t mndAllocVgroup(SMnode *pMnode, SDbObj *pDb, SVgObj **ppVgroups, SArray *dnodeList) { int32_t code = -1; SArray *pArray = NULL; SVgObj *pVgroups = NULL; @@ -879,7 +896,7 @@ int32_t mndAllocVgroup(SMnode *pMnode, SDbObj *pDb, SVgObj **ppVgroups) { goto _OVER; } - pArray = mndBuildDnodesArray(pMnode, 0); + pArray = mndBuildDnodesArray(pMnode, 0, dnodeList); if (pArray == NULL) { code = TSDB_CODE_MND_RETURN_VALUE_NULL; if (terrno != 0) code = terrno; @@ -2062,7 +2079,7 @@ int32_t mndSetMoveVgroupInfoToTrans(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, int32_t mndSetMoveVgroupsInfoToTrans(SMnode *pMnode, STrans *pTrans, int32_t delDnodeId, bool force, bool unsafe) { int32_t code = 0; - SArray *pArray = mndBuildDnodesArray(pMnode, delDnodeId); + SArray *pArray = mndBuildDnodesArray(pMnode, delDnodeId, NULL); if (pArray == NULL) { code = TSDB_CODE_MND_RETURN_VALUE_NULL; if (terrno != 0) code = terrno; @@ -3140,7 +3157,7 @@ int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj *pVgro int32_t code = -1; STrans *pTrans = NULL; SDbObj dbObj = {0}; - SArray *pArray = mndBuildDnodesArray(pMnode, 0); + SArray *pArray = mndBuildDnodesArray(pMnode, 0, NULL); int32_t numOfStreams = 0; if ((code = mndGetNumOfStreams(pMnode, pDb->name, &numOfStreams)) != 0) { @@ -3506,7 +3523,7 @@ static int32_t mndProcessBalanceVgroupMsg(SRpcMsg *pReq) { sdbRelease(pMnode->pSdb, pDnode); } - pArray = mndBuildDnodesArray(pMnode, 0); + pArray = mndBuildDnodesArray(pMnode, 0, NULL); if (pArray == NULL) { code = TSDB_CODE_MND_RETURN_VALUE_NULL; if (terrno != 0) code = terrno; diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index 9cf2a3ea17..0f85c3346d 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -1263,7 +1263,10 @@ static SSDataBlock* buildStreamPartitionResult(SOperatorInfo* pOperator) { QUERY_CHECK_CONDITION((hasRemainPartion(pInfo)), code, lino, _end, TSDB_CODE_QRY_EXECUTOR_INTERNAL_ERROR); SPartitionDataInfo* pParInfo = (SPartitionDataInfo*)pInfo->parIte; blockDataCleanup(pDest); - int32_t rows = taosArrayGetSize(pParInfo->rowIds); + int32_t rows = taosArrayGetSize(pParInfo->rowIds); + code = blockDataEnsureCapacity(pDest, rows); + QUERY_CHECK_CODE(code, lino, _end); + SSDataBlock* pSrc = pInfo->pInputDataBlock; for (int32_t i = 0; i < rows; i++) { int32_t rowIndex = *(int32_t*)taosArrayGet(pParInfo->rowIds, i); diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index 6803f40da4..88c1642654 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -42,7 +42,7 @@ typedef struct STimeSliceOperatorInfo { SRowKey prevKey; bool prevTsSet; uint64_t groupId; - SGroupKeys* pPrevGroupKey; + SArray* pPrevGroupKeys; SSDataBlock* pNextGroupRes; SSDataBlock* pRemainRes; // save block unfinished processing int32_t remainIndex; // the remaining index in the block to be processed @@ -288,6 +288,7 @@ static bool genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp // output the result int32_t fillColIndex = 0; + int32_t groupKeyIndex = 0; bool hasInterp = true; for (int32_t j = 0; j < pExprSup->numOfExprs; ++j) { SExprInfo* pExprInfo = &pExprSup->pExprInfo[j]; @@ -320,7 +321,9 @@ static bool genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp QUERY_CHECK_CODE(code, lino, _end); } else if (!isSelectGroupConstValueFunc(pExprInfo)) { // use stored group key - SGroupKeys* pkey = pSliceInfo->pPrevGroupKey; + SGroupKeys *pkey = taosArrayGet(pSliceInfo->pPrevGroupKeys, groupKeyIndex); + QUERY_CHECK_NULL(pkey, code, lino, _end, terrno); + groupKeyIndex++; if (pkey->isNull == false) { code = colDataSetVal(pDst, rows, pkey->pData, false); QUERY_CHECK_CODE(code, lino, _end); @@ -645,13 +648,20 @@ _end: return code; } +static void destroyGroupKey(void* pKey) { + SGroupKeys* key = (SGroupKeys*)pKey; + if (key->pData != NULL) { + taosMemoryFreeClear(key->pData); + } +} + static int32_t initGroupKeyKeeper(STimeSliceOperatorInfo* pInfo, SExprSupp* pExprSup) { - if (pInfo->pPrevGroupKey != NULL) { + if (pInfo->pPrevGroupKeys != NULL) { return TSDB_CODE_SUCCESS; } - pInfo->pPrevGroupKey = taosMemoryCalloc(1, sizeof(SGroupKeys)); - if (pInfo->pPrevGroupKey == NULL) { + pInfo->pPrevGroupKeys = taosArrayInit(pExprSup->numOfExprs, sizeof(SGroupKeys)); + if (pInfo->pPrevGroupKeys == NULL) { return terrno; } @@ -659,11 +669,19 @@ static int32_t initGroupKeyKeeper(STimeSliceOperatorInfo* pInfo, SExprSupp* pExp SExprInfo* pExprInfo = &pExprSup->pExprInfo[i]; if (isGroupKeyFunc(pExprInfo)) { - pInfo->pPrevGroupKey->bytes = pExprInfo->base.resSchema.bytes; - pInfo->pPrevGroupKey->type = pExprInfo->base.resSchema.type; - pInfo->pPrevGroupKey->isNull = false; - pInfo->pPrevGroupKey->pData = taosMemoryCalloc(1, pInfo->pPrevGroupKey->bytes); - if (!pInfo->pPrevGroupKey->pData) { + SGroupKeys key = {.bytes = pExprInfo->base.resSchema.bytes, + .type = pExprInfo->base.resSchema.type, + .isNull = false, + .pData = taosMemoryCalloc(1, pExprInfo->base.resSchema.bytes)}; + if (!key.pData) { + taosArrayDestroyEx(pInfo->pPrevGroupKeys, destroyGroupKey); + pInfo->pPrevGroupKeys = NULL; + return terrno; + } + if (NULL == taosArrayPush(pInfo->pPrevGroupKeys, &key)) { + taosMemoryFree(key.pData); + taosArrayDestroyEx(pInfo->pPrevGroupKeys, destroyGroupKey); + pInfo->pPrevGroupKeys = NULL; return terrno; } } @@ -910,7 +928,7 @@ static void genInterpAfterDataBlock(STimeSliceOperatorInfo* pSliceInfo, SOperato SInterval* pInterval = &pSliceInfo->interval; if (pSliceInfo->fillType == TSDB_FILL_NEXT || pSliceInfo->fillType == TSDB_FILL_LINEAR || - pSliceInfo->pPrevGroupKey == NULL) { + pSliceInfo->pPrevGroupKeys == NULL) { return; } @@ -921,12 +939,18 @@ static void genInterpAfterDataBlock(STimeSliceOperatorInfo* pSliceInfo, SOperato } } -static void copyPrevGroupKey(SExprSupp* pExprSup, SGroupKeys* pGroupKey, SSDataBlock* pSrcBlock) { +static int32_t copyPrevGroupKey(SExprSupp* pExprSup, SArray * pGroupKeys, SSDataBlock* pSrcBlock) { + int32_t groupKeyIdx = 0; for (int32_t j = 0; j < pExprSup->numOfExprs; ++j) { SExprInfo* pExprInfo = &pExprSup->pExprInfo[j]; if (isGroupKeyFunc(pExprInfo)) { int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; + SGroupKeys *pGroupKey = taosArrayGet(pGroupKeys, groupKeyIdx); + if (pGroupKey == NULL) { + return terrno; + } + groupKeyIdx++; SColumnInfoData* pSrc = taosArrayGet(pSrcBlock->pDataBlock, srcSlot); if (colDataIsNull_s(pSrc, 0)) { @@ -942,9 +966,9 @@ static void copyPrevGroupKey(SExprSupp* pExprSup, SGroupKeys* pGroupKey, SSDataB } pGroupKey->isNull = false; - break; } } + return TSDB_CODE_SUCCESS; } static void resetTimesliceInfo(STimeSliceOperatorInfo* pSliceInfo) { @@ -986,7 +1010,11 @@ static void doHandleTimeslice(SOperatorInfo* pOperator, SSDataBlock* pBlock) { T_LONG_JMP(pTaskInfo->env, code); } doTimesliceImpl(pOperator, pSliceInfo, pBlock, pTaskInfo, ignoreNull); - copyPrevGroupKey(&pOperator->exprSupp, pSliceInfo->pPrevGroupKey, pBlock); + code = copyPrevGroupKey(&pOperator->exprSupp, pSliceInfo->pPrevGroupKeys, pBlock); + if (code != TSDB_CODE_SUCCESS) { + qError("%s failed at line %d since %s", __func__, __LINE__, tstrerror(code)); + T_LONG_JMP(pTaskInfo->env, code); + } } static int32_t doTimesliceNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) { @@ -1160,7 +1188,7 @@ int32_t createTimeSliceOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pPhyN pInfo->prevTsSet = false; pInfo->prevKey.ts = INT64_MIN; pInfo->groupId = 0; - pInfo->pPrevGroupKey = NULL; + pInfo->pPrevGroupKeys = NULL; pInfo->pNextGroupRes = NULL; pInfo->pRemainRes = NULL; pInfo->remainIndex = 0; @@ -1233,9 +1261,9 @@ void destroyTimeSliceOperatorInfo(void* param) { } taosArrayDestroy(pInfo->pLinearInfo); - if (pInfo->pPrevGroupKey) { - taosMemoryFree(pInfo->pPrevGroupKey->pData); - taosMemoryFree(pInfo->pPrevGroupKey); + if (pInfo->pPrevGroupKeys) { + taosArrayDestroyEx(pInfo->pPrevGroupKeys, destroyGroupKey); + pInfo->pPrevGroupKeys = NULL; } if (pInfo->hasPk && IS_VAR_DATA_TYPE(pInfo->pkCol.type)) { taosMemoryFreeClear(pInfo->prevKey.pks[0].pData); diff --git a/source/libs/function/CMakeLists.txt b/source/libs/function/CMakeLists.txt index 4164852111..d5c9cccc0e 100644 --- a/source/libs/function/CMakeLists.txt +++ b/source/libs/function/CMakeLists.txt @@ -1,6 +1,10 @@ aux_source_directory(src FUNCTION_SRC) aux_source_directory(src/detail FUNCTION_SRC_DETAIL) list(REMOVE_ITEM FUNCTION_SRC src/udfd.c) +IF(COMPILER_SUPPORT_AVX2) + MESSAGE(STATUS "AVX2 instructions is ACTIVATED") + set_source_files_properties(src/detail/tminmaxavx.c PROPERTIES COMPILE_FLAGS -mavx2) +ENDIF() add_library(function STATIC ${FUNCTION_SRC} ${FUNCTION_SRC_DETAIL}) target_include_directories( function diff --git a/source/libs/function/inc/builtinsimpl.h b/source/libs/function/inc/builtinsimpl.h index 36e53d0a80..a1c82dc58b 100644 --- a/source/libs/function/inc/builtinsimpl.h +++ b/source/libs/function/inc/builtinsimpl.h @@ -25,6 +25,11 @@ extern "C" { #include "functionResInfoInt.h" int32_t doMinMaxHelper(SqlFunctionCtx* pCtx, int32_t isMinFunc, int32_t* nElems); +int32_t i8VectorCmpAVX2(const void* pData, int32_t numOfRows, bool isMinFunc, bool signVal, int64_t* res); +int32_t i16VectorCmpAVX2(const void* pData, int32_t numOfRows, bool isMinFunc, bool signVal, int64_t* res); +int32_t i32VectorCmpAVX2(const void* pData, int32_t numOfRows, bool isMinFunc, bool signVal, int64_t* res); +int32_t floatVectorCmpAVX2(const float* pData, int32_t numOfRows, bool isMinFunc, float* res); +int32_t doubleVectorCmpAVX2(const double* pData, int32_t numOfRows, bool isMinFunc, double* res); int32_t saveTupleData(SqlFunctionCtx* pCtx, int32_t rowIndex, const SSDataBlock* pSrcBlock, STuplePos* pPos); int32_t updateTupleData(SqlFunctionCtx* pCtx, int32_t rowIndex, const SSDataBlock* pSrcBlock, STuplePos* pPos); diff --git a/source/libs/function/src/detail/tminmax.c b/source/libs/function/src/detail/tminmax.c index 69c1a8a6dd..8712096033 100644 --- a/source/libs/function/src/detail/tminmax.c +++ b/source/libs/function/src/detail/tminmax.c @@ -72,173 +72,6 @@ #define GET_INVOKE_INTRINSIC_THRESHOLD(_bits, _bytes) ((_bits) / ((_bytes) << 3u)) -#ifdef __AVX2__ -static void calculateRounds(int32_t numOfRows, int32_t bytes, int32_t* remainder, int32_t* rounds, int32_t* width) { - const int32_t bitWidth = 256; - - *width = (bitWidth >> 3u) / bytes; - *remainder = numOfRows % (*width); - *rounds = numOfRows / (*width); -} - -#define EXTRACT_MAX_VAL(_first, _sec, _width, _remain, _v) \ - __COMPARE_EXTRACT_MAX(0, (_width), (_v), (_first)) \ - __COMPARE_EXTRACT_MAX(0, (_remain), (_v), (_sec)) - -#define EXTRACT_MIN_VAL(_first, _sec, _width, _remain, _v) \ - __COMPARE_EXTRACT_MIN(0, (_width), (_v), (_first)) \ - __COMPARE_EXTRACT_MIN(0, (_remain), (_v), (_sec)) - -#define CMP_TYPE_MIN_MAX(type, cmp) \ - const type* p = pData; \ - __m256i initVal = _mm256_lddqu_si256((__m256i*)p); \ - p += width; \ - for (int32_t i = 1; i < (rounds); ++i) { \ - __m256i next = _mm256_lddqu_si256((__m256i*)p); \ - initVal = CMP_FUNC_##cmp##_##type(initVal, next); \ - p += width; \ - } \ - const type* q = (const type*)&initVal; \ - type* v = (type*)res; \ - EXTRACT_##cmp##_VAL(q, p, width, remain, *v) - -static void i8VectorCmpAVX2(const void* pData, int32_t numOfRows, bool isMinFunc, bool signVal, int64_t* res) { - const int8_t* p = pData; - - int32_t width, remain, rounds; - calculateRounds(numOfRows, sizeof(int8_t), &remain, &rounds, &width); - -#define CMP_FUNC_MIN_int8_t _mm256_min_epi8 -#define CMP_FUNC_MAX_int8_t _mm256_max_epi8 -#define CMP_FUNC_MIN_uint8_t _mm256_min_epu8 -#define CMP_FUNC_MAX_uint8_t _mm256_max_epu8 - - if (!isMinFunc) { // max function - if (signVal) { - CMP_TYPE_MIN_MAX(int8_t, MAX); - } else { - CMP_TYPE_MIN_MAX(uint8_t, MAX); - } - } else { // min function - if (signVal) { - CMP_TYPE_MIN_MAX(int8_t, MIN); - } else { - CMP_TYPE_MIN_MAX(uint8_t, MIN); - } - } -} - -static void i16VectorCmpAVX2(const void* pData, int32_t numOfRows, bool isMinFunc, bool signVal, int64_t* res) { - int32_t width, remain, rounds; - calculateRounds(numOfRows, sizeof(int16_t), &remain, &rounds, &width); - -#define CMP_FUNC_MIN_int16_t _mm256_min_epi16 -#define CMP_FUNC_MAX_int16_t _mm256_max_epi16 -#define CMP_FUNC_MIN_uint16_t _mm256_min_epu16 -#define CMP_FUNC_MAX_uint16_t _mm256_max_epu16 - if (!isMinFunc) { // max function - if (signVal) { - CMP_TYPE_MIN_MAX(int16_t, MAX); - } else { - CMP_TYPE_MIN_MAX(uint16_t, MAX); - } - } else { // min function - if (signVal) { - CMP_TYPE_MIN_MAX(int16_t, MIN); - } else { - CMP_TYPE_MIN_MAX(uint16_t, MIN); - } - } -} - -static void i32VectorCmpAVX2(const void* pData, int32_t numOfRows, bool isMinFunc, bool signVal, int64_t* res) { - int32_t width, remain, rounds; - calculateRounds(numOfRows, sizeof(int32_t), &remain, &rounds, &width); - -#define CMP_FUNC_MIN_int32_t _mm256_min_epi32 -#define CMP_FUNC_MAX_int32_t _mm256_max_epi32 -#define CMP_FUNC_MIN_uint32_t _mm256_min_epu32 -#define CMP_FUNC_MAX_uint32_t _mm256_max_epu32 - if (!isMinFunc) { // max function - if (signVal) { - CMP_TYPE_MIN_MAX(int32_t, MAX); - } else { - CMP_TYPE_MIN_MAX(uint32_t, MAX); - } - } else { // min function - if (signVal) { - CMP_TYPE_MIN_MAX(int32_t, MIN); - } else { - CMP_TYPE_MIN_MAX(uint32_t, MIN); - } - } -} - -static void floatVectorCmpAVX2(const float* pData, int32_t numOfRows, bool isMinFunc, float* res) { - const float* p = pData; - - int32_t width, remain, rounds; - calculateRounds(numOfRows, sizeof(float), &remain, &rounds, &width); - - __m256 next; - __m256 initVal = _mm256_loadu_ps(p); - p += width; - - if (!isMinFunc) { // max function - for (int32_t i = 1; i < rounds; ++i) { - next = _mm256_loadu_ps(p); - initVal = _mm256_max_ps(initVal, next); - p += width; - } - - const float* q = (const float*)&initVal; - EXTRACT_MAX_VAL(q, p, width, remain, *res) - } else { // min function - for (int32_t i = 1; i < rounds; ++i) { - next = _mm256_loadu_ps(p); - initVal = _mm256_min_ps(initVal, next); - p += width; - } - - const float* q = (const float*)&initVal; - EXTRACT_MIN_VAL(q, p, width, remain, *res) - } -} - -static void doubleVectorCmpAVX2(const double* pData, int32_t numOfRows, bool isMinFunc, double* res) { - const double* p = pData; - - int32_t width, remain, rounds; - calculateRounds(numOfRows, sizeof(double), &remain, &rounds, &width); - - __m256d next; - __m256d initVal = _mm256_loadu_pd(p); - p += width; - - if (!isMinFunc) { // max function - for (int32_t i = 1; i < rounds; ++i) { - next = _mm256_loadu_pd(p); - initVal = _mm256_max_pd(initVal, next); - p += width; - } - - // let sum up the final results - const double* q = (const double*)&initVal; - EXTRACT_MAX_VAL(q, p, width, remain, *res) - } else { // min function - for (int32_t i = 1; i < rounds; ++i) { - next = _mm256_loadu_pd(p); - initVal = _mm256_min_pd(initVal, next); - p += width; - } - - // let sum up the final results - const double* q = (const double*)&initVal; - EXTRACT_MIN_VAL(q, p, width, remain, *res) - } -} -#endif - static int32_t findFirstValPosition(const SColumnInfoData* pCol, int32_t start, int32_t numOfRows, bool isStr) { int32_t i = start; @@ -255,31 +88,31 @@ static void handleInt8Col(const void* data, int32_t start, int32_t numOfRows, SM pBuf->v = ((const int8_t*)data)[start]; } -#ifdef __AVX2__ - if (tsAVX2Supported && tsSIMDEnable && numOfRows * sizeof(int8_t) >= sizeof(__m256i)) { - i8VectorCmpAVX2(data + start * sizeof(int8_t), numOfRows, isMinFunc, signVal, &pBuf->v); - } else { -#else - if (true) { -#endif - if (signVal) { - const int8_t* p = (const int8_t*)data; - int8_t* v = (int8_t*)&pBuf->v; + if (tsAVX2Supported && tsSIMDEnable && numOfRows * sizeof(int8_t) >= M256_BYTES) { + int32_t code = i8VectorCmpAVX2(((char*)data) + start * sizeof(int8_t), numOfRows, isMinFunc, signVal, &pBuf->v); + if (code == TSDB_CODE_SUCCESS) { + pBuf->assign = true; + return; + } + } - if (isMinFunc) { - __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); - } else { - __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); - } + if (signVal) { + const int8_t* p = (const int8_t*)data; + int8_t* v = (int8_t*)&pBuf->v; + + if (isMinFunc) { + __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); } else { - const uint8_t* p = (const uint8_t*)data; - uint8_t* v = (uint8_t*)&pBuf->v; + __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); + } + } else { + const uint8_t* p = (const uint8_t*)data; + uint8_t* v = (uint8_t*)&pBuf->v; - if (isMinFunc) { - __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); - } else { - __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); - } + if (isMinFunc) { + __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); + } else { + __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); } } @@ -292,31 +125,31 @@ static void handleInt16Col(const void* data, int32_t start, int32_t numOfRows, S pBuf->v = ((const int16_t*)data)[start]; } -#ifdef __AVX2__ - if (tsAVX2Supported && tsSIMDEnable && numOfRows * sizeof(int16_t) >= sizeof(__m256i)) { - i16VectorCmpAVX2(data + start * sizeof(int16_t), numOfRows, isMinFunc, signVal, &pBuf->v); - } else { -#else - if (true) { -#endif - if (signVal) { - const int16_t* p = (const int16_t*)data; - int16_t* v = (int16_t*)&pBuf->v; + if (tsAVX2Supported && tsSIMDEnable && numOfRows * sizeof(int16_t) >= M256_BYTES) { + int32_t code = i16VectorCmpAVX2(((char*)data) + start * sizeof(int16_t), numOfRows, isMinFunc, signVal, &pBuf->v); + if (code == TSDB_CODE_SUCCESS) { + pBuf->assign = true; + return; + } + } - if (isMinFunc) { - __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); - } else { - __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); - } + if (signVal) { + const int16_t* p = (const int16_t*)data; + int16_t* v = (int16_t*)&pBuf->v; + + if (isMinFunc) { + __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); } else { - const uint16_t* p = (const uint16_t*)data; - uint16_t* v = (uint16_t*)&pBuf->v; + __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); + } + } else { + const uint16_t* p = (const uint16_t*)data; + uint16_t* v = (uint16_t*)&pBuf->v; - if (isMinFunc) { - __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); - } else { - __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); - } + if (isMinFunc) { + __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); + } else { + __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); } } @@ -329,31 +162,31 @@ static void handleInt32Col(const void* data, int32_t start, int32_t numOfRows, S pBuf->v = ((const int32_t*)data)[start]; } -#ifdef __AVX2__ - if (tsAVX2Supported && tsSIMDEnable && numOfRows * sizeof(int32_t) >= sizeof(__m256i)) { - i32VectorCmpAVX2(data + start * sizeof(int32_t), numOfRows, isMinFunc, signVal, &pBuf->v); - } else { -#else - if (true) { -#endif - if (signVal) { - const int32_t* p = (const int32_t*)data; - int32_t* v = (int32_t*)&pBuf->v; + if (tsAVX2Supported && tsSIMDEnable && numOfRows * sizeof(int32_t) >= M256_BYTES) { + int32_t code = i32VectorCmpAVX2(((char*)data) + start * sizeof(int32_t), numOfRows, isMinFunc, signVal, &pBuf->v); + if (code == TSDB_CODE_SUCCESS) { + pBuf->assign = true; + return; + } + } - if (isMinFunc) { - __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); - } else { - __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); - } + if (signVal) { + const int32_t* p = (const int32_t*)data; + int32_t* v = (int32_t*)&pBuf->v; + + if (isMinFunc) { + __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); } else { - const uint32_t* p = (const uint32_t*)data; - uint32_t* v = (uint32_t*)&pBuf->v; + __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); + } + } else { + const uint32_t* p = (const uint32_t*)data; + uint32_t* v = (uint32_t*)&pBuf->v; - if (isMinFunc) { - __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); - } else { - __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); - } + if (isMinFunc) { + __COMPARE_EXTRACT_MIN(start, start + numOfRows, *v, p); + } else { + __COMPARE_EXTRACT_MAX(start, start + numOfRows, *v, p); } } @@ -397,20 +230,20 @@ static void handleFloatCol(SColumnInfoData* pCol, int32_t start, int32_t numOfRo *val = pData[start]; } -#ifdef __AVX2__ - if (tsAVXSupported && tsSIMDEnable && numOfRows * sizeof(float) >= sizeof(__m256i)) { - floatVectorCmpAVX2(pData + start, numOfRows, isMinFunc, val); - } else { -#else - if (true) { -#endif - if (isMinFunc) { // min - __COMPARE_EXTRACT_MIN(start, start + numOfRows, *val, pData); - } else { // max - __COMPARE_EXTRACT_MAX(start, start + numOfRows, *val, pData); + if (tsAVX2Supported && tsSIMDEnable && numOfRows * sizeof(float) >= M256_BYTES) { + int32_t code = floatVectorCmpAVX2(pData + start, numOfRows, isMinFunc, val); + if (code == TSDB_CODE_SUCCESS) { + pBuf->assign = true; + return; } } + if (isMinFunc) { // min + __COMPARE_EXTRACT_MIN(start, start + numOfRows, *val, pData); + } else { // max + __COMPARE_EXTRACT_MAX(start, start + numOfRows, *val, pData); + } + pBuf->assign = true; } @@ -422,20 +255,20 @@ static void handleDoubleCol(SColumnInfoData* pCol, int32_t start, int32_t numOfR *val = pData[start]; } -#ifdef __AVX2__ - if (tsAVXSupported && tsSIMDEnable && numOfRows * sizeof(double) >= sizeof(__m256i)) { - doubleVectorCmpAVX2(pData + start, numOfRows, isMinFunc, val); - } else { -#else - if (true) { -#endif - if (isMinFunc) { // min - __COMPARE_EXTRACT_MIN(start, start + numOfRows, *val, pData); - } else { // max - __COMPARE_EXTRACT_MAX(start, start + numOfRows, *val, pData); + if (tsAVX2Supported && tsSIMDEnable && numOfRows * sizeof(double) >= M256_BYTES) { + int32_t code = doubleVectorCmpAVX2(pData + start, numOfRows, isMinFunc, val); + if (code == TSDB_CODE_SUCCESS) { + pBuf->assign = true; + return; } } + if (isMinFunc) { // min + __COMPARE_EXTRACT_MIN(start, start + numOfRows, *val, pData); + } else { // max + __COMPARE_EXTRACT_MAX(start, start + numOfRows, *val, pData); + } + pBuf->assign = true; } diff --git a/source/libs/function/src/detail/tminmaxavx.c b/source/libs/function/src/detail/tminmaxavx.c new file mode 100644 index 0000000000..8fe6cc5448 --- /dev/null +++ b/source/libs/function/src/detail/tminmaxavx.c @@ -0,0 +1,227 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include "builtinsimpl.h" + +#ifdef __AVX2__ +static void calculateRounds(int32_t numOfRows, int32_t bytes, int32_t* remainder, int32_t* rounds, int32_t* width) { + const int32_t bitWidth = 256; + + *width = (bitWidth >> 3u) / bytes; + *remainder = numOfRows % (*width); + *rounds = numOfRows / (*width); +} + +#define __COMPARE_EXTRACT_MIN(start, end, val, _data) \ + for (int32_t i = (start); i < (end); ++i) { \ + if ((val) > (_data)[i]) { \ + (val) = (_data)[i]; \ + } \ + } + +#define __COMPARE_EXTRACT_MAX(start, end, val, _data) \ + for (int32_t i = (start); i < (end); ++i) { \ + if ((val) < (_data)[i]) { \ + (val) = (_data)[i]; \ + } \ + } + +#define EXTRACT_MAX_VAL(_first, _sec, _width, _remain, _v) \ + __COMPARE_EXTRACT_MAX(0, (_width), (_v), (_first)) \ + __COMPARE_EXTRACT_MAX(0, (_remain), (_v), (_sec)) + +#define EXTRACT_MIN_VAL(_first, _sec, _width, _remain, _v) \ + __COMPARE_EXTRACT_MIN(0, (_width), (_v), (_first)) \ + __COMPARE_EXTRACT_MIN(0, (_remain), (_v), (_sec)) + +#define CMP_TYPE_MIN_MAX(type, cmp) \ + const type* p = pData; \ + __m256i initVal = _mm256_lddqu_si256((__m256i*)p); \ + p += width; \ + for (int32_t i = 1; i < (rounds); ++i) { \ + __m256i next = _mm256_lddqu_si256((__m256i*)p); \ + initVal = CMP_FUNC_##cmp##_##type(initVal, next); \ + p += width; \ + } \ + const type* q = (const type*)&initVal; \ + type* v = (type*)res; \ + EXTRACT_##cmp##_VAL(q, p, width, remain, *v) +#endif + +int32_t i8VectorCmpAVX2(const void* pData, int32_t numOfRows, bool isMinFunc, bool signVal, int64_t* res) { +#ifdef __AVX2__ + const int8_t* p = pData; + + int32_t width, remain, rounds; + calculateRounds(numOfRows, sizeof(int8_t), &remain, &rounds, &width); + +#define CMP_FUNC_MIN_int8_t _mm256_min_epi8 +#define CMP_FUNC_MAX_int8_t _mm256_max_epi8 +#define CMP_FUNC_MIN_uint8_t _mm256_min_epu8 +#define CMP_FUNC_MAX_uint8_t _mm256_max_epu8 + + if (!isMinFunc) { // max function + if (signVal) { + CMP_TYPE_MIN_MAX(int8_t, MAX); + } else { + CMP_TYPE_MIN_MAX(uint8_t, MAX); + } + } else { // min function + if (signVal) { + CMP_TYPE_MIN_MAX(int8_t, MIN); + } else { + CMP_TYPE_MIN_MAX(uint8_t, MIN); + } + } + return TSDB_CODE_SUCCESS; +#else + uError("unable run %s without avx2 instructions", __func__); + return TSDB_CODE_OPS_NOT_SUPPORT; +#endif +} + +int32_t i16VectorCmpAVX2(const void* pData, int32_t numOfRows, bool isMinFunc, bool signVal, int64_t* res) { +#ifdef __AVX2__ + int32_t width, remain, rounds; + calculateRounds(numOfRows, sizeof(int16_t), &remain, &rounds, &width); + +#define CMP_FUNC_MIN_int16_t _mm256_min_epi16 +#define CMP_FUNC_MAX_int16_t _mm256_max_epi16 +#define CMP_FUNC_MIN_uint16_t _mm256_min_epu16 +#define CMP_FUNC_MAX_uint16_t _mm256_max_epu16 + if (!isMinFunc) { // max function + if (signVal) { + CMP_TYPE_MIN_MAX(int16_t, MAX); + } else { + CMP_TYPE_MIN_MAX(uint16_t, MAX); + } + } else { // min function + if (signVal) { + CMP_TYPE_MIN_MAX(int16_t, MIN); + } else { + CMP_TYPE_MIN_MAX(uint16_t, MIN); + } + } + return TSDB_CODE_SUCCESS; +#else + uError("unable run %s without avx2 instructions", __func__); + return TSDB_CODE_OPS_NOT_SUPPORT; +#endif +} + +int32_t i32VectorCmpAVX2(const void* pData, int32_t numOfRows, bool isMinFunc, bool signVal, int64_t* res) { +#ifdef __AVX2__ + int32_t width, remain, rounds; + calculateRounds(numOfRows, sizeof(int32_t), &remain, &rounds, &width); + +#define CMP_FUNC_MIN_int32_t _mm256_min_epi32 +#define CMP_FUNC_MAX_int32_t _mm256_max_epi32 +#define CMP_FUNC_MIN_uint32_t _mm256_min_epu32 +#define CMP_FUNC_MAX_uint32_t _mm256_max_epu32 + if (!isMinFunc) { // max function + if (signVal) { + CMP_TYPE_MIN_MAX(int32_t, MAX); + } else { + CMP_TYPE_MIN_MAX(uint32_t, MAX); + } + } else { // min function + if (signVal) { + CMP_TYPE_MIN_MAX(int32_t, MIN); + } else { + CMP_TYPE_MIN_MAX(uint32_t, MIN); + } + } + return TSDB_CODE_SUCCESS; +#else + uError("unable run %s without avx2 instructions", __func__); + return TSDB_CODE_OPS_NOT_SUPPORT; +#endif +} + +int32_t floatVectorCmpAVX2(const float* pData, int32_t numOfRows, bool isMinFunc, float* res) { +#ifdef __AVX2__ + const float* p = pData; + + int32_t width, remain, rounds; + calculateRounds(numOfRows, sizeof(float), &remain, &rounds, &width); + + __m256 next; + __m256 initVal = _mm256_loadu_ps(p); + p += width; + + if (!isMinFunc) { // max function + for (int32_t i = 1; i < rounds; ++i) { + next = _mm256_loadu_ps(p); + initVal = _mm256_max_ps(initVal, next); + p += width; + } + + const float* q = (const float*)&initVal; + EXTRACT_MAX_VAL(q, p, width, remain, *res) + } else { // min function + for (int32_t i = 1; i < rounds; ++i) { + next = _mm256_loadu_ps(p); + initVal = _mm256_min_ps(initVal, next); + p += width; + } + + const float* q = (const float*)&initVal; + EXTRACT_MIN_VAL(q, p, width, remain, *res) + } + return TSDB_CODE_SUCCESS; +#else + uError("unable run %s without avx2 instructions", __func__); + return TSDB_CODE_OPS_NOT_SUPPORT; +#endif +} + +int32_t doubleVectorCmpAVX2(const double* pData, int32_t numOfRows, bool isMinFunc, double* res) { +#ifdef __AVX2__ + const double* p = pData; + + int32_t width, remain, rounds; + calculateRounds(numOfRows, sizeof(double), &remain, &rounds, &width); + + __m256d next; + __m256d initVal = _mm256_loadu_pd(p); + p += width; + + if (!isMinFunc) { // max function + for (int32_t i = 1; i < rounds; ++i) { + next = _mm256_loadu_pd(p); + initVal = _mm256_max_pd(initVal, next); + p += width; + } + + // let sum up the final results + const double* q = (const double*)&initVal; + EXTRACT_MAX_VAL(q, p, width, remain, *res) + } else { // min function + for (int32_t i = 1; i < rounds; ++i) { + next = _mm256_loadu_pd(p); + initVal = _mm256_min_pd(initVal, next); + p += width; + } + + // let sum up the final results + const double* q = (const double*)&initVal; + EXTRACT_MIN_VAL(q, p, width, remain, *res) + } + return TSDB_CODE_SUCCESS; +#else + uError("unable run %s without avx2 instructions", __func__); + return TSDB_CODE_OPS_NOT_SUPPORT; +#endif +} diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c index b2b06e6bea..866b105ca1 100644 --- a/source/libs/nodes/src/nodesCloneFuncs.c +++ b/source/libs/nodes/src/nodesCloneFuncs.c @@ -175,8 +175,8 @@ static int32_t valueNodeCopy(const SValueNode* pSrc, SValueNode* pDst) { case TSDB_DATA_TYPE_VARCHAR: case TSDB_DATA_TYPE_VARBINARY: case TSDB_DATA_TYPE_GEOMETRY: { - int32_t len = pSrc->node.resType.bytes + 1; - pDst->datum.p = taosMemoryCalloc(1, len); + int32_t len = varDataTLen(pSrc->datum.p); + pDst->datum.p = taosMemoryCalloc(1, len + 1); if (NULL == pDst->datum.p) { return terrno; } diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 597ee5f5d2..3caa8da80f 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -69,6 +69,7 @@ typedef enum EDatabaseOptionType { DB_OPTION_S3_COMPACT, DB_OPTION_KEEP_TIME_OFFSET, DB_OPTION_ENCRYPT_ALGORITHM, + DB_OPTION_DNODES, } EDatabaseOptionType; typedef enum ETableOptionType { diff --git a/source/libs/parser/inc/parInt.h b/source/libs/parser/inc/parInt.h index c231de653c..5999ada70f 100644 --- a/source/libs/parser/inc/parInt.h +++ b/source/libs/parser/inc/parInt.h @@ -28,6 +28,8 @@ extern "C" { #define QUERY_SMA_OPTIMIZE_DISABLE 0 #define QUERY_SMA_OPTIMIZE_ENABLE 1 +#define QUERY_NUMBER_MAX_DISPLAY_LEN 65 + int32_t parseInsertSql(SParseContext* pCxt, SQuery** pQuery, SCatalogReq* pCatalogReq, const SMetaData* pMetaData); int32_t continueCreateTbFromFile(SParseContext* pCxt, SQuery** pQuery); int32_t parse(SParseContext* pParseCxt, SQuery** pQuery); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 067a8e3ccc..635e9f570f 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -286,6 +286,7 @@ db_options(A) ::= db_options(B) S3_KEEPLOCAL NK_VARIABLE(C). db_options(A) ::= db_options(B) S3_COMPACT NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_S3_COMPACT, &C); } db_options(A) ::= db_options(B) KEEP_TIME_OFFSET NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_KEEP_TIME_OFFSET, &C); } db_options(A) ::= db_options(B) ENCRYPT_ALGORITHM NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_ENCRYPT_ALGORITHM, &C); } +db_options(A) ::= db_options(B) DNODES NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_DNODES, &C); } alter_db_options(A) ::= alter_db_option(B). { A = createAlterDatabaseOptions(pCxt); A = setAlterDatabaseOption(pCxt, A, &B); } alter_db_options(A) ::= alter_db_options(B) alter_db_option(C). { A = setAlterDatabaseOption(pCxt, B, &C); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index afc5ed6463..269e9e4a04 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1799,6 +1799,7 @@ SNode* createDefaultDatabaseOptions(SAstCreateContext* pCxt) { pOptions->s3Compact = TSDB_DEFAULT_S3_COMPACT; pOptions->withArbitrator = TSDB_DEFAULT_DB_WITH_ARBITRATOR; pOptions->encryptAlgorithm = TSDB_DEFAULT_ENCRYPT_ALGO; + pOptions->dnodeListStr[0] = 0; return (SNode*)pOptions; _err: return NULL; @@ -1842,6 +1843,7 @@ SNode* createAlterDatabaseOptions(SAstCreateContext* pCxt) { pOptions->s3Compact = -1; pOptions->withArbitrator = -1; pOptions->encryptAlgorithm = -1; + pOptions->dnodeListStr[0] = 0; return (SNode*)pOptions; _err: return NULL; @@ -1981,6 +1983,14 @@ static SNode* setDatabaseOptionImpl(SAstCreateContext* pCxt, SNode* pOptions, ED COPY_STRING_FORM_STR_TOKEN(pDbOptions->encryptAlgorithmStr, (SToken*)pVal); pDbOptions->encryptAlgorithm = TSDB_DEFAULT_ENCRYPT_ALGO; break; + case DB_OPTION_DNODES: + if (((SToken*)pVal)->n >= TSDB_DNODE_LIST_LEN) { + snprintf(pCxt->pQueryCxt->pMsg, pCxt->pQueryCxt->msgLen, "the dnode list is too long (should less than %d)", + TSDB_DNODE_LIST_LEN); + pCxt->errCode = TSDB_CODE_PAR_SYNTAX_ERROR; + } else { + COPY_STRING_FORM_STR_TOKEN(pDbOptions->dnodeListStr, (SToken*)pVal); + } default: break; } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 52c40ef0a4..e475d34055 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -3308,25 +3308,26 @@ static int32_t selectCommonType(SDataType* commonType, const SDataType* newType) } else { resultType = gDisplyTypes[type2][type1]; } + if (resultType == -1) { return TSDB_CODE_SCALAR_CONVERT_ERROR; } + if (commonType->type == newType->type) { commonType->bytes = TMAX(commonType->bytes, newType->bytes); return TSDB_CODE_SUCCESS; } - if (resultType == commonType->type) { - return TSDB_CODE_SUCCESS; - } - if (resultType == newType->type) { - *commonType = *newType; - return TSDB_CODE_SUCCESS; - } - commonType->bytes = TMAX(TMAX(commonType->bytes, newType->bytes), TYPE_BYTES[resultType]); - if (resultType == TSDB_DATA_TYPE_VARCHAR && (IS_FLOAT_TYPE(commonType->type) || IS_FLOAT_TYPE(newType->type))) { - commonType->bytes += TYPE_BYTES[TSDB_DATA_TYPE_DOUBLE]; + + if ((resultType == TSDB_DATA_TYPE_VARCHAR) && (IS_MATHABLE_TYPE(commonType->type) || IS_MATHABLE_TYPE(newType->type))) { + commonType->bytes = TMAX(TMAX(commonType->bytes, newType->bytes), QUERY_NUMBER_MAX_DISPLAY_LEN); + } else if ((resultType == TSDB_DATA_TYPE_NCHAR) && (IS_MATHABLE_TYPE(commonType->type) || IS_MATHABLE_TYPE(newType->type))) { + commonType->bytes = TMAX(TMAX(commonType->bytes, newType->bytes), QUERY_NUMBER_MAX_DISPLAY_LEN * TSDB_NCHAR_SIZE); + } else { + commonType->bytes = TMAX(TMAX(commonType->bytes, newType->bytes), TYPE_BYTES[resultType]); } + commonType->type = resultType; + return TSDB_CODE_SUCCESS; } @@ -7541,6 +7542,8 @@ static int32_t buildCreateDbReq(STranslateContext* pCxt, SCreateDatabaseStmt* pS pReq->ignoreExist = pStmt->ignoreExists; pReq->withArbitrator = pStmt->pOptions->withArbitrator; pReq->encryptAlgorithm = pStmt->pOptions->encryptAlgorithm; + tstrncpy(pReq->dnodeListStr, pStmt->pOptions->dnodeListStr, TSDB_DNODE_LIST_LEN); + return buildCreateDbRetentions(pStmt->pOptions->pRetentions, pReq); } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 9ddf50f7aa..a352b237b6 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -1,5 +1,3 @@ -/* This file is automatically generated by Lemon from input grammar -** source file "sql.y". */ /* ** 2000-05-29 ** @@ -24,8 +22,9 @@ ** The following is the concatenation of all %include directives from the ** input grammar file: */ +#include +#include /************ Begin %include sections from the grammar ************************/ -#line 11 "sql.y" #include #include @@ -42,401 +41,12 @@ #include "parAst.h" #define YYSTACKDEPTH 0 -#line 46 "sql.c" /**************** End of %include directives **********************************/ -/* These constants specify the various numeric values for terminal symbols. -***************** Begin token definitions *************************************/ -#ifndef TK_OR -#define TK_OR 1 -#define TK_AND 2 -#define TK_UNION 3 -#define TK_ALL 4 -#define TK_MINUS 5 -#define TK_EXCEPT 6 -#define TK_INTERSECT 7 -#define TK_NK_BITAND 8 -#define TK_NK_BITOR 9 -#define TK_NK_LSHIFT 10 -#define TK_NK_RSHIFT 11 -#define TK_NK_PLUS 12 -#define TK_NK_MINUS 13 -#define TK_NK_STAR 14 -#define TK_NK_SLASH 15 -#define TK_NK_REM 16 -#define TK_NK_CONCAT 17 -#define TK_CREATE 18 -#define TK_ACCOUNT 19 -#define TK_NK_ID 20 -#define TK_PASS 21 -#define TK_NK_STRING 22 -#define TK_ALTER 23 -#define TK_PPS 24 -#define TK_TSERIES 25 -#define TK_STORAGE 26 -#define TK_STREAMS 27 -#define TK_QTIME 28 -#define TK_DBS 29 -#define TK_USERS 30 -#define TK_CONNS 31 -#define TK_STATE 32 -#define TK_NK_COMMA 33 -#define TK_HOST 34 -#define TK_IS_IMPORT 35 -#define TK_NK_INTEGER 36 -#define TK_CREATEDB 37 -#define TK_USER 38 -#define TK_ENABLE 39 -#define TK_SYSINFO 40 -#define TK_ADD 41 -#define TK_DROP 42 -#define TK_GRANT 43 -#define TK_ON 44 -#define TK_TO 45 -#define TK_REVOKE 46 -#define TK_FROM 47 -#define TK_SUBSCRIBE 48 -#define TK_READ 49 -#define TK_WRITE 50 -#define TK_NK_DOT 51 -#define TK_WITH 52 -#define TK_ENCRYPT_KEY 53 -#define TK_ANODE 54 -#define TK_UPDATE 55 -#define TK_ANODES 56 -#define TK_DNODE 57 -#define TK_PORT 58 -#define TK_DNODES 59 -#define TK_RESTORE 60 -#define TK_NK_IPTOKEN 61 -#define TK_FORCE 62 -#define TK_UNSAFE 63 -#define TK_CLUSTER 64 -#define TK_LOCAL 65 -#define TK_QNODE 66 -#define TK_BNODE 67 -#define TK_SNODE 68 -#define TK_MNODE 69 -#define TK_VNODE 70 -#define TK_DATABASE 71 -#define TK_USE 72 -#define TK_FLUSH 73 -#define TK_TRIM 74 -#define TK_S3MIGRATE 75 -#define TK_COMPACT 76 -#define TK_IF 77 -#define TK_NOT 78 -#define TK_EXISTS 79 -#define TK_BUFFER 80 -#define TK_CACHEMODEL 81 -#define TK_CACHESIZE 82 -#define TK_COMP 83 -#define TK_DURATION 84 -#define TK_NK_VARIABLE 85 -#define TK_MAXROWS 86 -#define TK_MINROWS 87 -#define TK_KEEP 88 -#define TK_PAGES 89 -#define TK_PAGESIZE 90 -#define TK_TSDB_PAGESIZE 91 -#define TK_PRECISION 92 -#define TK_REPLICA 93 -#define TK_VGROUPS 94 -#define TK_SINGLE_STABLE 95 -#define TK_RETENTIONS 96 -#define TK_SCHEMALESS 97 -#define TK_WAL_LEVEL 98 -#define TK_WAL_FSYNC_PERIOD 99 -#define TK_WAL_RETENTION_PERIOD 100 -#define TK_WAL_RETENTION_SIZE 101 -#define TK_WAL_ROLL_PERIOD 102 -#define TK_WAL_SEGMENT_SIZE 103 -#define TK_STT_TRIGGER 104 -#define TK_TABLE_PREFIX 105 -#define TK_TABLE_SUFFIX 106 -#define TK_S3_CHUNKPAGES 107 -#define TK_S3_KEEPLOCAL 108 -#define TK_S3_COMPACT 109 -#define TK_KEEP_TIME_OFFSET 110 -#define TK_ENCRYPT_ALGORITHM 111 -#define TK_NK_COLON 112 -#define TK_BWLIMIT 113 -#define TK_START 114 -#define TK_TIMESTAMP 115 -#define TK_END 116 -#define TK_TABLE 117 -#define TK_NK_LP 118 -#define TK_NK_RP 119 -#define TK_USING 120 -#define TK_FILE 121 -#define TK_STABLE 122 -#define TK_COLUMN 123 -#define TK_MODIFY 124 -#define TK_RENAME 125 -#define TK_TAG 126 -#define TK_SET 127 -#define TK_NK_EQ 128 -#define TK_TAGS 129 -#define TK_BOOL 130 -#define TK_TINYINT 131 -#define TK_SMALLINT 132 -#define TK_INT 133 -#define TK_INTEGER 134 -#define TK_BIGINT 135 -#define TK_FLOAT 136 -#define TK_DOUBLE 137 -#define TK_BINARY 138 -#define TK_NCHAR 139 -#define TK_UNSIGNED 140 -#define TK_JSON 141 -#define TK_VARCHAR 142 -#define TK_MEDIUMBLOB 143 -#define TK_BLOB 144 -#define TK_VARBINARY 145 -#define TK_GEOMETRY 146 -#define TK_DECIMAL 147 -#define TK_COMMENT 148 -#define TK_MAX_DELAY 149 -#define TK_WATERMARK 150 -#define TK_ROLLUP 151 -#define TK_TTL 152 -#define TK_SMA 153 -#define TK_DELETE_MARK 154 -#define TK_FIRST 155 -#define TK_LAST 156 -#define TK_SHOW 157 -#define TK_FULL 158 -#define TK_PRIVILEGES 159 -#define TK_DATABASES 160 -#define TK_TABLES 161 -#define TK_STABLES 162 -#define TK_MNODES 163 -#define TK_QNODES 164 -#define TK_ARBGROUPS 165 -#define TK_FUNCTIONS 166 -#define TK_INDEXES 167 -#define TK_ACCOUNTS 168 -#define TK_APPS 169 -#define TK_CONNECTIONS 170 -#define TK_LICENCES 171 -#define TK_GRANTS 172 -#define TK_LOGS 173 -#define TK_MACHINES 174 -#define TK_ENCRYPTIONS 175 -#define TK_QUERIES 176 -#define TK_SCORES 177 -#define TK_TOPICS 178 -#define TK_VARIABLES 179 -#define TK_BNODES 180 -#define TK_SNODES 181 -#define TK_TRANSACTIONS 182 -#define TK_DISTRIBUTED 183 -#define TK_CONSUMERS 184 -#define TK_SUBSCRIPTIONS 185 -#define TK_VNODES 186 -#define TK_ALIVE 187 -#define TK_VIEWS 188 -#define TK_VIEW 189 -#define TK_COMPACTS 190 -#define TK_NORMAL 191 -#define TK_CHILD 192 -#define TK_LIKE 193 -#define TK_TBNAME 194 -#define TK_QTAGS 195 -#define TK_AS 196 -#define TK_SYSTEM 197 -#define TK_TSMA 198 -#define TK_INTERVAL 199 -#define TK_RECURSIVE 200 -#define TK_TSMAS 201 -#define TK_FUNCTION 202 -#define TK_INDEX 203 -#define TK_COUNT 204 -#define TK_LAST_ROW 205 -#define TK_META 206 -#define TK_ONLY 207 -#define TK_TOPIC 208 -#define TK_CONSUMER 209 -#define TK_GROUP 210 -#define TK_DESC 211 -#define TK_DESCRIBE 212 -#define TK_RESET 213 -#define TK_QUERY 214 -#define TK_CACHE 215 -#define TK_EXPLAIN 216 -#define TK_ANALYZE 217 -#define TK_VERBOSE 218 -#define TK_NK_BOOL 219 -#define TK_RATIO 220 -#define TK_NK_FLOAT 221 -#define TK_OUTPUTTYPE 222 -#define TK_AGGREGATE 223 -#define TK_BUFSIZE 224 -#define TK_LANGUAGE 225 -#define TK_REPLACE 226 -#define TK_STREAM 227 -#define TK_INTO 228 -#define TK_PAUSE 229 -#define TK_RESUME 230 -#define TK_PRIMARY 231 -#define TK_KEY 232 -#define TK_TRIGGER 233 -#define TK_AT_ONCE 234 -#define TK_WINDOW_CLOSE 235 -#define TK_IGNORE 236 -#define TK_EXPIRED 237 -#define TK_FILL_HISTORY 238 -#define TK_SUBTABLE 239 -#define TK_UNTREATED 240 -#define TK_KILL 241 -#define TK_CONNECTION 242 -#define TK_TRANSACTION 243 -#define TK_BALANCE 244 -#define TK_VGROUP 245 -#define TK_LEADER 246 -#define TK_MERGE 247 -#define TK_REDISTRIBUTE 248 -#define TK_SPLIT 249 -#define TK_DELETE 250 -#define TK_INSERT 251 -#define TK_NK_BIN 252 -#define TK_NK_HEX 253 -#define TK_NULL 254 -#define TK_NK_QUESTION 255 -#define TK_NK_ALIAS 256 -#define TK_NK_ARROW 257 -#define TK_ROWTS 258 -#define TK_QSTART 259 -#define TK_QEND 260 -#define TK_QDURATION 261 -#define TK_WSTART 262 -#define TK_WEND 263 -#define TK_WDURATION 264 -#define TK_IROWTS 265 -#define TK_ISFILLED 266 -#define TK_FLOW 267 -#define TK_FHIGH 268 -#define TK_FROWTS 269 -#define TK_CAST 270 -#define TK_POSITION 271 -#define TK_IN 272 -#define TK_FOR 273 -#define TK_NOW 274 -#define TK_TODAY 275 -#define TK_RAND 276 -#define TK_SUBSTR 277 -#define TK_SUBSTRING 278 -#define TK_BOTH 279 -#define TK_TRAILING 280 -#define TK_LEADING 281 -#define TK_TIMEZONE 282 -#define TK_CLIENT_VERSION 283 -#define TK_SERVER_VERSION 284 -#define TK_SERVER_STATUS 285 -#define TK_CURRENT_USER 286 -#define TK_PI 287 -#define TK_CASE 288 -#define TK_WHEN 289 -#define TK_THEN 290 -#define TK_ELSE 291 -#define TK_BETWEEN 292 -#define TK_IS 293 -#define TK_NK_LT 294 -#define TK_NK_GT 295 -#define TK_NK_LE 296 -#define TK_NK_GE 297 -#define TK_NK_NE 298 -#define TK_MATCH 299 -#define TK_NMATCH 300 -#define TK_CONTAINS 301 -#define TK_JOIN 302 -#define TK_INNER 303 -#define TK_LEFT 304 -#define TK_RIGHT 305 -#define TK_OUTER 306 -#define TK_SEMI 307 -#define TK_ANTI 308 -#define TK_ASOF 309 -#define TK_WINDOW 310 -#define TK_WINDOW_OFFSET 311 -#define TK_JLIMIT 312 -#define TK_SELECT 313 -#define TK_NK_HINT 314 -#define TK_DISTINCT 315 -#define TK_WHERE 316 -#define TK_PARTITION 317 -#define TK_BY 318 -#define TK_SESSION 319 -#define TK_STATE_WINDOW 320 -#define TK_EVENT_WINDOW 321 -#define TK_COUNT_WINDOW 322 -#define TK_ANOMALY_WINDOW 323 -#define TK_SLIDING 324 -#define TK_FILL 325 -#define TK_VALUE 326 -#define TK_VALUE_F 327 -#define TK_NONE 328 -#define TK_PREV 329 -#define TK_NULL_F 330 -#define TK_LINEAR 331 -#define TK_NEXT 332 -#define TK_HAVING 333 -#define TK_RANGE 334 -#define TK_EVERY 335 -#define TK_ORDER 336 -#define TK_SLIMIT 337 -#define TK_SOFFSET 338 -#define TK_LIMIT 339 -#define TK_OFFSET 340 -#define TK_ASC 341 -#define TK_NULLS 342 -#define TK_ABORT 343 -#define TK_AFTER 344 -#define TK_ATTACH 345 -#define TK_BEFORE 346 -#define TK_BEGIN 347 -#define TK_BITAND 348 -#define TK_BITNOT 349 -#define TK_BITOR 350 -#define TK_BLOCKS 351 -#define TK_CHANGE 352 -#define TK_COMMA 353 -#define TK_CONCAT 354 -#define TK_CONFLICT 355 -#define TK_COPY 356 -#define TK_DEFERRED 357 -#define TK_DELIMITERS 358 -#define TK_DETACH 359 -#define TK_DIVIDE 360 -#define TK_DOT 361 -#define TK_EACH 362 -#define TK_FAIL 363 -#define TK_GLOB 364 -#define TK_ID 365 -#define TK_IMMEDIATE 366 -#define TK_IMPORT 367 -#define TK_INITIALLY 368 -#define TK_INSTEAD 369 -#define TK_ISNULL 370 -#define TK_MODULES 371 -#define TK_NK_BITNOT 372 -#define TK_NK_SEMI 373 -#define TK_NOTNULL 374 -#define TK_OF 375 -#define TK_PLUS 376 -#define TK_PRIVILEGE 377 -#define TK_RAISE 378 -#define TK_RESTRICT 379 -#define TK_ROW 380 -#define TK_STAR 381 -#define TK_STATEMENT 382 -#define TK_STRICT 383 -#define TK_STRING 384 -#define TK_TIMES 385 -#define TK_VALUES 386 -#define TK_VARIABLE 387 -#define TK_WAL 388 -#endif -/**************** End token definitions ***************************************/ +/* These constants specify the various numeric values for terminal symbols +** in a format understandable to "makeheaders". This section is blank unless +** "lemon" is run with the "-m" command-line option. +***************** Begin makeheaders token definitions *************************/ +/**************** End makeheaders token definitions ***************************/ /* The next sections is a series of control #defines. ** various aspects of the generated parser. @@ -534,18 +144,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 1025 -#define YYNRULE 784 -#define YYNRULE_WITH_ACTION 784 +#define YYNSTATE 1026 +#define YYNRULE 785 +#define YYNRULE_WITH_ACTION 785 #define YYNTOKEN 389 -#define YY_MAX_SHIFT 1024 -#define YY_MIN_SHIFTREDUCE 1516 -#define YY_MAX_SHIFTREDUCE 2299 -#define YY_ERROR_ACTION 2300 -#define YY_ACCEPT_ACTION 2301 -#define YY_NO_ACTION 2302 -#define YY_MIN_REDUCE 2303 -#define YY_MAX_REDUCE 3086 +#define YY_MAX_SHIFT 1025 +#define YY_MIN_SHIFTREDUCE 1518 +#define YY_MAX_SHIFTREDUCE 2302 +#define YY_ERROR_ACTION 2303 +#define YY_ACCEPT_ACTION 2304 +#define YY_NO_ACTION 2305 +#define YY_MIN_REDUCE 2306 +#define YY_MAX_REDUCE 3090 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -614,753 +224,753 @@ typedef union { *********** Begin parsing tables **********************************************/ #define YY_ACTTAB_COUNT (4475) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 839, 683, 3059, 691, 684, 2351, 684, 2351, 3054, 2577, - /* 10 */ 3054, 2816, 60, 58, 678, 59, 57, 56, 55, 54, - /* 20 */ 506, 2304, 2016, 2521, 915, 2517, 838, 231, 858, 3058, - /* 30 */ 2816, 3055, 840, 3055, 3057, 205, 2014, 332, 2124, 2399, - /* 40 */ 2041, 2820, 151, 2841, 530, 150, 149, 148, 147, 146, - /* 50 */ 145, 144, 143, 142, 914, 851, 170, 466, 854, 389, - /* 60 */ 2820, 53, 52, 220, 680, 59, 57, 56, 55, 54, - /* 70 */ 2303, 2119, 151, 2045, 884, 150, 149, 148, 147, 146, - /* 80 */ 145, 144, 143, 142, 782, 2022, 2041, 2674, 2859, 829, - /* 90 */ 2647, 2822, 2824, 501, 160, 159, 158, 157, 156, 155, - /* 100 */ 154, 153, 152, 688, 2806, 919, 896, 2672, 901, 685, - /* 110 */ 2822, 2825, 1592, 2759, 1591, 1021, 851, 170, 61, 990, - /* 120 */ 989, 988, 987, 536, 919, 986, 985, 175, 980, 979, - /* 130 */ 978, 977, 976, 975, 974, 174, 968, 967, 966, 535, - /* 140 */ 534, 963, 962, 961, 211, 210, 960, 531, 959, 958, - /* 150 */ 957, 2840, 63, 1593, 2891, 2127, 2128, 197, 134, 2842, - /* 160 */ 900, 2844, 2845, 895, 75, 2448, 883, 2892, 919, 2041, - /* 170 */ 802, 772, 1592, 213, 1591, 2954, 2042, 251, 3054, 500, - /* 180 */ 2950, 207, 2962, 850, 75, 162, 849, 766, 166, 770, - /* 190 */ 768, 303, 302, 3054, 2077, 2087, 3060, 231, 198, 232, - /* 200 */ 2315, 3055, 840, 3059, 2126, 2129, 528, 3001, 509, 2570, - /* 210 */ 2572, 838, 231, 1593, 1862, 1863, 3055, 840, 195, 2017, - /* 220 */ 2044, 2015, 824, 107, 914, 9, 882, 2220, 106, 2522, - /* 230 */ 53, 52, 914, 2041, 59, 57, 56, 55, 54, 676, - /* 240 */ 64, 853, 200, 2962, 2963, 2213, 168, 2967, 674, 227, - /* 250 */ 318, 670, 666, 581, 2020, 2021, 2074, 2841, 2076, 2079, - /* 260 */ 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2088, 2089, 2090, - /* 270 */ 892, 885, 894, 914, 917, 916, 881, 2111, 2112, 2113, - /* 280 */ 2114, 2115, 2118, 2120, 2121, 2122, 2123, 2125, 2, 60, - /* 290 */ 58, 2216, 700, 2841, 445, 105, 2039, 506, 75, 2016, - /* 300 */ 458, 118, 2859, 625, 644, 642, 469, 441, 897, 2046, - /* 310 */ 245, 1889, 1890, 2014, 646, 2124, 915, 2517, 2806, 2286, - /* 320 */ 896, 2616, 53, 52, 127, 2074, 59, 57, 56, 55, - /* 330 */ 54, 510, 468, 604, 2599, 648, 236, 220, 2859, 2191, - /* 340 */ 446, 606, 830, 825, 818, 814, 810, 339, 2119, 2674, - /* 350 */ 2154, 884, 584, 785, 2806, 19, 896, 701, 2667, 339, - /* 360 */ 1888, 1891, 2022, 498, 2647, 2840, 2042, 2326, 2891, 2671, - /* 370 */ 901, 63, 436, 2842, 900, 2844, 2845, 895, 893, 339, - /* 380 */ 883, 2892, 919, 874, 2919, 954, 187, 186, 951, 950, - /* 390 */ 949, 184, 1021, 467, 973, 15, 337, 2474, 572, 2044, - /* 400 */ 571, 2840, 2251, 887, 2891, 592, 2674, 2078, 134, 2842, - /* 410 */ 900, 2844, 2845, 895, 886, 2155, 883, 2892, 919, 922, - /* 420 */ 508, 172, 224, 181, 2925, 2954, 2671, 901, 2806, 500, - /* 430 */ 2950, 570, 2127, 2128, 801, 339, 2654, 2633, 2564, 634, - /* 440 */ 633, 631, 630, 629, 624, 623, 622, 621, 450, 590, - /* 450 */ 2643, 611, 610, 609, 608, 607, 601, 600, 599, 267, - /* 460 */ 594, 593, 465, 686, 699, 2359, 585, 1850, 1851, 2075, - /* 470 */ 220, 2077, 2087, 1869, 821, 820, 2249, 2250, 2252, 2253, - /* 480 */ 2254, 2126, 2129, 2974, 2188, 2189, 2190, 2974, 2974, 2974, - /* 490 */ 2974, 2974, 620, 339, 2160, 618, 2017, 2648, 2015, 41, - /* 500 */ 617, 1786, 1787, 882, 247, 53, 52, 619, 616, 59, - /* 510 */ 57, 56, 55, 54, 44, 502, 2149, 2150, 2151, 2152, - /* 520 */ 2153, 2157, 2158, 2159, 79, 2293, 2193, 2194, 2195, 2196, - /* 530 */ 2197, 2020, 2021, 2074, 2841, 2076, 2079, 2080, 2081, 2082, - /* 540 */ 2083, 2084, 2085, 2086, 2088, 2089, 2090, 892, 885, 854, - /* 550 */ 3059, 917, 916, 881, 2111, 2112, 2212, 786, 3054, 2118, - /* 560 */ 2120, 2121, 2122, 2123, 2125, 2, 60, 58, 2841, 2191, - /* 570 */ 2016, 828, 533, 532, 506, 337, 2016, 3058, 73, 2859, - /* 580 */ 2577, 3055, 3056, 897, 2014, 2135, 45, 355, 1747, 799, - /* 590 */ 2014, 2041, 2124, 702, 269, 2806, 2023, 896, 686, 866, - /* 600 */ 2359, 2859, 1561, 1738, 946, 945, 944, 1742, 943, 1744, - /* 610 */ 1745, 942, 939, 2859, 1753, 936, 1755, 1756, 933, 930, - /* 620 */ 927, 1568, 2499, 473, 786, 2119, 195, 2969, 884, 2806, - /* 630 */ 923, 896, 19, 2022, 137, 596, 2643, 2523, 75, 2022, - /* 640 */ 693, 2713, 2840, 526, 2519, 2891, 1563, 1566, 1567, 134, - /* 650 */ 2842, 900, 2844, 2845, 895, 2292, 2966, 883, 2892, 919, - /* 660 */ 915, 2517, 706, 1021, 213, 196, 2954, 725, 724, 1021, - /* 670 */ 500, 2950, 15, 827, 526, 2519, 2840, 915, 2517, 2891, - /* 680 */ 161, 2841, 2045, 135, 2842, 900, 2844, 2845, 895, 731, - /* 690 */ 249, 883, 2892, 919, 487, 2721, 897, 161, 3002, 2489, - /* 700 */ 2954, 56, 55, 54, 2953, 2950, 736, 788, 2713, 2127, - /* 710 */ 2128, 627, 2643, 2974, 2188, 2189, 2190, 2974, 2974, 2974, - /* 720 */ 2974, 2974, 518, 53, 52, 956, 2859, 59, 57, 56, - /* 730 */ 55, 54, 752, 751, 750, 851, 170, 14, 13, 742, - /* 740 */ 167, 746, 2806, 783, 896, 745, 1683, 521, 2077, 2087, - /* 750 */ 744, 749, 480, 479, 2191, 12, 743, 558, 2126, 2129, - /* 760 */ 478, 739, 738, 737, 2969, 2078, 254, 2017, 2022, 2015, - /* 770 */ 2571, 2572, 43, 2017, 1695, 2015, 956, 2045, 53, 52, - /* 780 */ 882, 2026, 59, 57, 56, 55, 54, 2799, 1694, 2840, - /* 790 */ 523, 703, 2891, 2965, 2041, 1685, 199, 2842, 900, 2844, - /* 800 */ 2845, 895, 2020, 2021, 883, 2892, 919, 2301, 2020, 2021, - /* 810 */ 2074, 2841, 2076, 2079, 2080, 2081, 2082, 2083, 2084, 2085, - /* 820 */ 2086, 2088, 2089, 2090, 892, 885, 897, 2075, 917, 916, - /* 830 */ 881, 2111, 2112, 339, 2262, 2325, 2118, 2120, 2121, 2122, - /* 840 */ 2123, 2125, 2, 12, 60, 58, 803, 3012, 851, 170, - /* 850 */ 512, 2661, 506, 704, 2016, 2168, 2859, 947, 226, 1699, - /* 860 */ 1747, 140, 2962, 2963, 919, 168, 2967, 649, 2014, 2969, - /* 870 */ 2124, 117, 2806, 1698, 896, 1738, 946, 945, 944, 1742, - /* 880 */ 943, 1744, 1745, 891, 890, 2577, 1753, 889, 1755, 1756, - /* 890 */ 888, 930, 927, 464, 2324, 562, 2806, 539, 2964, 2188, - /* 900 */ 2189, 2190, 538, 2119, 2575, 1917, 884, 1985, 113, 396, - /* 910 */ 19, 1595, 1596, 915, 2517, 1568, 307, 2022, 2046, 2840, - /* 920 */ 2506, 126, 2891, 564, 560, 638, 135, 2842, 900, 2844, - /* 930 */ 2845, 895, 1984, 68, 883, 2892, 919, 2511, 517, 516, - /* 940 */ 553, 1566, 1567, 2954, 2841, 915, 2517, 1021, 2951, 2508, - /* 950 */ 15, 2800, 651, 234, 802, 2806, 225, 915, 2517, 897, - /* 960 */ 2760, 2361, 3054, 520, 519, 578, 190, 238, 2078, 486, - /* 970 */ 2721, 409, 533, 532, 201, 2962, 2963, 579, 168, 2967, - /* 980 */ 3060, 231, 2030, 512, 839, 3055, 840, 2127, 2128, 2859, - /* 990 */ 407, 89, 3054, 256, 88, 2323, 2023, 919, 2124, 727, - /* 1000 */ 726, 1943, 1944, 470, 2491, 2806, 2504, 896, 447, 2322, - /* 1010 */ 838, 231, 2502, 2046, 512, 3055, 840, 802, 637, 255, - /* 1020 */ 265, 661, 659, 656, 654, 3054, 2077, 2087, 919, 97, - /* 1030 */ 2075, 2119, 635, 3, 53, 52, 2126, 2129, 59, 57, - /* 1040 */ 56, 55, 54, 3060, 231, 2022, 173, 66, 3055, 840, - /* 1050 */ 2321, 2017, 2840, 2015, 113, 2891, 2806, 2507, 882, 134, - /* 1060 */ 2842, 900, 2844, 2845, 895, 2243, 75, 883, 2892, 919, - /* 1070 */ 2806, 748, 747, 471, 3074, 879, 2954, 346, 347, 2244, - /* 1080 */ 500, 2950, 345, 2510, 574, 3058, 2020, 2021, 2074, 573, - /* 1090 */ 2076, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2088, - /* 1100 */ 2089, 2090, 892, 885, 970, 76, 917, 916, 881, 2111, - /* 1110 */ 2112, 2806, 984, 982, 2118, 2120, 2121, 2122, 2123, 2125, - /* 1120 */ 2, 60, 58, 2130, 915, 2517, 2320, 2319, 2242, 506, - /* 1130 */ 2318, 2016, 53, 52, 2331, 1014, 59, 57, 56, 55, - /* 1140 */ 54, 802, 306, 2577, 598, 2014, 305, 2124, 2449, 3054, - /* 1150 */ 759, 496, 954, 187, 186, 951, 950, 949, 184, 101, - /* 1160 */ 100, 577, 2575, 846, 244, 773, 2577, 3060, 231, 2488, - /* 1170 */ 2317, 40, 3055, 840, 511, 395, 972, 569, 567, 2031, - /* 1180 */ 2119, 2026, 403, 884, 304, 2575, 2554, 2806, 2806, 444, - /* 1190 */ 2402, 2806, 556, 314, 2022, 552, 548, 544, 541, 570, - /* 1200 */ 2727, 53, 52, 762, 402, 59, 57, 56, 55, 54, - /* 1210 */ 756, 754, 915, 2517, 2034, 2036, 12, 301, 10, 2314, - /* 1220 */ 116, 2841, 2521, 196, 1021, 453, 34, 61, 485, 2577, - /* 1230 */ 774, 2806, 612, 2520, 917, 916, 897, 527, 3009, 185, - /* 1240 */ 915, 2517, 2118, 2120, 2121, 2122, 2123, 2125, 2575, 915, - /* 1250 */ 2517, 53, 52, 915, 2517, 59, 57, 56, 55, 54, - /* 1260 */ 613, 339, 308, 85, 2127, 2128, 2859, 2045, 84, 614, - /* 1270 */ 752, 751, 750, 705, 2041, 2746, 809, 742, 167, 746, - /* 1280 */ 2806, 396, 2806, 745, 896, 915, 2517, 2313, 744, 749, - /* 1290 */ 480, 479, 333, 2312, 743, 915, 2517, 2577, 478, 739, - /* 1300 */ 738, 737, 2386, 2077, 2087, 2512, 915, 2517, 875, 877, - /* 1310 */ 2926, 2926, 2263, 2126, 2129, 309, 2576, 954, 187, 186, - /* 1320 */ 951, 950, 949, 184, 753, 67, 317, 2311, 2017, 2840, - /* 1330 */ 2015, 2156, 2891, 833, 843, 882, 134, 2842, 900, 2844, - /* 1340 */ 2845, 895, 2722, 2316, 883, 2892, 919, 948, 2806, 952, - /* 1350 */ 2568, 3074, 2568, 2954, 2806, 2310, 735, 500, 2950, 2309, - /* 1360 */ 734, 205, 2238, 2020, 2021, 2074, 2841, 2076, 2079, 2080, - /* 1370 */ 2081, 2082, 2083, 2084, 2085, 2086, 2088, 2089, 2090, 892, - /* 1380 */ 885, 897, 2626, 917, 916, 881, 2111, 2112, 2806, 915, - /* 1390 */ 2517, 2118, 2120, 2121, 2122, 2123, 2125, 2, 60, 58, - /* 1400 */ 2841, 915, 2517, 915, 2517, 2202, 506, 2750, 2016, 857, - /* 1410 */ 2161, 2859, 915, 2517, 2308, 897, 2806, 3022, 842, 2307, - /* 1420 */ 2806, 350, 2014, 871, 2124, 171, 588, 2806, 2925, 896, - /* 1430 */ 42, 2306, 357, 53, 52, 915, 2517, 59, 57, 56, - /* 1440 */ 55, 54, 53, 52, 529, 2859, 59, 57, 56, 55, - /* 1450 */ 54, 775, 915, 2517, 195, 908, 1570, 2119, 915, 2517, - /* 1460 */ 884, 2806, 2040, 896, 546, 2522, 953, 915, 2517, 2568, - /* 1470 */ 847, 2022, 909, 2588, 2840, 2806, 3015, 2891, 913, 163, - /* 1480 */ 2806, 413, 2842, 900, 2844, 2845, 895, 385, 32, 883, - /* 1490 */ 2892, 919, 2806, 103, 91, 2492, 294, 296, 2841, 292, - /* 1500 */ 295, 1021, 177, 2046, 61, 2109, 2295, 2296, 2840, 2579, - /* 1510 */ 2075, 2891, 740, 897, 1678, 134, 2842, 900, 2844, 2845, - /* 1520 */ 895, 222, 177, 883, 2892, 919, 298, 2384, 176, 297, - /* 1530 */ 3074, 300, 2954, 812, 299, 1676, 500, 2950, 2375, 741, - /* 1540 */ 185, 2127, 2128, 2859, 2101, 2373, 62, 822, 104, 755, - /* 1550 */ 53, 52, 62, 2232, 59, 57, 56, 55, 54, 2806, - /* 1560 */ 757, 896, 1674, 1679, 14, 13, 880, 760, 53, 52, - /* 1570 */ 364, 363, 59, 57, 56, 55, 54, 2025, 53, 52, - /* 1580 */ 2077, 2087, 59, 57, 56, 55, 54, 325, 1933, 47, - /* 1590 */ 2126, 2129, 53, 52, 214, 344, 59, 57, 56, 55, - /* 1600 */ 54, 90, 62, 366, 365, 2017, 2840, 2015, 1941, 2891, - /* 1610 */ 77, 852, 882, 134, 2842, 900, 2844, 2845, 895, 2236, - /* 1620 */ 62, 883, 2892, 919, 2827, 2024, 856, 165, 2929, 2860, - /* 1630 */ 2954, 632, 2248, 776, 500, 2950, 368, 367, 2247, 844, - /* 1640 */ 2020, 2021, 2074, 62, 2076, 2079, 2080, 2081, 2082, 2083, - /* 1650 */ 2084, 2085, 2086, 2088, 2089, 2090, 892, 885, 62, 2441, - /* 1660 */ 917, 916, 881, 2111, 2112, 62, 90, 647, 2118, 2120, - /* 1670 */ 2121, 2122, 2123, 2125, 2, 60, 58, 2841, 182, 2097, - /* 1680 */ 323, 348, 779, 506, 2440, 2016, 163, 863, 2100, 2099, - /* 1690 */ 185, 2829, 897, 132, 816, 129, 2162, 2352, 46, 2014, - /* 1700 */ 87, 2124, 2367, 2102, 370, 369, 2110, 53, 52, 3005, - /* 1710 */ 39, 59, 57, 56, 55, 54, 372, 371, 1656, 53, - /* 1720 */ 52, 819, 2859, 59, 57, 56, 55, 54, 2841, 2103, - /* 1730 */ 374, 373, 376, 375, 2119, 378, 377, 884, 2806, 802, - /* 1740 */ 896, 925, 2146, 897, 1886, 380, 379, 3054, 2022, 382, - /* 1750 */ 381, 2091, 1876, 384, 383, 1629, 964, 965, 48, 492, - /* 1760 */ 1008, 826, 2028, 183, 360, 3060, 231, 1657, 185, 164, - /* 1770 */ 3055, 840, 912, 2859, 488, 182, 1729, 860, 1021, 1648, - /* 1780 */ 1646, 61, 2652, 555, 2565, 2840, 401, 537, 2891, 2806, - /* 1790 */ 2358, 896, 134, 2842, 900, 2844, 2845, 895, 795, 3006, - /* 1800 */ 883, 2892, 919, 3016, 1630, 834, 835, 3074, 330, 2954, - /* 1810 */ 2027, 338, 335, 500, 2950, 2653, 53, 52, 2127, 2128, - /* 1820 */ 59, 57, 56, 55, 54, 2475, 5, 1760, 540, 545, - /* 1830 */ 2096, 462, 2039, 554, 2049, 566, 2840, 565, 239, 2891, - /* 1840 */ 568, 240, 394, 135, 2842, 900, 2844, 2845, 895, 1768, - /* 1850 */ 242, 883, 2892, 919, 1775, 1773, 1910, 2077, 2087, 582, - /* 1860 */ 2954, 188, 2040, 589, 878, 2950, 253, 2126, 2129, 53, - /* 1870 */ 52, 591, 595, 59, 57, 56, 55, 54, 597, 640, - /* 1880 */ 602, 615, 2017, 626, 2015, 2645, 53, 52, 636, 882, - /* 1890 */ 59, 57, 56, 55, 54, 628, 639, 641, 652, 477, - /* 1900 */ 475, 653, 650, 259, 258, 657, 2047, 655, 658, 262, - /* 1910 */ 660, 662, 4, 681, 682, 689, 2042, 2020, 2021, 2074, - /* 1920 */ 690, 2076, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, - /* 1930 */ 2088, 2089, 2090, 892, 885, 692, 270, 917, 916, 881, - /* 1940 */ 2111, 2112, 694, 787, 109, 2118, 2120, 2121, 2122, 2123, - /* 1950 */ 2125, 2, 60, 58, 273, 2048, 695, 2050, 696, 276, - /* 1960 */ 506, 698, 2016, 2051, 855, 278, 2668, 110, 2052, 111, - /* 1970 */ 112, 49, 2662, 1727, 2841, 730, 2014, 707, 2124, 284, - /* 1980 */ 2098, 287, 474, 472, 114, 733, 732, 763, 764, 897, - /* 1990 */ 2736, 3047, 139, 2505, 291, 439, 2501, 2095, 778, 115, - /* 2000 */ 802, 293, 191, 780, 138, 2841, 735, 310, 3054, 136, - /* 2010 */ 734, 2119, 2043, 178, 884, 2503, 2498, 192, 193, 2859, - /* 2020 */ 897, 802, 397, 2714, 790, 2022, 3060, 231, 791, 3054, - /* 2030 */ 789, 3055, 840, 315, 313, 2806, 2733, 896, 2732, 823, - /* 2040 */ 797, 861, 3021, 794, 3020, 8, 832, 3060, 231, 326, - /* 2050 */ 2859, 806, 3055, 840, 796, 1021, 2841, 2993, 61, 807, - /* 2060 */ 805, 837, 804, 320, 204, 2973, 2806, 328, 896, 324, - /* 2070 */ 322, 897, 327, 2986, 836, 329, 331, 845, 848, 169, - /* 2080 */ 493, 2044, 2840, 2210, 2208, 2891, 217, 340, 179, 134, - /* 2090 */ 2842, 900, 2844, 2845, 895, 2127, 2128, 883, 2892, 919, - /* 2100 */ 3077, 2859, 3053, 398, 3074, 2970, 2954, 859, 334, 2682, - /* 2110 */ 500, 2950, 2681, 898, 1, 2680, 2891, 2806, 497, 896, - /* 2120 */ 135, 2842, 900, 2844, 2845, 895, 864, 872, 883, 2892, - /* 2130 */ 919, 399, 869, 74, 2077, 2087, 865, 2954, 180, 2935, - /* 2140 */ 353, 457, 2950, 904, 2126, 2129, 902, 233, 906, 907, - /* 2150 */ 2798, 2797, 128, 400, 2793, 2518, 2792, 404, 2784, 2017, - /* 2160 */ 358, 2015, 2783, 125, 2840, 387, 882, 2891, 2775, 2774, - /* 2170 */ 921, 134, 2842, 900, 2844, 2845, 895, 1540, 1016, 883, - /* 2180 */ 2892, 919, 2790, 1017, 2789, 2781, 3074, 2780, 2954, 1018, - /* 2190 */ 189, 1013, 500, 2950, 2020, 2021, 2074, 391, 2076, 2079, - /* 2200 */ 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2088, 2089, 2090, - /* 2210 */ 892, 885, 1020, 2769, 917, 916, 881, 2111, 2112, 2768, - /* 2220 */ 2787, 2786, 2118, 2120, 2121, 2122, 2123, 2125, 2, 60, - /* 2230 */ 58, 2778, 2777, 2766, 2765, 390, 2763, 506, 2762, 2016, - /* 2240 */ 2569, 65, 476, 454, 427, 782, 440, 455, 524, 438, - /* 2250 */ 428, 2841, 406, 2014, 408, 2124, 2758, 2757, 2756, 98, - /* 2260 */ 2751, 542, 543, 1967, 1968, 547, 897, 237, 2749, 549, - /* 2270 */ 550, 551, 1966, 2748, 2747, 463, 2745, 557, 2744, 559, - /* 2280 */ 2743, 561, 2742, 563, 1954, 2718, 241, 2717, 2119, 243, - /* 2290 */ 1913, 884, 99, 1912, 2695, 2694, 2859, 2693, 575, 576, - /* 2300 */ 2692, 2691, 2022, 2635, 580, 1849, 2632, 583, 2631, 2625, - /* 2310 */ 2622, 586, 2806, 246, 896, 248, 102, 2620, 587, 2621, - /* 2320 */ 2619, 2624, 2623, 2618, 2617, 2615, 2614, 449, 448, 2613, - /* 2330 */ 2612, 2610, 1021, 2841, 603, 15, 250, 513, 605, 2609, - /* 2340 */ 2608, 2607, 2606, 2630, 2605, 2604, 2603, 2628, 897, 2611, - /* 2350 */ 2602, 522, 2601, 2124, 2600, 2598, 2597, 2596, 2595, 2840, - /* 2360 */ 2594, 2593, 2891, 252, 2592, 108, 134, 2842, 900, 2844, - /* 2370 */ 2845, 895, 2127, 2128, 883, 2892, 919, 2591, 2859, 257, - /* 2380 */ 2582, 2927, 2590, 2954, 2589, 2587, 2119, 500, 2950, 2586, - /* 2390 */ 2660, 2629, 2627, 2585, 2806, 2584, 896, 1855, 2583, 643, - /* 2400 */ 2581, 645, 2580, 2578, 2406, 1696, 260, 2405, 1700, 261, - /* 2410 */ 1692, 2077, 2087, 2404, 451, 452, 2403, 2401, 2398, 263, - /* 2420 */ 665, 2126, 2129, 663, 264, 664, 2397, 668, 2390, 672, - /* 2430 */ 667, 2377, 669, 671, 2365, 675, 2017, 677, 2015, 2364, - /* 2440 */ 673, 2840, 679, 882, 2891, 2347, 1569, 212, 134, 2842, - /* 2450 */ 900, 2844, 2845, 895, 94, 266, 883, 2892, 919, 2346, - /* 2460 */ 2826, 2716, 223, 876, 268, 2954, 687, 95, 2712, 500, - /* 2470 */ 2950, 2020, 2021, 2074, 2702, 2076, 2079, 2080, 2081, 2082, - /* 2480 */ 2083, 2084, 2085, 2086, 2088, 2089, 2090, 892, 885, 784, - /* 2490 */ 2690, 917, 916, 881, 2111, 2112, 275, 2689, 277, 2118, - /* 2500 */ 2120, 2121, 2122, 2123, 2125, 2, 280, 1024, 2666, 282, - /* 2510 */ 2659, 2493, 1622, 2400, 2396, 2841, 708, 709, 2394, 710, - /* 2520 */ 712, 713, 714, 2392, 717, 716, 393, 718, 2389, 720, - /* 2530 */ 897, 722, 2372, 721, 2007, 2370, 1983, 2371, 2369, 2366, - /* 2540 */ 728, 1012, 1010, 2343, 2495, 221, 1779, 290, 86, 2494, - /* 2550 */ 2387, 1780, 1682, 1681, 1006, 1002, 998, 994, 1680, 388, - /* 2560 */ 2859, 1677, 1675, 1673, 981, 1672, 983, 515, 514, 2008, - /* 2570 */ 1671, 2385, 1670, 481, 1664, 482, 2806, 1669, 896, 2376, - /* 2580 */ 483, 1666, 1665, 1663, 2374, 484, 2342, 2341, 2340, 917, - /* 2590 */ 916, 761, 765, 2339, 2338, 767, 769, 2118, 2120, 2121, - /* 2600 */ 2122, 2123, 2125, 2337, 771, 133, 1948, 758, 1950, 141, - /* 2610 */ 361, 1947, 2715, 1952, 33, 312, 80, 2711, 69, 1919, - /* 2620 */ 1921, 2841, 2701, 2840, 792, 70, 2891, 1923, 2688, 316, - /* 2630 */ 202, 2842, 900, 2844, 2845, 895, 897, 1938, 883, 2892, - /* 2640 */ 919, 867, 793, 2687, 2841, 1898, 798, 194, 800, 1897, - /* 2650 */ 3059, 22, 17, 808, 25, 781, 811, 489, 35, 897, - /* 2660 */ 6, 2265, 7, 23, 228, 24, 2859, 216, 38, 229, - /* 2670 */ 2827, 78, 319, 2205, 26, 2280, 2239, 18, 2279, 36, - /* 2680 */ 817, 2237, 2806, 813, 896, 815, 359, 494, 873, 2859, - /* 2690 */ 2203, 342, 841, 3075, 2284, 321, 341, 2246, 203, 215, - /* 2700 */ 2283, 495, 72, 37, 336, 2806, 503, 896, 208, 2231, - /* 2710 */ 96, 2686, 2665, 2664, 2201, 311, 2285, 230, 120, 2286, - /* 2720 */ 2841, 121, 351, 2185, 2658, 2184, 343, 119, 122, 2840, - /* 2730 */ 2241, 27, 2891, 218, 349, 897, 437, 2842, 900, 2844, - /* 2740 */ 2845, 895, 82, 71, 883, 2892, 919, 11, 868, 13, - /* 2750 */ 2032, 209, 2840, 2147, 219, 2891, 352, 2067, 21, 199, - /* 2760 */ 2842, 900, 2844, 2845, 895, 2859, 862, 883, 2892, 919, - /* 2770 */ 2137, 2841, 870, 28, 29, 354, 2657, 2136, 2094, 2490, - /* 2780 */ 20, 2806, 2093, 896, 50, 932, 897, 123, 935, 938, - /* 2790 */ 941, 51, 910, 362, 2092, 2059, 16, 30, 31, 83, - /* 2800 */ 905, 903, 2106, 356, 2841, 490, 124, 129, 2299, 92, - /* 2810 */ 3013, 911, 2904, 2903, 918, 81, 2859, 924, 920, 897, - /* 2820 */ 1761, 525, 926, 386, 1758, 928, 929, 931, 2840, 1757, - /* 2830 */ 934, 2891, 2806, 1754, 896, 437, 2842, 900, 2844, 2845, - /* 2840 */ 895, 1748, 937, 883, 2892, 919, 2298, 940, 899, 2859, - /* 2850 */ 1746, 130, 131, 1774, 93, 1752, 491, 1751, 1750, 1749, - /* 2860 */ 1770, 1620, 955, 1660, 1659, 2806, 1658, 896, 1655, 2841, - /* 2870 */ 1652, 1651, 1650, 1649, 969, 1647, 1645, 1690, 1644, 2840, - /* 2880 */ 1643, 1689, 2891, 971, 897, 235, 437, 2842, 900, 2844, - /* 2890 */ 2845, 895, 2841, 1641, 883, 2892, 919, 1640, 1639, 1638, - /* 2900 */ 1637, 1636, 1635, 1686, 1684, 1632, 1631, 894, 1628, 1627, - /* 2910 */ 1626, 1625, 2840, 992, 2859, 2891, 2395, 991, 993, 430, - /* 2920 */ 2842, 900, 2844, 2845, 895, 2393, 995, 883, 2892, 919, - /* 2930 */ 2806, 997, 896, 996, 2391, 999, 1000, 2859, 1001, 2388, - /* 2940 */ 1003, 1004, 1005, 2368, 1007, 2363, 1009, 2362, 1011, 2336, - /* 2950 */ 1558, 1541, 1015, 2806, 1546, 896, 1548, 392, 1019, 1022, - /* 2960 */ 2841, 2302, 2018, 405, 1023, 2302, 2302, 2302, 2302, 2302, - /* 2970 */ 2302, 2302, 2302, 831, 2302, 897, 2302, 2840, 2302, 2302, - /* 2980 */ 2891, 2302, 2302, 2302, 202, 2842, 900, 2844, 2845, 895, - /* 2990 */ 2302, 2302, 883, 2892, 919, 2302, 2302, 2302, 2302, 2302, - /* 3000 */ 2840, 2302, 2302, 2891, 2302, 2859, 2302, 436, 2842, 900, - /* 3010 */ 2844, 2845, 895, 2302, 2302, 883, 2892, 919, 2302, 2920, - /* 3020 */ 2302, 2806, 2302, 896, 2302, 2841, 2302, 289, 2302, 2302, - /* 3030 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3040 */ 897, 2302, 2302, 729, 2302, 504, 206, 3076, 2302, 2302, - /* 3050 */ 2302, 2302, 2841, 2302, 2302, 723, 719, 715, 711, 2302, - /* 3060 */ 288, 2302, 2302, 2302, 2302, 2302, 2302, 897, 2840, 2302, - /* 3070 */ 2859, 2891, 2302, 2302, 2302, 437, 2842, 900, 2844, 2845, - /* 3080 */ 895, 2302, 2302, 883, 2892, 919, 2806, 2302, 896, 2302, - /* 3090 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2859, 2302, 2302, - /* 3100 */ 2302, 2302, 2302, 2302, 2302, 2302, 286, 2302, 2302, 2302, - /* 3110 */ 499, 285, 2302, 2806, 2302, 896, 2302, 2302, 2302, 2302, - /* 3120 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3130 */ 2302, 2302, 2302, 2840, 2302, 2302, 2891, 505, 2841, 2302, - /* 3140 */ 422, 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, - /* 3150 */ 919, 2302, 2302, 897, 2302, 2302, 2302, 2302, 2841, 2302, - /* 3160 */ 2840, 2302, 2302, 2891, 2302, 2302, 2302, 437, 2842, 900, - /* 3170 */ 2844, 2845, 895, 897, 2302, 883, 2892, 919, 272, 2841, - /* 3180 */ 2302, 2302, 2302, 2859, 2302, 2302, 2302, 283, 2302, 2302, - /* 3190 */ 2302, 274, 281, 2302, 897, 2302, 2302, 279, 697, 2806, - /* 3200 */ 2302, 896, 2302, 2859, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3210 */ 2302, 2302, 2302, 2302, 2302, 2302, 271, 2302, 2302, 2806, - /* 3220 */ 2302, 896, 2302, 507, 2859, 2302, 2302, 2302, 2302, 2302, - /* 3230 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3240 */ 2806, 2302, 896, 2302, 2302, 2302, 2840, 2302, 2302, 2891, - /* 3250 */ 2302, 2302, 2302, 437, 2842, 900, 2844, 2845, 895, 2302, - /* 3260 */ 2302, 883, 2892, 919, 2302, 2302, 2840, 2302, 2302, 2891, - /* 3270 */ 2302, 2302, 2302, 418, 2842, 900, 2844, 2845, 895, 2302, - /* 3280 */ 2302, 883, 2892, 919, 2302, 2841, 2302, 777, 2302, 2302, - /* 3290 */ 2891, 2302, 2302, 2302, 432, 2842, 900, 2844, 2845, 895, - /* 3300 */ 897, 2302, 883, 2892, 919, 2841, 2302, 2302, 2302, 2302, - /* 3310 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3320 */ 897, 2302, 2302, 2302, 2302, 2841, 2302, 2302, 2302, 2302, - /* 3330 */ 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3340 */ 897, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, - /* 3350 */ 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3360 */ 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, - /* 3370 */ 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3380 */ 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, - /* 3390 */ 2302, 2302, 2302, 2840, 2302, 2302, 2891, 2302, 2302, 2302, - /* 3400 */ 414, 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, - /* 3410 */ 919, 2302, 2841, 2840, 2302, 2302, 2891, 2302, 2302, 2302, - /* 3420 */ 410, 2842, 900, 2844, 2845, 895, 2302, 897, 883, 2892, - /* 3430 */ 919, 2302, 2302, 2840, 2302, 2302, 2891, 2302, 2841, 2302, - /* 3440 */ 411, 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, - /* 3450 */ 919, 2302, 2302, 897, 2302, 2302, 2302, 2859, 2302, 2302, - /* 3460 */ 2302, 2841, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3470 */ 2302, 2302, 2302, 2806, 2302, 896, 897, 2302, 2302, 2302, - /* 3480 */ 2302, 2841, 2302, 2859, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3490 */ 2302, 2302, 2302, 2302, 2302, 2302, 897, 2302, 2302, 2806, - /* 3500 */ 2302, 896, 2302, 2841, 2302, 2302, 2859, 2302, 2302, 2302, - /* 3510 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 897, 2302, - /* 3520 */ 2840, 2302, 2806, 2891, 896, 2302, 2859, 415, 2842, 900, - /* 3530 */ 2844, 2845, 895, 2302, 2302, 883, 2892, 919, 2302, 2302, - /* 3540 */ 2302, 2302, 2806, 2302, 896, 2302, 2840, 2302, 2859, 2891, - /* 3550 */ 2302, 2302, 2302, 429, 2842, 900, 2844, 2845, 895, 2302, - /* 3560 */ 2302, 883, 2892, 919, 2806, 2302, 896, 2302, 2841, 2840, - /* 3570 */ 2302, 2302, 2891, 2302, 2302, 2302, 416, 2842, 900, 2844, - /* 3580 */ 2845, 895, 2302, 897, 883, 2892, 919, 2841, 2302, 2840, - /* 3590 */ 2302, 2302, 2891, 2302, 2302, 2302, 417, 2842, 900, 2844, - /* 3600 */ 2845, 895, 897, 2302, 883, 2892, 919, 2302, 2302, 2841, - /* 3610 */ 2302, 2840, 2302, 2859, 2891, 2302, 2302, 2302, 433, 2842, - /* 3620 */ 900, 2844, 2845, 895, 897, 2302, 883, 2892, 919, 2806, - /* 3630 */ 2302, 896, 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3640 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, - /* 3650 */ 896, 2302, 2302, 2302, 2859, 2302, 2302, 2302, 2302, 2302, - /* 3660 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3670 */ 2806, 2302, 896, 2302, 2841, 2302, 2840, 2302, 2302, 2891, - /* 3680 */ 2302, 2302, 2302, 419, 2842, 900, 2844, 2845, 895, 897, - /* 3690 */ 2302, 883, 2892, 919, 2302, 2840, 2302, 2302, 2891, 2302, - /* 3700 */ 2302, 2302, 434, 2842, 900, 2844, 2845, 895, 2302, 2302, - /* 3710 */ 883, 2892, 919, 2302, 2302, 2302, 2302, 2840, 2302, 2859, - /* 3720 */ 2891, 2302, 2302, 2841, 420, 2842, 900, 2844, 2845, 895, - /* 3730 */ 2302, 2302, 883, 2892, 919, 2806, 2302, 896, 897, 2302, - /* 3740 */ 2302, 2302, 2302, 2841, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3750 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 897, 2302, - /* 3760 */ 2302, 2302, 2302, 2841, 2302, 2302, 2302, 2302, 2859, 2302, - /* 3770 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 897, 2302, - /* 3780 */ 2302, 2302, 2840, 2302, 2806, 2891, 896, 2302, 2859, 435, - /* 3790 */ 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, 919, - /* 3800 */ 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, 2859, 2302, - /* 3810 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3820 */ 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, 2302, 2302, - /* 3830 */ 2302, 2840, 2302, 2302, 2891, 2302, 2302, 2302, 421, 2842, - /* 3840 */ 900, 2844, 2845, 895, 2302, 2302, 883, 2892, 919, 2302, - /* 3850 */ 2841, 2840, 2302, 2302, 2891, 2302, 2302, 2302, 412, 2842, - /* 3860 */ 900, 2844, 2845, 895, 2302, 897, 883, 2892, 919, 2841, - /* 3870 */ 2302, 2840, 2302, 2302, 2891, 2302, 2302, 2302, 423, 2842, - /* 3880 */ 900, 2844, 2845, 895, 897, 2302, 883, 2892, 919, 2841, - /* 3890 */ 2302, 2302, 2302, 2302, 2302, 2859, 2302, 2302, 2302, 2302, - /* 3900 */ 2302, 2302, 2302, 2302, 897, 2302, 2302, 2302, 2302, 2302, - /* 3910 */ 2302, 2806, 2302, 896, 2859, 2302, 2302, 2302, 2302, 2302, - /* 3920 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3930 */ 2806, 2302, 896, 2302, 2859, 2302, 2302, 2302, 2302, 2302, - /* 3940 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 3950 */ 2806, 2302, 896, 2302, 2302, 2302, 2841, 2302, 2840, 2302, - /* 3960 */ 2302, 2891, 2302, 2302, 2302, 424, 2842, 900, 2844, 2845, - /* 3970 */ 895, 897, 2302, 883, 2892, 919, 2841, 2840, 2302, 2302, - /* 3980 */ 2891, 2302, 2302, 2302, 425, 2842, 900, 2844, 2845, 895, - /* 3990 */ 2302, 897, 883, 2892, 919, 2841, 2302, 2840, 2302, 2302, - /* 4000 */ 2891, 2859, 2302, 2302, 426, 2842, 900, 2844, 2845, 895, - /* 4010 */ 897, 2302, 883, 2892, 919, 2302, 2302, 2806, 2302, 896, - /* 4020 */ 2302, 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 4030 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, - /* 4040 */ 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 4050 */ 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, - /* 4060 */ 2302, 2302, 2302, 2841, 2840, 2302, 2302, 2891, 2302, 2302, - /* 4070 */ 2302, 442, 2842, 900, 2844, 2845, 895, 2302, 897, 883, - /* 4080 */ 2892, 919, 2841, 2302, 2840, 2302, 2302, 2891, 2302, 2302, - /* 4090 */ 2302, 443, 2842, 900, 2844, 2845, 895, 897, 2302, 883, - /* 4100 */ 2892, 919, 2302, 2840, 2302, 2302, 2891, 2302, 2859, 2302, - /* 4110 */ 2853, 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, - /* 4120 */ 919, 2302, 2302, 2302, 2806, 2302, 896, 2859, 2302, 2302, - /* 4130 */ 2302, 2841, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 4140 */ 2302, 2302, 2302, 2806, 2302, 896, 897, 2302, 2302, 2302, - /* 4150 */ 2302, 2841, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 4160 */ 2302, 2302, 2302, 2302, 2302, 2302, 897, 2302, 2302, 2302, - /* 4170 */ 2302, 2840, 2302, 2302, 2891, 2302, 2859, 2302, 2852, 2842, - /* 4180 */ 900, 2844, 2845, 895, 2302, 2302, 883, 2892, 919, 2302, - /* 4190 */ 2840, 2302, 2806, 2891, 896, 2302, 2859, 2851, 2842, 900, - /* 4200 */ 2844, 2845, 895, 2302, 2302, 883, 2892, 919, 2302, 2302, - /* 4210 */ 2302, 2302, 2806, 2302, 896, 2302, 2302, 2302, 2302, 2841, - /* 4220 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 4230 */ 2302, 2302, 2302, 2302, 897, 2302, 2302, 2302, 2302, 2840, - /* 4240 */ 2302, 2302, 2891, 2841, 2302, 2302, 459, 2842, 900, 2844, - /* 4250 */ 2845, 895, 2302, 2302, 883, 2892, 919, 2302, 897, 2840, - /* 4260 */ 2302, 2302, 2891, 2302, 2859, 2302, 460, 2842, 900, 2844, - /* 4270 */ 2845, 895, 2302, 2302, 883, 2892, 919, 2302, 2302, 2302, - /* 4280 */ 2806, 2302, 896, 2302, 2302, 2302, 2302, 2302, 2859, 2302, - /* 4290 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 4300 */ 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, 2302, 2302, - /* 4310 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 4320 */ 2302, 2302, 2302, 2302, 2302, 2841, 2302, 2840, 2302, 2302, - /* 4330 */ 2891, 2302, 2302, 2302, 456, 2842, 900, 2844, 2845, 895, - /* 4340 */ 897, 2302, 883, 2892, 919, 2302, 2302, 2302, 2302, 2841, - /* 4350 */ 2302, 2840, 2302, 2302, 2891, 2302, 2302, 2302, 461, 2842, - /* 4360 */ 900, 2844, 2845, 895, 897, 2302, 883, 2892, 919, 2302, - /* 4370 */ 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 4380 */ 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, - /* 4390 */ 2302, 2302, 2302, 2302, 2859, 2302, 2302, 2302, 2302, 2302, - /* 4400 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 4410 */ 2806, 2302, 896, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 4420 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, - /* 4430 */ 2302, 2302, 2302, 898, 2302, 2302, 2891, 2302, 2302, 2302, - /* 4440 */ 432, 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, - /* 4450 */ 919, 2302, 2302, 2302, 2302, 2302, 2302, 2840, 2302, 2302, - /* 4460 */ 2891, 2302, 2302, 2302, 431, 2842, 900, 2844, 2845, 895, - /* 4470 */ 2302, 2302, 883, 2892, 919, + /* 0 */ 839, 683, 3063, 2678, 684, 2354, 113, 2510, 3058, 678, + /* 10 */ 3058, 2820, 60, 58, 225, 59, 57, 56, 55, 54, + /* 20 */ 506, 2307, 2019, 2676, 901, 471, 838, 231, 224, 3062, + /* 30 */ 2820, 3059, 840, 3059, 3061, 2514, 2017, 2803, 2127, 2402, + /* 40 */ 523, 2824, 151, 2845, 2568, 150, 149, 148, 147, 146, + /* 50 */ 145, 144, 143, 142, 196, 851, 170, 914, 854, 680, + /* 60 */ 2824, 53, 52, 526, 2523, 59, 57, 56, 55, 54, + /* 70 */ 512, 2122, 151, 2048, 884, 150, 149, 148, 147, 146, + /* 80 */ 145, 144, 143, 142, 919, 2025, 914, 2678, 2863, 53, + /* 90 */ 52, 2826, 2829, 59, 57, 56, 55, 54, 957, 691, + /* 100 */ 512, 498, 684, 2354, 2810, 919, 896, 2675, 901, 2044, + /* 110 */ 2826, 2828, 501, 2763, 919, 1022, 851, 170, 61, 991, + /* 120 */ 990, 989, 988, 536, 919, 987, 986, 175, 981, 980, + /* 130 */ 979, 978, 977, 976, 975, 174, 969, 968, 967, 535, + /* 140 */ 534, 964, 963, 962, 211, 210, 961, 531, 960, 959, + /* 150 */ 958, 2844, 2804, 2525, 2895, 2130, 2131, 127, 134, 2846, + /* 160 */ 900, 2848, 2849, 895, 45, 355, 883, 2896, 919, 914, + /* 170 */ 802, 772, 1594, 213, 1593, 2958, 2045, 251, 3058, 500, + /* 180 */ 2954, 207, 2966, 850, 63, 162, 849, 766, 166, 770, + /* 190 */ 768, 303, 302, 3058, 2080, 2090, 3064, 231, 829, 232, + /* 200 */ 785, 3059, 840, 3063, 2129, 2132, 528, 3005, 75, 2574, + /* 210 */ 2576, 838, 231, 1595, 782, 512, 3059, 840, 914, 2020, + /* 220 */ 2047, 2018, 824, 107, 197, 9, 882, 2223, 106, 919, + /* 230 */ 53, 52, 2452, 2044, 59, 57, 56, 55, 54, 676, + /* 240 */ 64, 853, 200, 2966, 2967, 699, 168, 2971, 674, 227, + /* 250 */ 318, 670, 666, 581, 2023, 2024, 2077, 2845, 2079, 2082, + /* 260 */ 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2091, 2092, 2093, + /* 270 */ 892, 885, 894, 307, 917, 916, 881, 2114, 2115, 2116, + /* 280 */ 2117, 2118, 2121, 2123, 2124, 2125, 2126, 2128, 2, 60, + /* 290 */ 58, 2219, 2296, 2845, 445, 105, 2042, 506, 2306, 2019, + /* 300 */ 458, 118, 2863, 625, 644, 642, 469, 441, 897, 2049, + /* 310 */ 245, 1892, 1893, 2017, 646, 2127, 63, 79, 2810, 2289, + /* 320 */ 896, 2620, 160, 159, 158, 157, 156, 155, 154, 153, + /* 330 */ 152, 466, 468, 604, 2750, 648, 828, 220, 2863, 2194, + /* 340 */ 446, 606, 830, 825, 818, 814, 810, 2138, 2122, 2678, + /* 350 */ 2157, 884, 584, 2044, 2810, 19, 896, 3062, 1946, 1947, + /* 360 */ 1891, 1894, 2025, 508, 2651, 2844, 2863, 2329, 2895, 2675, + /* 370 */ 901, 2028, 436, 2846, 900, 2848, 2849, 895, 893, 339, + /* 380 */ 883, 2896, 919, 874, 2923, 954, 187, 186, 951, 950, + /* 390 */ 949, 184, 1022, 467, 2048, 15, 337, 2044, 851, 170, + /* 400 */ 1698, 2844, 2254, 339, 2895, 592, 518, 2081, 134, 2846, + /* 410 */ 900, 2848, 2849, 895, 1697, 2158, 883, 2896, 919, 558, + /* 420 */ 2603, 172, 2295, 181, 2929, 2958, 533, 532, 2810, 500, + /* 430 */ 2954, 75, 2130, 2131, 2077, 339, 2658, 2637, 827, 634, + /* 440 */ 633, 631, 630, 629, 624, 623, 622, 621, 450, 702, + /* 450 */ 2026, 611, 610, 609, 608, 607, 601, 600, 599, 510, + /* 460 */ 594, 593, 465, 2045, 706, 220, 585, 1853, 1854, 2078, + /* 470 */ 220, 2080, 2090, 1872, 821, 820, 2252, 2253, 2255, 2256, + /* 480 */ 2257, 2129, 2132, 2978, 2191, 2192, 2193, 2978, 2978, 2978, + /* 490 */ 2978, 2978, 2651, 649, 2163, 618, 2020, 2652, 2018, 41, + /* 500 */ 617, 688, 2044, 882, 956, 53, 52, 685, 616, 59, + /* 510 */ 57, 56, 55, 54, 44, 502, 2152, 2153, 2154, 2155, + /* 520 */ 2156, 2160, 2161, 2162, 140, 2966, 2967, 2081, 168, 2971, + /* 530 */ 2754, 2023, 2024, 2077, 2845, 2079, 2082, 2083, 2084, 2085, + /* 540 */ 2086, 2087, 2088, 2089, 2091, 2092, 2093, 892, 885, 854, + /* 550 */ 3063, 917, 916, 881, 2114, 2115, 2031, 562, 3058, 2121, + /* 560 */ 2123, 2124, 2125, 2126, 2128, 2, 60, 58, 2845, 2194, + /* 570 */ 2019, 1865, 1866, 75, 506, 700, 2019, 3062, 620, 2863, + /* 580 */ 222, 3059, 3060, 897, 2017, 564, 560, 546, 1750, 2078, + /* 590 */ 2017, 1988, 2127, 619, 205, 2810, 332, 896, 1789, 1790, + /* 600 */ 75, 2328, 1563, 1741, 946, 945, 944, 1745, 943, 1747, + /* 610 */ 1748, 942, 939, 2863, 1756, 936, 1758, 1759, 933, 930, + /* 620 */ 927, 1570, 517, 516, 786, 2122, 339, 887, 884, 2810, + /* 630 */ 2049, 896, 19, 2025, 137, 2029, 915, 2521, 886, 2025, + /* 640 */ 701, 2671, 2844, 526, 2523, 2895, 1565, 1568, 1569, 134, + /* 650 */ 2846, 900, 2848, 2849, 895, 12, 530, 883, 2896, 919, + /* 660 */ 915, 2521, 2810, 1022, 213, 117, 2958, 590, 2647, 1022, + /* 670 */ 500, 2954, 15, 572, 971, 571, 2844, 915, 2521, 2895, + /* 680 */ 161, 2845, 521, 135, 2846, 900, 2848, 2849, 895, 731, + /* 690 */ 842, 883, 2896, 919, 487, 2725, 897, 236, 3006, 1920, + /* 700 */ 2958, 2503, 473, 2194, 2957, 2954, 570, 693, 2717, 2130, + /* 710 */ 2131, 2575, 2576, 2978, 2191, 2192, 2193, 2978, 2978, 2978, + /* 720 */ 2978, 2978, 247, 53, 52, 783, 2863, 59, 57, 56, + /* 730 */ 55, 54, 752, 751, 750, 851, 170, 915, 2521, 742, + /* 740 */ 167, 746, 2810, 2025, 896, 745, 973, 2973, 2080, 2090, + /* 750 */ 744, 749, 480, 479, 915, 2521, 743, 161, 2129, 2132, + /* 760 */ 478, 739, 738, 737, 1597, 1598, 736, 2020, 339, 2018, + /* 770 */ 915, 2521, 43, 2020, 68, 2018, 2970, 2048, 53, 52, + /* 780 */ 882, 389, 59, 57, 56, 55, 54, 267, 2047, 2844, + /* 790 */ 578, 686, 2895, 2362, 2496, 339, 199, 2846, 900, 2848, + /* 800 */ 2849, 895, 2023, 2024, 883, 2896, 919, 2304, 2023, 2024, + /* 810 */ 2077, 2845, 2079, 2082, 2083, 2084, 2085, 2086, 2087, 2088, + /* 820 */ 2089, 2091, 2092, 2093, 892, 885, 897, 176, 917, 916, + /* 830 */ 881, 2114, 2115, 947, 2265, 2044, 2121, 2123, 2124, 2125, + /* 840 */ 2126, 2128, 2, 12, 60, 58, 803, 3016, 2191, 2192, + /* 850 */ 2193, 269, 506, 195, 2019, 686, 2863, 2362, 786, 1686, + /* 860 */ 1750, 201, 2966, 2967, 2527, 168, 2971, 1987, 2017, 198, + /* 870 */ 2127, 2318, 2810, 2508, 896, 1741, 946, 945, 944, 1745, + /* 880 */ 943, 1747, 1748, 891, 890, 2581, 1756, 889, 1758, 1759, + /* 890 */ 888, 930, 927, 464, 596, 2647, 2973, 539, 520, 519, + /* 900 */ 346, 347, 538, 2122, 2579, 345, 884, 638, 1688, 396, + /* 910 */ 19, 3019, 2196, 2197, 2198, 2199, 2200, 2025, 1681, 2844, + /* 920 */ 915, 2521, 2895, 627, 2647, 2969, 135, 2846, 900, 2848, + /* 930 */ 2849, 895, 915, 2521, 883, 2896, 919, 2506, 915, 2521, + /* 940 */ 579, 788, 2717, 2958, 2845, 915, 2521, 1022, 2955, 249, + /* 950 */ 15, 2327, 598, 226, 802, 2581, 915, 2521, 612, 897, + /* 960 */ 2764, 2364, 3058, 496, 337, 613, 190, 1682, 703, 486, + /* 970 */ 2725, 409, 533, 532, 2579, 256, 614, 1594, 254, 1593, + /* 980 */ 3064, 231, 2033, 2581, 839, 3059, 840, 2130, 2131, 2863, + /* 990 */ 407, 89, 3058, 395, 88, 2326, 2026, 12, 2127, 10, + /* 1000 */ 637, 255, 858, 470, 2495, 2810, 314, 896, 447, 2081, + /* 1010 */ 838, 231, 2810, 2049, 635, 3059, 840, 802, 1595, 402, + /* 1020 */ 265, 661, 659, 656, 654, 3058, 2080, 2090, 2665, 974, + /* 1030 */ 704, 2122, 2478, 1702, 53, 52, 2129, 2132, 59, 57, + /* 1040 */ 56, 55, 54, 3064, 231, 2025, 2581, 1701, 3059, 840, + /* 1050 */ 91, 2020, 2844, 2018, 511, 2895, 2810, 2048, 882, 134, + /* 1060 */ 2846, 900, 2848, 2849, 895, 2579, 75, 883, 2896, 919, + /* 1070 */ 875, 2078, 2930, 2325, 3078, 879, 2958, 56, 55, 54, + /* 1080 */ 500, 2954, 14, 13, 574, 1570, 2023, 2024, 2077, 573, + /* 1090 */ 2079, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2091, + /* 1100 */ 2092, 2093, 892, 885, 104, 76, 917, 916, 881, 2114, + /* 1110 */ 2115, 1568, 1569, 2324, 2121, 2123, 2124, 2125, 2126, 2128, + /* 1120 */ 2, 60, 58, 2133, 915, 2521, 651, 2323, 2525, 506, + /* 1130 */ 2322, 2019, 53, 52, 2810, 2370, 59, 57, 56, 55, + /* 1140 */ 54, 802, 306, 775, 705, 2017, 305, 2127, 171, 3058, + /* 1150 */ 759, 2929, 954, 187, 186, 951, 950, 949, 184, 101, + /* 1160 */ 100, 577, 915, 2521, 244, 773, 509, 3064, 231, 2492, + /* 1170 */ 2321, 40, 3059, 840, 2810, 2319, 195, 569, 567, 2034, + /* 1180 */ 2122, 2029, 2516, 884, 304, 725, 724, 2526, 2810, 444, + /* 1190 */ 2405, 2810, 556, 1009, 2025, 552, 548, 544, 541, 570, + /* 1200 */ 2171, 53, 52, 762, 2246, 59, 57, 56, 55, 54, + /* 1210 */ 756, 754, 915, 2521, 2037, 2039, 948, 301, 2247, 2572, + /* 1220 */ 116, 2845, 727, 726, 1022, 453, 34, 61, 485, 2581, + /* 1230 */ 774, 2810, 309, 234, 917, 916, 897, 527, 3013, 748, + /* 1240 */ 747, 2320, 2121, 2123, 2124, 2125, 2126, 2128, 2579, 915, + /* 1250 */ 2521, 53, 52, 915, 2521, 59, 57, 56, 55, 54, + /* 1260 */ 2216, 339, 2453, 85, 2130, 2131, 2863, 2245, 84, 317, + /* 1270 */ 752, 751, 750, 857, 2044, 205, 809, 742, 167, 746, + /* 1280 */ 97, 801, 2810, 745, 896, 915, 2521, 2317, 744, 749, + /* 1290 */ 480, 479, 822, 2049, 743, 915, 2521, 173, 478, 739, + /* 1300 */ 738, 737, 2810, 2080, 2090, 350, 915, 2521, 2511, 877, + /* 1310 */ 833, 2930, 2266, 2129, 2132, 871, 553, 954, 187, 186, + /* 1320 */ 951, 950, 949, 184, 126, 776, 357, 2316, 2020, 2844, + /* 1330 */ 2018, 2159, 2895, 985, 983, 882, 134, 2846, 900, 2848, + /* 1340 */ 2849, 895, 2581, 238, 883, 2896, 919, 952, 2810, 2592, + /* 1350 */ 2572, 3078, 2512, 2958, 2493, 2315, 403, 500, 2954, 2314, + /* 1360 */ 2558, 866, 2241, 2023, 2024, 2077, 2845, 2079, 2082, 2083, + /* 1370 */ 2084, 2085, 2086, 2087, 2088, 2089, 2091, 2092, 2093, 892, + /* 1380 */ 885, 897, 2205, 917, 916, 881, 2114, 2115, 2810, 915, + /* 1390 */ 2521, 2121, 2123, 2124, 2125, 2126, 2128, 2, 60, 58, + /* 1400 */ 2845, 915, 2521, 915, 2521, 2313, 506, 2312, 2019, 908, + /* 1410 */ 2164, 2863, 915, 2521, 2311, 897, 2810, 3026, 396, 2310, + /* 1420 */ 2810, 909, 2017, 913, 2127, 73, 2309, 2810, 185, 896, + /* 1430 */ 42, 956, 385, 53, 52, 2973, 799, 59, 57, 56, + /* 1440 */ 55, 54, 53, 52, 529, 2863, 59, 57, 56, 55, + /* 1450 */ 54, 2581, 953, 1572, 195, 2572, 2630, 2122, 735, 2043, + /* 1460 */ 884, 2810, 734, 896, 2968, 2526, 2810, 113, 2810, 2583, + /* 1470 */ 2580, 2025, 2731, 294, 2844, 2810, 292, 2895, 177, 2726, + /* 1480 */ 2810, 413, 2846, 900, 2848, 2849, 895, 2810, 32, 883, + /* 1490 */ 2896, 919, 196, 2334, 1015, 3, 2515, 333, 2845, 843, + /* 1500 */ 588, 1022, 2524, 846, 61, 2112, 922, 632, 2844, 66, + /* 1510 */ 2078, 2895, 2027, 897, 67, 134, 2846, 900, 2848, 2849, + /* 1520 */ 895, 163, 177, 883, 2896, 919, 296, 852, 298, 295, + /* 1530 */ 3078, 297, 2958, 185, 308, 103, 500, 2954, 2389, 740, + /* 1540 */ 741, 2130, 2131, 2863, 2104, 300, 2298, 2299, 299, 325, + /* 1550 */ 53, 52, 812, 2235, 59, 57, 56, 55, 54, 2810, + /* 1560 */ 753, 896, 1679, 1677, 1936, 14, 13, 165, 53, 52, + /* 1570 */ 880, 2215, 59, 57, 56, 55, 54, 2864, 53, 52, + /* 1580 */ 2080, 2090, 59, 57, 56, 55, 54, 2444, 1658, 47, + /* 1590 */ 2129, 2132, 53, 52, 62, 62, 59, 57, 56, 55, + /* 1600 */ 54, 132, 214, 129, 62, 2020, 2844, 2018, 1944, 2895, + /* 1610 */ 2387, 2378, 882, 134, 2846, 900, 2848, 2849, 895, 856, + /* 1620 */ 344, 883, 2896, 919, 364, 363, 2831, 647, 2933, 2443, + /* 1630 */ 2958, 2355, 755, 757, 500, 2954, 2376, 1659, 2239, 3009, + /* 1640 */ 2023, 2024, 2077, 819, 2079, 2082, 2083, 2084, 2085, 2086, + /* 1650 */ 2087, 2088, 2089, 2091, 2092, 2093, 892, 885, 760, 492, + /* 1660 */ 917, 916, 881, 2114, 2115, 488, 90, 62, 2121, 2123, + /* 1670 */ 2124, 2125, 2126, 2128, 2, 60, 58, 2845, 77, 2100, + /* 1680 */ 2251, 2250, 779, 506, 826, 2019, 62, 860, 323, 2102, + /* 1690 */ 2113, 62, 897, 2833, 816, 366, 365, 2030, 46, 2017, + /* 1700 */ 62, 2127, 2656, 2105, 90, 537, 348, 53, 52, 555, + /* 1710 */ 39, 59, 57, 56, 55, 54, 2361, 923, 2569, 53, + /* 1720 */ 52, 795, 2863, 59, 57, 56, 55, 54, 2845, 87, + /* 1730 */ 368, 367, 370, 369, 2122, 372, 371, 884, 2810, 802, + /* 1740 */ 896, 182, 163, 897, 3010, 185, 2149, 3058, 2025, 374, + /* 1750 */ 373, 965, 863, 2103, 376, 375, 378, 377, 48, 380, + /* 1760 */ 379, 382, 381, 925, 2165, 3064, 231, 384, 383, 183, + /* 1770 */ 3059, 840, 2106, 2863, 1650, 966, 185, 2094, 1022, 3020, + /* 1780 */ 335, 61, 834, 835, 1631, 2844, 1889, 330, 2895, 2810, + /* 1790 */ 1879, 896, 134, 2846, 900, 2848, 2849, 895, 1648, 164, + /* 1800 */ 883, 2896, 919, 2657, 844, 338, 2479, 3078, 540, 2958, + /* 1810 */ 847, 182, 5, 500, 2954, 401, 53, 52, 2130, 2131, + /* 1820 */ 59, 57, 56, 55, 54, 545, 462, 360, 912, 2042, + /* 1830 */ 2099, 1732, 554, 1632, 2052, 566, 2844, 565, 239, 2895, + /* 1840 */ 1913, 582, 240, 135, 2846, 900, 2848, 2849, 895, 1763, + /* 1850 */ 568, 883, 2896, 919, 394, 1771, 242, 2080, 2090, 2043, + /* 1860 */ 2958, 589, 1778, 253, 878, 2954, 591, 2129, 2132, 53, + /* 1870 */ 52, 597, 595, 59, 57, 56, 55, 54, 640, 602, + /* 1880 */ 615, 2649, 2020, 628, 2018, 1776, 53, 52, 626, 882, + /* 1890 */ 59, 57, 56, 55, 54, 636, 639, 188, 652, 477, + /* 1900 */ 475, 641, 650, 653, 259, 258, 657, 655, 658, 262, + /* 1910 */ 660, 662, 2050, 681, 4, 682, 689, 2023, 2024, 2077, + /* 1920 */ 692, 2079, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, + /* 1930 */ 2091, 2092, 2093, 892, 885, 690, 270, 917, 916, 881, + /* 1940 */ 2114, 2115, 2045, 787, 109, 2121, 2123, 2124, 2125, 2126, + /* 1950 */ 2128, 2, 60, 58, 694, 273, 2051, 695, 2053, 696, + /* 1960 */ 506, 276, 2019, 698, 855, 278, 2054, 2672, 110, 2055, + /* 1970 */ 1730, 49, 2666, 111, 2845, 730, 2017, 284, 2127, 707, + /* 1980 */ 2101, 112, 474, 472, 114, 733, 2740, 287, 763, 897, + /* 1990 */ 764, 3051, 2737, 732, 2509, 139, 291, 2098, 439, 778, + /* 2000 */ 802, 2736, 2505, 780, 138, 2845, 735, 115, 3058, 178, + /* 2010 */ 734, 2122, 2046, 397, 884, 293, 191, 136, 2507, 2863, + /* 2020 */ 897, 802, 2502, 192, 2718, 2025, 3064, 231, 193, 3058, + /* 2030 */ 310, 3059, 840, 791, 789, 2810, 790, 896, 794, 315, + /* 2040 */ 823, 313, 3025, 796, 797, 806, 861, 3064, 231, 3024, + /* 2050 */ 2863, 832, 3059, 840, 8, 1022, 2845, 2997, 61, 204, + /* 2060 */ 807, 320, 326, 322, 324, 805, 2810, 804, 896, 837, + /* 2070 */ 327, 897, 328, 2990, 329, 836, 493, 2977, 331, 848, + /* 2080 */ 334, 3081, 2844, 845, 3057, 2895, 169, 2047, 2213, 134, + /* 2090 */ 2846, 900, 2848, 2849, 895, 2130, 2131, 883, 2896, 919, + /* 2100 */ 2211, 2863, 2974, 217, 3078, 340, 2958, 179, 398, 859, + /* 2110 */ 500, 2954, 2686, 898, 1, 2685, 2895, 2810, 2684, 896, + /* 2120 */ 135, 2846, 900, 2848, 2849, 895, 497, 399, 883, 2896, + /* 2130 */ 919, 864, 180, 869, 2080, 2090, 865, 2958, 872, 353, + /* 2140 */ 74, 457, 2954, 233, 2129, 2132, 2939, 902, 906, 400, + /* 2150 */ 904, 2802, 907, 2801, 358, 2797, 2796, 2788, 125, 2020, + /* 2160 */ 2522, 2018, 128, 2787, 2844, 387, 882, 2895, 1542, 2779, + /* 2170 */ 921, 134, 2846, 900, 2848, 2849, 895, 2778, 404, 883, + /* 2180 */ 2896, 919, 2794, 1018, 1019, 2793, 3078, 782, 2958, 1017, + /* 2190 */ 1014, 406, 500, 2954, 2023, 2024, 2077, 189, 2079, 2082, + /* 2200 */ 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2091, 2092, 2093, + /* 2210 */ 892, 885, 2785, 390, 917, 916, 881, 2114, 2115, 391, + /* 2220 */ 2784, 1021, 2121, 2123, 2124, 2125, 2126, 2128, 2, 60, + /* 2230 */ 58, 440, 2773, 2772, 2791, 476, 2790, 506, 2782, 2019, + /* 2240 */ 2781, 65, 2770, 2769, 2767, 2766, 427, 2573, 454, 455, + /* 2250 */ 438, 2845, 524, 2017, 428, 2127, 408, 2762, 2761, 2760, + /* 2260 */ 98, 2755, 542, 543, 1970, 547, 897, 1971, 237, 2753, + /* 2270 */ 549, 550, 551, 1969, 2752, 2751, 463, 2749, 557, 2748, + /* 2280 */ 559, 2747, 561, 2746, 563, 1957, 2722, 241, 2122, 2721, + /* 2290 */ 243, 884, 99, 1916, 1915, 2699, 2863, 2698, 2697, 575, + /* 2300 */ 576, 2696, 2025, 2695, 2639, 580, 1852, 2636, 583, 2635, + /* 2310 */ 2629, 2626, 2810, 587, 896, 246, 586, 2625, 102, 2624, + /* 2320 */ 2623, 2628, 2627, 2622, 248, 2621, 2619, 449, 448, 2618, + /* 2330 */ 2617, 250, 1022, 2845, 2616, 15, 603, 513, 605, 2614, + /* 2340 */ 2613, 2612, 2611, 2610, 2634, 2609, 2608, 2607, 897, 2632, + /* 2350 */ 2615, 522, 2606, 2127, 2605, 2604, 2602, 2601, 2600, 2844, + /* 2360 */ 2599, 2598, 2895, 2597, 252, 2596, 134, 2846, 900, 2848, + /* 2370 */ 2849, 895, 2130, 2131, 883, 2896, 919, 2595, 2863, 108, + /* 2380 */ 2594, 2931, 2593, 2958, 2591, 2590, 2122, 500, 2954, 2664, + /* 2390 */ 2633, 2631, 2589, 2588, 2810, 1858, 896, 2587, 2586, 257, + /* 2400 */ 643, 2585, 645, 2584, 2582, 1699, 2409, 260, 1703, 2408, + /* 2410 */ 1695, 2080, 2090, 2407, 451, 2406, 452, 2404, 2401, 261, + /* 2420 */ 665, 2129, 2132, 663, 263, 664, 2400, 668, 2393, 672, + /* 2430 */ 264, 667, 669, 2380, 2368, 671, 2020, 677, 2018, 2367, + /* 2440 */ 673, 2844, 2350, 882, 2895, 2830, 675, 679, 134, 2846, + /* 2450 */ 900, 2848, 2849, 895, 266, 212, 883, 2896, 919, 223, + /* 2460 */ 94, 1571, 2349, 876, 268, 2958, 2720, 2716, 95, 500, + /* 2470 */ 2954, 2023, 2024, 2077, 687, 2079, 2082, 2083, 2084, 2085, + /* 2480 */ 2086, 2087, 2088, 2089, 2091, 2092, 2093, 892, 885, 784, + /* 2490 */ 2706, 917, 916, 881, 2114, 2115, 2694, 275, 277, 2121, + /* 2500 */ 2123, 2124, 2125, 2126, 2128, 2, 2693, 1025, 280, 2670, + /* 2510 */ 282, 2663, 2497, 2403, 1624, 2845, 2399, 708, 709, 710, + /* 2520 */ 2397, 712, 713, 714, 2395, 716, 393, 717, 718, 2392, + /* 2530 */ 897, 720, 2375, 721, 2010, 722, 1986, 2373, 2374, 2372, + /* 2540 */ 2369, 1013, 1011, 728, 2346, 221, 2499, 290, 86, 1782, + /* 2550 */ 1783, 2498, 1685, 1684, 1007, 1003, 999, 995, 1683, 388, + /* 2560 */ 2863, 1680, 1678, 2390, 1676, 2388, 982, 515, 514, 2011, + /* 2570 */ 1675, 1674, 1673, 2379, 1667, 984, 2810, 1672, 896, 1669, + /* 2580 */ 481, 1668, 482, 1666, 483, 2377, 484, 2345, 2344, 917, + /* 2590 */ 916, 761, 2343, 765, 2342, 767, 2341, 2121, 2123, 2124, + /* 2600 */ 2125, 2126, 2128, 769, 2340, 133, 771, 758, 1951, 141, + /* 2610 */ 361, 1953, 1950, 1955, 2719, 33, 80, 312, 2715, 1922, + /* 2620 */ 1924, 2845, 2705, 2844, 792, 69, 2895, 70, 1926, 316, + /* 2630 */ 202, 2846, 900, 2848, 2849, 895, 897, 1941, 883, 2896, + /* 2640 */ 919, 867, 793, 2692, 2845, 781, 2691, 194, 1901, 798, + /* 2650 */ 1900, 800, 3063, 22, 808, 17, 23, 811, 6, 897, + /* 2660 */ 489, 7, 24, 216, 228, 2206, 2863, 35, 2831, 2268, + /* 2670 */ 38, 319, 229, 2242, 36, 78, 2208, 26, 2283, 336, + /* 2680 */ 2240, 2282, 2810, 494, 896, 817, 359, 813, 873, 2863, + /* 2690 */ 815, 342, 841, 3079, 2287, 203, 341, 321, 2249, 215, + /* 2700 */ 37, 2286, 495, 72, 96, 2810, 503, 896, 208, 2234, + /* 2710 */ 2204, 230, 2690, 2669, 2288, 311, 2289, 119, 25, 2188, + /* 2720 */ 2845, 120, 2187, 2668, 343, 121, 2244, 2662, 218, 2844, + /* 2730 */ 349, 122, 2895, 82, 71, 897, 437, 2846, 900, 2848, + /* 2740 */ 2849, 895, 27, 352, 883, 2896, 919, 13, 18, 209, + /* 2750 */ 868, 2140, 2844, 11, 2139, 2895, 2035, 2150, 219, 199, + /* 2760 */ 2846, 900, 2848, 2849, 895, 2863, 21, 883, 2896, 919, + /* 2770 */ 28, 2845, 29, 351, 20, 2070, 899, 50, 2661, 123, + /* 2780 */ 2097, 2810, 2096, 896, 129, 932, 897, 935, 2494, 938, + /* 2790 */ 910, 941, 51, 362, 2095, 2062, 16, 30, 31, 2302, + /* 2800 */ 862, 83, 1755, 903, 2845, 490, 356, 870, 124, 354, + /* 2810 */ 3017, 92, 911, 2908, 2907, 905, 2863, 924, 2109, 897, + /* 2820 */ 918, 81, 525, 920, 1764, 1761, 926, 928, 2844, 929, + /* 2830 */ 931, 2895, 2810, 1760, 896, 437, 2846, 900, 2848, 2849, + /* 2840 */ 895, 1757, 934, 883, 2896, 919, 937, 1751, 1749, 2863, + /* 2850 */ 940, 2301, 386, 1777, 130, 1754, 491, 1753, 1752, 131, + /* 2860 */ 1773, 93, 1622, 955, 1663, 2810, 1662, 896, 1661, 2845, + /* 2870 */ 1660, 1657, 1654, 1653, 1693, 1652, 1651, 1649, 1692, 2844, + /* 2880 */ 1640, 1647, 2895, 1646, 897, 1645, 437, 2846, 900, 2848, + /* 2890 */ 2849, 895, 2845, 235, 883, 2896, 919, 1643, 1642, 1641, + /* 2900 */ 1639, 1638, 970, 1637, 972, 1689, 1687, 894, 1634, 1633, + /* 2910 */ 1630, 1629, 2844, 1628, 2863, 2895, 1627, 2398, 992, 430, + /* 2920 */ 2846, 900, 2848, 2849, 895, 993, 2396, 883, 2896, 919, + /* 2930 */ 2810, 994, 896, 996, 997, 2394, 998, 2863, 1000, 1002, + /* 2940 */ 1001, 2391, 1004, 1005, 1006, 2371, 1008, 2366, 2365, 1010, + /* 2950 */ 1012, 1560, 2339, 2810, 1543, 896, 1016, 1548, 1550, 392, + /* 2960 */ 2845, 1020, 2305, 2305, 2021, 405, 2305, 1023, 2305, 1024, + /* 2970 */ 2305, 2305, 2305, 831, 2305, 897, 2305, 2844, 2305, 2305, + /* 2980 */ 2895, 2305, 2305, 2305, 202, 2846, 900, 2848, 2849, 895, + /* 2990 */ 2305, 2305, 883, 2896, 919, 2305, 2305, 2305, 2305, 2305, + /* 3000 */ 2844, 2305, 2305, 2895, 2305, 2863, 2305, 436, 2846, 900, + /* 3010 */ 2848, 2849, 895, 2305, 2305, 883, 2896, 919, 2305, 2924, + /* 3020 */ 2305, 2810, 2305, 896, 2305, 2845, 2305, 289, 2305, 2305, + /* 3030 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3040 */ 897, 2305, 2305, 729, 2305, 504, 206, 3080, 2305, 2305, + /* 3050 */ 2305, 2305, 2845, 2305, 2305, 723, 719, 715, 711, 2305, + /* 3060 */ 288, 2305, 2305, 2305, 2305, 2305, 2305, 897, 2844, 2305, + /* 3070 */ 2863, 2895, 2305, 2305, 2305, 437, 2846, 900, 2848, 2849, + /* 3080 */ 895, 2305, 2305, 883, 2896, 919, 2810, 2305, 896, 2305, + /* 3090 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2863, 2305, 2305, + /* 3100 */ 2305, 2305, 2305, 2305, 2305, 2305, 286, 2305, 2305, 2305, + /* 3110 */ 499, 285, 2305, 2810, 2305, 896, 2305, 2305, 2305, 2305, + /* 3120 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3130 */ 2305, 2305, 2305, 2844, 2305, 2305, 2895, 505, 2845, 2305, + /* 3140 */ 422, 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, + /* 3150 */ 919, 2305, 2305, 897, 2305, 2305, 2305, 2305, 2845, 2305, + /* 3160 */ 2844, 2305, 2305, 2895, 2305, 2305, 2305, 437, 2846, 900, + /* 3170 */ 2848, 2849, 895, 897, 2305, 883, 2896, 919, 272, 2845, + /* 3180 */ 2305, 2305, 2305, 2863, 2305, 2305, 2305, 283, 2305, 2305, + /* 3190 */ 2305, 274, 281, 2305, 897, 2305, 2305, 279, 697, 2810, + /* 3200 */ 2305, 896, 2305, 2863, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3210 */ 2305, 2305, 2305, 2305, 2305, 2305, 271, 2305, 2305, 2810, + /* 3220 */ 2305, 896, 2305, 507, 2863, 2305, 2305, 2305, 2305, 2305, + /* 3230 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3240 */ 2810, 2305, 896, 2305, 2305, 2305, 2844, 2305, 2305, 2895, + /* 3250 */ 2305, 2305, 2305, 437, 2846, 900, 2848, 2849, 895, 2305, + /* 3260 */ 2305, 883, 2896, 919, 2305, 2305, 2844, 2305, 2305, 2895, + /* 3270 */ 2305, 2305, 2305, 418, 2846, 900, 2848, 2849, 895, 2305, + /* 3280 */ 2305, 883, 2896, 919, 2305, 2845, 2305, 777, 2305, 2305, + /* 3290 */ 2895, 2305, 2305, 2305, 432, 2846, 900, 2848, 2849, 895, + /* 3300 */ 897, 2305, 883, 2896, 919, 2845, 2305, 2305, 2305, 2305, + /* 3310 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3320 */ 897, 2305, 2305, 2305, 2305, 2845, 2305, 2305, 2305, 2305, + /* 3330 */ 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3340 */ 897, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, + /* 3350 */ 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3360 */ 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, + /* 3370 */ 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3380 */ 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, + /* 3390 */ 2305, 2305, 2305, 2844, 2305, 2305, 2895, 2305, 2305, 2305, + /* 3400 */ 414, 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, + /* 3410 */ 919, 2305, 2845, 2844, 2305, 2305, 2895, 2305, 2305, 2305, + /* 3420 */ 410, 2846, 900, 2848, 2849, 895, 2305, 897, 883, 2896, + /* 3430 */ 919, 2305, 2305, 2844, 2305, 2305, 2895, 2305, 2845, 2305, + /* 3440 */ 411, 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, + /* 3450 */ 919, 2305, 2305, 897, 2305, 2305, 2305, 2863, 2305, 2305, + /* 3460 */ 2305, 2845, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3470 */ 2305, 2305, 2305, 2810, 2305, 896, 897, 2305, 2305, 2305, + /* 3480 */ 2305, 2845, 2305, 2863, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3490 */ 2305, 2305, 2305, 2305, 2305, 2305, 897, 2305, 2305, 2810, + /* 3500 */ 2305, 896, 2305, 2845, 2305, 2305, 2863, 2305, 2305, 2305, + /* 3510 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 897, 2305, + /* 3520 */ 2844, 2305, 2810, 2895, 896, 2305, 2863, 415, 2846, 900, + /* 3530 */ 2848, 2849, 895, 2305, 2305, 883, 2896, 919, 2305, 2305, + /* 3540 */ 2305, 2305, 2810, 2305, 896, 2305, 2844, 2305, 2863, 2895, + /* 3550 */ 2305, 2305, 2305, 429, 2846, 900, 2848, 2849, 895, 2305, + /* 3560 */ 2305, 883, 2896, 919, 2810, 2305, 896, 2305, 2845, 2844, + /* 3570 */ 2305, 2305, 2895, 2305, 2305, 2305, 416, 2846, 900, 2848, + /* 3580 */ 2849, 895, 2305, 897, 883, 2896, 919, 2845, 2305, 2844, + /* 3590 */ 2305, 2305, 2895, 2305, 2305, 2305, 417, 2846, 900, 2848, + /* 3600 */ 2849, 895, 897, 2305, 883, 2896, 919, 2305, 2305, 2845, + /* 3610 */ 2305, 2844, 2305, 2863, 2895, 2305, 2305, 2305, 433, 2846, + /* 3620 */ 900, 2848, 2849, 895, 897, 2305, 883, 2896, 919, 2810, + /* 3630 */ 2305, 896, 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3640 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, + /* 3650 */ 896, 2305, 2305, 2305, 2863, 2305, 2305, 2305, 2305, 2305, + /* 3660 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3670 */ 2810, 2305, 896, 2305, 2845, 2305, 2844, 2305, 2305, 2895, + /* 3680 */ 2305, 2305, 2305, 419, 2846, 900, 2848, 2849, 895, 897, + /* 3690 */ 2305, 883, 2896, 919, 2305, 2844, 2305, 2305, 2895, 2305, + /* 3700 */ 2305, 2305, 434, 2846, 900, 2848, 2849, 895, 2305, 2305, + /* 3710 */ 883, 2896, 919, 2305, 2305, 2305, 2305, 2844, 2305, 2863, + /* 3720 */ 2895, 2305, 2305, 2845, 420, 2846, 900, 2848, 2849, 895, + /* 3730 */ 2305, 2305, 883, 2896, 919, 2810, 2305, 896, 897, 2305, + /* 3740 */ 2305, 2305, 2305, 2845, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3750 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 897, 2305, + /* 3760 */ 2305, 2305, 2305, 2845, 2305, 2305, 2305, 2305, 2863, 2305, + /* 3770 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 897, 2305, + /* 3780 */ 2305, 2305, 2844, 2305, 2810, 2895, 896, 2305, 2863, 435, + /* 3790 */ 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, 919, + /* 3800 */ 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, 2863, 2305, + /* 3810 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3820 */ 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, 2305, 2305, + /* 3830 */ 2305, 2844, 2305, 2305, 2895, 2305, 2305, 2305, 421, 2846, + /* 3840 */ 900, 2848, 2849, 895, 2305, 2305, 883, 2896, 919, 2305, + /* 3850 */ 2845, 2844, 2305, 2305, 2895, 2305, 2305, 2305, 412, 2846, + /* 3860 */ 900, 2848, 2849, 895, 2305, 897, 883, 2896, 919, 2845, + /* 3870 */ 2305, 2844, 2305, 2305, 2895, 2305, 2305, 2305, 423, 2846, + /* 3880 */ 900, 2848, 2849, 895, 897, 2305, 883, 2896, 919, 2845, + /* 3890 */ 2305, 2305, 2305, 2305, 2305, 2863, 2305, 2305, 2305, 2305, + /* 3900 */ 2305, 2305, 2305, 2305, 897, 2305, 2305, 2305, 2305, 2305, + /* 3910 */ 2305, 2810, 2305, 896, 2863, 2305, 2305, 2305, 2305, 2305, + /* 3920 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3930 */ 2810, 2305, 896, 2305, 2863, 2305, 2305, 2305, 2305, 2305, + /* 3940 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 3950 */ 2810, 2305, 896, 2305, 2305, 2305, 2845, 2305, 2844, 2305, + /* 3960 */ 2305, 2895, 2305, 2305, 2305, 424, 2846, 900, 2848, 2849, + /* 3970 */ 895, 897, 2305, 883, 2896, 919, 2845, 2844, 2305, 2305, + /* 3980 */ 2895, 2305, 2305, 2305, 425, 2846, 900, 2848, 2849, 895, + /* 3990 */ 2305, 897, 883, 2896, 919, 2845, 2305, 2844, 2305, 2305, + /* 4000 */ 2895, 2863, 2305, 2305, 426, 2846, 900, 2848, 2849, 895, + /* 4010 */ 897, 2305, 883, 2896, 919, 2305, 2305, 2810, 2305, 896, + /* 4020 */ 2305, 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 4030 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, + /* 4040 */ 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 4050 */ 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, + /* 4060 */ 2305, 2305, 2305, 2845, 2844, 2305, 2305, 2895, 2305, 2305, + /* 4070 */ 2305, 442, 2846, 900, 2848, 2849, 895, 2305, 897, 883, + /* 4080 */ 2896, 919, 2845, 2305, 2844, 2305, 2305, 2895, 2305, 2305, + /* 4090 */ 2305, 443, 2846, 900, 2848, 2849, 895, 897, 2305, 883, + /* 4100 */ 2896, 919, 2305, 2844, 2305, 2305, 2895, 2305, 2863, 2305, + /* 4110 */ 2857, 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, + /* 4120 */ 919, 2305, 2305, 2305, 2810, 2305, 896, 2863, 2305, 2305, + /* 4130 */ 2305, 2845, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 4140 */ 2305, 2305, 2305, 2810, 2305, 896, 897, 2305, 2305, 2305, + /* 4150 */ 2305, 2845, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 4160 */ 2305, 2305, 2305, 2305, 2305, 2305, 897, 2305, 2305, 2305, + /* 4170 */ 2305, 2844, 2305, 2305, 2895, 2305, 2863, 2305, 2856, 2846, + /* 4180 */ 900, 2848, 2849, 895, 2305, 2305, 883, 2896, 919, 2305, + /* 4190 */ 2844, 2305, 2810, 2895, 896, 2305, 2863, 2855, 2846, 900, + /* 4200 */ 2848, 2849, 895, 2305, 2305, 883, 2896, 919, 2305, 2305, + /* 4210 */ 2305, 2305, 2810, 2305, 896, 2305, 2305, 2305, 2305, 2845, + /* 4220 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 4230 */ 2305, 2305, 2305, 2305, 897, 2305, 2305, 2305, 2305, 2844, + /* 4240 */ 2305, 2305, 2895, 2845, 2305, 2305, 459, 2846, 900, 2848, + /* 4250 */ 2849, 895, 2305, 2305, 883, 2896, 919, 2305, 897, 2844, + /* 4260 */ 2305, 2305, 2895, 2305, 2863, 2305, 460, 2846, 900, 2848, + /* 4270 */ 2849, 895, 2305, 2305, 883, 2896, 919, 2305, 2305, 2305, + /* 4280 */ 2810, 2305, 896, 2305, 2305, 2305, 2305, 2305, 2863, 2305, + /* 4290 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 4300 */ 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, 2305, 2305, + /* 4310 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 4320 */ 2305, 2305, 2305, 2305, 2305, 2845, 2305, 2844, 2305, 2305, + /* 4330 */ 2895, 2305, 2305, 2305, 456, 2846, 900, 2848, 2849, 895, + /* 4340 */ 897, 2305, 883, 2896, 919, 2305, 2305, 2305, 2305, 2845, + /* 4350 */ 2305, 2844, 2305, 2305, 2895, 2305, 2305, 2305, 461, 2846, + /* 4360 */ 900, 2848, 2849, 895, 897, 2305, 883, 2896, 919, 2305, + /* 4370 */ 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 4380 */ 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, + /* 4390 */ 2305, 2305, 2305, 2305, 2863, 2305, 2305, 2305, 2305, 2305, + /* 4400 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 4410 */ 2810, 2305, 896, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 4420 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, + /* 4430 */ 2305, 2305, 2305, 898, 2305, 2305, 2895, 2305, 2305, 2305, + /* 4440 */ 432, 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, + /* 4450 */ 919, 2305, 2305, 2305, 2305, 2305, 2305, 2844, 2305, 2305, + /* 4460 */ 2895, 2305, 2305, 2305, 431, 2846, 900, 2848, 2849, 895, + /* 4470 */ 2305, 2305, 883, 2896, 919, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 536, 401, 536, 401, 404, 405, 404, 405, 544, 437, - /* 10 */ 544, 423, 12, 13, 4, 12, 13, 14, 15, 16, - /* 20 */ 20, 0, 22, 438, 406, 407, 562, 563, 456, 563, - /* 30 */ 423, 567, 568, 567, 568, 538, 36, 540, 38, 0, - /* 40 */ 20, 453, 21, 392, 426, 24, 25, 26, 27, 28, - /* 50 */ 29, 30, 31, 32, 20, 406, 407, 431, 407, 34, - /* 60 */ 453, 8, 9, 437, 54, 12, 13, 14, 15, 16, - /* 70 */ 0, 71, 21, 20, 74, 24, 25, 26, 27, 28, - /* 80 */ 29, 30, 31, 32, 499, 85, 20, 455, 437, 20, - /* 90 */ 464, 503, 504, 505, 24, 25, 26, 27, 28, 29, - /* 100 */ 30, 31, 32, 14, 453, 517, 455, 475, 476, 20, - /* 110 */ 503, 504, 20, 479, 22, 115, 406, 407, 118, 80, + /* 0 */ 536, 401, 536, 455, 404, 405, 415, 440, 544, 4, + /* 10 */ 544, 423, 12, 13, 485, 12, 13, 14, 15, 16, + /* 20 */ 20, 0, 22, 475, 476, 434, 562, 563, 436, 563, + /* 30 */ 423, 567, 568, 567, 568, 444, 36, 440, 38, 0, + /* 40 */ 443, 453, 21, 392, 452, 24, 25, 26, 27, 28, + /* 50 */ 29, 30, 31, 32, 437, 406, 407, 20, 407, 54, + /* 60 */ 453, 8, 9, 446, 447, 12, 13, 14, 15, 16, + /* 70 */ 503, 71, 21, 20, 74, 24, 25, 26, 27, 28, + /* 80 */ 29, 30, 31, 32, 517, 85, 20, 455, 437, 8, + /* 90 */ 9, 503, 504, 12, 13, 14, 15, 16, 59, 401, + /* 100 */ 503, 469, 404, 405, 453, 517, 455, 475, 476, 20, + /* 110 */ 503, 504, 505, 479, 517, 115, 406, 407, 118, 80, /* 120 */ 81, 82, 83, 84, 517, 86, 87, 88, 89, 90, /* 130 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, /* 140 */ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - /* 150 */ 111, 500, 118, 61, 503, 155, 156, 416, 507, 508, - /* 160 */ 509, 510, 511, 512, 118, 424, 515, 516, 517, 20, + /* 150 */ 111, 500, 440, 438, 503, 155, 156, 120, 507, 508, + /* 160 */ 509, 510, 511, 512, 525, 526, 515, 516, 517, 20, /* 170 */ 536, 21, 20, 522, 22, 524, 20, 71, 544, 528, /* 180 */ 529, 532, 533, 534, 118, 536, 537, 37, 36, 39, - /* 190 */ 40, 41, 42, 544, 194, 195, 562, 563, 391, 548, - /* 200 */ 393, 567, 568, 3, 204, 205, 451, 556, 427, 454, - /* 210 */ 455, 562, 563, 61, 194, 195, 567, 568, 437, 219, - /* 220 */ 20, 221, 199, 117, 20, 44, 226, 14, 122, 448, - /* 230 */ 8, 9, 20, 20, 12, 13, 14, 15, 16, 57, - /* 240 */ 118, 531, 532, 533, 534, 4, 536, 537, 66, 196, + /* 190 */ 40, 41, 42, 544, 194, 195, 562, 563, 20, 548, + /* 200 */ 20, 567, 568, 3, 204, 205, 451, 556, 118, 454, + /* 210 */ 455, 562, 563, 61, 499, 503, 567, 568, 20, 219, + /* 220 */ 20, 221, 199, 117, 416, 44, 226, 14, 122, 517, + /* 230 */ 8, 9, 424, 20, 12, 13, 14, 15, 16, 57, + /* 240 */ 118, 531, 532, 533, 534, 20, 536, 537, 66, 196, /* 250 */ 71, 69, 70, 406, 254, 255, 256, 392, 258, 259, /* 260 */ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - /* 270 */ 270, 271, 407, 20, 274, 275, 276, 277, 278, 279, + /* 270 */ 270, 271, 407, 149, 274, 275, 276, 277, 278, 279, /* 280 */ 280, 281, 282, 283, 284, 285, 286, 287, 288, 12, - /* 290 */ 13, 14, 406, 392, 18, 189, 20, 20, 118, 22, + /* 290 */ 13, 14, 211, 392, 18, 189, 20, 20, 0, 22, /* 300 */ 78, 122, 437, 27, 457, 458, 30, 460, 407, 256, - /* 310 */ 463, 155, 156, 36, 38, 38, 406, 407, 453, 119, - /* 320 */ 455, 0, 8, 9, 120, 256, 12, 13, 14, 15, - /* 330 */ 16, 431, 56, 57, 0, 59, 426, 437, 437, 158, - /* 340 */ 64, 65, 319, 320, 321, 322, 323, 313, 71, 455, - /* 350 */ 128, 74, 76, 20, 453, 78, 455, 471, 472, 313, - /* 360 */ 204, 205, 85, 469, 464, 500, 20, 392, 503, 475, - /* 370 */ 476, 118, 507, 508, 509, 510, 511, 512, 513, 313, + /* 310 */ 463, 155, 156, 36, 38, 38, 118, 4, 453, 119, + /* 320 */ 455, 0, 24, 25, 26, 27, 28, 29, 30, 31, + /* 330 */ 32, 431, 56, 57, 0, 59, 407, 437, 437, 158, + /* 340 */ 64, 65, 319, 320, 321, 322, 323, 14, 71, 455, + /* 350 */ 128, 74, 76, 20, 453, 78, 455, 3, 234, 235, + /* 360 */ 204, 205, 85, 469, 464, 500, 437, 392, 503, 475, + /* 370 */ 476, 36, 507, 508, 509, 510, 511, 512, 513, 313, /* 380 */ 515, 516, 517, 518, 519, 148, 149, 150, 151, 152, - /* 390 */ 153, 154, 115, 117, 422, 118, 196, 425, 218, 20, - /* 400 */ 220, 500, 254, 438, 503, 129, 455, 194, 507, 508, - /* 410 */ 509, 510, 511, 512, 449, 193, 515, 516, 517, 20, - /* 420 */ 469, 520, 436, 522, 523, 524, 475, 476, 453, 528, - /* 430 */ 529, 251, 155, 156, 52, 313, 160, 161, 452, 163, - /* 440 */ 164, 165, 166, 167, 168, 169, 170, 171, 172, 406, - /* 450 */ 407, 175, 176, 177, 178, 179, 180, 181, 182, 402, - /* 460 */ 184, 185, 186, 406, 20, 408, 190, 191, 192, 256, + /* 390 */ 153, 154, 115, 117, 20, 118, 196, 20, 406, 407, + /* 400 */ 22, 500, 254, 313, 503, 129, 36, 194, 507, 508, + /* 410 */ 509, 510, 511, 512, 36, 193, 515, 516, 517, 76, + /* 420 */ 0, 520, 341, 522, 523, 524, 12, 13, 453, 528, + /* 430 */ 529, 118, 155, 156, 256, 313, 160, 161, 509, 163, + /* 440 */ 164, 165, 166, 167, 168, 169, 170, 171, 172, 20, + /* 450 */ 36, 175, 176, 177, 178, 179, 180, 181, 182, 431, + /* 460 */ 184, 185, 186, 20, 77, 437, 190, 191, 192, 256, /* 470 */ 437, 194, 195, 197, 326, 327, 328, 329, 330, 331, /* 480 */ 332, 204, 205, 302, 303, 304, 305, 306, 307, 308, - /* 490 */ 309, 310, 158, 313, 272, 174, 219, 464, 221, 2, - /* 500 */ 179, 155, 156, 226, 461, 8, 9, 173, 187, 12, + /* 490 */ 309, 310, 464, 115, 272, 174, 219, 464, 221, 2, + /* 500 */ 179, 14, 20, 226, 77, 8, 9, 20, 187, 12, /* 510 */ 13, 14, 15, 16, 292, 293, 294, 295, 296, 297, - /* 520 */ 298, 299, 300, 301, 4, 211, 306, 307, 308, 309, - /* 530 */ 310, 254, 255, 256, 392, 258, 259, 260, 261, 262, + /* 520 */ 298, 299, 300, 301, 532, 533, 534, 194, 536, 537, + /* 530 */ 0, 254, 255, 256, 392, 258, 259, 260, 261, 262, /* 540 */ 263, 264, 265, 266, 267, 268, 269, 270, 271, 407, - /* 550 */ 536, 274, 275, 276, 277, 278, 315, 406, 544, 282, + /* 550 */ 536, 274, 275, 276, 277, 278, 221, 214, 544, 282, /* 560 */ 283, 284, 285, 286, 287, 288, 12, 13, 392, 158, - /* 570 */ 22, 407, 12, 13, 20, 196, 22, 563, 196, 437, - /* 580 */ 437, 567, 568, 407, 36, 14, 525, 526, 115, 207, - /* 590 */ 36, 20, 38, 20, 402, 453, 36, 455, 406, 456, - /* 600 */ 408, 437, 4, 130, 131, 132, 133, 134, 135, 136, + /* 570 */ 22, 194, 195, 118, 20, 406, 22, 563, 158, 437, + /* 580 */ 246, 567, 568, 407, 36, 242, 243, 57, 115, 256, + /* 590 */ 36, 221, 38, 173, 538, 453, 540, 455, 155, 156, + /* 600 */ 118, 392, 4, 130, 131, 132, 133, 134, 135, 136, /* 610 */ 137, 138, 139, 437, 141, 142, 143, 144, 145, 146, - /* 620 */ 147, 23, 438, 439, 406, 71, 437, 506, 74, 453, - /* 630 */ 231, 455, 78, 85, 437, 406, 407, 448, 118, 85, - /* 640 */ 489, 490, 500, 446, 447, 503, 48, 49, 50, 507, - /* 650 */ 508, 509, 510, 511, 512, 341, 535, 515, 516, 517, - /* 660 */ 406, 407, 77, 115, 522, 437, 524, 411, 412, 115, - /* 670 */ 528, 529, 118, 509, 446, 447, 500, 406, 407, 503, - /* 680 */ 426, 392, 20, 507, 508, 509, 510, 511, 512, 435, - /* 690 */ 461, 515, 516, 517, 497, 498, 407, 426, 556, 0, - /* 700 */ 524, 14, 15, 16, 528, 529, 435, 489, 490, 155, - /* 710 */ 156, 406, 407, 302, 303, 304, 305, 306, 307, 308, - /* 720 */ 309, 310, 36, 8, 9, 77, 437, 12, 13, 14, - /* 730 */ 15, 16, 80, 81, 82, 406, 407, 1, 2, 87, - /* 740 */ 88, 89, 453, 129, 455, 93, 36, 36, 194, 195, - /* 750 */ 98, 99, 100, 101, 158, 289, 104, 76, 204, 205, - /* 760 */ 108, 109, 110, 111, 506, 194, 461, 219, 85, 221, - /* 770 */ 454, 455, 2, 219, 22, 221, 77, 20, 8, 9, - /* 780 */ 226, 221, 12, 13, 14, 15, 16, 440, 36, 500, - /* 790 */ 443, 406, 503, 535, 20, 85, 507, 508, 509, 510, + /* 620 */ 147, 23, 252, 253, 406, 71, 313, 438, 74, 453, + /* 630 */ 256, 455, 78, 85, 437, 221, 406, 407, 449, 85, + /* 640 */ 471, 472, 500, 446, 447, 503, 48, 49, 50, 507, + /* 650 */ 508, 509, 510, 511, 512, 289, 426, 515, 516, 517, + /* 660 */ 406, 407, 453, 115, 522, 189, 524, 406, 407, 115, + /* 670 */ 528, 529, 118, 218, 13, 220, 500, 406, 407, 503, + /* 680 */ 426, 392, 36, 507, 508, 509, 510, 511, 512, 435, + /* 690 */ 336, 515, 516, 517, 497, 498, 407, 426, 556, 223, + /* 700 */ 524, 438, 439, 158, 528, 529, 251, 489, 490, 155, + /* 710 */ 156, 454, 455, 302, 303, 304, 305, 306, 307, 308, + /* 720 */ 309, 310, 461, 8, 9, 129, 437, 12, 13, 14, + /* 730 */ 15, 16, 80, 81, 82, 406, 407, 406, 407, 87, + /* 740 */ 88, 89, 453, 85, 455, 93, 85, 506, 194, 195, + /* 750 */ 98, 99, 100, 101, 406, 407, 104, 426, 204, 205, + /* 760 */ 108, 109, 110, 111, 62, 63, 435, 219, 313, 221, + /* 770 */ 406, 407, 2, 219, 426, 221, 535, 20, 8, 9, + /* 780 */ 226, 34, 12, 13, 14, 15, 16, 402, 20, 500, + /* 790 */ 426, 406, 503, 408, 0, 313, 507, 508, 509, 510, /* 800 */ 511, 512, 254, 255, 515, 516, 517, 389, 254, 255, /* 810 */ 256, 392, 258, 259, 260, 261, 262, 263, 264, 265, - /* 820 */ 266, 267, 268, 269, 270, 271, 407, 256, 274, 275, - /* 830 */ 276, 277, 278, 313, 119, 392, 282, 283, 284, 285, - /* 840 */ 286, 287, 288, 289, 12, 13, 557, 558, 406, 407, - /* 850 */ 503, 466, 20, 468, 22, 119, 437, 129, 196, 22, - /* 860 */ 115, 532, 533, 534, 517, 536, 537, 115, 36, 506, - /* 870 */ 38, 189, 453, 36, 455, 130, 131, 132, 133, 134, + /* 820 */ 266, 267, 268, 269, 270, 271, 407, 33, 274, 275, + /* 830 */ 276, 277, 278, 129, 119, 20, 282, 283, 284, 285, + /* 840 */ 286, 287, 288, 289, 12, 13, 557, 558, 303, 304, + /* 850 */ 305, 402, 20, 437, 22, 406, 437, 408, 406, 36, + /* 860 */ 115, 532, 533, 534, 448, 536, 537, 221, 36, 391, + /* 870 */ 38, 393, 453, 438, 455, 130, 131, 132, 133, 134, /* 880 */ 135, 136, 137, 138, 139, 437, 141, 142, 143, 144, - /* 890 */ 145, 146, 147, 445, 392, 214, 453, 479, 535, 303, - /* 900 */ 304, 305, 484, 71, 456, 223, 74, 221, 415, 437, - /* 910 */ 78, 62, 63, 406, 407, 23, 149, 85, 256, 500, - /* 920 */ 440, 413, 503, 242, 243, 94, 507, 508, 509, 510, - /* 930 */ 511, 512, 221, 426, 515, 516, 517, 444, 252, 253, - /* 940 */ 44, 49, 50, 524, 392, 406, 407, 115, 529, 441, - /* 950 */ 118, 440, 115, 196, 536, 453, 485, 406, 407, 407, - /* 960 */ 479, 409, 544, 252, 253, 426, 18, 71, 194, 497, - /* 970 */ 498, 23, 12, 13, 532, 533, 534, 426, 536, 537, - /* 980 */ 562, 563, 22, 503, 536, 567, 568, 155, 156, 437, - /* 990 */ 42, 43, 544, 162, 46, 392, 36, 517, 38, 411, - /* 1000 */ 412, 234, 235, 55, 0, 453, 438, 455, 60, 392, - /* 1010 */ 562, 563, 438, 256, 503, 567, 568, 536, 187, 188, - /* 1020 */ 72, 73, 74, 75, 76, 544, 194, 195, 517, 413, - /* 1030 */ 256, 71, 201, 33, 8, 9, 204, 205, 12, 13, - /* 1040 */ 14, 15, 16, 562, 563, 85, 430, 47, 567, 568, - /* 1050 */ 392, 219, 500, 221, 415, 503, 453, 441, 226, 507, - /* 1060 */ 508, 509, 510, 511, 512, 22, 118, 515, 516, 517, - /* 1070 */ 453, 420, 421, 434, 522, 115, 524, 149, 150, 36, - /* 1080 */ 528, 529, 154, 444, 479, 3, 254, 255, 256, 484, + /* 890 */ 145, 146, 147, 445, 406, 407, 506, 479, 252, 253, + /* 900 */ 149, 150, 484, 71, 456, 154, 74, 94, 85, 437, + /* 910 */ 78, 465, 306, 307, 308, 309, 310, 85, 36, 500, + /* 920 */ 406, 407, 503, 406, 407, 535, 507, 508, 509, 510, + /* 930 */ 511, 512, 406, 407, 515, 516, 517, 438, 406, 407, + /* 940 */ 426, 489, 490, 524, 392, 406, 407, 115, 529, 461, + /* 950 */ 118, 392, 426, 196, 536, 437, 406, 407, 426, 407, + /* 960 */ 479, 409, 544, 445, 196, 426, 18, 85, 406, 497, + /* 970 */ 498, 23, 12, 13, 456, 162, 426, 20, 461, 22, + /* 980 */ 562, 563, 22, 437, 536, 567, 568, 155, 156, 437, + /* 990 */ 42, 43, 544, 438, 46, 392, 36, 289, 38, 291, + /* 1000 */ 187, 188, 456, 55, 0, 453, 438, 455, 60, 194, + /* 1010 */ 562, 563, 453, 256, 201, 567, 568, 536, 61, 438, + /* 1020 */ 72, 73, 74, 75, 76, 544, 194, 195, 466, 422, + /* 1030 */ 468, 71, 425, 22, 8, 9, 204, 205, 12, 13, + /* 1040 */ 14, 15, 16, 562, 563, 85, 437, 36, 567, 568, + /* 1050 */ 129, 219, 500, 221, 445, 503, 453, 20, 226, 507, + /* 1060 */ 508, 509, 510, 511, 512, 456, 118, 515, 516, 517, + /* 1070 */ 521, 256, 523, 392, 522, 115, 524, 14, 15, 16, + /* 1080 */ 528, 529, 1, 2, 479, 23, 254, 255, 256, 484, /* 1090 */ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, - /* 1100 */ 268, 269, 270, 271, 13, 157, 274, 275, 276, 277, - /* 1110 */ 278, 453, 420, 421, 282, 283, 284, 285, 286, 287, - /* 1120 */ 288, 12, 13, 14, 406, 407, 392, 392, 85, 20, - /* 1130 */ 392, 22, 8, 9, 395, 396, 12, 13, 14, 15, - /* 1140 */ 16, 536, 150, 437, 426, 36, 154, 38, 424, 544, - /* 1150 */ 4, 445, 148, 149, 150, 151, 152, 153, 154, 211, - /* 1160 */ 212, 213, 456, 33, 216, 19, 437, 562, 563, 0, - /* 1170 */ 392, 47, 567, 568, 445, 438, 85, 229, 230, 219, - /* 1180 */ 71, 221, 428, 74, 38, 456, 432, 453, 453, 241, - /* 1190 */ 0, 453, 244, 438, 85, 247, 248, 249, 250, 251, - /* 1200 */ 432, 8, 9, 57, 438, 12, 13, 14, 15, 16, - /* 1210 */ 64, 65, 406, 407, 254, 255, 289, 71, 291, 392, - /* 1220 */ 228, 392, 438, 437, 115, 233, 33, 118, 236, 437, - /* 1230 */ 238, 453, 426, 447, 274, 275, 407, 445, 409, 33, - /* 1240 */ 406, 407, 282, 283, 284, 285, 286, 287, 456, 406, + /* 1100 */ 268, 269, 270, 271, 183, 157, 274, 275, 276, 277, + /* 1110 */ 278, 49, 50, 392, 282, 283, 284, 285, 286, 287, + /* 1120 */ 288, 12, 13, 14, 406, 407, 115, 392, 438, 20, + /* 1130 */ 392, 22, 8, 9, 453, 0, 12, 13, 14, 15, + /* 1140 */ 16, 536, 150, 55, 426, 36, 154, 38, 520, 544, + /* 1150 */ 4, 523, 148, 149, 150, 151, 152, 153, 154, 211, + /* 1160 */ 212, 213, 406, 407, 216, 19, 427, 562, 563, 0, + /* 1170 */ 392, 47, 567, 568, 453, 393, 437, 229, 230, 219, + /* 1180 */ 71, 221, 426, 74, 38, 411, 412, 448, 453, 241, + /* 1190 */ 0, 453, 244, 58, 85, 247, 248, 249, 250, 251, + /* 1200 */ 119, 8, 9, 57, 22, 12, 13, 14, 15, 16, + /* 1210 */ 64, 65, 406, 407, 254, 255, 450, 71, 36, 453, + /* 1220 */ 228, 392, 411, 412, 115, 233, 33, 118, 236, 437, + /* 1230 */ 238, 453, 426, 196, 274, 275, 407, 445, 409, 420, + /* 1240 */ 421, 392, 282, 283, 284, 285, 286, 287, 456, 406, /* 1250 */ 407, 8, 9, 406, 407, 12, 13, 14, 15, 16, - /* 1260 */ 426, 313, 494, 117, 155, 156, 437, 20, 122, 426, - /* 1270 */ 80, 81, 82, 426, 20, 0, 33, 87, 88, 89, - /* 1280 */ 453, 437, 453, 93, 455, 406, 407, 392, 98, 99, - /* 1290 */ 100, 101, 571, 392, 104, 406, 407, 437, 108, 109, - /* 1300 */ 110, 111, 0, 194, 195, 426, 406, 407, 521, 521, - /* 1310 */ 523, 523, 119, 204, 205, 426, 456, 148, 149, 150, - /* 1320 */ 151, 152, 153, 154, 22, 119, 426, 392, 219, 500, - /* 1330 */ 221, 193, 503, 13, 33, 226, 507, 508, 509, 510, - /* 1340 */ 511, 512, 498, 393, 515, 516, 517, 450, 453, 450, - /* 1350 */ 453, 522, 453, 524, 453, 392, 148, 528, 529, 392, - /* 1360 */ 152, 538, 119, 254, 255, 256, 392, 258, 259, 260, + /* 1260 */ 4, 313, 424, 117, 155, 156, 437, 85, 122, 426, + /* 1270 */ 80, 81, 82, 426, 20, 538, 33, 87, 88, 89, + /* 1280 */ 413, 52, 453, 93, 455, 406, 407, 392, 98, 99, + /* 1290 */ 100, 101, 560, 256, 104, 406, 407, 430, 108, 109, + /* 1300 */ 110, 111, 453, 194, 195, 426, 406, 407, 441, 521, + /* 1310 */ 13, 523, 119, 204, 205, 426, 44, 148, 149, 150, + /* 1320 */ 151, 152, 153, 154, 413, 237, 426, 392, 219, 500, + /* 1330 */ 221, 193, 503, 420, 421, 226, 507, 508, 509, 510, + /* 1340 */ 511, 512, 437, 71, 515, 516, 517, 450, 453, 0, + /* 1350 */ 453, 522, 441, 524, 0, 392, 428, 528, 529, 392, + /* 1360 */ 432, 456, 119, 254, 255, 256, 392, 258, 259, 260, /* 1370 */ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - /* 1380 */ 271, 407, 0, 274, 275, 276, 277, 278, 453, 406, + /* 1380 */ 271, 407, 85, 274, 275, 276, 277, 278, 453, 406, /* 1390 */ 407, 282, 283, 284, 285, 286, 287, 288, 12, 13, - /* 1400 */ 392, 406, 407, 406, 407, 85, 20, 0, 22, 426, - /* 1410 */ 272, 437, 406, 407, 392, 407, 453, 409, 336, 392, - /* 1420 */ 453, 426, 36, 426, 38, 520, 44, 453, 523, 455, - /* 1430 */ 292, 392, 426, 8, 9, 406, 407, 12, 13, 14, + /* 1400 */ 392, 406, 407, 406, 407, 392, 20, 392, 22, 426, + /* 1410 */ 272, 437, 406, 407, 392, 407, 453, 409, 437, 392, + /* 1420 */ 453, 426, 36, 426, 38, 196, 392, 453, 33, 455, + /* 1430 */ 292, 77, 426, 8, 9, 506, 207, 12, 13, 14, /* 1440 */ 15, 16, 8, 9, 427, 437, 12, 13, 14, 15, - /* 1450 */ 16, 55, 406, 407, 437, 426, 14, 71, 406, 407, - /* 1460 */ 74, 453, 20, 455, 57, 448, 450, 406, 407, 453, - /* 1470 */ 340, 85, 426, 0, 500, 453, 465, 503, 426, 33, - /* 1480 */ 453, 507, 508, 509, 510, 511, 512, 426, 514, 515, - /* 1490 */ 516, 517, 453, 47, 129, 0, 123, 123, 392, 126, - /* 1500 */ 126, 115, 33, 256, 118, 119, 155, 156, 500, 0, - /* 1510 */ 256, 503, 13, 407, 36, 507, 508, 509, 510, 511, - /* 1520 */ 512, 246, 33, 515, 516, 517, 123, 0, 33, 126, - /* 1530 */ 522, 123, 524, 33, 126, 36, 528, 529, 0, 13, - /* 1540 */ 33, 155, 156, 437, 119, 0, 33, 560, 183, 22, + /* 1450 */ 16, 437, 450, 14, 437, 453, 0, 71, 148, 20, + /* 1460 */ 74, 453, 152, 455, 535, 448, 453, 415, 453, 0, + /* 1470 */ 456, 85, 432, 123, 500, 453, 126, 503, 33, 498, + /* 1480 */ 453, 507, 508, 509, 510, 511, 512, 453, 514, 515, + /* 1490 */ 516, 517, 437, 395, 396, 33, 444, 571, 392, 33, + /* 1500 */ 44, 115, 447, 33, 118, 119, 20, 158, 500, 47, + /* 1510 */ 256, 503, 36, 407, 119, 507, 508, 509, 510, 511, + /* 1520 */ 512, 33, 33, 515, 516, 517, 123, 539, 123, 126, + /* 1530 */ 522, 126, 524, 33, 494, 47, 528, 529, 0, 13, + /* 1540 */ 13, 155, 156, 437, 119, 123, 155, 156, 126, 553, /* 1550 */ 8, 9, 33, 119, 12, 13, 14, 15, 16, 453, - /* 1560 */ 22, 455, 36, 85, 1, 2, 78, 22, 8, 9, - /* 1570 */ 12, 13, 12, 13, 14, 15, 16, 36, 8, 9, - /* 1580 */ 194, 195, 12, 13, 14, 15, 16, 553, 119, 47, + /* 1560 */ 22, 455, 36, 36, 119, 1, 2, 410, 8, 9, + /* 1570 */ 78, 315, 12, 13, 14, 15, 16, 437, 8, 9, + /* 1580 */ 194, 195, 12, 13, 14, 15, 16, 423, 36, 47, /* 1590 */ 204, 205, 8, 9, 33, 33, 12, 13, 14, 15, - /* 1600 */ 16, 33, 33, 12, 13, 219, 500, 221, 119, 503, - /* 1610 */ 33, 539, 226, 507, 508, 509, 510, 511, 512, 119, - /* 1620 */ 33, 515, 516, 517, 51, 36, 119, 410, 522, 437, - /* 1630 */ 524, 158, 119, 237, 528, 529, 12, 13, 119, 338, - /* 1640 */ 254, 255, 256, 33, 258, 259, 260, 261, 262, 263, - /* 1650 */ 264, 265, 266, 267, 268, 269, 270, 271, 33, 423, - /* 1660 */ 274, 275, 276, 277, 278, 33, 33, 158, 282, 283, + /* 1600 */ 16, 118, 33, 120, 33, 219, 500, 221, 119, 503, + /* 1610 */ 0, 0, 226, 507, 508, 509, 510, 511, 512, 119, + /* 1620 */ 33, 515, 516, 517, 12, 13, 51, 158, 522, 423, + /* 1630 */ 524, 405, 22, 22, 528, 529, 0, 85, 119, 465, + /* 1640 */ 254, 255, 256, 559, 258, 259, 260, 261, 262, 263, + /* 1650 */ 264, 265, 266, 267, 268, 269, 270, 271, 22, 559, + /* 1660 */ 274, 275, 276, 277, 278, 478, 33, 33, 282, 283, /* 1670 */ 284, 285, 286, 287, 288, 12, 13, 392, 33, 119, - /* 1680 */ 119, 119, 479, 20, 423, 22, 33, 119, 119, 119, - /* 1690 */ 33, 118, 407, 118, 409, 120, 119, 405, 273, 36, - /* 1700 */ 33, 38, 0, 119, 12, 13, 119, 8, 9, 465, - /* 1710 */ 47, 12, 13, 14, 15, 16, 12, 13, 36, 8, - /* 1720 */ 9, 559, 437, 12, 13, 14, 15, 16, 392, 119, + /* 1680 */ 119, 119, 479, 20, 559, 22, 33, 559, 119, 119, + /* 1690 */ 119, 33, 407, 118, 409, 12, 13, 221, 273, 36, + /* 1700 */ 33, 38, 465, 119, 33, 410, 119, 8, 9, 501, + /* 1710 */ 47, 12, 13, 14, 15, 16, 407, 231, 452, 8, + /* 1720 */ 9, 486, 437, 12, 13, 14, 15, 16, 392, 33, /* 1730 */ 12, 13, 12, 13, 71, 12, 13, 74, 453, 536, - /* 1740 */ 455, 33, 254, 407, 119, 12, 13, 544, 85, 12, - /* 1750 */ 13, 119, 119, 12, 13, 36, 13, 13, 47, 559, - /* 1760 */ 58, 559, 221, 33, 119, 562, 563, 85, 33, 33, - /* 1770 */ 567, 568, 119, 437, 478, 33, 119, 559, 115, 36, - /* 1780 */ 36, 118, 465, 501, 452, 500, 119, 410, 503, 453, - /* 1790 */ 407, 455, 507, 508, 509, 510, 511, 512, 486, 465, - /* 1800 */ 515, 516, 517, 465, 85, 543, 543, 522, 530, 524, - /* 1810 */ 221, 546, 564, 528, 529, 465, 8, 9, 155, 156, - /* 1820 */ 12, 13, 14, 15, 16, 425, 316, 119, 480, 57, - /* 1830 */ 119, 502, 20, 406, 20, 491, 500, 236, 496, 503, - /* 1840 */ 491, 415, 482, 507, 508, 509, 510, 511, 512, 119, - /* 1850 */ 415, 515, 516, 517, 119, 119, 217, 194, 195, 406, - /* 1860 */ 524, 119, 20, 407, 528, 529, 47, 204, 205, 8, - /* 1870 */ 9, 462, 407, 12, 13, 14, 15, 16, 462, 193, - /* 1880 */ 459, 406, 219, 407, 221, 406, 8, 9, 459, 226, - /* 1890 */ 12, 13, 14, 15, 16, 462, 459, 459, 116, 41, - /* 1900 */ 42, 419, 114, 406, 418, 113, 20, 406, 417, 406, - /* 1910 */ 406, 406, 52, 399, 403, 399, 20, 254, 255, 256, - /* 1920 */ 403, 258, 259, 260, 261, 262, 263, 264, 265, 266, - /* 1930 */ 267, 268, 269, 270, 271, 491, 415, 274, 275, 276, - /* 1940 */ 277, 278, 455, 479, 415, 282, 283, 284, 285, 286, - /* 1950 */ 287, 288, 12, 13, 415, 20, 408, 20, 481, 415, - /* 1960 */ 20, 408, 22, 20, 479, 415, 472, 415, 20, 415, - /* 1970 */ 415, 272, 466, 52, 392, 399, 36, 406, 38, 433, - /* 1980 */ 119, 415, 124, 125, 433, 127, 437, 395, 395, 407, - /* 1990 */ 453, 409, 406, 437, 437, 399, 437, 119, 239, 118, - /* 2000 */ 536, 437, 437, 495, 196, 392, 148, 413, 544, 437, - /* 2010 */ 152, 71, 20, 493, 74, 437, 437, 437, 437, 437, - /* 2020 */ 407, 536, 491, 490, 225, 85, 562, 563, 488, 544, - /* 2030 */ 224, 567, 568, 413, 487, 453, 453, 455, 453, 325, - /* 2040 */ 406, 324, 552, 455, 552, 333, 210, 562, 563, 551, - /* 2050 */ 437, 453, 567, 568, 480, 115, 392, 555, 118, 335, - /* 2060 */ 334, 312, 317, 473, 552, 542, 453, 549, 455, 554, - /* 2070 */ 473, 407, 550, 409, 311, 480, 541, 337, 339, 407, - /* 2080 */ 342, 20, 500, 129, 314, 503, 408, 413, 413, 507, + /* 1740 */ 455, 33, 33, 407, 465, 33, 254, 544, 85, 12, + /* 1750 */ 13, 13, 119, 119, 12, 13, 12, 13, 47, 12, + /* 1760 */ 13, 12, 13, 33, 119, 562, 563, 12, 13, 33, + /* 1770 */ 567, 568, 119, 437, 36, 13, 33, 119, 115, 465, + /* 1780 */ 564, 118, 543, 543, 36, 500, 119, 530, 503, 453, + /* 1790 */ 119, 455, 507, 508, 509, 510, 511, 512, 36, 33, + /* 1800 */ 515, 516, 517, 465, 338, 546, 425, 522, 480, 524, + /* 1810 */ 340, 33, 316, 528, 529, 119, 8, 9, 155, 156, + /* 1820 */ 12, 13, 14, 15, 16, 57, 502, 119, 119, 20, + /* 1830 */ 119, 119, 406, 85, 20, 491, 500, 236, 496, 503, + /* 1840 */ 217, 406, 415, 507, 508, 509, 510, 511, 512, 119, + /* 1850 */ 491, 515, 516, 517, 482, 119, 415, 194, 195, 20, + /* 1860 */ 524, 407, 119, 47, 528, 529, 462, 204, 205, 8, + /* 1870 */ 9, 462, 407, 12, 13, 14, 15, 16, 193, 459, + /* 1880 */ 406, 406, 219, 462, 221, 119, 8, 9, 407, 226, + /* 1890 */ 12, 13, 14, 15, 16, 459, 459, 119, 116, 41, + /* 1900 */ 42, 459, 114, 419, 406, 418, 113, 406, 417, 406, + /* 1910 */ 406, 406, 20, 399, 52, 403, 399, 254, 255, 256, + /* 1920 */ 491, 258, 259, 260, 261, 262, 263, 264, 265, 266, + /* 1930 */ 267, 268, 269, 270, 271, 403, 415, 274, 275, 276, + /* 1940 */ 277, 278, 20, 479, 415, 282, 283, 284, 285, 286, + /* 1950 */ 287, 288, 12, 13, 455, 415, 20, 408, 20, 481, + /* 1960 */ 20, 415, 22, 408, 479, 415, 20, 472, 415, 20, + /* 1970 */ 52, 272, 466, 415, 392, 399, 36, 433, 38, 406, + /* 1980 */ 119, 415, 124, 125, 433, 127, 453, 415, 395, 407, + /* 1990 */ 395, 409, 453, 437, 437, 406, 437, 119, 399, 239, + /* 2000 */ 536, 453, 437, 495, 196, 392, 148, 118, 544, 493, + /* 2010 */ 152, 71, 20, 491, 74, 437, 437, 437, 437, 437, + /* 2020 */ 407, 536, 437, 437, 490, 85, 562, 563, 437, 544, + /* 2030 */ 413, 567, 568, 488, 224, 453, 225, 455, 455, 413, + /* 2040 */ 325, 487, 552, 480, 406, 453, 324, 562, 563, 552, + /* 2050 */ 437, 210, 567, 568, 333, 115, 392, 555, 118, 552, + /* 2060 */ 335, 473, 551, 473, 554, 334, 453, 317, 455, 312, + /* 2070 */ 550, 407, 549, 409, 480, 311, 342, 542, 541, 339, + /* 2080 */ 565, 572, 500, 337, 566, 503, 407, 20, 129, 507, /* 2090 */ 508, 509, 510, 511, 512, 155, 156, 515, 516, 517, - /* 2100 */ 572, 437, 566, 473, 522, 506, 524, 453, 565, 453, + /* 2100 */ 314, 437, 506, 408, 522, 413, 524, 413, 473, 453, /* 2110 */ 528, 529, 453, 500, 547, 453, 503, 453, 453, 455, - /* 2120 */ 507, 508, 509, 510, 511, 512, 202, 466, 515, 516, - /* 2130 */ 517, 473, 453, 118, 194, 195, 470, 524, 413, 527, - /* 2140 */ 413, 528, 529, 453, 204, 205, 202, 545, 467, 466, - /* 2150 */ 453, 453, 118, 432, 453, 407, 453, 406, 453, 219, - /* 2160 */ 413, 221, 453, 413, 500, 413, 226, 503, 453, 453, - /* 2170 */ 442, 507, 508, 509, 510, 511, 512, 22, 394, 515, - /* 2180 */ 516, 517, 453, 35, 453, 453, 522, 453, 524, 37, - /* 2190 */ 397, 40, 528, 529, 254, 255, 256, 400, 258, 259, + /* 2120 */ 507, 508, 509, 510, 511, 512, 453, 473, 515, 516, + /* 2130 */ 517, 202, 413, 453, 194, 195, 470, 524, 466, 413, + /* 2140 */ 118, 528, 529, 545, 204, 205, 527, 202, 467, 432, + /* 2150 */ 453, 453, 466, 453, 413, 453, 453, 453, 413, 219, + /* 2160 */ 407, 221, 118, 453, 500, 413, 226, 503, 22, 453, + /* 2170 */ 442, 507, 508, 509, 510, 511, 512, 453, 406, 515, + /* 2180 */ 516, 517, 453, 35, 37, 453, 522, 499, 524, 394, + /* 2190 */ 40, 414, 528, 529, 254, 255, 256, 397, 258, 259, /* 2200 */ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - /* 2210 */ 270, 271, 399, 453, 274, 275, 276, 277, 278, 453, - /* 2220 */ 453, 453, 282, 283, 284, 285, 286, 287, 288, 12, - /* 2230 */ 13, 453, 453, 453, 453, 398, 453, 20, 453, 22, - /* 2240 */ 453, 483, 439, 474, 429, 499, 492, 474, 439, 429, - /* 2250 */ 429, 392, 414, 36, 390, 38, 0, 0, 0, 47, - /* 2260 */ 0, 36, 245, 36, 36, 245, 407, 36, 0, 36, - /* 2270 */ 36, 245, 36, 0, 0, 245, 0, 36, 0, 36, - /* 2280 */ 0, 22, 0, 36, 240, 0, 227, 0, 71, 227, - /* 2290 */ 221, 74, 228, 219, 0, 0, 437, 0, 215, 214, - /* 2300 */ 0, 0, 85, 161, 51, 51, 0, 36, 0, 0, - /* 2310 */ 0, 36, 453, 51, 455, 51, 47, 0, 57, 0, - /* 2320 */ 0, 0, 0, 0, 0, 0, 0, 12, 13, 0, - /* 2330 */ 0, 0, 115, 392, 36, 118, 179, 22, 179, 0, + /* 2210 */ 270, 271, 453, 398, 274, 275, 276, 277, 278, 400, + /* 2220 */ 453, 399, 282, 283, 284, 285, 286, 287, 288, 12, + /* 2230 */ 13, 492, 453, 453, 453, 439, 453, 20, 453, 22, + /* 2240 */ 453, 483, 453, 453, 453, 453, 429, 453, 474, 474, + /* 2250 */ 429, 392, 439, 36, 429, 38, 390, 0, 0, 0, + /* 2260 */ 47, 0, 36, 245, 36, 245, 407, 36, 36, 0, + /* 2270 */ 36, 36, 245, 36, 0, 0, 245, 0, 36, 0, + /* 2280 */ 36, 0, 22, 0, 36, 240, 0, 227, 71, 0, + /* 2290 */ 227, 74, 228, 221, 219, 0, 437, 0, 0, 215, + /* 2300 */ 214, 0, 85, 0, 161, 51, 51, 0, 36, 0, + /* 2310 */ 0, 0, 453, 57, 455, 51, 36, 0, 47, 0, + /* 2320 */ 0, 0, 0, 0, 51, 0, 0, 12, 13, 0, + /* 2330 */ 0, 179, 115, 392, 0, 118, 36, 22, 179, 0, /* 2340 */ 0, 0, 0, 0, 0, 0, 0, 0, 407, 0, /* 2350 */ 0, 36, 0, 38, 0, 0, 0, 0, 0, 500, - /* 2360 */ 0, 0, 503, 51, 0, 47, 507, 508, 509, 510, - /* 2370 */ 511, 512, 155, 156, 515, 516, 517, 0, 437, 161, + /* 2360 */ 0, 0, 503, 0, 51, 0, 507, 508, 509, 510, + /* 2370 */ 511, 512, 155, 156, 515, 516, 517, 0, 437, 47, /* 2380 */ 0, 522, 0, 524, 0, 0, 71, 528, 529, 0, - /* 2390 */ 0, 0, 0, 0, 453, 0, 455, 22, 0, 160, - /* 2400 */ 0, 159, 0, 0, 0, 22, 71, 0, 22, 71, - /* 2410 */ 36, 194, 195, 0, 52, 52, 0, 0, 0, 71, + /* 2390 */ 0, 0, 0, 0, 453, 22, 455, 0, 0, 161, + /* 2400 */ 160, 0, 159, 0, 0, 22, 0, 71, 22, 0, + /* 2410 */ 36, 194, 195, 0, 52, 0, 52, 0, 0, 71, /* 2420 */ 44, 204, 205, 36, 71, 57, 0, 57, 0, 57, - /* 2430 */ 36, 0, 44, 36, 0, 36, 219, 56, 221, 0, - /* 2440 */ 44, 500, 36, 226, 503, 0, 14, 33, 507, 508, - /* 2450 */ 509, 510, 511, 512, 44, 47, 515, 516, 517, 0, - /* 2460 */ 51, 0, 51, 522, 45, 524, 51, 44, 0, 528, - /* 2470 */ 529, 254, 255, 256, 0, 258, 259, 260, 261, 262, + /* 2430 */ 71, 36, 44, 0, 0, 36, 219, 56, 221, 0, + /* 2440 */ 44, 500, 0, 226, 503, 51, 36, 36, 507, 508, + /* 2450 */ 509, 510, 511, 512, 47, 33, 515, 516, 517, 51, + /* 2460 */ 44, 14, 0, 522, 45, 524, 0, 0, 44, 528, + /* 2470 */ 529, 254, 255, 256, 51, 258, 259, 260, 261, 262, /* 2480 */ 263, 264, 265, 266, 267, 268, 269, 270, 271, 1, - /* 2490 */ 0, 274, 275, 276, 277, 278, 44, 0, 210, 282, - /* 2500 */ 283, 284, 285, 286, 287, 288, 51, 19, 0, 51, - /* 2510 */ 0, 0, 79, 0, 0, 392, 36, 57, 0, 44, - /* 2520 */ 36, 57, 44, 0, 57, 36, 38, 44, 0, 36, - /* 2530 */ 407, 44, 0, 57, 219, 0, 221, 0, 0, 0, - /* 2540 */ 36, 53, 54, 0, 0, 57, 22, 126, 128, 0, - /* 2550 */ 0, 36, 22, 36, 66, 67, 68, 69, 36, 71, - /* 2560 */ 437, 36, 36, 36, 33, 36, 33, 252, 253, 254, - /* 2570 */ 36, 0, 36, 22, 22, 22, 453, 36, 455, 0, - /* 2580 */ 22, 36, 36, 36, 0, 22, 0, 0, 0, 274, - /* 2590 */ 275, 36, 36, 0, 0, 36, 36, 282, 283, 284, - /* 2600 */ 285, 286, 287, 0, 22, 117, 36, 59, 36, 20, - /* 2610 */ 122, 36, 0, 119, 118, 51, 118, 0, 196, 36, - /* 2620 */ 22, 392, 0, 500, 22, 196, 503, 226, 0, 202, + /* 2490 */ 0, 274, 275, 276, 277, 278, 0, 44, 210, 282, + /* 2500 */ 283, 284, 285, 286, 287, 288, 0, 19, 51, 0, + /* 2510 */ 51, 0, 0, 0, 79, 392, 0, 36, 57, 44, + /* 2520 */ 0, 36, 57, 44, 0, 36, 38, 57, 44, 0, + /* 2530 */ 407, 36, 0, 57, 219, 44, 221, 0, 0, 0, + /* 2540 */ 0, 53, 54, 36, 0, 57, 0, 126, 128, 22, + /* 2550 */ 36, 0, 22, 36, 66, 67, 68, 69, 36, 71, + /* 2560 */ 437, 36, 36, 0, 36, 0, 33, 252, 253, 254, + /* 2570 */ 36, 36, 36, 0, 22, 33, 453, 36, 455, 36, + /* 2580 */ 22, 36, 22, 36, 22, 0, 22, 0, 0, 274, + /* 2590 */ 275, 36, 0, 36, 0, 36, 0, 282, 283, 284, + /* 2600 */ 285, 286, 287, 36, 0, 117, 22, 59, 36, 20, + /* 2610 */ 122, 36, 36, 119, 0, 118, 118, 51, 0, 36, + /* 2620 */ 22, 392, 0, 500, 22, 196, 503, 196, 226, 202, /* 2630 */ 507, 508, 509, 510, 511, 512, 407, 232, 515, 516, - /* 2640 */ 517, 153, 196, 0, 392, 196, 206, 222, 206, 196, - /* 2650 */ 3, 33, 318, 22, 318, 231, 36, 36, 118, 407, - /* 2660 */ 52, 119, 52, 33, 51, 33, 437, 33, 33, 33, - /* 2670 */ 51, 3, 118, 36, 33, 36, 119, 318, 36, 118, - /* 2680 */ 114, 119, 453, 118, 455, 116, 198, 36, 200, 437, - /* 2690 */ 85, 203, 569, 570, 36, 119, 208, 119, 118, 118, - /* 2700 */ 36, 36, 33, 118, 51, 453, 477, 455, 51, 119, - /* 2710 */ 118, 0, 0, 0, 119, 227, 119, 118, 44, 119, - /* 2720 */ 392, 44, 203, 119, 0, 119, 119, 118, 44, 500, - /* 2730 */ 119, 33, 503, 118, 118, 407, 507, 508, 509, 510, - /* 2740 */ 511, 512, 118, 302, 515, 516, 517, 290, 119, 2, - /* 2750 */ 22, 51, 500, 254, 51, 503, 118, 22, 118, 507, - /* 2760 */ 508, 509, 510, 511, 512, 437, 199, 515, 516, 517, - /* 2770 */ 116, 392, 199, 118, 118, 198, 0, 116, 119, 0, - /* 2780 */ 118, 453, 119, 455, 118, 118, 407, 44, 118, 118, - /* 2790 */ 118, 118, 22, 51, 119, 119, 118, 118, 118, 118, - /* 2800 */ 199, 119, 119, 118, 392, 477, 118, 120, 22, 118, - /* 2810 */ 558, 121, 118, 118, 118, 118, 437, 36, 129, 407, - /* 2820 */ 119, 36, 118, 33, 119, 36, 118, 36, 500, 119, + /* 2640 */ 517, 153, 196, 0, 392, 231, 0, 222, 196, 206, + /* 2650 */ 196, 206, 3, 33, 22, 318, 33, 36, 52, 407, + /* 2660 */ 36, 52, 33, 33, 51, 85, 437, 118, 51, 119, + /* 2670 */ 33, 118, 33, 119, 118, 3, 36, 33, 36, 51, + /* 2680 */ 119, 36, 453, 36, 455, 114, 198, 118, 200, 437, + /* 2690 */ 116, 203, 569, 570, 36, 118, 208, 119, 119, 118, + /* 2700 */ 118, 36, 36, 33, 118, 453, 477, 455, 51, 119, + /* 2710 */ 119, 118, 0, 0, 119, 227, 119, 118, 318, 119, + /* 2720 */ 392, 44, 119, 0, 119, 44, 119, 0, 118, 500, + /* 2730 */ 118, 44, 503, 118, 302, 407, 507, 508, 509, 510, + /* 2740 */ 511, 512, 33, 118, 515, 516, 517, 2, 318, 51, + /* 2750 */ 119, 116, 500, 290, 116, 503, 22, 254, 51, 507, + /* 2760 */ 508, 509, 510, 511, 512, 437, 118, 515, 516, 517, + /* 2770 */ 118, 392, 118, 203, 118, 22, 257, 118, 0, 44, + /* 2780 */ 119, 453, 119, 455, 120, 118, 407, 118, 0, 118, + /* 2790 */ 22, 118, 118, 51, 119, 119, 118, 118, 118, 22, + /* 2800 */ 199, 118, 140, 119, 392, 477, 118, 199, 118, 198, + /* 2810 */ 558, 118, 121, 118, 118, 199, 437, 36, 119, 407, + /* 2820 */ 118, 118, 36, 129, 119, 119, 118, 36, 500, 118, /* 2830 */ 36, 503, 453, 119, 455, 507, 508, 509, 510, 511, - /* 2840 */ 512, 119, 36, 515, 516, 517, 232, 36, 257, 437, - /* 2850 */ 119, 118, 118, 36, 118, 140, 477, 140, 140, 140, - /* 2860 */ 22, 79, 78, 22, 36, 453, 36, 455, 36, 392, - /* 2870 */ 36, 36, 36, 36, 112, 36, 36, 85, 36, 500, - /* 2880 */ 36, 85, 503, 112, 407, 33, 507, 508, 509, 510, - /* 2890 */ 511, 512, 392, 36, 515, 516, 517, 36, 36, 22, - /* 2900 */ 36, 36, 36, 85, 36, 36, 36, 407, 36, 36, - /* 2910 */ 22, 36, 500, 57, 437, 503, 0, 36, 44, 507, - /* 2920 */ 508, 509, 510, 511, 512, 0, 36, 515, 516, 517, - /* 2930 */ 453, 44, 455, 57, 0, 36, 57, 437, 44, 0, - /* 2940 */ 36, 57, 44, 0, 36, 0, 22, 0, 22, 0, - /* 2950 */ 36, 22, 33, 453, 36, 455, 36, 22, 21, 21, - /* 2960 */ 392, 573, 22, 22, 20, 573, 573, 573, 573, 573, + /* 2840 */ 512, 119, 36, 515, 516, 517, 36, 119, 119, 437, + /* 2850 */ 36, 232, 33, 36, 118, 140, 477, 140, 140, 118, + /* 2860 */ 22, 118, 79, 78, 22, 453, 22, 455, 36, 392, + /* 2870 */ 36, 36, 36, 36, 85, 36, 36, 36, 85, 500, + /* 2880 */ 22, 36, 503, 36, 407, 36, 507, 508, 509, 510, + /* 2890 */ 511, 512, 392, 33, 515, 516, 517, 36, 36, 36, + /* 2900 */ 36, 36, 112, 36, 112, 85, 36, 407, 36, 36, + /* 2910 */ 36, 36, 500, 22, 437, 503, 36, 0, 36, 507, + /* 2920 */ 508, 509, 510, 511, 512, 57, 0, 515, 516, 517, + /* 2930 */ 453, 44, 455, 36, 57, 0, 44, 437, 36, 44, + /* 2940 */ 57, 0, 36, 57, 44, 0, 36, 0, 0, 22, + /* 2950 */ 22, 36, 0, 453, 22, 455, 33, 36, 36, 22, + /* 2960 */ 392, 21, 573, 573, 22, 22, 573, 21, 573, 20, /* 2970 */ 573, 573, 573, 561, 573, 407, 573, 500, 573, 573, /* 2980 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, /* 2990 */ 573, 573, 515, 516, 517, 573, 573, 573, 573, 573, @@ -1552,7 +1162,7 @@ static const YYCODETYPE yy_lookahead[] = { /* 4850 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, /* 4860 */ 389, 389, 389, 389, }; -#define YY_SHIFT_COUNT (1024) +#define YY_SHIFT_COUNT (1025) #define YY_SHIFT_MIN (0) #define YY_SHIFT_MAX (2989) static const unsigned short int yy_shift_ofst[] = { @@ -1562,103 +1172,103 @@ static const unsigned short int yy_shift_ofst[] = { /* 30 */ 1940, 1940, 1663, 1940, 1940, 1940, 1940, 1940, 1940, 1940, /* 40 */ 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, /* 50 */ 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, - /* 60 */ 1940, 1940, 1940, 34, 66, 180, 253, 46, 122, 46, - /* 70 */ 46, 253, 253, 46, 960, 46, 276, 960, 520, 46, - /* 80 */ 149, 2315, 156, 156, 212, 212, 2315, 2315, 598, 598, - /* 90 */ 156, 20, 20, 346, 89, 89, 69, 204, 212, 212, - /* 100 */ 212, 212, 212, 212, 212, 212, 212, 212, 212, 333, - /* 110 */ 444, 573, 212, 212, 585, 149, 212, 333, 212, 149, - /* 120 */ 212, 212, 212, 212, 149, 212, 212, 212, 149, 212, - /* 130 */ 149, 149, 149, 648, 222, 222, 473, 473, 745, 652, + /* 60 */ 1940, 1940, 1940, 66, 482, 455, 198, 90, 122, 90, + /* 70 */ 90, 198, 198, 90, 960, 90, 276, 960, 313, 90, + /* 80 */ 89, 2315, 156, 156, 149, 149, 2315, 2315, 598, 598, + /* 90 */ 156, 377, 377, 443, 487, 487, 178, 37, 149, 149, + /* 100 */ 149, 149, 149, 149, 149, 149, 149, 149, 149, 180, + /* 110 */ 225, 429, 149, 149, 387, 89, 149, 180, 149, 89, + /* 120 */ 149, 149, 149, 149, 89, 149, 149, 149, 89, 149, + /* 130 */ 89, 89, 89, 427, 222, 222, 473, 473, 745, 652, /* 140 */ 181, 51, 548, 548, 548, 548, 548, 548, 548, 548, /* 150 */ 548, 548, 548, 548, 548, 548, 548, 548, 548, 548, - /* 160 */ 548, 1858, 200, 20, 346, 849, 849, 710, 379, 379, - /* 170 */ 379, 927, 927, 699, 1091, 710, 585, 149, 614, 149, - /* 180 */ 149, 466, 149, 149, 683, 149, 683, 683, 728, 25, + /* 160 */ 548, 1858, 200, 377, 443, 702, 702, 823, 768, 768, + /* 170 */ 768, 708, 708, 1354, 661, 823, 387, 89, 596, 89, + /* 180 */ 89, 366, 89, 89, 658, 89, 658, 658, 704, 747, /* 190 */ 2488, 473, 473, 473, 473, 473, 473, 1190, 21, 53, - /* 200 */ 411, 411, 314, 148, 23, 220, 152, 596, 213, 571, - /* 210 */ 560, 560, 892, 662, 1043, 1043, 1043, 382, 1043, 774, - /* 220 */ 757, 92, 896, 1442, 1208, 682, 1247, 1247, 1254, 1320, - /* 230 */ 1320, 1082, 1000, 241, 1247, 1091, 1510, 1772, 1812, 1814, - /* 240 */ 1601, 585, 1814, 585, 1639, 1812, 1842, 1819, 1842, 1819, - /* 250 */ 1686, 1812, 1842, 1812, 1819, 1686, 1686, 1686, 1782, 1788, - /* 260 */ 1812, 1812, 1792, 1812, 1812, 1812, 1886, 1860, 1886, 1860, - /* 270 */ 1814, 585, 585, 1896, 585, 1935, 1937, 585, 1935, 585, - /* 280 */ 1943, 585, 1948, 585, 585, 1921, 1921, 1812, 585, 1886, - /* 290 */ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - /* 300 */ 149, 1812, 25, 25, 1886, 683, 683, 683, 1759, 1881, - /* 310 */ 1814, 648, 1992, 1799, 1806, 1896, 648, 1510, 1812, 683, - /* 320 */ 1714, 1717, 1714, 1717, 1712, 1836, 1714, 1724, 1726, 1745, - /* 330 */ 1510, 1749, 1763, 1738, 1739, 1740, 1842, 2061, 1954, 1770, - /* 340 */ 1935, 648, 648, 1717, 683, 683, 683, 683, 1717, 683, - /* 350 */ 1924, 648, 683, 1948, 648, 2015, 683, 1944, 1948, 648, - /* 360 */ 728, 648, 1842, 683, 683, 683, 683, 683, 683, 683, - /* 370 */ 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, - /* 380 */ 683, 683, 683, 683, 683, 2034, 683, 1812, 648, 2155, - /* 390 */ 2148, 2152, 2151, 1886, 4475, 4475, 4475, 4475, 4475, 4475, - /* 400 */ 4475, 4475, 4475, 4475, 4475, 4475, 39, 2989, 70, 1146, + /* 200 */ 411, 411, 81, 148, 23, 606, 152, 545, 213, 333, + /* 210 */ 414, 414, 1062, 757, 1182, 1182, 1182, 1229, 1182, 815, + /* 220 */ 1037, 957, 1272, 1439, 1310, 476, 374, 374, 1254, 1297, + /* 230 */ 1297, 354, 1462, 1256, 374, 661, 1496, 1768, 1809, 1814, + /* 240 */ 1601, 387, 1814, 387, 1623, 1809, 1839, 1816, 1839, 1816, + /* 250 */ 1685, 1809, 1839, 1809, 1816, 1685, 1685, 1685, 1782, 1788, + /* 260 */ 1809, 1809, 1793, 1809, 1809, 1809, 1892, 1862, 1892, 1862, + /* 270 */ 1814, 387, 387, 1922, 387, 1936, 1938, 387, 1936, 387, + /* 280 */ 1946, 387, 1949, 387, 387, 1918, 1918, 1809, 387, 1892, + /* 290 */ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + /* 300 */ 89, 1809, 747, 747, 1892, 658, 658, 658, 1760, 1889, + /* 310 */ 1814, 427, 1992, 1811, 1810, 1922, 427, 1496, 1809, 658, + /* 320 */ 1715, 1722, 1715, 1722, 1721, 1841, 1715, 1725, 1731, 1750, + /* 330 */ 1496, 1757, 1764, 1734, 1740, 1746, 1839, 2067, 1959, 1786, + /* 340 */ 1936, 427, 427, 1722, 658, 658, 658, 658, 1722, 658, + /* 350 */ 1929, 427, 658, 1949, 427, 2022, 658, 1945, 1949, 427, + /* 360 */ 704, 427, 1839, 658, 658, 658, 658, 658, 658, 658, + /* 370 */ 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, + /* 380 */ 658, 658, 658, 658, 658, 2044, 658, 1809, 427, 2146, + /* 390 */ 2148, 2147, 2150, 1892, 4475, 4475, 4475, 4475, 4475, 4475, + /* 400 */ 4475, 4475, 4475, 4475, 4475, 4475, 39, 2989, 298, 1146, /* 410 */ 1193, 1243, 1425, 1711, 715, 1434, 1560, 1570, 1124, 497, /* 420 */ 770, 1584, 1542, 1861, 1878, 1699, 1808, 1004, 1169, 1026, /* 430 */ 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 237, 150, - /* 440 */ 992, 831, 3, 3, 681, 106, 321, 182, 686, 711, - /* 450 */ 334, 752, 837, 767, 928, 928, 687, 736, 1138, 687, - /* 460 */ 687, 687, 1407, 1275, 1206, 1382, 1446, 1365, 1473, 1509, - /* 470 */ 10, 1495, 1373, 399, 1374, 1403, 399, 1408, 1478, 1499, - /* 480 */ 1526, 1302, 1527, 1538, 1545, 1396, 1469, 1489, 179, 1500, - /* 490 */ 1513, 1519, 1561, 1351, 1301, 1130, 1507, 1562, 1568, 1569, - /* 500 */ 1563, 1577, 1488, 1587, 1610, 1632, 1573, 1625, 1633, 1645, - /* 510 */ 1653, 1657, 1558, 1591, 1624, 1692, 1704, 1718, 1720, 1723, - /* 520 */ 1733, 1737, 1741, 1667, 399, 1708, 1730, 1735, 1736, 1742, - /* 530 */ 1575, 1682, 1541, 1589, 1743, 1744, 1719, 1702, 2256, 2257, - /* 540 */ 2258, 2212, 2260, 2225, 2017, 2227, 2228, 2231, 2020, 2268, - /* 550 */ 2233, 2234, 2026, 2236, 2273, 2274, 2030, 2276, 2241, 2278, - /* 560 */ 2243, 2280, 2259, 2282, 2247, 2044, 2285, 2059, 2287, 2062, - /* 570 */ 2064, 2069, 2074, 2294, 2295, 2297, 2083, 2085, 2300, 2301, - /* 580 */ 2142, 2253, 2254, 2306, 2271, 2308, 2309, 2275, 2261, 2310, - /* 590 */ 2262, 2319, 2269, 2317, 2320, 2321, 2264, 2322, 2323, 2324, - /* 600 */ 2325, 2326, 2329, 2157, 2298, 2330, 2159, 2331, 2339, 2340, - /* 610 */ 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2349, 2350, 2352, - /* 620 */ 2354, 2355, 2356, 2357, 2358, 2360, 2361, 2312, 2364, 2318, - /* 630 */ 2377, 2382, 2384, 2385, 2389, 2390, 2391, 2392, 2393, 2395, - /* 640 */ 2375, 2398, 2218, 2380, 2239, 2400, 2242, 2402, 2403, 2383, - /* 650 */ 2362, 2386, 2363, 2404, 2335, 2407, 2338, 2374, 2413, 2348, - /* 660 */ 2416, 2353, 2417, 2418, 2387, 2368, 2376, 2426, 2394, 2370, - /* 670 */ 2388, 2428, 2397, 2372, 2396, 2431, 2399, 2434, 2381, 2439, - /* 680 */ 2406, 2445, 2408, 2410, 2414, 2409, 2411, 2432, 2415, 2459, - /* 690 */ 2419, 2423, 2461, 2468, 2474, 2490, 2452, 2288, 2497, 2409, - /* 700 */ 2455, 2508, 2409, 2458, 2510, 2511, 2433, 2513, 2514, 2480, - /* 710 */ 2460, 2475, 2518, 2484, 2464, 2478, 2523, 2489, 2467, 2483, - /* 720 */ 2528, 2493, 2476, 2487, 2532, 2535, 2537, 2538, 2539, 2504, - /* 730 */ 2543, 2544, 2420, 2421, 2515, 2524, 2549, 2530, 2517, 2522, - /* 740 */ 2525, 2526, 2527, 2529, 2534, 2536, 2541, 2531, 2533, 2545, - /* 750 */ 2546, 2552, 2547, 2550, 2551, 2571, 2553, 2579, 2558, 2548, - /* 760 */ 2584, 2563, 2555, 2586, 2587, 2588, 2556, 2593, 2559, 2594, - /* 770 */ 2560, 2603, 2582, 2589, 2570, 2572, 2575, 2494, 2496, 2612, - /* 780 */ 2422, 2405, 2424, 2498, 2401, 2409, 2564, 2617, 2429, 2583, - /* 790 */ 2598, 2622, 2425, 2602, 2446, 2427, 2628, 2643, 2449, 2440, - /* 800 */ 2453, 2442, 2647, 2618, 2334, 2540, 2542, 2554, 2557, 2631, - /* 810 */ 2561, 2562, 2620, 2621, 2565, 2608, 2569, 2610, 2566, 2576, - /* 820 */ 2630, 2632, 2578, 2580, 2581, 2585, 2590, 2634, 2613, 2619, - /* 830 */ 2592, 2635, 2336, 2605, 2595, 2636, 2599, 2637, 2597, 2600, - /* 840 */ 2668, 2641, 2359, 2639, 2642, 2651, 2658, 2664, 2665, 2604, - /* 850 */ 2606, 2653, 2441, 2669, 2657, 2711, 2712, 2609, 2674, 2607, - /* 860 */ 2611, 2615, 2616, 2567, 2624, 2713, 2677, 2519, 2724, 2629, - /* 870 */ 2638, 2573, 2684, 2577, 2698, 2654, 2457, 2661, 2747, 2728, - /* 880 */ 2499, 2640, 2655, 2656, 2662, 2666, 2659, 2663, 2667, 2670, - /* 890 */ 2671, 2672, 2673, 2675, 2700, 2678, 2679, 2703, 2676, 2735, - /* 900 */ 2591, 2680, 2681, 2776, 2682, 2685, 2601, 2743, 2688, 2687, - /* 910 */ 2779, 2770, 2690, 2691, 2409, 2742, 2694, 2695, 2683, 2696, - /* 920 */ 2697, 2689, 2786, 2614, 2701, 2781, 2785, 2704, 2705, 2789, - /* 930 */ 2708, 2710, 2791, 2667, 2714, 2794, 2670, 2722, 2806, 2671, - /* 940 */ 2731, 2811, 2672, 2715, 2717, 2718, 2719, 2733, 2790, 2734, - /* 950 */ 2817, 2736, 2790, 2790, 2838, 2782, 2784, 2841, 2828, 2830, - /* 960 */ 2832, 2834, 2835, 2836, 2837, 2839, 2840, 2842, 2844, 2792, - /* 970 */ 2762, 2796, 2771, 2852, 2857, 2861, 2862, 2877, 2864, 2865, - /* 980 */ 2866, 2818, 2531, 2868, 2533, 2869, 2870, 2872, 2873, 2888, - /* 990 */ 2875, 2916, 2881, 2856, 2874, 2925, 2890, 2876, 2887, 2934, - /* 1000 */ 2899, 2879, 2894, 2939, 2904, 2884, 2898, 2943, 2908, 2945, - /* 1010 */ 2924, 2947, 2926, 2914, 2949, 2929, 2919, 2918, 2920, 2935, - /* 1020 */ 2937, 2940, 2941, 2938, 2944, + /* 440 */ 992, 813, 3, 3, 343, 106, 321, 182, 370, 646, + /* 450 */ 420, 378, 1011, 124, 751, 751, 1063, 1081, 1138, 1063, + /* 460 */ 1063, 1063, 530, 334, 1395, 1456, 1488, 921, 1349, 1469, + /* 470 */ 5, 794, 1350, 1486, 1403, 1405, 1486, 1422, 882, 1526, + /* 480 */ 1527, 1538, 1610, 1611, 1636, 1088, 1445, 1489, 179, 1519, + /* 490 */ 1561, 1562, 1569, 1391, 1466, 1470, 1500, 1587, 1633, 1634, + /* 500 */ 1564, 1645, 1492, 1571, 1653, 1658, 1575, 1667, 1671, 1708, + /* 510 */ 1709, 1712, 1612, 1683, 1718, 1720, 1723, 1737, 1742, 1744, + /* 520 */ 1747, 1749, 1755, 1696, 1486, 1730, 1736, 1743, 1766, 1778, + /* 530 */ 1483, 1552, 335, 1476, 1738, 1762, 1748, 1135, 2257, 2258, + /* 540 */ 2259, 2213, 2261, 2226, 2018, 2228, 2231, 2232, 2020, 2269, + /* 550 */ 2234, 2235, 2027, 2237, 2274, 2275, 2031, 2277, 2242, 2279, + /* 560 */ 2244, 2281, 2260, 2283, 2248, 2045, 2286, 2060, 2289, 2063, + /* 570 */ 2064, 2072, 2075, 2295, 2297, 2298, 2084, 2086, 2301, 2303, + /* 580 */ 2143, 2254, 2255, 2307, 2272, 2309, 2310, 2280, 2256, 2311, + /* 590 */ 2264, 2317, 2271, 2319, 2320, 2321, 2273, 2322, 2323, 2325, + /* 600 */ 2326, 2329, 2330, 2152, 2300, 2334, 2159, 2339, 2340, 2341, + /* 610 */ 2342, 2343, 2344, 2345, 2346, 2347, 2349, 2350, 2352, 2354, + /* 620 */ 2355, 2356, 2357, 2358, 2360, 2361, 2363, 2313, 2365, 2332, + /* 630 */ 2377, 2380, 2382, 2384, 2385, 2389, 2390, 2391, 2392, 2393, + /* 640 */ 2373, 2397, 2238, 2398, 2240, 2401, 2243, 2403, 2404, 2383, + /* 650 */ 2362, 2386, 2364, 2406, 2336, 2409, 2348, 2374, 2413, 2353, + /* 660 */ 2415, 2359, 2417, 2418, 2387, 2368, 2376, 2426, 2395, 2370, + /* 670 */ 2388, 2428, 2399, 2372, 2396, 2433, 2410, 2434, 2381, 2439, + /* 680 */ 2411, 2442, 2407, 2416, 2422, 2394, 2408, 2447, 2423, 2462, + /* 690 */ 2419, 2424, 2466, 2467, 2490, 2496, 2453, 2288, 2506, 2394, + /* 700 */ 2457, 2509, 2394, 2459, 2511, 2512, 2435, 2513, 2516, 2481, + /* 710 */ 2461, 2475, 2520, 2485, 2465, 2479, 2524, 2489, 2470, 2484, + /* 720 */ 2529, 2495, 2476, 2491, 2532, 2537, 2538, 2539, 2540, 2507, + /* 730 */ 2544, 2546, 2420, 2421, 2514, 2527, 2551, 2530, 2517, 2522, + /* 740 */ 2525, 2526, 2528, 2534, 2535, 2536, 2541, 2533, 2542, 2543, + /* 750 */ 2545, 2552, 2547, 2563, 2558, 2565, 2560, 2573, 2562, 2548, + /* 760 */ 2585, 2564, 2555, 2587, 2588, 2592, 2557, 2594, 2559, 2596, + /* 770 */ 2567, 2604, 2584, 2589, 2572, 2575, 2576, 2494, 2497, 2614, + /* 780 */ 2429, 2405, 2414, 2498, 2402, 2394, 2566, 2618, 2431, 2583, + /* 790 */ 2598, 2622, 2425, 2602, 2446, 2427, 2643, 2646, 2452, 2443, + /* 800 */ 2454, 2445, 2649, 2620, 2337, 2549, 2550, 2553, 2554, 2632, + /* 810 */ 2556, 2561, 2621, 2624, 2569, 2606, 2574, 2609, 2571, 2578, + /* 820 */ 2623, 2629, 2579, 2577, 2581, 2582, 2590, 2630, 2613, 2617, + /* 830 */ 2586, 2637, 2400, 2580, 2591, 2639, 2593, 2640, 2595, 2597, + /* 840 */ 2672, 2644, 2430, 2642, 2645, 2647, 2658, 2665, 2666, 2600, + /* 850 */ 2603, 2628, 2432, 2670, 2657, 2712, 2713, 2599, 2677, 2605, + /* 860 */ 2607, 2610, 2612, 2601, 2615, 2723, 2681, 2570, 2727, 2631, + /* 870 */ 2625, 2608, 2687, 2611, 2709, 2635, 2463, 2638, 2745, 2734, + /* 880 */ 2503, 2648, 2652, 2654, 2656, 2659, 2661, 2663, 2667, 2669, + /* 890 */ 2671, 2673, 2674, 2675, 2698, 2678, 2679, 2707, 2676, 2753, + /* 900 */ 2519, 2680, 2683, 2778, 2684, 2688, 2616, 2735, 2690, 2664, + /* 910 */ 2788, 2768, 2691, 2693, 2394, 2742, 2695, 2696, 2699, 2702, + /* 920 */ 2703, 2694, 2777, 2619, 2705, 2781, 2786, 2708, 2706, 2791, + /* 930 */ 2711, 2714, 2794, 2667, 2722, 2806, 2669, 2728, 2810, 2671, + /* 940 */ 2729, 2814, 2673, 2662, 2715, 2717, 2718, 2736, 2819, 2741, + /* 950 */ 2817, 2743, 2819, 2819, 2838, 2783, 2785, 2842, 2844, 2832, + /* 960 */ 2834, 2835, 2836, 2837, 2839, 2840, 2841, 2845, 2847, 2849, + /* 970 */ 2789, 2790, 2793, 2792, 2860, 2861, 2862, 2863, 2858, 2864, + /* 980 */ 2865, 2867, 2820, 2533, 2870, 2542, 2872, 2873, 2874, 2875, + /* 990 */ 2891, 2880, 2917, 2882, 2868, 2887, 2926, 2897, 2877, 2892, + /* 1000 */ 2935, 2902, 2883, 2895, 2941, 2906, 2886, 2900, 2945, 2910, + /* 1010 */ 2947, 2927, 2948, 2928, 2915, 2952, 2932, 2923, 2921, 2922, + /* 1020 */ 2937, 2940, 2942, 2943, 2946, 2949, }; #define YY_REDUCE_COUNT (405) #define YY_REDUCE_MIN (-536) @@ -1671,145 +1281,145 @@ static const short yy_reduce_ofst[] = { /* 40 */ 3089, 3111, 3176, 3195, 3217, 3282, 3331, 3351, 3371, 3458, /* 50 */ 3477, 3497, 3564, 3584, 3603, 3671, 3690, 3739, 3759, 3827, /* 60 */ 3851, 3933, 3957, -351, 448, 605, -290, -366, 481, 1203, - /* 70 */ 1464, 329, 442, 1485, -412, -536, -153, -393, -534, 14, - /* 80 */ 197, 347, -106, -49, 254, 271, 480, 511, -400, -398, - /* 90 */ -368, -374, -100, -245, 57, 192, 164, -382, -90, 507, - /* 100 */ 539, 551, 43, 229, 718, 806, 834, 843, 305, 151, - /* 110 */ -114, 385, 847, 879, 639, 472, 889, 218, 900, 706, - /* 120 */ 983, 995, 997, 1006, -219, 1029, 1046, 1052, 729, 1061, - /* 130 */ 228, 792, 1017, 616, 61, 61, 184, -415, -35, -259, - /* 140 */ -503, -193, -25, 443, 502, 603, 617, 658, 734, 735, - /* 150 */ 738, 778, 827, 895, 901, 935, 963, 967, 1022, 1027, - /* 160 */ 1039, -14, 121, 33, 316, 256, 588, 651, 121, 258, - /* 170 */ 363, 787, 788, 508, -28, 692, 493, 844, 768, -428, - /* 180 */ 143, 905, 189, 786, 897, 860, 899, 1016, 754, 739, - /* 190 */ 471, 568, 574, 737, 755, 766, 784, 724, 950, 1011, - /* 200 */ 823, 823, 721, 987, 1034, 1072, 1217, 823, 1192, 1192, - /* 210 */ 1236, 1261, 1292, 1244, 1162, 1200, 1202, 1296, 1218, 1192, - /* 220 */ 1317, 1377, 1282, 1383, 1332, 1312, 1334, 1338, 1192, 1262, - /* 230 */ 1263, 1248, 1278, 1265, 1350, 1400, 1348, 1329, 1427, 1344, - /* 240 */ 1342, 1426, 1349, 1435, 1360, 1453, 1456, 1409, 1465, 1416, - /* 250 */ 1421, 1475, 1476, 1479, 1433, 1429, 1437, 1438, 1482, 1486, - /* 260 */ 1497, 1501, 1491, 1503, 1504, 1505, 1514, 1511, 1516, 1517, - /* 270 */ 1444, 1521, 1529, 1487, 1539, 1548, 1477, 1544, 1553, 1550, - /* 280 */ 1494, 1552, 1506, 1554, 1555, 1546, 1551, 1571, 1566, 1576, - /* 290 */ 1549, 1556, 1557, 1559, 1564, 1565, 1572, 1578, 1579, 1580, - /* 300 */ 1581, 1586, 1592, 1593, 1596, 1537, 1583, 1585, 1508, 1520, - /* 310 */ 1531, 1594, 1533, 1540, 1547, 1588, 1620, 1574, 1634, 1598, - /* 320 */ 1490, 1590, 1492, 1597, 1502, 1515, 1512, 1498, 1522, 1518, - /* 330 */ 1595, 1523, 1535, 1528, 1536, 1543, 1672, 1599, 1567, 1602, - /* 340 */ 1678, 1674, 1675, 1630, 1654, 1656, 1659, 1662, 1658, 1665, - /* 350 */ 1666, 1725, 1679, 1661, 1727, 1612, 1690, 1681, 1683, 1747, - /* 360 */ 1721, 1750, 1748, 1697, 1698, 1701, 1703, 1705, 1709, 1715, - /* 370 */ 1716, 1729, 1731, 1732, 1734, 1760, 1766, 1767, 1768, 1778, - /* 380 */ 1779, 1780, 1781, 1783, 1785, 1728, 1787, 1751, 1752, 1784, - /* 390 */ 1793, 1837, 1797, 1813, 1758, 1803, 1746, 1754, 1769, 1773, - /* 400 */ 1815, 1820, 1809, 1821, 1838, 1864, + /* 70 */ 1464, -8, 329, 1485, -393, -536, -153, -412, -534, 14, + /* 80 */ 197, -403, -368, -106, 254, 331, -433, -288, -400, -302, + /* 90 */ -452, -100, 28, -245, 385, 449, -71, 230, 271, 348, + /* 100 */ 364, 514, 261, 488, 526, 532, 539, 550, 517, 218, + /* 110 */ 169, 562, 718, 756, -409, 472, 806, 452, 843, 518, + /* 120 */ 847, 879, 889, 900, 739, 983, 995, 997, 609, 1006, + /* 130 */ -383, 792, 1017, 867, -361, -361, 263, -285, 189, -192, + /* 140 */ 56, 478, -25, 209, 559, 603, 681, 721, 735, 738, + /* 150 */ 778, 849, 895, 935, 963, 967, 1013, 1015, 1022, 1027, + /* 160 */ 1034, -408, 241, 33, 257, 774, 811, 819, 241, 390, + /* 170 */ 929, 549, 788, 911, 607, 913, 1052, 981, 1040, 546, + /* 180 */ 905, 628, 416, 1055, 766, 1014, 897, 1002, 928, 1098, + /* 190 */ -471, 435, 499, 555, 568, 581, 690, 838, 782, 446, + /* 200 */ 737, 737, 926, 732, 996, 988, 1157, 737, 1140, 1140, + /* 210 */ 1164, 1206, 1226, 1174, 1084, 1100, 1125, 1187, 1128, 1140, + /* 220 */ 1237, 1295, 1208, 1309, 1266, 1235, 1279, 1314, 1140, 1239, + /* 230 */ 1240, 1216, 1257, 1259, 1338, 1381, 1328, 1324, 1426, 1344, + /* 240 */ 1342, 1427, 1359, 1441, 1372, 1435, 1454, 1404, 1465, 1409, + /* 250 */ 1420, 1474, 1481, 1475, 1421, 1436, 1437, 1442, 1484, 1487, + /* 260 */ 1498, 1501, 1491, 1503, 1504, 1505, 1514, 1512, 1517, 1532, + /* 270 */ 1429, 1521, 1529, 1499, 1540, 1549, 1478, 1546, 1555, 1550, + /* 280 */ 1495, 1553, 1506, 1558, 1566, 1544, 1551, 1573, 1572, 1576, + /* 290 */ 1556, 1557, 1559, 1565, 1578, 1579, 1580, 1581, 1585, 1586, + /* 300 */ 1591, 1589, 1593, 1595, 1599, 1533, 1539, 1548, 1508, 1516, + /* 310 */ 1522, 1617, 1534, 1545, 1554, 1583, 1626, 1563, 1638, 1592, + /* 320 */ 1490, 1588, 1497, 1590, 1502, 1510, 1507, 1511, 1520, 1523, + /* 330 */ 1594, 1535, 1537, 1509, 1518, 1515, 1679, 1596, 1567, 1598, + /* 340 */ 1695, 1692, 1694, 1635, 1656, 1659, 1662, 1665, 1654, 1673, + /* 350 */ 1666, 1719, 1680, 1672, 1726, 1619, 1697, 1681, 1686, 1741, + /* 360 */ 1717, 1745, 1753, 1698, 1700, 1702, 1703, 1704, 1710, 1716, + /* 370 */ 1724, 1729, 1732, 1759, 1767, 1779, 1780, 1781, 1783, 1785, + /* 380 */ 1787, 1789, 1790, 1791, 1792, 1728, 1794, 1772, 1752, 1795, + /* 390 */ 1800, 1815, 1819, 1822, 1758, 1796, 1688, 1739, 1774, 1775, + /* 400 */ 1817, 1821, 1813, 1825, 1777, 1866, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 10 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 20 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 30 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 40 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 50 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 60 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 70 */ 2300, 2300, 2300, 2683, 2300, 2300, 2639, 2300, 2300, 2300, - /* 80 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 90 */ 2300, 2646, 2646, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 100 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 110 */ 2300, 2300, 2300, 2300, 2410, 2300, 2300, 2300, 2300, 2300, - /* 120 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 130 */ 2300, 2300, 2300, 2408, 2956, 2300, 3084, 2724, 2300, 2300, - /* 140 */ 2985, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 150 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 160 */ 2300, 2300, 2968, 2300, 2300, 2381, 2381, 2300, 2968, 2968, - /* 170 */ 2968, 2928, 2928, 2408, 2300, 2300, 2410, 2300, 2726, 2300, - /* 180 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2553, 2330, - /* 190 */ 2709, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 3014, - /* 200 */ 2960, 2961, 3078, 2300, 3017, 2979, 2300, 2974, 2300, 2300, - /* 210 */ 2300, 2300, 2300, 3004, 2300, 2300, 2300, 2300, 2300, 2300, - /* 220 */ 2651, 2300, 2752, 2300, 2496, 2703, 2300, 2300, 2300, 2300, - /* 230 */ 2300, 3062, 2958, 2998, 2300, 2300, 3008, 2300, 2300, 2300, - /* 240 */ 2740, 2410, 2300, 2410, 2696, 2634, 2300, 2644, 2300, 2644, - /* 250 */ 2641, 2300, 2300, 2300, 2644, 2641, 2641, 2641, 2484, 2480, - /* 260 */ 2300, 2300, 2478, 2300, 2300, 2300, 2300, 2360, 2300, 2360, - /* 270 */ 2300, 2410, 2410, 2300, 2410, 2300, 2300, 2410, 2300, 2410, - /* 280 */ 2300, 2410, 2300, 2410, 2410, 2513, 2513, 2300, 2410, 2300, - /* 290 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 300 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2738, 2719, - /* 310 */ 2300, 2408, 2300, 2707, 2705, 2300, 2408, 3008, 2300, 2300, - /* 320 */ 3032, 3027, 3032, 3027, 3046, 3042, 3032, 3051, 3048, 3010, - /* 330 */ 3008, 2991, 2987, 3081, 3068, 3064, 2300, 2300, 2996, 2994, - /* 340 */ 2300, 2408, 2408, 3027, 2300, 2300, 2300, 2300, 3027, 2300, - /* 350 */ 2300, 2408, 2300, 2300, 2408, 2300, 2300, 2300, 2300, 2408, - /* 360 */ 2300, 2408, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 370 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 380 */ 2300, 2300, 2300, 2300, 2300, 2515, 2300, 2300, 2408, 2300, - /* 390 */ 2332, 2334, 2344, 2300, 2698, 3084, 2724, 2729, 2679, 2679, - /* 400 */ 2556, 2556, 3084, 2556, 2411, 2305, 2300, 2300, 2300, 2300, - /* 410 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 420 */ 2300, 2300, 2857, 2300, 2300, 2300, 2300, 2300, 2300, 3045, - /* 430 */ 3044, 2858, 2300, 2932, 2931, 2930, 2921, 2857, 2509, 2300, - /* 440 */ 2300, 2300, 2856, 2855, 2300, 2300, 2300, 2300, 2300, 2300, - /* 450 */ 2300, 2300, 2300, 2300, 2670, 2669, 2849, 2300, 2300, 2850, - /* 460 */ 2848, 2847, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 470 */ 2300, 2300, 2300, 2500, 2300, 2300, 2497, 2300, 2300, 2300, - /* 480 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 490 */ 2300, 2300, 2300, 2300, 3065, 3069, 2300, 2300, 2300, 2300, - /* 500 */ 2957, 2300, 2300, 2300, 2300, 2300, 2828, 2300, 2300, 2300, - /* 510 */ 2300, 2300, 2796, 2791, 2782, 2773, 2788, 2779, 2767, 2785, - /* 520 */ 2776, 2764, 2761, 2300, 2524, 2300, 2300, 2300, 2300, 2300, - /* 530 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 540 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 550 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 560 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 570 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 580 */ 2640, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 590 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 600 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 610 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 620 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 630 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 640 */ 2300, 2300, 2300, 2300, 2300, 2300, 2655, 2300, 2300, 2300, - /* 650 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 660 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 670 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 680 */ 2300, 2300, 2300, 2300, 2349, 2835, 2300, 2300, 2300, 2300, - /* 690 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2838, - /* 700 */ 2300, 2300, 2839, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 710 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 720 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 730 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 740 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2455, 2454, 2300, - /* 750 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 760 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 770 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2840, 2300, 2300, - /* 780 */ 2300, 2300, 2723, 2300, 2300, 2830, 2300, 2300, 2300, 2300, - /* 790 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 800 */ 2300, 2300, 3061, 3011, 2300, 2300, 2300, 2300, 2300, 2300, - /* 810 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 820 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2828, - /* 830 */ 2300, 3043, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 3059, - /* 840 */ 2300, 3063, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2967, - /* 850 */ 2963, 2300, 2300, 2959, 2300, 2300, 2300, 2300, 2300, 2300, - /* 860 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 870 */ 2300, 2300, 2300, 2300, 2918, 2300, 2300, 2300, 2952, 2300, - /* 880 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2552, 2551, - /* 890 */ 2550, 2549, 2300, 2300, 2300, 2300, 2300, 2300, 2840, 2300, - /* 900 */ 2843, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 910 */ 2300, 2300, 2300, 2300, 2827, 2300, 2895, 2894, 2300, 2300, - /* 920 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2546, 2300, 2300, - /* 930 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 940 */ 2300, 2300, 2300, 2530, 2528, 2527, 2526, 2300, 2563, 2300, - /* 950 */ 2300, 2300, 2559, 2558, 2300, 2300, 2300, 2300, 2300, 2300, - /* 960 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 970 */ 2300, 2300, 2300, 2429, 2300, 2300, 2300, 2300, 2300, 2300, - /* 980 */ 2300, 2300, 2421, 2300, 2420, 2300, 2300, 2300, 2300, 2300, - /* 990 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 1000 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, - /* 1010 */ 2300, 2300, 2300, 2300, 2300, 2300, 2329, 2300, 2300, 2300, - /* 1020 */ 2300, 2300, 2300, 2300, 2300, + /* 0 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 10 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 20 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 30 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 40 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 50 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 60 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 70 */ 2303, 2303, 2303, 2687, 2303, 2303, 2643, 2303, 2303, 2303, + /* 80 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 90 */ 2303, 2650, 2650, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 100 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 110 */ 2303, 2303, 2303, 2303, 2413, 2303, 2303, 2303, 2303, 2303, + /* 120 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 130 */ 2303, 2303, 2303, 2411, 2960, 2303, 3088, 2728, 2303, 2303, + /* 140 */ 2989, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 150 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 160 */ 2303, 2303, 2972, 2303, 2303, 2384, 2384, 2303, 2972, 2972, + /* 170 */ 2972, 2932, 2932, 2411, 2303, 2303, 2413, 2303, 2730, 2303, + /* 180 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2557, 2333, + /* 190 */ 2713, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 3018, + /* 200 */ 2964, 2965, 3082, 2303, 3021, 2983, 2303, 2978, 2303, 2303, + /* 210 */ 2303, 2303, 2303, 3008, 2303, 2303, 2303, 2303, 2303, 2303, + /* 220 */ 2655, 2303, 2756, 2303, 2500, 2707, 2303, 2303, 2303, 2303, + /* 230 */ 2303, 3066, 2962, 3002, 2303, 2303, 3012, 2303, 2303, 2303, + /* 240 */ 2744, 2413, 2303, 2413, 2700, 2638, 2303, 2648, 2303, 2648, + /* 250 */ 2645, 2303, 2303, 2303, 2648, 2645, 2645, 2645, 2488, 2484, + /* 260 */ 2303, 2303, 2482, 2303, 2303, 2303, 2303, 2363, 2303, 2363, + /* 270 */ 2303, 2413, 2413, 2303, 2413, 2303, 2303, 2413, 2303, 2413, + /* 280 */ 2303, 2413, 2303, 2413, 2413, 2517, 2517, 2303, 2413, 2303, + /* 290 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 300 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2742, 2723, + /* 310 */ 2303, 2411, 2303, 2711, 2709, 2303, 2411, 3012, 2303, 2303, + /* 320 */ 3036, 3031, 3036, 3031, 3050, 3046, 3036, 3055, 3052, 3014, + /* 330 */ 3012, 2995, 2991, 3085, 3072, 3068, 2303, 2303, 3000, 2998, + /* 340 */ 2303, 2411, 2411, 3031, 2303, 2303, 2303, 2303, 3031, 2303, + /* 350 */ 2303, 2411, 2303, 2303, 2411, 2303, 2303, 2303, 2303, 2411, + /* 360 */ 2303, 2411, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 370 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 380 */ 2303, 2303, 2303, 2303, 2303, 2519, 2303, 2303, 2411, 2303, + /* 390 */ 2335, 2337, 2347, 2303, 2702, 3088, 2728, 2733, 2683, 2683, + /* 400 */ 2560, 2560, 3088, 2560, 2414, 2308, 2303, 2303, 2303, 2303, + /* 410 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 420 */ 2303, 2303, 2861, 2303, 2303, 2303, 2303, 2303, 2303, 3049, + /* 430 */ 3048, 2862, 2303, 2936, 2935, 2934, 2925, 2861, 2513, 2303, + /* 440 */ 2303, 2303, 2860, 2859, 2303, 2303, 2303, 2303, 2303, 2303, + /* 450 */ 2303, 2303, 2303, 2303, 2674, 2673, 2853, 2303, 2303, 2854, + /* 460 */ 2852, 2851, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 470 */ 2303, 2303, 2303, 2504, 2303, 2303, 2501, 2303, 2303, 2303, + /* 480 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 490 */ 2303, 2303, 2303, 2303, 3069, 3073, 2303, 2303, 2303, 2303, + /* 500 */ 2961, 2303, 2303, 2303, 2303, 2303, 2832, 2303, 2303, 2303, + /* 510 */ 2303, 2303, 2800, 2795, 2786, 2777, 2792, 2783, 2771, 2789, + /* 520 */ 2780, 2768, 2765, 2303, 2528, 2303, 2303, 2303, 2303, 2303, + /* 530 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 540 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 550 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 560 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 570 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 580 */ 2644, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 590 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 600 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 610 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 620 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 630 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 640 */ 2303, 2303, 2303, 2303, 2303, 2303, 2659, 2303, 2303, 2303, + /* 650 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 660 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 670 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 680 */ 2303, 2303, 2303, 2303, 2352, 2839, 2303, 2303, 2303, 2303, + /* 690 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2842, + /* 700 */ 2303, 2303, 2843, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 710 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 720 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 730 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 740 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2459, 2458, 2303, + /* 750 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 760 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 770 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2844, 2303, 2303, + /* 780 */ 2303, 2303, 2727, 2303, 2303, 2834, 2303, 2303, 2303, 2303, + /* 790 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 800 */ 2303, 2303, 3065, 3015, 2303, 2303, 2303, 2303, 2303, 2303, + /* 810 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 820 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2832, + /* 830 */ 2303, 3047, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 3063, + /* 840 */ 2303, 3067, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2971, + /* 850 */ 2967, 2303, 2303, 2963, 2303, 2303, 2303, 2303, 2303, 2303, + /* 860 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 870 */ 2303, 2303, 2303, 2303, 2922, 2303, 2303, 2303, 2956, 2303, + /* 880 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2556, 2555, + /* 890 */ 2554, 2553, 2303, 2303, 2303, 2303, 2303, 2303, 2844, 2303, + /* 900 */ 2847, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 910 */ 2303, 2303, 2303, 2303, 2831, 2303, 2899, 2898, 2303, 2303, + /* 920 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2550, 2303, 2303, + /* 930 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 940 */ 2303, 2303, 2303, 2534, 2532, 2531, 2530, 2303, 2567, 2303, + /* 950 */ 2303, 2303, 2563, 2562, 2303, 2303, 2303, 2303, 2303, 2303, + /* 960 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 970 */ 2303, 2303, 2303, 2303, 2432, 2303, 2303, 2303, 2303, 2303, + /* 980 */ 2303, 2303, 2303, 2424, 2303, 2423, 2303, 2303, 2303, 2303, + /* 990 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 1000 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, + /* 1010 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2332, 2303, 2303, + /* 1020 */ 2303, 2303, 2303, 2303, 2303, 2303, }; /********** End of lemon-generated parsing tables *****************************/ @@ -2271,7 +1881,6 @@ typedef struct yyParser yyParser; #ifndef NDEBUG #include -#include static FILE *yyTraceFILE = 0; static char *yyTracePrompt = 0; #endif /* NDEBUG */ @@ -3031,645 +2640,646 @@ static const char *const yyRuleName[] = { /* 142 */ "db_options ::= db_options S3_COMPACT NK_INTEGER", /* 143 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", /* 144 */ "db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING", - /* 145 */ "alter_db_options ::= alter_db_option", - /* 146 */ "alter_db_options ::= alter_db_options alter_db_option", - /* 147 */ "alter_db_option ::= BUFFER NK_INTEGER", - /* 148 */ "alter_db_option ::= CACHEMODEL NK_STRING", - /* 149 */ "alter_db_option ::= CACHESIZE NK_INTEGER", - /* 150 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", - /* 151 */ "alter_db_option ::= KEEP integer_list", - /* 152 */ "alter_db_option ::= KEEP variable_list", - /* 153 */ "alter_db_option ::= PAGES NK_INTEGER", - /* 154 */ "alter_db_option ::= REPLICA NK_INTEGER", - /* 155 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", - /* 156 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", - /* 157 */ "alter_db_option ::= MINROWS NK_INTEGER", - /* 158 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", - /* 159 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 160 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", - /* 161 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 162 */ "alter_db_option ::= S3_KEEPLOCAL NK_INTEGER", - /* 163 */ "alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE", - /* 164 */ "alter_db_option ::= S3_COMPACT NK_INTEGER", - /* 165 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", - /* 166 */ "alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING", - /* 167 */ "integer_list ::= NK_INTEGER", - /* 168 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", - /* 169 */ "variable_list ::= NK_VARIABLE", - /* 170 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", - /* 171 */ "retention_list ::= retention", - /* 172 */ "retention_list ::= retention_list NK_COMMA retention", - /* 173 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", - /* 174 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", - /* 175 */ "speed_opt ::=", - /* 176 */ "speed_opt ::= BWLIMIT NK_INTEGER", - /* 177 */ "start_opt ::=", - /* 178 */ "start_opt ::= START WITH NK_INTEGER", - /* 179 */ "start_opt ::= START WITH NK_STRING", - /* 180 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", - /* 181 */ "end_opt ::=", - /* 182 */ "end_opt ::= END WITH NK_INTEGER", - /* 183 */ "end_opt ::= END WITH NK_STRING", - /* 184 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", - /* 185 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 186 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 187 */ "cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING", - /* 188 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 189 */ "cmd ::= DROP TABLE with_opt multi_drop_clause", - /* 190 */ "cmd ::= DROP STABLE with_opt exists_opt full_table_name", - /* 191 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 192 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 193 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 194 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options", - /* 195 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 196 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 197 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options", - /* 198 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 199 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 200 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 201 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 202 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 203 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal", - /* 204 */ "multi_create_clause ::= create_subtable_clause", - /* 205 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 206 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options", - /* 207 */ "multi_drop_clause ::= drop_table_clause", - /* 208 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", - /* 209 */ "drop_table_clause ::= exists_opt full_table_name", - /* 210 */ "with_opt ::=", - /* 211 */ "with_opt ::= WITH", - /* 212 */ "specific_cols_opt ::=", - /* 213 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 214 */ "full_table_name ::= table_name", - /* 215 */ "full_table_name ::= db_name NK_DOT table_name", - /* 216 */ "tag_def_list ::= tag_def", - /* 217 */ "tag_def_list ::= tag_def_list NK_COMMA tag_def", - /* 218 */ "tag_def ::= column_name type_name", - /* 219 */ "column_def_list ::= column_def", - /* 220 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 221 */ "column_def ::= column_name type_name column_options", - /* 222 */ "type_name ::= BOOL", - /* 223 */ "type_name ::= TINYINT", - /* 224 */ "type_name ::= SMALLINT", - /* 225 */ "type_name ::= INT", - /* 226 */ "type_name ::= INTEGER", - /* 227 */ "type_name ::= BIGINT", - /* 228 */ "type_name ::= FLOAT", - /* 229 */ "type_name ::= DOUBLE", - /* 230 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 231 */ "type_name ::= TIMESTAMP", - /* 232 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 233 */ "type_name ::= TINYINT UNSIGNED", - /* 234 */ "type_name ::= SMALLINT UNSIGNED", - /* 235 */ "type_name ::= INT UNSIGNED", - /* 236 */ "type_name ::= BIGINT UNSIGNED", - /* 237 */ "type_name ::= JSON", - /* 238 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 239 */ "type_name ::= MEDIUMBLOB", - /* 240 */ "type_name ::= BLOB", - /* 241 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 242 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", - /* 243 */ "type_name ::= DECIMAL", - /* 244 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 245 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 246 */ "type_name_default_len ::= BINARY", - /* 247 */ "type_name_default_len ::= NCHAR", - /* 248 */ "type_name_default_len ::= VARCHAR", - /* 249 */ "type_name_default_len ::= VARBINARY", - /* 250 */ "tags_def_opt ::=", - /* 251 */ "tags_def_opt ::= tags_def", - /* 252 */ "tags_def ::= TAGS NK_LP tag_def_list NK_RP", - /* 253 */ "table_options ::=", - /* 254 */ "table_options ::= table_options COMMENT NK_STRING", - /* 255 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 256 */ "table_options ::= table_options WATERMARK duration_list", - /* 257 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 258 */ "table_options ::= table_options TTL NK_INTEGER", - /* 259 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 260 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 261 */ "alter_table_options ::= alter_table_option", - /* 262 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 263 */ "alter_table_option ::= COMMENT NK_STRING", - /* 264 */ "alter_table_option ::= TTL NK_INTEGER", - /* 265 */ "duration_list ::= duration_literal", - /* 266 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 267 */ "rollup_func_list ::= rollup_func_name", - /* 268 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 269 */ "rollup_func_name ::= function_name", - /* 270 */ "rollup_func_name ::= FIRST", - /* 271 */ "rollup_func_name ::= LAST", - /* 272 */ "col_name_list ::= col_name", - /* 273 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 274 */ "col_name ::= column_name", - /* 275 */ "cmd ::= SHOW DNODES", - /* 276 */ "cmd ::= SHOW USERS", - /* 277 */ "cmd ::= SHOW USERS FULL", - /* 278 */ "cmd ::= SHOW USER PRIVILEGES", - /* 279 */ "cmd ::= SHOW db_kind_opt DATABASES", - /* 280 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", - /* 281 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 282 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 283 */ "cmd ::= SHOW MNODES", - /* 284 */ "cmd ::= SHOW QNODES", - /* 285 */ "cmd ::= SHOW ANODES", - /* 286 */ "cmd ::= SHOW ANODES FULL", - /* 287 */ "cmd ::= SHOW ARBGROUPS", - /* 288 */ "cmd ::= SHOW FUNCTIONS", - /* 289 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 290 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", - /* 291 */ "cmd ::= SHOW STREAMS", - /* 292 */ "cmd ::= SHOW ACCOUNTS", - /* 293 */ "cmd ::= SHOW APPS", - /* 294 */ "cmd ::= SHOW CONNECTIONS", - /* 295 */ "cmd ::= SHOW LICENCES", - /* 296 */ "cmd ::= SHOW GRANTS", - /* 297 */ "cmd ::= SHOW GRANTS FULL", - /* 298 */ "cmd ::= SHOW GRANTS LOGS", - /* 299 */ "cmd ::= SHOW CLUSTER MACHINES", - /* 300 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 301 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 302 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 303 */ "cmd ::= SHOW ENCRYPTIONS", - /* 304 */ "cmd ::= SHOW QUERIES", - /* 305 */ "cmd ::= SHOW SCORES", - /* 306 */ "cmd ::= SHOW TOPICS", - /* 307 */ "cmd ::= SHOW VARIABLES", - /* 308 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 309 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 310 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 311 */ "cmd ::= SHOW BNODES", - /* 312 */ "cmd ::= SHOW SNODES", - /* 313 */ "cmd ::= SHOW CLUSTER", - /* 314 */ "cmd ::= SHOW TRANSACTIONS", - /* 315 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 316 */ "cmd ::= SHOW CONSUMERS", - /* 317 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 318 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 319 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", - /* 320 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 321 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", - /* 322 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", - /* 323 */ "cmd ::= SHOW VNODES", - /* 324 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 325 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 326 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", - /* 327 */ "cmd ::= SHOW CREATE VIEW full_table_name", - /* 328 */ "cmd ::= SHOW COMPACTS", - /* 329 */ "cmd ::= SHOW COMPACT NK_INTEGER", - /* 330 */ "table_kind_db_name_cond_opt ::=", - /* 331 */ "table_kind_db_name_cond_opt ::= table_kind", - /* 332 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", - /* 333 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", - /* 334 */ "table_kind ::= NORMAL", - /* 335 */ "table_kind ::= CHILD", - /* 336 */ "db_name_cond_opt ::=", - /* 337 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 338 */ "like_pattern_opt ::=", - /* 339 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 340 */ "table_name_cond ::= table_name", - /* 341 */ "from_db_opt ::=", - /* 342 */ "from_db_opt ::= FROM db_name", - /* 343 */ "tag_list_opt ::=", - /* 344 */ "tag_list_opt ::= tag_item", - /* 345 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 346 */ "tag_item ::= TBNAME", - /* 347 */ "tag_item ::= QTAGS", - /* 348 */ "tag_item ::= column_name", - /* 349 */ "tag_item ::= column_name column_alias", - /* 350 */ "tag_item ::= column_name AS column_alias", - /* 351 */ "db_kind_opt ::=", - /* 352 */ "db_kind_opt ::= USER", - /* 353 */ "db_kind_opt ::= SYSTEM", - /* 354 */ "cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP", - /* 355 */ "cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP", - /* 356 */ "cmd ::= DROP TSMA exists_opt full_tsma_name", - /* 357 */ "cmd ::= SHOW db_name_cond_opt TSMAS", - /* 358 */ "full_tsma_name ::= tsma_name", - /* 359 */ "full_tsma_name ::= db_name NK_DOT tsma_name", - /* 360 */ "tsma_func_list ::= FUNCTION NK_LP func_list NK_RP", - /* 361 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", - /* 362 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", - /* 363 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 364 */ "full_index_name ::= index_name", - /* 365 */ "full_index_name ::= db_name NK_DOT index_name", - /* 366 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 367 */ "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", - /* 368 */ "func_list ::= func", - /* 369 */ "func_list ::= func_list NK_COMMA func", - /* 370 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 371 */ "sma_func_name ::= function_name", - /* 372 */ "sma_func_name ::= COUNT", - /* 373 */ "sma_func_name ::= FIRST", - /* 374 */ "sma_func_name ::= LAST", - /* 375 */ "sma_func_name ::= LAST_ROW", - /* 376 */ "sma_stream_opt ::=", - /* 377 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 378 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 379 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 380 */ "with_meta ::= AS", - /* 381 */ "with_meta ::= WITH META AS", - /* 382 */ "with_meta ::= ONLY META AS", - /* 383 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 384 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", - /* 385 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", - /* 386 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 387 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 388 */ "cmd ::= DESC full_table_name", - /* 389 */ "cmd ::= DESCRIBE full_table_name", - /* 390 */ "cmd ::= RESET QUERY CACHE", - /* 391 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 392 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 393 */ "analyze_opt ::=", - /* 394 */ "analyze_opt ::= ANALYZE", - /* 395 */ "explain_options ::=", - /* 396 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 397 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 398 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 399 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 400 */ "agg_func_opt ::=", - /* 401 */ "agg_func_opt ::= AGGREGATE", - /* 402 */ "bufsize_opt ::=", - /* 403 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 404 */ "language_opt ::=", - /* 405 */ "language_opt ::= LANGUAGE NK_STRING", - /* 406 */ "or_replace_opt ::=", - /* 407 */ "or_replace_opt ::= OR REPLACE", - /* 408 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", - /* 409 */ "cmd ::= DROP VIEW exists_opt full_view_name", - /* 410 */ "full_view_name ::= view_name", - /* 411 */ "full_view_name ::= db_name NK_DOT view_name", - /* 412 */ "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", - /* 413 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 414 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 415 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 416 */ "col_list_opt ::=", - /* 417 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", - /* 418 */ "column_stream_def_list ::= column_stream_def", - /* 419 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", - /* 420 */ "column_stream_def ::= column_name stream_col_options", - /* 421 */ "stream_col_options ::=", - /* 422 */ "stream_col_options ::= stream_col_options PRIMARY KEY", - /* 423 */ "tag_def_or_ref_opt ::=", - /* 424 */ "tag_def_or_ref_opt ::= tags_def", - /* 425 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", - /* 426 */ "stream_options ::=", - /* 427 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 428 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 429 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 430 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 431 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 432 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 433 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 434 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 435 */ "subtable_opt ::=", - /* 436 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 437 */ "ignore_opt ::=", - /* 438 */ "ignore_opt ::= IGNORE UNTREATED", - /* 439 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 440 */ "cmd ::= KILL QUERY NK_STRING", - /* 441 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 442 */ "cmd ::= KILL COMPACT NK_INTEGER", - /* 443 */ "cmd ::= BALANCE VGROUP", - /* 444 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", - /* 445 */ "cmd ::= BALANCE VGROUP LEADER DATABASE db_name", - /* 446 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 447 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 448 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 449 */ "on_vgroup_id ::=", - /* 450 */ "on_vgroup_id ::= ON NK_INTEGER", - /* 451 */ "dnode_list ::= DNODE NK_INTEGER", - /* 452 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 453 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 454 */ "cmd ::= query_or_subquery", - /* 455 */ "cmd ::= insert_query", - /* 456 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 457 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 458 */ "tags_literal ::= NK_INTEGER", - /* 459 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", - /* 460 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", - /* 461 */ "tags_literal ::= NK_PLUS NK_INTEGER", - /* 462 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", - /* 463 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", - /* 464 */ "tags_literal ::= NK_MINUS NK_INTEGER", - /* 465 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", - /* 466 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", - /* 467 */ "tags_literal ::= NK_FLOAT", - /* 468 */ "tags_literal ::= NK_PLUS NK_FLOAT", - /* 469 */ "tags_literal ::= NK_MINUS NK_FLOAT", - /* 470 */ "tags_literal ::= NK_BIN", - /* 471 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", - /* 472 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", - /* 473 */ "tags_literal ::= NK_PLUS NK_BIN", - /* 474 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", - /* 475 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", - /* 476 */ "tags_literal ::= NK_MINUS NK_BIN", - /* 477 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", - /* 478 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", - /* 479 */ "tags_literal ::= NK_HEX", - /* 480 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", - /* 481 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", - /* 482 */ "tags_literal ::= NK_PLUS NK_HEX", - /* 483 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", - /* 484 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", - /* 485 */ "tags_literal ::= NK_MINUS NK_HEX", - /* 486 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", - /* 487 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", - /* 488 */ "tags_literal ::= NK_STRING", - /* 489 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", - /* 490 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", - /* 491 */ "tags_literal ::= NK_BOOL", - /* 492 */ "tags_literal ::= NULL", - /* 493 */ "tags_literal ::= literal_func", - /* 494 */ "tags_literal ::= literal_func NK_PLUS duration_literal", - /* 495 */ "tags_literal ::= literal_func NK_MINUS duration_literal", - /* 496 */ "tags_literal_list ::= tags_literal", - /* 497 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", - /* 498 */ "literal ::= NK_INTEGER", - /* 499 */ "literal ::= NK_FLOAT", - /* 500 */ "literal ::= NK_STRING", - /* 501 */ "literal ::= NK_BOOL", - /* 502 */ "literal ::= TIMESTAMP NK_STRING", - /* 503 */ "literal ::= duration_literal", - /* 504 */ "literal ::= NULL", - /* 505 */ "literal ::= NK_QUESTION", - /* 506 */ "duration_literal ::= NK_VARIABLE", - /* 507 */ "signed ::= NK_INTEGER", - /* 508 */ "signed ::= NK_PLUS NK_INTEGER", - /* 509 */ "signed ::= NK_MINUS NK_INTEGER", - /* 510 */ "signed ::= NK_FLOAT", - /* 511 */ "signed ::= NK_PLUS NK_FLOAT", - /* 512 */ "signed ::= NK_MINUS NK_FLOAT", - /* 513 */ "signed_literal ::= signed", - /* 514 */ "signed_literal ::= NK_STRING", - /* 515 */ "signed_literal ::= NK_BOOL", - /* 516 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 517 */ "signed_literal ::= duration_literal", - /* 518 */ "signed_literal ::= NULL", - /* 519 */ "signed_literal ::= literal_func", - /* 520 */ "signed_literal ::= NK_QUESTION", - /* 521 */ "literal_list ::= signed_literal", - /* 522 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 523 */ "db_name ::= NK_ID", - /* 524 */ "table_name ::= NK_ID", - /* 525 */ "column_name ::= NK_ID", - /* 526 */ "function_name ::= NK_ID", - /* 527 */ "view_name ::= NK_ID", - /* 528 */ "table_alias ::= NK_ID", - /* 529 */ "column_alias ::= NK_ID", - /* 530 */ "column_alias ::= NK_ALIAS", - /* 531 */ "user_name ::= NK_ID", - /* 532 */ "topic_name ::= NK_ID", - /* 533 */ "stream_name ::= NK_ID", - /* 534 */ "cgroup_name ::= NK_ID", - /* 535 */ "index_name ::= NK_ID", - /* 536 */ "tsma_name ::= NK_ID", - /* 537 */ "expr_or_subquery ::= expression", - /* 538 */ "expression ::= literal", - /* 539 */ "expression ::= pseudo_column", - /* 540 */ "expression ::= column_reference", - /* 541 */ "expression ::= function_expression", - /* 542 */ "expression ::= case_when_expression", - /* 543 */ "expression ::= NK_LP expression NK_RP", - /* 544 */ "expression ::= NK_PLUS expr_or_subquery", - /* 545 */ "expression ::= NK_MINUS expr_or_subquery", - /* 546 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 547 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 548 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 549 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 550 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 551 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 552 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 553 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 554 */ "expression_list ::= expr_or_subquery", - /* 555 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 556 */ "column_reference ::= column_name", - /* 557 */ "column_reference ::= table_name NK_DOT column_name", - /* 558 */ "column_reference ::= NK_ALIAS", - /* 559 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 560 */ "pseudo_column ::= ROWTS", - /* 561 */ "pseudo_column ::= TBNAME", - /* 562 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 563 */ "pseudo_column ::= QSTART", - /* 564 */ "pseudo_column ::= QEND", - /* 565 */ "pseudo_column ::= QDURATION", - /* 566 */ "pseudo_column ::= WSTART", - /* 567 */ "pseudo_column ::= WEND", - /* 568 */ "pseudo_column ::= WDURATION", - /* 569 */ "pseudo_column ::= IROWTS", - /* 570 */ "pseudo_column ::= ISFILLED", - /* 571 */ "pseudo_column ::= QTAGS", - /* 572 */ "pseudo_column ::= FLOW", - /* 573 */ "pseudo_column ::= FHIGH", - /* 574 */ "pseudo_column ::= FROWTS", - /* 575 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 576 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 577 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 578 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", - /* 579 */ "function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP", - /* 580 */ "function_expression ::= TRIM NK_LP expr_or_subquery NK_RP", - /* 581 */ "function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP", - /* 582 */ "function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", - /* 583 */ "function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP", - /* 584 */ "function_expression ::= substr_func NK_LP expression_list NK_RP", - /* 585 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", - /* 586 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP", - /* 587 */ "function_expression ::= REPLACE NK_LP expression_list NK_RP", - /* 588 */ "function_expression ::= literal_func", - /* 589 */ "function_expression ::= rand_func", - /* 590 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 591 */ "literal_func ::= NOW", - /* 592 */ "literal_func ::= TODAY", - /* 593 */ "rand_func ::= RAND NK_LP NK_RP", - /* 594 */ "rand_func ::= RAND NK_LP expression_list NK_RP", - /* 595 */ "substr_func ::= SUBSTR", - /* 596 */ "substr_func ::= SUBSTRING", - /* 597 */ "trim_specification_type ::= BOTH", - /* 598 */ "trim_specification_type ::= TRAILING", - /* 599 */ "trim_specification_type ::= LEADING", - /* 600 */ "noarg_func ::= NOW", - /* 601 */ "noarg_func ::= TODAY", - /* 602 */ "noarg_func ::= TIMEZONE", - /* 603 */ "noarg_func ::= DATABASE", - /* 604 */ "noarg_func ::= CLIENT_VERSION", - /* 605 */ "noarg_func ::= SERVER_VERSION", - /* 606 */ "noarg_func ::= SERVER_STATUS", - /* 607 */ "noarg_func ::= CURRENT_USER", - /* 608 */ "noarg_func ::= USER", - /* 609 */ "noarg_func ::= PI", - /* 610 */ "star_func ::= COUNT", - /* 611 */ "star_func ::= FIRST", - /* 612 */ "star_func ::= LAST", - /* 613 */ "star_func ::= LAST_ROW", - /* 614 */ "star_func_para_list ::= NK_STAR", - /* 615 */ "star_func_para_list ::= other_para_list", - /* 616 */ "other_para_list ::= star_func_para", - /* 617 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 618 */ "star_func_para ::= expr_or_subquery", - /* 619 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 620 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 621 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 622 */ "when_then_list ::= when_then_expr", - /* 623 */ "when_then_list ::= when_then_list when_then_expr", - /* 624 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 625 */ "case_when_else_opt ::=", - /* 626 */ "case_when_else_opt ::= ELSE common_expression", - /* 627 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 628 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 629 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 630 */ "predicate ::= expr_or_subquery IS NULL", - /* 631 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 632 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 633 */ "compare_op ::= NK_LT", - /* 634 */ "compare_op ::= NK_GT", - /* 635 */ "compare_op ::= NK_LE", - /* 636 */ "compare_op ::= NK_GE", - /* 637 */ "compare_op ::= NK_NE", - /* 638 */ "compare_op ::= NK_EQ", - /* 639 */ "compare_op ::= LIKE", - /* 640 */ "compare_op ::= NOT LIKE", - /* 641 */ "compare_op ::= MATCH", - /* 642 */ "compare_op ::= NMATCH", - /* 643 */ "compare_op ::= CONTAINS", - /* 644 */ "in_op ::= IN", - /* 645 */ "in_op ::= NOT IN", - /* 646 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 647 */ "boolean_value_expression ::= boolean_primary", - /* 648 */ "boolean_value_expression ::= NOT boolean_primary", - /* 649 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 650 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 651 */ "boolean_primary ::= predicate", - /* 652 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 653 */ "common_expression ::= expr_or_subquery", - /* 654 */ "common_expression ::= boolean_value_expression", - /* 655 */ "from_clause_opt ::=", - /* 656 */ "from_clause_opt ::= FROM table_reference_list", - /* 657 */ "table_reference_list ::= table_reference", - /* 658 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 659 */ "table_reference ::= table_primary", - /* 660 */ "table_reference ::= joined_table", - /* 661 */ "table_primary ::= table_name alias_opt", - /* 662 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 663 */ "table_primary ::= subquery alias_opt", - /* 664 */ "table_primary ::= parenthesized_joined_table", - /* 665 */ "alias_opt ::=", - /* 666 */ "alias_opt ::= table_alias", - /* 667 */ "alias_opt ::= AS table_alias", - /* 668 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 669 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 670 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", - /* 671 */ "join_type ::=", - /* 672 */ "join_type ::= INNER", - /* 673 */ "join_type ::= LEFT", - /* 674 */ "join_type ::= RIGHT", - /* 675 */ "join_type ::= FULL", - /* 676 */ "join_subtype ::=", - /* 677 */ "join_subtype ::= OUTER", - /* 678 */ "join_subtype ::= SEMI", - /* 679 */ "join_subtype ::= ANTI", - /* 680 */ "join_subtype ::= ASOF", - /* 681 */ "join_subtype ::= WINDOW", - /* 682 */ "join_on_clause_opt ::=", - /* 683 */ "join_on_clause_opt ::= ON search_condition", - /* 684 */ "window_offset_clause_opt ::=", - /* 685 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", - /* 686 */ "window_offset_literal ::= NK_VARIABLE", - /* 687 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", - /* 688 */ "jlimit_clause_opt ::=", - /* 689 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", - /* 690 */ "query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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", - /* 691 */ "hint_list ::=", - /* 692 */ "hint_list ::= NK_HINT", - /* 693 */ "tag_mode_opt ::=", - /* 694 */ "tag_mode_opt ::= TAGS", - /* 695 */ "set_quantifier_opt ::=", - /* 696 */ "set_quantifier_opt ::= DISTINCT", - /* 697 */ "set_quantifier_opt ::= ALL", - /* 698 */ "select_list ::= select_item", - /* 699 */ "select_list ::= select_list NK_COMMA select_item", - /* 700 */ "select_item ::= NK_STAR", - /* 701 */ "select_item ::= common_expression", - /* 702 */ "select_item ::= common_expression column_alias", - /* 703 */ "select_item ::= common_expression AS column_alias", - /* 704 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 705 */ "where_clause_opt ::=", - /* 706 */ "where_clause_opt ::= WHERE search_condition", - /* 707 */ "partition_by_clause_opt ::=", - /* 708 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 709 */ "partition_list ::= partition_item", - /* 710 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 711 */ "partition_item ::= expr_or_subquery", - /* 712 */ "partition_item ::= expr_or_subquery column_alias", - /* 713 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 714 */ "twindow_clause_opt ::=", - /* 715 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 716 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 717 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 718 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 719 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 720 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", - /* 721 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 722 */ "twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP", - /* 723 */ "twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP", - /* 724 */ "sliding_opt ::=", - /* 725 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 726 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 727 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 728 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 729 */ "fill_opt ::=", - /* 730 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 731 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 732 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 733 */ "fill_mode ::= NONE", - /* 734 */ "fill_mode ::= PREV", - /* 735 */ "fill_mode ::= NULL", - /* 736 */ "fill_mode ::= NULL_F", - /* 737 */ "fill_mode ::= LINEAR", - /* 738 */ "fill_mode ::= NEXT", - /* 739 */ "group_by_clause_opt ::=", - /* 740 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 741 */ "group_by_list ::= expr_or_subquery", - /* 742 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 743 */ "having_clause_opt ::=", - /* 744 */ "having_clause_opt ::= HAVING search_condition", - /* 745 */ "range_opt ::=", - /* 746 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 747 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 748 */ "every_opt ::=", - /* 749 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 750 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 751 */ "query_simple ::= query_specification", - /* 752 */ "query_simple ::= union_query_expression", - /* 753 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 754 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 755 */ "query_simple_or_subquery ::= query_simple", - /* 756 */ "query_simple_or_subquery ::= subquery", - /* 757 */ "query_or_subquery ::= query_expression", - /* 758 */ "query_or_subquery ::= subquery", - /* 759 */ "order_by_clause_opt ::=", - /* 760 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 761 */ "slimit_clause_opt ::=", - /* 762 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 763 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 764 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 765 */ "limit_clause_opt ::=", - /* 766 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 767 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 768 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 769 */ "subquery ::= NK_LP query_expression NK_RP", - /* 770 */ "subquery ::= NK_LP subquery NK_RP", - /* 771 */ "search_condition ::= common_expression", - /* 772 */ "sort_specification_list ::= sort_specification", - /* 773 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 774 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 775 */ "ordering_specification_opt ::=", - /* 776 */ "ordering_specification_opt ::= ASC", - /* 777 */ "ordering_specification_opt ::= DESC", - /* 778 */ "null_ordering_opt ::=", - /* 779 */ "null_ordering_opt ::= NULLS FIRST", - /* 780 */ "null_ordering_opt ::= NULLS LAST", - /* 781 */ "column_options ::=", - /* 782 */ "column_options ::= column_options PRIMARY KEY", - /* 783 */ "column_options ::= column_options NK_ID NK_STRING", + /* 145 */ "db_options ::= db_options DNODES NK_STRING", + /* 146 */ "alter_db_options ::= alter_db_option", + /* 147 */ "alter_db_options ::= alter_db_options alter_db_option", + /* 148 */ "alter_db_option ::= BUFFER NK_INTEGER", + /* 149 */ "alter_db_option ::= CACHEMODEL NK_STRING", + /* 150 */ "alter_db_option ::= CACHESIZE NK_INTEGER", + /* 151 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", + /* 152 */ "alter_db_option ::= KEEP integer_list", + /* 153 */ "alter_db_option ::= KEEP variable_list", + /* 154 */ "alter_db_option ::= PAGES NK_INTEGER", + /* 155 */ "alter_db_option ::= REPLICA NK_INTEGER", + /* 156 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", + /* 157 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", + /* 158 */ "alter_db_option ::= MINROWS NK_INTEGER", + /* 159 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", + /* 160 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 161 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", + /* 162 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 163 */ "alter_db_option ::= S3_KEEPLOCAL NK_INTEGER", + /* 164 */ "alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE", + /* 165 */ "alter_db_option ::= S3_COMPACT NK_INTEGER", + /* 166 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", + /* 167 */ "alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING", + /* 168 */ "integer_list ::= NK_INTEGER", + /* 169 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", + /* 170 */ "variable_list ::= NK_VARIABLE", + /* 171 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", + /* 172 */ "retention_list ::= retention", + /* 173 */ "retention_list ::= retention_list NK_COMMA retention", + /* 174 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", + /* 175 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", + /* 176 */ "speed_opt ::=", + /* 177 */ "speed_opt ::= BWLIMIT NK_INTEGER", + /* 178 */ "start_opt ::=", + /* 179 */ "start_opt ::= START WITH NK_INTEGER", + /* 180 */ "start_opt ::= START WITH NK_STRING", + /* 181 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", + /* 182 */ "end_opt ::=", + /* 183 */ "end_opt ::= END WITH NK_INTEGER", + /* 184 */ "end_opt ::= END WITH NK_STRING", + /* 185 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", + /* 186 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 187 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 188 */ "cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING", + /* 189 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 190 */ "cmd ::= DROP TABLE with_opt multi_drop_clause", + /* 191 */ "cmd ::= DROP STABLE with_opt exists_opt full_table_name", + /* 192 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 193 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 194 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 195 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options", + /* 196 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 197 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 198 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options", + /* 199 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 200 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 201 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 202 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 203 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 204 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal", + /* 205 */ "multi_create_clause ::= create_subtable_clause", + /* 206 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 207 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options", + /* 208 */ "multi_drop_clause ::= drop_table_clause", + /* 209 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", + /* 210 */ "drop_table_clause ::= exists_opt full_table_name", + /* 211 */ "with_opt ::=", + /* 212 */ "with_opt ::= WITH", + /* 213 */ "specific_cols_opt ::=", + /* 214 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 215 */ "full_table_name ::= table_name", + /* 216 */ "full_table_name ::= db_name NK_DOT table_name", + /* 217 */ "tag_def_list ::= tag_def", + /* 218 */ "tag_def_list ::= tag_def_list NK_COMMA tag_def", + /* 219 */ "tag_def ::= column_name type_name", + /* 220 */ "column_def_list ::= column_def", + /* 221 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 222 */ "column_def ::= column_name type_name column_options", + /* 223 */ "type_name ::= BOOL", + /* 224 */ "type_name ::= TINYINT", + /* 225 */ "type_name ::= SMALLINT", + /* 226 */ "type_name ::= INT", + /* 227 */ "type_name ::= INTEGER", + /* 228 */ "type_name ::= BIGINT", + /* 229 */ "type_name ::= FLOAT", + /* 230 */ "type_name ::= DOUBLE", + /* 231 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 232 */ "type_name ::= TIMESTAMP", + /* 233 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 234 */ "type_name ::= TINYINT UNSIGNED", + /* 235 */ "type_name ::= SMALLINT UNSIGNED", + /* 236 */ "type_name ::= INT UNSIGNED", + /* 237 */ "type_name ::= BIGINT UNSIGNED", + /* 238 */ "type_name ::= JSON", + /* 239 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 240 */ "type_name ::= MEDIUMBLOB", + /* 241 */ "type_name ::= BLOB", + /* 242 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 243 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", + /* 244 */ "type_name ::= DECIMAL", + /* 245 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 246 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 247 */ "type_name_default_len ::= BINARY", + /* 248 */ "type_name_default_len ::= NCHAR", + /* 249 */ "type_name_default_len ::= VARCHAR", + /* 250 */ "type_name_default_len ::= VARBINARY", + /* 251 */ "tags_def_opt ::=", + /* 252 */ "tags_def_opt ::= tags_def", + /* 253 */ "tags_def ::= TAGS NK_LP tag_def_list NK_RP", + /* 254 */ "table_options ::=", + /* 255 */ "table_options ::= table_options COMMENT NK_STRING", + /* 256 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 257 */ "table_options ::= table_options WATERMARK duration_list", + /* 258 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 259 */ "table_options ::= table_options TTL NK_INTEGER", + /* 260 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 261 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 262 */ "alter_table_options ::= alter_table_option", + /* 263 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 264 */ "alter_table_option ::= COMMENT NK_STRING", + /* 265 */ "alter_table_option ::= TTL NK_INTEGER", + /* 266 */ "duration_list ::= duration_literal", + /* 267 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 268 */ "rollup_func_list ::= rollup_func_name", + /* 269 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 270 */ "rollup_func_name ::= function_name", + /* 271 */ "rollup_func_name ::= FIRST", + /* 272 */ "rollup_func_name ::= LAST", + /* 273 */ "col_name_list ::= col_name", + /* 274 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 275 */ "col_name ::= column_name", + /* 276 */ "cmd ::= SHOW DNODES", + /* 277 */ "cmd ::= SHOW USERS", + /* 278 */ "cmd ::= SHOW USERS FULL", + /* 279 */ "cmd ::= SHOW USER PRIVILEGES", + /* 280 */ "cmd ::= SHOW db_kind_opt DATABASES", + /* 281 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", + /* 282 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 283 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 284 */ "cmd ::= SHOW MNODES", + /* 285 */ "cmd ::= SHOW QNODES", + /* 286 */ "cmd ::= SHOW ANODES", + /* 287 */ "cmd ::= SHOW ANODES FULL", + /* 288 */ "cmd ::= SHOW ARBGROUPS", + /* 289 */ "cmd ::= SHOW FUNCTIONS", + /* 290 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 291 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", + /* 292 */ "cmd ::= SHOW STREAMS", + /* 293 */ "cmd ::= SHOW ACCOUNTS", + /* 294 */ "cmd ::= SHOW APPS", + /* 295 */ "cmd ::= SHOW CONNECTIONS", + /* 296 */ "cmd ::= SHOW LICENCES", + /* 297 */ "cmd ::= SHOW GRANTS", + /* 298 */ "cmd ::= SHOW GRANTS FULL", + /* 299 */ "cmd ::= SHOW GRANTS LOGS", + /* 300 */ "cmd ::= SHOW CLUSTER MACHINES", + /* 301 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 302 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 303 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 304 */ "cmd ::= SHOW ENCRYPTIONS", + /* 305 */ "cmd ::= SHOW QUERIES", + /* 306 */ "cmd ::= SHOW SCORES", + /* 307 */ "cmd ::= SHOW TOPICS", + /* 308 */ "cmd ::= SHOW VARIABLES", + /* 309 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 310 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 311 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 312 */ "cmd ::= SHOW BNODES", + /* 313 */ "cmd ::= SHOW SNODES", + /* 314 */ "cmd ::= SHOW CLUSTER", + /* 315 */ "cmd ::= SHOW TRANSACTIONS", + /* 316 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 317 */ "cmd ::= SHOW CONSUMERS", + /* 318 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 319 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 320 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", + /* 321 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 322 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", + /* 323 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", + /* 324 */ "cmd ::= SHOW VNODES", + /* 325 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 326 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 327 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", + /* 328 */ "cmd ::= SHOW CREATE VIEW full_table_name", + /* 329 */ "cmd ::= SHOW COMPACTS", + /* 330 */ "cmd ::= SHOW COMPACT NK_INTEGER", + /* 331 */ "table_kind_db_name_cond_opt ::=", + /* 332 */ "table_kind_db_name_cond_opt ::= table_kind", + /* 333 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", + /* 334 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", + /* 335 */ "table_kind ::= NORMAL", + /* 336 */ "table_kind ::= CHILD", + /* 337 */ "db_name_cond_opt ::=", + /* 338 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 339 */ "like_pattern_opt ::=", + /* 340 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 341 */ "table_name_cond ::= table_name", + /* 342 */ "from_db_opt ::=", + /* 343 */ "from_db_opt ::= FROM db_name", + /* 344 */ "tag_list_opt ::=", + /* 345 */ "tag_list_opt ::= tag_item", + /* 346 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 347 */ "tag_item ::= TBNAME", + /* 348 */ "tag_item ::= QTAGS", + /* 349 */ "tag_item ::= column_name", + /* 350 */ "tag_item ::= column_name column_alias", + /* 351 */ "tag_item ::= column_name AS column_alias", + /* 352 */ "db_kind_opt ::=", + /* 353 */ "db_kind_opt ::= USER", + /* 354 */ "db_kind_opt ::= SYSTEM", + /* 355 */ "cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP", + /* 356 */ "cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP", + /* 357 */ "cmd ::= DROP TSMA exists_opt full_tsma_name", + /* 358 */ "cmd ::= SHOW db_name_cond_opt TSMAS", + /* 359 */ "full_tsma_name ::= tsma_name", + /* 360 */ "full_tsma_name ::= db_name NK_DOT tsma_name", + /* 361 */ "tsma_func_list ::= FUNCTION NK_LP func_list NK_RP", + /* 362 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 363 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", + /* 364 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 365 */ "full_index_name ::= index_name", + /* 366 */ "full_index_name ::= db_name NK_DOT index_name", + /* 367 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 368 */ "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", + /* 369 */ "func_list ::= func", + /* 370 */ "func_list ::= func_list NK_COMMA func", + /* 371 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 372 */ "sma_func_name ::= function_name", + /* 373 */ "sma_func_name ::= COUNT", + /* 374 */ "sma_func_name ::= FIRST", + /* 375 */ "sma_func_name ::= LAST", + /* 376 */ "sma_func_name ::= LAST_ROW", + /* 377 */ "sma_stream_opt ::=", + /* 378 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 379 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 380 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 381 */ "with_meta ::= AS", + /* 382 */ "with_meta ::= WITH META AS", + /* 383 */ "with_meta ::= ONLY META AS", + /* 384 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 385 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", + /* 386 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", + /* 387 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 388 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 389 */ "cmd ::= DESC full_table_name", + /* 390 */ "cmd ::= DESCRIBE full_table_name", + /* 391 */ "cmd ::= RESET QUERY CACHE", + /* 392 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 393 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 394 */ "analyze_opt ::=", + /* 395 */ "analyze_opt ::= ANALYZE", + /* 396 */ "explain_options ::=", + /* 397 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 398 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 399 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 400 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 401 */ "agg_func_opt ::=", + /* 402 */ "agg_func_opt ::= AGGREGATE", + /* 403 */ "bufsize_opt ::=", + /* 404 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 405 */ "language_opt ::=", + /* 406 */ "language_opt ::= LANGUAGE NK_STRING", + /* 407 */ "or_replace_opt ::=", + /* 408 */ "or_replace_opt ::= OR REPLACE", + /* 409 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", + /* 410 */ "cmd ::= DROP VIEW exists_opt full_view_name", + /* 411 */ "full_view_name ::= view_name", + /* 412 */ "full_view_name ::= db_name NK_DOT view_name", + /* 413 */ "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", + /* 414 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 415 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 416 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 417 */ "col_list_opt ::=", + /* 418 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", + /* 419 */ "column_stream_def_list ::= column_stream_def", + /* 420 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", + /* 421 */ "column_stream_def ::= column_name stream_col_options", + /* 422 */ "stream_col_options ::=", + /* 423 */ "stream_col_options ::= stream_col_options PRIMARY KEY", + /* 424 */ "tag_def_or_ref_opt ::=", + /* 425 */ "tag_def_or_ref_opt ::= tags_def", + /* 426 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", + /* 427 */ "stream_options ::=", + /* 428 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 429 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 430 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 431 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 432 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 433 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 434 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 435 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 436 */ "subtable_opt ::=", + /* 437 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 438 */ "ignore_opt ::=", + /* 439 */ "ignore_opt ::= IGNORE UNTREATED", + /* 440 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 441 */ "cmd ::= KILL QUERY NK_STRING", + /* 442 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 443 */ "cmd ::= KILL COMPACT NK_INTEGER", + /* 444 */ "cmd ::= BALANCE VGROUP", + /* 445 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", + /* 446 */ "cmd ::= BALANCE VGROUP LEADER DATABASE db_name", + /* 447 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 448 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 449 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 450 */ "on_vgroup_id ::=", + /* 451 */ "on_vgroup_id ::= ON NK_INTEGER", + /* 452 */ "dnode_list ::= DNODE NK_INTEGER", + /* 453 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 454 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 455 */ "cmd ::= query_or_subquery", + /* 456 */ "cmd ::= insert_query", + /* 457 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 458 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 459 */ "tags_literal ::= NK_INTEGER", + /* 460 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", + /* 461 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", + /* 462 */ "tags_literal ::= NK_PLUS NK_INTEGER", + /* 463 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", + /* 464 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", + /* 465 */ "tags_literal ::= NK_MINUS NK_INTEGER", + /* 466 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", + /* 467 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", + /* 468 */ "tags_literal ::= NK_FLOAT", + /* 469 */ "tags_literal ::= NK_PLUS NK_FLOAT", + /* 470 */ "tags_literal ::= NK_MINUS NK_FLOAT", + /* 471 */ "tags_literal ::= NK_BIN", + /* 472 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", + /* 473 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", + /* 474 */ "tags_literal ::= NK_PLUS NK_BIN", + /* 475 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", + /* 476 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", + /* 477 */ "tags_literal ::= NK_MINUS NK_BIN", + /* 478 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", + /* 479 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", + /* 480 */ "tags_literal ::= NK_HEX", + /* 481 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", + /* 482 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", + /* 483 */ "tags_literal ::= NK_PLUS NK_HEX", + /* 484 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", + /* 485 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", + /* 486 */ "tags_literal ::= NK_MINUS NK_HEX", + /* 487 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", + /* 488 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", + /* 489 */ "tags_literal ::= NK_STRING", + /* 490 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", + /* 491 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", + /* 492 */ "tags_literal ::= NK_BOOL", + /* 493 */ "tags_literal ::= NULL", + /* 494 */ "tags_literal ::= literal_func", + /* 495 */ "tags_literal ::= literal_func NK_PLUS duration_literal", + /* 496 */ "tags_literal ::= literal_func NK_MINUS duration_literal", + /* 497 */ "tags_literal_list ::= tags_literal", + /* 498 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", + /* 499 */ "literal ::= NK_INTEGER", + /* 500 */ "literal ::= NK_FLOAT", + /* 501 */ "literal ::= NK_STRING", + /* 502 */ "literal ::= NK_BOOL", + /* 503 */ "literal ::= TIMESTAMP NK_STRING", + /* 504 */ "literal ::= duration_literal", + /* 505 */ "literal ::= NULL", + /* 506 */ "literal ::= NK_QUESTION", + /* 507 */ "duration_literal ::= NK_VARIABLE", + /* 508 */ "signed ::= NK_INTEGER", + /* 509 */ "signed ::= NK_PLUS NK_INTEGER", + /* 510 */ "signed ::= NK_MINUS NK_INTEGER", + /* 511 */ "signed ::= NK_FLOAT", + /* 512 */ "signed ::= NK_PLUS NK_FLOAT", + /* 513 */ "signed ::= NK_MINUS NK_FLOAT", + /* 514 */ "signed_literal ::= signed", + /* 515 */ "signed_literal ::= NK_STRING", + /* 516 */ "signed_literal ::= NK_BOOL", + /* 517 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 518 */ "signed_literal ::= duration_literal", + /* 519 */ "signed_literal ::= NULL", + /* 520 */ "signed_literal ::= literal_func", + /* 521 */ "signed_literal ::= NK_QUESTION", + /* 522 */ "literal_list ::= signed_literal", + /* 523 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 524 */ "db_name ::= NK_ID", + /* 525 */ "table_name ::= NK_ID", + /* 526 */ "column_name ::= NK_ID", + /* 527 */ "function_name ::= NK_ID", + /* 528 */ "view_name ::= NK_ID", + /* 529 */ "table_alias ::= NK_ID", + /* 530 */ "column_alias ::= NK_ID", + /* 531 */ "column_alias ::= NK_ALIAS", + /* 532 */ "user_name ::= NK_ID", + /* 533 */ "topic_name ::= NK_ID", + /* 534 */ "stream_name ::= NK_ID", + /* 535 */ "cgroup_name ::= NK_ID", + /* 536 */ "index_name ::= NK_ID", + /* 537 */ "tsma_name ::= NK_ID", + /* 538 */ "expr_or_subquery ::= expression", + /* 539 */ "expression ::= literal", + /* 540 */ "expression ::= pseudo_column", + /* 541 */ "expression ::= column_reference", + /* 542 */ "expression ::= function_expression", + /* 543 */ "expression ::= case_when_expression", + /* 544 */ "expression ::= NK_LP expression NK_RP", + /* 545 */ "expression ::= NK_PLUS expr_or_subquery", + /* 546 */ "expression ::= NK_MINUS expr_or_subquery", + /* 547 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 548 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 549 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 550 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 551 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 552 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 553 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 554 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 555 */ "expression_list ::= expr_or_subquery", + /* 556 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 557 */ "column_reference ::= column_name", + /* 558 */ "column_reference ::= table_name NK_DOT column_name", + /* 559 */ "column_reference ::= NK_ALIAS", + /* 560 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 561 */ "pseudo_column ::= ROWTS", + /* 562 */ "pseudo_column ::= TBNAME", + /* 563 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 564 */ "pseudo_column ::= QSTART", + /* 565 */ "pseudo_column ::= QEND", + /* 566 */ "pseudo_column ::= QDURATION", + /* 567 */ "pseudo_column ::= WSTART", + /* 568 */ "pseudo_column ::= WEND", + /* 569 */ "pseudo_column ::= WDURATION", + /* 570 */ "pseudo_column ::= IROWTS", + /* 571 */ "pseudo_column ::= ISFILLED", + /* 572 */ "pseudo_column ::= QTAGS", + /* 573 */ "pseudo_column ::= FLOW", + /* 574 */ "pseudo_column ::= FHIGH", + /* 575 */ "pseudo_column ::= FROWTS", + /* 576 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 577 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 578 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 579 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", + /* 580 */ "function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP", + /* 581 */ "function_expression ::= TRIM NK_LP expr_or_subquery NK_RP", + /* 582 */ "function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP", + /* 583 */ "function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", + /* 584 */ "function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP", + /* 585 */ "function_expression ::= substr_func NK_LP expression_list NK_RP", + /* 586 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", + /* 587 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP", + /* 588 */ "function_expression ::= REPLACE NK_LP expression_list NK_RP", + /* 589 */ "function_expression ::= literal_func", + /* 590 */ "function_expression ::= rand_func", + /* 591 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 592 */ "literal_func ::= NOW", + /* 593 */ "literal_func ::= TODAY", + /* 594 */ "rand_func ::= RAND NK_LP NK_RP", + /* 595 */ "rand_func ::= RAND NK_LP expression_list NK_RP", + /* 596 */ "substr_func ::= SUBSTR", + /* 597 */ "substr_func ::= SUBSTRING", + /* 598 */ "trim_specification_type ::= BOTH", + /* 599 */ "trim_specification_type ::= TRAILING", + /* 600 */ "trim_specification_type ::= LEADING", + /* 601 */ "noarg_func ::= NOW", + /* 602 */ "noarg_func ::= TODAY", + /* 603 */ "noarg_func ::= TIMEZONE", + /* 604 */ "noarg_func ::= DATABASE", + /* 605 */ "noarg_func ::= CLIENT_VERSION", + /* 606 */ "noarg_func ::= SERVER_VERSION", + /* 607 */ "noarg_func ::= SERVER_STATUS", + /* 608 */ "noarg_func ::= CURRENT_USER", + /* 609 */ "noarg_func ::= USER", + /* 610 */ "noarg_func ::= PI", + /* 611 */ "star_func ::= COUNT", + /* 612 */ "star_func ::= FIRST", + /* 613 */ "star_func ::= LAST", + /* 614 */ "star_func ::= LAST_ROW", + /* 615 */ "star_func_para_list ::= NK_STAR", + /* 616 */ "star_func_para_list ::= other_para_list", + /* 617 */ "other_para_list ::= star_func_para", + /* 618 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 619 */ "star_func_para ::= expr_or_subquery", + /* 620 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 621 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 622 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 623 */ "when_then_list ::= when_then_expr", + /* 624 */ "when_then_list ::= when_then_list when_then_expr", + /* 625 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 626 */ "case_when_else_opt ::=", + /* 627 */ "case_when_else_opt ::= ELSE common_expression", + /* 628 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 629 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 630 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 631 */ "predicate ::= expr_or_subquery IS NULL", + /* 632 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 633 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 634 */ "compare_op ::= NK_LT", + /* 635 */ "compare_op ::= NK_GT", + /* 636 */ "compare_op ::= NK_LE", + /* 637 */ "compare_op ::= NK_GE", + /* 638 */ "compare_op ::= NK_NE", + /* 639 */ "compare_op ::= NK_EQ", + /* 640 */ "compare_op ::= LIKE", + /* 641 */ "compare_op ::= NOT LIKE", + /* 642 */ "compare_op ::= MATCH", + /* 643 */ "compare_op ::= NMATCH", + /* 644 */ "compare_op ::= CONTAINS", + /* 645 */ "in_op ::= IN", + /* 646 */ "in_op ::= NOT IN", + /* 647 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 648 */ "boolean_value_expression ::= boolean_primary", + /* 649 */ "boolean_value_expression ::= NOT boolean_primary", + /* 650 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 651 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 652 */ "boolean_primary ::= predicate", + /* 653 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 654 */ "common_expression ::= expr_or_subquery", + /* 655 */ "common_expression ::= boolean_value_expression", + /* 656 */ "from_clause_opt ::=", + /* 657 */ "from_clause_opt ::= FROM table_reference_list", + /* 658 */ "table_reference_list ::= table_reference", + /* 659 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 660 */ "table_reference ::= table_primary", + /* 661 */ "table_reference ::= joined_table", + /* 662 */ "table_primary ::= table_name alias_opt", + /* 663 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 664 */ "table_primary ::= subquery alias_opt", + /* 665 */ "table_primary ::= parenthesized_joined_table", + /* 666 */ "alias_opt ::=", + /* 667 */ "alias_opt ::= table_alias", + /* 668 */ "alias_opt ::= AS table_alias", + /* 669 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 670 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 671 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", + /* 672 */ "join_type ::=", + /* 673 */ "join_type ::= INNER", + /* 674 */ "join_type ::= LEFT", + /* 675 */ "join_type ::= RIGHT", + /* 676 */ "join_type ::= FULL", + /* 677 */ "join_subtype ::=", + /* 678 */ "join_subtype ::= OUTER", + /* 679 */ "join_subtype ::= SEMI", + /* 680 */ "join_subtype ::= ANTI", + /* 681 */ "join_subtype ::= ASOF", + /* 682 */ "join_subtype ::= WINDOW", + /* 683 */ "join_on_clause_opt ::=", + /* 684 */ "join_on_clause_opt ::= ON search_condition", + /* 685 */ "window_offset_clause_opt ::=", + /* 686 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", + /* 687 */ "window_offset_literal ::= NK_VARIABLE", + /* 688 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", + /* 689 */ "jlimit_clause_opt ::=", + /* 690 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", + /* 691 */ "query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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", + /* 692 */ "hint_list ::=", + /* 693 */ "hint_list ::= NK_HINT", + /* 694 */ "tag_mode_opt ::=", + /* 695 */ "tag_mode_opt ::= TAGS", + /* 696 */ "set_quantifier_opt ::=", + /* 697 */ "set_quantifier_opt ::= DISTINCT", + /* 698 */ "set_quantifier_opt ::= ALL", + /* 699 */ "select_list ::= select_item", + /* 700 */ "select_list ::= select_list NK_COMMA select_item", + /* 701 */ "select_item ::= NK_STAR", + /* 702 */ "select_item ::= common_expression", + /* 703 */ "select_item ::= common_expression column_alias", + /* 704 */ "select_item ::= common_expression AS column_alias", + /* 705 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 706 */ "where_clause_opt ::=", + /* 707 */ "where_clause_opt ::= WHERE search_condition", + /* 708 */ "partition_by_clause_opt ::=", + /* 709 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 710 */ "partition_list ::= partition_item", + /* 711 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 712 */ "partition_item ::= expr_or_subquery", + /* 713 */ "partition_item ::= expr_or_subquery column_alias", + /* 714 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 715 */ "twindow_clause_opt ::=", + /* 716 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 717 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 718 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 719 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 720 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 721 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", + /* 722 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 723 */ "twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP", + /* 724 */ "twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP", + /* 725 */ "sliding_opt ::=", + /* 726 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 727 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 728 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 729 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 730 */ "fill_opt ::=", + /* 731 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 732 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 733 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 734 */ "fill_mode ::= NONE", + /* 735 */ "fill_mode ::= PREV", + /* 736 */ "fill_mode ::= NULL", + /* 737 */ "fill_mode ::= NULL_F", + /* 738 */ "fill_mode ::= LINEAR", + /* 739 */ "fill_mode ::= NEXT", + /* 740 */ "group_by_clause_opt ::=", + /* 741 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 742 */ "group_by_list ::= expr_or_subquery", + /* 743 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 744 */ "having_clause_opt ::=", + /* 745 */ "having_clause_opt ::= HAVING search_condition", + /* 746 */ "range_opt ::=", + /* 747 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 748 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 749 */ "every_opt ::=", + /* 750 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 751 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 752 */ "query_simple ::= query_specification", + /* 753 */ "query_simple ::= union_query_expression", + /* 754 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 755 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 756 */ "query_simple_or_subquery ::= query_simple", + /* 757 */ "query_simple_or_subquery ::= subquery", + /* 758 */ "query_or_subquery ::= query_expression", + /* 759 */ "query_or_subquery ::= subquery", + /* 760 */ "order_by_clause_opt ::=", + /* 761 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 762 */ "slimit_clause_opt ::=", + /* 763 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 764 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 765 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 766 */ "limit_clause_opt ::=", + /* 767 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 768 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 769 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 770 */ "subquery ::= NK_LP query_expression NK_RP", + /* 771 */ "subquery ::= NK_LP subquery NK_RP", + /* 772 */ "search_condition ::= common_expression", + /* 773 */ "sort_specification_list ::= sort_specification", + /* 774 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 775 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 776 */ "ordering_specification_opt ::=", + /* 777 */ "ordering_specification_opt ::= ASC", + /* 778 */ "ordering_specification_opt ::= DESC", + /* 779 */ "null_ordering_opt ::=", + /* 780 */ "null_ordering_opt ::= NULLS FIRST", + /* 781 */ "null_ordering_opt ::= NULLS LAST", + /* 782 */ "column_options ::=", + /* 783 */ "column_options ::= column_options PRIMARY KEY", + /* 784 */ "column_options ::= column_options NK_ID NK_STRING", }; #endif /* NDEBUG */ @@ -3884,9 +3494,7 @@ static void yy_destructor( case 568: /* query_simple_or_subquery */ case 570: /* sort_specification */ { -#line 7 "sql.y" nodesDestroyNode((yypminor->yy974)); -#line 3889 "sql.c" } break; case 390: /* account_options */ @@ -3896,9 +3504,7 @@ static void yy_destructor( case 478: /* with_meta */ case 487: /* bufsize_opt */ { -#line 54 "sql.y" -#line 3901 "sql.c" } break; case 394: /* ip_range_list */ @@ -3938,18 +3544,14 @@ static void yy_destructor( case 564: /* order_by_clause_opt */ case 569: /* sort_specification_list */ { -#line 85 "sql.y" nodesDestroyList((yypminor->yy946)); -#line 3943 "sql.c" } break; case 397: /* is_import_opt */ case 398: /* is_createdb_opt */ case 400: /* sysinfo_opt */ { -#line 99 "sql.y" -#line 3952 "sql.c" } break; case 399: /* user_name */ @@ -3974,25 +3576,19 @@ static void yy_destructor( case 517: /* noarg_func */ case 535: /* alias_opt */ { -#line 1095 "sql.y" -#line 3979 "sql.c" } break; case 401: /* privileges */ case 404: /* priv_type_list */ case 405: /* priv_type */ { -#line 131 "sql.y" -#line 3988 "sql.c" } break; case 402: /* priv_level */ { -#line 148 "sql.y" -#line 3995 "sql.c" } break; case 411: /* force_opt */ @@ -4007,97 +3603,71 @@ static void yy_destructor( case 546: /* set_quantifier_opt */ case 547: /* tag_mode_opt */ { -#line 186 "sql.y" -#line 4012 "sql.c" } break; case 424: /* alter_db_option */ case 452: /* alter_table_option */ { -#line 294 "sql.y" -#line 4020 "sql.c" } break; case 438: /* type_name */ case 449: /* type_name_default_len */ { -#line 436 "sql.y" -#line 4028 "sql.c" } break; case 457: /* db_kind_opt */ case 463: /* table_kind */ { -#line 617 "sql.y" -#line 4036 "sql.c" } break; case 458: /* table_kind_db_name_cond_opt */ { -#line 582 "sql.y" -#line 4043 "sql.c" } break; case 467: /* tsma_func_list */ { -#line 636 "sql.y" nodesDestroyNode((yypminor->yy974)); -#line 4050 "sql.c" } break; case 514: /* trim_specification_type */ { -#line 1241 "sql.y" -#line 4057 "sql.c" } break; case 525: /* compare_op */ case 526: /* in_op */ { -#line 1328 "sql.y" -#line 4065 "sql.c" } break; case 538: /* join_type */ { -#line 1409 "sql.y" -#line 4072 "sql.c" } break; case 539: /* join_subtype */ { -#line 1417 "sql.y" -#line 4079 "sql.c" } break; case 560: /* fill_mode */ { -#line 1537 "sql.y" -#line 4086 "sql.c" } break; case 571: /* ordering_specification_opt */ { -#line 1622 "sql.y" -#line 4093 "sql.c" } break; case 572: /* null_ordering_opt */ { -#line 1628 "sql.y" -#line 4100 "sql.c" } break; /********* End destructor definitions *****************************************/ @@ -4264,7 +3834,7 @@ static YYACTIONTYPE yy_find_shift_action( #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ - assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) ); + assert( i>=0 && iyytos; - assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ); #ifndef NDEBUG - if( yyTraceFILE ){ + if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ yysize = yyRuleInfoNRhs[yyruleno]; if( yysize ){ fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", @@ -6050,21 +5621,15 @@ static YYACTIONTYPE yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ -#line 50 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 6055 "sql.c" yy_destructor(yypParser,390,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ -#line 51 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 6061 "sql.c" yy_destructor(yypParser,391,&yymsp[0].minor); break; case 2: /* account_options ::= */ -#line 55 "sql.y" { } -#line 6067 "sql.c" break; case 3: /* account_options ::= account_options PPS literal */ case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4); @@ -6076,24 +5641,18 @@ static YYACTIONTYPE yy_reduce( case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); { yy_destructor(yypParser,390,&yymsp[-2].minor); -#line 56 "sql.y" { } -#line 6081 "sql.c" yy_destructor(yypParser,392,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ { yy_destructor(yypParser,393,&yymsp[0].minor); -#line 68 "sql.y" { } -#line 6089 "sql.c" } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ { yy_destructor(yypParser,391,&yymsp[-1].minor); -#line 69 "sql.y" { } -#line 6096 "sql.c" yy_destructor(yypParser,393,&yymsp[0].minor); } break; @@ -6107,2912 +5666,1979 @@ static YYACTIONTYPE yy_reduce( case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21); case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); -#line 73 "sql.y" { } -#line 6112 "sql.c" yy_destructor(yypParser,392,&yymsp[0].minor); break; case 24: /* ip_range_list ::= NK_STRING */ -#line 86 "sql.y" { yylhsminor.yy946 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 6118 "sql.c" yymsp[0].minor.yy946 = yylhsminor.yy946; break; case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ -#line 87 "sql.y" { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 6124 "sql.c" yymsp[-2].minor.yy946 = yylhsminor.yy946; break; case 26: /* white_list ::= HOST ip_range_list */ -#line 91 "sql.y" { yymsp[-1].minor.yy946 = yymsp[0].minor.yy946; } -#line 6130 "sql.c" break; case 27: /* white_list_opt ::= */ - case 212: /* specific_cols_opt ::= */ yytestcase(yyruleno==212); - case 250: /* tags_def_opt ::= */ yytestcase(yyruleno==250); - case 343: /* tag_list_opt ::= */ yytestcase(yyruleno==343); - case 416: /* col_list_opt ::= */ yytestcase(yyruleno==416); - case 423: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==423); - case 707: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==707); - case 739: /* group_by_clause_opt ::= */ yytestcase(yyruleno==739); - case 759: /* order_by_clause_opt ::= */ yytestcase(yyruleno==759); -#line 95 "sql.y" + case 213: /* specific_cols_opt ::= */ yytestcase(yyruleno==213); + case 251: /* tags_def_opt ::= */ yytestcase(yyruleno==251); + case 344: /* tag_list_opt ::= */ yytestcase(yyruleno==344); + case 417: /* col_list_opt ::= */ yytestcase(yyruleno==417); + case 424: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==424); + case 708: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==708); + case 740: /* group_by_clause_opt ::= */ yytestcase(yyruleno==740); + case 760: /* order_by_clause_opt ::= */ yytestcase(yyruleno==760); { yymsp[1].minor.yy946 = NULL; } -#line 6143 "sql.c" break; case 28: /* white_list_opt ::= white_list */ - case 251: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==251); - case 424: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==424); - case 615: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==615); -#line 96 "sql.y" + case 252: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==252); + case 425: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==425); + case 616: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==616); { yylhsminor.yy946 = yymsp[0].minor.yy946; } -#line 6151 "sql.c" yymsp[0].minor.yy946 = yylhsminor.yy946; break; case 29: /* is_import_opt ::= */ case 31: /* is_createdb_opt ::= */ yytestcase(yyruleno==31); -#line 100 "sql.y" { yymsp[1].minor.yy815 = 0; } -#line 6158 "sql.c" break; case 30: /* is_import_opt ::= IS_IMPORT NK_INTEGER */ case 32: /* is_createdb_opt ::= CREATEDB NK_INTEGER */ yytestcase(yyruleno==32); case 42: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ yytestcase(yyruleno==42); -#line 101 "sql.y" { yymsp[-1].minor.yy815 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } -#line 6165 "sql.c" break; case 33: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ -#line 109 "sql.y" { pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-6].minor.yy557, &yymsp[-4].minor.yy0, yymsp[-3].minor.yy815, yymsp[-1].minor.yy815, yymsp[-2].minor.yy815); pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy946); } -#line 6173 "sql.c" break; case 34: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -#line 113 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } -#line 6178 "sql.c" break; case 35: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -#line 114 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } -#line 6183 "sql.c" break; case 36: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -#line 115 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } -#line 6188 "sql.c" break; case 37: /* cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ -#line 116 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_CREATEDB, &yymsp[0].minor.yy0); } -#line 6193 "sql.c" break; case 38: /* cmd ::= ALTER USER user_name ADD white_list */ -#line 117 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy946); } -#line 6198 "sql.c" break; case 39: /* cmd ::= ALTER USER user_name DROP white_list */ -#line 118 "sql.y" { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy946); } -#line 6203 "sql.c" break; case 40: /* cmd ::= DROP USER user_name */ -#line 119 "sql.y" { pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy557); } -#line 6208 "sql.c" break; case 41: /* sysinfo_opt ::= */ -#line 123 "sql.y" { yymsp[1].minor.yy815 = 1; } -#line 6213 "sql.c" break; case 43: /* cmd ::= GRANT privileges ON priv_level with_clause_opt TO user_name */ -#line 127 "sql.y" { pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy483, &yymsp[-3].minor.yy723, &yymsp[0].minor.yy557, yymsp[-2].minor.yy974); } -#line 6218 "sql.c" break; case 44: /* cmd ::= REVOKE privileges ON priv_level with_clause_opt FROM user_name */ -#line 128 "sql.y" { pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy483, &yymsp[-3].minor.yy723, &yymsp[0].minor.yy557, yymsp[-2].minor.yy974); } -#line 6223 "sql.c" break; case 45: /* privileges ::= ALL */ -#line 132 "sql.y" { yymsp[0].minor.yy483 = PRIVILEGE_TYPE_ALL; } -#line 6228 "sql.c" break; case 46: /* privileges ::= priv_type_list */ case 48: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==48); -#line 133 "sql.y" { yylhsminor.yy483 = yymsp[0].minor.yy483; } -#line 6234 "sql.c" yymsp[0].minor.yy483 = yylhsminor.yy483; break; case 47: /* privileges ::= SUBSCRIBE */ -#line 134 "sql.y" { yymsp[0].minor.yy483 = PRIVILEGE_TYPE_SUBSCRIBE; } -#line 6240 "sql.c" break; case 49: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -#line 139 "sql.y" { yylhsminor.yy483 = yymsp[-2].minor.yy483 | yymsp[0].minor.yy483; } -#line 6245 "sql.c" yymsp[-2].minor.yy483 = yylhsminor.yy483; break; case 50: /* priv_type ::= READ */ -#line 143 "sql.y" { yymsp[0].minor.yy483 = PRIVILEGE_TYPE_READ; } -#line 6251 "sql.c" break; case 51: /* priv_type ::= WRITE */ -#line 144 "sql.y" { yymsp[0].minor.yy483 = PRIVILEGE_TYPE_WRITE; } -#line 6256 "sql.c" break; case 52: /* priv_type ::= ALTER */ -#line 145 "sql.y" { yymsp[0].minor.yy483 = PRIVILEGE_TYPE_ALTER; } -#line 6261 "sql.c" break; case 53: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -#line 149 "sql.y" { yylhsminor.yy723.first = yymsp[-2].minor.yy0; yylhsminor.yy723.second = yymsp[0].minor.yy0; } -#line 6266 "sql.c" yymsp[-2].minor.yy723 = yylhsminor.yy723; break; case 54: /* priv_level ::= db_name NK_DOT NK_STAR */ -#line 150 "sql.y" { yylhsminor.yy723.first = yymsp[-2].minor.yy557; yylhsminor.yy723.second = yymsp[0].minor.yy0; } -#line 6272 "sql.c" yymsp[-2].minor.yy723 = yylhsminor.yy723; break; case 55: /* priv_level ::= db_name NK_DOT table_name */ -#line 151 "sql.y" { yylhsminor.yy723.first = yymsp[-2].minor.yy557; yylhsminor.yy723.second = yymsp[0].minor.yy557; } -#line 6278 "sql.c" yymsp[-2].minor.yy723 = yylhsminor.yy723; break; case 56: /* priv_level ::= topic_name */ -#line 152 "sql.y" { yylhsminor.yy723.first = yymsp[0].minor.yy557; yylhsminor.yy723.second = nil_token; } -#line 6284 "sql.c" yymsp[0].minor.yy723 = yylhsminor.yy723; break; case 57: /* with_clause_opt ::= */ - case 177: /* start_opt ::= */ yytestcase(yyruleno==177); - case 181: /* end_opt ::= */ yytestcase(yyruleno==181); - case 338: /* like_pattern_opt ::= */ yytestcase(yyruleno==338); - case 435: /* subtable_opt ::= */ yytestcase(yyruleno==435); - case 625: /* case_when_else_opt ::= */ yytestcase(yyruleno==625); - case 655: /* from_clause_opt ::= */ yytestcase(yyruleno==655); - case 682: /* join_on_clause_opt ::= */ yytestcase(yyruleno==682); - case 684: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==684); - case 688: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==688); - case 705: /* where_clause_opt ::= */ yytestcase(yyruleno==705); - case 714: /* twindow_clause_opt ::= */ yytestcase(yyruleno==714); - case 724: /* sliding_opt ::= */ yytestcase(yyruleno==724); - case 729: /* fill_opt ::= */ yytestcase(yyruleno==729); - case 743: /* having_clause_opt ::= */ yytestcase(yyruleno==743); - case 745: /* range_opt ::= */ yytestcase(yyruleno==745); - case 748: /* every_opt ::= */ yytestcase(yyruleno==748); - case 761: /* slimit_clause_opt ::= */ yytestcase(yyruleno==761); - case 765: /* limit_clause_opt ::= */ yytestcase(yyruleno==765); -#line 154 "sql.y" + case 178: /* start_opt ::= */ yytestcase(yyruleno==178); + case 182: /* end_opt ::= */ yytestcase(yyruleno==182); + case 339: /* like_pattern_opt ::= */ yytestcase(yyruleno==339); + case 436: /* subtable_opt ::= */ yytestcase(yyruleno==436); + case 626: /* case_when_else_opt ::= */ yytestcase(yyruleno==626); + case 656: /* from_clause_opt ::= */ yytestcase(yyruleno==656); + case 683: /* join_on_clause_opt ::= */ yytestcase(yyruleno==683); + case 685: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==685); + case 689: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==689); + case 706: /* where_clause_opt ::= */ yytestcase(yyruleno==706); + case 715: /* twindow_clause_opt ::= */ yytestcase(yyruleno==715); + case 725: /* sliding_opt ::= */ yytestcase(yyruleno==725); + case 730: /* fill_opt ::= */ yytestcase(yyruleno==730); + case 744: /* having_clause_opt ::= */ yytestcase(yyruleno==744); + case 746: /* range_opt ::= */ yytestcase(yyruleno==746); + case 749: /* every_opt ::= */ yytestcase(yyruleno==749); + case 762: /* slimit_clause_opt ::= */ yytestcase(yyruleno==762); + case 766: /* limit_clause_opt ::= */ yytestcase(yyruleno==766); { yymsp[1].minor.yy974 = NULL; } -#line 6308 "sql.c" break; case 58: /* with_clause_opt ::= WITH search_condition */ - case 656: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==656); - case 683: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==683); - case 706: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==706); - case 744: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==744); -#line 155 "sql.y" + case 657: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==657); + case 684: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==684); + case 707: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==707); + case 745: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==745); { yymsp[-1].minor.yy974 = yymsp[0].minor.yy974; } -#line 6317 "sql.c" break; case 59: /* cmd ::= CREATE ENCRYPT_KEY NK_STRING */ -#line 158 "sql.y" { pCxt->pRootNode = createEncryptKeyStmt(pCxt, &yymsp[0].minor.yy0); } -#line 6322 "sql.c" break; case 60: /* cmd ::= CREATE ANODE NK_STRING */ -#line 161 "sql.y" { pCxt->pRootNode = createCreateAnodeStmt(pCxt, &yymsp[0].minor.yy0); } -#line 6327 "sql.c" break; case 61: /* cmd ::= UPDATE ANODE NK_INTEGER */ -#line 162 "sql.y" { pCxt->pRootNode = createUpdateAnodeStmt(pCxt, &yymsp[0].minor.yy0, false); } -#line 6332 "sql.c" break; case 62: /* cmd ::= UPDATE ALL ANODES */ -#line 163 "sql.y" { pCxt->pRootNode = createUpdateAnodeStmt(pCxt, NULL, true); } -#line 6337 "sql.c" break; case 63: /* cmd ::= DROP ANODE NK_INTEGER */ -#line 164 "sql.y" { pCxt->pRootNode = createDropAnodeStmt(pCxt, &yymsp[0].minor.yy0); } -#line 6342 "sql.c" break; case 64: /* cmd ::= CREATE DNODE dnode_endpoint */ -#line 167 "sql.y" { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy557, NULL); } -#line 6347 "sql.c" break; case 65: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -#line 168 "sql.y" { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0); } -#line 6352 "sql.c" break; case 66: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -#line 169 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy569, false); } -#line 6357 "sql.c" break; case 67: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -#line 170 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy557, yymsp[0].minor.yy569, false); } -#line 6362 "sql.c" break; case 68: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ -#line 171 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy569); } -#line 6367 "sql.c" break; case 69: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ -#line 172 "sql.y" { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy557, false, yymsp[0].minor.yy569); } -#line 6372 "sql.c" break; case 70: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ -#line 173 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } -#line 6377 "sql.c" break; case 71: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ -#line 174 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 6382 "sql.c" break; case 72: /* cmd ::= ALTER ALL DNODES NK_STRING */ -#line 175 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } -#line 6387 "sql.c" break; case 73: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ -#line 176 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 6392 "sql.c" break; case 74: /* cmd ::= RESTORE DNODE NK_INTEGER */ -#line 177 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); } -#line 6397 "sql.c" break; case 75: /* dnode_endpoint ::= NK_STRING */ case 76: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==76); case 77: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==77); - case 372: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==372); - case 373: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==373); - case 374: /* sma_func_name ::= LAST */ yytestcase(yyruleno==374); - case 375: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==375); - case 523: /* db_name ::= NK_ID */ yytestcase(yyruleno==523); - case 524: /* table_name ::= NK_ID */ yytestcase(yyruleno==524); - case 525: /* column_name ::= NK_ID */ yytestcase(yyruleno==525); - case 526: /* function_name ::= NK_ID */ yytestcase(yyruleno==526); - case 527: /* view_name ::= NK_ID */ yytestcase(yyruleno==527); - case 528: /* table_alias ::= NK_ID */ yytestcase(yyruleno==528); - case 529: /* column_alias ::= NK_ID */ yytestcase(yyruleno==529); - case 530: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==530); - case 531: /* user_name ::= NK_ID */ yytestcase(yyruleno==531); - case 532: /* topic_name ::= NK_ID */ yytestcase(yyruleno==532); - case 533: /* stream_name ::= NK_ID */ yytestcase(yyruleno==533); - case 534: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==534); - case 535: /* index_name ::= NK_ID */ yytestcase(yyruleno==535); - case 536: /* tsma_name ::= NK_ID */ yytestcase(yyruleno==536); - case 595: /* substr_func ::= SUBSTR */ yytestcase(yyruleno==595); - case 596: /* substr_func ::= SUBSTRING */ yytestcase(yyruleno==596); - case 600: /* noarg_func ::= NOW */ yytestcase(yyruleno==600); - case 601: /* noarg_func ::= TODAY */ yytestcase(yyruleno==601); - case 602: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==602); - case 603: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==603); - case 604: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==604); - case 605: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==605); - case 606: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==606); - case 607: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==607); - case 608: /* noarg_func ::= USER */ yytestcase(yyruleno==608); - case 609: /* noarg_func ::= PI */ yytestcase(yyruleno==609); - case 610: /* star_func ::= COUNT */ yytestcase(yyruleno==610); - case 611: /* star_func ::= FIRST */ yytestcase(yyruleno==611); - case 612: /* star_func ::= LAST */ yytestcase(yyruleno==612); - case 613: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==613); -#line 181 "sql.y" + case 373: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==373); + case 374: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==374); + case 375: /* sma_func_name ::= LAST */ yytestcase(yyruleno==375); + case 376: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==376); + case 524: /* db_name ::= NK_ID */ yytestcase(yyruleno==524); + case 525: /* table_name ::= NK_ID */ yytestcase(yyruleno==525); + case 526: /* column_name ::= NK_ID */ yytestcase(yyruleno==526); + case 527: /* function_name ::= NK_ID */ yytestcase(yyruleno==527); + case 528: /* view_name ::= NK_ID */ yytestcase(yyruleno==528); + case 529: /* table_alias ::= NK_ID */ yytestcase(yyruleno==529); + case 530: /* column_alias ::= NK_ID */ yytestcase(yyruleno==530); + case 531: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==531); + case 532: /* user_name ::= NK_ID */ yytestcase(yyruleno==532); + case 533: /* topic_name ::= NK_ID */ yytestcase(yyruleno==533); + case 534: /* stream_name ::= NK_ID */ yytestcase(yyruleno==534); + case 535: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==535); + case 536: /* index_name ::= NK_ID */ yytestcase(yyruleno==536); + case 537: /* tsma_name ::= NK_ID */ yytestcase(yyruleno==537); + case 596: /* substr_func ::= SUBSTR */ yytestcase(yyruleno==596); + case 597: /* substr_func ::= SUBSTRING */ yytestcase(yyruleno==597); + case 601: /* noarg_func ::= NOW */ yytestcase(yyruleno==601); + case 602: /* noarg_func ::= TODAY */ yytestcase(yyruleno==602); + case 603: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==603); + case 604: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==604); + case 605: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==605); + case 606: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==606); + case 607: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==607); + case 608: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==608); + case 609: /* noarg_func ::= USER */ yytestcase(yyruleno==609); + case 610: /* noarg_func ::= PI */ yytestcase(yyruleno==610); + case 611: /* star_func ::= COUNT */ yytestcase(yyruleno==611); + case 612: /* star_func ::= FIRST */ yytestcase(yyruleno==612); + case 613: /* star_func ::= LAST */ yytestcase(yyruleno==613); + case 614: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==614); { yylhsminor.yy557 = yymsp[0].minor.yy0; } -#line 6438 "sql.c" yymsp[0].minor.yy557 = yylhsminor.yy557; break; case 78: /* force_opt ::= */ case 105: /* not_exists_opt ::= */ yytestcase(yyruleno==105); case 107: /* exists_opt ::= */ yytestcase(yyruleno==107); - case 210: /* with_opt ::= */ yytestcase(yyruleno==210); - case 393: /* analyze_opt ::= */ yytestcase(yyruleno==393); - case 400: /* agg_func_opt ::= */ yytestcase(yyruleno==400); - case 406: /* or_replace_opt ::= */ yytestcase(yyruleno==406); - case 437: /* ignore_opt ::= */ yytestcase(yyruleno==437); - case 693: /* tag_mode_opt ::= */ yytestcase(yyruleno==693); - case 695: /* set_quantifier_opt ::= */ yytestcase(yyruleno==695); -#line 187 "sql.y" + case 211: /* with_opt ::= */ yytestcase(yyruleno==211); + case 394: /* analyze_opt ::= */ yytestcase(yyruleno==394); + case 401: /* agg_func_opt ::= */ yytestcase(yyruleno==401); + case 407: /* or_replace_opt ::= */ yytestcase(yyruleno==407); + case 438: /* ignore_opt ::= */ yytestcase(yyruleno==438); + case 694: /* tag_mode_opt ::= */ yytestcase(yyruleno==694); + case 696: /* set_quantifier_opt ::= */ yytestcase(yyruleno==696); { yymsp[1].minor.yy569 = false; } -#line 6453 "sql.c" break; case 79: /* force_opt ::= FORCE */ case 80: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==80); - case 211: /* with_opt ::= WITH */ yytestcase(yyruleno==211); - case 394: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==394); - case 401: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==401); - case 694: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==694); - case 696: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==696); -#line 188 "sql.y" + case 212: /* with_opt ::= WITH */ yytestcase(yyruleno==212); + case 395: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==395); + case 402: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==402); + case 695: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==695); + case 697: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==697); { yymsp[0].minor.yy569 = true; } -#line 6464 "sql.c" break; case 81: /* cmd ::= ALTER CLUSTER NK_STRING */ -#line 195 "sql.y" { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 6469 "sql.c" break; case 82: /* cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ -#line 196 "sql.y" { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 6474 "sql.c" break; case 83: /* cmd ::= ALTER LOCAL NK_STRING */ -#line 199 "sql.y" { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 6479 "sql.c" break; case 84: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ -#line 200 "sql.y" { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 6484 "sql.c" break; case 85: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ -#line 203 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 6489 "sql.c" break; case 86: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ -#line 204 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 6494 "sql.c" break; case 87: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ -#line 205 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 6499 "sql.c" break; case 88: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ -#line 208 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } -#line 6504 "sql.c" break; case 89: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ -#line 209 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } -#line 6509 "sql.c" break; case 90: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ -#line 212 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } -#line 6514 "sql.c" break; case 91: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ -#line 213 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } -#line 6519 "sql.c" break; case 92: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ -#line 216 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 6524 "sql.c" break; case 93: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ -#line 217 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 6529 "sql.c" break; case 94: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ -#line 218 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 6534 "sql.c" break; case 95: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ -#line 221 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } -#line 6539 "sql.c" break; case 96: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -#line 224 "sql.y" { pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy569, &yymsp[-1].minor.yy557, yymsp[0].minor.yy974); } -#line 6544 "sql.c" break; case 97: /* cmd ::= DROP DATABASE exists_opt db_name */ -#line 225 "sql.y" { pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } -#line 6549 "sql.c" break; case 98: /* cmd ::= USE db_name */ -#line 226 "sql.y" { pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy557); } -#line 6554 "sql.c" break; case 99: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -#line 227 "sql.y" { pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy557, yymsp[0].minor.yy974); } -#line 6559 "sql.c" break; case 100: /* cmd ::= FLUSH DATABASE db_name */ -#line 228 "sql.y" { pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy557); } -#line 6564 "sql.c" break; case 101: /* cmd ::= TRIM DATABASE db_name speed_opt */ -#line 229 "sql.y" { pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy557, yymsp[0].minor.yy904); } -#line 6569 "sql.c" break; case 102: /* cmd ::= S3MIGRATE DATABASE db_name */ -#line 230 "sql.y" { pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &yymsp[0].minor.yy557); } -#line 6574 "sql.c" break; case 103: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -#line 231 "sql.y" { pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy557, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } -#line 6579 "sql.c" break; case 104: /* not_exists_opt ::= IF NOT EXISTS */ -#line 235 "sql.y" { yymsp[-2].minor.yy569 = true; } -#line 6584 "sql.c" break; case 106: /* exists_opt ::= IF EXISTS */ - case 407: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==407); - case 438: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==438); -#line 240 "sql.y" + case 408: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==408); + case 439: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==439); { yymsp[-1].minor.yy569 = true; } -#line 6591 "sql.c" break; case 108: /* db_options ::= */ -#line 243 "sql.y" { yymsp[1].minor.yy974 = createDefaultDatabaseOptions(pCxt); } -#line 6596 "sql.c" break; case 109: /* db_options ::= db_options BUFFER NK_INTEGER */ -#line 244 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } -#line 6601 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 110: /* db_options ::= db_options CACHEMODEL NK_STRING */ -#line 245 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } -#line 6607 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 111: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -#line 246 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } -#line 6613 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 112: /* db_options ::= db_options COMP NK_INTEGER */ -#line 247 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_COMP, &yymsp[0].minor.yy0); } -#line 6619 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 113: /* db_options ::= db_options DURATION NK_INTEGER */ case 114: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==114); -#line 248 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } -#line 6626 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 115: /* db_options ::= db_options MAXROWS NK_INTEGER */ -#line 250 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } -#line 6632 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 116: /* db_options ::= db_options MINROWS NK_INTEGER */ -#line 251 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } -#line 6638 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 117: /* db_options ::= db_options KEEP integer_list */ case 118: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==118); -#line 252 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_KEEP, yymsp[0].minor.yy946); } -#line 6645 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 119: /* db_options ::= db_options PAGES NK_INTEGER */ -#line 254 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } -#line 6651 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 120: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -#line 255 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } -#line 6657 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 121: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -#line 256 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } -#line 6663 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 122: /* db_options ::= db_options PRECISION NK_STRING */ -#line 257 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } -#line 6669 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 123: /* db_options ::= db_options REPLICA NK_INTEGER */ -#line 258 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } -#line 6675 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 124: /* db_options ::= db_options VGROUPS NK_INTEGER */ -#line 260 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } -#line 6681 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 125: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -#line 261 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } -#line 6687 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 126: /* db_options ::= db_options RETENTIONS retention_list */ -#line 262 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_RETENTIONS, yymsp[0].minor.yy946); } -#line 6693 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 127: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -#line 263 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } -#line 6699 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 128: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -#line 264 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL, &yymsp[0].minor.yy0); } -#line 6705 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 129: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -#line 265 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } -#line 6711 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 130: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -#line 266 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } -#line 6717 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 131: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ -#line 267 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-3].minor.yy974, DB_OPTION_WAL_RETENTION_PERIOD, &t); } -#line 6727 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; case 132: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -#line 272 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } -#line 6733 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 133: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ -#line 273 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-3].minor.yy974, DB_OPTION_WAL_RETENTION_SIZE, &t); } -#line 6743 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; case 134: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -#line 278 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } -#line 6749 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 135: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -#line 279 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } -#line 6755 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 136: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -#line 280 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } -#line 6761 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 137: /* db_options ::= db_options TABLE_PREFIX signed */ -#line 281 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy974); } -#line 6767 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 138: /* db_options ::= db_options TABLE_SUFFIX signed */ -#line 282 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy974); } -#line 6773 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 139: /* db_options ::= db_options S3_CHUNKPAGES NK_INTEGER */ -#line 283 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_S3_CHUNKPAGES, &yymsp[0].minor.yy0); } -#line 6779 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 140: /* db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ case 141: /* db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==141); -#line 284 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_S3_KEEPLOCAL, &yymsp[0].minor.yy0); } -#line 6786 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 142: /* db_options ::= db_options S3_COMPACT NK_INTEGER */ -#line 286 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_S3_COMPACT, &yymsp[0].minor.yy0); } -#line 6792 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 143: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ -#line 287 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } -#line 6798 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; case 144: /* db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ -#line 288 "sql.y" { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_ENCRYPT_ALGORITHM, &yymsp[0].minor.yy0); } -#line 6804 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 145: /* alter_db_options ::= alter_db_option */ -#line 290 "sql.y" + case 145: /* db_options ::= db_options DNODES NK_STRING */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_DNODES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; + break; + case 146: /* alter_db_options ::= alter_db_option */ { yylhsminor.yy974 = createAlterDatabaseOptions(pCxt); yylhsminor.yy974 = setAlterDatabaseOption(pCxt, yylhsminor.yy974, &yymsp[0].minor.yy683); } -#line 6810 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 146: /* alter_db_options ::= alter_db_options alter_db_option */ -#line 291 "sql.y" + case 147: /* alter_db_options ::= alter_db_options alter_db_option */ { yylhsminor.yy974 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy974, &yymsp[0].minor.yy683); } -#line 6816 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 147: /* alter_db_option ::= BUFFER NK_INTEGER */ -#line 295 "sql.y" + case 148: /* alter_db_option ::= BUFFER NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6822 "sql.c" break; - case 148: /* alter_db_option ::= CACHEMODEL NK_STRING */ -#line 296 "sql.y" + case 149: /* alter_db_option ::= CACHEMODEL NK_STRING */ { yymsp[-1].minor.yy683.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6827 "sql.c" break; - case 149: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -#line 297 "sql.y" + case 150: /* alter_db_option ::= CACHESIZE NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6832 "sql.c" break; - case 150: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -#line 298 "sql.y" + case 151: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6837 "sql.c" break; - case 151: /* alter_db_option ::= KEEP integer_list */ - case 152: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==152); -#line 299 "sql.y" + case 152: /* alter_db_option ::= KEEP integer_list */ + case 153: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==153); { yymsp[-1].minor.yy683.type = DB_OPTION_KEEP; yymsp[-1].minor.yy683.pList = yymsp[0].minor.yy946; } -#line 6843 "sql.c" break; - case 153: /* alter_db_option ::= PAGES NK_INTEGER */ -#line 301 "sql.y" + case 154: /* alter_db_option ::= PAGES NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_PAGES; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6848 "sql.c" break; - case 154: /* alter_db_option ::= REPLICA NK_INTEGER */ -#line 302 "sql.y" + case 155: /* alter_db_option ::= REPLICA NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6853 "sql.c" break; - case 155: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -#line 304 "sql.y" + case 156: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_WAL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6858 "sql.c" break; - case 156: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -#line 305 "sql.y" + case 157: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6863 "sql.c" break; - case 157: /* alter_db_option ::= MINROWS NK_INTEGER */ -#line 306 "sql.y" + case 158: /* alter_db_option ::= MINROWS NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6868 "sql.c" break; - case 158: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -#line 307 "sql.y" + case 159: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6873 "sql.c" break; - case 159: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ -#line 308 "sql.y" + case 160: /* alter_db_option ::= 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; yymsp[-2].minor.yy683.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy683.val = t; } -#line 6882 "sql.c" break; - case 160: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -#line 313 "sql.y" + case 161: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6887 "sql.c" break; - case 161: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ -#line 314 "sql.y" + case 162: /* alter_db_option ::= 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; yymsp[-2].minor.yy683.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy683.val = t; } -#line 6896 "sql.c" break; - case 162: /* alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - case 163: /* alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==163); -#line 319 "sql.y" + case 163: /* alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + case 164: /* alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==164); { yymsp[-1].minor.yy683.type = DB_OPTION_S3_KEEPLOCAL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6902 "sql.c" break; - case 164: /* alter_db_option ::= S3_COMPACT NK_INTEGER */ -#line 321 "sql.y" + case 165: /* alter_db_option ::= S3_COMPACT NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_S3_COMPACT, yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6907 "sql.c" break; - case 165: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ -#line 322 "sql.y" + case 166: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6912 "sql.c" break; - case 166: /* alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ -#line 323 "sql.y" + case 167: /* alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ { yymsp[-1].minor.yy683.type = DB_OPTION_ENCRYPT_ALGORITHM; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 6917 "sql.c" break; - case 167: /* integer_list ::= NK_INTEGER */ -#line 327 "sql.y" + case 168: /* integer_list ::= NK_INTEGER */ { yylhsminor.yy946 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 6922 "sql.c" yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 168: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 452: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==452); -#line 328 "sql.y" + case 169: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ + case 453: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==453); { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 6929 "sql.c" yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 169: /* variable_list ::= NK_VARIABLE */ -#line 332 "sql.y" + case 170: /* variable_list ::= NK_VARIABLE */ { yylhsminor.yy946 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 6935 "sql.c" yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 170: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -#line 333 "sql.y" + case 171: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 6941 "sql.c" yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 171: /* retention_list ::= retention */ - case 204: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==204); - case 207: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==207); - case 216: /* tag_def_list ::= tag_def */ yytestcase(yyruleno==216); - case 219: /* column_def_list ::= column_def */ yytestcase(yyruleno==219); - case 267: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==267); - case 272: /* col_name_list ::= col_name */ yytestcase(yyruleno==272); - case 344: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==344); - case 368: /* func_list ::= func */ yytestcase(yyruleno==368); - case 418: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==418); - case 496: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==496); - case 521: /* literal_list ::= signed_literal */ yytestcase(yyruleno==521); - case 616: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==616); - case 622: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==622); - case 698: /* select_list ::= select_item */ yytestcase(yyruleno==698); - case 709: /* partition_list ::= partition_item */ yytestcase(yyruleno==709); - case 772: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==772); -#line 337 "sql.y" + case 172: /* retention_list ::= retention */ + case 205: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==205); + case 208: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==208); + case 217: /* tag_def_list ::= tag_def */ yytestcase(yyruleno==217); + case 220: /* column_def_list ::= column_def */ yytestcase(yyruleno==220); + case 268: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==268); + case 273: /* col_name_list ::= col_name */ yytestcase(yyruleno==273); + case 345: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==345); + case 369: /* func_list ::= func */ yytestcase(yyruleno==369); + case 419: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==419); + case 497: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==497); + case 522: /* literal_list ::= signed_literal */ yytestcase(yyruleno==522); + case 617: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==617); + case 623: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==623); + case 699: /* select_list ::= select_item */ yytestcase(yyruleno==699); + case 710: /* partition_list ::= partition_item */ yytestcase(yyruleno==710); + case 773: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==773); { yylhsminor.yy946 = createNodeList(pCxt, yymsp[0].minor.yy974); } -#line 6963 "sql.c" yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 172: /* retention_list ::= retention_list NK_COMMA retention */ - case 208: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==208); - case 217: /* tag_def_list ::= tag_def_list NK_COMMA tag_def */ yytestcase(yyruleno==217); - case 220: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==220); - case 268: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==268); - case 273: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==273); - case 345: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==345); - case 369: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==369); - case 419: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==419); - case 497: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==497); - case 522: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==522); - case 617: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==617); - case 699: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==699); - case 710: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==710); - case 773: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==773); -#line 338 "sql.y" + case 173: /* retention_list ::= retention_list NK_COMMA retention */ + case 209: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==209); + case 218: /* tag_def_list ::= tag_def_list NK_COMMA tag_def */ yytestcase(yyruleno==218); + case 221: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==221); + case 269: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==269); + case 274: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==274); + case 346: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==346); + case 370: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==370); + case 420: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==420); + case 498: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==498); + case 523: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==523); + case 618: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==618); + case 700: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==700); + case 711: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==711); + case 774: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==774); { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, yymsp[0].minor.yy974); } -#line 6983 "sql.c" yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 173: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - case 174: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==174); -#line 340 "sql.y" + case 174: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + case 175: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==175); { yylhsminor.yy974 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 6990 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 175: /* speed_opt ::= */ - case 402: /* bufsize_opt ::= */ yytestcase(yyruleno==402); -#line 345 "sql.y" + case 176: /* speed_opt ::= */ + case 403: /* bufsize_opt ::= */ yytestcase(yyruleno==403); { yymsp[1].minor.yy904 = 0; } -#line 6997 "sql.c" break; - case 176: /* speed_opt ::= BWLIMIT NK_INTEGER */ - case 403: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==403); -#line 346 "sql.y" + case 177: /* speed_opt ::= BWLIMIT NK_INTEGER */ + case 404: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==404); { yymsp[-1].minor.yy904 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } -#line 7003 "sql.c" break; - case 178: /* start_opt ::= START WITH NK_INTEGER */ - case 182: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==182); -#line 349 "sql.y" + case 179: /* start_opt ::= START WITH NK_INTEGER */ + case 183: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==183); { yymsp[-2].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } -#line 7009 "sql.c" break; - case 179: /* start_opt ::= START WITH NK_STRING */ - case 183: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==183); -#line 350 "sql.y" + case 180: /* start_opt ::= START WITH NK_STRING */ + case 184: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==184); { yymsp[-2].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 7015 "sql.c" break; - case 180: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ - case 184: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==184); -#line 351 "sql.y" + case 181: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ + case 185: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==185); { yymsp[-3].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 7021 "sql.c" break; - case 185: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 188: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==188); -#line 360 "sql.y" + case 186: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + case 189: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==189); { pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy569, yymsp[-5].minor.yy974, yymsp[-3].minor.yy946, yymsp[-1].minor.yy946, yymsp[0].minor.yy974); } -#line 7027 "sql.c" break; - case 186: /* cmd ::= CREATE TABLE multi_create_clause */ -#line 361 "sql.y" + case 187: /* cmd ::= CREATE TABLE multi_create_clause */ { pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy946); } -#line 7032 "sql.c" break; - case 187: /* cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ -#line 363 "sql.y" + case 188: /* cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ { pCxt->pRootNode = createCreateSubTableFromFileClause(pCxt, yymsp[-7].minor.yy569, yymsp[-5].minor.yy974, yymsp[-3].minor.yy946, &yymsp[0].minor.yy0); } -#line 7037 "sql.c" break; - case 189: /* cmd ::= DROP TABLE with_opt multi_drop_clause */ -#line 366 "sql.y" + case 190: /* cmd ::= DROP TABLE with_opt multi_drop_clause */ { pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy946); } -#line 7042 "sql.c" break; - case 190: /* cmd ::= DROP STABLE with_opt exists_opt full_table_name */ -#line 367 "sql.y" + case 191: /* cmd ::= DROP STABLE with_opt exists_opt full_table_name */ { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-2].minor.yy569, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } -#line 7047 "sql.c" break; - case 191: /* cmd ::= ALTER TABLE alter_table_clause */ - case 454: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==454); - case 455: /* cmd ::= insert_query */ yytestcase(yyruleno==455); -#line 369 "sql.y" + case 192: /* cmd ::= ALTER TABLE alter_table_clause */ + case 455: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==455); + case 456: /* cmd ::= insert_query */ yytestcase(yyruleno==456); { pCxt->pRootNode = yymsp[0].minor.yy974; } -#line 7054 "sql.c" break; - case 192: /* cmd ::= ALTER STABLE alter_table_clause */ -#line 370 "sql.y" + case 193: /* cmd ::= ALTER STABLE alter_table_clause */ { pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy974); } -#line 7059 "sql.c" break; - case 193: /* alter_table_clause ::= full_table_name alter_table_options */ -#line 372 "sql.y" + case 194: /* alter_table_clause ::= full_table_name alter_table_options */ { yylhsminor.yy974 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } -#line 7064 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 194: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ -#line 374 "sql.y" + case 195: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ { yylhsminor.yy974 = createAlterTableAddModifyColOptions2(pCxt, yymsp[-5].minor.yy974, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-2].minor.yy557, yymsp[-1].minor.yy424, yymsp[0].minor.yy974); } -#line 7070 "sql.c" yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 195: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -#line 375 "sql.y" + case 196: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ { yylhsminor.yy974 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy974, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy557); } -#line 7076 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 196: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -#line 377 "sql.y" + case 197: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ { yylhsminor.yy974 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424); } -#line 7082 "sql.c" yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 197: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ -#line 379 "sql.y" + case 198: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ { yylhsminor.yy974 = createAlterTableAddModifyColOptions(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_COLUMN_COMPRESS, &yymsp[-1].minor.yy557, yymsp[0].minor.yy974); } -#line 7088 "sql.c" yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 198: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -#line 381 "sql.y" + case 199: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ { yylhsminor.yy974 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } -#line 7094 "sql.c" yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 199: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -#line 383 "sql.y" + case 200: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ { yylhsminor.yy974 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424); } -#line 7100 "sql.c" yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 200: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -#line 384 "sql.y" + case 201: /* alter_table_clause ::= full_table_name DROP TAG column_name */ { yylhsminor.yy974 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy974, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy557); } -#line 7106 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 201: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -#line 386 "sql.y" + case 202: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ { yylhsminor.yy974 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424); } -#line 7112 "sql.c" yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 202: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -#line 388 "sql.y" + case 203: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ { yylhsminor.yy974 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } -#line 7118 "sql.c" yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 203: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ -#line 390 "sql.y" + case 204: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ { yylhsminor.yy974 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy974, &yymsp[-2].minor.yy557, yymsp[0].minor.yy974); } -#line 7124 "sql.c" yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 205: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 623: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==623); -#line 395 "sql.y" + case 206: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 624: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==624); { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-1].minor.yy946, yymsp[0].minor.yy974); } -#line 7131 "sql.c" yymsp[-1].minor.yy946 = yylhsminor.yy946; break; - case 206: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ -#line 399 "sql.y" + case 207: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ { yylhsminor.yy974 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy569, yymsp[-8].minor.yy974, yymsp[-6].minor.yy974, yymsp[-5].minor.yy946, yymsp[-2].minor.yy946, yymsp[0].minor.yy974); } -#line 7137 "sql.c" yymsp[-9].minor.yy974 = yylhsminor.yy974; break; - case 209: /* drop_table_clause ::= exists_opt full_table_name */ -#line 406 "sql.y" + case 210: /* drop_table_clause ::= exists_opt full_table_name */ { yylhsminor.yy974 = createDropTableClause(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } -#line 7143 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 213: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 417: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==417); -#line 416 "sql.y" + case 214: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 418: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==418); { yymsp[-2].minor.yy946 = yymsp[-1].minor.yy946; } -#line 7150 "sql.c" break; - case 214: /* full_table_name ::= table_name */ - case 358: /* full_tsma_name ::= tsma_name */ yytestcase(yyruleno==358); -#line 418 "sql.y" + case 215: /* full_table_name ::= table_name */ + case 359: /* full_tsma_name ::= tsma_name */ yytestcase(yyruleno==359); { yylhsminor.yy974 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy557, NULL); } -#line 7156 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 215: /* full_table_name ::= db_name NK_DOT table_name */ - case 359: /* full_tsma_name ::= db_name NK_DOT tsma_name */ yytestcase(yyruleno==359); -#line 419 "sql.y" + case 216: /* full_table_name ::= db_name NK_DOT table_name */ + case 360: /* full_tsma_name ::= db_name NK_DOT tsma_name */ yytestcase(yyruleno==360); { yylhsminor.yy974 = createRealTableNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557, NULL); } -#line 7163 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 218: /* tag_def ::= column_name type_name */ -#line 425 "sql.y" + case 219: /* tag_def ::= column_name type_name */ { yylhsminor.yy974 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424, NULL); } -#line 7169 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 221: /* column_def ::= column_name type_name column_options */ -#line 433 "sql.y" + case 222: /* column_def ::= column_name type_name column_options */ { yylhsminor.yy974 = createColumnDefNode(pCxt, &yymsp[-2].minor.yy557, yymsp[-1].minor.yy424, yymsp[0].minor.yy974); } -#line 7175 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 222: /* type_name ::= BOOL */ -#line 437 "sql.y" + case 223: /* type_name ::= BOOL */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_BOOL); } -#line 7181 "sql.c" break; - case 223: /* type_name ::= TINYINT */ -#line 438 "sql.y" + case 224: /* type_name ::= TINYINT */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_TINYINT); } -#line 7186 "sql.c" break; - case 224: /* type_name ::= SMALLINT */ -#line 439 "sql.y" + case 225: /* type_name ::= SMALLINT */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_SMALLINT); } -#line 7191 "sql.c" break; - case 225: /* type_name ::= INT */ - case 226: /* type_name ::= INTEGER */ yytestcase(yyruleno==226); -#line 440 "sql.y" + case 226: /* type_name ::= INT */ + case 227: /* type_name ::= INTEGER */ yytestcase(yyruleno==227); { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_INT); } -#line 7197 "sql.c" break; - case 227: /* type_name ::= BIGINT */ -#line 442 "sql.y" + case 228: /* type_name ::= BIGINT */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_BIGINT); } -#line 7202 "sql.c" break; - case 228: /* type_name ::= FLOAT */ -#line 443 "sql.y" + case 229: /* type_name ::= FLOAT */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_FLOAT); } -#line 7207 "sql.c" break; - case 229: /* type_name ::= DOUBLE */ -#line 444 "sql.y" + case 230: /* type_name ::= DOUBLE */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_DOUBLE); } -#line 7212 "sql.c" break; - case 230: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -#line 445 "sql.y" + case 231: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } -#line 7217 "sql.c" break; - case 231: /* type_name ::= TIMESTAMP */ -#line 446 "sql.y" + case 232: /* type_name ::= TIMESTAMP */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } -#line 7222 "sql.c" break; - case 232: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -#line 447 "sql.y" + case 233: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } -#line 7227 "sql.c" break; - case 233: /* type_name ::= TINYINT UNSIGNED */ -#line 448 "sql.y" + case 234: /* type_name ::= TINYINT UNSIGNED */ { yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_UTINYINT); } -#line 7232 "sql.c" break; - case 234: /* type_name ::= SMALLINT UNSIGNED */ -#line 449 "sql.y" + case 235: /* type_name ::= SMALLINT UNSIGNED */ { yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_USMALLINT); } -#line 7237 "sql.c" break; - case 235: /* type_name ::= INT UNSIGNED */ -#line 450 "sql.y" + case 236: /* type_name ::= INT UNSIGNED */ { yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_UINT); } -#line 7242 "sql.c" break; - case 236: /* type_name ::= BIGINT UNSIGNED */ -#line 451 "sql.y" + case 237: /* type_name ::= BIGINT UNSIGNED */ { yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_UBIGINT); } -#line 7247 "sql.c" break; - case 237: /* type_name ::= JSON */ -#line 452 "sql.y" + case 238: /* type_name ::= JSON */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_JSON); } -#line 7252 "sql.c" break; - case 238: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -#line 453 "sql.y" + case 239: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } -#line 7257 "sql.c" break; - case 239: /* type_name ::= MEDIUMBLOB */ -#line 454 "sql.y" + case 240: /* type_name ::= MEDIUMBLOB */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } -#line 7262 "sql.c" break; - case 240: /* type_name ::= BLOB */ -#line 455 "sql.y" + case 241: /* type_name ::= BLOB */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_BLOB); } -#line 7267 "sql.c" break; - case 241: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -#line 456 "sql.y" + case 242: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } -#line 7272 "sql.c" break; - case 242: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ -#line 457 "sql.y" + case 243: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } -#line 7277 "sql.c" break; - case 243: /* type_name ::= DECIMAL */ -#line 458 "sql.y" + case 244: /* type_name ::= DECIMAL */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 7282 "sql.c" break; - case 244: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -#line 459 "sql.y" + case 245: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 7287 "sql.c" break; - case 245: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -#line 460 "sql.y" + case 246: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy424 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 7292 "sql.c" break; - case 246: /* type_name_default_len ::= BINARY */ -#line 464 "sql.y" + case 247: /* type_name_default_len ::= BINARY */ { yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } -#line 7297 "sql.c" break; - case 247: /* type_name_default_len ::= NCHAR */ -#line 465 "sql.y" + case 248: /* type_name_default_len ::= NCHAR */ { yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } -#line 7302 "sql.c" break; - case 248: /* type_name_default_len ::= VARCHAR */ -#line 466 "sql.y" + case 249: /* type_name_default_len ::= VARCHAR */ { yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } -#line 7307 "sql.c" break; - case 249: /* type_name_default_len ::= VARBINARY */ -#line 467 "sql.y" + case 250: /* type_name_default_len ::= VARBINARY */ { yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } -#line 7312 "sql.c" break; - case 252: /* tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - case 425: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==425); -#line 476 "sql.y" + case 253: /* tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + case 426: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==426); { yymsp[-3].minor.yy946 = yymsp[-1].minor.yy946; } -#line 7318 "sql.c" break; - case 253: /* table_options ::= */ -#line 478 "sql.y" + case 254: /* table_options ::= */ { yymsp[1].minor.yy974 = createDefaultTableOptions(pCxt); } -#line 7323 "sql.c" break; - case 254: /* table_options ::= table_options COMMENT NK_STRING */ -#line 479 "sql.y" + case 255: /* table_options ::= table_options COMMENT NK_STRING */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } -#line 7328 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 255: /* table_options ::= table_options MAX_DELAY duration_list */ -#line 480 "sql.y" + case 256: /* table_options ::= table_options MAX_DELAY duration_list */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy946); } -#line 7334 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 256: /* table_options ::= table_options WATERMARK duration_list */ -#line 481 "sql.y" + case 257: /* table_options ::= table_options WATERMARK duration_list */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy946); } -#line 7340 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 257: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -#line 482 "sql.y" + case 258: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-4].minor.yy974, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy946); } -#line 7346 "sql.c" yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 258: /* table_options ::= table_options TTL NK_INTEGER */ -#line 483 "sql.y" + case 259: /* table_options ::= table_options TTL NK_INTEGER */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } -#line 7352 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 259: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -#line 484 "sql.y" + case 260: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-4].minor.yy974, TABLE_OPTION_SMA, yymsp[-1].minor.yy946); } -#line 7358 "sql.c" yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 260: /* table_options ::= table_options DELETE_MARK duration_list */ -#line 485 "sql.y" + case 261: /* table_options ::= table_options DELETE_MARK duration_list */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy946); } -#line 7364 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 261: /* alter_table_options ::= alter_table_option */ -#line 487 "sql.y" + case 262: /* alter_table_options ::= alter_table_option */ { yylhsminor.yy974 = createAlterTableOptions(pCxt); yylhsminor.yy974 = setTableOption(pCxt, yylhsminor.yy974, yymsp[0].minor.yy683.type, &yymsp[0].minor.yy683.val); } -#line 7370 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 262: /* alter_table_options ::= alter_table_options alter_table_option */ -#line 488 "sql.y" + case 263: /* alter_table_options ::= alter_table_options alter_table_option */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy683.type, &yymsp[0].minor.yy683.val); } -#line 7376 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 263: /* alter_table_option ::= COMMENT NK_STRING */ -#line 492 "sql.y" + case 264: /* alter_table_option ::= COMMENT NK_STRING */ { yymsp[-1].minor.yy683.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 7382 "sql.c" break; - case 264: /* alter_table_option ::= TTL NK_INTEGER */ -#line 493 "sql.y" + case 265: /* alter_table_option ::= TTL NK_INTEGER */ { yymsp[-1].minor.yy683.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } -#line 7387 "sql.c" break; - case 265: /* duration_list ::= duration_literal */ - case 554: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==554); -#line 497 "sql.y" + case 266: /* duration_list ::= duration_literal */ + case 555: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==555); { yylhsminor.yy946 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } -#line 7393 "sql.c" yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 266: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 555: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==555); -#line 498 "sql.y" + case 267: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 556: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==556); { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } -#line 7400 "sql.c" yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 269: /* rollup_func_name ::= function_name */ -#line 505 "sql.y" + case 270: /* rollup_func_name ::= function_name */ { yylhsminor.yy974 = createFunctionNode(pCxt, &yymsp[0].minor.yy557, NULL); } -#line 7406 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 270: /* rollup_func_name ::= FIRST */ - case 271: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==271); - case 347: /* tag_item ::= QTAGS */ yytestcase(yyruleno==347); -#line 506 "sql.y" + case 271: /* rollup_func_name ::= FIRST */ + case 272: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==272); + case 348: /* tag_item ::= QTAGS */ yytestcase(yyruleno==348); { yylhsminor.yy974 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 7414 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 274: /* col_name ::= column_name */ - case 348: /* tag_item ::= column_name */ yytestcase(yyruleno==348); -#line 514 "sql.y" + case 275: /* col_name ::= column_name */ + case 349: /* tag_item ::= column_name */ yytestcase(yyruleno==349); { yylhsminor.yy974 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy557); } -#line 7421 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 275: /* cmd ::= SHOW DNODES */ -#line 517 "sql.y" + case 276: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } -#line 7427 "sql.c" break; - case 276: /* cmd ::= SHOW USERS */ -#line 518 "sql.y" + case 277: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } -#line 7432 "sql.c" break; - case 277: /* cmd ::= SHOW USERS FULL */ -#line 519 "sql.y" + case 278: /* cmd ::= SHOW USERS FULL */ { pCxt->pRootNode = createShowStmtWithFull(pCxt, QUERY_NODE_SHOW_USERS_FULL_STMT); } -#line 7437 "sql.c" break; - case 278: /* cmd ::= SHOW USER PRIVILEGES */ -#line 520 "sql.y" + case 279: /* cmd ::= SHOW USER PRIVILEGES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } -#line 7442 "sql.c" break; - case 279: /* cmd ::= SHOW db_kind_opt DATABASES */ -#line 521 "sql.y" + case 280: /* cmd ::= SHOW db_kind_opt DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); (void)setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy741); } -#line 7450 "sql.c" break; - case 280: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ -#line 525 "sql.y" + case 281: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ { pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy595, yymsp[0].minor.yy974, OP_TYPE_LIKE); } -#line 7457 "sql.c" break; - case 281: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -#line 528 "sql.y" + case 282: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, OP_TYPE_LIKE); } -#line 7462 "sql.c" break; - case 282: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -#line 529 "sql.y" + case 283: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy974, NULL, OP_TYPE_LIKE); } -#line 7467 "sql.c" break; - case 283: /* cmd ::= SHOW MNODES */ -#line 530 "sql.y" + case 284: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } -#line 7472 "sql.c" break; - case 284: /* cmd ::= SHOW QNODES */ -#line 532 "sql.y" + case 285: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } -#line 7477 "sql.c" break; - case 285: /* cmd ::= SHOW ANODES */ -#line 533 "sql.y" + case 286: /* cmd ::= SHOW ANODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ANODES_STMT); } -#line 7482 "sql.c" break; - case 286: /* cmd ::= SHOW ANODES FULL */ -#line 534 "sql.y" + case 287: /* cmd ::= SHOW ANODES FULL */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ANODES_FULL_STMT); } -#line 7487 "sql.c" break; - case 287: /* cmd ::= SHOW ARBGROUPS */ -#line 535 "sql.y" + case 288: /* cmd ::= SHOW ARBGROUPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ARBGROUPS_STMT); } -#line 7492 "sql.c" break; - case 288: /* cmd ::= SHOW FUNCTIONS */ -#line 536 "sql.y" + case 289: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } -#line 7497 "sql.c" break; - case 289: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -#line 537 "sql.y" + case 290: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy974, yymsp[-1].minor.yy974, OP_TYPE_EQUAL); } -#line 7502 "sql.c" break; - case 290: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ -#line 538 "sql.y" + case 291: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy557), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557), OP_TYPE_EQUAL); } -#line 7507 "sql.c" break; - case 291: /* cmd ::= SHOW STREAMS */ -#line 539 "sql.y" + case 292: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } -#line 7512 "sql.c" break; - case 292: /* cmd ::= SHOW ACCOUNTS */ -#line 540 "sql.y" + case 293: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 7517 "sql.c" break; - case 293: /* cmd ::= SHOW APPS */ -#line 541 "sql.y" + case 294: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } -#line 7522 "sql.c" break; - case 294: /* cmd ::= SHOW CONNECTIONS */ -#line 542 "sql.y" + case 295: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } -#line 7527 "sql.c" break; - case 295: /* cmd ::= SHOW LICENCES */ - case 296: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==296); -#line 543 "sql.y" + case 296: /* cmd ::= SHOW LICENCES */ + case 297: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==297); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } -#line 7533 "sql.c" break; - case 297: /* cmd ::= SHOW GRANTS FULL */ -#line 545 "sql.y" + case 298: /* cmd ::= SHOW GRANTS FULL */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } -#line 7538 "sql.c" break; - case 298: /* cmd ::= SHOW GRANTS LOGS */ -#line 546 "sql.y" + case 299: /* cmd ::= SHOW GRANTS LOGS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); } -#line 7543 "sql.c" break; - case 299: /* cmd ::= SHOW CLUSTER MACHINES */ -#line 547 "sql.y" + case 300: /* cmd ::= SHOW CLUSTER MACHINES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } -#line 7548 "sql.c" break; - case 300: /* cmd ::= SHOW CREATE DATABASE db_name */ -#line 548 "sql.y" + case 301: /* cmd ::= SHOW CREATE DATABASE db_name */ { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy557); } -#line 7553 "sql.c" break; - case 301: /* cmd ::= SHOW CREATE TABLE full_table_name */ -#line 549 "sql.y" + case 302: /* cmd ::= SHOW CREATE TABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy974); } -#line 7558 "sql.c" break; - case 302: /* cmd ::= SHOW CREATE STABLE full_table_name */ -#line 550 "sql.y" + case 303: /* cmd ::= SHOW CREATE STABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy974); } -#line 7564 "sql.c" break; - case 303: /* cmd ::= SHOW ENCRYPTIONS */ -#line 552 "sql.y" + case 304: /* cmd ::= SHOW ENCRYPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ENCRYPTIONS_STMT); } -#line 7569 "sql.c" break; - case 304: /* cmd ::= SHOW QUERIES */ -#line 553 "sql.y" + case 305: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } -#line 7574 "sql.c" break; - case 305: /* cmd ::= SHOW SCORES */ -#line 554 "sql.y" + case 306: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } -#line 7579 "sql.c" break; - case 306: /* cmd ::= SHOW TOPICS */ -#line 555 "sql.y" + case 307: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } -#line 7584 "sql.c" break; - case 307: /* cmd ::= SHOW VARIABLES */ - case 308: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==308); -#line 556 "sql.y" + case 308: /* cmd ::= SHOW VARIABLES */ + case 309: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==309); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } -#line 7590 "sql.c" break; - case 309: /* cmd ::= SHOW LOCAL VARIABLES */ -#line 558 "sql.y" + case 310: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } -#line 7595 "sql.c" break; - case 310: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -#line 559 "sql.y" + case 311: /* 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.yy974); } -#line 7600 "sql.c" break; - case 311: /* cmd ::= SHOW BNODES */ -#line 560 "sql.y" + case 312: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } -#line 7605 "sql.c" break; - case 312: /* cmd ::= SHOW SNODES */ -#line 561 "sql.y" + case 313: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } -#line 7610 "sql.c" break; - case 313: /* cmd ::= SHOW CLUSTER */ -#line 562 "sql.y" + case 314: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } -#line 7615 "sql.c" break; - case 314: /* cmd ::= SHOW TRANSACTIONS */ -#line 563 "sql.y" + case 315: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } -#line 7620 "sql.c" break; - case 315: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -#line 564 "sql.y" + case 316: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ { pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy974); } -#line 7625 "sql.c" break; - case 316: /* cmd ::= SHOW CONSUMERS */ -#line 565 "sql.y" + case 317: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } -#line 7630 "sql.c" break; - case 317: /* cmd ::= SHOW SUBSCRIPTIONS */ -#line 566 "sql.y" + case 318: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } -#line 7635 "sql.c" break; - case 318: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -#line 567 "sql.y" + case 319: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy974, yymsp[-1].minor.yy974, OP_TYPE_EQUAL); } -#line 7640 "sql.c" break; - case 319: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ -#line 568 "sql.y" + case 320: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy557), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557), OP_TYPE_EQUAL); } -#line 7645 "sql.c" break; - case 320: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -#line 569 "sql.y" + case 321: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy974, yymsp[-3].minor.yy946); } -#line 7650 "sql.c" break; - case 321: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ -#line 570 "sql.y" + case 322: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy557), yymsp[-4].minor.yy946); } -#line 7655 "sql.c" break; - case 322: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ -#line 571 "sql.y" + case 323: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } -#line 7660 "sql.c" break; - case 323: /* cmd ::= SHOW VNODES */ -#line 572 "sql.y" + case 324: /* cmd ::= SHOW VNODES */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } -#line 7665 "sql.c" break; - case 324: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -#line 574 "sql.y" + case 325: /* cmd ::= SHOW db_name_cond_opt ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy974, QUERY_NODE_SHOW_DB_ALIVE_STMT); } -#line 7670 "sql.c" break; - case 325: /* cmd ::= SHOW CLUSTER ALIVE */ -#line 575 "sql.y" + case 326: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } -#line 7675 "sql.c" break; - case 326: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ -#line 576 "sql.y" + case 327: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, OP_TYPE_LIKE); } -#line 7680 "sql.c" break; - case 327: /* cmd ::= SHOW CREATE VIEW full_table_name */ -#line 577 "sql.y" + case 328: /* cmd ::= SHOW CREATE VIEW full_table_name */ { pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy974); } -#line 7685 "sql.c" break; - case 328: /* cmd ::= SHOW COMPACTS */ -#line 578 "sql.y" + case 329: /* cmd ::= SHOW COMPACTS */ { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } -#line 7690 "sql.c" break; - case 329: /* cmd ::= SHOW COMPACT NK_INTEGER */ -#line 579 "sql.y" + case 330: /* cmd ::= SHOW COMPACT NK_INTEGER */ { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 7695 "sql.c" break; - case 330: /* table_kind_db_name_cond_opt ::= */ -#line 583 "sql.y" + case 331: /* table_kind_db_name_cond_opt ::= */ { yymsp[1].minor.yy595.kind = SHOW_KIND_ALL; yymsp[1].minor.yy595.dbName = nil_token; } -#line 7700 "sql.c" break; - case 331: /* table_kind_db_name_cond_opt ::= table_kind */ -#line 584 "sql.y" + case 332: /* table_kind_db_name_cond_opt ::= table_kind */ { yylhsminor.yy595.kind = yymsp[0].minor.yy741; yylhsminor.yy595.dbName = nil_token; } -#line 7705 "sql.c" yymsp[0].minor.yy595 = yylhsminor.yy595; break; - case 332: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ -#line 585 "sql.y" + case 333: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy595.kind = SHOW_KIND_ALL; yylhsminor.yy595.dbName = yymsp[-1].minor.yy557; } -#line 7711 "sql.c" yymsp[-1].minor.yy595 = yylhsminor.yy595; break; - case 333: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ -#line 586 "sql.y" + case 334: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ { yylhsminor.yy595.kind = yymsp[-2].minor.yy741; yylhsminor.yy595.dbName = yymsp[-1].minor.yy557; } -#line 7717 "sql.c" yymsp[-2].minor.yy595 = yylhsminor.yy595; break; - case 334: /* table_kind ::= NORMAL */ -#line 590 "sql.y" + case 335: /* table_kind ::= NORMAL */ { yymsp[0].minor.yy741 = SHOW_KIND_TABLES_NORMAL; } -#line 7723 "sql.c" break; - case 335: /* table_kind ::= CHILD */ -#line 591 "sql.y" + case 336: /* table_kind ::= CHILD */ { yymsp[0].minor.yy741 = SHOW_KIND_TABLES_CHILD; } -#line 7728 "sql.c" break; - case 336: /* db_name_cond_opt ::= */ - case 341: /* from_db_opt ::= */ yytestcase(yyruleno==341); -#line 593 "sql.y" + case 337: /* db_name_cond_opt ::= */ + case 342: /* from_db_opt ::= */ yytestcase(yyruleno==342); { yymsp[1].minor.yy974 = createDefaultDatabaseCondValue(pCxt); } -#line 7734 "sql.c" break; - case 337: /* db_name_cond_opt ::= db_name NK_DOT */ -#line 594 "sql.y" + case 338: /* db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy974 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy557); } -#line 7739 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 339: /* like_pattern_opt ::= LIKE NK_STRING */ -#line 597 "sql.y" + case 340: /* like_pattern_opt ::= LIKE NK_STRING */ { yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } -#line 7745 "sql.c" break; - case 340: /* table_name_cond ::= table_name */ -#line 599 "sql.y" + case 341: /* table_name_cond ::= table_name */ { yylhsminor.yy974 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557); } -#line 7750 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 342: /* from_db_opt ::= FROM db_name */ -#line 602 "sql.y" + case 343: /* from_db_opt ::= FROM db_name */ { yymsp[-1].minor.yy974 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557); } -#line 7756 "sql.c" break; - case 346: /* tag_item ::= TBNAME */ -#line 610 "sql.y" + case 347: /* tag_item ::= TBNAME */ { yylhsminor.yy974 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } -#line 7761 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 349: /* tag_item ::= column_name column_alias */ -#line 613 "sql.y" + case 350: /* tag_item ::= column_name column_alias */ { yylhsminor.yy974 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy557), &yymsp[0].minor.yy557); } -#line 7767 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 350: /* tag_item ::= column_name AS column_alias */ -#line 614 "sql.y" + case 351: /* tag_item ::= column_name AS column_alias */ { yylhsminor.yy974 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy557), &yymsp[0].minor.yy557); } -#line 7773 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 351: /* db_kind_opt ::= */ -#line 618 "sql.y" + case 352: /* db_kind_opt ::= */ { yymsp[1].minor.yy741 = SHOW_KIND_ALL; } -#line 7779 "sql.c" break; - case 352: /* db_kind_opt ::= USER */ -#line 619 "sql.y" + case 353: /* db_kind_opt ::= USER */ { yymsp[0].minor.yy741 = SHOW_KIND_DATABASES_USER; } -#line 7784 "sql.c" break; - case 353: /* db_kind_opt ::= SYSTEM */ -#line 620 "sql.y" + case 354: /* db_kind_opt ::= SYSTEM */ { yymsp[0].minor.yy741 = SHOW_KIND_DATABASES_SYSTEM; } -#line 7789 "sql.c" break; - case 354: /* cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ -#line 626 "sql.y" + case 355: /* cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ { pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-8].minor.yy569, &yymsp[-7].minor.yy557, yymsp[-4].minor.yy974, yymsp[-5].minor.yy974, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } -#line 7794 "sql.c" break; - case 355: /* cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ -#line 628 "sql.y" + case 356: /* cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ { pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-7].minor.yy569, &yymsp[-6].minor.yy557, NULL, yymsp[-4].minor.yy974, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } -#line 7799 "sql.c" break; - case 356: /* cmd ::= DROP TSMA exists_opt full_tsma_name */ -#line 629 "sql.y" + case 357: /* cmd ::= DROP TSMA exists_opt full_tsma_name */ { pCxt->pRootNode = createDropTSMAStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } -#line 7804 "sql.c" break; - case 357: /* cmd ::= SHOW db_name_cond_opt TSMAS */ -#line 630 "sql.y" + case 358: /* cmd ::= SHOW db_name_cond_opt TSMAS */ { pCxt->pRootNode = createShowTSMASStmt(pCxt, yymsp[-1].minor.yy974); } -#line 7809 "sql.c" break; - case 360: /* tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ -#line 637 "sql.y" + case 361: /* tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ { yymsp[-3].minor.yy974 = createTSMAOptions(pCxt, yymsp[-1].minor.yy946); } -#line 7814 "sql.c" break; - case 361: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ -#line 641 "sql.y" + case 362: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy569, yymsp[-3].minor.yy974, yymsp[-1].minor.yy974, NULL, yymsp[0].minor.yy974); } -#line 7819 "sql.c" break; - case 362: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ -#line 643 "sql.y" + case 363: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy569, yymsp[-5].minor.yy974, yymsp[-3].minor.yy974, yymsp[-1].minor.yy946, NULL); } -#line 7824 "sql.c" break; - case 363: /* cmd ::= DROP INDEX exists_opt full_index_name */ -#line 644 "sql.y" + case 364: /* cmd ::= DROP INDEX exists_opt full_index_name */ { pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } -#line 7829 "sql.c" break; - case 364: /* full_index_name ::= index_name */ -#line 646 "sql.y" + case 365: /* full_index_name ::= index_name */ { yylhsminor.yy974 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy557); } -#line 7834 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 365: /* full_index_name ::= db_name NK_DOT index_name */ -#line 647 "sql.y" + case 366: /* full_index_name ::= db_name NK_DOT index_name */ { yylhsminor.yy974 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557); } -#line 7840 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 366: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -#line 650 "sql.y" + case 367: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ { yymsp[-9].minor.yy974 = createIndexOption(pCxt, yymsp[-7].minor.yy946, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), NULL, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } -#line 7846 "sql.c" break; - case 367: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -#line 653 "sql.y" + case 368: /* 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.yy974 = createIndexOption(pCxt, yymsp[-9].minor.yy946, releaseRawExprNode(pCxt, yymsp[-5].minor.yy974), releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } -#line 7851 "sql.c" break; - case 370: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -#line 660 "sql.y" + case 371: /* func ::= sma_func_name NK_LP expression_list NK_RP */ { yylhsminor.yy974 = createFunctionNode(pCxt, &yymsp[-3].minor.yy557, yymsp[-1].minor.yy946); } -#line 7856 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 371: /* sma_func_name ::= function_name */ - case 666: /* alias_opt ::= table_alias */ yytestcase(yyruleno==666); -#line 664 "sql.y" + case 372: /* sma_func_name ::= function_name */ + case 667: /* alias_opt ::= table_alias */ yytestcase(yyruleno==667); { yylhsminor.yy557 = yymsp[0].minor.yy557; } -#line 7863 "sql.c" yymsp[0].minor.yy557 = yylhsminor.yy557; break; - case 376: /* sma_stream_opt ::= */ - case 426: /* stream_options ::= */ yytestcase(yyruleno==426); -#line 670 "sql.y" + case 377: /* sma_stream_opt ::= */ + case 427: /* stream_options ::= */ yytestcase(yyruleno==427); { yymsp[1].minor.yy974 = createStreamOptions(pCxt); } -#line 7870 "sql.c" break; - case 377: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -#line 671 "sql.y" + case 378: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy974)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = yymsp[-2].minor.yy974; } -#line 7875 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 378: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -#line 672 "sql.y" + case 379: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy974)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = yymsp[-2].minor.yy974; } -#line 7881 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 379: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -#line 673 "sql.y" + case 380: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy974)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = yymsp[-2].minor.yy974; } -#line 7887 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 380: /* with_meta ::= AS */ -#line 678 "sql.y" + case 381: /* with_meta ::= AS */ { yymsp[0].minor.yy904 = 0; } -#line 7893 "sql.c" break; - case 381: /* with_meta ::= WITH META AS */ -#line 679 "sql.y" + case 382: /* with_meta ::= WITH META AS */ { yymsp[-2].minor.yy904 = 1; } -#line 7898 "sql.c" break; - case 382: /* with_meta ::= ONLY META AS */ -#line 680 "sql.y" + case 383: /* with_meta ::= ONLY META AS */ { yymsp[-2].minor.yy904 = 2; } -#line 7903 "sql.c" break; - case 383: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -#line 682 "sql.y" + case 384: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ { pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy569, &yymsp[-2].minor.yy557, yymsp[0].minor.yy974); } -#line 7908 "sql.c" break; - case 384: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ -#line 684 "sql.y" + case 385: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy569, &yymsp[-3].minor.yy557, &yymsp[0].minor.yy557, yymsp[-2].minor.yy904); } -#line 7913 "sql.c" break; - case 385: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ -#line 686 "sql.y" + case 386: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy569, &yymsp[-4].minor.yy557, yymsp[-1].minor.yy974, yymsp[-3].minor.yy904, yymsp[0].minor.yy974); } -#line 7918 "sql.c" break; - case 386: /* cmd ::= DROP TOPIC exists_opt topic_name */ -#line 688 "sql.y" + case 387: /* cmd ::= DROP TOPIC exists_opt topic_name */ { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } -#line 7923 "sql.c" break; - case 387: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -#line 689 "sql.y" + case 388: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ { pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy569, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557); } -#line 7928 "sql.c" break; - case 388: /* cmd ::= DESC full_table_name */ - case 389: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==389); -#line 692 "sql.y" + case 389: /* cmd ::= DESC full_table_name */ + case 390: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==390); { pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy974); } -#line 7934 "sql.c" break; - case 390: /* cmd ::= RESET QUERY CACHE */ -#line 696 "sql.y" + case 391: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } -#line 7939 "sql.c" break; - case 391: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 392: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==392); -#line 699 "sql.y" + case 392: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 393: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==393); { pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy569, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } -#line 7945 "sql.c" break; - case 395: /* explain_options ::= */ -#line 707 "sql.y" + case 396: /* explain_options ::= */ { yymsp[1].minor.yy974 = createDefaultExplainOptions(pCxt); } -#line 7950 "sql.c" break; - case 396: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -#line 708 "sql.y" + case 397: /* explain_options ::= explain_options VERBOSE NK_BOOL */ { yylhsminor.yy974 = setExplainVerbose(pCxt, yymsp[-2].minor.yy974, &yymsp[0].minor.yy0); } -#line 7955 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 397: /* explain_options ::= explain_options RATIO NK_FLOAT */ -#line 709 "sql.y" + case 398: /* explain_options ::= explain_options RATIO NK_FLOAT */ { yylhsminor.yy974 = setExplainRatio(pCxt, yymsp[-2].minor.yy974, &yymsp[0].minor.yy0); } -#line 7961 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 398: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ -#line 714 "sql.y" + case 399: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ { pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy569, yymsp[-9].minor.yy569, &yymsp[-6].minor.yy557, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy424, yymsp[-1].minor.yy904, &yymsp[0].minor.yy557, yymsp[-10].minor.yy569); } -#line 7967 "sql.c" break; - case 399: /* cmd ::= DROP FUNCTION exists_opt function_name */ -#line 715 "sql.y" + case 400: /* cmd ::= DROP FUNCTION exists_opt function_name */ { pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } -#line 7972 "sql.c" break; - case 404: /* language_opt ::= */ - case 449: /* on_vgroup_id ::= */ yytestcase(yyruleno==449); -#line 729 "sql.y" + case 405: /* language_opt ::= */ + case 450: /* on_vgroup_id ::= */ yytestcase(yyruleno==450); { yymsp[1].minor.yy557 = nil_token; } -#line 7978 "sql.c" break; - case 405: /* language_opt ::= LANGUAGE NK_STRING */ - case 450: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==450); -#line 730 "sql.y" + case 406: /* language_opt ::= LANGUAGE NK_STRING */ + case 451: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==451); { yymsp[-1].minor.yy557 = yymsp[0].minor.yy0; } -#line 7984 "sql.c" break; - case 408: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ -#line 739 "sql.y" + case 409: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ { pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy569, yymsp[-2].minor.yy974, &yymsp[-1].minor.yy0, yymsp[0].minor.yy974); } -#line 7989 "sql.c" break; - case 409: /* cmd ::= DROP VIEW exists_opt full_view_name */ -#line 740 "sql.y" + case 410: /* cmd ::= DROP VIEW exists_opt full_view_name */ { pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } -#line 7994 "sql.c" break; - case 410: /* full_view_name ::= view_name */ -#line 742 "sql.y" + case 411: /* full_view_name ::= view_name */ { yylhsminor.yy974 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy557); } -#line 7999 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 411: /* full_view_name ::= db_name NK_DOT view_name */ -#line 743 "sql.y" + case 412: /* full_view_name ::= db_name NK_DOT view_name */ { yylhsminor.yy974 = createViewNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557); } -#line 8005 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 412: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ -#line 748 "sql.y" + case 413: /* 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.yy569, &yymsp[-8].minor.yy557, yymsp[-5].minor.yy974, yymsp[-7].minor.yy974, yymsp[-3].minor.yy946, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, yymsp[-4].minor.yy946); } -#line 8011 "sql.c" break; - case 413: /* cmd ::= DROP STREAM exists_opt stream_name */ -#line 749 "sql.y" + case 414: /* cmd ::= DROP STREAM exists_opt stream_name */ { pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } -#line 8016 "sql.c" break; - case 414: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -#line 750 "sql.y" + case 415: /* cmd ::= PAUSE STREAM exists_opt stream_name */ { pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } -#line 8021 "sql.c" break; - case 415: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -#line 751 "sql.y" + case 416: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ { pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy569, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } -#line 8026 "sql.c" break; - case 420: /* column_stream_def ::= column_name stream_col_options */ -#line 764 "sql.y" + case 421: /* column_stream_def ::= column_name stream_col_options */ { yylhsminor.yy974 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy557, createDataType(TSDB_DATA_TYPE_NULL), yymsp[0].minor.yy974); } -#line 8031 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 421: /* stream_col_options ::= */ - case 781: /* column_options ::= */ yytestcase(yyruleno==781); -#line 765 "sql.y" + case 422: /* stream_col_options ::= */ + case 782: /* column_options ::= */ yytestcase(yyruleno==782); { yymsp[1].minor.yy974 = createDefaultColumnOptions(pCxt); } -#line 8038 "sql.c" break; - case 422: /* stream_col_options ::= stream_col_options PRIMARY KEY */ - case 782: /* column_options ::= column_options PRIMARY KEY */ yytestcase(yyruleno==782); -#line 766 "sql.y" + case 423: /* stream_col_options ::= stream_col_options PRIMARY KEY */ + case 783: /* column_options ::= column_options PRIMARY KEY */ yytestcase(yyruleno==783); { yylhsminor.yy974 = setColumnOptionsPK(pCxt, yymsp[-2].minor.yy974); } -#line 8044 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 427: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 428: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==428); -#line 776 "sql.y" + case 428: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 429: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==429); { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } -#line 8051 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 429: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -#line 778 "sql.y" + case 430: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-3].minor.yy974, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } -#line 8057 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 430: /* stream_options ::= stream_options WATERMARK duration_literal */ -#line 779 "sql.y" + case 431: /* stream_options ::= stream_options WATERMARK duration_literal */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } -#line 8063 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 431: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -#line 780 "sql.y" + case 432: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-3].minor.yy974, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } -#line 8069 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 432: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -#line 781 "sql.y" + case 433: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } -#line 8075 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 433: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -#line 782 "sql.y" + case 434: /* stream_options ::= stream_options DELETE_MARK duration_literal */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } -#line 8081 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 434: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -#line 783 "sql.y" + case 435: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-3].minor.yy974, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } -#line 8087 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 436: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 725: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==725); - case 749: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==749); -#line 786 "sql.y" + case 437: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 726: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==726); + case 750: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==750); { yymsp[-3].minor.yy974 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy974); } -#line 8095 "sql.c" break; - case 439: /* cmd ::= KILL CONNECTION NK_INTEGER */ -#line 794 "sql.y" + case 440: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } -#line 8100 "sql.c" break; - case 440: /* cmd ::= KILL QUERY NK_STRING */ -#line 795 "sql.y" + case 441: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } -#line 8105 "sql.c" break; - case 441: /* cmd ::= KILL TRANSACTION NK_INTEGER */ -#line 796 "sql.y" + case 442: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } -#line 8110 "sql.c" break; - case 442: /* cmd ::= KILL COMPACT NK_INTEGER */ -#line 797 "sql.y" + case 443: /* cmd ::= KILL COMPACT NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } -#line 8115 "sql.c" break; - case 443: /* cmd ::= BALANCE VGROUP */ -#line 800 "sql.y" + case 444: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } -#line 8120 "sql.c" break; - case 444: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ -#line 801 "sql.y" + case 445: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ { pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy557); } -#line 8125 "sql.c" break; - case 445: /* cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ -#line 802 "sql.y" + case 446: /* cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ { pCxt->pRootNode = createBalanceVgroupLeaderDBNameStmt(pCxt, &yymsp[0].minor.yy557); } -#line 8130 "sql.c" break; - case 446: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ -#line 803 "sql.y" + case 447: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 8135 "sql.c" break; - case 447: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -#line 804 "sql.y" + case 448: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy946); } -#line 8140 "sql.c" break; - case 448: /* cmd ::= SPLIT VGROUP NK_INTEGER */ -#line 805 "sql.y" + case 449: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } -#line 8145 "sql.c" break; - case 451: /* dnode_list ::= DNODE NK_INTEGER */ -#line 814 "sql.y" + case 452: /* dnode_list ::= DNODE NK_INTEGER */ { yymsp[-1].minor.yy946 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 8150 "sql.c" break; - case 453: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -#line 821 "sql.y" + case 454: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ { pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } -#line 8155 "sql.c" break; - case 456: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -#line 830 "sql.y" + case 457: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ { yymsp[-6].minor.yy974 = createInsertStmt(pCxt, yymsp[-4].minor.yy974, yymsp[-2].minor.yy946, yymsp[0].minor.yy974); } -#line 8160 "sql.c" break; - case 457: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -#line 831 "sql.y" + case 458: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ { yymsp[-3].minor.yy974 = createInsertStmt(pCxt, yymsp[-1].minor.yy974, NULL, yymsp[0].minor.yy974); } -#line 8165 "sql.c" break; - case 458: /* tags_literal ::= NK_INTEGER */ - case 470: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==470); - case 479: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==479); -#line 834 "sql.y" + case 459: /* tags_literal ::= NK_INTEGER */ + case 471: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==471); + case 480: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==480); { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } -#line 8172 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 459: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - case 460: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==460); - case 471: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==471); - case 472: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==472); - case 480: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==480); - case 481: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==481); - case 489: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==489); - case 490: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==490); -#line 835 "sql.y" + case 460: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + case 461: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==461); + case 472: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==472); + case 473: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==473); + case 481: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==481); + case 482: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==482); + case 490: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==490); + case 491: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==491); { SToken l = yymsp[-2].minor.yy0; SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); l.n = (r.z + r.n) - l.z; yylhsminor.yy974 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy974); } -#line 8190 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 461: /* tags_literal ::= NK_PLUS NK_INTEGER */ - case 464: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==464); - case 473: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==473); - case 476: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==476); - case 482: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==482); - case 485: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==485); -#line 847 "sql.y" + case 462: /* tags_literal ::= NK_PLUS NK_INTEGER */ + case 465: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==465); + case 474: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==474); + case 477: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==477); + case 483: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==483); + case 486: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==486); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } -#line 8205 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 462: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - case 463: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==463); - case 465: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==465); - case 466: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==466); - case 474: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==474); - case 475: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==475); - case 477: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==477); - case 478: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==478); - case 483: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==483); - case 484: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==484); - case 486: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==486); - case 487: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==487); -#line 852 "sql.y" + case 463: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + case 464: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==464); + case 466: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==466); + case 467: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==467); + case 475: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==475); + case 476: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==476); + case 478: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==478); + case 479: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==479); + case 484: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==484); + case 485: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==485); + case 487: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==487); + case 488: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==488); { SToken l = yymsp[-3].minor.yy0; SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); l.n = (r.z + r.n) - l.z; yylhsminor.yy974 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy974); } -#line 8227 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 467: /* tags_literal ::= NK_FLOAT */ -#line 881 "sql.y" + case 468: /* tags_literal ::= NK_FLOAT */ { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } -#line 8233 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 468: /* tags_literal ::= NK_PLUS NK_FLOAT */ - case 469: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==469); -#line 882 "sql.y" + case 469: /* tags_literal ::= NK_PLUS NK_FLOAT */ + case 470: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==470); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t, NULL); } -#line 8244 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 488: /* tags_literal ::= NK_STRING */ -#line 988 "sql.y" + case 489: /* tags_literal ::= NK_STRING */ { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } -#line 8250 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 491: /* tags_literal ::= NK_BOOL */ -#line 1001 "sql.y" + case 492: /* tags_literal ::= NK_BOOL */ { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } -#line 8256 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 492: /* tags_literal ::= NULL */ -#line 1002 "sql.y" + case 493: /* tags_literal ::= NULL */ { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } -#line 8262 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 493: /* tags_literal ::= literal_func */ -#line 1004 "sql.y" + case 494: /* tags_literal ::= literal_func */ { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy974); } -#line 8268 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 494: /* tags_literal ::= literal_func NK_PLUS duration_literal */ - case 495: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==495); -#line 1005 "sql.y" + case 495: /* tags_literal ::= literal_func NK_PLUS duration_literal */ + case 496: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==496); { SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); l.n = (r.z + r.n) - l.z; yylhsminor.yy974 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, yymsp[-2].minor.yy974, yymsp[0].minor.yy974); } -#line 8280 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 498: /* literal ::= NK_INTEGER */ -#line 1024 "sql.y" + case 499: /* literal ::= NK_INTEGER */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } -#line 8286 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 499: /* literal ::= NK_FLOAT */ -#line 1025 "sql.y" + case 500: /* literal ::= NK_FLOAT */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } -#line 8292 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 500: /* literal ::= NK_STRING */ -#line 1026 "sql.y" + case 501: /* literal ::= NK_STRING */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 8298 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 501: /* literal ::= NK_BOOL */ -#line 1027 "sql.y" + case 502: /* literal ::= NK_BOOL */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } -#line 8304 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 502: /* literal ::= TIMESTAMP NK_STRING */ -#line 1028 "sql.y" + case 503: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } -#line 8310 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 503: /* literal ::= duration_literal */ - case 513: /* signed_literal ::= signed */ yytestcase(yyruleno==513); - case 537: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==537); - case 538: /* expression ::= literal */ yytestcase(yyruleno==538); - case 540: /* expression ::= column_reference */ yytestcase(yyruleno==540); - case 541: /* expression ::= function_expression */ yytestcase(yyruleno==541); - case 542: /* expression ::= case_when_expression */ yytestcase(yyruleno==542); - case 588: /* function_expression ::= literal_func */ yytestcase(yyruleno==588); - case 589: /* function_expression ::= rand_func */ yytestcase(yyruleno==589); - case 647: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==647); - case 651: /* boolean_primary ::= predicate */ yytestcase(yyruleno==651); - case 653: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==653); - case 654: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==654); - case 657: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==657); - case 659: /* table_reference ::= table_primary */ yytestcase(yyruleno==659); - case 660: /* table_reference ::= joined_table */ yytestcase(yyruleno==660); - case 664: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==664); - case 751: /* query_simple ::= query_specification */ yytestcase(yyruleno==751); - case 752: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==752); - case 755: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==755); - case 757: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==757); -#line 1029 "sql.y" + case 504: /* literal ::= duration_literal */ + case 514: /* signed_literal ::= signed */ yytestcase(yyruleno==514); + case 538: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==538); + case 539: /* expression ::= literal */ yytestcase(yyruleno==539); + case 541: /* expression ::= column_reference */ yytestcase(yyruleno==541); + case 542: /* expression ::= function_expression */ yytestcase(yyruleno==542); + case 543: /* expression ::= case_when_expression */ yytestcase(yyruleno==543); + case 589: /* function_expression ::= literal_func */ yytestcase(yyruleno==589); + case 590: /* function_expression ::= rand_func */ yytestcase(yyruleno==590); + case 648: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==648); + case 652: /* boolean_primary ::= predicate */ yytestcase(yyruleno==652); + case 654: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==654); + case 655: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==655); + case 658: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==658); + case 660: /* table_reference ::= table_primary */ yytestcase(yyruleno==660); + case 661: /* table_reference ::= joined_table */ yytestcase(yyruleno==661); + case 665: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==665); + case 752: /* query_simple ::= query_specification */ yytestcase(yyruleno==752); + case 753: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==753); + case 756: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==756); + case 758: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==758); { yylhsminor.yy974 = yymsp[0].minor.yy974; } -#line 8336 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 504: /* literal ::= NULL */ -#line 1030 "sql.y" + case 505: /* literal ::= NULL */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } -#line 8342 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 505: /* literal ::= NK_QUESTION */ -#line 1031 "sql.y" + case 506: /* literal ::= NK_QUESTION */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 8348 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 506: /* duration_literal ::= NK_VARIABLE */ - case 726: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==726); - case 727: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==727); - case 728: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==728); -#line 1033 "sql.y" + case 507: /* duration_literal ::= NK_VARIABLE */ + case 727: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==727); + case 728: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==728); + case 729: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==729); { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 8357 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 507: /* signed ::= NK_INTEGER */ -#line 1035 "sql.y" + case 508: /* signed ::= NK_INTEGER */ { yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } -#line 8363 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 508: /* signed ::= NK_PLUS NK_INTEGER */ -#line 1036 "sql.y" + case 509: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } -#line 8369 "sql.c" break; - case 509: /* signed ::= NK_MINUS NK_INTEGER */ -#line 1037 "sql.y" + case 510: /* 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.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } -#line 8378 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 510: /* signed ::= NK_FLOAT */ -#line 1042 "sql.y" + case 511: /* signed ::= NK_FLOAT */ { yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } -#line 8384 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 511: /* signed ::= NK_PLUS NK_FLOAT */ -#line 1043 "sql.y" + case 512: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } -#line 8390 "sql.c" break; - case 512: /* signed ::= NK_MINUS NK_FLOAT */ -#line 1044 "sql.y" + case 513: /* 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.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } -#line 8399 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 514: /* signed_literal ::= NK_STRING */ -#line 1051 "sql.y" + case 515: /* signed_literal ::= NK_STRING */ { yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } -#line 8405 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 515: /* signed_literal ::= NK_BOOL */ -#line 1052 "sql.y" + case 516: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } -#line 8411 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 516: /* signed_literal ::= TIMESTAMP NK_STRING */ -#line 1053 "sql.y" + case 517: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 8417 "sql.c" break; - case 517: /* signed_literal ::= duration_literal */ - case 519: /* signed_literal ::= literal_func */ yytestcase(yyruleno==519); - case 618: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==618); - case 701: /* select_item ::= common_expression */ yytestcase(yyruleno==701); - case 711: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==711); - case 756: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==756); - case 758: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==758); - case 771: /* search_condition ::= common_expression */ yytestcase(yyruleno==771); -#line 1054 "sql.y" + case 518: /* signed_literal ::= duration_literal */ + case 520: /* signed_literal ::= literal_func */ yytestcase(yyruleno==520); + case 619: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==619); + case 702: /* select_item ::= common_expression */ yytestcase(yyruleno==702); + case 712: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==712); + case 757: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==757); + case 759: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==759); + case 772: /* search_condition ::= common_expression */ yytestcase(yyruleno==772); { yylhsminor.yy974 = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); } -#line 8429 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 518: /* signed_literal ::= NULL */ -#line 1055 "sql.y" + case 519: /* signed_literal ::= NULL */ { yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } -#line 8435 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 520: /* signed_literal ::= NK_QUESTION */ -#line 1057 "sql.y" + case 521: /* signed_literal ::= NK_QUESTION */ { yylhsminor.yy974 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } -#line 8441 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 539: /* expression ::= pseudo_column */ -#line 1123 "sql.y" + case 540: /* expression ::= pseudo_column */ { yylhsminor.yy974 = yymsp[0].minor.yy974; (void)setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy974, true); } -#line 8447 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 543: /* expression ::= NK_LP expression NK_RP */ - case 652: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==652); - case 770: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==770); -#line 1127 "sql.y" + case 544: /* expression ::= NK_LP expression NK_RP */ + case 653: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==653); + case 771: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==771); { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } -#line 8455 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 544: /* expression ::= NK_PLUS expr_or_subquery */ -#line 1128 "sql.y" + case 545: /* expression ::= NK_PLUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } -#line 8464 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 545: /* expression ::= NK_MINUS expr_or_subquery */ -#line 1132 "sql.y" + case 546: /* expression ::= NK_MINUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy974), NULL)); } -#line 8473 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 546: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ -#line 1136 "sql.y" + case 547: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8483 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 547: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ -#line 1141 "sql.y" + case 548: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8493 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 548: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ -#line 1146 "sql.y" + case 549: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8503 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 549: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ -#line 1151 "sql.y" + case 550: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8513 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 550: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ -#line 1156 "sql.y" + case 551: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8523 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 551: /* expression ::= column_reference NK_ARROW NK_STRING */ -#line 1161 "sql.y" + case 552: /* expression ::= column_reference NK_ARROW NK_STRING */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } -#line 8532 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 552: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ -#line 1165 "sql.y" + case 553: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8542 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 553: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ -#line 1170 "sql.y" + case 554: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8552 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 556: /* column_reference ::= column_name */ -#line 1181 "sql.y" + case 557: /* column_reference ::= column_name */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy557, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy557)); } -#line 8558 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 557: /* column_reference ::= table_name NK_DOT column_name */ -#line 1182 "sql.y" + case 558: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557, createColumnNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557)); } -#line 8564 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 558: /* column_reference ::= NK_ALIAS */ -#line 1183 "sql.y" + case 559: /* column_reference ::= NK_ALIAS */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } -#line 8570 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 559: /* column_reference ::= table_name NK_DOT NK_ALIAS */ -#line 1184 "sql.y" + case 560: /* column_reference ::= table_name NK_DOT NK_ALIAS */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0)); } -#line 8576 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 560: /* pseudo_column ::= ROWTS */ - case 561: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==561); - case 563: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==563); - case 564: /* pseudo_column ::= QEND */ yytestcase(yyruleno==564); - case 565: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==565); - case 566: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==566); - case 567: /* pseudo_column ::= WEND */ yytestcase(yyruleno==567); - case 568: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==568); - case 569: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==569); - case 570: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==570); - case 571: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==571); - case 572: /* pseudo_column ::= FLOW */ yytestcase(yyruleno==572); - case 573: /* pseudo_column ::= FHIGH */ yytestcase(yyruleno==573); - case 574: /* pseudo_column ::= FROWTS */ yytestcase(yyruleno==574); - case 591: /* literal_func ::= NOW */ yytestcase(yyruleno==591); - case 592: /* literal_func ::= TODAY */ yytestcase(yyruleno==592); -#line 1186 "sql.y" + case 561: /* pseudo_column ::= ROWTS */ + case 562: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==562); + case 564: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==564); + case 565: /* pseudo_column ::= QEND */ yytestcase(yyruleno==565); + case 566: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==566); + case 567: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==567); + case 568: /* pseudo_column ::= WEND */ yytestcase(yyruleno==568); + case 569: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==569); + case 570: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==570); + case 571: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==571); + case 572: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==572); + case 573: /* pseudo_column ::= FLOW */ yytestcase(yyruleno==573); + case 574: /* pseudo_column ::= FHIGH */ yytestcase(yyruleno==574); + case 575: /* pseudo_column ::= FROWTS */ yytestcase(yyruleno==575); + case 592: /* literal_func ::= NOW */ yytestcase(yyruleno==592); + case 593: /* literal_func ::= TODAY */ yytestcase(yyruleno==593); { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } -#line 8597 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 562: /* pseudo_column ::= table_name NK_DOT TBNAME */ -#line 1188 "sql.y" + case 563: /* pseudo_column ::= table_name NK_DOT TBNAME */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy557)))); } -#line 8603 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 575: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 576: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==576); - case 584: /* function_expression ::= substr_func NK_LP expression_list NK_RP */ yytestcase(yyruleno==584); -#line 1202 "sql.y" + case 576: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 577: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==577); + case 585: /* function_expression ::= substr_func NK_LP expression_list NK_RP */ yytestcase(yyruleno==585); { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy557, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy557, yymsp[-1].minor.yy946)); } -#line 8611 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 577: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - case 578: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==578); -#line 1205 "sql.y" + case 578: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 579: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==579); { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-1].minor.yy424)); } -#line 8618 "sql.c" yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 579: /* function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ -#line 1209 "sql.y" + case 580: /* function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createPositionFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974))); } -#line 8624 "sql.c" yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 580: /* function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ -#line 1211 "sql.y" + case 581: /* function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), TRIM_TYPE_BOTH)); } -#line 8630 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 581: /* function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ -#line 1213 "sql.y" + case 582: /* function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), yymsp[-3].minor.yy300)); } -#line 8636 "sql.c" yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 582: /* function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ -#line 1215 "sql.y" + case 583: /* function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), TRIM_TYPE_BOTH)); } -#line 8642 "sql.c" yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 583: /* function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ -#line 1217 "sql.y" + case 584: /* function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-6].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), yymsp[-4].minor.yy300)); } -#line 8648 "sql.c" yymsp[-6].minor.yy974 = yylhsminor.yy974; break; - case 585: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ -#line 1221 "sql.y" + case 586: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy557, &yymsp[0].minor.yy0, createSubstrFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974))); } -#line 8654 "sql.c" yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 586: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ -#line 1223 "sql.y" + case 587: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-7].minor.yy557, &yymsp[0].minor.yy0, createSubstrFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy974), releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974))); } -#line 8660 "sql.c" yymsp[-7].minor.yy974 = yylhsminor.yy974; break; - case 587: /* function_expression ::= REPLACE NK_LP expression_list NK_RP */ - case 594: /* rand_func ::= RAND NK_LP expression_list NK_RP */ yytestcase(yyruleno==594); -#line 1224 "sql.y" + case 588: /* function_expression ::= REPLACE NK_LP expression_list NK_RP */ + case 595: /* rand_func ::= RAND NK_LP expression_list NK_RP */ yytestcase(yyruleno==595); { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy946)); } -#line 8667 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 590: /* literal_func ::= noarg_func NK_LP NK_RP */ -#line 1228 "sql.y" + case 591: /* literal_func ::= noarg_func NK_LP NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy557, NULL)); } -#line 8673 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 593: /* rand_func ::= RAND NK_LP NK_RP */ -#line 1232 "sql.y" + case 594: /* rand_func ::= RAND NK_LP NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy0, NULL)); } -#line 8679 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 597: /* trim_specification_type ::= BOTH */ -#line 1242 "sql.y" + case 598: /* trim_specification_type ::= BOTH */ { yymsp[0].minor.yy300 = TRIM_TYPE_BOTH; } -#line 8685 "sql.c" break; - case 598: /* trim_specification_type ::= TRAILING */ -#line 1243 "sql.y" + case 599: /* trim_specification_type ::= TRAILING */ { yymsp[0].minor.yy300 = TRIM_TYPE_TRAILING; } -#line 8690 "sql.c" break; - case 599: /* trim_specification_type ::= LEADING */ -#line 1244 "sql.y" + case 600: /* trim_specification_type ::= LEADING */ { yymsp[0].minor.yy300 = TRIM_TYPE_LEADING; } -#line 8695 "sql.c" break; - case 614: /* star_func_para_list ::= NK_STAR */ -#line 1268 "sql.y" + case 615: /* star_func_para_list ::= NK_STAR */ { yylhsminor.yy946 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } -#line 8700 "sql.c" yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 619: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 704: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==704); -#line 1277 "sql.y" + case 620: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 705: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==705); { yylhsminor.yy974 = createColumnNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0); } -#line 8707 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 620: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -#line 1280 "sql.y" + case 621: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy946, yymsp[-1].minor.yy974)); } -#line 8713 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 621: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -#line 1282 "sql.y" + case 622: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-2].minor.yy946, yymsp[-1].minor.yy974)); } -#line 8719 "sql.c" yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 624: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -#line 1289 "sql.y" + case 625: /* when_then_expr ::= WHEN common_expression THEN common_expression */ { yymsp[-3].minor.yy974 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } -#line 8725 "sql.c" break; - case 626: /* case_when_else_opt ::= ELSE common_expression */ -#line 1292 "sql.y" + case 627: /* case_when_else_opt ::= ELSE common_expression */ { yymsp[-1].minor.yy974 = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); } -#line 8730 "sql.c" break; - case 627: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 632: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==632); -#line 1295 "sql.y" + case 628: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 633: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==633); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy140, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8740 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 628: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ -#line 1302 "sql.y" + case 629: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy974), releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8750 "sql.c" yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 629: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ -#line 1308 "sql.y" + case 630: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy974), releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8760 "sql.c" yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 630: /* predicate ::= expr_or_subquery IS NULL */ -#line 1313 "sql.y" + case 631: /* predicate ::= expr_or_subquery IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), NULL)); } -#line 8769 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 631: /* predicate ::= expr_or_subquery IS NOT NULL */ -#line 1317 "sql.y" + case 632: /* predicate ::= expr_or_subquery IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), NULL)); } -#line 8778 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 633: /* compare_op ::= NK_LT */ -#line 1329 "sql.y" + case 634: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy140 = OP_TYPE_LOWER_THAN; } -#line 8784 "sql.c" break; - case 634: /* compare_op ::= NK_GT */ -#line 1330 "sql.y" + case 635: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy140 = OP_TYPE_GREATER_THAN; } -#line 8789 "sql.c" break; - case 635: /* compare_op ::= NK_LE */ -#line 1331 "sql.y" + case 636: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy140 = OP_TYPE_LOWER_EQUAL; } -#line 8794 "sql.c" break; - case 636: /* compare_op ::= NK_GE */ -#line 1332 "sql.y" + case 637: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy140 = OP_TYPE_GREATER_EQUAL; } -#line 8799 "sql.c" break; - case 637: /* compare_op ::= NK_NE */ -#line 1333 "sql.y" + case 638: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy140 = OP_TYPE_NOT_EQUAL; } -#line 8804 "sql.c" break; - case 638: /* compare_op ::= NK_EQ */ -#line 1334 "sql.y" + case 639: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy140 = OP_TYPE_EQUAL; } -#line 8809 "sql.c" break; - case 639: /* compare_op ::= LIKE */ -#line 1335 "sql.y" + case 640: /* compare_op ::= LIKE */ { yymsp[0].minor.yy140 = OP_TYPE_LIKE; } -#line 8814 "sql.c" break; - case 640: /* compare_op ::= NOT LIKE */ -#line 1336 "sql.y" + case 641: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy140 = OP_TYPE_NOT_LIKE; } -#line 8819 "sql.c" break; - case 641: /* compare_op ::= MATCH */ -#line 1337 "sql.y" + case 642: /* compare_op ::= MATCH */ { yymsp[0].minor.yy140 = OP_TYPE_MATCH; } -#line 8824 "sql.c" break; - case 642: /* compare_op ::= NMATCH */ -#line 1338 "sql.y" + case 643: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy140 = OP_TYPE_NMATCH; } -#line 8829 "sql.c" break; - case 643: /* compare_op ::= CONTAINS */ -#line 1339 "sql.y" + case 644: /* compare_op ::= CONTAINS */ { yymsp[0].minor.yy140 = OP_TYPE_JSON_CONTAINS; } -#line 8834 "sql.c" break; - case 644: /* in_op ::= IN */ -#line 1343 "sql.y" + case 645: /* in_op ::= IN */ { yymsp[0].minor.yy140 = OP_TYPE_IN; } -#line 8839 "sql.c" break; - case 645: /* in_op ::= NOT IN */ -#line 1344 "sql.y" + case 646: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy140 = OP_TYPE_NOT_IN; } -#line 8844 "sql.c" break; - case 646: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -#line 1346 "sql.y" + case 647: /* in_predicate_value ::= NK_LP literal_list NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy946)); } -#line 8849 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 648: /* boolean_value_expression ::= NOT boolean_primary */ -#line 1350 "sql.y" + case 649: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy974), NULL)); } -#line 8858 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 649: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ -#line 1355 "sql.y" + case 650: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8868 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 650: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ -#line 1361 "sql.y" + case 651: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 8878 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 658: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -#line 1379 "sql.y" + case 659: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy974 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, JOIN_STYPE_NONE, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, NULL); } -#line 8884 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 661: /* table_primary ::= table_name alias_opt */ -#line 1385 "sql.y" + case 662: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy974 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } -#line 8890 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 662: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -#line 1386 "sql.y" + case 663: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy974 = createRealTableNode(pCxt, &yymsp[-3].minor.yy557, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } -#line 8896 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 663: /* table_primary ::= subquery alias_opt */ -#line 1387 "sql.y" + case 664: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy974 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), &yymsp[0].minor.yy557); } -#line 8902 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 665: /* alias_opt ::= */ -#line 1392 "sql.y" + case 666: /* alias_opt ::= */ { yymsp[1].minor.yy557 = nil_token; } -#line 8908 "sql.c" break; - case 667: /* alias_opt ::= AS table_alias */ -#line 1394 "sql.y" + case 668: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy557 = yymsp[0].minor.yy557; } -#line 8913 "sql.c" break; - case 668: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 669: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==669); -#line 1396 "sql.y" + case 669: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 670: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==670); { yymsp[-2].minor.yy974 = yymsp[-1].minor.yy974; } -#line 8919 "sql.c" break; - case 670: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ -#line 1402 "sql.y" + case 671: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ { yylhsminor.yy974 = createJoinTableNode(pCxt, yymsp[-6].minor.yy792, yymsp[-5].minor.yy744, yymsp[-7].minor.yy974, yymsp[-3].minor.yy974, yymsp[-2].minor.yy974); yylhsminor.yy974 = addWindowOffsetClause(pCxt, yylhsminor.yy974, yymsp[-1].minor.yy974); yylhsminor.yy974 = addJLimitClause(pCxt, yylhsminor.yy974, yymsp[0].minor.yy974); } -#line 8928 "sql.c" yymsp[-7].minor.yy974 = yylhsminor.yy974; break; - case 671: /* join_type ::= */ -#line 1410 "sql.y" + case 672: /* join_type ::= */ { yymsp[1].minor.yy792 = JOIN_TYPE_INNER; } -#line 8934 "sql.c" break; - case 672: /* join_type ::= INNER */ -#line 1411 "sql.y" + case 673: /* join_type ::= INNER */ { yymsp[0].minor.yy792 = JOIN_TYPE_INNER; } -#line 8939 "sql.c" break; - case 673: /* join_type ::= LEFT */ -#line 1412 "sql.y" + case 674: /* join_type ::= LEFT */ { yymsp[0].minor.yy792 = JOIN_TYPE_LEFT; } -#line 8944 "sql.c" break; - case 674: /* join_type ::= RIGHT */ -#line 1413 "sql.y" + case 675: /* join_type ::= RIGHT */ { yymsp[0].minor.yy792 = JOIN_TYPE_RIGHT; } -#line 8949 "sql.c" break; - case 675: /* join_type ::= FULL */ -#line 1414 "sql.y" + case 676: /* join_type ::= FULL */ { yymsp[0].minor.yy792 = JOIN_TYPE_FULL; } -#line 8954 "sql.c" break; - case 676: /* join_subtype ::= */ -#line 1418 "sql.y" + case 677: /* join_subtype ::= */ { yymsp[1].minor.yy744 = JOIN_STYPE_NONE; } -#line 8959 "sql.c" break; - case 677: /* join_subtype ::= OUTER */ -#line 1419 "sql.y" + case 678: /* join_subtype ::= OUTER */ { yymsp[0].minor.yy744 = JOIN_STYPE_OUTER; } -#line 8964 "sql.c" break; - case 678: /* join_subtype ::= SEMI */ -#line 1420 "sql.y" + case 679: /* join_subtype ::= SEMI */ { yymsp[0].minor.yy744 = JOIN_STYPE_SEMI; } -#line 8969 "sql.c" break; - case 679: /* join_subtype ::= ANTI */ -#line 1421 "sql.y" + case 680: /* join_subtype ::= ANTI */ { yymsp[0].minor.yy744 = JOIN_STYPE_ANTI; } -#line 8974 "sql.c" break; - case 680: /* join_subtype ::= ASOF */ -#line 1422 "sql.y" + case 681: /* join_subtype ::= ASOF */ { yymsp[0].minor.yy744 = JOIN_STYPE_ASOF; } -#line 8979 "sql.c" break; - case 681: /* join_subtype ::= WINDOW */ -#line 1423 "sql.y" + case 682: /* join_subtype ::= WINDOW */ { yymsp[0].minor.yy744 = JOIN_STYPE_WIN; } -#line 8984 "sql.c" break; - case 685: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ -#line 1430 "sql.y" + case 686: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ { yymsp[-5].minor.yy974 = createWindowOffsetNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } -#line 8989 "sql.c" break; - case 686: /* window_offset_literal ::= NK_VARIABLE */ -#line 1432 "sql.y" + case 687: /* window_offset_literal ::= NK_VARIABLE */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createTimeOffsetValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 8994 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 687: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ -#line 1433 "sql.y" + case 688: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy974 = createRawExprNode(pCxt, &t, createTimeOffsetValueNode(pCxt, &t)); } -#line 9004 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 689: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - case 762: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==762); - case 766: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==766); -#line 1440 "sql.y" + case 690: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + case 763: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==763); + case 767: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==767); { yymsp[-1].minor.yy974 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 9012 "sql.c" break; - case 690: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ -#line 1446 "sql.y" + case 691: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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[-13].minor.yy974 = createSelectStmt(pCxt, yymsp[-11].minor.yy569, yymsp[-9].minor.yy946, yymsp[-8].minor.yy974, yymsp[-12].minor.yy946); yymsp[-13].minor.yy974 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy974, yymsp[-10].minor.yy569); @@ -9025,243 +7651,156 @@ yymsp[0].minor.yy974); } yymsp[-13].minor.yy974 = addEveryClause(pCxt, yymsp[-13].minor.yy974, yymsp[-4].minor.yy974); yymsp[-13].minor.yy974 = addFillClause(pCxt, yymsp[-13].minor.yy974, yymsp[-3].minor.yy974); } -#line 9028 "sql.c" break; - case 691: /* hint_list ::= */ -#line 1461 "sql.y" + case 692: /* hint_list ::= */ { yymsp[1].minor.yy946 = createHintNodeList(pCxt, NULL); } -#line 9033 "sql.c" break; - case 692: /* hint_list ::= NK_HINT */ -#line 1462 "sql.y" + case 693: /* hint_list ::= NK_HINT */ { yylhsminor.yy946 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } -#line 9038 "sql.c" yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 697: /* set_quantifier_opt ::= ALL */ -#line 1473 "sql.y" + case 698: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy569 = false; } -#line 9044 "sql.c" break; - case 700: /* select_item ::= NK_STAR */ -#line 1480 "sql.y" + case 701: /* select_item ::= NK_STAR */ { yylhsminor.yy974 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } -#line 9049 "sql.c" yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 702: /* select_item ::= common_expression column_alias */ - case 712: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==712); -#line 1482 "sql.y" + case 703: /* select_item ::= common_expression column_alias */ + case 713: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==713); { yylhsminor.yy974 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), &yymsp[0].minor.yy557); } -#line 9056 "sql.c" yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 703: /* select_item ::= common_expression AS column_alias */ - case 713: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==713); -#line 1483 "sql.y" + case 704: /* select_item ::= common_expression AS column_alias */ + case 714: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==714); { yylhsminor.yy974 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), &yymsp[0].minor.yy557); } -#line 9063 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 708: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 740: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==740); - case 760: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==760); -#line 1492 "sql.y" + case 709: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 741: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==741); + case 761: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==761); { yymsp[-2].minor.yy946 = yymsp[0].minor.yy946; } -#line 9071 "sql.c" break; - case 715: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ -#line 1505 "sql.y" + case 716: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ { yymsp[-5].minor.yy974 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } -#line 9076 "sql.c" break; - case 716: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -#line 1506 "sql.y" + case 717: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy974 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } -#line 9081 "sql.c" break; - case 717: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -#line 1508 "sql.y" + case 718: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy974 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), NULL, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } -#line 9086 "sql.c" break; - case 718: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -#line 1512 "sql.y" + case 719: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-7].minor.yy974 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy974), releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } -#line 9091 "sql.c" break; - case 719: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -#line 1514 "sql.y" + case 720: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ { yymsp[-6].minor.yy974 = createEventWindowNode(pCxt, yymsp[-3].minor.yy974, yymsp[0].minor.yy974); } -#line 9096 "sql.c" break; - case 720: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ -#line 1516 "sql.y" + case 721: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy974 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } -#line 9101 "sql.c" break; - case 721: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -#line 1518 "sql.y" + case 722: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy974 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } -#line 9106 "sql.c" break; - case 722: /* twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP */ -#line 1520 "sql.y" + case 723: /* twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy974 = createAnomalyWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), NULL); } -#line 9111 "sql.c" break; - case 723: /* twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP */ -#line 1522 "sql.y" + case 724: /* twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP */ { yymsp[-5].minor.yy974 = createAnomalyWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), &yymsp[-1].minor.yy0); } -#line 9116 "sql.c" break; - case 730: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -#line 1532 "sql.y" + case 731: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy974 = createFillNode(pCxt, yymsp[-1].minor.yy102, NULL); } -#line 9121 "sql.c" break; - case 731: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -#line 1533 "sql.y" + case 732: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy974 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy946)); } -#line 9126 "sql.c" break; - case 732: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -#line 1534 "sql.y" + case 733: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy974 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy946)); } -#line 9131 "sql.c" break; - case 733: /* fill_mode ::= NONE */ -#line 1538 "sql.y" + case 734: /* fill_mode ::= NONE */ { yymsp[0].minor.yy102 = FILL_MODE_NONE; } -#line 9136 "sql.c" break; - case 734: /* fill_mode ::= PREV */ -#line 1539 "sql.y" + case 735: /* fill_mode ::= PREV */ { yymsp[0].minor.yy102 = FILL_MODE_PREV; } -#line 9141 "sql.c" break; - case 735: /* fill_mode ::= NULL */ -#line 1540 "sql.y" + case 736: /* fill_mode ::= NULL */ { yymsp[0].minor.yy102 = FILL_MODE_NULL; } -#line 9146 "sql.c" break; - case 736: /* fill_mode ::= NULL_F */ -#line 1541 "sql.y" + case 737: /* fill_mode ::= NULL_F */ { yymsp[0].minor.yy102 = FILL_MODE_NULL_F; } -#line 9151 "sql.c" break; - case 737: /* fill_mode ::= LINEAR */ -#line 1542 "sql.y" + case 738: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy102 = FILL_MODE_LINEAR; } -#line 9156 "sql.c" break; - case 738: /* fill_mode ::= NEXT */ -#line 1543 "sql.y" + case 739: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy102 = FILL_MODE_NEXT; } -#line 9161 "sql.c" break; - case 741: /* group_by_list ::= expr_or_subquery */ -#line 1552 "sql.y" + case 742: /* group_by_list ::= expr_or_subquery */ { yylhsminor.yy946 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 9166 "sql.c" yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 742: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -#line 1553 "sql.y" + case 743: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } -#line 9172 "sql.c" yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 746: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -#line 1560 "sql.y" + case 747: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ { yymsp[-5].minor.yy974 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } -#line 9178 "sql.c" break; - case 747: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ -#line 1562 "sql.y" + case 748: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy974 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } -#line 9183 "sql.c" break; - case 750: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ -#line 1569 "sql.y" + case 751: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy974 = addOrderByClause(pCxt, yymsp[-3].minor.yy974, yymsp[-2].minor.yy946); yylhsminor.yy974 = addSlimitClause(pCxt, yylhsminor.yy974, yymsp[-1].minor.yy974); yylhsminor.yy974 = addLimitClause(pCxt, yylhsminor.yy974, yymsp[0].minor.yy974); } -#line 9192 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 753: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -#line 1579 "sql.y" + case 754: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ { yylhsminor.yy974 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy974, yymsp[0].minor.yy974); } -#line 9198 "sql.c" yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 754: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -#line 1581 "sql.y" + case 755: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ { yylhsminor.yy974 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy974, yymsp[0].minor.yy974); } -#line 9204 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 763: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 767: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==767); -#line 1596 "sql.y" + case 764: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 768: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==768); { yymsp[-3].minor.yy974 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } -#line 9211 "sql.c" break; - case 764: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 768: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==768); -#line 1597 "sql.y" + case 765: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 769: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==769); { yymsp[-3].minor.yy974 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } -#line 9217 "sql.c" break; - case 769: /* subquery ::= NK_LP query_expression NK_RP */ -#line 1605 "sql.y" + case 770: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy974); } -#line 9222 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 774: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -#line 1619 "sql.y" + case 775: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ { yylhsminor.yy974 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), yymsp[-1].minor.yy410, yymsp[0].minor.yy307); } -#line 9228 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 775: /* ordering_specification_opt ::= */ -#line 1623 "sql.y" + case 776: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy410 = ORDER_ASC; } -#line 9234 "sql.c" break; - case 776: /* ordering_specification_opt ::= ASC */ -#line 1624 "sql.y" + case 777: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy410 = ORDER_ASC; } -#line 9239 "sql.c" break; - case 777: /* ordering_specification_opt ::= DESC */ -#line 1625 "sql.y" + case 778: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy410 = ORDER_DESC; } -#line 9244 "sql.c" break; - case 778: /* null_ordering_opt ::= */ -#line 1629 "sql.y" + case 779: /* null_ordering_opt ::= */ { yymsp[1].minor.yy307 = NULL_ORDER_DEFAULT; } -#line 9249 "sql.c" break; - case 779: /* null_ordering_opt ::= NULLS FIRST */ -#line 1630 "sql.y" + case 780: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy307 = NULL_ORDER_FIRST; } -#line 9254 "sql.c" break; - case 780: /* null_ordering_opt ::= NULLS LAST */ -#line 1631 "sql.y" + case 781: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy307 = NULL_ORDER_LAST; } -#line 9259 "sql.c" break; - case 783: /* column_options ::= column_options NK_ID NK_STRING */ -#line 1639 "sql.y" + case 784: /* column_options ::= column_options NK_ID NK_STRING */ { yylhsminor.yy974 = setColumnOptions(pCxt, yymsp[-2].minor.yy974, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 9264 "sql.c" yymsp[-2].minor.yy974 = yylhsminor.yy974; break; default: @@ -9324,7 +7863,6 @@ static void yy_syntax_error( ParseCTX_FETCH #define TOKEN yyminor /************ Begin %syntax_error code ****************************************/ -#line 29 "sql.y" if (TSDB_CODE_SUCCESS == pCxt->errCode) { if(TOKEN.z) { @@ -9335,7 +7873,6 @@ static void yy_syntax_error( } else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z); } -#line 9338 "sql.c" /************ End %syntax_error code ******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c index 6f6362a8f7..9e75abcfe8 100644 --- a/source/libs/scalar/src/sclfunc.c +++ b/source/libs/scalar/src/sclfunc.c @@ -2085,7 +2085,8 @@ int32_t castFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutp (void)memcpy(varDataVal(output), convBuf, len); varDataSetLen(output, len); } else { - NUM_TO_STRING(inputType, input, bufSize, buf); + int32_t outputSize = (outputLen - VARSTR_HEADER_SIZE) < bufSize ? (outputLen - VARSTR_HEADER_SIZE + 1): bufSize; + NUM_TO_STRING(inputType, input, outputSize, buf); int32_t len = (int32_t)strlen(buf); len = (outputLen - VARSTR_HEADER_SIZE) > len ? len : (outputLen - VARSTR_HEADER_SIZE); (void)memcpy(varDataVal(output), buf, len); diff --git a/source/libs/scalar/src/sclvector.c b/source/libs/scalar/src/sclvector.c index 54794b9044..8db0562c63 100644 --- a/source/libs/scalar/src/sclvector.c +++ b/source/libs/scalar/src/sclvector.c @@ -1031,23 +1031,23 @@ int8_t gConvertTypes[TSDB_DATA_TYPE_MAX][TSDB_DATA_TYPE_MAX] = { /*GEOM*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0}; int8_t gDisplyTypes[TSDB_DATA_TYPE_MAX][TSDB_DATA_TYPE_MAX] = { - /*NULL BOOL TINY SMAL INT BIGI FLOA DOUB VARC TIME NCHA UTINY USMA UINT UBIG JSON VARB DECI BLOB MEDB GEOM*/ - /*NULL*/ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, -1, -1, 8, - /*BOOL*/ 0, 1, 2, 3, 4, 5, 6, 7, 8, 5, 10, 11, 12, 13, 14, 8, -1, -1, -1, -1, 8, - /*TINY*/ 0, 0, 2, 3, 4, 5, 8, 8, 8, 5, 10, 3, 4, 5, 8, 8, -1, -1, -1, -1, 8, - /*SMAL*/ 0, 0, 0, 3, 4, 5, 8, 8, 8, 5, 10, 3, 4, 5, 8, 8, -1, -1, -1, -1, 8, - /*INT */ 0, 0, 0, 0, 4, 5, 8, 8, 8, 5, 10, 4, 4, 5, 8, 8, -1, -1, -1, -1, 8, - /*BIGI*/ 0, 0, 0, 0, 0, 5, 8, 8, 8, 5, 10, 5, 5, 5, 8, 8, -1, -1, -1, -1, 8, - /*FLOA*/ 0, 0, 0, 0, 0, 0, 6, 7, 8, 8, 10, 8, 8, 8, 8, 8, -1, -1, -1, -1, 8, - /*DOUB*/ 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 10, 8, 8, 8, 8, 8, -1, -1, -1, -1, 8, - /*VARC*/ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 10, 8, 8, 8, 8, 8, -1, -1, -1, -1, 8, - /*TIME*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 5, 5, 5, 8, 8, -1, -1, -1, -1, 8, - /*NCHA*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, -1, -1, -1, -1, 10, - /*UTINY*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13, 14, 8, -1, -1, -1, -1, 8, - /*USMA*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, 14, 8, -1, -1, -1, -1, 8, - /*UINT*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 8, -1, -1, -1, -1, 8, - /*UBIG*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 8, -1, -1, -1, -1, 8, - /*JSON*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, -1, -1, -1, -1, 8, + /*NULL BOOL TINY SMAL INT BIGI FLOA DOUB VARC TIM NCHA UTIN USMA UINT UBIG JSON VARB DECI BLOB MEDB GEOM*/ + /*NULL*/ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, -1, -1, 20, + /*BOOL*/ 0, 1, 2, 3, 4, 5, 6, 7, 8, 5, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, + /*TINY*/ 0, 0, 2, 3, 4, 5, 8, 8, 8, 5, 10, 3, 4, 5, 8, -1, -1, -1, -1, -1, -1, + /*SMAL*/ 0, 0, 0, 3, 4, 5, 8, 8, 8, 5, 10, 3, 4, 5, 8, -1, -1, -1, -1, -1, -1, + /*INT */ 0, 0, 0, 0, 4, 5, 8, 8, 8, 5, 10, 4, 4, 5, 8, -1, -1, -1, -1, -1, -1, + /*BIGI*/ 0, 0, 0, 0, 0, 5, 8, 8, 8, 5, 10, 5, 5, 5, 8, -1, -1, -1, -1, -1, -1, + /*FLOA*/ 0, 0, 0, 0, 0, 0, 6, 7, 8, 8, 10, 8, 8, 8, 8, -1, -1, -1, -1, -1, -1, + /*DOUB*/ 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 10, 8, 8, 8, 8, -1, -1, -1, -1, -1, -1, + /*VARC*/ 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 10, 8, 8, 8, 8, -1, 16, -1, -1, -1, -1, + /*TIME*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 5, 5, 5, 8, -1, -1, -1, -1, -1, -1, + /*NCHA*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, -1, -1, -1, -1, -1, -1, + /*UTINY*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, + /*USMA*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, 14, -1, -1, -1, -1, -1, -1, + /*UINT*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, -1, -1, -1, -1, -1, -1, + /*UBIG*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, -1, -1, -1, -1, -1, -1, + /*JSON*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, -1, -1, -1, -1, -1, /*VARB*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, -1, -1, -1, -1, /*DECI*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, /*BLOB*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, diff --git a/source/libs/stream/src/streamHb.c b/source/libs/stream/src/streamHb.c index 19391bf7a0..65102edc24 100644 --- a/source/libs/stream/src/streamHb.c +++ b/source/libs/stream/src/streamHb.c @@ -316,12 +316,13 @@ int32_t createMetaHbInfo(int64_t* pRid, SMetaHbInfo** pRes) { return terrno; } - streamTmrStart(streamMetaHbToMnode, META_HB_CHECK_INTERVAL, pRid, streamTimer, &pInfo->hbTmr, 0, "stream-hb"); pInfo->tickCounter = 0; pInfo->msgSendTs = -1; pInfo->hbCount = 0; *pRes = pInfo; + + streamTmrStart(streamMetaHbToMnode, META_HB_CHECK_INTERVAL, pRid, streamTimer, &pInfo->hbTmr, 0, "stream-hb"); return TSDB_CODE_SUCCESS; } diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index 7e9b60b61a..bc7878f761 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -434,7 +434,6 @@ int32_t streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTaskFn, pMeta->closeFlag = false; stInfo("vgId:%d open stream meta succ, latest checkpoint:%" PRId64 ", stage:%" PRId64, vgId, pMeta->chkpId, stage); - pMeta->rid = taosAddRef(streamMetaId, pMeta); // set the attribute when running on Linux OS TdThreadRwlockAttr attr; @@ -452,22 +451,27 @@ int32_t streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTaskFn, code = taosThreadRwlockAttrDestroy(&attr); TSDB_CHECK_CODE(code, lino, _err); - int64_t* pRid = taosMemoryMalloc(sizeof(int64_t)); - TSDB_CHECK_NULL(pRid, code, lino, _err, terrno); - - memcpy(pRid, &pMeta->rid, sizeof(pMeta->rid)); - code = metaRefMgtAdd(pMeta->vgId, pRid); - TSDB_CHECK_CODE(code, lino, _err); - - code = createMetaHbInfo(pRid, &pMeta->pHbInfo); - TSDB_CHECK_CODE(code, lino, _err); - code = bkdMgtCreate(tpath, (SBkdMgt**)&pMeta->bkdChkptMgt); TSDB_CHECK_CODE(code, lino, _err); code = taosThreadMutexInit(&pMeta->backendMutex, NULL); TSDB_CHECK_CODE(code, lino, _err); + // add refId at the end of initialization function + pMeta->rid = taosAddRef(streamMetaId, pMeta); + + int64_t* pRid = taosMemoryMalloc(sizeof(int64_t)); + TSDB_CHECK_NULL(pRid, code, lino, _err, terrno); + + memcpy(pRid, &pMeta->rid, sizeof(pMeta->rid)); + + code = metaRefMgtAdd(pMeta->vgId, pRid); + TSDB_CHECK_CODE(code, lino, _err); + + code = createMetaHbInfo(pRid, &pMeta->pHbInfo); + + TSDB_CHECK_CODE(code, lino, _err); + *p = pMeta; return code; diff --git a/source/os/src/osEnv.c b/source/os/src/osEnv.c index a3791eb026..05c9936c2e 100644 --- a/source/os/src/osEnv.c +++ b/source/os/src/osEnv.c @@ -37,7 +37,6 @@ float tsNumOfCores = 0; int64_t tsTotalMemoryKB = 0; char *tsProcPath = NULL; -char tsSIMDEnable = 1; char tsAVX512Enable = 0; char tsSSE42Supported = 0; char tsAVXSupported = 0; diff --git a/source/util/CMakeLists.txt b/source/util/CMakeLists.txt index 063988ea00..7f5955f3dd 100644 --- a/source/util/CMakeLists.txt +++ b/source/util/CMakeLists.txt @@ -1,5 +1,9 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/version.c.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/version.c") aux_source_directory(src UTIL_SRC) +IF(COMPILER_SUPPORT_AVX2) + MESSAGE(STATUS "AVX2 instructions is ACTIVATED") + set_source_files_properties(src/tdecompressavx.c PROPERTIES COMPILE_FLAGS -mavx2) +ENDIF() add_library(util STATIC ${UTIL_SRC}) if(DEFINED GRANT_CFG_INCLUDE_DIR) diff --git a/source/util/src/tcompression.c b/source/util/src/tcompression.c index 9c9ded693e..6ffb5b635a 100644 --- a/source/util/src/tcompression.c +++ b/source/util/src/tcompression.c @@ -471,12 +471,12 @@ int32_t tsDecompressINTImp(const char *const input, const int32_t nelements, cha return nelements * word_length; } -#ifdef __AVX512F__ if (tsSIMDEnable && tsAVX512Enable && tsAVX512Supported) { - tsDecompressIntImpl_Hw(input, nelements, output, type); - return nelements * word_length; + int32_t cnt = tsDecompressIntImpl_Hw(input, nelements, output, type); + if (cnt >= 0) { + return cnt; + } } -#endif // Selector value: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 char bit_per_integer[] = {0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 15, 20, 30, 60}; @@ -867,12 +867,12 @@ int32_t tsDecompressTimestampImp(const char *const input, const int32_t nelement memcpy(output, input + 1, nelements * longBytes); return nelements * longBytes; } else if (input[0] == 1) { // Decompress -#ifdef __AVX512VL__ if (tsSIMDEnable && tsAVX512Enable && tsAVX512Supported) { - tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output, bool bigEndian); - return nelements * longBytes; + int32_t cnt = tsDecompressTimestampAvx512(input, nelements, output, false); + if (cnt >= 0) { + return cnt; + } } -#endif int64_t *ostream = (int64_t *)output; @@ -1103,13 +1103,14 @@ int32_t tsDecompressDoubleImp(const char *const input, int32_t ninput, const int return nelements * DOUBLE_BYTES; } -#ifdef __AVX2__ // use AVX2 implementation when allowed and the compression ratio is not high double compressRatio = 1.0 * nelements * DOUBLE_BYTES / ninput; if (tsSIMDEnable && tsAVX2Supported && compressRatio < 2) { - return tsDecompressDoubleImpAvx2(input + 1, nelements, output); + int32_t cnt = tsDecompressDoubleImpAvx2(input + 1, nelements, output); + if (cnt >= 0) { + return cnt; + } } -#endif // use implementation without SIMD instructions by default return tsDecompressDoubleImpHelper(input + 1, nelements, output); @@ -1257,13 +1258,14 @@ int32_t tsDecompressFloatImp(const char *const input, int32_t ninput, const int3 return nelements * FLOAT_BYTES; } -#ifdef __AVX2__ // use AVX2 implementation when allowed and the compression ratio is not high double compressRatio = 1.0 * nelements * FLOAT_BYTES / ninput; if (tsSIMDEnable && tsAVX2Supported && compressRatio < 2) { - return tsDecompressFloatImpAvx2(input + 1, nelements, output); + int32_t cnt = tsDecompressFloatImpAvx2(input + 1, nelements, output); + if (cnt >= 0) { + return cnt; + } } -#endif // use implementation without SIMD instructions by default return tsDecompressFloatImpHelper(input + 1, nelements, output); @@ -1617,7 +1619,10 @@ int32_t tsDecompressBigint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int uTrace("encode:%s, compress:%s, level:%d, type:%s, l1:%d", compressL1Dict[l1].name, compressL2Dict[l2].name, \ lvl, tDataTypes[type].name, l1); \ int32_t len = compressL1Dict[l1].comprFn(pIn, nEle, pBuf, type); \ - int8_t alvl = tsGetCompressL2Level(l2, lvl); \ + if (len < 0) { \ + return len; \ + } \ + int8_t alvl = tsGetCompressL2Level(l2, lvl); \ return compressL2Dict[l2].comprFn(pBuf, len, pOut, nOut, type, alvl); \ } else { \ uTrace("dencode:%s, decompress:%s, level:%d, type:%s", compressL1Dict[l1].name, compressL2Dict[l2].name, lvl, \ @@ -1628,8 +1633,7 @@ int32_t tsDecompressBigint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int } \ } else if (l1 == L1_DISABLED && l2 != L2_DISABLED) { \ if (compress) { \ - uTrace("encode:%s, compress:%s, level:%d, type:%s", "disabled", compressL2Dict[l1].name, lvl, \ - tDataTypes[type].name); \ + uTrace("encode:%s, compress:%s, level:%d, type:%s", "disabled", "disable", lvl, tDataTypes[type].name); \ int8_t alvl = tsGetCompressL2Level(l2, lvl); \ return compressL2Dict[l2].comprFn(pIn, nIn, pOut, nOut, type, alvl); \ } else { \ @@ -1883,3 +1887,26 @@ int8_t tUpdateCompress(uint32_t oldCmpr, uint32_t newCmpr, uint8_t l2Disabled, u return update; } + +int32_t getWordLength(char type) { + int32_t wordLength = 0; + switch (type) { + case TSDB_DATA_TYPE_BIGINT: + wordLength = LONG_BYTES; + break; + case TSDB_DATA_TYPE_INT: + wordLength = INT_BYTES; + break; + case TSDB_DATA_TYPE_SMALLINT: + wordLength = SHORT_BYTES; + break; + case TSDB_DATA_TYPE_TINYINT: + wordLength = CHAR_BYTES; + break; + default: + uError("Invalid decompress integer type:%d", type); + return TSDB_CODE_INVALID_PARA; + } + + return wordLength; +} diff --git a/source/util/src/tdecompress.c b/source/util/src/tdecompressavx.c similarity index 95% rename from source/util/src/tdecompress.c rename to source/util/src/tdecompressavx.c index 81223d7311..143867b783 100644 --- a/source/util/src/tdecompress.c +++ b/source/util/src/tdecompressavx.c @@ -13,35 +13,16 @@ * along with this program. If not, see . */ -#include "os.h" #include "tcompression.h" -#include "ttypes.h" - -int32_t getWordLength(char type) { - int32_t wordLength = 0; - switch (type) { - case TSDB_DATA_TYPE_BIGINT: - wordLength = LONG_BYTES; - break; - case TSDB_DATA_TYPE_INT: - wordLength = INT_BYTES; - break; - case TSDB_DATA_TYPE_SMALLINT: - wordLength = SHORT_BYTES; - break; - case TSDB_DATA_TYPE_TINYINT: - wordLength = CHAR_BYTES; - break; - default: - uError("Invalid decompress integer type:%d", type); - return TSDB_CODE_INVALID_PARA; - } - - return wordLength; -} #ifdef __AVX2__ +char tsSIMDEnable = 1; +#else +char tsSIMDEnable = 0; +#endif + int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, char *const output, const char type) { +#ifdef __AVX2__ int32_t word_length = getWordLength(type); // Selector value: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 @@ -75,12 +56,12 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, int32_t batch = 0; int32_t remain = 0; if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) { -#if __AVX512F__ +#ifdef __AVX512F__ batch = num >> 3; remain = num & 0x07; #endif } else if (tsSIMDEnable && tsAVX2Supported) { -#if __AVX2__ +#ifdef __AVX2__ batch = num >> 2; remain = num & 0x03; #endif @@ -88,7 +69,7 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, if (selector == 0 || selector == 1) { if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) { -#if __AVX512F__ +#ifdef __AVX512F__ for (int32_t i = 0; i < batch; ++i) { __m512i prev = _mm512_set1_epi64(prevValue); _mm512_storeu_si512((__m512i *)&p[_pos], prev); @@ -117,7 +98,7 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, } } else { if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) { -#if __AVX512F__ +#ifdef __AVX512F__ __m512i sum_mask1 = _mm512_set_epi64(6, 6, 4, 4, 2, 2, 0, 0); __m512i sum_mask2 = _mm512_set_epi64(5, 5, 5, 5, 1, 1, 1, 1); __m512i sum_mask3 = _mm512_set_epi64(3, 3, 3, 3, 3, 3, 3, 3); @@ -310,10 +291,13 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, } return nelements * word_length; +#else + uError("unable run %s without avx2 instructions", __func__); + return -1; +#endif } -#define M256_BYTES sizeof(__m256i) - +#ifdef __AVX2__ FORCE_INLINE __m256i decodeFloatAvx2(const char *data, const char *flag) { __m256i dataVec = _mm256_load_si256((__m256i *)data); __m256i flagVec = _mm256_load_si256((__m256i *)flag); @@ -332,7 +316,27 @@ FORCE_INLINE __m256i decodeFloatAvx2(const char *data, const char *flag) { return diffVec; } +FORCE_INLINE __m256i decodeDoubleAvx2(const char *data, const char *flag) { + __m256i dataVec = _mm256_load_si256((__m256i *)data); + __m256i flagVec = _mm256_load_si256((__m256i *)flag); + __m256i k7 = _mm256_set1_epi64x(7); + __m256i lopart = _mm256_set_epi64x(0, -1, 0, -1); + __m256i hipart = _mm256_set_epi64x(-1, 0, -1, 0); + __m256i trTail = _mm256_cmpgt_epi64(flagVec, k7); + __m256i trHead = _mm256_andnot_si256(trTail, _mm256_set1_epi64x(-1)); + __m256i shiftVec = _mm256_slli_epi64(_mm256_sub_epi64(k7, _mm256_and_si256(flagVec, k7)), 3); + __m256i maskVec = hipart; + __m256i diffVec = _mm256_sllv_epi64(dataVec, _mm256_and_si256(shiftVec, maskVec)); + maskVec = _mm256_or_si256(trHead, lopart); + diffVec = _mm256_srlv_epi64(diffVec, _mm256_and_si256(shiftVec, maskVec)); + maskVec = _mm256_and_si256(trTail, lopart); + diffVec = _mm256_sllv_epi64(diffVec, _mm256_and_si256(shiftVec, maskVec)); + return diffVec; +} +#endif + int32_t tsDecompressFloatImpAvx2(const char *input, int32_t nelements, char *output) { +#ifdef __AVX2__ // Allocate memory-aligned buffer char buf[M256_BYTES * 3]; memset(buf, 0, sizeof(buf)); @@ -343,7 +347,7 @@ int32_t tsDecompressFloatImpAvx2(const char *input, int32_t nelements, char *out // Load data into the buffer for batch processing int32_t batchSize = M256_BYTES / FLOAT_BYTES; - int32_t idx = 0; + int32_t idx = 0; uint32_t cur = 0; for (int32_t i = 0; i < nelements; i += 2) { if (idx == batchSize) { @@ -380,27 +384,14 @@ int32_t tsDecompressFloatImpAvx2(const char *input, int32_t nelements, char *out out += idx * FLOAT_BYTES; } return (int32_t)(out - output); -} - -FORCE_INLINE __m256i decodeDoubleAvx2(const char *data, const char *flag) { - __m256i dataVec = _mm256_load_si256((__m256i *)data); - __m256i flagVec = _mm256_load_si256((__m256i *)flag); - __m256i k7 = _mm256_set1_epi64x(7); - __m256i lopart = _mm256_set_epi64x(0, -1, 0, -1); - __m256i hipart = _mm256_set_epi64x(-1, 0, -1, 0); - __m256i trTail = _mm256_cmpgt_epi64(flagVec, k7); - __m256i trHead = _mm256_andnot_si256(trTail, _mm256_set1_epi64x(-1)); - __m256i shiftVec = _mm256_slli_epi64(_mm256_sub_epi64(k7, _mm256_and_si256(flagVec, k7)), 3); - __m256i maskVec = hipart; - __m256i diffVec = _mm256_sllv_epi64(dataVec, _mm256_and_si256(shiftVec, maskVec)); - maskVec = _mm256_or_si256(trHead, lopart); - diffVec = _mm256_srlv_epi64(diffVec, _mm256_and_si256(shiftVec, maskVec)); - maskVec = _mm256_and_si256(trTail, lopart); - diffVec = _mm256_sllv_epi64(diffVec, _mm256_and_si256(shiftVec, maskVec)); - return diffVec; +#else + uError("unable run %s without avx2 instructions", __func__); + return -1; +#endif } int32_t tsDecompressDoubleImpAvx2(const char *input, const int32_t nelements, char *const output) { +#ifdef __AVX2__ // Allocate memory-aligned buffer char buf[M256_BYTES * 3]; memset(buf, 0, sizeof(buf)); @@ -448,12 +439,15 @@ int32_t tsDecompressDoubleImpAvx2(const char *input, const int32_t nelements, ch out += idx * DOUBLE_BYTES; } return (int32_t)(out - output); -} +#else + uError("unable run %s without avx2 instructions", __func__); + return -1; #endif +} -#if __AVX512VL__ -// decode two timestamps in one loop. -void tsDecompressTimestampAvx2(const char *const input, const int32_t nelements, char *const output, bool bigEndian) { +int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelements, char *const output, + bool bigEndian) { +#ifdef __AVX512VL__ int64_t *ostream = (int64_t *)output; int32_t ipos = 1, opos = 0; @@ -588,11 +582,16 @@ void tsDecompressTimestampAvx2(const char *const input, const int32_t nelements, ostream[opos++] = prevVal[1] + prevDeltaX; } } - return; + return opos; +#else + uError("unable run %s without avx512 instructions", __func__); + return -1; +#endif } -void tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output, - bool UNUSED_PARAM(bigEndian)) { +int32_t tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output, + bool UNUSED_PARAM(bigEndian)) { +#ifdef __AVX512VL__ int64_t *ostream = (int64_t *)output; int32_t ipos = 1, opos = 0; @@ -700,6 +699,9 @@ void tsDecompressTimestampAvx512(const char *const input, const int32_t nelement } } - return; -} + return opos; +#else + uError("unable run %s without avx512 instructions", __func__); + return -1; #endif +} diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 4d8b3627ef..d660edd0b8 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -268,6 +268,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_DB_IN_CREATING, "Database in creating TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_SYS_TABLENAME, "Invalid system table name") TAOS_DEFINE_ERROR(TSDB_CODE_MND_ENCRYPT_NOT_ALLOW_CHANGE, "Encryption is not allowed to be changed after database is created") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_WAL_LEVEL, "Invalid option, wal_level 0 should be used with replica 1") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_DNODE_LIST_FMT, "Invalid dnode list format") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_DNODE_LIST_REPEAT, "Duplicate items in the dnode list") // mnode-node TAOS_DEFINE_ERROR(TSDB_CODE_MND_MNODE_ALREADY_EXIST, "Mnode already exists") diff --git a/tests/army/query/function/ans/interp.csv b/tests/army/query/function/ans/interp.csv new file mode 100644 index 0000000000..e1ba236aa1 --- /dev/null +++ b/tests/army/query/function/ans/interp.csv @@ -0,0 +1,368 @@ + +taos> select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts; + irowts | table_name | isfilled | intp_c1 | +================================================================================ + 2020-02-01 00:00:04.000 | td32727 | true | NULL | + 2020-02-01 00:00:05.000 | td32727 | false | 5 | + 2020-02-01 00:00:06.000 | td32727 | true | NULL | + 2020-02-01 00:00:07.000 | td32727 | true | NULL | + 2020-02-01 00:00:08.000 | td32727 | true | NULL | + 2020-02-01 00:00:09.000 | td32727 | true | NULL | + 2020-02-01 00:00:10.000 | td32727 | false | 10 | + 2020-02-01 00:00:11.000 | td32727 | true | NULL | + 2020-02-01 00:00:12.000 | td32727 | true | NULL | + 2020-02-01 00:00:13.000 | td32727 | true | NULL | + 2020-02-01 00:00:14.000 | td32727 | true | NULL | + 2020-02-01 00:00:15.000 | td32727 | false | 15 | + 2020-02-01 00:00:16.000 | td32727 | true | NULL | + +taos> select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts; + irowts | table_name | isfilled | intp_c1 | +================================================================================ + 2020-02-01 00:00:04.000 | td32727 | true | 5 | + 2020-02-01 00:00:05.000 | td32727 | false | 5 | + 2020-02-01 00:00:06.000 | td32727 | true | 10 | + 2020-02-01 00:00:07.000 | td32727 | true | 10 | + 2020-02-01 00:00:08.000 | td32727 | true | 10 | + 2020-02-01 00:00:09.000 | td32727 | true | 10 | + 2020-02-01 00:00:10.000 | td32727 | false | 10 | + 2020-02-01 00:00:11.000 | td32727 | true | 15 | + 2020-02-01 00:00:12.000 | td32727 | true | 15 | + 2020-02-01 00:00:13.000 | td32727 | true | 15 | + 2020-02-01 00:00:14.000 | td32727 | true | 15 | + 2020-02-01 00:00:15.000 | td32727 | false | 15 | + +taos> select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts; + irowts | table_name | isfilled | intp_c1 | +================================================================================ + 2020-02-01 00:00:05.000 | td32727 | false | 5 | + 2020-02-01 00:00:06.000 | td32727 | true | 5 | + 2020-02-01 00:00:07.000 | td32727 | true | 5 | + 2020-02-01 00:00:08.000 | td32727 | true | 5 | + 2020-02-01 00:00:09.000 | td32727 | true | 5 | + 2020-02-01 00:00:10.000 | td32727 | false | 10 | + 2020-02-01 00:00:11.000 | td32727 | true | 10 | + 2020-02-01 00:00:12.000 | td32727 | true | 10 | + 2020-02-01 00:00:13.000 | td32727 | true | 10 | + 2020-02-01 00:00:14.000 | td32727 | true | 10 | + 2020-02-01 00:00:15.000 | td32727 | false | 15 | + 2020-02-01 00:00:16.000 | td32727 | true | 15 | + +taos> select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts; + irowts | table_name | isfilled | intp_c1 | +================================================================================ + 2020-02-01 00:00:05.000 | td32727 | false | 5 | + 2020-02-01 00:00:06.000 | td32727 | true | 6 | + 2020-02-01 00:00:07.000 | td32727 | true | 7 | + 2020-02-01 00:00:08.000 | td32727 | true | 8 | + 2020-02-01 00:00:09.000 | td32727 | true | 9 | + 2020-02-01 00:00:10.000 | td32727 | false | 10 | + 2020-02-01 00:00:11.000 | td32727 | true | 11 | + 2020-02-01 00:00:12.000 | td32727 | true | 12 | + 2020-02-01 00:00:13.000 | td32727 | true | 13 | + 2020-02-01 00:00:14.000 | td32727 | true | 14 | + 2020-02-01 00:00:15.000 | td32727 | false | 15 | + +taos> select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts; + irowts | table_name | isfilled | intp_c1 | +================================================================================ + 2020-02-01 00:00:04.000 | td32727 | true | 1 | + 2020-02-01 00:00:05.000 | td32727 | false | 5 | + 2020-02-01 00:00:06.000 | td32727 | true | 1 | + 2020-02-01 00:00:07.000 | td32727 | true | 1 | + 2020-02-01 00:00:08.000 | td32727 | true | 1 | + 2020-02-01 00:00:09.000 | td32727 | true | 1 | + 2020-02-01 00:00:10.000 | td32727 | false | 10 | + 2020-02-01 00:00:11.000 | td32727 | true | 1 | + 2020-02-01 00:00:12.000 | td32727 | true | 1 | + 2020-02-01 00:00:13.000 | td32727 | true | 1 | + 2020-02-01 00:00:14.000 | td32727 | true | 1 | + 2020-02-01 00:00:15.000 | td32727 | false | 15 | + 2020-02-01 00:00:16.000 | td32727 | true | 1 | + +taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts, c2; + irowts | table_name | c_c2 | isfilled | intp_c1 | +============================================================================================== + 2020-02-01 00:00:04.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:04.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:04.000 | td32727 | 15 | true | NULL | + 2020-02-01 00:00:05.000 | td32727 | 5 | false | 5 | + 2020-02-01 00:00:05.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:05.000 | td32727 | 15 | true | NULL | + 2020-02-01 00:00:06.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:06.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:06.000 | td32727 | 15 | true | NULL | + 2020-02-01 00:00:07.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:07.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:07.000 | td32727 | 15 | true | NULL | + 2020-02-01 00:00:08.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:08.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:08.000 | td32727 | 15 | true | NULL | + 2020-02-01 00:00:09.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:09.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:09.000 | td32727 | 15 | true | NULL | + 2020-02-01 00:00:10.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:10.000 | td32727 | 10 | false | 10 | + 2020-02-01 00:00:10.000 | td32727 | 15 | true | NULL | + 2020-02-01 00:00:11.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:11.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:11.000 | td32727 | 15 | true | NULL | + 2020-02-01 00:00:12.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:12.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:12.000 | td32727 | 15 | true | NULL | + 2020-02-01 00:00:13.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:13.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:13.000 | td32727 | 15 | true | NULL | + 2020-02-01 00:00:14.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:14.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:14.000 | td32727 | 15 | true | NULL | + 2020-02-01 00:00:15.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:15.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:15.000 | td32727 | 15 | false | 15 | + 2020-02-01 00:00:16.000 | td32727 | 5 | true | NULL | + 2020-02-01 00:00:16.000 | td32727 | 10 | true | NULL | + 2020-02-01 00:00:16.000 | td32727 | 15 | true | NULL | + +taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts, c2; + irowts | table_name | c_c2 | isfilled | intp_c1 | +============================================================================================== + 2020-02-01 00:00:04.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:04.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:04.000 | td32727 | 15 | true | 15 | + 2020-02-01 00:00:05.000 | td32727 | 5 | false | 5 | + 2020-02-01 00:00:05.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:05.000 | td32727 | 15 | true | 15 | + 2020-02-01 00:00:06.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:06.000 | td32727 | 15 | true | 15 | + 2020-02-01 00:00:07.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:07.000 | td32727 | 15 | true | 15 | + 2020-02-01 00:00:08.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:08.000 | td32727 | 15 | true | 15 | + 2020-02-01 00:00:09.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:09.000 | td32727 | 15 | true | 15 | + 2020-02-01 00:00:10.000 | td32727 | 10 | false | 10 | + 2020-02-01 00:00:10.000 | td32727 | 15 | true | 15 | + 2020-02-01 00:00:11.000 | td32727 | 15 | true | 15 | + 2020-02-01 00:00:12.000 | td32727 | 15 | true | 15 | + 2020-02-01 00:00:13.000 | td32727 | 15 | true | 15 | + 2020-02-01 00:00:14.000 | td32727 | 15 | true | 15 | + 2020-02-01 00:00:15.000 | td32727 | 15 | false | 15 | + +taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts, c2; + irowts | table_name | c_c2 | isfilled | intp_c1 | +============================================================================================== + 2020-02-01 00:00:05.000 | td32727 | 5 | false | 5 | + 2020-02-01 00:00:06.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:07.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:08.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:09.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:10.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:10.000 | td32727 | 10 | false | 10 | + 2020-02-01 00:00:11.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:11.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:12.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:12.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:13.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:13.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:14.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:14.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:15.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:15.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:15.000 | td32727 | 15 | false | 15 | + 2020-02-01 00:00:16.000 | td32727 | 5 | true | 5 | + 2020-02-01 00:00:16.000 | td32727 | 10 | true | 10 | + 2020-02-01 00:00:16.000 | td32727 | 15 | true | 15 | + +taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts, c2; + irowts | table_name | c_c2 | isfilled | intp_c1 | +============================================================================================== + 2020-02-01 00:00:05.000 | td32727 | 5 | false | 5 | + 2020-02-01 00:00:10.000 | td32727 | 10 | false | 10 | + 2020-02-01 00:00:15.000 | td32727 | 15 | false | 15 | + +taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts, c2; + irowts | table_name | c_c2 | isfilled | intp_c1 | +============================================================================================== + 2020-02-01 00:00:04.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:04.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:04.000 | td32727 | 15 | true | 1 | + 2020-02-01 00:00:05.000 | td32727 | 5 | false | 5 | + 2020-02-01 00:00:05.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:05.000 | td32727 | 15 | true | 1 | + 2020-02-01 00:00:06.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:06.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:06.000 | td32727 | 15 | true | 1 | + 2020-02-01 00:00:07.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:07.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:07.000 | td32727 | 15 | true | 1 | + 2020-02-01 00:00:08.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:08.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:08.000 | td32727 | 15 | true | 1 | + 2020-02-01 00:00:09.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:09.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:09.000 | td32727 | 15 | true | 1 | + 2020-02-01 00:00:10.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:10.000 | td32727 | 10 | false | 10 | + 2020-02-01 00:00:10.000 | td32727 | 15 | true | 1 | + 2020-02-01 00:00:11.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:11.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:11.000 | td32727 | 15 | true | 1 | + 2020-02-01 00:00:12.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:12.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:12.000 | td32727 | 15 | true | 1 | + 2020-02-01 00:00:13.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:13.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:13.000 | td32727 | 15 | true | 1 | + 2020-02-01 00:00:14.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:14.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:14.000 | td32727 | 15 | true | 1 | + 2020-02-01 00:00:15.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:15.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:15.000 | td32727 | 15 | false | 15 | + 2020-02-01 00:00:16.000 | td32727 | 5 | true | 1 | + 2020-02-01 00:00:16.000 | td32727 | 10 | true | 1 | + 2020-02-01 00:00:16.000 | td32727 | 15 | true | 1 | + +taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts, c2, c3; + irowts | table_name | c_c2 | c_c3 | isfilled | intp_c1 | +====================================================================================================================== + 2020-02-01 00:00:04.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:04.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:04.000 | td32727 | 15 | 15 | true | NULL | + 2020-02-01 00:00:05.000 | td32727 | 5 | 5 | false | 5 | + 2020-02-01 00:00:05.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:05.000 | td32727 | 15 | 15 | true | NULL | + 2020-02-01 00:00:06.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:06.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:06.000 | td32727 | 15 | 15 | true | NULL | + 2020-02-01 00:00:07.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:07.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:07.000 | td32727 | 15 | 15 | true | NULL | + 2020-02-01 00:00:08.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:08.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:08.000 | td32727 | 15 | 15 | true | NULL | + 2020-02-01 00:00:09.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:09.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:09.000 | td32727 | 15 | 15 | true | NULL | + 2020-02-01 00:00:10.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:10.000 | td32727 | 10 | 10 | false | 10 | + 2020-02-01 00:00:10.000 | td32727 | 15 | 15 | true | NULL | + 2020-02-01 00:00:11.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:11.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:11.000 | td32727 | 15 | 15 | true | NULL | + 2020-02-01 00:00:12.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:12.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:12.000 | td32727 | 15 | 15 | true | NULL | + 2020-02-01 00:00:13.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:13.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:13.000 | td32727 | 15 | 15 | true | NULL | + 2020-02-01 00:00:14.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:14.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:14.000 | td32727 | 15 | 15 | true | NULL | + 2020-02-01 00:00:15.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:15.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:15.000 | td32727 | 15 | 15 | false | 15 | + 2020-02-01 00:00:16.000 | td32727 | 5 | 5 | true | NULL | + 2020-02-01 00:00:16.000 | td32727 | 10 | 10 | true | NULL | + 2020-02-01 00:00:16.000 | td32727 | 15 | 15 | true | NULL | + +taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts, c2, c3; + irowts | table_name | c_c2 | c_c3 | isfilled | intp_c1 | +====================================================================================================================== + 2020-02-01 00:00:04.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:04.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:04.000 | td32727 | 15 | 15 | true | 15 | + 2020-02-01 00:00:05.000 | td32727 | 5 | 5 | false | 5 | + 2020-02-01 00:00:05.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:05.000 | td32727 | 15 | 15 | true | 15 | + 2020-02-01 00:00:06.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:06.000 | td32727 | 15 | 15 | true | 15 | + 2020-02-01 00:00:07.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:07.000 | td32727 | 15 | 15 | true | 15 | + 2020-02-01 00:00:08.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:08.000 | td32727 | 15 | 15 | true | 15 | + 2020-02-01 00:00:09.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:09.000 | td32727 | 15 | 15 | true | 15 | + 2020-02-01 00:00:10.000 | td32727 | 10 | 10 | false | 10 | + 2020-02-01 00:00:10.000 | td32727 | 15 | 15 | true | 15 | + 2020-02-01 00:00:11.000 | td32727 | 15 | 15 | true | 15 | + 2020-02-01 00:00:12.000 | td32727 | 15 | 15 | true | 15 | + 2020-02-01 00:00:13.000 | td32727 | 15 | 15 | true | 15 | + 2020-02-01 00:00:14.000 | td32727 | 15 | 15 | true | 15 | + 2020-02-01 00:00:15.000 | td32727 | 15 | 15 | false | 15 | + +taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts, c2, c3; + irowts | table_name | c_c2 | c_c3 | isfilled | intp_c1 | +====================================================================================================================== + 2020-02-01 00:00:05.000 | td32727 | 5 | 5 | false | 5 | + 2020-02-01 00:00:06.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:07.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:08.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:09.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:10.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:10.000 | td32727 | 10 | 10 | false | 10 | + 2020-02-01 00:00:11.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:11.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:12.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:12.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:13.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:13.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:14.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:14.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:15.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:15.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:15.000 | td32727 | 15 | 15 | false | 15 | + 2020-02-01 00:00:16.000 | td32727 | 5 | 5 | true | 5 | + 2020-02-01 00:00:16.000 | td32727 | 10 | 10 | true | 10 | + 2020-02-01 00:00:16.000 | td32727 | 15 | 15 | true | 15 | + +taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts, c2, c3; + irowts | table_name | c_c2 | c_c3 | isfilled | intp_c1 | +====================================================================================================================== + 2020-02-01 00:00:05.000 | td32727 | 5 | 5 | false | 5 | + 2020-02-01 00:00:10.000 | td32727 | 10 | 10 | false | 10 | + 2020-02-01 00:00:15.000 | td32727 | 15 | 15 | false | 15 | + +taos> select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts, c2, c3; + irowts | table_name | c_c2 | c_c3 | isfilled | intp_c1 | +====================================================================================================================== + 2020-02-01 00:00:04.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:04.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:04.000 | td32727 | 15 | 15 | true | 1 | + 2020-02-01 00:00:05.000 | td32727 | 5 | 5 | false | 5 | + 2020-02-01 00:00:05.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:05.000 | td32727 | 15 | 15 | true | 1 | + 2020-02-01 00:00:06.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:06.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:06.000 | td32727 | 15 | 15 | true | 1 | + 2020-02-01 00:00:07.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:07.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:07.000 | td32727 | 15 | 15 | true | 1 | + 2020-02-01 00:00:08.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:08.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:08.000 | td32727 | 15 | 15 | true | 1 | + 2020-02-01 00:00:09.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:09.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:09.000 | td32727 | 15 | 15 | true | 1 | + 2020-02-01 00:00:10.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:10.000 | td32727 | 10 | 10 | false | 10 | + 2020-02-01 00:00:10.000 | td32727 | 15 | 15 | true | 1 | + 2020-02-01 00:00:11.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:11.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:11.000 | td32727 | 15 | 15 | true | 1 | + 2020-02-01 00:00:12.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:12.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:12.000 | td32727 | 15 | 15 | true | 1 | + 2020-02-01 00:00:13.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:13.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:13.000 | td32727 | 15 | 15 | true | 1 | + 2020-02-01 00:00:14.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:14.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:14.000 | td32727 | 15 | 15 | true | 1 | + 2020-02-01 00:00:15.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:15.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:15.000 | td32727 | 15 | 15 | false | 15 | + 2020-02-01 00:00:16.000 | td32727 | 5 | 5 | true | 1 | + 2020-02-01 00:00:16.000 | td32727 | 10 | 10 | true | 1 | + 2020-02-01 00:00:16.000 | td32727 | 15 | 15 | true | 1 | + diff --git a/tests/army/query/function/in/interp.in b/tests/army/query/function/in/interp.in new file mode 100644 index 0000000000..4825ab46b1 --- /dev/null +++ b/tests/army/query/function/in/interp.in @@ -0,0 +1,15 @@ +select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts; +select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts; +select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts; +select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts; +select _irowts as irowts ,tbname as table_name, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts; +select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts, c2; +select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts, c2; +select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts, c2; +select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts, c2; +select _irowts as irowts ,tbname as table_name, c2 as c_c2, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts, c2; +select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (null) order by irowts, c2, c3; +select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (next) order by irowts, c2, c3; +select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (prev) order by irowts, c2, c3; +select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (linear) order by irowts, c2, c3; +select _irowts as irowts ,tbname as table_name, c2 as c_c2, c3 as c_c3, _isfilled as isfilled , interp(c1) as intp_c1 from test.td32727 partition by tbname,c2,c3 range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill (value, 1) order by irowts, c2, c3; diff --git a/tests/army/query/function/test_interp.py b/tests/army/query/function/test_interp.py new file mode 100644 index 0000000000..f903e7be73 --- /dev/null +++ b/tests/army/query/function/test_interp.py @@ -0,0 +1,72 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- + +from frame import etool +from frame.etool import * +from frame.log import * +from frame.cases import * +from frame.sql import * +from frame.caseBase import * +from frame.common import * + +class TDTestCase(TBase): + updatecfgDict = { + "keepColumnName": "1", + "ttlChangeOnWrite": "1", + "querySmaOptimize": "1", + "slowLogScope": "none", + "queryBufferSize": 10240 + } + + def insert_data(self): + tdLog.printNoPrefix("==========step1:create table") + + tdSql.execute("create database test keep 36500") + tdSql.execute("use test") + tdSql.execute( + f'''create table if not exists test.td32727 + (ts timestamp, c0 tinyint, c1 smallint, c2 int, c3 bigint, c4 double, c5 float, c6 bool, c7 varchar(10), c8 nchar(10), c9 tinyint unsigned, c10 smallint unsigned, c11 int unsigned, c12 bigint unsigned) + ''' + ) + + tdLog.printNoPrefix("==========step2:insert data") + + tdSql.execute(f"insert into test.td32727 values ('2020-02-01 00:00:05', 5, 5, 5, 5, 5.0, 5.0, true, 'varchar', 'nchar', 5, 5, 5, 5)") + tdSql.execute(f"insert into test.td32727 values ('2020-02-01 00:00:10', 10, 10, 10, 10, 10.0, 10.0, true, 'varchar', 'nchar', 10, 10, 10, 10)") + tdSql.execute(f"insert into test.td32727 values ('2020-02-01 00:00:15', 15, 15, 15, 15, 15.0, 15.0, true, 'varchar', 'nchar', 15, 15, 15, 15)") + + + def test_normal_query_new(self, testCase): + # read sql from .sql file and execute + tdLog.info("test normal query.") + self.sqlFile = etool.curFile(__file__, f"in/{testCase}.in") + self.ansFile = etool.curFile(__file__, f"ans/{testCase}.csv") + + tdCom.compare_testcase_result(self.sqlFile, self.ansFile, testCase) + + def test_interp(self): + self.test_normal_query_new("interp") + + def run(self): + tdLog.debug(f"start to excute {__file__}") + + self.insert_data() + + # math function + self.test_interp() + + tdLog.success(f"{__file__} successfully executed") + + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index aeaa2567dd..4923858a3e 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -16,6 +16,7 @@ ,,y,army,./pytest.sh python3 ./test.py -f query/function/test_func_elapsed.py ,,y,army,./pytest.sh python3 ./test.py -f query/function/test_function.py ,,y,army,./pytest.sh python3 ./test.py -f query/function/test_resinfo.py +,,y,army,./pytest.sh python3 ./test.py -f query/function/test_interp.py ,,y,army,./pytest.sh python3 ./test.py -f query/function/concat.py ,,y,army,./pytest.sh python3 ./test.py -f query/function/cast.py ,,y,army,./pytest.sh python3 ./test.py -f query/test_join.py @@ -1083,6 +1084,7 @@ ,,y,script,./test.sh -f tsim/user/privilege_table.sim ,,y,script,./test.sh -f tsim/user/privilege_create_db.sim ,,y,script,./test.sh -f tsim/db/alter_option.sim +,,y,script,./test.sh -f tsim/db/dnodelist.sim # ,,y,script,./test.sh -f tsim/db/alter_replica_31.sim ,,y,script,./test.sh -f tsim/db/basic1.sim ,,y,script,./test.sh -f tsim/db/basic2.sim diff --git a/tests/script/tsim/compress/commitlog.sim b/tests/script/tsim/compress/commitlog.sim index 38899b95ba..d0380dd559 100644 --- a/tests/script/tsim/compress/commitlog.sim +++ b/tests/script/tsim/compress/commitlog.sim @@ -20,7 +20,7 @@ sql create table $tb (ts timestamp, b bool, t tinyint, s smallint, i int, big bi $count = 0 while $count < $N $ms = 1591200000000 + $count - sql insert into $tb values( $ms , 1, 0, $count , $count , $count ,'it is a string') + sql insert into $tb values( $ms , 10, 0, $count , $count , $count ,'it is a string') $count = $count + 1 endw @@ -29,6 +29,13 @@ if $rows != $N then return -1 endi +sql flush database $db + +sql select * from $tb +if $rows != $N then + return -1 +endi + print =============== step2 $i = 1 $db = $dbPrefix . $i diff --git a/tests/script/tsim/compress/compressDisable.sim b/tests/script/tsim/compress/compressDisable.sim new file mode 100644 index 0000000000..dac7ef712a --- /dev/null +++ b/tests/script/tsim/compress/compressDisable.sim @@ -0,0 +1,146 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/exec.sh -n dnode1 -s start +sql connect + +print ============================ dnode1 start +$i = 0 +$dbPrefix = db +$tbPrefix = tb +$db = $dbPrefix . $i +$tb = $tbPrefix . $i + +$N = 2000 + +print =============== step1 +sql create database $db +sql use $db +sql create table $tb (ts timestamp, b bool encode 'disabled', t tinyint encode 'disabled', s smallint encode 'disabled', i int encode 'disabled', big bigint encode 'disabled', str binary(256)) + +$count = 0 +while $count < $N + $ms = 1591200000000 + $count + sql insert into $tb values( $ms , 1, 0, $count , $count , $count ,'it is a string') + $count = $count + 1 +endw + +sql select * from $tb +if $rows != $N then + return -1 +endi + +sql flush database $db + +sql select * from $tb +if $rows != $N then + return -1 +endi + +sql alter table $tb modify column ts encode 'disabled' + +$count = 0 +while $count < $N + $ms = 1591200030000 + $count + sql insert into $tb values( $ms , 1, 0, $count , $count , $count ,'it is a string') + $count = $count + 1 +endw + +$M = 4000 +sql select * from $tb +if $rows != $M then + return -1 +endi + +sql flush database $db + +sql select * from $tb +if $rows != $M then + return -1 +endi + + +$stb1 = txx1 +sql create table txx1 (ts timestamp encode 'disabled' compress 'disabled' level 'h', f int compress 'lz4') tags(t int) + +$count = 0 +$subTb1 = txx1_sub1 +$subTb2 = txx1_sub2 + +sql create table $subTb1 using $stb1 tags(1) +sql create table $subTb2 using $stb1 tags(2) + +while $count < $N + $ms = 1591200030000 + $count + sql insert into $subTb1 values( $ms , 1) + + $ms2 = 1591200040000 + $count + sql insert into $subTb2 values( $ms2 , 1) + $count = $count + 1 +endw + +$count = 0 +sql select * from $stb1 +if $rows != $M then + return -1 +endi + +sql flush database $db + +sql select * from $stb1 +if $rows != $M then + return -1 +endi + +$L = 8000 +sql alter table $stb1 modify column ts encode 'delta-i' +sql alter table $stb1 modify column f encode 'disabled' + +while $count < $N + $ms = 1591200050000 + $count + sql insert into $subTb1 values( $ms , 1) + + $ms2 = 1591200060000 + $count + sql insert into $subTb2 values( $ms2 , 1) + $count = $count + 1 +endw + + +sql select * from $stb1 +if $rows != $L then + return -1 +endi + +sql flush database $db + +sql select * from $stb1 +if $rows != $L then + return -1 +endi + +sql alter table $stb1 modify column ts encode 'disabled' + + +$count = 0 +$I = 12000 +while $count < $N + $ms = 1591200070000 + $count + sql insert into $subTb1 values( $ms , 1) + + $ms2 = 1591200080000 + $count + sql insert into $subTb2 values( $ms2 , 1) + $count = $count + 1 +endw + + +sql select * from $stb1 +if $rows != $I then + return -1 +endi + +sql flush database $db + +sql select * from $stb1 +if $rows != $I then + return -1 +endi + diff --git a/tests/script/tsim/db/dnodelist.sim b/tests/script/tsim/db/dnodelist.sim new file mode 100644 index 0000000000..08bf08a1fe --- /dev/null +++ b/tests/script/tsim/db/dnodelist.sim @@ -0,0 +1,258 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/deploy.sh -n dnode2 -i 2 +system sh/deploy.sh -n dnode3 -i 3 +system sh/deploy.sh -n dnode4 -i 4 +system sh/deploy.sh -n dnode5 -i 5 +system sh/exec.sh -n dnode1 -s start +system sh/exec.sh -n dnode2 -s start +system sh/exec.sh -n dnode3 -s start +system sh/exec.sh -n dnode4 -s start +system sh/exec.sh -n dnode5 -s start + +sql connect +sql create dnode $hostname port 7200 +sql create dnode $hostname port 7300 +sql create dnode $hostname port 7400 +sql create dnode $hostname port 7500 + +$x = 0 +step1: + $x = $x + 1 + sleep 1000 + if $x == 10 then + print ====> dnode not ready! + return -1 + endi +sql select * from information_schema.ins_dnodes +print ===> $data00 $data01 $data02 $data03 $data04 $data05 +print ===> $data10 $data11 $data12 $data13 $data14 $data15 +print ===> $data20 $data21 $data22 $data23 $data24 $data25 +print ===> $data30 $data31 $data32 $data33 $data34 $data35 +print ===> $data40 $data41 $data42 $data43 $data44 $data45 +if $rows != 5 then + return -1 +endi +if $data(1)[4] != ready then + goto step1 +endi +if $data(2)[4] != ready then + goto step1 +endi +if $data(3)[4] != ready then + goto step1 +endi +if $data(4)[4] != ready then + goto step1 +endi +if $data(5)[4] != ready then + goto step1 +endi + +print --- error case + +sql_error create database d1 vgroups 1 dnodes '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'; +sql_error create database d1 vgroups 1 dnodes '1 '; +sql_error create database d1 vgroups 1 dnodes ' 1'; +sql_error create database d1 vgroups 1 dnodes '1,'; +sql_error create database d1 vgroups 1 dnodes '1, '; +sql_error create database d1 vgroups 1 dnodes 'a '; +sql_error create database d1 vgroups 1 dnodes '- '; +sql_error create database d1 vgroups 1 dnodes '1,1'; +sql_error create database d1 vgroups 1 dnodes '1, 1'; +sql_error create database d1 vgroups 1 dnodes '1,1234567890'; +sql_error create database d1 vgroups 1 dnodes '1,2,6'; +sql_error create database d1 vgroups 1 dnodes ',1,2'; +sql_error create database d1 vgroups 1 dnodes 'x1,2'; +sql_error create database d1 vgroups 1 dnodes 'c1,ab2'; +sql_error create database d1 vgroups 1 dnodes '1,1,2'; + +sql_error create database d1 vgroups 1 replica 2 dnodes '1'; +sql_error create database d1 vgroups 1 replica 2 dnodes '1,8'; +sql_error create database d1 vgroups 1 replica 3 dnodes '1'; +sql_error create database d1 vgroups 1 replica 3 dnodes '1,2'; +sql_error create database d1 vgroups 1 replica 3 dnodes '1,2,4,6'; + +print --- replica 1 + +print --- case10 +sql create database d10 vgroups 1 dnodes '1'; +sql show dnodes; +if $data(1)[2] != 1 then + return -1 +endi +sql_error alter database d10 replica 1 dnodes '1,2,3'; +sql drop database d10; + +print --- case11 +sql create database d11 vgroups 1 dnodes '2'; +sql show dnodes; +if $data(2)[2] != 1 then + return -1 +endi +sql drop database d11; + +print --- case12 +sql create database d12 vgroups 2 dnodes '3,4'; +sql show dnodes; +if $data(3)[2] != 1 then + return -1 +endi +if $data(4)[2] != 1 then + return -1 +endi +sql drop database d12; + +print --- case13 +sql create database d13 vgroups 2 dnodes '5'; +sql show dnodes; +if $data(5)[2] != 2 then + return -1 +endi +sql drop database d13; + +print --- case14 +sql create database d14 vgroups 1 dnodes '1,2,5'; +sql drop database d14; + +print --- case15 +sql create database d15 vgroups 2 dnodes '1,4,3'; +sql drop database d15; + +print --- case16 +sql create database d16 vgroups 3 dnodes '1'; +sql show dnodes; +if $data(1)[2] != 3 then + return -1 +endi +sql drop database d16; + +print --- case17 +sql create database d17 vgroups 3 dnodes '1,4'; +sql drop database d17; + +print --- case18 +sql create database d18 vgroups 3 dnodes '1,2,4'; +sql show dnodes; +if $data(1)[2] != 1 then + return -1 +endi +if $data(2)[2] != 1 then + return -1 +endi +if $data(4)[2] != 1 then + return -1 +endi +sql drop database d18; + +print --- replica 2 + +print --- case20 +sql create database d20 replica 2 vgroups 1 dnodes '1,2'; +sql show dnodes; +if $data(1)[2] != 1 then + return -1 +endi +if $data(2)[2] != 1 then + return -1 +endi +sql drop database d20; + +print --- case21 +sql create database d21 replica 2 vgroups 3 dnodes '1,2,3'; +sql show dnodes; +if $data(1)[2] != 2 then + return -1 +endi +if $data(2)[2] != 2 then + return -1 +endi +if $data(3)[2] != 2 then + return -1 +endi +sql drop database d21; + +print --- case22 +sql create database d22 replica 2 vgroups 2 dnodes '1,2'; +sql show dnodes; +if $data(1)[2] != 2 then + return -1 +endi +if $data(2)[2] != 2 then + return -1 +endi +sql drop database d22; + +print --- replica 3 + +print --- case30 +sql create database d30 replica 3 vgroups 3 dnodes '1,2,3'; +sql show dnodes; +if $data(1)[2] != 3 then + return -1 +endi +if $data(2)[2] != 3 then + return -1 +endi +if $data(3)[2] != 3 then + return -1 +endi +sql_error alter database d30 replica 1 dnodes '1'; +sql drop database d30; + +print --- case31 +sql create database d31 replica 3 vgroups 2 dnodes '1,2,4'; +sql show dnodes; +if $data(1)[2] != 2 then + return -1 +endi +if $data(2)[2] != 2 then + return -1 +endi +if $data(4)[2] != 2 then + return -1 +endi +sql drop database d31; + +print --- case32 +sql create database d32 replica 3 vgroups 4 dnodes '4,2,3,1'; +sql show dnodes; +if $data(1)[2] != 3 then + return -1 +endi +if $data(2)[2] != 3 then + return -1 +endi +if $data(3)[2] != 3 then + return -1 +endi +if $data(4)[2] != 3 then + return -1 +endi +sql drop database d32; + +print --- case33 +sql create database d33 replica 3 vgroups 5 dnodes '4,2,3,1,5'; +sql show dnodes; +if $data(1)[2] != 3 then + return -1 +endi +if $data(2)[2] != 3 then + return -1 +endi +if $data(3)[2] != 3 then + return -1 +endi +if $data(4)[2] != 3 then + return -1 +endi +if $data(5)[2] != 3 then + return -1 +endi +sql drop database d33; + +return + +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/scalar/caseWhen.sim b/tests/script/tsim/scalar/caseWhen.sim index 67c8ac3673..4753e24513 100644 --- a/tests/script/tsim/scalar/caseWhen.sim +++ b/tests/script/tsim/scalar/caseWhen.sim @@ -838,7 +838,7 @@ endi if $data20 != 11 then return -1 endi -if $data30 != 1664176504 then +if $data30 != 1664176504000 then return -1 endi @@ -1130,38 +1130,38 @@ if $data00 != varchar_val then return -1 endi -sql select case when ts > '2022-01-01 00:00:00' then c_varchar else c_geometry end as result from t_test; -if $data00 != varchar_val then +sql select case when 1 then 1234567890987654 else 'abcertyuiojhgfddhjgfcvbn' end; +if $data00 != 1234567890987654 then return -1 endi -sql select case when ts > '2022-01-01 00:00:00' then c_bool else c_geometry end as result from t_test; -if $data00 != true then +sql select case when 0 then 1234567890987654 else 'abcertyuiojhgfddhjgfcvbn' end; +if $data00 != abcertyuiojhgfddhjgfcvbn then return -1 endi -sql select case when 0 then tag_id else c_geometry end as result from t_test; -if $data00 != 16842773 then - return -1 -endi - -sql select case when 0 then tag_id else c_nchar end as result from t_test; +sql select case when 0 then 1234567890987654 else c_nchar end from t_test; if $data00 != 涛思数据 then return -1 endi -sql select case when 0 then tag_id else c_int end as result from t_test; -if $data00 != 123 then +sql select case when 1 then 1234567890987654 else c_nchar end from t_test; +if $data00 != 1234567890987654 then return -1 endi -sql select case when 0 then tag_id else c_float end as result from t_test; -if $data00 != 123.449997 then +sql select case when 1 then c_varchar else c_varbinary end from t_test; +if $data00 != null then return -1 endi +sql_error select case when ts > '2022-01-01 00:00:00' then c_varchar else c_geometry end as result from t_test; +sql_error select case when ts > '2022-01-01 00:00:00' then c_bool else c_geometry end as result from t_test; +sql_error select case when 0 then tag_id else c_geometry end as result from t_test; +sql_error select case when 0 then tag_id else c_nchar end as result from t_test; +sql_error select case when 0 then tag_id else c_int end as result from t_test; +sql_error select case when 0 then tag_id else c_float end as result from t_test; sql_error select case when c_double > 100 then c_varbinary else c_geometry end as result from t_test; sql_error select case when c_bool then c_double else c_varbinary end as result from t_test; -sql_error select case when c_bool then c_varbinary else c_varchar end as result from t_test; system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/win-test-file b/tests/script/win-test-file index ff69e91967..ef99442214 100644 --- a/tests/script/win-test-file +++ b/tests/script/win-test-file @@ -325,6 +325,7 @@ ./test.sh -f tsim/compress/compress.sim ./test.sh -f tsim/compress/compress_col.sim ./test.sh -f tsim/compress/uncompress.sim +./test.sh -f tsim/compress/compressDisable.sim ./test.sh -f tsim/compute/avg.sim ./test.sh -f tsim/compute/block_dist.sim ./test.sh -f tsim/compute/bottom.sim diff --git a/tools/keeper/main.go b/tools/keeper/main.go index 43432bde3d..5f7d47cb1c 100644 --- a/tools/keeper/main.go +++ b/tools/keeper/main.go @@ -1,11 +1,8 @@ package main -import ( - "github.com/taosdata/taoskeeper/system" -) +import "github.com/taosdata/taoskeeper/system" func main() { r := system.Init() system.Start(r) - // config.IsEnterprise } diff --git a/tools/keeper/process/empty_test.go b/tools/keeper/process/empty_test.go deleted file mode 100644 index 6718d12525..0000000000 --- a/tools/keeper/process/empty_test.go +++ /dev/null @@ -1,8 +0,0 @@ -package process - -import ( - "testing" -) - -func TestEmpty(t *testing.T) { -} diff --git a/tools/keeper/process/handle_test.go b/tools/keeper/process/handle_test.go new file mode 100644 index 0000000000..bfd5c369b4 --- /dev/null +++ b/tools/keeper/process/handle_test.go @@ -0,0 +1,121 @@ +package process + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_i2string(t *testing.T) { + tests := []struct { + value interface{} + expected string + }{ + {"abc", "abc"}, + {"abcdef", "abcdef"}, + {[]byte{97, 98, 99, 100, 101, 102}, "abcdef"}, + } + + for _, tt := range tests { + res := i2string(tt.value) + assert.Equal(t, tt.expected, res) + } +} + +func Test_i2string_panic(t *testing.T) { + defer func() { + if r := recover(); r == nil { + t.Errorf("Expected panic for unexpected type, but did not panic") + } + }() + + i2string(12345) +} + +func Test_i2float(t *testing.T) { + tests := []struct { + value interface{} + expected float64 + }{ + {int8(1), 1.0}, + {int16(1), 1.0}, + {int32(1), 1.0}, + {int64(1), 1.0}, + {uint8(1), 1.0}, + {uint16(1), 1.0}, + {uint32(1), 1.0}, + {uint64(1), 1.0}, + {float32(1.5), 1.5}, + {float64(1.5), 1.5}, + {true, 1.0}, + {false, 0.0}, + } + + for _, tt := range tests { + res := i2float(tt.value) + assert.Equal(t, tt.expected, res) + } +} + +func Test_i2float_panic(t *testing.T) { + defer func() { + if r := recover(); r == nil { + t.Errorf("Expected panic for unexpected type, but did not panic") + } + }() + + i2float("unexpected type") +} + +func Test_getRoleStr(t *testing.T) { + tests := []struct { + value float64 + expected string + }{ + {0, "offline"}, + {99.5, "follower"}, + {100, "follower"}, + {100.4, "follower"}, + {100.5, "candidate"}, + {101, "candidate"}, + {101.4, "candidate"}, + {101.5, "leader"}, + {102, "leader"}, + {102.4, "leader"}, + {102.5, "error"}, + {103, "error"}, + {104, "learner"}, + {99.4, "unknown"}, + {105, "unknown"}, + {-1, "unknown"}, + {150, "unknown"}, + } + + for _, tt := range tests { + res := getRoleStr(tt.value) + assert.Equal(t, tt.expected, res) + } +} + +func Test_getStatusStr(t *testing.T) { + tests := []struct { + value float64 + expected string + }{ + {-0.4, "offline"}, + {0, "offline"}, + {0.4, "offline"}, + {0.5, "ready"}, + {1, "ready"}, + {1.4, "ready"}, + {1.5, "unknown"}, + {2, "unknown"}, + {-0.5, "unknown"}, + {-1, "unknown"}, + } + + for _, tt := range tests { + res := getStatusStr(tt.value) + assert.Equal(t, tt.expected, res) + } +} diff --git a/tools/keeper/system/program_test.go b/tools/keeper/system/program_test.go index eabc4fff35..63fbb63014 100644 --- a/tools/keeper/system/program_test.go +++ b/tools/keeper/system/program_test.go @@ -3,15 +3,18 @@ package system import ( "context" "fmt" + "net/http" "testing" + "time" + "github.com/kardianos/service" "github.com/stretchr/testify/assert" "github.com/taosdata/taoskeeper/db" "github.com/taosdata/taoskeeper/infrastructure/config" "github.com/taosdata/taoskeeper/util" ) -func TestStart(t *testing.T) { +func TestInit(t *testing.T) { server := Init() assert.NotNil(t, server) @@ -20,3 +23,23 @@ func TestStart(t *testing.T) { conn.Query(context.Background(), fmt.Sprintf("drop database if exists %s", config.Conf.Metrics.Database.Name), util.GetQidOwn()) conn.Query(context.Background(), fmt.Sprintf("drop database if exists %s", config.Conf.Audit.Database.Name), util.GetQidOwn()) } + +func Test_program(t *testing.T) { + server := &http.Server{} + prg := newProgram(server) + svcConfig := &service.Config{ + Name: "taoskeeper", + DisplayName: "taoskeeper", + Description: "taosKeeper is a tool for TDengine that exports monitoring metrics", + } + svc, err := service.New(prg, svcConfig) + assert.NoError(t, err) + + err = prg.Start(svc) + assert.NoError(t, err) + + time.Sleep(100 * time.Millisecond) + + err = prg.Stop(svc) + assert.NoError(t, err) +}