diff --git a/alert/app/rule.go b/alert/app/rule.go index e318edab2ac830b13b496930e8339031eccccc69..1233aeb52627fd92ecabf4f25b854e2e803c3ac8 100644 --- a/alert/app/rule.go +++ b/alert/app/rule.go @@ -96,6 +96,7 @@ func (alert *Alert) doRefresh(firing bool, rule *Rule) bool { case (!firing) && (alert.State == AlertStateFiring): alert.State = AlertStateWaiting alert.EndsAt = time.Now() + return false case firing && (alert.State == AlertStateWaiting): alert.StartsAt = time.Now() diff --git a/documentation20/cn/02.getting-started/01.docker/docs.md b/documentation20/cn/02.getting-started/01.docker/docs.md index 5a9869c60dbbc45681ba0b89d5f02e86a8e7292b..be582aeec345f683836f3f2740cafa99a3dd990a 100644 --- a/documentation20/cn/02.getting-started/01.docker/docs.md +++ b/documentation20/cn/02.getting-started/01.docker/docs.md @@ -121,7 +121,7 @@ TDengine RESTful 接口详情请参考[官方文档](https://www.taosdata.com/cn ### 使用 Docker 容器运行 TDengine server 和 taosAdapter -在 TDegnine 2.4.0.0 之后版本的 Docker 容器,开始提供一个独立运行的组件 taosAdapter,代替之前版本 TDengine 中 taosd 进程中内置的 http server。taosAdapter 支持通过 RESTful 接口对 TDengine server 的数据写入和查询能力,并提供和 InfluxDB/OpenTSDB 兼容的数据摄取接口,允许 InfluxDB/OpenTSDB 应用程序无缝移植到 TDengine。在新版本 Docker 镜像中,默认启用了 taosAdapter,也可以使用 docker run 命令中设置 TAOS_DISABLE_ADAPTER=true 来禁用 taosAdapter;也可以在 docker run 命令中单独使用taosAdapter,而不运行 taosd 。 +在 TDengine 2.4.0.0 之后版本的 Docker 容器,开始提供一个独立运行的组件 taosAdapter,代替之前版本 TDengine 中 taosd 进程中内置的 http server。taosAdapter 支持通过 RESTful 接口对 TDengine server 的数据写入和查询能力,并提供和 InfluxDB/OpenTSDB 兼容的数据摄取接口,允许 InfluxDB/OpenTSDB 应用程序无缝移植到 TDengine。在新版本 Docker 镜像中,默认启用了 taosAdapter,也可以使用 docker run 命令中设置 TAOS_DISABLE_ADAPTER=true 来禁用 taosAdapter;也可以在 docker run 命令中单独使用taosAdapter,而不运行 taosd 。 注意:如果容器中运行 taosAdapter,需要根据需要映射其他端口,具体端口默认配置和修改方法请参考[taosAdapter文档](https://github.com/taosdata/taosadapter/blob/develop/README-CN.md)。 @@ -227,7 +227,7 @@ taos> - **查看数据库。** ```bash -$ taos> show databases; +$ taos> SHOW DATABASES; name | created_time | ntables | vgroups | ··· test | 2021-08-18 06:01:11.021 | 10000 | 6 | ··· log | 2021-08-18 05:51:51.065 | 4 | 1 | ··· @@ -240,7 +240,7 @@ $ taos> show databases; $ taos> use test; Database changed. -$ taos> show stables; +$ taos> SHOW STABLES; name | created_time | columns | tags | tables | ============================================================================================ meters | 2021-08-18 06:01:11.116 | 4 | 2 | 10000 | @@ -251,10 +251,7 @@ Query OK, 1 row(s) in set (0.003259s) - **查看表,限制输出十条。** ```bash -$ taos> select * from test.t0 limit 10; - -DB error: Table does not exist (0.002857s) -taos> select * from test.d0 limit 10; +taos> SELECT * FROM test.d0 LIMIT 10; ts | current | voltage | phase | ====================================================================================== 2017-07-14 10:40:00.000 | 10.12072 | 223 | 0.34167 | @@ -274,7 +271,7 @@ Query OK, 10 row(s) in set (0.016791s) - **查看 d0 表的标签值。** ```bash -$ taos> select groupid, location from test.d0; +$ taos> SELECT groupid, location FROM test.d0; groupid | location | ================================= 0 | shanghai | @@ -292,7 +289,7 @@ echo "foo:1|c" | nc -u -w0 127.0.0.1 6044 然后可以使用 taos shell 查询 taosAdapter 自动创建的数据库 statsd 和 超级表 foo 中的内容: ``` -taos> show databases; +taos> SHOW DATABASES; name | created_time | ntables | vgroups | replica | quorum | days | keep | cache(MB) | blocks | minrows | maxrows | wallevel | fsync | comp | cachelast | precision | update | status | ==================================================================================================================================================================================================================================================================================== log | 2021-12-28 09:18:55.765 | 12 | 1 | 1 | 1 | 10 | 30 | 1 | 3 | 100 | 4096 | 1 | 3000 | 2 | 0 | us | 0 | ready | @@ -302,13 +299,13 @@ Query OK, 2 row(s) in set (0.002112s) taos> use statsd; Database changed. -taos> show stables; +taos> SHOW STABLES; name | created_time | columns | tags | tables | ============================================================================================ foo | 2021-12-28 09:21:48.894 | 2 | 1 | 1 | Query OK, 1 row(s) in set (0.001160s) -taos> select * from foo; +taos> SELECT * FROM foo; ts | value | metric_type | ======================================================================================= 2021-12-28 09:21:48.840820836 | 1 | counter | diff --git a/documentation20/cn/12.taos-sql/docs.md b/documentation20/cn/12.taos-sql/docs.md index cf0e011214fbb4d3c5fabaa8316b13cfb15123d5..8308f4c40770aea49eeef631efef9a6c7a486803 100755 --- a/documentation20/cn/12.taos-sql/docs.md +++ b/documentation20/cn/12.taos-sql/docs.md @@ -801,21 +801,54 @@ Query OK, 1 row(s) in set (0.001091s) 6. 从 2.1.4.0 版本开始,条件过滤开始支持 IN 算子,例如 `WHERE city IN ('Beijing', 'Shanghai')`。说明:BOOL 类型写作 `{true, false}` 或 `{0, 1}` 均可,但不能写作 0、1 之外的整数;FLOAT 和 DOUBLE 类型会受到浮点数精度影响,集合内的值在精度范围内认为和数据行的值完全相等才能匹配成功;TIMESTAMP 类型支持非主键的列。 -7. 从2.3.0.0版本开始,条件过滤开始支持正则表达式,关键字match/nmatch,不区分大小写。 +7. 从2.3.0.0版本开始,条件过滤开始支持正则表达式,关键字 match/nmatch 不区分大小写。 **语法** - WHERE (column|tbname) **match/MATCH/nmatch/NMATCH** *regex* + WHERE (tag|tbname) **match/MATCH/nmatch/NMATCH** *regex* + + match/MATCH 匹配正则表达式 + + nmatch/NMATCH 不匹配正则表达式 **正则表达式规范** 确保使用的正则表达式符合POSIX的规范,具体规范内容可参见[Regular Expressions](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html) + **正则表达使用示例** + + ```sql + taos> select distinct location from meters; + location | + =================== + beijing | + shanghai | + Query OK, 2 row(s) in set (0.003513s) + + taos> select count(*) from meters; + count(*) | + ======================== + 100000 | + Query OK, 1 row(s) in set (0.015054s) + + taos> select count(*) from meters where location match '^b'; + count(*) | + ======================== + 48000 | + Query OK, 1 row(s) in set (0.006977s) + + taos> select count(*) from meters where location nmatch '^b'; + count(*) | + ======================== + 52000 | + Query OK, 1 row(s) in set (0.008188s) + ``` + **使用限制** 只能针对表名(即 tbname 筛选)、binary/nchar类型标签值进行正则表达式过滤,不支持普通列的过滤。 - 正则匹配字符串长度不能超过 128 字节。可以通过参数 *maxRegexStringLen* 设置和调整最大允许的正则匹配字符串,该参数是客户端配置参数,需要重启才能生效。 + 正则匹配字符串长度不能超过 128 字节。可以通过参数 *maxRegexStringLen* 设置和调整最大允许的正则匹配字符串,该参数是客户端配置参数,需要重启客户端才能生效。 @@ -1094,7 +1127,7 @@ TDengine支持针对数据的聚合查询。提供支持的聚合和选择函数 应用字段:适合于除时间主列外的任何类型字段。 - 适用于:**表**。 + 说明:由于返回数据量未知,考虑到内存因素,为了函数可以正常返回结果,建议不重复的数据量在10万级别,否则会报错。 示例: ```mysql @@ -1118,7 +1151,9 @@ TDengine支持针对数据的聚合查询。提供支持的聚合和选择函数 ```mysql SELECT HYPERLOGLOG(field_name) FROM { tb_name | stb_name } [WHERE clause]; ``` - 功能说明:采用hyperloglog算法,返回某列的基数。该算法在数据量很大的情况下,可以明显降低内存的占用,但是求出来的基数是个估算值,标准误差为0.81%。 + 功能说明: + - 采用hyperloglog算法,返回某列的基数。该算法在数据量很大的情况下,可以明显降低内存的占用,但是求出来的基数是个估算值,标准误差(标准误差是多次实验,每次的平均数的标准差,不是与真实结果的误差)为0.81%。 + - 在数据量较少的时候该算法不是很准确,可以使用select count(data) from (select unique(col) as data from table) 的方法。 返回结果类型:整形。 @@ -1596,7 +1631,9 @@ TDengine支持针对数据的聚合查询。提供支持的聚合和选择函数 支持版本:2.6.0.x 之后的版本。 - 说明:该函数可以应用在普通表和超级表上。不能和窗口操作一起使用,例如 interval/state_window/session_window 。 + 说明: + - 该函数可以应用在普通表和超级表上。不能和窗口操作一起使用,例如 interval/state_window/session_window 。 + - 由于返回数据量未知,考虑到内存因素,为了函数可以正常返回结果,建议不重复的数据量在10万级别,否则会报错。 示例: ```mysql @@ -1628,9 +1665,9 @@ TDengine支持针对数据的聚合查询。提供支持的聚合和选择函数 - **DIFF** ```mysql - SELECT DIFF(field_name) FROM tb_name [WHERE clause]; + SELECT {DIFF(field_name, ignore_negative) | DIFF(field_name)} FROM tb_name [WHERE clause]; ``` - 功能说明:统计表中某列的值与前一行对应值的差。 + 功能说明:统计表中某列的值与前一行对应值的差。 ignore_negative 取值为 0|1 , 可以不填,默认值为 0. 不忽略负值。ignore_negative为1时表示忽略负数。 返回结果数据类型:同应用字段。 @@ -1638,7 +1675,7 @@ TDengine支持针对数据的聚合查询。提供支持的聚合和选择函数 适用于:**表、(超级表)**。 - 说明:输出结果行数是范围内总行数减一,第一行没有结果输出。从 2.1.3.0 版本开始,DIFF 函数可以在由 GROUP BY 划分出单独时间线的情况下用于超级表(也即 GROUP BY tbname)。 + 说明:输出结果行数是范围内总行数减一,第一行没有结果输出。从 2.1.3.0 版本开始,DIFF 函数可以在由 GROUP BY 划分出单独时间线的情况下用于超级表(也即 GROUP BY tbname)。从2.6.0开始,DIFF函数支持ignore_negative参数 示例: ```mysql @@ -1722,7 +1759,7 @@ TDengine支持针对数据的聚合查询。提供支持的聚合和选择函数 支持 +、-、*、/ 运算,如 ceil(col1) + ceil(col2)。 只能与普通列,选择(Selection)、投影(Projection)函数一起使用,不能与聚合(Aggregation)函数一起使用。 该函数可以应用在普通表和超级表上。 - + - **FLOOR** ```mysql SELECT FLOOR(field_name) FROM { tb_name | stb_name } [WHERE clause]; @@ -1737,6 +1774,381 @@ TDengine支持针对数据的聚合查询。提供支持的聚合和选择函数 功能说明:获得指定列的四舍五入的结果。 其他使用说明参见CEIL函数描述。 +- **ASIN** + ```mysql + SELECT ASIN(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:获得指定列的反正弦结果 + + 返回结果类型:DOUBLE。如果输入值为NULL,输出值也为NULL + + 适用数据类型:不能应用在 timestamp、binary、nchar、bool 类型字段上;在超级表查询中使用时,不能应用在 tag 列 + + 嵌套子查询支持:适用于内层查询和外层查询。 + + 使用说明: + + 只能与普通列,选择(Selection)、投影(Projection)函数一起使用,不能与聚合(Aggregation)函数一起使用。 + + 该函数可以应用在普通表和超级表上。 + +- **ACOS** + ```mysql + SELECT ACOS(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:获得指定列的反余弦结果 + + 返回结果类型:DOUBLE。如果输入值为NULL,输出值也为NULL + + 适用数据类型:不能应用在 timestamp、binary、nchar、bool 类型字段上;在超级表查询中使用时,不能应用在 tag 列 + + 嵌套子查询支持:适用于内层查询和外层查询。 + + 使用说明: + + 只能与普通列,选择(Selection)、投影(Projection)函数一起使用,不能与聚合(Aggregation)函数一起使用。 + + 该函数可以应用在普通表和超级表上。 + +- **ATAN** + ```mysql + SELECT ATAN(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:获得指定列的反正切结果 + + 返回结果类型:DOUBLE。如果输入值为NULL,输出值也为NULL + + 适用数据类型:不能应用在 timestamp、binary、nchar、bool 类型字段上;在超级表查询中使用时,不能应用在 tag 列 + + 嵌套子查询支持:适用于内层查询和外层查询。 + + 使用说明: + + 只能与普通列,选择(Selection)、投影(Projection)函数一起使用,不能与聚合(Aggregation)函数一起使用。 + + 该函数可以应用在普通表和超级表上。 + + 版本2.6.0.x后支持 + +- **SIN** + ```mysql + SELECT SIN(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:获得指定列的正弦结果 + + 返回结果类型:DOUBLE。如果输入值为NULL,输出值也为NULL + + 适用数据类型:不能应用在 timestamp、binary、nchar、bool 类型字段上;在超级表查询中使用时,不能应用在 tag 列 + + 嵌套子查询支持:适用于内层查询和外层查询。 + + 使用说明: + + 只能与普通列,选择(Selection)、投影(Projection)函数一起使用,不能与聚合(Aggregation)函数一起使用。 + + 该函数可以应用在普通表和超级表上。 + + 版本2.6.0.x后支持 + +- **COS** + ```mysql + SELECT COS(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:获得指定列的余弦结果 + + 返回结果类型:DOUBLE。如果输入值为NULL,输出值也为NULL + + 适用数据类型:不能应用在 timestamp、binary、nchar、bool 类型字段上;在超级表查询中使用时,不能应用在 tag 列 + + 嵌套子查询支持:适用于内层查询和外层查询。 + + 使用说明: + + 只能与普通列,选择(Selection)、投影(Projection)函数一起使用,不能与聚合(Aggregation)函数一起使用。 + + 该函数可以应用在普通表和超级表上。 + + 版本2.6.0.x后支持 + +- **TAN** + ```mysql + SELECT TAN(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:获得指定列的正切结果 + + 返回结果类型:DOUBLE。如果输入值为NULL,输出值也为NULL + + 适用数据类型:不能应用在 timestamp、binary、nchar、bool 类型字段上;在超级表查询中使用时,不能应用在 tag 列 + + 嵌套子查询支持:适用于内层查询和外层查询。 + + 使用说明: + + 只能与普通列,选择(Selection)、投影(Projection)函数一起使用,不能与聚合(Aggregation)函数一起使用。 + + 该函数可以应用在普通表和超级表上。 + + 版本2.6.0.x后支持 + +- **POW** + ```mysql + SELECT POW(field_name, power) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:获得指定列的指数为power的幂 + + 返回结果类型:DOUBLE。如果输入值为NULL,输出值也为NULL + + 适用数据类型:不能应用在 timestamp、binary、nchar、bool 类型字段上;在超级表查询中使用时,不能应用在 tag 列 + + 嵌套子查询支持:适用于内层查询和外层查询。 + + 使用说明: + + 只能与普通列,选择(Selection)、投影(Projection)函数一起使用,不能与聚合(Aggregation)函数一起使用。 + + 该函数可以应用在普通表和超级表上。 + + 版本2.6.0.x后支持 + +- **LOG** + ```mysql + SELECT LOG(field_name, base) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:获得指定列对于底数base的对数 + + 返回结果类型:DOUBLE。如果输入值为NULL,输出值也为NULL + + 适用数据类型:不能应用在 timestamp、binary、nchar、bool 类型字段上;在超级表查询中使用时,不能应用在 tag 列 + + 嵌套子查询支持:适用于内层查询和外层查询。 + + 使用说明: + + 只能与普通列,选择(Selection)、投影(Projection)函数一起使用,不能与聚合(Aggregation)函数一起使用。 + + 该函数可以应用在普通表和超级表上。 + + 版本2.6.0.x后支持 + +- **ABS** + ```mysql + SELECT ABS(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:获得指定列的绝对值 + + 返回结果类型:如果输入值为整数,输出值是UBIGINT类型。如果输入值是FLOAT/DOUBLE数据类型,输出值是DOUBLE数据类型。 + + 适用数据类型:不能应用在 timestamp、binary、nchar、bool 类型字段上;在超级表查询中使用时,不能应用在 tag 列 + + 嵌套子查询支持:适用于内层查询和外层查询。 + + 使用说明: + + 只能与普通列,选择(Selection)、投影(Projection)函数一起使用,不能与聚合(Aggregation)函数一起使用。 + + 该函数可以应用在普通表和超级表上。 + + 版本2.6.0.x后支持 + +- **SQRT** + ```mysql + SELECT SQRT(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:获得指定列的平方根 + + 返回结果类型:DOUBLE。如果输入值为NULL,输出值也为NULL + + 适用数据类型:不能应用在 timestamp、binary、nchar、bool 类型字段上;在超级表查询中使用时,不能应用在 tag 列 + + 嵌套子查询支持:适用于内层查询和外层查询。 + + 使用说明: + + 只能与普通列,选择(Selection)、投影(Projection)函数一起使用,不能与聚合(Aggregation)函数一起使用。 + + 该函数可以应用在普通表和超级表上。 + + 版本2.6.0.x后支持 + +- **CAST** + ```mysql + SELECT CAST(expression AS type_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:数据类型转换函数,输入参数expression支持普通列、常量、标量函数及它们之间的四则运算,不支持tag列,只适用于select子句中。 + + 返回结果类型:CAST中指定的类型(type_name)。 + + 适用数据类型:输入参数expression的类型可以是除JSON外目前所有类型字段(BOOL/TINYINT/SMALLINT/INT/BIGINT/FLOAT/DOUBLE/BINARY(M)/TIMESTAMP/NCHAR(M)/TINYINT UNSIGNED/SMALLINT UNSIGNED/INT UNSIGNED/BIGINT UNSIGNED); 输出目标类型只支持BIGINT/BINARY(N)/TIMESTAMP/NCHAR(N)/BIGINT UNSIGNED。 + + 说明: + + 对于不能支持的类型转换会直接报错。 + + 如果输入值为NULL则输出值也为NULL。 + + 对于类型支持但某些值无法正确转换的情况对应的转换后的值以转换函数输出为准。目前可能遇到的几种情况: + 1)BINARY/NCHAR转BIGINT/BIGINT UNSIGNED时可能出现的无效字符情况,例如"a"可能转为0。 + 2)有符号数或TIMESTAMP转BIGINT UNSIGNED可能遇到的溢出问题。 + 3)BIGINT UNSIGNED转BIGINT可能遇到的溢出问题。 + 4)FLOAT/DOUBLE转BIGINT/BIGINT UNSIGNED可能遇到的溢出问题。 + 版本2.6.0.x后支持 + +- **CONCAT** + ```mysql + SELECT CONCAT(str1|column1, str2|column2, ...) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:字符串连接函数。 + + 返回结果类型:同输入参数类型,BINARY或者NCHAR。 + + 适用数据类型:输入参数或者全部是BINARY格式的字符串或者列,或者全部是NCHAR格式的字符串或者列。不能应用在TAG列。 + + 说明: + + 如果输入值为NULL,输出值为NULL。 + 该函数最小参数个数为2个,最大参数个数为8个。 + 该函数可以应用在普通表和超级表上。 + 该函数适用于内层查询和外层查询。 + 版本2.6.0.x后支持 + +- **CONCAT_WS** + ``` + SELECT CONCAT_WS(separator, str1|column1, str2|column2, ...) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:带分隔符的字符串连接函数。 + + 返回结果类型:同输入参数类型,BINARY或者NCHAR。 + + 适用数据类型:输入参数或者全部是BINARY格式的字符串或者列,或者全部是NCHAR格式的字符串或者列。不能应用在TAG列。 + + 说明: + + 如果separator值为NULL,输出值为NULL。如果separator值不为NULL,其他输入为NULL,输出为空串 + 该函数最小参数个数为3个,最大参数个数为9个。 + 该函数可以应用在普通表和超级表上。 + 该函数适用于内层查询和外层查询。 + 版本2.6.0.x后支持 + +- **LENGTH** + ``` + SELECT LENGTH(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:以字节计数的字符串长度。 + + 返回结果类型:INT。 + + 适用数据类型:输入参数是BINARY类型或者NCHAR类型的字符串或者列。不能应用在TAG列。 + + 说明: + + 如果输入值为NULL,输出值为NULL。 + 该函数可以应用在普通表和超级表上。 + 该函数适用于内层查询和外层查询。 + 版本2.6.0.x后支持 + +- **CHAR_LENGTH** + ``` + SELECT CHAR_LENGTH(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:以字符计数的字符串长度。 + + 返回结果类型:INT。 + + 适用数据类型:输入参数是BINARY类型或者NCHAR类型的字符串或者列。不能应用在TAG列。 + + 说明: + + 如果输入值为NULL,输出值为NULL。 + 该函数可以应用在普通表和超级表上。 + 该函数适用于内层查询和外层查询。 + 版本2.6.0.x后支持 + +- **LOWER** + ``` + SELECT LOWER(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:将字符串参数值转换为全小写字母。 + + 返回结果类型:同输入类型。 + + 适用数据类型:输入参数是BINARY类型或者NCHAR类型的字符串或者列。不能应用在TAG列。 + + 说明: + + 如果输入值为NULL,输出值为NULL。 + 该函数可以应用在普通表和超级表上。 + 该函数适用于内层查询和外层查询。 + 版本2.6.0.x后支持 + +- **UPPER** + ``` + SELECT UPPER(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:将字符串参数值转换为全大写字母。 + + 返回结果类型:同输入类型。 + + 适用数据类型:输入参数是BINARY类型或者NCHAR类型的字符串或者列。不能应用在TAG列。 + + 说明: + + 如果输入值为NULL,输出值为NULL。 + 该函数可以应用在普通表和超级表上。 + 该函数适用于内层查询和外层查询。 + 版本2.6.0.x后支持 + +- **LTRIM** + ``` + SELECT LTRIM(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:返回清除左边空格后的字符串。 + + 返回结果类型:同输入类型。 + + 适用数据类型:输入参数是BINARY类型或者NCHAR类型的字符串或者列。不能应用在TAG列。 + + 说明: + + 如果输入值为NULL,输出值为NULL。 + 该函数可以应用在普通表和超级表上。 + 该函数适用于内层查询和外层查询。 + 版本2.6.0.x后支持 + +- **RTRIM** + ``` + SELECT RTRIM(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:返回清除右边空格后的字符串。 + + 返回结果类型:同输入类型。 + + 适用数据类型:输入参数是BINARY类型或者NCHAR类型的字符串或者列。不能应用在TAG列。 + + 说明: + + 如果输入值为NULL,输出值为NULL。 + 该函数可以应用在普通表和超级表上。 + 该函数适用于内层查询和外层查询。 + 版本2.6.0.x后支持 + +- **SUBSTR** + ``` + SELECT SUBSTR(str,pos[,len]) FROM { tb_name | stb_name } [WHERE clause] + ``` + 功能说明:从源字符串str中的指定位置pos开始取一个长度为len的子串并返回。 + + 返回结果类型:同输入类型。 + + 适用数据类型:输入参数是BINARY类型或者NCHAR类型的字符串或者列。不能应用在TAG列。 + + 说明: + + 如果输入值为NULL,输出值为NULL。 + 输入参数pos可以为正数,也可以为负数。如果pos是正数,表示从开始往后抽取子串。如果pos为负数,表示从结尾往前抽取字符串。如果输入参数len被忽略,返回的子串包含从pos开始的整个字串。 + 该函数可以应用在普通表和超级表上。 + 该函数适用于内层查询和外层查询。 + 版本2.6.0.x后支持 + - **四则运算** ```mysql diff --git a/documentation20/cn/14.devops/03.immigrate/docs.md b/documentation20/cn/14.devops/03.immigrate/docs.md index bff4d4a7137a3bcb2b0ec0dec891c7a584d9df0a..21f9aa9053e598774710069f5a1d2354da742858 100644 --- a/documentation20/cn/14.devops/03.immigrate/docs.md +++ b/documentation20/cn/14.devops/03.immigrate/docs.md @@ -118,8 +118,8 @@ TDengine 当前只支持 Grafana 的可视化看板呈现,所以如果你的 | 序号 | 测量(metric) | 值名称 | 类型 | tag1 | tag2 | tag3 | tag4 | tag5 | | ---- | -------------- | ------ | ------ | ---- | ----------- | -------------------- | --------- | ------ | -| 1 | memory | value | double | host | memory_type | memory_type_instance | source | n/a | -| 2 | swap | value | double | host | swap_type | swap_type_instance | source | n/a | +| 1 | memory | value | double | host | memory_type | memory_type_instance | source | n/a | +| 2 | swap | value | double | host | swap_type | swap_type_instance | source | n/a | | 3 | disk | value | double | host | disk_point | disk_instance | disk_type | source | TDengine 要求存储的数据具有数据模式,即写入数据之前需创建超级表并指定超级表的模式。对于数据模式的建立,你有两种方式来完成此项工作:1)充分利用 TDengine 对 OpenTSDB 的数据原生写入的支持,调用 TDengine 提供的 API 将(文本行或 JSON 格式)数据写入,并自动化地建立单值模型。采用这种方式不需要对数据写入应用进行较大的调整,也不需要对写入的数据格式进行转换。 @@ -198,7 +198,7 @@ DataX 具体的使用方式及如何使用 DataX 将数据写入 TDengine 请参 2)在系统全负载运行下,如果有足够的剩余计算和 IO 资源,可以建立多线程的导入机制,最大限度地提升数据迁移的效率。考虑到数据解析对于 CPU 带来的巨大负载,需要控制最大的并行任务数量,以避免因导入历史数据而触发的系统整体过载。 -由于 TDegnine 本身操作简易性,所以不需要在整个过程中进行索引维护、数据格式的变化处理等工作,整个过程只需要顺序执行即可。 +由于 TDengine 本身操作简易性,所以不需要在整个过程中进行索引维护、数据格式的变化处理等工作,整个过程只需要顺序执行即可。 当历史数据完全导入到 TDengine 以后,此时两个系统处于同时运行的状态,之后便可以将查询请求切换到 TDengine 上,从而实现无缝的应用切换。 diff --git a/documentation20/en/02.getting-started/01.docker/docs.md b/documentation20/en/02.getting-started/01.docker/docs.md index bd5fd3167b8d3fb5f11a9e6c0ea6e709be99a2d3..65a7abcedbecc69087c1a0a4f2d050b03aaed8f5 100644 --- a/documentation20/en/02.getting-started/01.docker/docs.md +++ b/documentation20/en/02.getting-started/01.docker/docs.md @@ -197,7 +197,7 @@ column[0]:FLOAT column[1]:INT column[2]:FLOAT Press enter key to continue or Ctrl-C to stop ``` -After enter, this command will automatically create a super table `meters` under the database test, there are 10,000 tables under this super table, the table name is "d0" to "d9999", each table has 10,000 records, each record has four fields (ts, current, voltage, phase), the time stamp is from "2017-07-14 10:40:00 000" to "2017-07-14 10:40:09 999", each table has a tag location and groupId, groupId is set from 1 to 10 and location is set to "beijing" or "shanghai". +After enter, this command will automatically create a super table `meters` under the database test, there are 10,000 tables under this super table, the table name is "d0" to "d9999", each table has 10,000 records, each record has four fields (ts, current, voltage, phase), the time stamp is from "2017-07-14 10:40:00 000" to "2017-07-14 10:40:09 999", each table has a tag location and groupid, groupid is set from 1 to 10 and location is set to "beijing" or "shanghai". It takes about a few minutes to execute this command and ends up inserting a total of 100 million records. @@ -217,7 +217,7 @@ taos> - **View the database.** ```bash -$ taos> show databases; +$ taos> SHOW DATABASES; name | created_time | ntables | vgroups | ··· test | 2021-08-18 06:01:11.021 | 10000 | 6 | ··· log | 2021-08-18 05:51:51.065 | 4 | 1 | ··· @@ -227,10 +227,10 @@ $ taos> show databases; - **View Super Tables.** ```bash -$ taos> use test; +$ taos> USE test; Database changed. -$ taos> show stables; +$ taos> SHOW STABLES; name | created_time | columns | tags | tables | ============================================================================================ meters | 2021-08-18 06:01:11.116 | 4 | 2 | 10000 | @@ -241,10 +241,7 @@ Query OK, 1 row(s) in set (0.003259s) - **View the table and limit the output to 10 entries.** ```bash -$ taos> select * from test.t0 limit 10; - -DB error: Table does not exist (0.002857s) -taos> select * from test.d0 limit 10; +taos> SELECT * FROM test.d0 LIMIT 10; ts | current | voltage | phase | ====================================================================================== 2017-07-14 10:40:00.000 | 10.12072 | 223 | 0.34167 | @@ -264,7 +261,7 @@ Query OK, 10 row(s) in set (0.016791s) - **View the tag values for the d0 table.** ```bash -$ taos> select groupid, location from test.d0; +$ taos> SELECT groupid, location FROM test.d0; groupid | location | ================================= 0 | shanghai | @@ -283,23 +280,23 @@ echo "foo:1|c" | nc -u -w0 127.0.0.1 6044 Then you can use the taos shell to query the taosAdapter automatically created database statsd and the contents of the super table foo. ``` -taos> show databases; +taos> SHOW DATABASES; name | created_time | ntables | vgroups | replica | quorum | days | keep | cache(MB) | blocks | minrows | maxrows | wallevel | fsync | comp | cachelast | precision | update | status | ==================================================================================================================================================================================================================================================================================== log | 2021-12-28 09:18:55.765 | 12 | 1 | 1 | 1 | 10 | 30 | 1 | 3 | 100 | 4096 | 1 | 3000 | 2 | 0 | us | 0 | ready | statsd | 2021-12-28 09:21:48.841 | 1 | 1 | 1 | 1 | 10 | 3650 | 16 | 6 | 100 | 4096 | 1 | 3000 | 2 | 0 | ns | 2 | ready | Query OK, 2 row(s) in set (0.002112s) -taos> use statsd; +taos> USE statsd; Database changed. -taos> show stables; +taos> SHOW STABLES; name | created_time | columns | tags | tables | ============================================================================================ foo | 2021-12-28 09:21:48.894 | 2 | 1 | 1 | Query OK, 1 row(s) in set (0.001160s) -taos> select * from foo; +taos> SELECT * FROM foo; ts | value | metric_type | ======================================================================================= 2021-12-28 09:21:48.840820836 | 1 | counter | diff --git a/documentation20/en/08.connector/docs.md b/documentation20/en/08.connector/docs.md index fccd0c70361f804189b8f44072ba78c9f8626bbc..be6c675246824ab52b7d3fe4e68cd3c3fad897be 100644 --- a/documentation20/en/08.connector/docs.md +++ b/documentation20/en/08.connector/docs.md @@ -570,13 +570,15 @@ for row in results: - Write data ```python + import taos import datetime - + conn = taos.connect() + c1 = conn.cursor() # Create a database - c1.execute('create database db') - c1.execute('use db') + c1.execute('create database if not exists db1') + c1.execute('use db1') # Create a table - c1.execute('create table tb (ts timestamp, temperature int, humidity float)') + c1.execute('create table if not exists tb (ts timestamp, temperature int, humidity float)') # Insert data start_time = datetime.datetime(2019, 11, 1) affected_rows = c1.execute('insert into tb values (\'%s\', 0, 0.0)' %start_time) @@ -584,9 +586,11 @@ for row in results: time_interval = datetime.timedelta(seconds=60) sqlcmd = ['insert into tb values'] for irow in range(1,11): - start_time += time_interval - sqlcmd.append('(\'%s\', %d, %f)' %(start_time, irow, irow*1.2)) - affected_rows = c1.execute(' '.join(sqlcmd)) + start_time += time_interval + sqlcmd.append('(\'%s\', %d, %f)' %(start_time, irow, irow*1.2)) + affected_rows += c1.execute(' '.join(sqlcmd)) + + print("inserted %s records" % affected_rows) ``` - Query data @@ -599,12 +603,12 @@ for row in results: numOfRows = c1.rowcount numOfCols = len(c1.description) for irow in range(numOfRows): - print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2])) + print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2])) # Use cursor loop directly to pull query result c1.execute('select * from tb') for data in c1: - print("ts=%s, temperature=%d, humidity=%f" %(data[0], data[1],data[2])) + print("ts=%s, temperature=%d, humidity=%f" %(data[0], data[1],data[2])) ``` #### Query API diff --git a/documentation20/en/12.taos-sql/docs.md b/documentation20/en/12.taos-sql/docs.md index 9a68e071782bce8ac17768c01a4d7d0823538598..57befc09d1379dffb8b22d821db3e2da0d61193d 100755 --- a/documentation20/en/12.taos-sql/docs.md +++ b/documentation20/en/12.taos-sql/docs.md @@ -863,7 +863,9 @@ TDengine supports aggregations over data, they are listed below: Applicable Fields: All types except timestamp. Supported version: Version after 2.6.0 . - + + Note: Since the amount of returned data is unknown, considering the memory factor, in order to return the result normally, it is recommended that the amount of non repeated data is 100000, otherwise an error will be reported. + Example: ```mysql taos> select voltage from d002; @@ -886,7 +888,9 @@ TDengine supports aggregations over data, they are listed below: ```mysql SELECT HYPERLOGLOG(field_name) FROM { tb_name | stb_name } [WHERE clause]; ``` - Function: The hyperloglog algorithm is used to return the cardinality of a column. In the case of large amount of data, the algorithm can significantly reduce the occupation of memory, but the cardinality is an estimated value, and the standard error is 0.81%. + Function: + - The hyperloglog algorithm is used to return the cardinality of a column. In the case of large amount of data, the algorithm can significantly reduce the occupation of memory, but the cardinality is an estimated value, and the standard error(the standard error is the standard deviation of the average of multiple experiments, not the error with the real result) is 0.81%. + - When the amount of data is small, the algorithm is not very accurate. You can use the method like this: select count(data) from (select unique(col) as data from table). Return Data Type:Integer. @@ -1215,8 +1219,10 @@ TDengine supports aggregations over data, they are listed below: Supported version: Version after 2.6.0 . - Note: This function can be applied to ordinary tables and super tables. Cannot be used with window operations,such as interval/state_window/session_window. - + Note: + - This function can be applied to ordinary tables and super tables. Cannot be used with window operations,such as interval/state_window/session_window. + - Since the amount of returned data is unknown, considering the memory factor, in order to return the result normally, it is recommended that the amount of non repeated data is 100000, otherwise an error will be reported. + Example: ```mysql taos> select ts,voltage from unique1; @@ -1296,6 +1302,412 @@ TDengine supports aggregations over data, they are listed below: Query OK, 1 row(s) in set (0.000836s) ``` +- **ASIN** + ```mysql + SELECT ASIN(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the arc-sine of the input value. + + Output Data Type: DOUBLE. + + Input: applies to value of all types except timestamp, binary, nchar, and bool. Can not apply to tag column of super table. + + Embedded Query Support: Both Outer Query and Inner Query + + Notes: + + If input value is NULL, the output value is NULL. + + It is a scalar function and can not be used together with aggregate function + + Applies to columns of normal table, child table and super table + + Supported after version 2.6.0.x + + +- **ACOS** + ```mysql + SELECT ACOS(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the arc-cosine of the input value. + + Output Data Type: DOUBLE. + + Input: applies to value of all types except timestamp, binary, nchar, and bool. Can not apply to tag column of super table. + + Embedded Query Support: Both Outer Query and Inner Query + + Notes: + + If input value is NULL, the output value is NULL. + + It is a scalar function and can not be used together with aggregate function + + Applies to columns of normal table, child table and super table + + Supported after version 2.6.0.x + + +- **ATAN** + ```mysql + SELECT ATAN(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the arc-tangent of the input value. + + Output Data Type: DOUBLE. + + Input: applies to value of all types except timestamp, binary, nchar, and bool. Can not apply to tag column of super table. + + Embedded Query Support: Both Outer Query and Inner Query + + Notes: + + If input value is NULL, the output value is NULL. + + It is a scalar function and can not be used together with aggregate function + + Applies to columns of normal table, child table and super table + + Supported after version 2.6.0.x + + +- **SIN** + ```mysql + SELECT SIN(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the sine of the input value. + + Output Data Type: DOUBLE. + + Input: applies to value of all types except timestamp, binary, nchar, and bool. Can not apply to tag column of super table. + + Embedded Query Support: Both Outer Query and Inner Query + + Notes: + + If input value is NULL, the output value is NULL. + + It is a scalar function and can not be used together with aggregate function + + Applies to columns of normal table, child table and super table + + Supported after version 2.6.0.x + + +- **COS** + ```mysql + SELECT COS(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the cosine of the input value. + + Output Data Type: DOUBLE. + + Input: applies to value of all types except timestamp, binary, nchar, and bool. Can not apply to tag column of super table. + + Embedded Query Support: Both Outer Query and Inner Query + + Notes: + + If input value is NULL, the output value is NULL. + + It is a scalar function and can not be used together with aggregate function + + Applies to columns of normal table, child table and super table + + Supported after version 2.6.0.x + +- **TAN** + ```mysql + SELECT TAN(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the tangent of the input value. + + Output Data Type: DOUBLE. + + Input: applies to value of all types except timestamp, binary, nchar, and bool. Can not apply to tag column of super table. + + Embedded Query Support: Both Outer Query and Inner Query + + Notes: + + If input value is NULL, the output value is NULL. + + It is a scalar function and can not be used together with aggregate function + + Applies to columns of normal table, child table and super table + + Supported after version 2.6.0.x + + + +- **POW** + ```mysql + SELECT POW(field_name, power) FROM { tb_name | stb_name } [WHERE clause] + ``` + + Function: Returns the input value raised to the specified power of the second argument + + Output Data Type: DOUBLE. + + Input: applies to value of all types except timestamp, binary, nchar, and bool. Can not apply to tag column of super table. + + Embedded Query Support: Both Outer Query and Inner Query + + Notes: + + If input value is NULL, the output value is NULL. + + It is a scalar function and can not be used together with aggregate function + + Applies to columns of normal table, child table and super table + + Supported after version 2.6.0.x + +- **LOG** + ```mysql + SELECT LOG(field_name, base) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the logarithm of the input value with base + + Output Data Type: DOUBLE. + + Input: applies to value of all types except timestamp, binary, nchar, and bool. Can not apply to tag column of super table. + + Embedded Query Support: Both Outer Query and Inner Query + + Notes: + + If input value is NULL, the output value is NULL. + + It is a scalar function and can not be used together with aggregate function + + Applies to columns of normal table, child table and super table + + Supported after version 2.6.0.x + +- **ABS** + ```mysql + SELECT ABS(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the absolute value of the input value + + Output Data Type: If the input data is an integer numeric value, the output data type is ubigint. If the input data is a float or double value, the output data type is double + + Input: applies to value of all types except timestamp, binary, nchar, and bool. Can not apply to tag column of super table. + + Embedded Query Support: Both Outer Query and Inner Query + + Notes: + + If input value is NULL, the output value is NULL. + + It is a scalar function and can not be used together with aggregate function + + Applies to columns of normal table, child table and super table + + Supported after version 2.6.0.x + + +- **SQRT** + ```mysql + SELECT SQRT(field_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the square root value of the input value + + Output Data Type: DOUBLE. + + Input: applies to value of all types except timestamp, binary, nchar, and bool. Can not apply to tag column of super table. + + Embedded Query Support: Both Outer Query and Inner Query + + Notes: + + If input value is NULL, the output value is NULL. + + It is a scalar function and can not be used together with aggregate function + + Applies to columns of normal table, child table and super table + + Supported after version 2.6.0.x + +- **CAST** + ```mysql + SELECT CAST(expression AS type_name) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Converts a value into as a specific data type of type_name. + + Output Data Type: type_name specificied. Supported types include BIGINT, BINARY(N), TIMESTAMP and NCHAR(N) and BIGINT UNSIGNED + + Input: Normal column, constant, scalar function and the arithmetic computation(+,-,*,/,%) among them. Input data type includes BOOL, TINYINT, SMALLINT, INT, BIGINT, FLOAT, DOUBLE, BINARY(M), TIMESTAMP, NCHAR(M), TINYINT UNSIGNED, SMALLINT UNSIGNED, INT UNSIGNED, and BIGINT UNSIGNED + + Notes: + + Reports error for unsupported cast + + It is a scalar function and its output is NULL for input NULL + + Supported after version 2.6.0.x + + +- **CONCAT** + ```mysql + SELECT CONCAT(str1|column1, str2|column2, ...) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the string from concatenating the arguments + + Output Data Type: With binary inputs, the output data type is binary. With nchar inputs, the output data type is nchar. + + Input: all inputs shall be of data type binary or nchar. Can not apply to tag columns. + + Notes: + + If one of the string inputs is NULL, the resulting output is NULL. + The function takes 2 to 8 string values as input. all inputs must be of the same data type. + This function applies to normal table, child table and super table + This function applies to bother out query and inner query + Supported after version 2.6.0.x + +- **CONCAT_WS** + ``` + SELECT CONCAT_WS(separator, str1|column1, str2|column2, ...) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the string from concatenating the arguments with separator. + + Output Data Type: With binary inputs, the output data type is binary. With nchar inputs, the output data type is nchar. + + Input: all inputs shall be of data type binary or nchar. Can not apply to tag columns. + + Notes: + + Returns NULL when the separator is NULL. If the separator is not NULL and all the other string values are NULL, the result is an empty string. + The function takes 3 to 9 string values as input. all inputs must be of the same data type. + This function applies to normal table, child table and super table + This function applies to bother out query and inner query + Supported after version 2.6.0.x + + +- **LENGTH** + ``` + SELECT LENGTH(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the length of the string measure in bytes + + Output Data Type: INT。 + + Input: BINARY or NCHAR values. Can not apply to tag columns + + Notes: + + Returns NULL when input is NULL. + This function applies to normal table, child table and super table + This function applies to bother out query and inner query + Supported after version 2.6.0.x + +- **CHAR_LENGTH** + ``` + SELECT CHAR_LENGTH(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the length of the string measure in characters + + Output Data Type: INT。 + + Input: BINARY or NCHAR values. Can not apply to tag columns + + Notes: + + Returns NULL when input is NULL. + This function applies to normal table, child table and super table + This function applies to bother out query and inner query + Supported after version 2.6.0.x + +- **LOWER** + ``` + SELECT LOWER(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the lower case of input value + + Output Data Type: BINARY or NCHAR. Same data type as Input. + + Input: BINARY or NCHAR values. Can not apply to tag columns + + Notes: + + Returns NULL when input is NULL. + This function applies to normal table, child table and super table + This function applies to bother out query and inner query + Supported after version 2.6.0.x + +- **UPPER** + ``` + SELECT UPPER(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: Returns the upper case of input value + + Output Data Type: BINARY or NCHAR. Same data type as Input. + + Input: BINARY or NCHAR values. Can not apply to tag columns + + Notes: + + Returns NULL when input is NULL. + This function applies to normal table, child table and super table + This function applies to bother out query and inner query + Supported after version 2.6.0.x + +- **LTRIM** + ``` + SELECT LTRIM(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: removes leading spaces from a string + + Output Data Type: BINARY or NCHAR. Same data type as Input. + + Input: BINARY or NCHAR values. Can not apply to tag columns + + Notes: + + Returns NULL when input is NULL. + This function applies to normal table, child table and super table + This function applies to bother out query and inner query + Supported after version 2.6.0.x + +- **RTRIM** + ``` + SELECT RTRIM(str|column) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: removes trailing spaces from a string + + Output Data Type: BINARY or NCHAR. Same data type as Input. + + Input: BINARY or NCHAR values. Can not apply to tag columns + + Notes: + + Returns NULL when input is NULL. + This function applies to normal table, child table and super table + This function applies to bother out query and inner query + Supported after version 2.6.0.x + +- **SUBSTR** + ``` + SELECT SUBSTR(str,pos[,len]) FROM { tb_name | stb_name } [WHERE clause] + ``` + Function: extracts substring from a string str, starting from pos and extracting len characters. + + Output Data Type: BINARY or NCHAR. Same data type as Input. + + Input: BINARY or NCHAR values. Can not apply to tag columns + + Notes: + + Returns NULL when input is NULL. + Input pos can be negative or positive. If it is a positive number, this function extracts from the beginning of the string. If it is a negative number, this function extracts from the end of the string + If input len is ommited, the output is whole substring starting from pos. + This function applies to normal table, child table and super table + This function applies to bother out query and inner query + Supported after version 2.6.0.x + + - **Four Operations** ```mysql diff --git a/documentation20/en/14.devops/03.immigrate/docs.md b/documentation20/en/14.devops/03.immigrate/docs.md index 875ecd5932987f25f0921226825f5f60a70df50e..54c431b043a969a7151a27696620b4284a4501d1 100644 --- a/documentation20/en/14.devops/03.immigrate/docs.md +++ b/documentation20/en/14.devops/03.immigrate/docs.md @@ -63,7 +63,7 @@ This allows collectd to push the data to taosAdapter using the push to OpenTSDB After the data has been written to TDengine properly, you can adapt Grafana to visualize the data written to TDengine. There is a connection plugin for Grafana in the TDengine installation directory connector/grafanaplugin. The way to use this plugin is simple. -First copy the entire dist directory under the grafanaplugin directory to Grafana's plugins directory (the default address is /var/lib/grafana/plugins/), and then restart Grafana to see the TDengine data source under the Add Data Source menu. +First copy the entire `dist` directory under the grafanaplugin directory to Grafana's plugins directory (the default address is /var/lib/grafana/plugins/), and then restart Grafana to see the TDengine data source under the Add Data Source menu. ```shell sudo cp -r . /var/lib/grafana/plugins/tdengine @@ -144,15 +144,15 @@ The steps are as follows: the name of the metrics is used as the name of the TDe Create 3 super tables in TDengine. ```sql -create stable memory(ts timestamp, val float) tags(host binary(12),memory_type binary(20), memory_type_instance binary(20), source binary(20)); -create stable swap(ts timestamp, val double) tags(host binary(12), swap_type binary(20), swap_type_binary binary(20), source binary(20)); -create stable disk(ts timestamp, val double) tags(host binary(12), disk_point binary(20), disk_instance binary(20), disk_type binary(20), source binary(20)); +CREATE STABLE memory(ts timestamp, val float) tags(host binary(12),memory_type binary(20), memory_type_instance binary(20), source binary(20)); +CREATE STABLE swap(ts timestamp, val double) tags(host binary(12), swap_type binary(20), swap_type_binary binary(20), source binary(20)); +CREATE STABLE disk(ts timestamp, val double) tags(host binary(12), disk_point binary(20), disk_instance binary(20), disk_type binary(20), source binary(20)); ``` For sub-tables use dynamic table creation as shown below: ```sql -insert into memory_vm130_memory_bufferred_collectd using memory tags(‘vm130’, ‘memory’, 'buffer', 'collectd') values(1632979445, 3.0656); +INSERT INTO memory_vm130_memory_buffered_collectd USING memory TAGS(‘vm130’, ‘memory’, 'buffer', 'collectd') VALUES(1632979445, 3.0656); ``` Eventually about 340 sub-tables and 3 super-tables will be created in the system. Note that if the use of concatenated tagged values causes the sub-table names to exceed the system limit (191 bytes), then some encoding (e.g. MD5) needs to be used to convert them to an acceptable length. @@ -168,7 +168,7 @@ Data is subscribed from the message queue and an adapted writer is started to wr After the data starts to be written for a sustained period, SQL statements can be used to check whether the amount of data written meets the expected write requirements. The following SQL statement is used to count the amount of data. ```sql -select count(*) from memory +SELECT COUNT(*) FROM memory ``` After completing the query, if the written data does not differ from the expected one, and there are no abnormal error messages from the writing program itself, then you can confirm that the data writing is complete and valid. @@ -213,7 +213,7 @@ Notes. 1. the value within the Interval needs to be the same as the interval value of the outer query. -As the interpolation of values in OpenTSDB uses linear interpolation, use fill(linear) to declare the interpolation type in the interpolation clause. The following functions with the same interpolation requirements are handled by this method. 3. +As the interpolation of values in OpenTSDB uses linear interpolation, use FILL(linear) to declare the interpolation type in the interpolation clause. The following functions with the same interpolation requirements are handled by this method. 3. 2. The 20s parameter in Interval means that the inner query will generate results in a 20-second window. In a real query, it needs to be adjusted to the time interval between different records. This ensures that the interpolation results are generated equivalently to the original data. @@ -226,7 +226,7 @@ Equivalent function: count Example. -select count(*) from super_table_name; +SELECT COUNT(*) FROM super_table_name; **Dev** @@ -234,7 +234,7 @@ Equivalent function: stddev Example. -Select stddev(val) from table_name +SELECT STDDEV(val) FROM table_name **Estimated percentiles** @@ -242,7 +242,7 @@ Equivalent function: apercentile Example. -Select apercentile(col1, 50, “t-digest”) from table_name +SELECT APERCENTILE(col1, 50, “t-digest”) FROM table_name Remark. @@ -254,7 +254,7 @@ Equivalent function: first Example. -Select first(col1) from table_name +SELECT FIRST(col1) FROM table_name **Last** @@ -262,7 +262,7 @@ Equivalent function: last Example. -Select last(col1) from table_name +SELECT LAST(col1) FROM table_name **Max** @@ -270,7 +270,7 @@ Equivalent function: max Example. -Select max(value) from (select first(val) value from table_name interval(10s) fill(linear)) interval(10s) +SELECT MAX(value) FROM (SELECT FIRST(val) value FROM table_name INTERVAL(10s) FILL(linear)) INTERVAL(10s) Note: The Max function requires interpolation, for the reasons given above. @@ -280,13 +280,13 @@ Equivalent function: min Example. -Select min(value) from (select first(val) value from table_name interval(10s) fill(linear)) interval(10s); +SELECT MIN(value) FROM (select first(val) value FROM table_name INTERVAL(10s) FILL(linear)) INTERVAL(10s); **MinMax** Equivalent function: max -Select max(val) from table_name +SELECT max(val) FROM table_name Note: This function does not require interpolation, so it can be calculated directly. @@ -294,7 +294,7 @@ Note: This function does not require interpolation, so it can be calculated dire Equivalent function: min -Select min(val) from table_name +SELECT min(val) FROM table_name Note: This function does not require interpolation, so it can be calculated directly. @@ -308,7 +308,7 @@ Note: Equivalent function: sum -Select max(value) from (select first(val) value from table_name interval(10s) fill(linear)) interval(10s) +SELECT MAX(value) FROM (SELECT FIRST(val) value FROM table_name INTERVAL(10s) FILL(linear)) INTERVAL(10s) Note: This function does not require interpolation, so it can be calculated directly. @@ -316,7 +316,7 @@ Note: This function does not require interpolation, so it can be calculated dire Equivalent function: sum -Select sum(val) from table_name +SELECT SUM(val) FROM table_name Note: This function does not require interpolation, so it can be calculated directly. @@ -356,7 +356,7 @@ Combining the above formula and bringing the parameters into the calculation for ### Storage device selection considerations -The hard disk should be used with a better random read performance hard disk device, if you can have SSD, consider using SSD as much as possible. better random read performance of the disk is extremely helpful to improve the system query performance and can improve the overall query response performance of the system. To obtain better query performance, the performance index of single-threaded random read IOPS of the hard disk device should not be lower than 1000, it is better to reach 5000 IOPS or more. To obtain an evaluation of the current device random read IO performance, it is recommended that fio software be used to evaluate its operational performance (see Appendix 1 for details on how to use it) to confirm whether it can meet the large file random read performance requirements. +The hard disk should be used with a better random read performance hard disk device, if you can have SSD, consider using SSD as much as possible. better random read performance of the disk is extremely helpful to improve the system query performance and can improve the overall query response performance of the system. To obtain better query performance, the performance index of single-threaded random read IOPS of the hard disk device should not be lower than 1000, it is better to reach 5000 IOPS or more. To obtain an evaluation of the current device random read IO performance, it is recommended that `fio` software be used to evaluate its operational performance (see Appendix 1 for details on how to use it) to confirm whether it can meet the large file random read performance requirements. Hard disk write performance has little impact on TDengine; TDengine writes in append write mode, so as long as it has good sequential write performance, both SAS hard disks and SSDs, in general, can meet TDengine's requirements for disk write performance well. @@ -390,7 +390,7 @@ FQDN, firstEp, secondEP, dataDir, logDir, tmpDir, serverPort. The specific meani Follow the same steps to set the parameters on the node that needs to run and start the taosd service, then add the Dnode to the cluster. -Finally, start taos and execute the command show dnodes, if you can see all the nodes that have joined the cluster, then the cluster is successfully built. For the specific operation procedure and notes, please refer to the document [TDengine Cluster Installation, Management](https://www.taosdata.com/cn/documentation/cluster). +Finally, start taos and execute the command `SHOW DNODES`, if you can see all the nodes that have joined the cluster, then the cluster is successfully built. For the specific operation procedure and notes, please refer to the document [TDengine Cluster Installation, Management](https://www.taosdata.com/cn/documentation/cluster). ## Appendix 4: Super table names diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 0ade3008e65290e4edfa79d78fbee4d1e734d6fb..0bf6b5c1caa3bdabfa41b6896eb98be3d05ae9b7 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -3359,11 +3359,6 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col } else { tVariantDump(pVariant, val, TSDB_DATA_TYPE_BIGINT, true); - int64_t numRowsSelected = GET_INT64_VAL(val); - if (functionId != TSDB_FUNC_UNIQUE && (numRowsSelected <= 0 || numRowsSelected > 100)) { // todo use macro - return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg12); - } - if(functionId == TSDB_FUNC_UNIQUE){ // consider of memory size if(pSchema->bytes < 10){ GET_INT64_VAL(val) = MAX_UNIQUE_RESULT_ROWS * 100; @@ -3373,6 +3368,11 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col GET_INT64_VAL(val) = MAX_UNIQUE_RESULT_ROWS; } } + + int64_t numRowsSelected = GET_INT64_VAL(val); + if (functionId != TSDB_FUNC_UNIQUE && (numRowsSelected <= 0 || numRowsSelected > 100)) { // todo use macro + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg12); + } // todo REFACTOR // set the first column ts for top/bottom query SColumnIndex index1 = {index.tableIndex, PRIMARYKEY_TIMESTAMP_COL_INDEX}; @@ -3385,9 +3385,10 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col aAggs[TSDB_FUNC_TS].name, pExpr); colIndex += 1; // the first column is ts - + getResultDataInfo(pSchema->type, pSchema->bytes, functionId, (int32_t)numRowsSelected, &resultType, + &resultSize, &interResult, 0, false, pUdfInfo); pExpr = tscExprAppend(pQueryInfo, functionId, &index, resultType, resultSize, getNewResColId(pCmd), - resultSize, false); + interResult, false); if (functionId == TSDB_FUNC_TAIL){ int64_t offset = 0; if (taosArrayGetSize(pItem->pNode->Expr.paramList) == 3){ @@ -7054,7 +7055,7 @@ int32_t validateOrderbyNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSq return invalidOperationMsg(pMsgBuf, msg1); } - if (index.columnIndex != PRIMARYKEY_TIMESTAMP_COL_INDEX && !isTopBottomUniqueQuery(pQueryInfo)) { + if (index.columnIndex != PRIMARYKEY_TIMESTAMP_COL_INDEX && !isTopBottomUniqueQuery(pQueryInfo)){ bool validOrder = false; SArray *columnInfo = pQueryInfo->groupbyExpr.columnInfo; if (columnInfo != NULL && taosArrayGetSize(columnInfo) > 0) { @@ -7065,15 +7066,8 @@ int32_t validateOrderbyNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSq if (!validOrder) { return invalidOperationMsg(pMsgBuf, msg7); } - - if (udf) { - return invalidOperationMsg(pMsgBuf, msg11); - } - pQueryInfo->groupbyExpr.orderType = pItem->sortOrder; - } - - if (isTopBottomUniqueQuery(pQueryInfo)) { + }else if (isTopBottomUniqueQuery(pQueryInfo)) { SArray *columnInfo = pQueryInfo->groupbyExpr.columnInfo; if (columnInfo != NULL && taosArrayGetSize(columnInfo) > 0) { SColIndex* pColIndex = taosArrayGet(columnInfo, 0); @@ -7093,14 +7087,16 @@ int32_t validateOrderbyNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSq return invalidOperationMsg(pMsgBuf, msg5); } } + pQueryInfo->order.order = pItem->sortOrder; + pQueryInfo->order.orderColId = pSchema[index.columnIndex].colId; + }else{ + pQueryInfo->order.order = pItem->sortOrder; + pQueryInfo->order.orderColId = PRIMARYKEY_TIMESTAMP_COL_INDEX; } if (udf) { return invalidOperationMsg(pMsgBuf, msg11); } - - pQueryInfo->order.order = pItem->sortOrder; - pQueryInfo->order.orderColId = pSchema[index.columnIndex].colId; } else { // handle the temp table order by clause. You can order by any single column in case of the temp table, created by // inner subquery. diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 653df4baa1db9e2d13ebbcae5b11b9af93a2d1c5..04124b108de476d4556930b591fc54568d111001 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -1491,7 +1491,7 @@ void handleDownstreamOperator(SSqlObj** pSqlObjList, int32_t numOfUpstream, SQue pex->base.param[2].nType = TSDB_DATA_TYPE_INT; pex->base.param[2].i64 = pInputQI->order.order; } - } + } } tscDebug("0x%"PRIx64" create QInfo 0x%"PRIx64" to execute the main query while all nest queries are ready", pSql->self, pSql->self); diff --git a/src/connector/C#/src/test/FunctionTest/Subscribe.cs b/src/connector/C#/src/test/FunctionTest/Subscribe.cs new file mode 100644 index 0000000000000000000000000000000000000000..57ded4a82f530b759b014f8109cd63246f2dfc3b --- /dev/null +++ b/src/connector/C#/src/test/FunctionTest/Subscribe.cs @@ -0,0 +1,184 @@ +using TDengineDriver; +using Test.UtilsTools; +using System; +using System.Collections.Generic; +using Xunit; +using Test.UtilsTools.DataSource; +using System.Threading; +using Xunit.Abstractions; +using Test.Fixture; +using Test.Case.Attributes; + +namespace Cases +{ + [TestCaseOrderer("XUnit.Case.Orderers.TestExeOrderer", "Cases.ExeOrder")] + [Collection("Database collection")] + + public class SubscribeCases + { + DatabaseFixture database; + + private readonly ITestOutputHelper output; + + public SubscribeCases(DatabaseFixture fixture, ITestOutputHelper output) + { + this.database = fixture; + this.output = output; + } + /// xiaolei + /// SubscribeCases.ConsumeFromBegin + /// Subscribe a table and consume from beginning. + /// Subscribe.cs + /// pass or failed + [Fact(DisplayName = "SubscribeCases.ConsumeFromBegin()"), TestExeOrder(1), Trait("Category", "Without callback")] + public void ConsumeFromBegin() + { + IntPtr conn = database.conn; + IntPtr _res = IntPtr.Zero; + + var tableName = "subscribe_from_begin"; + var createSql = $"create table if not exists {tableName}(ts timestamp,bl bool,i8 tinyint,i16 smallint,i32 int,i64 bigint,bnr binary(50),nchr nchar(50))tags(t_i32 int,t_bnr binary(50),t_nchr nchar(50))"; + var dropSql = $"drop table if exists {tableName}"; + + var colData = new List{1646150410100,true,1,11,1111,11111111,"value one","值壹", + 1646150410200,true,2,22,2222,22222222,"value two","值贰", + 1646150410300,false,3,33,3333,33333333,"value three","值三", + }; + + var colData2 = new List{1646150410400,false,4,44,4444,44444444,"value three","值肆", + 1646150410500,true,5,55,5555,55555555,"value one","值伍", + 1646150410600,true,6,66,6666,66666666,"value two","值陆", + }; + + var tagData = new List { 1, "tag_one", "标签壹" }; + var tagData2 = new List { 2, "tag_two", "标签贰" }; + + String insertSql = UtilsTools.ConstructInsertSql(tableName + "_s01", tableName, colData, tagData, 3); + String insertSql2 = UtilsTools.ConstructInsertSql(tableName + "_s02", tableName, colData2, tagData2, 3); + // Then + List expectResMeta = DataSource.GetMetaFromDDL(createSql); + List expectResData = UtilsTools.CombineColAndTagData(colData, tagData, 3); + List expectResData2 = UtilsTools.CombineColAndTagData(colData2, tagData2, 3); + expectResData.AddRange(expectResData2); + + var querySql = $"select * from {tableName}"; + UtilsTools.ExecuteUpdate(conn, dropSql); + UtilsTools.ExecuteUpdate(conn, createSql); + UtilsTools.ExecuteUpdate(conn, insertSql); + + + IntPtr subscribe = TDengine.Subscribe(conn, true, tableName, querySql, null, IntPtr.Zero, 0); + _res = TDengine.Consume(subscribe); + // need to call fetch TAOS_RES + UtilsTools.GetResDataWithoutFree(_res); + TDengine.Unsubscribe(subscribe, true); + + UtilsTools.ExecuteUpdate(conn, insertSql2); + Thread.Sleep(100); + + + subscribe = TDengine.Subscribe(conn, true, tableName, querySql, null, IntPtr.Zero, 0); + _res = TDengine.Consume(subscribe); + + List actualMeta = UtilsTools.GetResField(_res); + List actualResData = UtilsTools.GetResDataWithoutFree(_res); + TDengine.Unsubscribe(subscribe, false); + + Assert.Equal(expectResData.Count, actualResData.Count); + output.WriteLine("Assert Meta data"); + //Assert Meta data + for (int i = 0; i < actualMeta.Count; i++) + { + Assert.Equal(expectResMeta[i].name, actualMeta[i].name); + Assert.Equal(expectResMeta[i].type, actualMeta[i].type); + Assert.Equal(expectResMeta[i].size, actualMeta[i].size); + } + output.WriteLine("Assert retrieve data"); + // Assert retrieve data + for (int i = 0; i < actualResData.Count; i++) + { + // output.WriteLine("{0},{1},{2}", i, expectResData[i], actualResData[i]); + Assert.Equal(expectResData[i].ToString(), actualResData[i]); + } + + } + + /// xiaolei + /// SubscribeCases.ConsumeFromLastProgress + /// Subscribe table from the last progress. + /// Subscribe.cs + /// pass or failed + [Fact(DisplayName = "SubscribeCases.ConsumeFromLastProgress()"), TestExeOrder(2), Trait("Category", "Without callback")] + public void ConsumeFromLastProgress() + { + IntPtr conn = database.conn; + IntPtr _res = IntPtr.Zero; + + var tableName = "subscribe_from_progress"; + var createSql = $"create table if not exists {tableName}(ts timestamp,bl bool,i8 tinyint,i16 smallint,i32 int,i64 bigint,bnr binary(50),nchr nchar(50))tags(t_i32 int,t_bnr binary(50),t_nchr nchar(50))"; + var dropSql = $"drop table if exists {tableName}"; + + var colData = new List{1646150410100,true,1,11,1111,11111111,"value one","值壹", + 1646150410200,true,2,22,2222,22222222,"value two","值贰", + 1646150410300,false,3,33,3333,33333333,"value three","值叁", + }; + + var colData2 = new List{1646150410400,false,4,44,4444,44444444,"value three","值肆", + 1646150410500,true,5,55,5555,55555555,"value one","值伍", + 1646150410600,true,6,66,6666,66666666,"value two","值陆", + }; + + var tagData = new List { 1, "tag_one", "标签壹" }; + var tagData2 = new List { 2, "tag_two", "标签贰" }; + + String insertSql = UtilsTools.ConstructInsertSql(tableName + "_s01", tableName, colData, tagData, 3); + String insertSql2 = UtilsTools.ConstructInsertSql(tableName + "_s02", tableName, colData2, tagData2, 3); + // Then + List expectResMeta = DataSource.GetMetaFromDDL(createSql); + List expectResData = UtilsTools.CombineColAndTagData(colData, tagData, 3); + List expectResData2 = UtilsTools.CombineColAndTagData(colData2, tagData2, 3); + + + var querySql = $"select * from {tableName}"; + UtilsTools.ExecuteUpdate(conn, dropSql); + UtilsTools.ExecuteUpdate(conn, createSql); + UtilsTools.ExecuteUpdate(conn, insertSql); + + // First time subscribe + IntPtr subscribe = TDengine.Subscribe(conn, true, tableName, querySql, null, IntPtr.Zero, 20); + _res = TDengine.Consume(subscribe); + // need to call fetch TAOS_RES + UtilsTools.GetResDataWithoutFree(_res); + // Close subscribe and save progress. + TDengine.Unsubscribe(subscribe, true); + + // Insert new data. + UtilsTools.ExecuteUpdate(conn, insertSql2); + Thread.Sleep(1000); + + subscribe = TDengine.Subscribe(conn, false, tableName, querySql, null, IntPtr.Zero, 20); + _res = TDengine.Consume(subscribe); + + List actualMeta = UtilsTools.GetResField(_res); + List actualResData = UtilsTools.GetResDataWithoutFree(_res); + TDengine.Unsubscribe(subscribe, true); + output.WriteLine("Assert Meta data"); + //Assert Meta data + for (int i = 0; i < actualMeta.Count; i++) + { + Assert.Equal(expectResMeta[i].name, actualMeta[i].name); + Assert.Equal(expectResMeta[i].type, actualMeta[i].type); + Assert.Equal(expectResMeta[i].size, actualMeta[i].size); + } + output.WriteLine("Assert retrieve data"); + // Assert retrieve data + for (int i = 0; i < actualResData.Count; i++) + { + // output.WriteLine("{0},{1},{2}", i, expectResData[i], actualResData[i]); + Assert.Equal(expectResData2[i].ToString(), actualResData[i]); + } + + } + } + +} \ No newline at end of file diff --git a/src/connector/C#/src/test/FunctionTest/SubscribeAsync.cs b/src/connector/C#/src/test/FunctionTest/SubscribeAsync.cs new file mode 100644 index 0000000000000000000000000000000000000000..6a954ef0e048331fdf9809e0030240cd80fa1d6f --- /dev/null +++ b/src/connector/C#/src/test/FunctionTest/SubscribeAsync.cs @@ -0,0 +1,237 @@ +using TDengineDriver; +using Test.UtilsTools; +using System; +using System.Collections.Generic; +using Xunit; +using Test.UtilsTools.DataSource; +using System.Threading; +using Xunit.Abstractions; +using Test.Fixture; +using Test.Case.Attributes; + +namespace Cases +{ + [TestCaseOrderer("XUnit.Case.Orderers.TestExeOrderer", "Cases.ExeOrder")] + [Collection("Database collection")] + public class SubscribeAsyncCases + { + DatabaseFixture database; + + private readonly ITestOutputHelper output; + + public SubscribeAsyncCases(DatabaseFixture fixture, ITestOutputHelper output) + { + this.database = fixture; + this.output = output; + } + + /// xiaolei + /// SubscribeAsyncCases.ConsumeFromBegin + /// Subscribe a table and consume through callback and the beginning record of the table + /// Subscribe.cs + /// pass or failed + [Fact(DisplayName = "SubscribeAsyncCases.ConsumeFromBegin()"), TestExeOrder(1), Trait("Category", "With callback")] + public void ConsumeFromBegin() + { + IntPtr conn = database.conn; + IntPtr _res = IntPtr.Zero; + + var tableName = "subscribe_async_from_begin"; + var createSql = $"create table if not exists {tableName}(ts timestamp,bl bool,i8 tinyint,i16 smallint,i32 int,i64 bigint,bnr binary(50),nchr nchar(50))tags(t_i32 int,t_bnr binary(50),t_nchr nchar(50))"; + var dropSql = $"drop table if exists {tableName}"; + + var colData = new List{1646150410100,true,1,11,1111,11111111,"value one","值壹", + 1646150410200,true,2,22,2222,22222222,"value two","值贰", + 1646150410300,false,3,33,3333,33333333,"value three","值三", + }; + + var colData2 = new List{1646150410400,false,4,44,4444,44444444,"value three","值肆", + 1646150410500,true,5,55,5555,55555555,"value one","值伍", + 1646150410600,true,6,66,6666,66666666,"value two","值陆", + }; + + var tagData = new List { 1, "tag_one", "标签壹" }; + var tagData2 = new List { 2, "tag_two", "标签贰" }; + + String insertSql = UtilsTools.ConstructInsertSql(tableName + "_s01", tableName, colData, tagData, 3); + String insertSql2 = UtilsTools.ConstructInsertSql(tableName + "_s02", tableName, colData2, tagData2, 3); + List expectResMeta = DataSource.GetMetaFromDDL(createSql); + List expectResData = UtilsTools.CombineColAndTagData(colData, tagData, 3); + List expectResData2 = UtilsTools.CombineColAndTagData(colData2, tagData2, 3); + expectResData.AddRange(expectResData2); + var querySql = $"select * from {tableName}"; + + UtilsTools.ExecuteUpdate(conn, dropSql); + UtilsTools.ExecuteUpdate(conn, createSql); + UtilsTools.ExecuteUpdate(conn, insertSql); + + SubscribeCallback subscribeCallback1 = new SubscribeCallback(SubCallback1); + SubscribeCallback subscribeCallback2 = new SubscribeCallback(SubCallback2); + IntPtr subscribe = TDengine.Subscribe(conn, true, tableName, querySql, subscribeCallback1, IntPtr.Zero, 200); + + UtilsTools.ExecuteUpdate(conn, insertSql2); + Thread.Sleep(1000); + TDengine.Unsubscribe(subscribe, true); + + subscribe = TDengine.Subscribe(conn, true, tableName, querySql, subscribeCallback2, IntPtr.Zero, 200); + Thread.Sleep(1000); + TDengine.Unsubscribe(subscribe, false); + void SubCallback1(IntPtr subscribe, IntPtr taosRes, IntPtr param, int code) + { + if (code == 0 && taosRes != IntPtr.Zero) + { + // cannot free taosRes using taosRes, otherwise will cause crash. + UtilsTools.GetResDataWithoutFree(taosRes); + } + else + { + output.WriteLine($"async query data failed, failed code:{code}, reason:{TDengine.Error(taosRes)}"); + } + + } + + void SubCallback2(IntPtr subscribe, IntPtr taosRes, IntPtr param, int code) + { + if (code == 0 && taosRes != IntPtr.Zero) + { + List actualMeta = UtilsTools.GetResField(taosRes); + List actualResData = UtilsTools.GetResDataWithoutFree(taosRes); + // UtilsTools.DisplayRes(taosRes); + if (actualResData.Count == 0) + { + output.WriteLine($"consume in subscribe callback without data"); + } + else + { + output.WriteLine($"consume in subscribe callback with data"); + + Assert.Equal(expectResData.Count, actualResData.Count); + output.WriteLine("Assert Meta data"); + //Assert Meta data + for (int i = 0; i < actualMeta.Count; i++) + { + Assert.Equal(expectResMeta[i].name, actualMeta[i].name); + Assert.Equal(expectResMeta[i].type, actualMeta[i].type); + Assert.Equal(expectResMeta[i].size, actualMeta[i].size); + } + output.WriteLine("Assert retrieve data"); + // Assert retrieve data + for (int i = 0; i < actualResData.Count; i++) + { + // output.WriteLine("index:{0},expectResData:{1},actualResData:{2}", i, expectResData[i], actualResData[i]); + Assert.Equal(expectResData[i].ToString(), actualResData[i]); + } + } + } + else + { + output.WriteLine($"async query data failed, failed code:{code}, reason:{TDengine.Error(taosRes)}"); + } + } + + } + + /// xiaolei + /// SubscribeAsyncCases.ConsumeFromLastProgress + /// Subscribe a table and consume through callback and from last consume progress. + /// Subscribe.cs + /// pass or failed + [Fact(DisplayName = "SubscribeAsyncCases.ConsumeFromLastProgress()"), TestExeOrder(2), Trait("Category", "With callback")] + public void ConsumeFromLastProgress() + { + IntPtr conn = database.conn; + IntPtr _res = IntPtr.Zero; + + var tableName = "subscribe_async_from_begin"; + var createSql = $"create table if not exists {tableName}(ts timestamp,bl bool,i8 tinyint,i16 smallint,i32 int,i64 bigint,bnr binary(50),nchr nchar(50))tags(t_i32 int,t_bnr binary(50),t_nchr nchar(50))"; + var dropSql = $"drop table if exists {tableName}"; + + var colData = new List{1646150410100,true,1,11,1111,11111111,"value one","值壹", + 1646150410200,true,2,22,2222,22222222,"value two","值贰", + 1646150410300,false,3,33,3333,33333333,"value three","值三", + }; + + var colData2 = new List{1646150410400,false,4,44,4444,44444444,"value three","值肆", + 1646150410500,true,5,55,5555,55555555,"value one","值伍", + 1646150410600,true,6,66,6666,66666666,"value two","值陆", + }; + + var tagData = new List { 1, "tag_one", "标签壹" }; + var tagData2 = new List { 2, "tag_two", "标签贰" }; + + String insertSql = UtilsTools.ConstructInsertSql(tableName + "_s01", tableName, colData, tagData, 3); + String insertSql2 = UtilsTools.ConstructInsertSql(tableName + "_s02", tableName, colData2, tagData2, 3); + List expectResMeta = DataSource.GetMetaFromDDL(createSql); + List expectResData = UtilsTools.CombineColAndTagData(colData, tagData, 3); + List expectResData2 = UtilsTools.CombineColAndTagData(colData2, tagData2, 3); + var querySql = $"select * from {tableName}"; + + UtilsTools.ExecuteUpdate(conn, dropSql); + UtilsTools.ExecuteUpdate(conn, createSql); + UtilsTools.ExecuteUpdate(conn, insertSql); + + SubscribeCallback subscribeCallback1 = new SubscribeCallback(SubCallback1); + SubscribeCallback subscribeCallback2 = new SubscribeCallback(SubCallback2); + IntPtr subscribe = TDengine.Subscribe(conn, true, tableName, querySql, subscribeCallback1, IntPtr.Zero, 200); + Thread.Sleep(1000); + TDengine.Unsubscribe(subscribe, true); + UtilsTools.ExecuteUpdate(conn, insertSql2); + subscribe = TDengine.Subscribe(conn, false, tableName, querySql, subscribeCallback2, IntPtr.Zero, 200); + Thread.Sleep(1000); + TDengine.Unsubscribe(subscribe, false); + void SubCallback1(IntPtr subscribe, IntPtr taosRes, IntPtr param, int code) + { + if (code == 0 && taosRes != IntPtr.Zero) + { + // cannot free taosRes using taosRes, otherwise will cause crash. + UtilsTools.GetResDataWithoutFree(taosRes); + } + else if (taosRes != IntPtr.Zero) + { + output.WriteLine($"async query data failed, failed code:{code}, reason:{TDengine.Error(taosRes)}"); + } + + } + + void SubCallback2(IntPtr subscribe, IntPtr taosRes, IntPtr param, int code) + { + if (code == 0 && taosRes != IntPtr.Zero) + { + List actualMeta = UtilsTools.GetResField(taosRes); + List actualResData = UtilsTools.GetResDataWithoutFree(taosRes); + UtilsTools.DisplayRes(taosRes); + if (actualResData.Count == 0) + { + output.WriteLine($"consume in subscribe callback without data"); + } + else + { + output.WriteLine($"consume in subscribe callback with data"); + + Assert.Equal(expectResData2.Count, actualResData.Count); + output.WriteLine("Assert Meta data"); + //Assert Meta data + for (int i = 0; i < actualMeta.Count; i++) + { + Assert.Equal(expectResMeta[i].name, actualMeta[i].name); + Assert.Equal(expectResMeta[i].type, actualMeta[i].type); + Assert.Equal(expectResMeta[i].size, actualMeta[i].size); + } + output.WriteLine("Assert retrieve data"); + // Assert retrieve data + for (int i = 0; i < actualResData.Count; i++) + { + // output.WriteLine("index:{0},expectResData:{1},actualResData:{2}", i, expectResData[i], actualResData[i]); + Assert.Equal(expectResData2[i].ToString(), actualResData[i]); + } + } + } + else + { + output.WriteLine($"async query data failed, failed code:{code}, reason:{TDengine.Error(taosRes)}"); + } + } + + } + } +} \ No newline at end of file diff --git a/src/connector/C#/src/test/FunctionTest/lib/DBFixture.cs b/src/connector/C#/src/test/FunctionTest/lib/DBFixture.cs index 83492536fe7d3ce9eb012282db2cd4979b6b03f0..295726a525fb7a6c7740d5216fa19ee797109eb1 100644 --- a/src/connector/C#/src/test/FunctionTest/lib/DBFixture.cs +++ b/src/connector/C#/src/test/FunctionTest/lib/DBFixture.cs @@ -48,30 +48,30 @@ namespace Test.Fixture public void Dispose() { - // IntPtr res; - // if (conn != IntPtr.Zero) - // { - // if ((res = TDengine.Query(conn, $"drop database if exists {db}")) != IntPtr.Zero) - // { - // if (TDengine.Close(conn) == 0) - // { - // Console.WriteLine("close connection success"); - // } - // else - // { - // throw new Exception("close connection failed"); - // } + IntPtr res; + if (conn != IntPtr.Zero) + { + if ((res = TDengine.Query(conn, $"drop database if exists {db}")) != IntPtr.Zero) + { + if (TDengine.Close(conn) == 0) + { + Console.WriteLine("close connection success"); + } + else + { + throw new Exception("close connection failed"); + } - // } - // else - // { - // throw new Exception(TDengine.Error(res)); - // } - // } - // else - // { - // throw new Exception("connection if already null"); - // } + } + else + { + throw new Exception(TDengine.Error(res)); + } + } + else + { + throw new Exception("connection if already null"); + } } diff --git a/src/connector/C#/src/test/FunctionTest/lib/Utils.cs b/src/connector/C#/src/test/FunctionTest/lib/Utils.cs index 93da6b77cf8132c3471bea3f673f6ebee96a3679..9604a0b043fc7b99ee4e58208ba1ff5212453fc5 100644 --- a/src/connector/C#/src/test/FunctionTest/lib/Utils.cs +++ b/src/connector/C#/src/test/FunctionTest/lib/Utils.cs @@ -104,11 +104,12 @@ namespace Test.UtilsTools IntPtr rowdata; List dataList = QueryRes(res, metaList); - for (int i = 0; i < metaList.Count; i++) + for (int i = 0; i < dataList.Count; i += metaList.Count) { - for (int j = 0; j < dataList.Count; j++) + for (int j = 0; j < metaList.Count; j++) { - Console.Write(" {0} \t|", dataList[j]); + Console.Write(" {0} \t|", dataList[i + j]); + } Console.WriteLine(""); } diff --git a/src/query/src/qExtbuffer.c b/src/query/src/qExtbuffer.c index b90b50174065ca3ea4f92d6d3dd3fb16b7d15596..4a4ae3ca422a5e65e74d1c566dcd4c99de4e83a2 100644 --- a/src/query/src/qExtbuffer.c +++ b/src/query/src/qExtbuffer.c @@ -385,6 +385,11 @@ int32_t columnValueAscendingComparator(char *f1, char *f2, int32_t type, int32_t case TSDB_DATA_TYPE_TINYINT: DEFAULT_COMP(GET_INT8_VAL(f1), GET_INT8_VAL(f2)); case TSDB_DATA_TYPE_BINARY: { + bool leftIsNull = isNull(f1, TSDB_DATA_TYPE_BINARY); + bool rightIsNull = isNull(f2, TSDB_DATA_TYPE_BINARY); + if(leftIsNull && rightIsNull) return 0; + else if(leftIsNull) return -1; + else if(rightIsNull) return 1; int32_t len1 = varDataLen(f1); int32_t len2 = varDataLen(f2); @@ -408,6 +413,12 @@ int32_t columnValueAscendingComparator(char *f1, char *f2, int32_t type, int32_t return (ret < 0) ? -1 : 1; }; case TSDB_DATA_TYPE_NCHAR: { // todo handle the var string compare + bool leftIsNull = isNull(f1, TSDB_DATA_TYPE_NCHAR); + bool rightIsNull = isNull(f2, TSDB_DATA_TYPE_NCHAR); + if(leftIsNull && rightIsNull) return 0; + else if(leftIsNull) return -1; + else if(rightIsNull) return 1; + int32_t len1 = varDataLen(f1); int32_t len2 = varDataLen(f2); diff --git a/src/util/src/tcompare.c b/src/util/src/tcompare.c index cd914c3851fa84b5992e1994c0cd9bf46f048d76..2ab5ddbbe0ac1025be72e69fe88050d2aa3f73ad 100644 --- a/src/util/src/tcompare.c +++ b/src/util/src/tcompare.c @@ -180,6 +180,12 @@ int32_t compareDoubleValDesc(const void* pLeft, const void* pRight) { } int32_t compareLenPrefixedStr(const void *pLeft, const void *pRight) { + bool leftIsNull = isNull(pLeft, TSDB_DATA_TYPE_BINARY); + bool rightIsNull = isNull(pRight, TSDB_DATA_TYPE_BINARY); + if(leftIsNull && rightIsNull) return 0; + else if(leftIsNull) return -1; + else if(rightIsNull) return 1; + int32_t len1 = varDataLen(pLeft); int32_t len2 = varDataLen(pRight); @@ -200,6 +206,12 @@ int32_t compareLenPrefixedStrDesc(const void* pLeft, const void* pRight) { } int32_t compareLenPrefixedWStr(const void *pLeft, const void *pRight) { + bool leftIsNull = isNull(pLeft, TSDB_DATA_TYPE_NCHAR); + bool rightIsNull = isNull(pRight, TSDB_DATA_TYPE_NCHAR); + if(leftIsNull && rightIsNull) return 0; + else if(leftIsNull) return -1; + else if(rightIsNull) return 1; + int32_t len1 = varDataLen(pLeft); int32_t len2 = varDataLen(pRight); diff --git a/tests/develop-test/2-query/scalar_expression.py b/tests/develop-test/2-query/scalar_expression.py new file mode 100644 index 0000000000000000000000000000000000000000..5ffe9d06da7a213f382527587396293f1d8dbc76 --- /dev/null +++ b/tests/develop-test/2-query/scalar_expression.py @@ -0,0 +1,540 @@ +import sys +from util.log import * +from util.cases import * +from util.sql import * +from util.dnodes import tdDnodes +from math import inf + +class TDTestCase: + def caseDescription(self): + ''' + case1: [TD-14123]: fix failed test on arm64 by converting from sim tst to python test to overcome NaN value and its string representation + ''' + return + + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + self._conn = conn + + def restartTaosd(self, index=1, dbname="db"): + tdDnodes.stop(index) + tdDnodes.startWithoutSleep(index) + tdSql.execute(f"use db0") + + def run(self): + print("running {}".format(__file__)) + tdSql.execute("drop database if exists db0") + tdSql.execute("create database if not exists db0") + tdSql.execute('use db0') + tdSql.execute('create table st0 (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 nchar(5), c9 binary(10)) TAGS (tgcol int);') + + tdSql.execute('create table ct0 using st0 tags( 0 );') + tdSql.execute('insert into ct0 values (1601481600000 , 0 , 0.25 , 0 , 0 , 0 , 0.25 , 0 , 0 , 0 );') + for i in range(1, 50): + tdSql.execute('insert into ct0 values ({}, {}, {}, {}, {}, {}, {}, {}, {}, {});'.format(1601481600000 + i * 60000, + i , i , i , i , i , i , i , i , i )) + + tdSql.execute('create table ct1 using st0 tags( 1 );') + tdSql.execute('insert into ct1 values (1601481600000 , 0 , 0.25 , 0 , 0 , 0 , 0.25 , 0 , 0 , 0 );') + for i in range(1, 50): + tdSql.execute('insert into ct1 values ({}, {}, {}, {}, {}, {}, {}, {}, {}, {});'.format(1601481600000 + i * 60000, + i , i , i , i , i , i , i , i , i )) + + + tdSql.query('select floor(3.0)+ceil(4.0) from ct0;') + tdSql.checkRows(50) + for row in range(0, 50): + tdSql.checkData(row, 0, 7.0) + + + tdSql.query('select sum(c1)+3.0+4.0 from st0;') + tdSql.checkRows(1) + tdSql.checkData(0, 0, 2457.0) + + tdSql.query('select sin(log(avg(c1),sum(c2))+3)%4 from st0;') + tdSql.checkRows(1) + tdSql.checkData(0, 0, -0.26507428560248714) + + tdSql.query("select log(pow(length(concat('3','4')),2),c2) from st0;") + tdSql.checkRows(100) + tdSql.checkData(0, 0, -1.0) + tdSql.checkData(1, 0, inf) + tdSql.checkData(2, 0, 2.0) + tdSql.checkData(3, 0, 1.2618595071429148) + tdSql.checkData(4, 0, 1.0) + tdSql.checkData(5, 0, 0.8613531161467861) + tdSql.checkData(6, 0, 0.7737056144690831) + tdSql.checkData(7, 0, 0.7124143742160444) + tdSql.checkData(8, 0, 0.6666666666666667) + tdSql.checkData(9, 0, 0.6309297535714574) + tdSql.checkData(10, 0, 0.6020599913279623) + tdSql.checkData(11, 0, 0.5781296526357756) + tdSql.checkData(12, 0, 0.5578858913022596) + tdSql.checkData(13, 0, 0.5404763088546395) + tdSql.checkData(14, 0, 0.5252990700743871) + tdSql.checkData(15, 0, 0.511916049619631) + tdSql.checkData(16, 0, 0.5) + tdSql.checkData(17, 0, 0.489301084236452) + tdSql.checkData(18, 0, 0.4796249331362629) + tdSql.checkData(19, 0, 0.4708178267332765) + tdSql.checkData(20, 0, 0.46275642631951835) + tdSql.checkData(21, 0, 0.455340497393906) + tdSql.checkData(22, 0, 0.4484876484351508) + tdSql.checkData(23, 0, 0.4421294589150075) + tdSql.checkData(24, 0, 0.4362085839710631) + tdSql.checkData(25, 0, 0.43067655807339306) + tdSql.checkData(26, 0, 0.4254921071067263) + tdSql.checkData(27, 0, 0.42061983571430495) + tdSql.checkData(28, 0, 0.4160291953530189) + tdSql.checkData(29, 0, 0.4116936649208689) + tdSql.checkData(30, 0, 0.40759009418101233) + tdSql.checkData(31, 0, 0.4036981731641997) + tdSql.checkData(32, 0, 0.39999999999999997) + tdSql.checkData(33, 0, 0.39647972634112105) + tdSql.checkData(34, 0, 0.39312326446564516) + tdSql.checkData(35, 0, 0.3899180437875726) + tdSql.checkData(36, 0, 0.3868528072345416) + tdSql.checkData(37, 0, 0.3839174400131203) + tdSql.checkData(38, 0, 0.3811028248535468) + tdSql.checkData(39, 0, 0.37840071903374006) + tdSql.checkData(40, 0, 0.37580364941821515) + tdSql.checkData(41, 0, 0.3733048224778867) + tdSql.checkData(42, 0, 0.3708980468307378) + tdSql.checkData(43, 0, 0.36857766629741234) + tdSql.checkData(44, 0, 0.36633850182726724) + tdSql.checkData(45, 0, 0.3641758009398765) + tdSql.checkData(46, 0, 0.3620851935600804) + tdSql.checkData(47, 0, 0.3600626533133853) + tdSql.checkData(48, 0, 0.3581044635020827) + tdSql.checkData(49, 0, 0.3562071871080222) + tdSql.checkData(50, 0, -1.0) + tdSql.checkData(51, 0, inf) + tdSql.checkData(52, 0, 2.0) + tdSql.checkData(53, 0, 1.2618595071429148) + tdSql.checkData(54, 0, 1.0) + tdSql.checkData(55, 0, 0.8613531161467861) + tdSql.checkData(56, 0, 0.7737056144690831) + tdSql.checkData(57, 0, 0.7124143742160444) + tdSql.checkData(58, 0, 0.6666666666666667) + tdSql.checkData(59, 0, 0.6309297535714574) + tdSql.checkData(60, 0, 0.6020599913279623) + tdSql.checkData(61, 0, 0.5781296526357756) + tdSql.checkData(62, 0, 0.5578858913022596) + tdSql.checkData(63, 0, 0.5404763088546395) + tdSql.checkData(64, 0, 0.5252990700743871) + tdSql.checkData(65, 0, 0.511916049619631) + tdSql.checkData(66, 0, 0.5) + tdSql.checkData(67, 0, 0.489301084236452) + tdSql.checkData(68, 0, 0.4796249331362629) + tdSql.checkData(69, 0, 0.4708178267332765) + tdSql.checkData(70, 0, 0.46275642631951835) + tdSql.checkData(71, 0, 0.455340497393906) + tdSql.checkData(72, 0, 0.4484876484351508) + tdSql.checkData(73, 0, 0.4421294589150075) + tdSql.checkData(74, 0, 0.4362085839710631) + tdSql.checkData(75, 0, 0.43067655807339306) + tdSql.checkData(76, 0, 0.4254921071067263) + tdSql.checkData(77, 0, 0.42061983571430495) + tdSql.checkData(78, 0, 0.4160291953530189) + tdSql.checkData(79, 0, 0.4116936649208689) + tdSql.checkData(80, 0, 0.40759009418101233) + tdSql.checkData(81, 0, 0.4036981731641997) + tdSql.checkData(82, 0, 0.39999999999999997) + tdSql.checkData(83, 0, 0.39647972634112105) + tdSql.checkData(84, 0, 0.39312326446564516) + tdSql.checkData(85, 0, 0.3899180437875726) + tdSql.checkData(86, 0, 0.3868528072345416) + tdSql.checkData(87, 0, 0.3839174400131203) + tdSql.checkData(88, 0, 0.3811028248535468) + tdSql.checkData(89, 0, 0.37840071903374006) + tdSql.checkData(90, 0, 0.37580364941821515) + tdSql.checkData(91, 0, 0.3733048224778867) + tdSql.checkData(92, 0, 0.3708980468307378) + tdSql.checkData(93, 0, 0.36857766629741234) + tdSql.checkData(94, 0, 0.36633850182726724) + tdSql.checkData(95, 0, 0.3641758009398765) + tdSql.checkData(96, 0, 0.3620851935600804) + tdSql.checkData(97, 0, 0.3600626533133853) + tdSql.checkData(98, 0, 0.3581044635020827) + tdSql.checkData(99, 0, 0.3562071871080222) + + tdSql.query("select round(log(pow(length(concat('3','4')),2),c2)+floor(c3))+2 from st0;") + tdSql.checkRows(100) + tdSql.checkData(0, 0, 1.0) + tdSql.checkData(1, 0, inf) + tdSql.checkData(2, 0, 6.0) + tdSql.checkData(3, 0, 6.0) + tdSql.checkData(4, 0, 7.0) + tdSql.checkData(5, 0, 8.0) + tdSql.checkData(6, 0, 9.0) + tdSql.checkData(7, 0, 10.0) + tdSql.checkData(8, 0, 11.0) + tdSql.checkData(9, 0, 12.0) + tdSql.checkData(10, 0, 13.0) + tdSql.checkData(11, 0, 14.0) + tdSql.checkData(12, 0, 15.0) + tdSql.checkData(13, 0, 16.0) + tdSql.checkData(14, 0, 17.0) + tdSql.checkData(15, 0, 18.0) + tdSql.checkData(16, 0, 19.0) + tdSql.checkData(17, 0, 19.0) + tdSql.checkData(18, 0, 20.0) + tdSql.checkData(19, 0, 21.0) + tdSql.checkData(20, 0, 22.0) + tdSql.checkData(21, 0, 23.0) + tdSql.checkData(22, 0, 24.0) + tdSql.checkData(23, 0, 25.0) + tdSql.checkData(24, 0, 26.0) + tdSql.checkData(25, 0, 27.0) + tdSql.checkData(26, 0, 28.0) + tdSql.checkData(27, 0, 29.0) + tdSql.checkData(28, 0, 30.0) + tdSql.checkData(29, 0, 31.0) + tdSql.checkData(30, 0, 32.0) + tdSql.checkData(31, 0, 33.0) + tdSql.checkData(32, 0, 34.0) + tdSql.checkData(33, 0, 35.0) + tdSql.checkData(34, 0, 36.0) + tdSql.checkData(35, 0, 37.0) + tdSql.checkData(36, 0, 38.0) + tdSql.checkData(37, 0, 39.0) + tdSql.checkData(38, 0, 40.0) + tdSql.checkData(39, 0, 41.0) + tdSql.checkData(40, 0, 42.0) + tdSql.checkData(41, 0, 43.0) + tdSql.checkData(42, 0, 44.0) + tdSql.checkData(43, 0, 45.0) + tdSql.checkData(44, 0, 46.0) + tdSql.checkData(45, 0, 47.0) + tdSql.checkData(46, 0, 48.0) + tdSql.checkData(47, 0, 49.0) + tdSql.checkData(48, 0, 50.0) + tdSql.checkData(49, 0, 51.0) + tdSql.checkData(50, 0, 1.0) + tdSql.checkData(51, 0, inf) + tdSql.checkData(52, 0, 6.0) + tdSql.checkData(53, 0, 6.0) + tdSql.checkData(54, 0, 7.0) + tdSql.checkData(55, 0, 8.0) + tdSql.checkData(56, 0, 9.0) + tdSql.checkData(57, 0, 10.0) + tdSql.checkData(58, 0, 11.0) + tdSql.checkData(59, 0, 12.0) + tdSql.checkData(60, 0, 13.0) + tdSql.checkData(61, 0, 14.0) + tdSql.checkData(62, 0, 15.0) + tdSql.checkData(63, 0, 16.0) + tdSql.checkData(64, 0, 17.0) + tdSql.checkData(65, 0, 18.0) + tdSql.checkData(66, 0, 19.0) + tdSql.checkData(67, 0, 19.0) + tdSql.checkData(68, 0, 20.0) + tdSql.checkData(69, 0, 21.0) + tdSql.checkData(70, 0, 22.0) + tdSql.checkData(71, 0, 23.0) + tdSql.checkData(72, 0, 24.0) + tdSql.checkData(73, 0, 25.0) + tdSql.checkData(74, 0, 26.0) + tdSql.checkData(75, 0, 27.0) + tdSql.checkData(76, 0, 28.0) + tdSql.checkData(77, 0, 29.0) + tdSql.checkData(78, 0, 30.0) + tdSql.checkData(79, 0, 31.0) + tdSql.checkData(80, 0, 32.0) + tdSql.checkData(81, 0, 33.0) + tdSql.checkData(82, 0, 34.0) + tdSql.checkData(83, 0, 35.0) + tdSql.checkData(84, 0, 36.0) + tdSql.checkData(85, 0, 37.0) + tdSql.checkData(86, 0, 38.0) + tdSql.checkData(87, 0, 39.0) + tdSql.checkData(88, 0, 40.0) + tdSql.checkData(89, 0, 41.0) + tdSql.checkData(90, 0, 42.0) + tdSql.checkData(91, 0, 43.0) + tdSql.checkData(92, 0, 44.0) + tdSql.checkData(93, 0, 45.0) + tdSql.checkData(94, 0, 46.0) + tdSql.checkData(95, 0, 47.0) + tdSql.checkData(96, 0, 48.0) + tdSql.checkData(97, 0, 49.0) + tdSql.checkData(98, 0, 50.0) + tdSql.checkData(99, 0, 51.0) + + tdSql.query('select sin(pow(c1,log(c2,2))+pow(c2,2)) as val from ct0 union all select pow(c4,2)+tan(sin(c5)/cos(c6)) as val from ct1;') + tdSql.checkRows(100) + tdSql.checkData(0, 0, None) + tdSql.checkData(1, 0, 0.9092974268256817) + tdSql.checkData(2, 0, -0.27941549819892586) + tdSql.checkData(3, 0, 0.8433250578156978) + tdSql.checkData(4, 0, 0.5514266812416906) + tdSql.checkData(5, 0, -0.8406066116666611) + tdSql.checkData(6, 0, 0.43616107578365054) + tdSql.checkData(7, 0, 0.8974981847584117) + tdSql.checkData(8, 0, -0.8859527784925297) + tdSql.checkData(9, 0, 0.42947071474131504) + tdSql.checkData(10, 0, -0.4990148939921768) + tdSql.checkData(11, 0, -0.9668503083455382) + tdSql.checkData(12, 0, -0.37127069611623675) + tdSql.checkData(13, 0, 0.2583602129593735) + tdSql.checkData(14, 0, -0.34510090189538883) + tdSql.checkData(15, 0, 0.8660995395285155) + tdSql.checkData(16, 0, 0.6937252720798969) + tdSql.checkData(17, 0, -0.992591182028628) + tdSql.checkData(18, 0, -0.9291960033052914) + tdSql.checkData(19, 0, -0.011614784632622178) + tdSql.checkData(20, 0, -0.4106856453154767) + tdSql.checkData(21, 0, -0.36067689504566286) + tdSql.checkData(22, 0, 0.9703087105252133) + tdSql.checkData(23, 0, 0.3329834227491301) + tdSql.checkData(24, 0, -0.7486629772768763) + tdSql.checkData(25, 0, -0.971394847828127) + tdSql.checkData(26, 0, 0.5985902145855062) + tdSql.checkData(27, 0, -0.49186655944242286) + tdSql.checkData(28, 0, -0.4105290272382008) + tdSql.checkData(29, 0, -0.202908293443662) + tdSql.checkData(30, 0, -0.9672568013002486) + tdSql.checkData(31, 0, -0.9144905798912761) + tdSql.checkData(32, 0, -0.930013601079518) + tdSql.checkData(33, 0, 0.004918394988330845) + tdSql.checkData(34, 0, 0.720122562285698) + tdSql.checkData(35, 0, 0.931470218951081) + tdSql.checkData(36, 0, 0.8941486584814015) + tdSql.checkData(37, 0, 0.6498985856147372) + tdSql.checkData(38, 0, -0.9337541085366605) + tdSql.checkData(39, 0, -0.7860584458249767) + tdSql.checkData(40, 0, 0.9097616965457492) + tdSql.checkData(41, 0, 0.9262772442878136) + tdSql.checkData(42, 0, 0.9002636423705703) + tdSql.checkData(43, 0, 0.9333612649834834) + tdSql.checkData(44, 0, 0.08098252188677987) + tdSql.checkData(45, 0, -0.2669453821977269) + tdSql.checkData(46, 0, -0.9864147915539295) + tdSql.checkData(47, 0, 0.7905555341403578) + tdSql.checkData(48, 0, 0.9930380419415296) + tdSql.checkData(49, 0, -0.11973938558937497) + tdSql.checkData(50, 0, 0.0) + tdSql.checkData(51, 0, 75.68593339876413) + tdSql.checkData(52, 0, 5.417928575505387) + tdSql.checkData(53, 0, 8.85648005221507) + tdSql.checkData(54, 0, 18.282204450191365) + tdSql.checkData(55, 0, 24.756425180209273) + tdSql.checkData(56, 0, 35.7004910910186) + tdSql.checkData(57, 0, 50.188813241198766) + tdSql.checkData(58, 0, 63.43204170645191) + tdSql.checkData(59, 0, 80.51408573049088) + tdSql.checkData(60, 0, 100.75762114788726) + tdSql.checkData(61, 0, 121.24877416559158) + tdSql.checkData(62, 0, 143.26187154057212) + tdSql.checkData(63, 0, 169.49921715003558) + tdSql.checkData(64, 0, 197.43268735470073) + tdSql.checkData(65, 0, 223.84781294184071) + tdSql.checkData(66, 0, 256.31002912578884) + tdSql.checkData(67, 0, 289.36766325453783) + tdSql.checkData(68, 0, 321.83943972533865) + tdSql.checkData(69, 0, 361.1527613871425) + tdSql.checkData(70, 0, 398.72830803672844) + tdSql.checkData(71, 0, 417.9185722713414) + tdSql.checkData(72, 0, 484.00885188723004) + tdSql.checkData(73, 0, 471.3913348423639) + tdSql.checkData(74, 0, 577.5805869142416) + tdSql.checkData(75, 0, 624.8656743315343) + tdSql.checkData(76, 0, 678.4187022341146) + tdSql.checkData(77, 0, 728.8671148549121) + tdSql.checkData(78, 0, 783.7108972216736) + tdSql.checkData(79, 0, 842.2274126544997) + tdSql.checkData(80, 0, 899.877243006616) + tdSql.checkData(81, 0, 960.5271464519064) + tdSql.checkData(82, 0, 1024.7777181923664) + tdSql.checkData(83, 0, 1089.0854157079946) + tdSql.checkData(84, 0, 1155.2807954785546) + tdSql.checkData(85, 0, 1225.5127742681332) + tdSql.checkData(86, 0, 1305.6263061095037) + tdSql.checkData(87, 0, 1367.8826349729482) + tdSql.checkData(88, 0, 1444.32066897418) + tdSql.checkData(89, 0, 1521.5116974949854) + tdSql.checkData(90, 0, 1597.9486330581901) + tdSql.checkData(91, 0, 1681.1620533335488) + tdSql.checkData(92, 0, 1762.8611973159218) + tdSql.checkData(93, 0, 1835.2137045408574) + tdSql.checkData(94, 0, 1936.0177065493942) + tdSql.checkData(95, 0, 2004.599358732067) + tdSql.checkData(96, 0, 2117.763602992286) + tdSql.checkData(97, 0, 2208.874824726169) + tdSql.checkData(98, 0, 2306.5731210183926) + tdSql.checkData(99, 0, 2400.9686738603973) + + tdSql.query('select asin(c1) from st0 limit 1;') + tdSql.checkRows(1) + tdSql.checkData(0, 0, 0.0) + + tdSql.query('select pow(c1,2) from st0 limit 1 offset 2;;') + tdSql.checkRows(1) + tdSql.checkData(0, 0, 4.0) + + tdSql.query('select cos(c1) from db0.ct0, db0.ct1 where ct0.ts==ct1.ts;') + tdSql.checkRows(50) + tdSql.checkData(0, 0, 1.0) + tdSql.checkData(1, 0, 0.5403023058681398) + tdSql.checkData(2, 0, -0.4161468365471424) + tdSql.checkData(3, 0, -0.9899924966004454) + tdSql.checkData(4, 0, -0.6536436208636119) + tdSql.checkData(5, 0, 0.28366218546322625) + tdSql.checkData(6, 0, 0.960170286650366) + tdSql.checkData(7, 0, 0.7539022543433046) + tdSql.checkData(8, 0, -0.14550003380861354) + tdSql.checkData(9, 0, -0.9111302618846769) + tdSql.checkData(10, 0, -0.8390715290764524) + tdSql.checkData(11, 0, 0.004425697988050785) + tdSql.checkData(12, 0, 0.8438539587324921) + tdSql.checkData(13, 0, 0.9074467814501962) + tdSql.checkData(14, 0, 0.1367372182078336) + tdSql.checkData(15, 0, -0.7596879128588213) + tdSql.checkData(16, 0, -0.9576594803233847) + tdSql.checkData(17, 0, -0.27516333805159693) + tdSql.checkData(18, 0, 0.6603167082440802) + tdSql.checkData(19, 0, 0.9887046181866692) + tdSql.checkData(20, 0, 0.40808206181339196) + tdSql.checkData(21, 0, -0.5477292602242684) + tdSql.checkData(22, 0, -0.9999608263946371) + tdSql.checkData(23, 0, -0.5328330203333975) + tdSql.checkData(24, 0, 0.424179007336997) + tdSql.checkData(25, 0, 0.9912028118634736) + tdSql.checkData(26, 0, 0.6469193223286404) + tdSql.checkData(27, 0, -0.2921388087338362) + tdSql.checkData(28, 0, -0.9626058663135666) + tdSql.checkData(29, 0, -0.7480575296890003) + tdSql.checkData(30, 0, 0.15425144988758405) + tdSql.checkData(31, 0, 0.9147423578045313) + tdSql.checkData(32, 0, 0.8342233605065102) + tdSql.checkData(33, 0, -0.013276747223059479) + tdSql.checkData(34, 0, -0.8485702747846052) + tdSql.checkData(35, 0, -0.9036922050915067) + tdSql.checkData(36, 0, -0.12796368962740468) + tdSql.checkData(37, 0, 0.7654140519453434) + tdSql.checkData(38, 0, 0.9550736440472949) + tdSql.checkData(39, 0, 0.26664293235993725) + tdSql.checkData(40, 0, -0.6669380616522619) + tdSql.checkData(41, 0, -0.9873392775238264) + tdSql.checkData(42, 0, -0.39998531498835127) + tdSql.checkData(43, 0, 0.5551133015206257) + tdSql.checkData(44, 0, 0.9998433086476912) + tdSql.checkData(45, 0, 0.5253219888177297) + tdSql.checkData(46, 0, -0.4321779448847783) + tdSql.checkData(47, 0, -0.9923354691509287) + tdSql.checkData(48, 0, -0.6401443394691997) + tdSql.checkData(49, 0, 0.3005925437436371) + + tdSql.query('select sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(c1)))))))))))))))) from st0;') + tdSql.checkRows(100) + tdSql.checkData(0, 0, 0.0) + tdSql.checkData(1, 0, 0.38515571309652635) + tdSql.checkData(2, 0, 0.3902026038089464) + tdSql.checkData(3, 0, 0.13455542224130787) + tdSql.checkData(4, 0, -0.3769735598744493) + tdSql.checkData(5, 0, -0.39322796903554574) + tdSql.checkData(6, 0, -0.23651996268319414) + tdSql.checkData(7, 0, 0.3636586143033131) + tdSql.checkData(8, 0, 0.3948481297132482) + tdSql.checkData(9, 0, 0.3013035615379907) + tdSql.checkData(10, 0, -0.3415979020470687) + tdSql.checkData(11, 0, -0.3953760693679444) + tdSql.checkData(12, 0, -0.33980128729652753) + tdSql.checkData(13, 0, 0.30435222656468974) + tdSql.checkData(14, 0, 0.39491114169715646) + tdSql.checkData(15, 0, 0.3625854118079003) + tdSql.checkData(16, 0, -0.24157669718552427) + tdSql.checkData(17, 0, -0.3933659195685728) + tdSql.checkData(18, 0, -0.37631897787570007) + tdSql.checkData(19, 0, 0.14207823704465328) + tdSql.checkData(20, 0, 0.39044261434523814) + tdSql.checkData(21, 0, 0.3847512959295267) + tdSql.checkData(22, 0, -0.008849576117906611) + tdSql.checkData(23, 0, -0.3855481500830306) + tdSql.checkData(24, 0, -0.38995484687725573) + tdSql.checkData(25, 0, -0.126893408273143) + tdSql.checkData(26, 0, 0.37760858396391034) + tdSql.checkData(27, 0, 0.39308462128198374) + tdSql.checkData(28, 0, 0.23131327316607625) + tdSql.checkData(29, 0, -0.3646985418138878) + tdSql.checkData(30, 0, -0.3947809161937072) + tdSql.checkData(31, 0, -0.29815291606002575) + tdSql.checkData(32, 0, 0.3433365642562851) + tdSql.checkData(33, 0, 0.39537224788827796) + tdSql.checkData(34, 0, 0.3379446735775925) + tdSql.checkData(35, 0, -0.3073019994396687) + tdSql.checkData(36, 0, -0.3949699977540669) + tdSql.checkData(37, 0, -0.3614777744074771) + tdSql.checkData(38, 0, 0.24648579565525397) + tdSql.checkData(39, 0, 0.39349857640819885) + tdSql.checkData(40, 0, 0.37564419916566116) + tdSql.checkData(41, 0, -0.14945748476886428) + tdSql.checkData(42, 0, -0.3906750702498718) + tdSql.checkData(43, 0, -0.3843345435654991) + tdSql.checkData(44, 0, 0.017688072907053588) + tdSql.checkData(45, 0, 0.3859289492584567) + tdSql.checkData(46, 0, 0.38969914464525074) + tdSql.checkData(47, 0, 0.11909715912089874) + tdSql.checkData(48, 0, -0.3782246656581614) + tdSql.checkData(49, 0, -0.392935768393244) + tdSql.checkData(50, 0, 0.0) + tdSql.checkData(51, 0, 0.38515571309652635) + tdSql.checkData(52, 0, 0.3902026038089464) + tdSql.checkData(53, 0, 0.13455542224130787) + tdSql.checkData(54, 0, -0.3769735598744493) + tdSql.checkData(55, 0, -0.39322796903554574) + tdSql.checkData(56, 0, -0.23651996268319414) + tdSql.checkData(57, 0, 0.3636586143033131) + tdSql.checkData(58, 0, 0.3948481297132482) + tdSql.checkData(59, 0, 0.3013035615379907) + tdSql.checkData(60, 0, -0.3415979020470687) + tdSql.checkData(61, 0, -0.3953760693679444) + tdSql.checkData(62, 0, -0.33980128729652753) + tdSql.checkData(63, 0, 0.30435222656468974) + tdSql.checkData(64, 0, 0.39491114169715646) + tdSql.checkData(65, 0, 0.3625854118079003) + tdSql.checkData(66, 0, -0.24157669718552427) + tdSql.checkData(67, 0, -0.3933659195685728) + tdSql.checkData(68, 0, -0.37631897787570007) + tdSql.checkData(69, 0, 0.14207823704465328) + tdSql.checkData(70, 0, 0.39044261434523814) + tdSql.checkData(71, 0, 0.3847512959295267) + tdSql.checkData(72, 0, -0.008849576117906611) + tdSql.checkData(73, 0, -0.3855481500830306) + tdSql.checkData(74, 0, -0.38995484687725573) + tdSql.checkData(75, 0, -0.126893408273143) + tdSql.checkData(76, 0, 0.37760858396391034) + tdSql.checkData(77, 0, 0.39308462128198374) + tdSql.checkData(78, 0, 0.23131327316607625) + tdSql.checkData(79, 0, -0.3646985418138878) + tdSql.checkData(80, 0, -0.3947809161937072) + tdSql.checkData(81, 0, -0.29815291606002575) + tdSql.checkData(82, 0, 0.3433365642562851) + tdSql.checkData(83, 0, 0.39537224788827796) + tdSql.checkData(84, 0, 0.3379446735775925) + tdSql.checkData(85, 0, -0.3073019994396687) + tdSql.checkData(86, 0, -0.3949699977540669) + tdSql.checkData(87, 0, -0.3614777744074771) + tdSql.checkData(88, 0, 0.24648579565525397) + tdSql.checkData(89, 0, 0.39349857640819885) + tdSql.checkData(90, 0, 0.37564419916566116) + tdSql.checkData(91, 0, -0.14945748476886428) + tdSql.checkData(92, 0, -0.3906750702498718) + tdSql.checkData(93, 0, -0.3843345435654991) + tdSql.checkData(94, 0, 0.017688072907053588) + tdSql.checkData(95, 0, 0.3859289492584567) + tdSql.checkData(96, 0, 0.38969914464525074) + tdSql.checkData(97, 0, 0.11909715912089874) + tdSql.checkData(98, 0, -0.3782246656581614) + tdSql.checkData(99, 0, -0.392935768393244) + + tdSql.execute('drop database db0;') + + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/develop-test/2-query/scalar_triangle.py b/tests/develop-test/2-query/scalar_triangle.py new file mode 100644 index 0000000000000000000000000000000000000000..0dbb55bc556c06afcfb243ada698b4eaca2a64f3 --- /dev/null +++ b/tests/develop-test/2-query/scalar_triangle.py @@ -0,0 +1,4167 @@ +import sys +from util.log import * +from util.cases import * +from util.sql import * +from util.dnodes import tdDnodes +from math import inf + +class TDTestCase: + def caseDescription(self): + ''' + case1: [TD-14122]: fix failed test on arm64 by converting from sim tst to python test to overcome NaN value and its string representation + ''' + return + + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + self._conn = conn + + def restartTaosd(self, index=1, dbname="db"): + tdDnodes.stop(index) + tdDnodes.startWithoutSleep(index) + tdSql.execute(f"use db0") + + def run(self): + print("running {}".format(__file__)) + tdSql.execute("drop database if exists db0") + tdSql.execute("create database if not exists db0") + tdSql.execute('use db0') + tdSql.execute('create table st0 (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 nchar(5), c9 binary(10)) TAGS (tgcol int);') + + tdSql.execute('create table ct0 using st0 tags( 0 );') + tdSql.execute('insert into ct0 values (1601481600000 , 0 , 0.25 , 0 , 0 , 0 , 0.25 , 0 , 0 , 0 );') + for i in range(1, 50): + tdSql.execute('insert into ct0 values ({}, {}, {}, {}, {}, {}, {}, {}, {}, {});'.format(1601481600000 + i * 60000, + i , i , i , i , i , i , i , i , i )) + + tdSql.execute('create table ct1 using st0 tags( 1 );') + tdSql.execute('insert into ct1 values (1601481600000 , 0 , 0.25 , 0 , 0 , 0 , 0.25 , 0 , 0 , 0 );') + for i in range(1, 50): + tdSql.execute('insert into ct1 values ({}, {}, {}, {}, {}, {}, {}, {}, {}, {});'.format(1601481600000 + i * 60000, + i , i , i , i , i , i , i , i , i )) + + + tdSql.query('select c1, sin(c1), cos(c1), tan(c1), asin(c1), acos(c1), atan(c1) from ct1;') + tdSql.checkRows(50) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 0.0) + tdSql.checkData(0, 2, 1.0) + tdSql.checkData(0, 3, 0.0) + tdSql.checkData(0, 4, 0.0) + tdSql.checkData(0, 5, 1.5707963267948966) + tdSql.checkData(0, 6, 0.0) + tdSql.checkData(1, 0, 1) + tdSql.checkData(1, 1, 0.8414709848078965) + tdSql.checkData(1, 2, 0.5403023058681398) + tdSql.checkData(1, 3, 1.5574077246549023) + tdSql.checkData(1, 4, 1.5707963267948966) + tdSql.checkData(1, 5, 0.0) + tdSql.checkData(1, 6, 0.7853981633974483) + tdSql.checkData(2, 0, 2) + tdSql.checkData(2, 1, 0.9092974268256817) + tdSql.checkData(2, 2, -0.4161468365471424) + tdSql.checkData(2, 3, -2.185039863261519) + tdSql.checkData(2, 4, None) + tdSql.checkData(2, 5, None) + tdSql.checkData(2, 6, 1.1071487177940904) + tdSql.checkData(3, 0, 3) + tdSql.checkData(3, 1, 0.1411200080598672) + tdSql.checkData(3, 2, -0.9899924966004454) + tdSql.checkData(3, 3, -0.1425465430742778) + tdSql.checkData(3, 4, None) + tdSql.checkData(3, 5, None) + tdSql.checkData(3, 6, 1.2490457723982544) + tdSql.checkData(4, 0, 4) + tdSql.checkData(4, 1, -0.7568024953079282) + tdSql.checkData(4, 2, -0.6536436208636119) + tdSql.checkData(4, 3, 1.1578212823495775) + tdSql.checkData(4, 4, None) + tdSql.checkData(4, 5, None) + tdSql.checkData(4, 6, 1.3258176636680326) + tdSql.checkData(5, 0, 5) + tdSql.checkData(5, 1, -0.9589242746631385) + tdSql.checkData(5, 2, 0.28366218546322625) + tdSql.checkData(5, 3, -3.380515006246586) + tdSql.checkData(5, 4, None) + tdSql.checkData(5, 5, None) + tdSql.checkData(5, 6, 1.373400766945016) + tdSql.checkData(6, 0, 6) + tdSql.checkData(6, 1, -0.27941549819892586) + tdSql.checkData(6, 2, 0.960170286650366) + tdSql.checkData(6, 3, -0.29100619138474915) + tdSql.checkData(6, 4, None) + tdSql.checkData(6, 5, None) + tdSql.checkData(6, 6, 1.4056476493802699) + tdSql.checkData(7, 0, 7) + tdSql.checkData(7, 1, 0.6569865987187891) + tdSql.checkData(7, 2, 0.7539022543433046) + tdSql.checkData(7, 3, 0.8714479827243188) + tdSql.checkData(7, 4, None) + tdSql.checkData(7, 5, None) + tdSql.checkData(7, 6, 1.4288992721907328) + tdSql.checkData(8, 0, 8) + tdSql.checkData(8, 1, 0.9893582466233818) + tdSql.checkData(8, 2, -0.14550003380861354) + tdSql.checkData(8, 3, -6.799711455220379) + tdSql.checkData(8, 4, None) + tdSql.checkData(8, 5, None) + tdSql.checkData(8, 6, 1.446441332248135) + tdSql.checkData(9, 0, 9) + tdSql.checkData(9, 1, 0.4121184852417566) + tdSql.checkData(9, 2, -0.9111302618846769) + tdSql.checkData(9, 3, -0.45231565944180985) + tdSql.checkData(9, 4, None) + tdSql.checkData(9, 5, None) + tdSql.checkData(9, 6, 1.460139105621001) + tdSql.checkData(10, 0, 10) + tdSql.checkData(10, 1, -0.5440211108893698) + tdSql.checkData(10, 2, -0.8390715290764524) + tdSql.checkData(10, 3, 0.6483608274590866) + tdSql.checkData(10, 4, None) + tdSql.checkData(10, 5, None) + tdSql.checkData(10, 6, 1.4711276743037347) + tdSql.checkData(11, 0, 11) + tdSql.checkData(11, 1, -0.9999902065507035) + tdSql.checkData(11, 2, 0.004425697988050785) + tdSql.checkData(11, 3, -225.95084645419513) + tdSql.checkData(11, 4, None) + tdSql.checkData(11, 5, None) + tdSql.checkData(11, 6, 1.4801364395941514) + tdSql.checkData(12, 0, 12) + tdSql.checkData(12, 1, -0.5365729180004349) + tdSql.checkData(12, 2, 0.8438539587324921) + tdSql.checkData(12, 3, -0.6358599286615808) + tdSql.checkData(12, 4, None) + tdSql.checkData(12, 5, None) + tdSql.checkData(12, 6, 1.4876550949064553) + tdSql.checkData(13, 0, 13) + tdSql.checkData(13, 1, 0.4201670368266409) + tdSql.checkData(13, 2, 0.9074467814501962) + tdSql.checkData(13, 3, 0.4630211329364896) + tdSql.checkData(13, 4, None) + tdSql.checkData(13, 5, None) + tdSql.checkData(13, 6, 1.4940244355251187) + tdSql.checkData(14, 0, 14) + tdSql.checkData(14, 1, 0.9906073556948704) + tdSql.checkData(14, 2, 0.1367372182078336) + tdSql.checkData(14, 3, 7.2446066160948055) + tdSql.checkData(14, 4, None) + tdSql.checkData(14, 5, None) + tdSql.checkData(14, 6, 1.4994888620096063) + tdSql.checkData(15, 0, 15) + tdSql.checkData(15, 1, 0.6502878401571168) + tdSql.checkData(15, 2, -0.7596879128588213) + tdSql.checkData(15, 3, -0.8559934009085187) + tdSql.checkData(15, 4, None) + tdSql.checkData(15, 5, None) + tdSql.checkData(15, 6, 1.5042281630190728) + tdSql.checkData(16, 0, 16) + tdSql.checkData(16, 1, -0.2879033166650653) + tdSql.checkData(16, 2, -0.9576594803233847) + tdSql.checkData(16, 3, 0.3006322420239034) + tdSql.checkData(16, 4, None) + tdSql.checkData(16, 5, None) + tdSql.checkData(16, 6, 1.5083775167989393) + tdSql.checkData(17, 0, 17) + tdSql.checkData(17, 1, -0.9613974918795568) + tdSql.checkData(17, 2, -0.27516333805159693) + tdSql.checkData(17, 3, 3.49391564547484) + tdSql.checkData(17, 4, None) + tdSql.checkData(17, 5, None) + tdSql.checkData(17, 6, 1.512040504079174) + tdSql.checkData(18, 0, 18) + tdSql.checkData(18, 1, -0.750987246771676) + tdSql.checkData(18, 2, 0.6603167082440802) + tdSql.checkData(18, 3, -1.1373137123376869) + tdSql.checkData(18, 4, None) + tdSql.checkData(18, 5, None) + tdSql.checkData(18, 6, 1.5152978215491797) + tdSql.checkData(19, 0, 19) + tdSql.checkData(19, 1, 0.14987720966295234) + tdSql.checkData(19, 2, 0.9887046181866692) + tdSql.checkData(19, 3, 0.15158947061240008) + tdSql.checkData(19, 4, None) + tdSql.checkData(19, 5, None) + tdSql.checkData(19, 6, 1.5182132651839548) + tdSql.checkData(20, 0, 20) + tdSql.checkData(20, 1, 0.9129452507276277) + tdSql.checkData(20, 2, 0.40808206181339196) + tdSql.checkData(20, 3, 2.237160944224742) + tdSql.checkData(20, 4, None) + tdSql.checkData(20, 5, None) + tdSql.checkData(20, 6, 1.5208379310729538) + tdSql.checkData(21, 0, 21) + tdSql.checkData(21, 1, 0.8366556385360561) + tdSql.checkData(21, 2, -0.5477292602242684) + tdSql.checkData(21, 3, -1.5274985276366035) + tdSql.checkData(21, 4, None) + tdSql.checkData(21, 5, None) + tdSql.checkData(21, 6, 1.5232132235179132) + tdSql.checkData(22, 0, 22) + tdSql.checkData(22, 1, -0.008851309290403876) + tdSql.checkData(22, 2, -0.9999608263946371) + tdSql.checkData(22, 3, 0.00885165604168446) + tdSql.checkData(22, 4, None) + tdSql.checkData(22, 5, None) + tdSql.checkData(22, 6, 1.5253730473733196) + tdSql.checkData(23, 0, 23) + tdSql.checkData(23, 1, -0.8462204041751706) + tdSql.checkData(23, 2, -0.5328330203333975) + tdSql.checkData(23, 3, 1.5881530833912738) + tdSql.checkData(23, 4, None) + tdSql.checkData(23, 5, None) + tdSql.checkData(23, 6, 1.5273454314033659) + tdSql.checkData(24, 0, 24) + tdSql.checkData(24, 1, -0.9055783620066239) + tdSql.checkData(24, 2, 0.424179007336997) + tdSql.checkData(24, 3, -2.1348966977217008) + tdSql.checkData(24, 4, None) + tdSql.checkData(24, 5, None) + tdSql.checkData(24, 6, 1.5291537476963082) + tdSql.checkData(25, 0, 25) + tdSql.checkData(25, 1, -0.13235175009777303) + tdSql.checkData(25, 2, 0.9912028118634736) + tdSql.checkData(25, 3, -0.13352640702153587) + tdSql.checkData(25, 4, None) + tdSql.checkData(25, 5, None) + tdSql.checkData(25, 6, 1.5308176396716067) + tdSql.checkData(26, 0, 26) + tdSql.checkData(26, 1, 0.7625584504796027) + tdSql.checkData(26, 2, 0.6469193223286404) + tdSql.checkData(26, 3, 1.1787535542062797) + tdSql.checkData(26, 4, None) + tdSql.checkData(26, 5, None) + tdSql.checkData(26, 6, 1.5323537367737086) + tdSql.checkData(27, 0, 27) + tdSql.checkData(27, 1, 0.956375928404503) + tdSql.checkData(27, 2, -0.2921388087338362) + tdSql.checkData(27, 3, -3.273703800428119) + tdSql.checkData(27, 4, None) + tdSql.checkData(27, 5, None) + tdSql.checkData(27, 6, 1.5337762109209665) + tdSql.checkData(28, 0, 28) + tdSql.checkData(28, 1, 0.27090578830786904) + tdSql.checkData(28, 2, -0.9626058663135666) + tdSql.checkData(28, 3, -0.28142960456426525) + tdSql.checkData(28, 4, None) + tdSql.checkData(28, 5, None) + tdSql.checkData(28, 6, 1.5350972141155725) + tdSql.checkData(29, 0, 29) + tdSql.checkData(29, 1, -0.6636338842129675) + tdSql.checkData(29, 2, -0.7480575296890003) + tdSql.checkData(29, 3, 0.8871428437982151) + tdSql.checkData(29, 4, None) + tdSql.checkData(29, 5, None) + tdSql.checkData(29, 6, 1.5363272257953886) + tdSql.checkData(30, 0, 30) + tdSql.checkData(30, 1, -0.9880316240928618) + tdSql.checkData(30, 2, 0.15425144988758405) + tdSql.checkData(30, 3, -6.405331196646276) + tdSql.checkData(30, 4, None) + tdSql.checkData(30, 5, None) + tdSql.checkData(30, 6, 1.5374753309166493) + tdSql.checkData(31, 0, 31) + tdSql.checkData(31, 1, -0.404037645323065) + tdSql.checkData(31, 2, 0.9147423578045313) + tdSql.checkData(31, 3, -0.441695568020698) + tdSql.checkData(31, 4, None) + tdSql.checkData(31, 5, None) + tdSql.checkData(31, 6, 1.5385494443596428) + tdSql.checkData(32, 0, 32) + tdSql.checkData(32, 1, 0.5514266812416906) + tdSql.checkData(32, 2, 0.8342233605065102) + tdSql.checkData(32, 3, 0.6610060414837631) + tdSql.checkData(32, 4, None) + tdSql.checkData(32, 5, None) + tdSql.checkData(32, 6, 1.5395564933646284) + tdSql.checkData(33, 0, 33) + tdSql.checkData(33, 1, 0.9999118601072672) + tdSql.checkData(33, 2, -0.013276747223059479) + tdSql.checkData(33, 3, -75.31301480008509) + tdSql.checkData(33, 4, None) + tdSql.checkData(33, 5, None) + tdSql.checkData(33, 6, 1.5405025668761214) + tdSql.checkData(34, 0, 34) + tdSql.checkData(34, 1, 0.5290826861200238) + tdSql.checkData(34, 2, -0.8485702747846052) + tdSql.checkData(34, 3, -0.6234989627162255) + tdSql.checkData(34, 4, None) + tdSql.checkData(34, 5, None) + tdSql.checkData(34, 6, 1.5413930385908916) + tdSql.checkData(35, 0, 35) + tdSql.checkData(35, 1, -0.428182669496151) + tdSql.checkData(35, 2, -0.9036922050915067) + tdSql.checkData(35, 3, 0.473814720414451) + tdSql.checkData(35, 4, None) + tdSql.checkData(35, 5, None) + tdSql.checkData(35, 6, 1.5422326689561365) + tdSql.checkData(36, 0, 36) + tdSql.checkData(36, 1, -0.9917788534431158) + tdSql.checkData(36, 2, -0.12796368962740468) + tdSql.checkData(36, 3, 7.750470905699148) + tdSql.checkData(36, 4, None) + tdSql.checkData(36, 5, None) + tdSql.checkData(36, 6, 1.5430256902014756) + tdSql.checkData(37, 0, 37) + tdSql.checkData(37, 1, -0.6435381333569995) + tdSql.checkData(37, 2, 0.7654140519453434) + tdSql.checkData(37, 3, -0.8407712554027597) + tdSql.checkData(37, 4, None) + tdSql.checkData(37, 5, None) + tdSql.checkData(37, 6, 1.5437758776076318) + tdSql.checkData(38, 0, 38) + tdSql.checkData(38, 1, 0.2963685787093853) + tdSql.checkData(38, 2, 0.9550736440472949) + tdSql.checkData(38, 3, 0.310309660994801) + tdSql.checkData(38, 4, None) + tdSql.checkData(38, 5, None) + tdSql.checkData(38, 6, 1.5444866095419745) + tdSql.checkData(39, 0, 39) + tdSql.checkData(39, 1, 0.9637953862840878) + tdSql.checkData(39, 2, 0.26664293235993725) + tdSql.checkData(39, 3, 3.614554407101535) + tdSql.checkData(39, 4, None) + tdSql.checkData(39, 5, None) + tdSql.checkData(39, 6, 1.545160918273219) + tdSql.checkData(40, 0, 40) + tdSql.checkData(40, 1, 0.7451131604793488) + tdSql.checkData(40, 2, -0.6669380616522619) + tdSql.checkData(40, 3, -1.117214930923896) + tdSql.checkData(40, 4, None) + tdSql.checkData(40, 5, None) + tdSql.checkData(40, 6, 1.5458015331759765) + tdSql.checkData(41, 0, 41) + tdSql.checkData(41, 1, -0.158622668804709) + tdSql.checkData(41, 2, -0.9873392775238264) + tdSql.checkData(41, 3, 0.16065669868064283) + tdSql.checkData(41, 4, None) + tdSql.checkData(41, 5, None) + tdSql.checkData(41, 6, 1.546410917622178) + tdSql.checkData(42, 0, 42) + tdSql.checkData(42, 1, -0.9165215479156338) + tdSql.checkData(42, 2, -0.39998531498835127) + tdSql.checkData(42, 3, 2.2913879924374863) + tdSql.checkData(42, 4, None) + tdSql.checkData(42, 5, None) + tdSql.checkData(42, 6, 1.5469913006098266) + tdSql.checkData(43, 0, 43) + tdSql.checkData(43, 1, -0.8317747426285983) + tdSql.checkData(43, 2, 0.5551133015206257) + tdSql.checkData(43, 3, -1.4983873388551707) + tdSql.checkData(43, 4, None) + tdSql.checkData(43, 5, None) + tdSql.checkData(43, 6, 1.5475447039844337) + tdSql.checkData(44, 0, 44) + tdSql.checkData(44, 1, 0.017701925105413577) + tdSql.checkData(44, 2, 0.9998433086476912) + tdSql.checkData(44, 3, 0.017704699278685777) + tdSql.checkData(44, 4, None) + tdSql.checkData(44, 5, None) + tdSql.checkData(44, 6, 1.5480729659532555) + tdSql.checkData(45, 0, 45) + tdSql.checkData(45, 1, 0.8509035245341184) + tdSql.checkData(45, 2, 0.5253219888177297) + tdSql.checkData(45, 3, 1.6197751905438615) + tdSql.checkData(45, 4, None) + tdSql.checkData(45, 5, None) + tdSql.checkData(45, 6, 1.5485777614681775) + tdSql.checkData(46, 0, 46) + tdSql.checkData(46, 1, 0.9017883476488092) + tdSql.checkData(46, 2, -0.4321779448847783) + tdSql.checkData(46, 3, -2.086613531121382) + tdSql.checkData(46, 4, None) + tdSql.checkData(46, 5, None) + tdSql.checkData(46, 6, 1.5490606199531038) + tdSql.checkData(47, 0, 47) + tdSql.checkData(47, 1, 0.123573122745224) + tdSql.checkData(47, 2, -0.9923354691509287) + tdSql.checkData(47, 3, -0.12452756813273719) + tdSql.checkData(47, 4, None) + tdSql.checkData(47, 5, None) + tdSql.checkData(47, 6, 1.5495229407708355) + tdSql.checkData(48, 0, 48) + tdSql.checkData(48, 1, -0.7682546613236668) + tdSql.checkData(48, 2, -0.6401443394691997) + tdSql.checkData(48, 3, 1.2001272431162864) + tdSql.checkData(48, 4, None) + tdSql.checkData(48, 5, None) + tdSql.checkData(48, 6, 1.5499660067586796) + tdSql.checkData(49, 0, 49) + tdSql.checkData(49, 1, -0.9537526527594719) + tdSql.checkData(49, 2, 0.3005925437436371) + tdSql.checkData(49, 3, -3.172908552159191) + tdSql.checkData(49, 4, None) + tdSql.checkData(49, 5, None) + tdSql.checkData(49, 6, 1.5503909961083586) + + tdSql.query('select c1, sin(c2)+2, cos(c2)+2, cos(pow(c2,2)+2), tan(pow(c2,3)+log(c3, 2)+pow(c5,2)) as v4, asin(pow(c4, 4.5)+pow(c3, 2)), acos(log(c1,2)+log(c3,4)+pow(c6,2.8)+2) as v6 from ct1 where ts == 1601481600000;') + tdSql.checkRows(1) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 2.2474039592545227) + tdSql.checkData(0, 2, 2.9689124217106446) + tdSql.checkData(0, 3, -0.4721284112969602) + tdSql.checkData(0, 4, None) + tdSql.checkData(0, 5, 0.0) + tdSql.checkData(0, 6, None) + + tdSql.query('select c1, sin(c2), cos(c1+2), tan(c2+2)+2, sin(c2+3)+cos(c3+2)+tan(c5+2) as v4, sin(c4+4.5)+tan(c3+2), sin(c1+2)+cos(c3+4)+acos(c6+2.8)+2 as v6 from st0 where ts == 1601481600000;') + tdSql.checkRows(2) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 0.24740395925452294) + tdSql.checkData(0, 2, -0.4161468365471424) + tdSql.checkData(0, 3, 0.7613723837759034) + tdSql.checkData(0, 4, -2.7093818343387697) + tdSql.checkData(0, 5, -3.162569980926616) + tdSql.checkData(0, 6, None) + tdSql.checkData(1, 0, 0) + tdSql.checkData(1, 1, 0.24740395925452294) + tdSql.checkData(1, 2, -0.4161468365471424) + tdSql.checkData(1, 3, 0.7613723837759034) + tdSql.checkData(1, 4, -2.7093818343387697) + tdSql.checkData(1, 5, -3.162569980926616) + tdSql.checkData(1, 6, None) + + tdSql.query('select c1, tan(c2+ 2), sin(pow(c1,2)), cos(pow(c2,2)+2), tan(pow(c2,3)+log(c3, 2)+pow(c5,2)) as v4, asin(pow(c4, 4.5)+pow(c3, 2)), acos(log(c1,2)+log(c3,4)+pow(c6,2.8)+2) as v6 from st0 where c1 == 0;') + tdSql.checkRows(2) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, -1.2386276162240966) + tdSql.checkData(0, 2, 0.0) + tdSql.checkData(0, 3, -0.4721284112969602) + tdSql.checkData(0, 4, None) + tdSql.checkData(0, 5, 0.0) + tdSql.checkData(0, 6, None) + tdSql.checkData(1, 0, 0) + tdSql.checkData(1, 1, -1.2386276162240966) + tdSql.checkData(1, 2, 0.0) + tdSql.checkData(1, 3, -0.4721284112969602) + tdSql.checkData(1, 4, None) + tdSql.checkData(1, 5, 0.0) + tdSql.checkData(1, 6, None) + + tdSql.query('select c1, atan(c2+2), asin(c1+2), acos(c2+c1)+2, acos(c2+c3)+asin(c3+c2)+pow(c5,2) as v4, acos(c4/4.5)+asin(c3-2), asin(c1/2)+log(c3,c4)+pow(c6, 2.8)+2 as v6 from st0 where c1 == 0;') + tdSql.checkRows(2) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 1.1525719972156676) + tdSql.checkData(0, 2, None) + tdSql.checkData(0, 3, 3.3181160716528177) + tdSql.checkData(0, 4, 1.5707963267948966) + tdSql.checkData(0, 5, None) + tdSql.checkData(0, 6, None) + tdSql.checkData(1, 0, 0) + tdSql.checkData(1, 1, 1.1525719972156676) + tdSql.checkData(1, 2, None) + tdSql.checkData(1, 3, 3.3181160716528177) + tdSql.checkData(1, 4, 1.5707963267948966) + tdSql.checkData(1, 5, None) + tdSql.checkData(1, 6, None) + + tdSql.query('select c1, cos(c2+2), cos(ceil(pow(c1,2))), sin(floor(pow(c2,2)+2)), sin(ceil(c2)+floor(c3+c2)+round(c5+c2)) as v4, atan(pow(c4, 4.5)+pow(c3, 2)), tan(log(c1,2)+cos(c3+4)+pow(c6,2.8)+2) as v6 from st0 order by ts desc;') + tdSql.checkRows(100) + tdSql.checkData(0, 0, 49) + tdSql.checkData(0, 1, 0.7421541968137826) + tdSql.checkData(0, 2, 0.6798687696126814) + tdSql.checkData(0, 3, 0.3130283835205022) + tdSql.checkData(0, 4, -0.04421256322855966) + tdSql.checkData(0, 5, 1.5707963020154387) + tdSql.checkData(0, 6, 0.03652568194248612) + tdSql.checkData(1, 0, 49) + tdSql.checkData(1, 1, 0.7421541968137826) + tdSql.checkData(1, 2, 0.6798687696126814) + tdSql.checkData(1, 3, 0.3130283835205022) + tdSql.checkData(1, 4, -0.04421256322855966) + tdSql.checkData(1, 5, 1.5707963020154387) + tdSql.checkData(1, 6, 0.03652568194248612) + tdSql.checkData(2, 0, 48) + tdSql.checkData(2, 1, 0.9649660284921133) + tdSql.checkData(2, 2, -0.3505997332287945) + tdSql.checkData(2, 3, 0.07093264777739541) + tdSql.checkData(2, 4, 0.9454451549211168) + tdSql.checkData(2, 5, 1.5707962996062728) + tdSql.checkData(2, 6, -2.3765070948049045) + tdSql.checkData(3, 0, 48) + tdSql.checkData(3, 1, 0.9649660284921133) + tdSql.checkData(3, 2, -0.3505997332287945) + tdSql.checkData(3, 3, 0.07093264777739541) + tdSql.checkData(3, 4, 0.9454451549211168) + tdSql.checkData(3, 5, 1.5707962996062728) + tdSql.checkData(3, 6, -2.3765070948049045) + tdSql.checkData(4, 0, 47) + tdSql.checkData(4, 1, 0.3005925437436371) + tdSql.checkData(4, 2, -0.8958906072013385) + tdSql.checkData(4, 3, -0.6297475077924276) + tdSql.checkData(4, 4, 0.5805866409896447) + tdSql.checkData(4, 5, 1.5707962969045492) + tdSql.checkData(4, 6, -0.7609930344795104) + tdSql.checkData(5, 0, 47) + tdSql.checkData(5, 1, 0.3005925437436371) + tdSql.checkData(5, 2, -0.8958906072013385) + tdSql.checkData(5, 3, -0.6297475077924276) + tdSql.checkData(5, 4, 0.5805866409896447) + tdSql.checkData(5, 5, 1.5707962969045492) + tdSql.checkData(5, 6, -0.7609930344795104) + tdSql.checkData(6, 0, 46) + tdSql.checkData(6, 1, -0.6401443394691997) + tdSql.checkData(6, 2, 0.13691638327939556) + tdSql.checkData(6, 3, 0.5367255338147858) + tdSql.checkData(6, 4, -0.6160642040533645) + tdSql.checkData(6, 5, 1.5707962938673405) + tdSql.checkData(6, 6, -1.9292699714079746) + tdSql.checkData(7, 0, 46) + tdSql.checkData(7, 1, -0.6401443394691997) + tdSql.checkData(7, 2, 0.13691638327939556) + tdSql.checkData(7, 3, 0.5367255338147858) + tdSql.checkData(7, 4, -0.6160642040533645) + tdSql.checkData(7, 5, 1.5707962938673405) + tdSql.checkData(7, 6, -1.9292699714079746) + tdSql.checkData(8, 0, 45) + tdSql.checkData(8, 1, -0.9923354691509287) + tdSql.checkData(8, 2, -0.24113458224528692) + tdSql.checkData(8, 3, -0.6231301003179452) + tdSql.checkData(8, 4, -0.9300948780045254) + tdSql.checkData(8, 5, 1.5707962904442854) + tdSql.checkData(8, 6, -7.205947408999204) + tdSql.checkData(9, 0, 45) + tdSql.checkData(9, 1, -0.9923354691509287) + tdSql.checkData(9, 2, -0.24113458224528692) + tdSql.checkData(9, 3, -0.6231301003179452) + tdSql.checkData(9, 4, -0.9300948780045254) + tdSql.checkData(9, 5, 1.5707962904442854) + tdSql.checkData(9, 6, -7.205947408999204) + tdSql.checkData(10, 0, 44) + tdSql.checkData(10, 1, -0.4321779448847783) + tdSql.checkData(10, 2, 0.7116688794089422) + tdSql.checkData(10, 3, 0.3547692619733851) + tdSql.checkData(10, 4, 0.08839871248753149) + tdSql.checkData(10, 5, 1.5707962865760938) + tdSql.checkData(10, 6, 0.20475275676724466) + tdSql.checkData(11, 0, 44) + tdSql.checkData(11, 1, -0.4321779448847783) + tdSql.checkData(11, 2, 0.7116688794089422) + tdSql.checkData(11, 3, 0.3547692619733851) + tdSql.checkData(11, 4, 0.08839871248753149) + tdSql.checkData(11, 5, 1.5707962865760938) + tdSql.checkData(11, 6, 0.20475275676724466) + tdSql.checkData(12, 0, 43) + tdSql.checkData(12, 1, 0.5253219888177297) + tdSql.checkData(12, 2, -0.17186582286471372) + tdSql.checkData(12, 3, -0.5662318751422317) + tdSql.checkData(12, 4, 0.9802456219572225) + tdSql.checkData(12, 5, 1.570796282192712) + tdSql.checkData(12, 6, -0.367384536387167) + tdSql.checkData(13, 0, 43) + tdSql.checkData(13, 1, 0.5253219888177297) + tdSql.checkData(13, 2, -0.17186582286471372) + tdSql.checkData(13, 3, -0.5662318751422317) + tdSql.checkData(13, 4, 0.9802456219572225) + tdSql.checkData(13, 5, 1.570796282192712) + tdSql.checkData(13, 6, -0.367384536387167) + tdSql.checkData(14, 0, 42) + tdSql.checkData(14, 1, 0.9998433086476912) + tdSql.checkData(14, 2, -0.004274977647617749) + tdSql.checkData(14, 3, 0.412255807723053) + tdSql.checkData(14, 4, 0.46771851834275896) + tdSql.checkData(14, 5, 1.570796277211051) + tdSql.checkData(14, 6, -22.120550530872286) + tdSql.checkData(15, 0, 42) + tdSql.checkData(15, 1, 0.9998433086476912) + tdSql.checkData(15, 2, -0.004274977647617749) + tdSql.checkData(15, 3, 0.412255807723053) + tdSql.checkData(15, 4, 0.46771851834275896) + tdSql.checkData(15, 5, 1.570796277211051) + tdSql.checkData(15, 6, -22.120550530872286) + tdSql.checkData(16, 0, 41) + tdSql.checkData(16, 1, 0.5551133015206257) + tdSql.checkData(16, 2, -0.9694223908459327) + tdSql.checkData(16, 3, -0.7793716419485732) + tdSql.checkData(16, 4, -0.7148975077677643) + tdSql.checkData(16, 5, 1.5707962715321713) + tdSql.checkData(16, 6, 0.6057979864116589) + tdSql.checkData(17, 0, 41) + tdSql.checkData(17, 1, 0.5551133015206257) + tdSql.checkData(17, 2, -0.9694223908459327) + tdSql.checkData(17, 3, -0.7793716419485732) + tdSql.checkData(17, 4, -0.7148975077677643) + tdSql.checkData(17, 5, 1.5707962715321713) + tdSql.checkData(17, 6, 0.6057979864116589) + tdSql.checkData(18, 0, 40) + tdSql.checkData(18, 1, -0.39998531498835127) + tdSql.checkData(18, 2, -0.5983634637950125) + tdSql.checkData(18, 3, -0.21066319593197044) + tdSql.checkData(18, 4, -0.8732972972139946) + tdSql.checkData(18, 5, 1.570796265037764) + tdSql.checkData(18, 6, -0.0772047427955866) + tdSql.checkData(19, 0, 40) + tdSql.checkData(19, 1, -0.39998531498835127) + tdSql.checkData(19, 2, -0.5983634637950125) + tdSql.checkData(19, 3, -0.21066319593197044) + tdSql.checkData(19, 4, -0.8732972972139946) + tdSql.checkData(19, 5, 1.570796265037764) + tdSql.checkData(19, 6, -0.0772047427955866) + tdSql.checkData(20, 0, 39) + tdSql.checkData(20, 1, -0.9873392775238264) + tdSql.checkData(20, 2, 0.8919503592036683) + tdSql.checkData(20, 3, 0.6228943075363607) + tdSql.checkData(20, 4, 0.21945466799406363) + tdSql.checkData(20, 5, 1.5707962575857413) + tdSql.checkData(20, 6, 0.5897115109610915) + tdSql.checkData(21, 0, 39) + tdSql.checkData(21, 1, -0.9873392775238264) + tdSql.checkData(21, 2, 0.8919503592036683) + tdSql.checkData(21, 3, 0.6228943075363607) + tdSql.checkData(21, 4, 0.21945466799406363) + tdSql.checkData(21, 5, 1.5707962575857413) + tdSql.checkData(21, 6, 0.5897115109610915) + tdSql.checkData(22, 0, 38) + tdSql.checkData(22, 1, -0.6669380616522619) + tdSql.checkData(22, 2, 0.4242881965497543) + tdSql.checkData(22, 3, 0.7626364487946297) + tdSql.checkData(22, 4, 0.9977992786806003) + tdSql.checkData(22, 5, 1.5707962490046714) + tdSql.checkData(22, 6, 1.138845506389765) + tdSql.checkData(23, 0, 38) + tdSql.checkData(23, 1, -0.6669380616522619) + tdSql.checkData(23, 2, 0.4242881965497543) + tdSql.checkData(23, 3, 0.7626364487946297) + tdSql.checkData(23, 4, 0.9977992786806003) + tdSql.checkData(23, 5, 1.5707962490046714) + tdSql.checkData(23, 6, 1.138845506389765) + tdSql.checkData(24, 0, 37) + tdSql.checkData(24, 1, 0.26664293235993725) + tdSql.checkData(24, 2, 0.7422350059189753) + tdSql.checkData(24, 3, 0.9537888904975496) + tdSql.checkData(24, 4, 0.346621180094276) + tdSql.checkData(24, 5, 1.570796239086718) + tdSql.checkData(24, 6, -0.1919260039444686) + tdSql.checkData(25, 0, 37) + tdSql.checkData(25, 1, 0.26664293235993725) + tdSql.checkData(25, 2, 0.7422350059189753) + tdSql.checkData(25, 3, 0.9537888904975496) + tdSql.checkData(25, 4, 0.346621180094276) + tdSql.checkData(25, 5, 1.570796239086718) + tdSql.checkData(25, 6, -0.1919260039444686) + tdSql.checkData(26, 0, 36) + tdSql.checkData(26, 1, 0.9550736440472949) + tdSql.checkData(26, 2, -0.0928962612844285) + tdSql.checkData(26, 3, -0.4988176628046754) + tdSql.checkData(26, 4, -0.8011526357338304) + tdSql.checkData(26, 5, 1.5707962275786258) + tdSql.checkData(26, 6, -1.1574711833500264) + tdSql.checkData(27, 0, 36) + tdSql.checkData(27, 1, 0.9550736440472949) + tdSql.checkData(27, 2, -0.0928962612844285) + tdSql.checkData(27, 3, -0.4988176628046754) + tdSql.checkData(27, 4, -0.8011526357338304) + tdSql.checkData(27, 5, 1.5707962275786258) + tdSql.checkData(27, 6, -1.1574711833500264) + tdSql.checkData(28, 0, 35) + tdSql.checkData(28, 1, 0.7654140519453434) + tdSql.checkData(28, 2, 0.9756491521033712) + tdSql.checkData(28, 3, 0.9784316739726002) + tdSql.checkData(28, 4, -0.8011345951780408) + tdSql.checkData(28, 5, 1.5707962141701366) + tdSql.checkData(28, 6, -0.2793610475623728) + tdSql.checkData(29, 0, 35) + tdSql.checkData(29, 1, 0.7654140519453434) + tdSql.checkData(29, 2, 0.9756491521033712) + tdSql.checkData(29, 3, 0.9784316739726002) + tdSql.checkData(29, 4, -0.8011345951780408) + tdSql.checkData(29, 5, 1.5707962141701366) + tdSql.checkData(29, 6, -0.2793610475623728) + tdSql.checkData(30, 0, 34) + tdSql.checkData(30, 1, -0.12796368962740468) + tdSql.checkData(30, 2, 0.9943770416371703) + tdSql.checkData(30, 3, 0.9482534313435556) + tdSql.checkData(30, 4, 0.3466494554970303) + tdSql.checkData(30, 5, 1.5707961984790044) + tdSql.checkData(30, 6, -3.168873759467214) + tdSql.checkData(31, 0, 34) + tdSql.checkData(31, 1, -0.12796368962740468) + tdSql.checkData(31, 2, 0.9943770416371703) + tdSql.checkData(31, 3, 0.9482534313435556) + tdSql.checkData(31, 4, 0.3466494554970303) + tdSql.checkData(31, 5, 1.5707961984790044) + tdSql.checkData(31, 6, -3.168873759467214) + tdSql.checkData(32, 0, 33) + tdSql.checkData(32, 1, -0.9036922050915067) + tdSql.checkData(32, 2, -0.42426089982481757) + tdSql.checkData(32, 3, -0.7626169502553196) + tdSql.checkData(32, 4, 0.9977972794498907) + tdSql.checkData(32, 5, 1.5707961800314665) + tdSql.checkData(32, 6, -0.1738544089832513) + tdSql.checkData(33, 0, 33) + tdSql.checkData(33, 1, -0.9036922050915067) + tdSql.checkData(33, 2, -0.42426089982481757) + tdSql.checkData(33, 3, -0.7626169502553196) + tdSql.checkData(33, 4, 0.9977972794498907) + tdSql.checkData(33, 5, 1.5707961800314665) + tdSql.checkData(33, 6, -0.1738544089832513) + tdSql.checkData(34, 0, 32) + tdSql.checkData(34, 1, -0.8485702747846052) + tdSql.checkData(34, 2, 0.9873536182198484) + tdSql.checkData(34, 3, 0.9637712690067693) + tdSql.checkData(34, 4, 0.21942525837900473) + tdSql.checkData(34, 5, 1.5707961582366015) + tdSql.checkData(34, 6, 2.449230012275883) + tdSql.checkData(35, 0, 32) + tdSql.checkData(35, 1, -0.8485702747846052) + tdSql.checkData(35, 2, 0.9873536182198484) + tdSql.checkData(35, 3, 0.9637712690067693) + tdSql.checkData(35, 4, 0.21942525837900473) + tdSql.checkData(35, 5, 1.5707961582366015) + tdSql.checkData(35, 6, 2.449230012275883) + tdSql.checkData(36, 0, 31) + tdSql.checkData(36, 1, -0.013276747223059479) + tdSql.checkData(36, 2, 0.9468970921774763) + tdSql.checkData(36, 3, 0.9948176005844565) + tdSql.checkData(36, 4, -0.8733119827746476) + tdSql.checkData(36, 5, 1.5707961323523867) + tdSql.checkData(36, 6, -24.115588387874705) + tdSql.checkData(37, 0, 31) + tdSql.checkData(37, 1, -0.013276747223059479) + tdSql.checkData(37, 2, 0.9468970921774763) + tdSql.checkData(37, 3, 0.9948176005844565) + tdSql.checkData(37, 4, -0.8733119827746476) + tdSql.checkData(37, 5, 1.5707961323523867) + tdSql.checkData(37, 6, -24.115588387874705) + tdSql.checkData(38, 0, 30) + tdSql.checkData(38, 1, 0.8342233605065102) + tdSql.checkData(38, 2, 0.06624670220315812) + tdSql.checkData(38, 3, -0.3549947202980643) + tdSql.checkData(38, 4, -0.7148764296291646) + tdSql.checkData(38, 5, 1.5707961014403826) + tdSql.checkData(38, 6, -0.1966943463168791) + tdSql.checkData(39, 0, 30) + tdSql.checkData(39, 1, 0.8342233605065102) + tdSql.checkData(39, 2, 0.06624670220315812) + tdSql.checkData(39, 3, -0.3549947202980643) + tdSql.checkData(39, 4, -0.7148764296291646) + tdSql.checkData(39, 5, 1.5707961014403826) + tdSql.checkData(39, 6, -0.1966943463168791) + tdSql.checkData(40, 0, 29) + tdSql.checkData(40, 1, 0.9147423578045313) + tdSql.checkData(40, 2, 0.5842577465661262) + tdSql.checkData(40, 3, 0.8689955898411542) + tdSql.checkData(40, 4, 0.4677451620451334) + tdSql.checkData(40, 5, 1.5707960643046768) + tdSql.checkData(40, 6, -0.039333072296354944) + tdSql.checkData(41, 0, 29) + tdSql.checkData(41, 1, 0.9147423578045313) + tdSql.checkData(41, 2, 0.5842577465661262) + tdSql.checkData(41, 3, 0.8689955898411542) + tdSql.checkData(41, 4, 0.4677451620451334) + tdSql.checkData(41, 5, 1.5707960643046768) + tdSql.checkData(41, 6, -0.039333072296354944) + tdSql.checkData(42, 0, 28) + tdSql.checkData(42, 1, 0.15425144988758405) + tdSql.checkData(42, 2, 0.17177673471265031) + tdSql.checkData(42, 3, 0.5661573337391944) + tdSql.checkData(42, 4, 0.9802396594403116) + tdSql.checkData(42, 5, 1.5707960194088244) + tdSql.checkData(42, 6, -0.9135826820615496) + tdSql.checkData(43, 0, 28) + tdSql.checkData(43, 1, 0.15425144988758405) + tdSql.checkData(43, 2, 0.17177673471265031) + tdSql.checkData(43, 3, 0.5661573337391944) + tdSql.checkData(43, 4, 0.9802396594403116) + tdSql.checkData(43, 5, 1.5707960194088244) + tdSql.checkData(43, 6, -0.9135826820615496) + tdSql.checkData(44, 0, 27) + tdSql.checkData(44, 1, -0.7480575296890003) + tdSql.checkData(44, 2, 0.9886955804866999) + tdSql.checkData(44, 3, 0.8366226151268321) + tdSql.checkData(44, 4, 0.08836868610400143) + tdSql.checkData(44, 5, 1.570795964761674) + tdSql.checkData(44, 6, 2.19589437576056) + tdSql.checkData(45, 0, 27) + tdSql.checkData(45, 1, -0.7480575296890003) + tdSql.checkData(45, 2, 0.9886955804866999) + tdSql.checkData(45, 3, 0.8366226151268321) + tdSql.checkData(45, 4, 0.08836868610400143) + tdSql.checkData(45, 5, 1.570795964761674) + tdSql.checkData(45, 6, 2.19589437576056) + tdSql.checkData(46, 0, 26) + tdSql.checkData(46, 1, -0.9626058663135666) + tdSql.checkData(46, 2, -0.848538375531565) + tdSql.checkData(46, 3, -0.5513763859920506) + tdSql.checkData(46, 4, -0.9301059501867618) + tdSql.checkData(46, 5, 1.5707958977586762) + tdSql.checkData(46, 6, 0.32917637498880103) + tdSql.checkData(47, 0, 26) + tdSql.checkData(47, 1, -0.9626058663135666) + tdSql.checkData(47, 2, -0.848538375531565) + tdSql.checkData(47, 3, -0.5513763859920506) + tdSql.checkData(47, 4, -0.9301059501867618) + tdSql.checkData(47, 5, 1.5707958977586762) + tdSql.checkData(47, 6, 0.32917637498880103) + tdSql.checkData(48, 0, 25) + tdSql.checkData(48, 1, -0.2921388087338362) + tdSql.checkData(48, 2, -0.9843872569764778) + tdSql.checkData(48, 3, -0.9683494148893343) + tdSql.checkData(48, 4, -0.6160404591886565) + tdSql.checkData(48, 5, 1.5707958149586843) + tdSql.checkData(48, 6, -9.848194527671561) + tdSql.checkData(49, 0, 25) + tdSql.checkData(49, 1, -0.2921388087338362) + tdSql.checkData(49, 2, -0.9843872569764778) + tdSql.checkData(49, 3, -0.9683494148893343) + tdSql.checkData(49, 4, -0.6160404591886565) + tdSql.checkData(49, 5, 1.5707958149586843) + tdSql.checkData(49, 6, -9.848194527671561) + tdSql.checkData(50, 0, 24) + tdSql.checkData(50, 1, 0.6469193223286404) + tdSql.checkData(50, 2, -0.4637754567475154) + tdSql.checkData(50, 3, -0.053023383345603574) + tdSql.checkData(50, 4, 0.5806111842123143) + tdSql.checkData(50, 5, 1.5707957117659828) + tdSql.checkData(50, 6, 0.9961666148069158) + tdSql.checkData(51, 0, 24) + tdSql.checkData(51, 1, 0.6469193223286404) + tdSql.checkData(51, 2, -0.4637754567475154) + tdSql.checkData(51, 3, -0.053023383345603574) + tdSql.checkData(51, 4, 0.5806111842123143) + tdSql.checkData(51, 5, 1.5707957117659828) + tdSql.checkData(51, 6, 0.9961666148069158) + tdSql.checkData(52, 0, 23) + tdSql.checkData(52, 1, 0.9912028118634736) + tdSql.checkData(52, 2, 0.3507408840091023) + tdSql.checkData(52, 3, -0.07078230485740782) + tdSql.checkData(52, 4, 0.9454353340247703) + tdSql.checkData(52, 5, 1.5707955819710255) + tdSql.checkData(52, 6, -2.150870213297903) + tdSql.checkData(53, 0, 23) + tdSql.checkData(53, 1, 0.9912028118634736) + tdSql.checkData(53, 2, 0.3507408840091023) + tdSql.checkData(53, 3, -0.07078230485740782) + tdSql.checkData(53, 4, 0.9454353340247703) + tdSql.checkData(53, 5, 1.5707955819710255) + tdSql.checkData(53, 6, -2.150870213297903) + tdSql.checkData(54, 0, 22) + tdSql.checkData(54, 1, 0.424179007336997) + tdSql.checkData(54, 2, 0.9810996900733364) + tdSql.checkData(54, 3, 0.8115857761709371) + tdSql.checkData(54, 4, -0.044242678085070965) + tdSql.checkData(54, 5, 1.5707954170771377) + tdSql.checkData(54, 6, -0.6314442572652602) + tdSql.checkData(55, 0, 22) + tdSql.checkData(55, 1, 0.424179007336997) + tdSql.checkData(55, 2, 0.9810996900733364) + tdSql.checkData(55, 3, 0.8115857761709371) + tdSql.checkData(55, 4, -0.044242678085070965) + tdSql.checkData(55, 5, 1.5707954170771377) + tdSql.checkData(55, 6, -0.6314442572652602) + tdSql.checkData(56, 0, 21) + tdSql.checkData(56, 1, -0.5328330203333975) + tdSql.checkData(56, 2, 0.3836706077176726) + tdSql.checkData(56, 3, -0.035428428178979524) + tdSql.checkData(56, 4, -0.9705352835374847) + tdSql.checkData(56, 5, 1.5707952052973522) + tdSql.checkData(56, 6, -0.5809225429871196) + tdSql.checkData(57, 0, 21) + tdSql.checkData(57, 1, -0.5328330203333975) + tdSql.checkData(57, 2, 0.3836706077176726) + tdSql.checkData(57, 3, -0.035428428178979524) + tdSql.checkData(57, 4, -0.9705352835374847) + tdSql.checkData(57, 5, 1.5707952052973522) + tdSql.checkData(57, 6, -0.5809225429871196) + tdSql.checkData(58, 0, 20) + tdSql.checkData(58, 1, -0.9999608263946371) + tdSql.checkData(58, 2, -0.525296338642536) + tdSql.checkData(58, 3, -0.12354320937804643) + tdSql.checkData(58, 4, -0.5063656411097588) + tdSql.checkData(58, 5, 1.5707949300332242) + tdSql.checkData(58, 6, -0.4029272896258388) + tdSql.checkData(59, 0, 20) + tdSql.checkData(59, 1, -0.9999608263946371) + tdSql.checkData(59, 2, -0.525296338642536) + tdSql.checkData(59, 3, -0.12354320937804643) + tdSql.checkData(59, 4, -0.5063656411097588) + tdSql.checkData(59, 5, 1.5707949300332242) + tdSql.checkData(59, 6, -0.4029272896258388) + tdSql.checkData(60, 0, 19) + tdSql.checkData(60, 1, -0.5477292602242684) + tdSql.checkData(60, 2, -0.9601787090136331) + tdSql.checkData(60, 3, -0.9893538601694428) + tdSql.checkData(60, 4, 0.683261714736121) + tdSql.checkData(60, 5, 1.5707945675233086) + tdSql.checkData(60, 6, 3.988678905790852) + tdSql.checkData(61, 0, 19) + tdSql.checkData(61, 1, -0.5477292602242684) + tdSql.checkData(61, 2, -0.9601787090136331) + tdSql.checkData(61, 3, -0.9893538601694428) + tdSql.checkData(61, 4, 0.683261714736121) + tdSql.checkData(61, 5, 1.5707945675233086) + tdSql.checkData(61, 6, 3.988678905790852) + tdSql.checkData(62, 0, 18) + tdSql.checkData(62, 1, 0.40808206181339196) + tdSql.checkData(62, 2, -0.9147301779353751) + tdSql.checkData(62, 3, -0.6636113342009432) + tdSql.checkData(62, 4, 0.8939966636005579) + tdSql.checkData(62, 5, 1.5707940831304659) + tdSql.checkData(62, 6, 0.11047679998824196) + tdSql.checkData(63, 0, 18) + tdSql.checkData(63, 1, 0.40808206181339196) + tdSql.checkData(63, 2, -0.9147301779353751) + tdSql.checkData(63, 3, -0.6636113342009432) + tdSql.checkData(63, 4, 0.8939966636005579) + tdSql.checkData(63, 5, 1.5707940831304659) + tdSql.checkData(63, 6, 0.11047679998824196) + tdSql.checkData(64, 0, 17) + tdSql.checkData(64, 1, 0.9887046181866692) + tdSql.checkData(64, 2, 0.9996482558795381) + tdSql.checkData(64, 3, 0.9200142254959646) + tdSql.checkData(64, 4, -0.1760756199485871) + tdSql.checkData(64, 5, 1.5707934253419198) + tdSql.checkData(64, 6, 0.46361590355468435) + tdSql.checkData(65, 0, 17) + tdSql.checkData(65, 1, 0.9887046181866692) + tdSql.checkData(65, 2, 0.9996482558795381) + tdSql.checkData(65, 3, 0.9200142254959646) + tdSql.checkData(65, 4, -0.1760756199485871) + tdSql.checkData(65, 5, 1.5707934253419198) + tdSql.checkData(65, 6, 0.46361590355468435) + tdSql.checkData(66, 0, 16) + tdSql.checkData(66, 1, 0.6603167082440802) + tdSql.checkData(66, 2, -0.03979075993115771) + tdSql.checkData(66, 3, 0.37963562682930313) + tdSql.checkData(66, 4, -0.9938886539233752) + tdSql.checkData(66, 5, 1.5707925158192868) + tdSql.checkData(66, 6, -0.4154684855612854) + tdSql.checkData(67, 0, 16) + tdSql.checkData(67, 1, 0.6603167082440802) + tdSql.checkData(67, 2, -0.03979075993115771) + tdSql.checkData(67, 3, 0.37963562682930313) + tdSql.checkData(67, 4, -0.9938886539233752) + tdSql.checkData(67, 5, 1.5707925158192868) + tdSql.checkData(67, 6, -0.4154684855612854) + tdSql.checkData(68, 0, 15) + tdSql.checkData(68, 1, -0.27516333805159693) + tdSql.checkData(68, 2, 0.36731936773024515) + tdSql.checkData(68, 3, 0.7210585970706318) + tdSql.checkData(68, 4, -0.38778163540943045) + tdSql.checkData(68, 5, 1.5707912324159716) + tdSql.checkData(68, 6, 0.8918850194348307) + tdSql.checkData(69, 0, 15) + tdSql.checkData(69, 1, -0.27516333805159693) + tdSql.checkData(69, 2, 0.36731936773024515) + tdSql.checkData(69, 3, 0.7210585970706318) + tdSql.checkData(69, 4, -0.38778163540943045) + tdSql.checkData(69, 5, 1.5707912324159716) + tdSql.checkData(69, 6, 0.8918850194348307) + tdSql.checkData(70, 0, 14) + tdSql.checkData(70, 1, -0.9576594803233847) + tdSql.checkData(70, 2, 0.3424664577455166) + tdSql.checkData(70, 3, -0.07957859166428352) + tdSql.checkData(70, 4, 0.7738906815578891) + tdSql.checkData(70, 5, 1.5707893792390168) + tdSql.checkData(70, 6, 1.3548129828192632) + tdSql.checkData(71, 0, 14) + tdSql.checkData(71, 1, -0.9576594803233847) + tdSql.checkData(71, 2, 0.3424664577455166) + tdSql.checkData(71, 3, -0.07957859166428352) + tdSql.checkData(71, 4, 0.7738906815578891) + tdSql.checkData(71, 5, 1.5707893792390168) + tdSql.checkData(71, 6, 1.3548129828192632) + tdSql.checkData(72, 0, 13) + tdSql.checkData(72, 1, -0.7596879128588213) + tdSql.checkData(72, 2, 0.7984961861625556) + tdSql.checkData(72, 3, 0.9765908679435658) + tdSql.checkData(72, 4, 0.8268286794901034) + tdSql.checkData(72, 5, 1.5707866319075423) + tdSql.checkData(72, 6, 3.695640303509019) + tdSql.checkData(73, 0, 13) + tdSql.checkData(73, 1, -0.7596879128588213) + tdSql.checkData(73, 2, 0.7984961861625556) + tdSql.checkData(73, 3, 0.9765908679435658) + tdSql.checkData(73, 4, 0.8268286794901034) + tdSql.checkData(73, 5, 1.5707866319075423) + tdSql.checkData(73, 6, 3.695640303509019) + tdSql.checkData(74, 0, 12) + tdSql.checkData(74, 1, 0.1367372182078336) + tdSql.checkData(74, 2, 0.8711474010323434) + tdSql.checkData(74, 3, 0.9964691731217737) + tdSql.checkData(74, 4, -0.3048106211022167) + tdSql.checkData(74, 5, 1.570782433199764) + tdSql.checkData(74, 6, 0.31565238132361734) + tdSql.checkData(75, 0, 12) + tdSql.checkData(75, 1, 0.1367372182078336) + tdSql.checkData(75, 2, 0.8711474010323434) + tdSql.checkData(75, 3, 0.9964691731217737) + tdSql.checkData(75, 4, -0.3048106211022167) + tdSql.checkData(75, 5, 1.570782433199764) + tdSql.checkData(75, 6, 0.31565238132361734) + tdSql.checkData(76, 0, 11) + tdSql.checkData(76, 1, 0.9074467814501962) + tdSql.checkData(76, 2, -0.04866360920015389) + tdSql.checkData(76, 3, -0.45990349068959124) + tdSql.checkData(76, 4, -0.9997551733586199) + tdSql.checkData(76, 5, 1.5707757843526298) + tdSql.checkData(76, 6, -0.9008027113130536) + tdSql.checkData(77, 0, 11) + tdSql.checkData(77, 1, 0.9074467814501962) + tdSql.checkData(77, 2, -0.04866360920015389) + tdSql.checkData(77, 3, -0.45990349068959124) + tdSql.checkData(77, 4, -0.9997551733586199) + tdSql.checkData(77, 5, 1.5707757843526298) + tdSql.checkData(77, 6, -0.9008027113130536) + tdSql.checkData(78, 0, 10) + tdSql.checkData(78, 1, 0.8438539587324921) + tdSql.checkData(78, 2, 0.8623188722876839) + tdSql.checkData(78, 3, 0.9948267913584063) + tdSql.checkData(78, 4, -0.26237485370392877) + tdSql.checkData(78, 5, 1.5707648037030744) + tdSql.checkData(78, 6, -4.025330871196722) + tdSql.checkData(79, 0, 10) + tdSql.checkData(79, 1, 0.8438539587324921) + tdSql.checkData(79, 2, 0.8623188722876839) + tdSql.checkData(79, 3, 0.9948267913584063) + tdSql.checkData(79, 4, -0.26237485370392877) + tdSql.checkData(79, 5, 1.5707648037030744) + tdSql.checkData(79, 6, -4.025330871196722) + tdSql.checkData(80, 0, 9) + tdSql.checkData(80, 1, 0.004425697988050785) + tdSql.checkData(80, 2, 0.7766859820216312) + tdSql.checkData(80, 3, 0.9683644611001854) + tdSql.checkData(80, 4, 0.8509035245341184) + tdSql.checkData(80, 5, 1.5707457297498073) + tdSql.checkData(80, 6, 8.99827042612123) + tdSql.checkData(81, 0, 9) + tdSql.checkData(81, 1, 0.004425697988050785) + tdSql.checkData(81, 2, 0.7766859820216312) + tdSql.checkData(81, 3, 0.9683644611001854) + tdSql.checkData(81, 4, 0.8509035245341184) + tdSql.checkData(81, 5, 1.5707457297498073) + tdSql.checkData(81, 6, 8.99827042612123) + tdSql.checkData(82, 0, 8) + tdSql.checkData(82, 1, -0.8390715290764524) + tdSql.checkData(82, 2, 0.39185723042955) + tdSql.checkData(82, 3, -0.026551154023966794) + tdSql.checkData(82, 4, 0.7451131604793488) + tdSql.checkData(82, 5, 1.5707104842668094) + tdSql.checkData(82, 6, 2.605110021628947) + tdSql.checkData(83, 0, 8) + tdSql.checkData(83, 1, -0.8390715290764524) + tdSql.checkData(83, 2, 0.39185723042955) + tdSql.checkData(83, 3, -0.026551154023966794) + tdSql.checkData(83, 4, 0.7451131604793488) + tdSql.checkData(83, 5, 1.5707104842668094) + tdSql.checkData(83, 6, 2.605110021628947) + tdSql.checkData(84, 0, 7) + tdSql.checkData(84, 1, -0.9111302618846769) + tdSql.checkData(84, 2, 0.3005925437436371) + tdSql.checkData(84, 3, 0.6702291758433747) + tdSql.checkData(84, 4, -0.428182669496151) + tdSql.checkData(84, 5, 1.570640112161644) + tdSql.checkData(84, 6, -23.751038099429206) + tdSql.checkData(85, 0, 7) + tdSql.checkData(85, 1, -0.9111302618846769) + tdSql.checkData(85, 2, 0.3005925437436371) + tdSql.checkData(85, 3, 0.6702291758433747) + tdSql.checkData(85, 4, -0.428182669496151) + tdSql.checkData(85, 5, 1.570640112161644) + tdSql.checkData(85, 6, -23.751038099429206) + tdSql.checkData(86, 0, 6) + tdSql.checkData(86, 1, -0.14550003380861354) + tdSql.checkData(86, 2, -0.12796368962740468) + tdSql.checkData(86, 3, 0.2963685787093853) + tdSql.checkData(86, 4, -0.9880316240928618) + tdSql.checkData(86, 5, 1.5704848525972515) + tdSql.checkData(86, 6, 0.9400535268838884) + tdSql.checkData(87, 0, 6) + tdSql.checkData(87, 1, -0.14550003380861354) + tdSql.checkData(87, 2, -0.12796368962740468) + tdSql.checkData(87, 3, 0.2963685787093853) + tdSql.checkData(87, 4, -0.9880316240928618) + tdSql.checkData(87, 5, 1.5704848525972515) + tdSql.checkData(87, 6, 0.9400535268838884) + tdSql.checkData(88, 0, 5) + tdSql.checkData(88, 1, 0.7539022543433046) + tdSql.checkData(88, 2, 0.9912028118634736) + tdSql.checkData(88, 3, 0.956375928404503) + tdSql.checkData(88, 4, -0.13235175009777303) + tdSql.checkData(88, 5, 1.5700933602085452) + tdSql.checkData(88, 6, -0.24421205951965097) + tdSql.checkData(89, 0, 5) + tdSql.checkData(89, 1, 0.7539022543433046) + tdSql.checkData(89, 2, 0.9912028118634736) + tdSql.checkData(89, 3, 0.956375928404503) + tdSql.checkData(89, 4, -0.13235175009777303) + tdSql.checkData(89, 5, 1.5700933602085452) + tdSql.checkData(89, 6, -0.24421205951965097) + tdSql.checkData(90, 0, 4) + tdSql.checkData(90, 1, 0.960170286650366) + tdSql.checkData(90, 2, -0.9576594803233847) + tdSql.checkData(90, 3, -0.750987246771676) + tdSql.checkData(90, 4, 0.9129452507276277) + tdSql.checkData(90, 5, 1.5689023896654766) + tdSql.checkData(90, 6, -1.741882365717585) + tdSql.checkData(91, 0, 4) + tdSql.checkData(91, 1, 0.960170286650366) + tdSql.checkData(91, 2, -0.9576594803233847) + tdSql.checkData(91, 3, -0.750987246771676) + tdSql.checkData(91, 4, 0.9129452507276277) + tdSql.checkData(91, 5, 1.5689023896654766) + tdSql.checkData(91, 6, -1.741882365717585) + tdSql.checkData(92, 0, 3) + tdSql.checkData(92, 1, 0.28366218546322625) + tdSql.checkData(92, 2, -0.9111302618846769) + tdSql.checkData(92, 3, -0.9999902065507035) + tdSql.checkData(92, 4, 0.6502878401571168) + tdSql.checkData(92, 5, 1.5640983290419266) + tdSql.checkData(92, 6, 1.2100230702966224) + tdSql.checkData(93, 0, 3) + tdSql.checkData(93, 1, 0.28366218546322625) + tdSql.checkData(93, 2, -0.9111302618846769) + tdSql.checkData(93, 3, -0.9999902065507035) + tdSql.checkData(93, 4, 0.6502878401571168) + tdSql.checkData(93, 5, 1.5640983290419266) + tdSql.checkData(93, 6, 1.2100230702966224) + tdSql.checkData(94, 0, 2) + tdSql.checkData(94, 1, -0.6536436208636119) + tdSql.checkData(94, 2, -0.6536436208636119) + tdSql.checkData(94, 3, -0.27941549819892586) + tdSql.checkData(94, 4, -0.5440211108893698) + tdSql.checkData(94, 5, 1.5332586916349722) + tdSql.checkData(94, 6, 14.060932856369687) + tdSql.checkData(95, 0, 2) + tdSql.checkData(95, 1, -0.6536436208636119) + tdSql.checkData(95, 2, -0.6536436208636119) + tdSql.checkData(95, 3, -0.27941549819892586) + tdSql.checkData(95, 4, -0.5440211108893698) + tdSql.checkData(95, 5, 1.5332586916349722) + tdSql.checkData(95, 6, 14.060932856369687) + tdSql.checkData(96, 0, 1) + tdSql.checkData(96, 1, -0.9899924966004454) + tdSql.checkData(96, 2, 0.5403023058681398) + tdSql.checkData(96, 3, 0.1411200080598672) + tdSql.checkData(96, 4, -0.9589242746631385) + tdSql.checkData(96, 5, 1.1071487177940904) + tdSql.checkData(96, 6, 0.14303314440903753) + tdSql.checkData(97, 0, 1) + tdSql.checkData(97, 1, -0.9899924966004454) + tdSql.checkData(97, 2, 0.5403023058681398) + tdSql.checkData(97, 3, 0.1411200080598672) + tdSql.checkData(97, 4, -0.9589242746631385) + tdSql.checkData(97, 5, 1.1071487177940904) + tdSql.checkData(97, 6, 0.14303314440903753) + tdSql.checkData(98, 0, 0) + tdSql.checkData(98, 1, -0.6281736227227391) + tdSql.checkData(98, 2, 1.0) + tdSql.checkData(98, 3, 0.9092974268256817) + tdSql.checkData(98, 4, 0.8414709848078965) + tdSql.checkData(98, 5, 0.0) + tdSql.checkData(98, 6, None) + tdSql.checkData(99, 0, 0) + tdSql.checkData(99, 1, -0.6281736227227391) + tdSql.checkData(99, 2, 1.0) + tdSql.checkData(99, 3, 0.9092974268256817) + tdSql.checkData(99, 4, 0.8414709848078965) + tdSql.checkData(99, 5, 0.0) + tdSql.checkData(99, 6, None) + + tdSql.query('select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5+c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from ct1 order by ts limit 2;;') + tdSql.checkRows(2) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 0.7780731968879212) + tdSql.checkData(0, 2, 0.6143002821164822) + tdSql.checkData(0, 3, 3.2037266279837113) + tdSql.checkData(0, 4, None) + tdSql.checkData(0, 5, 0.02246988233490299) + tdSql.checkData(0, 6, None) + tdSql.checkData(1, 0, 1) + tdSql.checkData(1, 1, 0.1411200080598672) + tdSql.checkData(1, 2, 0.6663667453928805) + tdSql.checkData(1, 3, 1.558041126155035) + tdSql.checkData(1, 4, 2.1543462689906883) + tdSql.checkData(1, 5, 0.17204223631998083) + tdSql.checkData(1, 6, None) + + tdSql.query('select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 order by ts desc);') + tdSql.checkRows(100) + tdSql.checkData(0, 0, 49) + tdSql.checkData(0, 1, 0.6702291758433747) + tdSql.checkData(0, 2, 0.9923745526637894) + tdSql.checkData(0, 3, 0.9298143670243166) + tdSql.checkData(0, 4, None) + tdSql.checkData(0, 5, 0.7136182821549459) + tdSql.checkData(0, 6, -0.7462904241496138) + tdSql.checkData(1, 0, 49) + tdSql.checkData(1, 1, 0.6702291758433747) + tdSql.checkData(1, 2, 0.9923745526637894) + tdSql.checkData(1, 3, 0.9298143670243166) + tdSql.checkData(1, 4, None) + tdSql.checkData(1, 5, 0.7136182821549459) + tdSql.checkData(1, 6, -0.7462904241496138) + tdSql.checkData(2, 0, 48) + tdSql.checkData(2, 1, -0.26237485370392877) + tdSql.checkData(2, 2, 0.6202081141679935) + tdSql.checkData(2, 3, 1.8175857333771335) + tdSql.checkData(2, 4, None) + tdSql.checkData(2, 5, 1.211884234321115) + tdSql.checkData(2, 6, 5.183714988550632) + tdSql.checkData(3, 0, 48) + tdSql.checkData(3, 1, -0.26237485370392877) + tdSql.checkData(3, 2, 0.6202081141679935) + tdSql.checkData(3, 3, 1.8175857333771335) + tdSql.checkData(3, 4, None) + tdSql.checkData(3, 5, 1.211884234321115) + tdSql.checkData(3, 6, 5.183714988550632) + tdSql.checkData(4, 0, 47) + tdSql.checkData(4, 1, -0.9537526527594719) + tdSql.checkData(4, 2, 0.6593040763085178) + tdSql.checkData(4, 3, 3.4575106745458637) + tdSql.checkData(4, 4, None) + tdSql.checkData(4, 5, 0.8820838187306987) + tdSql.checkData(4, 6, 2.6302204463996084) + tdSql.checkData(5, 0, 47) + tdSql.checkData(5, 1, -0.9537526527594719) + tdSql.checkData(5, 2, 0.6593040763085178) + tdSql.checkData(5, 3, 3.4575106745458637) + tdSql.checkData(5, 4, None) + tdSql.checkData(5, 5, 0.8820838187306987) + tdSql.checkData(5, 6, 2.6302204463996084) + tdSql.checkData(6, 0, 46) + tdSql.checkData(6, 1, -0.7682546613236668) + tdSql.checkData(6, 2, 0.9998433250151273) + tdSql.checkData(6, 3, 1.2763169256468458) + tdSql.checkData(6, 4, None) + tdSql.checkData(6, 5, -0.300459258677913) + tdSql.checkData(6, 6, 0.13392039926281352) + tdSql.checkData(7, 0, 46) + tdSql.checkData(7, 1, -0.7682546613236668) + tdSql.checkData(7, 2, 0.9998433250151273) + tdSql.checkData(7, 3, 1.2763169256468458) + tdSql.checkData(7, 4, None) + tdSql.checkData(7, 5, -0.300459258677913) + tdSql.checkData(7, 6, 0.13392039926281352) + tdSql.checkData(8, 0, 45) + tdSql.checkData(8, 1, 0.123573122745224) + tdSql.checkData(8, 2, 0.6735650596658175) + tdSql.checkData(8, 3, 1.5193186190030223) + tdSql.checkData(8, 4, None) + tdSql.checkData(8, 5, -1.5661895943272113) + tdSql.checkData(8, 6, 5.513771854144419) + tdSql.checkData(9, 0, 45) + tdSql.checkData(9, 1, 0.123573122745224) + tdSql.checkData(9, 2, 0.6735650596658175) + tdSql.checkData(9, 3, 1.5193186190030223) + tdSql.checkData(9, 4, None) + tdSql.checkData(9, 5, -1.5661895943272113) + tdSql.checkData(9, 6, 5.513771854144419) + tdSql.checkData(10, 0, 44) + tdSql.checkData(10, 1, 0.9017883476488092) + tdSql.checkData(10, 2, 0.6085839480802863) + tdSql.checkData(10, 3, 3.5552629892514687) + tdSql.checkData(10, 4, None) + tdSql.checkData(10, 5, -1.9810692649977342) + tdSql.checkData(10, 6, 3.0531030020123464) + tdSql.checkData(11, 0, 44) + tdSql.checkData(11, 1, 0.9017883476488092) + tdSql.checkData(11, 2, 0.6085839480802863) + tdSql.checkData(11, 3, 3.5552629892514687) + tdSql.checkData(11, 4, None) + tdSql.checkData(11, 5, -1.9810692649977342) + tdSql.checkData(11, 6, 3.0531030020123464) + tdSql.checkData(12, 0, 43) + tdSql.checkData(12, 1, 0.8509035245341184) + tdSql.checkData(12, 2, 0.9874457808369176) + tdSql.checkData(12, 3, 1.5962924548219202) + tdSql.checkData(12, 4, None) + tdSql.checkData(12, 5, -1.2490970766755156) + tdSql.checkData(12, 6, 0.5781542141407696) + tdSql.checkData(13, 0, 43) + tdSql.checkData(13, 1, 0.8509035245341184) + tdSql.checkData(13, 2, 0.9874457808369176) + tdSql.checkData(13, 3, 1.5962924548219202) + tdSql.checkData(13, 4, None) + tdSql.checkData(13, 5, -1.2490970766755156) + tdSql.checkData(13, 6, 0.5781542141407696) + tdSql.checkData(14, 0, 42) + tdSql.checkData(14, 1, 0.017701925105413577) + tdSql.checkData(14, 2, 0.7350111780599404) + tdSql.checkData(14, 3, 1.1912997639866574) + tdSql.checkData(14, 4, None) + tdSql.checkData(14, 5, 0.036467324189017214) + tdSql.checkData(14, 6, 6.024578312510778) + tdSql.checkData(15, 0, 42) + tdSql.checkData(15, 1, 0.017701925105413577) + tdSql.checkData(15, 2, 0.7350111780599404) + tdSql.checkData(15, 3, 1.1912997639866574) + tdSql.checkData(15, 4, None) + tdSql.checkData(15, 5, 0.036467324189017214) + tdSql.checkData(15, 6, 6.024578312510778) + tdSql.checkData(16, 0, 41) + tdSql.checkData(16, 1, -0.8317747426285983) + tdSql.checkData(16, 2, 0.5704067143341829) + tdSql.checkData(16, 3, 3.397430462894578) + tdSql.checkData(16, 4, None) + tdSql.checkData(16, 5, 0.9190273051332304) + tdSql.checkData(16, 6, 3.473885481113728) + tdSql.checkData(17, 0, 41) + tdSql.checkData(17, 1, -0.8317747426285983) + tdSql.checkData(17, 2, 0.5704067143341829) + tdSql.checkData(17, 3, 3.397430462894578) + tdSql.checkData(17, 4, None) + tdSql.checkData(17, 5, 0.9190273051332304) + tdSql.checkData(17, 6, 3.473885481113728) + tdSql.checkData(18, 0, 40) + tdSql.checkData(18, 1, -0.9165215479156338) + tdSql.checkData(18, 2, 0.9564033460276342) + tdSql.checkData(18, 3, 1.889162191085516) + tdSql.checkData(18, 4, None) + tdSql.checkData(18, 5, 0.90296737936602) + tdSql.checkData(18, 6, 0.888896415152729) + tdSql.checkData(19, 0, 40) + tdSql.checkData(19, 1, -0.9165215479156338) + tdSql.checkData(19, 2, 0.9564033460276342) + tdSql.checkData(19, 3, 1.889162191085516) + tdSql.checkData(19, 4, None) + tdSql.checkData(19, 5, 0.90296737936602) + tdSql.checkData(19, 6, 0.888896415152729) + tdSql.checkData(20, 0, 39) + tdSql.checkData(20, 1, -0.158622668804709) + tdSql.checkData(20, 2, 0.7999777847134487) + tdSql.checkData(20, 3, 0.8435920138756074) + tdSql.checkData(20, 4, None) + tdSql.checkData(20, 5, 0.3319994538301167) + tdSql.checkData(20, 6, 7.12853286308907) + tdSql.checkData(21, 0, 39) + tdSql.checkData(21, 1, -0.158622668804709) + tdSql.checkData(21, 2, 0.7999777847134487) + tdSql.checkData(21, 3, 0.8435920138756074) + tdSql.checkData(21, 4, None) + tdSql.checkData(21, 5, 0.3319994538301167) + tdSql.checkData(21, 6, 7.12853286308907) + tdSql.checkData(22, 0, 38) + tdSql.checkData(22, 1, 0.7451131604793488) + tdSql.checkData(22, 2, 0.5472018255605284) + tdSql.checkData(22, 3, 3.081063350979351) + tdSql.checkData(22, 4, None) + tdSql.checkData(22, 5, -0.007381884932924798) + tdSql.checkData(22, 6, 3.8764172978929814) + tdSql.checkData(23, 0, 38) + tdSql.checkData(23, 1, 0.7451131604793488) + tdSql.checkData(23, 2, 0.5472018255605284) + tdSql.checkData(23, 3, 3.081063350979351) + tdSql.checkData(23, 4, None) + tdSql.checkData(23, 5, -0.007381884932924798) + tdSql.checkData(23, 6, 3.8764172978929814) + tdSql.checkData(24, 0, 37) + tdSql.checkData(24, 1, 0.9637953862840878) + tdSql.checkData(24, 2, 0.909721840267583) + tdSql.checkData(24, 3, 2.1734252903776303) + tdSql.checkData(24, 4, None) + tdSql.checkData(24, 5, 0.32696474077278626) + tdSql.checkData(24, 6, 1.174082484128993) + tdSql.checkData(25, 0, 37) + tdSql.checkData(25, 1, 0.9637953862840878) + tdSql.checkData(25, 2, 0.909721840267583) + tdSql.checkData(25, 3, 2.1734252903776303) + tdSql.checkData(25, 4, None) + tdSql.checkData(25, 5, 0.32696474077278626) + tdSql.checkData(25, 6, 1.174082484128993) + tdSql.checkData(26, 0, 36) + tdSql.checkData(26, 1, 0.2963685787093853) + tdSql.checkData(26, 2, 0.8632704401895588) + tdSql.checkData(26, 3, 0.5493681603601657) + tdSql.checkData(26, 4, None) + tdSql.checkData(26, 5, 0.9944678850925007) + tdSql.checkData(26, 6, 11.004294268461184) + tdSql.checkData(27, 0, 36) + tdSql.checkData(27, 1, 0.2963685787093853) + tdSql.checkData(27, 2, 0.8632704401895588) + tdSql.checkData(27, 3, 0.5493681603601657) + tdSql.checkData(27, 4, None) + tdSql.checkData(27, 5, 0.9944678850925007) + tdSql.checkData(27, 6, 11.004294268461184) + tdSql.checkData(28, 0, 35) + tdSql.checkData(28, 1, -0.6435381333569995) + tdSql.checkData(28, 2, 0.5403764709316752) + tdSql.checkData(28, 3, 2.734210799811235) + tdSql.checkData(28, 4, None) + tdSql.checkData(28, 5, 1.1930854189064375) + tdSql.checkData(28, 6, 4.24770540197234) + tdSql.checkData(29, 0, 35) + tdSql.checkData(29, 1, -0.6435381333569995) + tdSql.checkData(29, 2, 0.5403764709316752) + tdSql.checkData(29, 3, 2.734210799811235) + tdSql.checkData(29, 4, None) + tdSql.checkData(29, 5, 1.1930854189064375) + tdSql.checkData(29, 6, 4.24770540197234) + tdSql.checkData(30, 0, 34) + tdSql.checkData(30, 1, -0.9917788534431158) + tdSql.checkData(30, 2, 0.8517779466253769) + tdSql.checkData(30, 3, 2.470955260231499) + tdSql.checkData(30, 4, None) + tdSql.checkData(30, 5, 0.4428112547200472) + tdSql.checkData(30, 6, 1.4785733565944832) + tdSql.checkData(31, 0, 34) + tdSql.checkData(31, 1, -0.9917788534431158) + tdSql.checkData(31, 2, 0.8517779466253769) + tdSql.checkData(31, 3, 2.470955260231499) + tdSql.checkData(31, 4, None) + tdSql.checkData(31, 5, 0.4428112547200472) + tdSql.checkData(31, 6, 1.4785733565944832) + tdSql.checkData(32, 0, 33) + tdSql.checkData(32, 1, -0.428182669496151) + tdSql.checkData(32, 2, 0.9194811573015673) + tdSql.checkData(32, 3, 0.4437992589174107) + tdSql.checkData(32, 4, None) + tdSql.checkData(32, 5, -0.9001958571391758) + tdSql.checkData(32, 6, -72.33956595410905) + tdSql.checkData(33, 0, 33) + tdSql.checkData(33, 1, -0.428182669496151) + tdSql.checkData(33, 2, 0.9194811573015673) + tdSql.checkData(33, 3, 0.4437992589174107) + tdSql.checkData(33, 4, None) + tdSql.checkData(33, 5, -0.9001958571391758) + tdSql.checkData(33, 6, -72.33956595410905) + tdSql.checkData(34, 0, 32) + tdSql.checkData(34, 1, 0.5290826861200238) + tdSql.checkData(34, 2, 0.5503344099628432) + tdSql.checkData(34, 3, 2.413227615833899) + tdSql.checkData(34, 4, None) + tdSql.checkData(34, 5, -1.8893763681780902) + tdSql.checkData(34, 6, 4.581032079680554) + tdSql.checkData(35, 0, 32) + tdSql.checkData(35, 1, 0.5290826861200238) + tdSql.checkData(35, 2, 0.5503344099628432) + tdSql.checkData(35, 3, 2.413227615833899) + tdSql.checkData(35, 4, None) + tdSql.checkData(35, 5, -1.8893763681780902) + tdSql.checkData(35, 6, 4.581032079680554) + tdSql.checkData(36, 0, 31) + tdSql.checkData(36, 1, 0.9999118601072672) + tdSql.checkData(36, 2, 0.7877590247885756) + tdSql.checkData(36, 3, 2.7979785951133604) + tdSql.checkData(36, 4, None) + tdSql.checkData(36, 5, -1.7874722290307907) + tdSql.checkData(36, 6, 1.8191237353300793) + tdSql.checkData(37, 0, 31) + tdSql.checkData(37, 1, 0.9999118601072672) + tdSql.checkData(37, 2, 0.7877590247885756) + tdSql.checkData(37, 3, 2.7979785951133604) + tdSql.checkData(37, 4, None) + tdSql.checkData(37, 5, -1.7874722290307907) + tdSql.checkData(37, 6, 1.8191237353300793) + tdSql.checkData(38, 0, 30) + tdSql.checkData(38, 1, 0.5514266812416906) + tdSql.checkData(38, 2, 0.9635288988181601) + tdSql.checkData(38, 3, 0.5944617511422015) + tdSql.checkData(38, 4, None) + tdSql.checkData(38, 5, -0.7022004347538967) + tdSql.checkData(38, 6, -3.710141817748492) + tdSql.checkData(39, 0, 30) + tdSql.checkData(39, 1, 0.5514266812416906) + tdSql.checkData(39, 2, 0.9635288988181601) + tdSql.checkData(39, 3, 0.5944617511422015) + tdSql.checkData(39, 4, None) + tdSql.checkData(39, 5, -0.7022004347538967) + tdSql.checkData(39, 6, -3.710141817748492) + tdSql.checkData(40, 0, 29) + tdSql.checkData(40, 1, -0.404037645323065) + tdSql.checkData(40, 2, 0.5764850221962442) + tdSql.checkData(40, 3, 2.1197476343754156) + tdSql.checkData(40, 4, None) + tdSql.checkData(40, 5, 0.5162157333804713) + tdSql.checkData(40, 6, 4.8800154918827525) + tdSql.checkData(41, 0, 29) + tdSql.checkData(41, 1, -0.404037645323065) + tdSql.checkData(41, 2, 0.5764850221962442) + tdSql.checkData(41, 3, 2.1197476343754156) + tdSql.checkData(41, 4, None) + tdSql.checkData(41, 5, 0.5162157333804713) + tdSql.checkData(41, 6, 4.8800154918827525) + tdSql.checkData(42, 0, 28) + tdSql.checkData(42, 1, -0.9880316240928618) + tdSql.checkData(42, 2, 0.7230710689951642) + tdSql.checkData(42, 3, 3.1457526648156393) + tdSql.checkData(42, 4, None) + tdSql.checkData(42, 5, 1.0206076417536643) + tdSql.checkData(42, 6, 2.197019393348823) + tdSql.checkData(43, 0, 28) + tdSql.checkData(43, 1, -0.9880316240928618) + tdSql.checkData(43, 2, 0.7230710689951642) + tdSql.checkData(43, 3, 3.1457526648156393) + tdSql.checkData(43, 4, None) + tdSql.checkData(43, 5, 1.0206076417536643) + tdSql.checkData(43, 6, 2.197019393348823) + tdSql.checkData(44, 0, 27) + tdSql.checkData(44, 1, -0.6636338842129675) + tdSql.checkData(44, 2, 0.9912542848596704) + tdSql.checkData(44, 3, 0.9080812682077812) + tdSql.checkData(44, 4, None) + tdSql.checkData(44, 5, 0.6788951190016388) + tdSql.checkData(44, 6, -0.8324928492797357) + tdSql.checkData(45, 0, 27) + tdSql.checkData(45, 1, -0.6636338842129675) + tdSql.checkData(45, 2, 0.9912542848596704) + tdSql.checkData(45, 3, 0.9080812682077812) + tdSql.checkData(45, 4, None) + tdSql.checkData(45, 5, 0.6788951190016388) + tdSql.checkData(45, 6, -0.8324928492797357) + tdSql.checkData(46, 0, 26) + tdSql.checkData(46, 1, 0.27090578830786904) + tdSql.checkData(46, 2, 0.6172306382193644) + tdSql.checkData(46, 3, 1.835550377607515) + tdSql.checkData(46, 4, None) + tdSql.checkData(46, 5, 0.11431954199291106) + tdSql.checkData(46, 6, 5.165381146246765) + tdSql.checkData(47, 0, 26) + tdSql.checkData(47, 1, 0.27090578830786904) + tdSql.checkData(47, 2, 0.6172306382193644) + tdSql.checkData(47, 3, 1.835550377607515) + tdSql.checkData(47, 4, None) + tdSql.checkData(47, 5, 0.11431954199291106) + tdSql.checkData(47, 6, 5.165381146246765) + tdSql.checkData(48, 0, 25) + tdSql.checkData(48, 1, 0.956375928404503) + tdSql.checkData(48, 2, 0.6628179613691831) + tdSql.checkData(48, 3, 3.4435632194258416) + tdSql.checkData(48, 4, None) + tdSql.checkData(48, 5, 0.05676687083562715) + tdSql.checkData(48, 6, 2.6040987392745354) + tdSql.checkData(49, 0, 25) + tdSql.checkData(49, 1, 0.956375928404503) + tdSql.checkData(49, 2, 0.6628179613691831) + tdSql.checkData(49, 3, 3.4435632194258416) + tdSql.checkData(49, 4, None) + tdSql.checkData(49, 5, 0.05676687083562715) + tdSql.checkData(49, 6, 2.6040987392745354) + tdSql.checkData(50, 0, 24) + tdSql.checkData(50, 1, 0.7625584504796027) + tdSql.checkData(50, 2, 0.999960827417674) + tdSql.checkData(50, 3, 1.2552318002593996) + tdSql.checkData(50, 4, None) + tdSql.checkData(50, 5, 0.6200983185456957) + tdSql.checkData(50, 6, 0.09684864095463253) + tdSql.checkData(51, 0, 24) + tdSql.checkData(51, 1, 0.7625584504796027) + tdSql.checkData(51, 2, 0.999960827417674) + tdSql.checkData(51, 3, 1.2552318002593996) + tdSql.checkData(51, 4, None) + tdSql.checkData(51, 5, 0.6200983185456957) + tdSql.checkData(51, 6, 0.09684864095463253) + tdSql.checkData(52, 0, 23) + tdSql.checkData(52, 1, -0.13235175009777303) + tdSql.checkData(52, 2, 0.6699494442536529) + tdSql.checkData(52, 3, 1.5387402975985367) + tdSql.checkData(52, 4, None) + tdSql.checkData(52, 5, 1.1825447904081037) + tdSql.checkData(52, 6, 5.489941431040083) + tdSql.checkData(53, 0, 23) + tdSql.checkData(53, 1, -0.13235175009777303) + tdSql.checkData(53, 2, 0.6699494442536529) + tdSql.checkData(53, 3, 1.5387402975985367) + tdSql.checkData(53, 4, None) + tdSql.checkData(53, 5, 1.1825447904081037) + tdSql.checkData(53, 6, 5.489941431040083) + tdSql.checkData(54, 0, 22) + tdSql.checkData(54, 1, -0.9055783620066239) + tdSql.checkData(54, 2, 0.6114178044194122) + tdSql.checkData(54, 3, 3.5568711064263105) + tdSql.checkData(54, 4, None) + tdSql.checkData(54, 5, 0.9837833410919679) + tdSql.checkData(54, 6, 3.0265535811470983) + tdSql.checkData(55, 0, 22) + tdSql.checkData(55, 1, -0.9055783620066239) + tdSql.checkData(55, 2, 0.6114178044194122) + tdSql.checkData(55, 3, 3.5568711064263105) + tdSql.checkData(55, 4, None) + tdSql.checkData(55, 5, 0.9837833410919679) + tdSql.checkData(55, 6, 3.0265535811470983) + tdSql.checkData(56, 0, 21) + tdSql.checkData(56, 1, -0.8462204041751706) + tdSql.checkData(56, 2, 0.9887894200405688) + tdSql.checkData(56, 3, 1.5772240911721418) + tdSql.checkData(56, 4, None) + tdSql.checkData(56, 5, -0.11647857397382422) + tdSql.checkData(56, 6, 0.5559799244477626) + tdSql.checkData(57, 0, 21) + tdSql.checkData(57, 1, -0.8462204041751706) + tdSql.checkData(57, 2, 0.9887894200405688) + tdSql.checkData(57, 3, 1.5772240911721418) + tdSql.checkData(57, 4, None) + tdSql.checkData(57, 5, -0.11647857397382422) + tdSql.checkData(57, 6, 0.5559799244477626) + tdSql.checkData(58, 0, 20) + tdSql.checkData(58, 1, -0.008851309290403876) + tdSql.checkData(58, 2, 0.7310155667453407) + tdSql.checkData(58, 3, 1.2127175951404974) + tdSql.checkData(58, 4, None) + tdSql.checkData(58, 5, -1.4304290589415767) + tdSql.checkData(58, 6, 5.982274104704091) + tdSql.checkData(59, 0, 20) + tdSql.checkData(59, 1, -0.008851309290403876) + tdSql.checkData(59, 2, 0.7310155667453407) + tdSql.checkData(59, 3, 1.2127175951404974) + tdSql.checkData(59, 4, None) + tdSql.checkData(59, 5, -1.4304290589415767) + tdSql.checkData(59, 6, 5.982274104704091) + tdSql.checkData(60, 0, 19) + tdSql.checkData(60, 1, 0.8366556385360561) + tdSql.checkData(60, 2, 0.5723746128431292) + tdSql.checkData(60, 3, 3.413484890511323) + tdSql.checkData(60, 4, None) + tdSql.checkData(60, 5, -1.9952541841757747) + tdSql.checkData(60, 6, 3.4479580493217856) + tdSql.checkData(61, 0, 19) + tdSql.checkData(61, 1, 0.8366556385360561) + tdSql.checkData(61, 2, 0.5723746128431292) + tdSql.checkData(61, 3, 3.413484890511323) + tdSql.checkData(61, 4, None) + tdSql.checkData(61, 5, -1.9952541841757747) + tdSql.checkData(61, 6, 3.4479580493217856) + tdSql.checkData(62, 0, 18) + tdSql.checkData(62, 1, 0.9129452507276277) + tdSql.checkData(62, 2, 0.9588413200803038) + tdSql.checkData(62, 3, 1.8713332491184997) + tdSql.checkData(62, 4, None) + tdSql.checkData(62, 5, -1.3983047743451864) + tdSql.checkData(62, 6, 0.8709074342191974) + tdSql.checkData(63, 0, 18) + tdSql.checkData(63, 1, 0.9129452507276277) + tdSql.checkData(63, 2, 0.9588413200803038) + tdSql.checkData(63, 3, 1.8713332491184997) + tdSql.checkData(63, 4, None) + tdSql.checkData(63, 5, -1.3983047743451864) + tdSql.checkData(63, 6, 0.8709074342191974) + tdSql.checkData(64, 0, 17) + tdSql.checkData(64, 1, 0.14987720966295234) + tdSql.checkData(64, 2, 0.7959095686227995) + tdSql.checkData(64, 3, 0.864944320724419) + tdSql.checkData(64, 4, None) + tdSql.checkData(64, 5, -0.13037289959062748) + tdSql.checkData(64, 6, 7.022998331594864) + tdSql.checkData(65, 0, 17) + tdSql.checkData(65, 1, 0.14987720966295234) + tdSql.checkData(65, 2, 0.7959095686227995) + tdSql.checkData(65, 3, 0.864944320724419) + tdSql.checkData(65, 4, None) + tdSql.checkData(65, 5, -0.13037289959062748) + tdSql.checkData(65, 6, 7.022998331594864) + tdSql.checkData(66, 0, 16) + tdSql.checkData(66, 1, -0.750987246771676) + tdSql.checkData(66, 2, 0.5481819942730298) + tdSql.checkData(66, 3, 3.102748784455539) + tdSql.checkData(66, 4, None) + tdSql.checkData(66, 5, 0.8513297604701857) + tdSql.checkData(66, 6, 3.852058923265594) + tdSql.checkData(67, 0, 16) + tdSql.checkData(67, 1, -0.750987246771676) + tdSql.checkData(67, 2, 0.5481819942730298) + tdSql.checkData(67, 3, 3.102748784455539) + tdSql.checkData(67, 4, None) + tdSql.checkData(67, 5, 0.8513297604701857) + tdSql.checkData(67, 6, 3.852058923265594) + tdSql.checkData(68, 0, 15) + tdSql.checkData(68, 1, -0.9613974918795568) + tdSql.checkData(68, 2, 0.9130208165623314) + tdSql.checkData(68, 3, 2.1554866011151765) + tdSql.checkData(68, 4, None) + tdSql.checkData(68, 5, 0.9521751875546269) + tdSql.checkData(68, 6, 1.1559749749986195) + tdSql.checkData(69, 0, 15) + tdSql.checkData(69, 1, -0.9613974918795568) + tdSql.checkData(69, 2, 0.9130208165623314) + tdSql.checkData(69, 3, 2.1554866011151765) + tdSql.checkData(69, 4, None) + tdSql.checkData(69, 5, 0.9521751875546269) + tdSql.checkData(69, 6, 1.1559749749986195) + tdSql.checkData(70, 0, 14) + tdSql.checkData(70, 1, -0.2879033166650653) + tdSql.checkData(70, 2, 0.859465627274523) + tdSql.checkData(70, 3, 0.5636905248139659) + tdSql.checkData(70, 4, None) + tdSql.checkData(70, 5, 0.41142163587369207) + tdSql.checkData(70, 6, 10.515512404402676) + tdSql.checkData(71, 0, 14) + tdSql.checkData(71, 1, -0.2879033166650653) + tdSql.checkData(71, 2, 0.859465627274523) + tdSql.checkData(71, 3, 0.5636905248139659) + tdSql.checkData(71, 4, None) + tdSql.checkData(71, 5, 0.41142163587369207) + tdSql.checkData(71, 6, 10.515512404402676) + tdSql.checkData(72, 0, 13) + tdSql.checkData(72, 1, 0.6502878401571168) + tdSql.checkData(72, 2, 0.5403105467456532) + tdSql.checkData(72, 3, 2.75535470715349) + tdSql.checkData(72, 4, None) + tdSql.checkData(72, 5, 0.0009616202598659029) + tdSql.checkData(72, 6, 4.225579583416092) + tdSql.checkData(73, 0, 13) + tdSql.checkData(73, 1, 0.6502878401571168) + tdSql.checkData(73, 2, 0.5403105467456532) + tdSql.checkData(73, 3, 2.75535470715349) + tdSql.checkData(73, 4, None) + tdSql.checkData(73, 5, 0.0009616202598659029) + tdSql.checkData(73, 6, 4.225579583416092) + tdSql.checkData(74, 0, 12) + tdSql.checkData(74, 1, 0.9906073556948704) + tdSql.checkData(74, 2, 0.8556343548213666) + tdSql.checkData(74, 3, 2.451594361777497) + tdSql.checkData(74, 4, None) + tdSql.checkData(74, 5, 0.24838494428124291) + tdSql.checkData(74, 6, 1.4585617093317953) + tdSql.checkData(75, 0, 12) + tdSql.checkData(75, 1, 0.9906073556948704) + tdSql.checkData(75, 2, 0.8556343548213666) + tdSql.checkData(75, 3, 2.451594361777497) + tdSql.checkData(75, 4, None) + tdSql.checkData(75, 5, 0.24838494428124291) + tdSql.checkData(75, 6, 1.4585617093317953) + tdSql.checkData(76, 0, 11) + tdSql.checkData(76, 1, 0.4201670368266409) + tdSql.checkData(76, 2, 0.9162743174606308) + tdSql.checkData(76, 3, 0.44272645708128566) + tdSql.checkData(76, 4, None) + tdSql.checkData(76, 5, 0.9151372562290566) + tdSql.checkData(76, 6, -222.95969776348554) + tdSql.checkData(77, 0, 11) + tdSql.checkData(77, 1, 0.4201670368266409) + tdSql.checkData(77, 2, 0.9162743174606308) + tdSql.checkData(77, 3, 0.44272645708128566) + tdSql.checkData(77, 4, None) + tdSql.checkData(77, 5, 0.9151372562290566) + tdSql.checkData(77, 6, -222.95969776348554) + tdSql.checkData(78, 0, 10) + tdSql.checkData(78, 1, -0.5365729180004349) + tdSql.checkData(78, 2, 0.549226270051226) + tdSql.checkData(78, 3, 2.432352856101439) + tdSql.checkData(78, 4, None) + tdSql.checkData(78, 5, 1.2185572409879093) + tdSql.checkData(78, 6, 4.561306078186714) + tdSql.checkData(79, 0, 10) + tdSql.checkData(79, 1, -0.5365729180004349) + tdSql.checkData(79, 2, 0.549226270051226) + tdSql.checkData(79, 3, 2.432352856101439) + tdSql.checkData(79, 4, None) + tdSql.checkData(79, 5, 1.2185572409879093) + tdSql.checkData(79, 6, 4.561306078186714) + tdSql.checkData(80, 0, 9) + tdSql.checkData(80, 1, -0.9999902065507035) + tdSql.checkData(80, 2, 0.7918362090144786) + tdSql.checkData(80, 3, 2.776612511546888) + tdSql.checkData(80, 4, None) + tdSql.checkData(80, 5, 0.5929886271208413) + tdSql.checkData(80, 6, 1.796697093786514) + tdSql.checkData(81, 0, 9) + tdSql.checkData(81, 1, -0.9999902065507035) + tdSql.checkData(81, 2, 0.7918362090144786) + tdSql.checkData(81, 3, 2.776612511546888) + tdSql.checkData(81, 4, None) + tdSql.checkData(81, 5, 0.5929886271208413) + tdSql.checkData(81, 6, 1.796697093786514) + tdSql.checkData(82, 0, 8) + tdSql.checkData(82, 1, -0.5440211108893698) + tdSql.checkData(82, 2, 0.9612168045072789) + tdSql.checkData(82, 3, 0.5787344727995947) + tdSql.checkData(82, 4, None) + tdSql.checkData(82, 5, -0.7199655182148126) + tdSql.checkData(82, 6, -4.087614771885445) + tdSql.checkData(83, 0, 8) + tdSql.checkData(83, 1, -0.5440211108893698) + tdSql.checkData(83, 2, 0.9612168045072789) + tdSql.checkData(83, 3, 0.5787344727995947) + tdSql.checkData(83, 4, None) + tdSql.checkData(83, 5, -0.7199655182148126) + tdSql.checkData(83, 6, -4.087614771885445) + tdSql.checkData(84, 0, 7) + tdSql.checkData(84, 1, 0.4121184852417566) + tdSql.checkData(84, 2, 0.574400879193934) + tdSql.checkData(84, 3, 2.137595835197328) + tdSql.checkData(84, 4, None) + tdSql.checkData(84, 5, -1.8119088619792247) + tdSql.checkData(84, 6, 4.862055338419189) + tdSql.checkData(85, 0, 7) + tdSql.checkData(85, 1, 0.4121184852417566) + tdSql.checkData(85, 2, 0.574400879193934) + tdSql.checkData(85, 3, 2.137595835197328) + tdSql.checkData(85, 4, None) + tdSql.checkData(85, 5, -1.8119088619792247) + tdSql.checkData(85, 6, 4.862055338419189) + tdSql.checkData(86, 0, 6) + tdSql.checkData(86, 1, 0.9893582466233818) + tdSql.checkData(86, 2, 0.7270351311688125) + tdSql.checkData(86, 3, 3.1243204798042576) + tdSql.checkData(86, 4, None) + tdSql.checkData(86, 5, -1.8696882565721156) + tdSql.checkData(86, 6, 2.172420890614816) + tdSql.checkData(87, 0, 6) + tdSql.checkData(87, 1, 0.9893582466233818) + tdSql.checkData(87, 2, 0.7270351311688125) + tdSql.checkData(87, 3, 3.1243204798042576) + tdSql.checkData(87, 4, None) + tdSql.checkData(87, 5, -1.8696882565721156) + tdSql.checkData(87, 6, 2.172420890614816) + tdSql.checkData(88, 0, 5) + tdSql.checkData(88, 1, 0.6569865987187891) + tdSql.checkData(88, 2, 0.9900590857598653) + tdSql.checkData(88, 3, 0.8864495743441427) + tdSql.checkData(88, 4, None) + tdSql.checkData(88, 5, -0.876294736008743) + tdSql.checkData(88, 6, -0.9245361171359558) + tdSql.checkData(89, 0, 5) + tdSql.checkData(89, 1, 0.6569865987187891) + tdSql.checkData(89, 2, 0.9900590857598653) + tdSql.checkData(89, 3, 0.8864495743441427) + tdSql.checkData(89, 4, None) + tdSql.checkData(89, 5, -0.876294736008743) + tdSql.checkData(89, 6, -0.9245361171359558) + tdSql.checkData(90, 0, 4) + tdSql.checkData(90, 1, -0.27941549819892586) + tdSql.checkData(90, 2, 0.6143002821164822) + tdSql.checkData(90, 3, 1.853464438509776) + tdSql.checkData(90, 4, None) + tdSql.checkData(90, 5, 0.38234027607634785) + tdSql.checkData(90, 6, 5.147179528972959) + tdSql.checkData(91, 0, 4) + tdSql.checkData(91, 1, -0.27941549819892586) + tdSql.checkData(91, 2, 0.6143002821164822) + tdSql.checkData(91, 3, 1.853464438509776) + tdSql.checkData(91, 4, None) + tdSql.checkData(91, 5, 0.38234027607634785) + tdSql.checkData(91, 6, 5.147179528972959) + tdSql.checkData(92, 0, 3) + tdSql.checkData(92, 1, -0.9589242746631385) + tdSql.checkData(92, 2, 0.6663667453928805) + tdSql.checkData(92, 3, 3.4288753232277074) + tdSql.checkData(92, 4, None) + tdSql.checkData(92, 5, 1.0087371784424417) + tdSql.checkData(92, 6, 2.5780379587267963) + tdSql.checkData(93, 0, 3) + tdSql.checkData(93, 1, -0.9589242746631385) + tdSql.checkData(93, 2, 0.6663667453928805) + tdSql.checkData(93, 3, 3.4288753232277074) + tdSql.checkData(93, 4, None) + tdSql.checkData(93, 5, 1.0087371784424417) + tdSql.checkData(93, 6, 2.5780379587267963) + tdSql.checkData(94, 0, 2) + tdSql.checkData(94, 1, -0.7568024953079282) + tdSql.checkData(94, 2, 1.0) + tdSql.checkData(94, 3, 1.2340302976078754) + tdSql.checkData(94, 4, None) + tdSql.checkData(94, 5, 0.7554222939559553) + tdSql.checkData(94, 6, 0.05815764143055291) + tdSql.checkData(95, 0, 2) + tdSql.checkData(95, 1, -0.7568024953079282) + tdSql.checkData(95, 2, 1.0) + tdSql.checkData(95, 3, 1.2340302976078754) + tdSql.checkData(95, 4, None) + tdSql.checkData(95, 5, 0.7554222939559553) + tdSql.checkData(95, 6, 0.05815764143055291) + tdSql.checkData(96, 0, 1) + tdSql.checkData(96, 1, 0.1411200080598672) + tdSql.checkData(96, 2, 0.6663667453928805) + tdSql.checkData(96, 3, 1.558041126155035) + tdSql.checkData(96, 4, 1.8325957145940461) + tdSql.checkData(96, 5, 0.17204223631998083) + tdSql.checkData(96, 6, None) + tdSql.checkData(97, 0, 1) + tdSql.checkData(97, 1, 0.1411200080598672) + tdSql.checkData(97, 2, 0.6663667453928805) + tdSql.checkData(97, 3, 1.558041126155035) + tdSql.checkData(97, 4, 1.8325957145940461) + tdSql.checkData(97, 5, 0.17204223631998083) + tdSql.checkData(97, 6, None) + tdSql.checkData(98, 0, 0) + tdSql.checkData(98, 1, 0.7780731968879212) + tdSql.checkData(98, 2, 0.6143002821164822) + tdSql.checkData(98, 3, 3.2037266279837113) + tdSql.checkData(98, 4, None) + tdSql.checkData(98, 5, 0.02246988233490299) + tdSql.checkData(98, 6, None) + tdSql.checkData(99, 0, 0) + tdSql.checkData(99, 1, 0.7780731968879212) + tdSql.checkData(99, 2, 0.6143002821164822) + tdSql.checkData(99, 3, 3.2037266279837113) + tdSql.checkData(99, 4, None) + tdSql.checkData(99, 5, 0.02246988233490299) + tdSql.checkData(99, 6, None) + + tdSql.query('select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 order by ts limit 2);;') + tdSql.checkRows(2) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 0.7780731968879212) + tdSql.checkData(0, 2, 0.6143002821164822) + tdSql.checkData(0, 3, 3.2037266279837113) + tdSql.checkData(0, 4, None) + tdSql.checkData(0, 5, 0.02246988233490299) + tdSql.checkData(0, 6, None) + tdSql.checkData(1, 0, 1) + tdSql.checkData(1, 1, 0.1411200080598672) + tdSql.checkData(1, 2, 0.6663667453928805) + tdSql.checkData(1, 3, 1.558041126155035) + tdSql.checkData(1, 4, 1.8325957145940461) + tdSql.checkData(1, 5, 0.17204223631998083) + tdSql.checkData(1, 6, None) + + tdSql.query('select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 ) order by ts desc;') + tdSql.checkRows(100) + tdSql.checkData(0, 0, 49) + tdSql.checkData(0, 1, 0.6702291758433747) + tdSql.checkData(0, 2, 0.9923745526637894) + tdSql.checkData(0, 3, 0.9298143670243166) + tdSql.checkData(0, 4, None) + tdSql.checkData(0, 5, 0.7136182821549459) + tdSql.checkData(0, 6, -0.7462904241496138) + tdSql.checkData(1, 0, 49) + tdSql.checkData(1, 1, 0.6702291758433747) + tdSql.checkData(1, 2, 0.9923745526637894) + tdSql.checkData(1, 3, 0.9298143670243166) + tdSql.checkData(1, 4, None) + tdSql.checkData(1, 5, 0.7136182821549459) + tdSql.checkData(1, 6, -0.7462904241496138) + tdSql.checkData(2, 0, 48) + tdSql.checkData(2, 1, -0.26237485370392877) + tdSql.checkData(2, 2, 0.6202081141679935) + tdSql.checkData(2, 3, 1.8175857333771335) + tdSql.checkData(2, 4, None) + tdSql.checkData(2, 5, 1.211884234321115) + tdSql.checkData(2, 6, 5.183714988550632) + tdSql.checkData(3, 0, 48) + tdSql.checkData(3, 1, -0.26237485370392877) + tdSql.checkData(3, 2, 0.6202081141679935) + tdSql.checkData(3, 3, 1.8175857333771335) + tdSql.checkData(3, 4, None) + tdSql.checkData(3, 5, 1.211884234321115) + tdSql.checkData(3, 6, 5.183714988550632) + tdSql.checkData(4, 0, 47) + tdSql.checkData(4, 1, -0.9537526527594719) + tdSql.checkData(4, 2, 0.6593040763085178) + tdSql.checkData(4, 3, 3.4575106745458637) + tdSql.checkData(4, 4, None) + tdSql.checkData(4, 5, 0.8820838187306987) + tdSql.checkData(4, 6, 2.6302204463996084) + tdSql.checkData(5, 0, 47) + tdSql.checkData(5, 1, -0.9537526527594719) + tdSql.checkData(5, 2, 0.6593040763085178) + tdSql.checkData(5, 3, 3.4575106745458637) + tdSql.checkData(5, 4, None) + tdSql.checkData(5, 5, 0.8820838187306987) + tdSql.checkData(5, 6, 2.6302204463996084) + tdSql.checkData(6, 0, 46) + tdSql.checkData(6, 1, -0.7682546613236668) + tdSql.checkData(6, 2, 0.9998433250151273) + tdSql.checkData(6, 3, 1.2763169256468458) + tdSql.checkData(6, 4, None) + tdSql.checkData(6, 5, -0.300459258677913) + tdSql.checkData(6, 6, 0.13392039926281352) + tdSql.checkData(7, 0, 46) + tdSql.checkData(7, 1, -0.7682546613236668) + tdSql.checkData(7, 2, 0.9998433250151273) + tdSql.checkData(7, 3, 1.2763169256468458) + tdSql.checkData(7, 4, None) + tdSql.checkData(7, 5, -0.300459258677913) + tdSql.checkData(7, 6, 0.13392039926281352) + tdSql.checkData(8, 0, 45) + tdSql.checkData(8, 1, 0.123573122745224) + tdSql.checkData(8, 2, 0.6735650596658175) + tdSql.checkData(8, 3, 1.5193186190030223) + tdSql.checkData(8, 4, None) + tdSql.checkData(8, 5, -1.5661895943272113) + tdSql.checkData(8, 6, 5.513771854144419) + tdSql.checkData(9, 0, 45) + tdSql.checkData(9, 1, 0.123573122745224) + tdSql.checkData(9, 2, 0.6735650596658175) + tdSql.checkData(9, 3, 1.5193186190030223) + tdSql.checkData(9, 4, None) + tdSql.checkData(9, 5, -1.5661895943272113) + tdSql.checkData(9, 6, 5.513771854144419) + tdSql.checkData(10, 0, 44) + tdSql.checkData(10, 1, 0.9017883476488092) + tdSql.checkData(10, 2, 0.6085839480802863) + tdSql.checkData(10, 3, 3.5552629892514687) + tdSql.checkData(10, 4, None) + tdSql.checkData(10, 5, -1.9810692649977342) + tdSql.checkData(10, 6, 3.0531030020123464) + tdSql.checkData(11, 0, 44) + tdSql.checkData(11, 1, 0.9017883476488092) + tdSql.checkData(11, 2, 0.6085839480802863) + tdSql.checkData(11, 3, 3.5552629892514687) + tdSql.checkData(11, 4, None) + tdSql.checkData(11, 5, -1.9810692649977342) + tdSql.checkData(11, 6, 3.0531030020123464) + tdSql.checkData(12, 0, 43) + tdSql.checkData(12, 1, 0.8509035245341184) + tdSql.checkData(12, 2, 0.9874457808369176) + tdSql.checkData(12, 3, 1.5962924548219202) + tdSql.checkData(12, 4, None) + tdSql.checkData(12, 5, -1.2490970766755156) + tdSql.checkData(12, 6, 0.5781542141407696) + tdSql.checkData(13, 0, 43) + tdSql.checkData(13, 1, 0.8509035245341184) + tdSql.checkData(13, 2, 0.9874457808369176) + tdSql.checkData(13, 3, 1.5962924548219202) + tdSql.checkData(13, 4, None) + tdSql.checkData(13, 5, -1.2490970766755156) + tdSql.checkData(13, 6, 0.5781542141407696) + tdSql.checkData(14, 0, 42) + tdSql.checkData(14, 1, 0.017701925105413577) + tdSql.checkData(14, 2, 0.7350111780599404) + tdSql.checkData(14, 3, 1.1912997639866574) + tdSql.checkData(14, 4, None) + tdSql.checkData(14, 5, 0.036467324189017214) + tdSql.checkData(14, 6, 6.024578312510778) + tdSql.checkData(15, 0, 42) + tdSql.checkData(15, 1, 0.017701925105413577) + tdSql.checkData(15, 2, 0.7350111780599404) + tdSql.checkData(15, 3, 1.1912997639866574) + tdSql.checkData(15, 4, None) + tdSql.checkData(15, 5, 0.036467324189017214) + tdSql.checkData(15, 6, 6.024578312510778) + tdSql.checkData(16, 0, 41) + tdSql.checkData(16, 1, -0.8317747426285983) + tdSql.checkData(16, 2, 0.5704067143341829) + tdSql.checkData(16, 3, 3.397430462894578) + tdSql.checkData(16, 4, None) + tdSql.checkData(16, 5, 0.9190273051332304) + tdSql.checkData(16, 6, 3.473885481113728) + tdSql.checkData(17, 0, 41) + tdSql.checkData(17, 1, -0.8317747426285983) + tdSql.checkData(17, 2, 0.5704067143341829) + tdSql.checkData(17, 3, 3.397430462894578) + tdSql.checkData(17, 4, None) + tdSql.checkData(17, 5, 0.9190273051332304) + tdSql.checkData(17, 6, 3.473885481113728) + tdSql.checkData(18, 0, 40) + tdSql.checkData(18, 1, -0.9165215479156338) + tdSql.checkData(18, 2, 0.9564033460276342) + tdSql.checkData(18, 3, 1.889162191085516) + tdSql.checkData(18, 4, None) + tdSql.checkData(18, 5, 0.90296737936602) + tdSql.checkData(18, 6, 0.888896415152729) + tdSql.checkData(19, 0, 40) + tdSql.checkData(19, 1, -0.9165215479156338) + tdSql.checkData(19, 2, 0.9564033460276342) + tdSql.checkData(19, 3, 1.889162191085516) + tdSql.checkData(19, 4, None) + tdSql.checkData(19, 5, 0.90296737936602) + tdSql.checkData(19, 6, 0.888896415152729) + tdSql.checkData(20, 0, 39) + tdSql.checkData(20, 1, -0.158622668804709) + tdSql.checkData(20, 2, 0.7999777847134487) + tdSql.checkData(20, 3, 0.8435920138756074) + tdSql.checkData(20, 4, None) + tdSql.checkData(20, 5, 0.3319994538301167) + tdSql.checkData(20, 6, 7.12853286308907) + tdSql.checkData(21, 0, 39) + tdSql.checkData(21, 1, -0.158622668804709) + tdSql.checkData(21, 2, 0.7999777847134487) + tdSql.checkData(21, 3, 0.8435920138756074) + tdSql.checkData(21, 4, None) + tdSql.checkData(21, 5, 0.3319994538301167) + tdSql.checkData(21, 6, 7.12853286308907) + tdSql.checkData(22, 0, 38) + tdSql.checkData(22, 1, 0.7451131604793488) + tdSql.checkData(22, 2, 0.5472018255605284) + tdSql.checkData(22, 3, 3.081063350979351) + tdSql.checkData(22, 4, None) + tdSql.checkData(22, 5, -0.007381884932924798) + tdSql.checkData(22, 6, 3.8764172978929814) + tdSql.checkData(23, 0, 38) + tdSql.checkData(23, 1, 0.7451131604793488) + tdSql.checkData(23, 2, 0.5472018255605284) + tdSql.checkData(23, 3, 3.081063350979351) + tdSql.checkData(23, 4, None) + tdSql.checkData(23, 5, -0.007381884932924798) + tdSql.checkData(23, 6, 3.8764172978929814) + tdSql.checkData(24, 0, 37) + tdSql.checkData(24, 1, 0.9637953862840878) + tdSql.checkData(24, 2, 0.909721840267583) + tdSql.checkData(24, 3, 2.1734252903776303) + tdSql.checkData(24, 4, None) + tdSql.checkData(24, 5, 0.32696474077278626) + tdSql.checkData(24, 6, 1.174082484128993) + tdSql.checkData(25, 0, 37) + tdSql.checkData(25, 1, 0.9637953862840878) + tdSql.checkData(25, 2, 0.909721840267583) + tdSql.checkData(25, 3, 2.1734252903776303) + tdSql.checkData(25, 4, None) + tdSql.checkData(25, 5, 0.32696474077278626) + tdSql.checkData(25, 6, 1.174082484128993) + tdSql.checkData(26, 0, 36) + tdSql.checkData(26, 1, 0.2963685787093853) + tdSql.checkData(26, 2, 0.8632704401895588) + tdSql.checkData(26, 3, 0.5493681603601657) + tdSql.checkData(26, 4, None) + tdSql.checkData(26, 5, 0.9944678850925007) + tdSql.checkData(26, 6, 11.004294268461184) + tdSql.checkData(27, 0, 36) + tdSql.checkData(27, 1, 0.2963685787093853) + tdSql.checkData(27, 2, 0.8632704401895588) + tdSql.checkData(27, 3, 0.5493681603601657) + tdSql.checkData(27, 4, None) + tdSql.checkData(27, 5, 0.9944678850925007) + tdSql.checkData(27, 6, 11.004294268461184) + tdSql.checkData(28, 0, 35) + tdSql.checkData(28, 1, -0.6435381333569995) + tdSql.checkData(28, 2, 0.5403764709316752) + tdSql.checkData(28, 3, 2.734210799811235) + tdSql.checkData(28, 4, None) + tdSql.checkData(28, 5, 1.1930854189064375) + tdSql.checkData(28, 6, 4.24770540197234) + tdSql.checkData(29, 0, 35) + tdSql.checkData(29, 1, -0.6435381333569995) + tdSql.checkData(29, 2, 0.5403764709316752) + tdSql.checkData(29, 3, 2.734210799811235) + tdSql.checkData(29, 4, None) + tdSql.checkData(29, 5, 1.1930854189064375) + tdSql.checkData(29, 6, 4.24770540197234) + tdSql.checkData(30, 0, 34) + tdSql.checkData(30, 1, -0.9917788534431158) + tdSql.checkData(30, 2, 0.8517779466253769) + tdSql.checkData(30, 3, 2.470955260231499) + tdSql.checkData(30, 4, None) + tdSql.checkData(30, 5, 0.4428112547200472) + tdSql.checkData(30, 6, 1.4785733565944832) + tdSql.checkData(31, 0, 34) + tdSql.checkData(31, 1, -0.9917788534431158) + tdSql.checkData(31, 2, 0.8517779466253769) + tdSql.checkData(31, 3, 2.470955260231499) + tdSql.checkData(31, 4, None) + tdSql.checkData(31, 5, 0.4428112547200472) + tdSql.checkData(31, 6, 1.4785733565944832) + tdSql.checkData(32, 0, 33) + tdSql.checkData(32, 1, -0.428182669496151) + tdSql.checkData(32, 2, 0.9194811573015673) + tdSql.checkData(32, 3, 0.4437992589174107) + tdSql.checkData(32, 4, None) + tdSql.checkData(32, 5, -0.9001958571391758) + tdSql.checkData(32, 6, -72.33956595410905) + tdSql.checkData(33, 0, 33) + tdSql.checkData(33, 1, -0.428182669496151) + tdSql.checkData(33, 2, 0.9194811573015673) + tdSql.checkData(33, 3, 0.4437992589174107) + tdSql.checkData(33, 4, None) + tdSql.checkData(33, 5, -0.9001958571391758) + tdSql.checkData(33, 6, -72.33956595410905) + tdSql.checkData(34, 0, 32) + tdSql.checkData(34, 1, 0.5290826861200238) + tdSql.checkData(34, 2, 0.5503344099628432) + tdSql.checkData(34, 3, 2.413227615833899) + tdSql.checkData(34, 4, None) + tdSql.checkData(34, 5, -1.8893763681780902) + tdSql.checkData(34, 6, 4.581032079680554) + tdSql.checkData(35, 0, 32) + tdSql.checkData(35, 1, 0.5290826861200238) + tdSql.checkData(35, 2, 0.5503344099628432) + tdSql.checkData(35, 3, 2.413227615833899) + tdSql.checkData(35, 4, None) + tdSql.checkData(35, 5, -1.8893763681780902) + tdSql.checkData(35, 6, 4.581032079680554) + tdSql.checkData(36, 0, 31) + tdSql.checkData(36, 1, 0.9999118601072672) + tdSql.checkData(36, 2, 0.7877590247885756) + tdSql.checkData(36, 3, 2.7979785951133604) + tdSql.checkData(36, 4, None) + tdSql.checkData(36, 5, -1.7874722290307907) + tdSql.checkData(36, 6, 1.8191237353300793) + tdSql.checkData(37, 0, 31) + tdSql.checkData(37, 1, 0.9999118601072672) + tdSql.checkData(37, 2, 0.7877590247885756) + tdSql.checkData(37, 3, 2.7979785951133604) + tdSql.checkData(37, 4, None) + tdSql.checkData(37, 5, -1.7874722290307907) + tdSql.checkData(37, 6, 1.8191237353300793) + tdSql.checkData(38, 0, 30) + tdSql.checkData(38, 1, 0.5514266812416906) + tdSql.checkData(38, 2, 0.9635288988181601) + tdSql.checkData(38, 3, 0.5944617511422015) + tdSql.checkData(38, 4, None) + tdSql.checkData(38, 5, -0.7022004347538967) + tdSql.checkData(38, 6, -3.710141817748492) + tdSql.checkData(39, 0, 30) + tdSql.checkData(39, 1, 0.5514266812416906) + tdSql.checkData(39, 2, 0.9635288988181601) + tdSql.checkData(39, 3, 0.5944617511422015) + tdSql.checkData(39, 4, None) + tdSql.checkData(39, 5, -0.7022004347538967) + tdSql.checkData(39, 6, -3.710141817748492) + tdSql.checkData(40, 0, 29) + tdSql.checkData(40, 1, -0.404037645323065) + tdSql.checkData(40, 2, 0.5764850221962442) + tdSql.checkData(40, 3, 2.1197476343754156) + tdSql.checkData(40, 4, None) + tdSql.checkData(40, 5, 0.5162157333804713) + tdSql.checkData(40, 6, 4.8800154918827525) + tdSql.checkData(41, 0, 29) + tdSql.checkData(41, 1, -0.404037645323065) + tdSql.checkData(41, 2, 0.5764850221962442) + tdSql.checkData(41, 3, 2.1197476343754156) + tdSql.checkData(41, 4, None) + tdSql.checkData(41, 5, 0.5162157333804713) + tdSql.checkData(41, 6, 4.8800154918827525) + tdSql.checkData(42, 0, 28) + tdSql.checkData(42, 1, -0.9880316240928618) + tdSql.checkData(42, 2, 0.7230710689951642) + tdSql.checkData(42, 3, 3.1457526648156393) + tdSql.checkData(42, 4, None) + tdSql.checkData(42, 5, 1.0206076417536643) + tdSql.checkData(42, 6, 2.197019393348823) + tdSql.checkData(43, 0, 28) + tdSql.checkData(43, 1, -0.9880316240928618) + tdSql.checkData(43, 2, 0.7230710689951642) + tdSql.checkData(43, 3, 3.1457526648156393) + tdSql.checkData(43, 4, None) + tdSql.checkData(43, 5, 1.0206076417536643) + tdSql.checkData(43, 6, 2.197019393348823) + tdSql.checkData(44, 0, 27) + tdSql.checkData(44, 1, -0.6636338842129675) + tdSql.checkData(44, 2, 0.9912542848596704) + tdSql.checkData(44, 3, 0.9080812682077812) + tdSql.checkData(44, 4, None) + tdSql.checkData(44, 5, 0.6788951190016388) + tdSql.checkData(44, 6, -0.8324928492797357) + tdSql.checkData(45, 0, 27) + tdSql.checkData(45, 1, -0.6636338842129675) + tdSql.checkData(45, 2, 0.9912542848596704) + tdSql.checkData(45, 3, 0.9080812682077812) + tdSql.checkData(45, 4, None) + tdSql.checkData(45, 5, 0.6788951190016388) + tdSql.checkData(45, 6, -0.8324928492797357) + tdSql.checkData(46, 0, 26) + tdSql.checkData(46, 1, 0.27090578830786904) + tdSql.checkData(46, 2, 0.6172306382193644) + tdSql.checkData(46, 3, 1.835550377607515) + tdSql.checkData(46, 4, None) + tdSql.checkData(46, 5, 0.11431954199291106) + tdSql.checkData(46, 6, 5.165381146246765) + tdSql.checkData(47, 0, 26) + tdSql.checkData(47, 1, 0.27090578830786904) + tdSql.checkData(47, 2, 0.6172306382193644) + tdSql.checkData(47, 3, 1.835550377607515) + tdSql.checkData(47, 4, None) + tdSql.checkData(47, 5, 0.11431954199291106) + tdSql.checkData(47, 6, 5.165381146246765) + tdSql.checkData(48, 0, 25) + tdSql.checkData(48, 1, 0.956375928404503) + tdSql.checkData(48, 2, 0.6628179613691831) + tdSql.checkData(48, 3, 3.4435632194258416) + tdSql.checkData(48, 4, None) + tdSql.checkData(48, 5, 0.05676687083562715) + tdSql.checkData(48, 6, 2.6040987392745354) + tdSql.checkData(49, 0, 25) + tdSql.checkData(49, 1, 0.956375928404503) + tdSql.checkData(49, 2, 0.6628179613691831) + tdSql.checkData(49, 3, 3.4435632194258416) + tdSql.checkData(49, 4, None) + tdSql.checkData(49, 5, 0.05676687083562715) + tdSql.checkData(49, 6, 2.6040987392745354) + tdSql.checkData(50, 0, 24) + tdSql.checkData(50, 1, 0.7625584504796027) + tdSql.checkData(50, 2, 0.999960827417674) + tdSql.checkData(50, 3, 1.2552318002593996) + tdSql.checkData(50, 4, None) + tdSql.checkData(50, 5, 0.6200983185456957) + tdSql.checkData(50, 6, 0.09684864095463253) + tdSql.checkData(51, 0, 24) + tdSql.checkData(51, 1, 0.7625584504796027) + tdSql.checkData(51, 2, 0.999960827417674) + tdSql.checkData(51, 3, 1.2552318002593996) + tdSql.checkData(51, 4, None) + tdSql.checkData(51, 5, 0.6200983185456957) + tdSql.checkData(51, 6, 0.09684864095463253) + tdSql.checkData(52, 0, 23) + tdSql.checkData(52, 1, -0.13235175009777303) + tdSql.checkData(52, 2, 0.6699494442536529) + tdSql.checkData(52, 3, 1.5387402975985367) + tdSql.checkData(52, 4, None) + tdSql.checkData(52, 5, 1.1825447904081037) + tdSql.checkData(52, 6, 5.489941431040083) + tdSql.checkData(53, 0, 23) + tdSql.checkData(53, 1, -0.13235175009777303) + tdSql.checkData(53, 2, 0.6699494442536529) + tdSql.checkData(53, 3, 1.5387402975985367) + tdSql.checkData(53, 4, None) + tdSql.checkData(53, 5, 1.1825447904081037) + tdSql.checkData(53, 6, 5.489941431040083) + tdSql.checkData(54, 0, 22) + tdSql.checkData(54, 1, -0.9055783620066239) + tdSql.checkData(54, 2, 0.6114178044194122) + tdSql.checkData(54, 3, 3.5568711064263105) + tdSql.checkData(54, 4, None) + tdSql.checkData(54, 5, 0.9837833410919679) + tdSql.checkData(54, 6, 3.0265535811470983) + tdSql.checkData(55, 0, 22) + tdSql.checkData(55, 1, -0.9055783620066239) + tdSql.checkData(55, 2, 0.6114178044194122) + tdSql.checkData(55, 3, 3.5568711064263105) + tdSql.checkData(55, 4, None) + tdSql.checkData(55, 5, 0.9837833410919679) + tdSql.checkData(55, 6, 3.0265535811470983) + tdSql.checkData(56, 0, 21) + tdSql.checkData(56, 1, -0.8462204041751706) + tdSql.checkData(56, 2, 0.9887894200405688) + tdSql.checkData(56, 3, 1.5772240911721418) + tdSql.checkData(56, 4, None) + tdSql.checkData(56, 5, -0.11647857397382422) + tdSql.checkData(56, 6, 0.5559799244477626) + tdSql.checkData(57, 0, 21) + tdSql.checkData(57, 1, -0.8462204041751706) + tdSql.checkData(57, 2, 0.9887894200405688) + tdSql.checkData(57, 3, 1.5772240911721418) + tdSql.checkData(57, 4, None) + tdSql.checkData(57, 5, -0.11647857397382422) + tdSql.checkData(57, 6, 0.5559799244477626) + tdSql.checkData(58, 0, 20) + tdSql.checkData(58, 1, -0.008851309290403876) + tdSql.checkData(58, 2, 0.7310155667453407) + tdSql.checkData(58, 3, 1.2127175951404974) + tdSql.checkData(58, 4, None) + tdSql.checkData(58, 5, -1.4304290589415767) + tdSql.checkData(58, 6, 5.982274104704091) + tdSql.checkData(59, 0, 20) + tdSql.checkData(59, 1, -0.008851309290403876) + tdSql.checkData(59, 2, 0.7310155667453407) + tdSql.checkData(59, 3, 1.2127175951404974) + tdSql.checkData(59, 4, None) + tdSql.checkData(59, 5, -1.4304290589415767) + tdSql.checkData(59, 6, 5.982274104704091) + tdSql.checkData(60, 0, 19) + tdSql.checkData(60, 1, 0.8366556385360561) + tdSql.checkData(60, 2, 0.5723746128431292) + tdSql.checkData(60, 3, 3.413484890511323) + tdSql.checkData(60, 4, None) + tdSql.checkData(60, 5, -1.9952541841757747) + tdSql.checkData(60, 6, 3.4479580493217856) + tdSql.checkData(61, 0, 19) + tdSql.checkData(61, 1, 0.8366556385360561) + tdSql.checkData(61, 2, 0.5723746128431292) + tdSql.checkData(61, 3, 3.413484890511323) + tdSql.checkData(61, 4, None) + tdSql.checkData(61, 5, -1.9952541841757747) + tdSql.checkData(61, 6, 3.4479580493217856) + tdSql.checkData(62, 0, 18) + tdSql.checkData(62, 1, 0.9129452507276277) + tdSql.checkData(62, 2, 0.9588413200803038) + tdSql.checkData(62, 3, 1.8713332491184997) + tdSql.checkData(62, 4, None) + tdSql.checkData(62, 5, -1.3983047743451864) + tdSql.checkData(62, 6, 0.8709074342191974) + tdSql.checkData(63, 0, 18) + tdSql.checkData(63, 1, 0.9129452507276277) + tdSql.checkData(63, 2, 0.9588413200803038) + tdSql.checkData(63, 3, 1.8713332491184997) + tdSql.checkData(63, 4, None) + tdSql.checkData(63, 5, -1.3983047743451864) + tdSql.checkData(63, 6, 0.8709074342191974) + tdSql.checkData(64, 0, 17) + tdSql.checkData(64, 1, 0.14987720966295234) + tdSql.checkData(64, 2, 0.7959095686227995) + tdSql.checkData(64, 3, 0.864944320724419) + tdSql.checkData(64, 4, None) + tdSql.checkData(64, 5, -0.13037289959062748) + tdSql.checkData(64, 6, 7.022998331594864) + tdSql.checkData(65, 0, 17) + tdSql.checkData(65, 1, 0.14987720966295234) + tdSql.checkData(65, 2, 0.7959095686227995) + tdSql.checkData(65, 3, 0.864944320724419) + tdSql.checkData(65, 4, None) + tdSql.checkData(65, 5, -0.13037289959062748) + tdSql.checkData(65, 6, 7.022998331594864) + tdSql.checkData(66, 0, 16) + tdSql.checkData(66, 1, -0.750987246771676) + tdSql.checkData(66, 2, 0.5481819942730298) + tdSql.checkData(66, 3, 3.102748784455539) + tdSql.checkData(66, 4, None) + tdSql.checkData(66, 5, 0.8513297604701857) + tdSql.checkData(66, 6, 3.852058923265594) + tdSql.checkData(67, 0, 16) + tdSql.checkData(67, 1, -0.750987246771676) + tdSql.checkData(67, 2, 0.5481819942730298) + tdSql.checkData(67, 3, 3.102748784455539) + tdSql.checkData(67, 4, None) + tdSql.checkData(67, 5, 0.8513297604701857) + tdSql.checkData(67, 6, 3.852058923265594) + tdSql.checkData(68, 0, 15) + tdSql.checkData(68, 1, -0.9613974918795568) + tdSql.checkData(68, 2, 0.9130208165623314) + tdSql.checkData(68, 3, 2.1554866011151765) + tdSql.checkData(68, 4, None) + tdSql.checkData(68, 5, 0.9521751875546269) + tdSql.checkData(68, 6, 1.1559749749986195) + tdSql.checkData(69, 0, 15) + tdSql.checkData(69, 1, -0.9613974918795568) + tdSql.checkData(69, 2, 0.9130208165623314) + tdSql.checkData(69, 3, 2.1554866011151765) + tdSql.checkData(69, 4, None) + tdSql.checkData(69, 5, 0.9521751875546269) + tdSql.checkData(69, 6, 1.1559749749986195) + tdSql.checkData(70, 0, 14) + tdSql.checkData(70, 1, -0.2879033166650653) + tdSql.checkData(70, 2, 0.859465627274523) + tdSql.checkData(70, 3, 0.5636905248139659) + tdSql.checkData(70, 4, None) + tdSql.checkData(70, 5, 0.41142163587369207) + tdSql.checkData(70, 6, 10.515512404402676) + tdSql.checkData(71, 0, 14) + tdSql.checkData(71, 1, -0.2879033166650653) + tdSql.checkData(71, 2, 0.859465627274523) + tdSql.checkData(71, 3, 0.5636905248139659) + tdSql.checkData(71, 4, None) + tdSql.checkData(71, 5, 0.41142163587369207) + tdSql.checkData(71, 6, 10.515512404402676) + tdSql.checkData(72, 0, 13) + tdSql.checkData(72, 1, 0.6502878401571168) + tdSql.checkData(72, 2, 0.5403105467456532) + tdSql.checkData(72, 3, 2.75535470715349) + tdSql.checkData(72, 4, None) + tdSql.checkData(72, 5, 0.0009616202598659029) + tdSql.checkData(72, 6, 4.225579583416092) + tdSql.checkData(73, 0, 13) + tdSql.checkData(73, 1, 0.6502878401571168) + tdSql.checkData(73, 2, 0.5403105467456532) + tdSql.checkData(73, 3, 2.75535470715349) + tdSql.checkData(73, 4, None) + tdSql.checkData(73, 5, 0.0009616202598659029) + tdSql.checkData(73, 6, 4.225579583416092) + tdSql.checkData(74, 0, 12) + tdSql.checkData(74, 1, 0.9906073556948704) + tdSql.checkData(74, 2, 0.8556343548213666) + tdSql.checkData(74, 3, 2.451594361777497) + tdSql.checkData(74, 4, None) + tdSql.checkData(74, 5, 0.24838494428124291) + tdSql.checkData(74, 6, 1.4585617093317953) + tdSql.checkData(75, 0, 12) + tdSql.checkData(75, 1, 0.9906073556948704) + tdSql.checkData(75, 2, 0.8556343548213666) + tdSql.checkData(75, 3, 2.451594361777497) + tdSql.checkData(75, 4, None) + tdSql.checkData(75, 5, 0.24838494428124291) + tdSql.checkData(75, 6, 1.4585617093317953) + tdSql.checkData(76, 0, 11) + tdSql.checkData(76, 1, 0.4201670368266409) + tdSql.checkData(76, 2, 0.9162743174606308) + tdSql.checkData(76, 3, 0.44272645708128566) + tdSql.checkData(76, 4, None) + tdSql.checkData(76, 5, 0.9151372562290566) + tdSql.checkData(76, 6, -222.95969776348554) + tdSql.checkData(77, 0, 11) + tdSql.checkData(77, 1, 0.4201670368266409) + tdSql.checkData(77, 2, 0.9162743174606308) + tdSql.checkData(77, 3, 0.44272645708128566) + tdSql.checkData(77, 4, None) + tdSql.checkData(77, 5, 0.9151372562290566) + tdSql.checkData(77, 6, -222.95969776348554) + tdSql.checkData(78, 0, 10) + tdSql.checkData(78, 1, -0.5365729180004349) + tdSql.checkData(78, 2, 0.549226270051226) + tdSql.checkData(78, 3, 2.432352856101439) + tdSql.checkData(78, 4, None) + tdSql.checkData(78, 5, 1.2185572409879093) + tdSql.checkData(78, 6, 4.561306078186714) + tdSql.checkData(79, 0, 10) + tdSql.checkData(79, 1, -0.5365729180004349) + tdSql.checkData(79, 2, 0.549226270051226) + tdSql.checkData(79, 3, 2.432352856101439) + tdSql.checkData(79, 4, None) + tdSql.checkData(79, 5, 1.2185572409879093) + tdSql.checkData(79, 6, 4.561306078186714) + tdSql.checkData(80, 0, 9) + tdSql.checkData(80, 1, -0.9999902065507035) + tdSql.checkData(80, 2, 0.7918362090144786) + tdSql.checkData(80, 3, 2.776612511546888) + tdSql.checkData(80, 4, None) + tdSql.checkData(80, 5, 0.5929886271208413) + tdSql.checkData(80, 6, 1.796697093786514) + tdSql.checkData(81, 0, 9) + tdSql.checkData(81, 1, -0.9999902065507035) + tdSql.checkData(81, 2, 0.7918362090144786) + tdSql.checkData(81, 3, 2.776612511546888) + tdSql.checkData(81, 4, None) + tdSql.checkData(81, 5, 0.5929886271208413) + tdSql.checkData(81, 6, 1.796697093786514) + tdSql.checkData(82, 0, 8) + tdSql.checkData(82, 1, -0.5440211108893698) + tdSql.checkData(82, 2, 0.9612168045072789) + tdSql.checkData(82, 3, 0.5787344727995947) + tdSql.checkData(82, 4, None) + tdSql.checkData(82, 5, -0.7199655182148126) + tdSql.checkData(82, 6, -4.087614771885445) + tdSql.checkData(83, 0, 8) + tdSql.checkData(83, 1, -0.5440211108893698) + tdSql.checkData(83, 2, 0.9612168045072789) + tdSql.checkData(83, 3, 0.5787344727995947) + tdSql.checkData(83, 4, None) + tdSql.checkData(83, 5, -0.7199655182148126) + tdSql.checkData(83, 6, -4.087614771885445) + tdSql.checkData(84, 0, 7) + tdSql.checkData(84, 1, 0.4121184852417566) + tdSql.checkData(84, 2, 0.574400879193934) + tdSql.checkData(84, 3, 2.137595835197328) + tdSql.checkData(84, 4, None) + tdSql.checkData(84, 5, -1.8119088619792247) + tdSql.checkData(84, 6, 4.862055338419189) + tdSql.checkData(85, 0, 7) + tdSql.checkData(85, 1, 0.4121184852417566) + tdSql.checkData(85, 2, 0.574400879193934) + tdSql.checkData(85, 3, 2.137595835197328) + tdSql.checkData(85, 4, None) + tdSql.checkData(85, 5, -1.8119088619792247) + tdSql.checkData(85, 6, 4.862055338419189) + tdSql.checkData(86, 0, 6) + tdSql.checkData(86, 1, 0.9893582466233818) + tdSql.checkData(86, 2, 0.7270351311688125) + tdSql.checkData(86, 3, 3.1243204798042576) + tdSql.checkData(86, 4, None) + tdSql.checkData(86, 5, -1.8696882565721156) + tdSql.checkData(86, 6, 2.172420890614816) + tdSql.checkData(87, 0, 6) + tdSql.checkData(87, 1, 0.9893582466233818) + tdSql.checkData(87, 2, 0.7270351311688125) + tdSql.checkData(87, 3, 3.1243204798042576) + tdSql.checkData(87, 4, None) + tdSql.checkData(87, 5, -1.8696882565721156) + tdSql.checkData(87, 6, 2.172420890614816) + tdSql.checkData(88, 0, 5) + tdSql.checkData(88, 1, 0.6569865987187891) + tdSql.checkData(88, 2, 0.9900590857598653) + tdSql.checkData(88, 3, 0.8864495743441427) + tdSql.checkData(88, 4, None) + tdSql.checkData(88, 5, -0.876294736008743) + tdSql.checkData(88, 6, -0.9245361171359558) + tdSql.checkData(89, 0, 5) + tdSql.checkData(89, 1, 0.6569865987187891) + tdSql.checkData(89, 2, 0.9900590857598653) + tdSql.checkData(89, 3, 0.8864495743441427) + tdSql.checkData(89, 4, None) + tdSql.checkData(89, 5, -0.876294736008743) + tdSql.checkData(89, 6, -0.9245361171359558) + tdSql.checkData(90, 0, 4) + tdSql.checkData(90, 1, -0.27941549819892586) + tdSql.checkData(90, 2, 0.6143002821164822) + tdSql.checkData(90, 3, 1.853464438509776) + tdSql.checkData(90, 4, None) + tdSql.checkData(90, 5, 0.38234027607634785) + tdSql.checkData(90, 6, 5.147179528972959) + tdSql.checkData(91, 0, 4) + tdSql.checkData(91, 1, -0.27941549819892586) + tdSql.checkData(91, 2, 0.6143002821164822) + tdSql.checkData(91, 3, 1.853464438509776) + tdSql.checkData(91, 4, None) + tdSql.checkData(91, 5, 0.38234027607634785) + tdSql.checkData(91, 6, 5.147179528972959) + tdSql.checkData(92, 0, 3) + tdSql.checkData(92, 1, -0.9589242746631385) + tdSql.checkData(92, 2, 0.6663667453928805) + tdSql.checkData(92, 3, 3.4288753232277074) + tdSql.checkData(92, 4, None) + tdSql.checkData(92, 5, 1.0087371784424417) + tdSql.checkData(92, 6, 2.5780379587267963) + tdSql.checkData(93, 0, 3) + tdSql.checkData(93, 1, -0.9589242746631385) + tdSql.checkData(93, 2, 0.6663667453928805) + tdSql.checkData(93, 3, 3.4288753232277074) + tdSql.checkData(93, 4, None) + tdSql.checkData(93, 5, 1.0087371784424417) + tdSql.checkData(93, 6, 2.5780379587267963) + tdSql.checkData(94, 0, 2) + tdSql.checkData(94, 1, -0.7568024953079282) + tdSql.checkData(94, 2, 1.0) + tdSql.checkData(94, 3, 1.2340302976078754) + tdSql.checkData(94, 4, None) + tdSql.checkData(94, 5, 0.7554222939559553) + tdSql.checkData(94, 6, 0.05815764143055291) + tdSql.checkData(95, 0, 2) + tdSql.checkData(95, 1, -0.7568024953079282) + tdSql.checkData(95, 2, 1.0) + tdSql.checkData(95, 3, 1.2340302976078754) + tdSql.checkData(95, 4, None) + tdSql.checkData(95, 5, 0.7554222939559553) + tdSql.checkData(95, 6, 0.05815764143055291) + tdSql.checkData(96, 0, 1) + tdSql.checkData(96, 1, 0.1411200080598672) + tdSql.checkData(96, 2, 0.6663667453928805) + tdSql.checkData(96, 3, 1.558041126155035) + tdSql.checkData(96, 4, 1.8325957145940461) + tdSql.checkData(96, 5, 0.17204223631998083) + tdSql.checkData(96, 6, None) + tdSql.checkData(97, 0, 1) + tdSql.checkData(97, 1, 0.1411200080598672) + tdSql.checkData(97, 2, 0.6663667453928805) + tdSql.checkData(97, 3, 1.558041126155035) + tdSql.checkData(97, 4, 1.8325957145940461) + tdSql.checkData(97, 5, 0.17204223631998083) + tdSql.checkData(97, 6, None) + tdSql.checkData(98, 0, 0) + tdSql.checkData(98, 1, 0.7780731968879212) + tdSql.checkData(98, 2, 0.6143002821164822) + tdSql.checkData(98, 3, 3.2037266279837113) + tdSql.checkData(98, 4, None) + tdSql.checkData(98, 5, 0.02246988233490299) + tdSql.checkData(98, 6, None) + tdSql.checkData(99, 0, 0) + tdSql.checkData(99, 1, 0.7780731968879212) + tdSql.checkData(99, 2, 0.6143002821164822) + tdSql.checkData(99, 3, 3.2037266279837113) + tdSql.checkData(99, 4, None) + tdSql.checkData(99, 5, 0.02246988233490299) + tdSql.checkData(99, 6, None) + + tdSql.query('select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 );') + tdSql.checkRows(100) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 0.7780731968879212) + tdSql.checkData(0, 2, 0.6143002821164822) + tdSql.checkData(0, 3, 3.2037266279837113) + tdSql.checkData(0, 4, None) + tdSql.checkData(0, 5, 0.02246988233490299) + tdSql.checkData(0, 6, None) + tdSql.checkData(1, 0, 1) + tdSql.checkData(1, 1, 0.1411200080598672) + tdSql.checkData(1, 2, 0.6663667453928805) + tdSql.checkData(1, 3, 1.558041126155035) + tdSql.checkData(1, 4, 1.8325957145940461) + tdSql.checkData(1, 5, 0.17204223631998083) + tdSql.checkData(1, 6, None) + tdSql.checkData(2, 0, 2) + tdSql.checkData(2, 1, -0.7568024953079282) + tdSql.checkData(2, 2, 1.0) + tdSql.checkData(2, 3, 1.2340302976078754) + tdSql.checkData(2, 4, None) + tdSql.checkData(2, 5, 0.7554222939559553) + tdSql.checkData(2, 6, 0.05815764143055291) + tdSql.checkData(3, 0, 3) + tdSql.checkData(3, 1, -0.9589242746631385) + tdSql.checkData(3, 2, 0.6663667453928805) + tdSql.checkData(3, 3, 3.4288753232277074) + tdSql.checkData(3, 4, None) + tdSql.checkData(3, 5, 1.0087371784424417) + tdSql.checkData(3, 6, 2.5780379587267963) + tdSql.checkData(4, 0, 4) + tdSql.checkData(4, 1, -0.27941549819892586) + tdSql.checkData(4, 2, 0.6143002821164822) + tdSql.checkData(4, 3, 1.853464438509776) + tdSql.checkData(4, 4, None) + tdSql.checkData(4, 5, 0.38234027607634785) + tdSql.checkData(4, 6, 5.147179528972959) + tdSql.checkData(5, 0, 5) + tdSql.checkData(5, 1, 0.6569865987187891) + tdSql.checkData(5, 2, 0.9900590857598653) + tdSql.checkData(5, 3, 0.8864495743441427) + tdSql.checkData(5, 4, None) + tdSql.checkData(5, 5, -0.876294736008743) + tdSql.checkData(5, 6, -0.9245361171359558) + tdSql.checkData(6, 0, 6) + tdSql.checkData(6, 1, 0.9893582466233818) + tdSql.checkData(6, 2, 0.7270351311688125) + tdSql.checkData(6, 3, 3.1243204798042576) + tdSql.checkData(6, 4, None) + tdSql.checkData(6, 5, -1.8696882565721156) + tdSql.checkData(6, 6, 2.172420890614816) + tdSql.checkData(7, 0, 7) + tdSql.checkData(7, 1, 0.4121184852417566) + tdSql.checkData(7, 2, 0.574400879193934) + tdSql.checkData(7, 3, 2.137595835197328) + tdSql.checkData(7, 4, None) + tdSql.checkData(7, 5, -1.8119088619792247) + tdSql.checkData(7, 6, 4.862055338419189) + tdSql.checkData(8, 0, 8) + tdSql.checkData(8, 1, -0.5440211108893698) + tdSql.checkData(8, 2, 0.9612168045072789) + tdSql.checkData(8, 3, 0.5787344727995947) + tdSql.checkData(8, 4, None) + tdSql.checkData(8, 5, -0.7199655182148126) + tdSql.checkData(8, 6, -4.087614771885445) + tdSql.checkData(9, 0, 9) + tdSql.checkData(9, 1, -0.9999902065507035) + tdSql.checkData(9, 2, 0.7918362090144786) + tdSql.checkData(9, 3, 2.776612511546888) + tdSql.checkData(9, 4, None) + tdSql.checkData(9, 5, 0.5929886271208413) + tdSql.checkData(9, 6, 1.796697093786514) + tdSql.checkData(10, 0, 10) + tdSql.checkData(10, 1, -0.5365729180004349) + tdSql.checkData(10, 2, 0.549226270051226) + tdSql.checkData(10, 3, 2.432352856101439) + tdSql.checkData(10, 4, None) + tdSql.checkData(10, 5, 1.2185572409879093) + tdSql.checkData(10, 6, 4.561306078186714) + tdSql.checkData(11, 0, 11) + tdSql.checkData(11, 1, 0.4201670368266409) + tdSql.checkData(11, 2, 0.9162743174606308) + tdSql.checkData(11, 3, 0.44272645708128566) + tdSql.checkData(11, 4, None) + tdSql.checkData(11, 5, 0.9151372562290566) + tdSql.checkData(11, 6, -222.95969776348554) + tdSql.checkData(12, 0, 12) + tdSql.checkData(12, 1, 0.9906073556948704) + tdSql.checkData(12, 2, 0.8556343548213666) + tdSql.checkData(12, 3, 2.451594361777497) + tdSql.checkData(12, 4, None) + tdSql.checkData(12, 5, 0.24838494428124291) + tdSql.checkData(12, 6, 1.4585617093317953) + tdSql.checkData(13, 0, 13) + tdSql.checkData(13, 1, 0.6502878401571168) + tdSql.checkData(13, 2, 0.5403105467456532) + tdSql.checkData(13, 3, 2.75535470715349) + tdSql.checkData(13, 4, None) + tdSql.checkData(13, 5, 0.0009616202598659029) + tdSql.checkData(13, 6, 4.225579583416092) + tdSql.checkData(14, 0, 14) + tdSql.checkData(14, 1, -0.2879033166650653) + tdSql.checkData(14, 2, 0.859465627274523) + tdSql.checkData(14, 3, 0.5636905248139659) + tdSql.checkData(14, 4, None) + tdSql.checkData(14, 5, 0.41142163587369207) + tdSql.checkData(14, 6, 10.515512404402676) + tdSql.checkData(15, 0, 15) + tdSql.checkData(15, 1, -0.9613974918795568) + tdSql.checkData(15, 2, 0.9130208165623314) + tdSql.checkData(15, 3, 2.1554866011151765) + tdSql.checkData(15, 4, None) + tdSql.checkData(15, 5, 0.9521751875546269) + tdSql.checkData(15, 6, 1.1559749749986195) + tdSql.checkData(16, 0, 16) + tdSql.checkData(16, 1, -0.750987246771676) + tdSql.checkData(16, 2, 0.5481819942730298) + tdSql.checkData(16, 3, 3.102748784455539) + tdSql.checkData(16, 4, None) + tdSql.checkData(16, 5, 0.8513297604701857) + tdSql.checkData(16, 6, 3.852058923265594) + tdSql.checkData(17, 0, 17) + tdSql.checkData(17, 1, 0.14987720966295234) + tdSql.checkData(17, 2, 0.7959095686227995) + tdSql.checkData(17, 3, 0.864944320724419) + tdSql.checkData(17, 4, None) + tdSql.checkData(17, 5, -0.13037289959062748) + tdSql.checkData(17, 6, 7.022998331594864) + tdSql.checkData(18, 0, 18) + tdSql.checkData(18, 1, 0.9129452507276277) + tdSql.checkData(18, 2, 0.9588413200803038) + tdSql.checkData(18, 3, 1.8713332491184997) + tdSql.checkData(18, 4, None) + tdSql.checkData(18, 5, -1.3983047743451864) + tdSql.checkData(18, 6, 0.8709074342191974) + tdSql.checkData(19, 0, 19) + tdSql.checkData(19, 1, 0.8366556385360561) + tdSql.checkData(19, 2, 0.5723746128431292) + tdSql.checkData(19, 3, 3.413484890511323) + tdSql.checkData(19, 4, None) + tdSql.checkData(19, 5, -1.9952541841757747) + tdSql.checkData(19, 6, 3.4479580493217856) + tdSql.checkData(20, 0, 20) + tdSql.checkData(20, 1, -0.008851309290403876) + tdSql.checkData(20, 2, 0.7310155667453407) + tdSql.checkData(20, 3, 1.2127175951404974) + tdSql.checkData(20, 4, None) + tdSql.checkData(20, 5, -1.4304290589415767) + tdSql.checkData(20, 6, 5.982274104704091) + tdSql.checkData(21, 0, 21) + tdSql.checkData(21, 1, -0.8462204041751706) + tdSql.checkData(21, 2, 0.9887894200405688) + tdSql.checkData(21, 3, 1.5772240911721418) + tdSql.checkData(21, 4, None) + tdSql.checkData(21, 5, -0.11647857397382422) + tdSql.checkData(21, 6, 0.5559799244477626) + tdSql.checkData(22, 0, 22) + tdSql.checkData(22, 1, -0.9055783620066239) + tdSql.checkData(22, 2, 0.6114178044194122) + tdSql.checkData(22, 3, 3.5568711064263105) + tdSql.checkData(22, 4, None) + tdSql.checkData(22, 5, 0.9837833410919679) + tdSql.checkData(22, 6, 3.0265535811470983) + tdSql.checkData(23, 0, 23) + tdSql.checkData(23, 1, -0.13235175009777303) + tdSql.checkData(23, 2, 0.6699494442536529) + tdSql.checkData(23, 3, 1.5387402975985367) + tdSql.checkData(23, 4, None) + tdSql.checkData(23, 5, 1.1825447904081037) + tdSql.checkData(23, 6, 5.489941431040083) + tdSql.checkData(24, 0, 24) + tdSql.checkData(24, 1, 0.7625584504796027) + tdSql.checkData(24, 2, 0.999960827417674) + tdSql.checkData(24, 3, 1.2552318002593996) + tdSql.checkData(24, 4, None) + tdSql.checkData(24, 5, 0.6200983185456957) + tdSql.checkData(24, 6, 0.09684864095463253) + tdSql.checkData(25, 0, 25) + tdSql.checkData(25, 1, 0.956375928404503) + tdSql.checkData(25, 2, 0.6628179613691831) + tdSql.checkData(25, 3, 3.4435632194258416) + tdSql.checkData(25, 4, None) + tdSql.checkData(25, 5, 0.05676687083562715) + tdSql.checkData(25, 6, 2.6040987392745354) + tdSql.checkData(26, 0, 26) + tdSql.checkData(26, 1, 0.27090578830786904) + tdSql.checkData(26, 2, 0.6172306382193644) + tdSql.checkData(26, 3, 1.835550377607515) + tdSql.checkData(26, 4, None) + tdSql.checkData(26, 5, 0.11431954199291106) + tdSql.checkData(26, 6, 5.165381146246765) + tdSql.checkData(27, 0, 27) + tdSql.checkData(27, 1, -0.6636338842129675) + tdSql.checkData(27, 2, 0.9912542848596704) + tdSql.checkData(27, 3, 0.9080812682077812) + tdSql.checkData(27, 4, None) + tdSql.checkData(27, 5, 0.6788951190016388) + tdSql.checkData(27, 6, -0.8324928492797357) + tdSql.checkData(28, 0, 28) + tdSql.checkData(28, 1, -0.9880316240928618) + tdSql.checkData(28, 2, 0.7230710689951642) + tdSql.checkData(28, 3, 3.1457526648156393) + tdSql.checkData(28, 4, None) + tdSql.checkData(28, 5, 1.0206076417536643) + tdSql.checkData(28, 6, 2.197019393348823) + tdSql.checkData(29, 0, 29) + tdSql.checkData(29, 1, -0.404037645323065) + tdSql.checkData(29, 2, 0.5764850221962442) + tdSql.checkData(29, 3, 2.1197476343754156) + tdSql.checkData(29, 4, None) + tdSql.checkData(29, 5, 0.5162157333804713) + tdSql.checkData(29, 6, 4.8800154918827525) + tdSql.checkData(30, 0, 30) + tdSql.checkData(30, 1, 0.5514266812416906) + tdSql.checkData(30, 2, 0.9635288988181601) + tdSql.checkData(30, 3, 0.5944617511422015) + tdSql.checkData(30, 4, None) + tdSql.checkData(30, 5, -0.7022004347538967) + tdSql.checkData(30, 6, -3.710141817748492) + tdSql.checkData(31, 0, 31) + tdSql.checkData(31, 1, 0.9999118601072672) + tdSql.checkData(31, 2, 0.7877590247885756) + tdSql.checkData(31, 3, 2.7979785951133604) + tdSql.checkData(31, 4, None) + tdSql.checkData(31, 5, -1.7874722290307907) + tdSql.checkData(31, 6, 1.8191237353300793) + tdSql.checkData(32, 0, 32) + tdSql.checkData(32, 1, 0.5290826861200238) + tdSql.checkData(32, 2, 0.5503344099628432) + tdSql.checkData(32, 3, 2.413227615833899) + tdSql.checkData(32, 4, None) + tdSql.checkData(32, 5, -1.8893763681780902) + tdSql.checkData(32, 6, 4.581032079680554) + tdSql.checkData(33, 0, 33) + tdSql.checkData(33, 1, -0.428182669496151) + tdSql.checkData(33, 2, 0.9194811573015673) + tdSql.checkData(33, 3, 0.4437992589174107) + tdSql.checkData(33, 4, None) + tdSql.checkData(33, 5, -0.9001958571391758) + tdSql.checkData(33, 6, -72.33956595410905) + tdSql.checkData(34, 0, 34) + tdSql.checkData(34, 1, -0.9917788534431158) + tdSql.checkData(34, 2, 0.8517779466253769) + tdSql.checkData(34, 3, 2.470955260231499) + tdSql.checkData(34, 4, None) + tdSql.checkData(34, 5, 0.4428112547200472) + tdSql.checkData(34, 6, 1.4785733565944832) + tdSql.checkData(35, 0, 35) + tdSql.checkData(35, 1, -0.6435381333569995) + tdSql.checkData(35, 2, 0.5403764709316752) + tdSql.checkData(35, 3, 2.734210799811235) + tdSql.checkData(35, 4, None) + tdSql.checkData(35, 5, 1.1930854189064375) + tdSql.checkData(35, 6, 4.24770540197234) + tdSql.checkData(36, 0, 36) + tdSql.checkData(36, 1, 0.2963685787093853) + tdSql.checkData(36, 2, 0.8632704401895588) + tdSql.checkData(36, 3, 0.5493681603601657) + tdSql.checkData(36, 4, None) + tdSql.checkData(36, 5, 0.9944678850925007) + tdSql.checkData(36, 6, 11.004294268461184) + tdSql.checkData(37, 0, 37) + tdSql.checkData(37, 1, 0.9637953862840878) + tdSql.checkData(37, 2, 0.909721840267583) + tdSql.checkData(37, 3, 2.1734252903776303) + tdSql.checkData(37, 4, None) + tdSql.checkData(37, 5, 0.32696474077278626) + tdSql.checkData(37, 6, 1.174082484128993) + tdSql.checkData(38, 0, 38) + tdSql.checkData(38, 1, 0.7451131604793488) + tdSql.checkData(38, 2, 0.5472018255605284) + tdSql.checkData(38, 3, 3.081063350979351) + tdSql.checkData(38, 4, None) + tdSql.checkData(38, 5, -0.007381884932924798) + tdSql.checkData(38, 6, 3.8764172978929814) + tdSql.checkData(39, 0, 39) + tdSql.checkData(39, 1, -0.158622668804709) + tdSql.checkData(39, 2, 0.7999777847134487) + tdSql.checkData(39, 3, 0.8435920138756074) + tdSql.checkData(39, 4, None) + tdSql.checkData(39, 5, 0.3319994538301167) + tdSql.checkData(39, 6, 7.12853286308907) + tdSql.checkData(40, 0, 40) + tdSql.checkData(40, 1, -0.9165215479156338) + tdSql.checkData(40, 2, 0.9564033460276342) + tdSql.checkData(40, 3, 1.889162191085516) + tdSql.checkData(40, 4, None) + tdSql.checkData(40, 5, 0.90296737936602) + tdSql.checkData(40, 6, 0.888896415152729) + tdSql.checkData(41, 0, 41) + tdSql.checkData(41, 1, -0.8317747426285983) + tdSql.checkData(41, 2, 0.5704067143341829) + tdSql.checkData(41, 3, 3.397430462894578) + tdSql.checkData(41, 4, None) + tdSql.checkData(41, 5, 0.9190273051332304) + tdSql.checkData(41, 6, 3.473885481113728) + tdSql.checkData(42, 0, 42) + tdSql.checkData(42, 1, 0.017701925105413577) + tdSql.checkData(42, 2, 0.7350111780599404) + tdSql.checkData(42, 3, 1.1912997639866574) + tdSql.checkData(42, 4, None) + tdSql.checkData(42, 5, 0.036467324189017214) + tdSql.checkData(42, 6, 6.024578312510778) + tdSql.checkData(43, 0, 43) + tdSql.checkData(43, 1, 0.8509035245341184) + tdSql.checkData(43, 2, 0.9874457808369176) + tdSql.checkData(43, 3, 1.5962924548219202) + tdSql.checkData(43, 4, None) + tdSql.checkData(43, 5, -1.2490970766755156) + tdSql.checkData(43, 6, 0.5781542141407696) + tdSql.checkData(44, 0, 44) + tdSql.checkData(44, 1, 0.9017883476488092) + tdSql.checkData(44, 2, 0.6085839480802863) + tdSql.checkData(44, 3, 3.5552629892514687) + tdSql.checkData(44, 4, None) + tdSql.checkData(44, 5, -1.9810692649977342) + tdSql.checkData(44, 6, 3.0531030020123464) + tdSql.checkData(45, 0, 45) + tdSql.checkData(45, 1, 0.123573122745224) + tdSql.checkData(45, 2, 0.6735650596658175) + tdSql.checkData(45, 3, 1.5193186190030223) + tdSql.checkData(45, 4, None) + tdSql.checkData(45, 5, -1.5661895943272113) + tdSql.checkData(45, 6, 5.513771854144419) + tdSql.checkData(46, 0, 46) + tdSql.checkData(46, 1, -0.7682546613236668) + tdSql.checkData(46, 2, 0.9998433250151273) + tdSql.checkData(46, 3, 1.2763169256468458) + tdSql.checkData(46, 4, None) + tdSql.checkData(46, 5, -0.300459258677913) + tdSql.checkData(46, 6, 0.13392039926281352) + tdSql.checkData(47, 0, 47) + tdSql.checkData(47, 1, -0.9537526527594719) + tdSql.checkData(47, 2, 0.6593040763085178) + tdSql.checkData(47, 3, 3.4575106745458637) + tdSql.checkData(47, 4, None) + tdSql.checkData(47, 5, 0.8820838187306987) + tdSql.checkData(47, 6, 2.6302204463996084) + tdSql.checkData(48, 0, 48) + tdSql.checkData(48, 1, -0.26237485370392877) + tdSql.checkData(48, 2, 0.6202081141679935) + tdSql.checkData(48, 3, 1.8175857333771335) + tdSql.checkData(48, 4, None) + tdSql.checkData(48, 5, 1.211884234321115) + tdSql.checkData(48, 6, 5.183714988550632) + tdSql.checkData(49, 0, 49) + tdSql.checkData(49, 1, 0.6702291758433747) + tdSql.checkData(49, 2, 0.9923745526637894) + tdSql.checkData(49, 3, 0.9298143670243166) + tdSql.checkData(49, 4, None) + tdSql.checkData(49, 5, 0.7136182821549459) + tdSql.checkData(49, 6, -0.7462904241496138) + tdSql.checkData(50, 0, 0) + tdSql.checkData(50, 1, 0.7780731968879212) + tdSql.checkData(50, 2, 0.6143002821164822) + tdSql.checkData(50, 3, 3.2037266279837113) + tdSql.checkData(50, 4, None) + tdSql.checkData(50, 5, 0.02246988233490299) + tdSql.checkData(50, 6, None) + tdSql.checkData(51, 0, 1) + tdSql.checkData(51, 1, 0.1411200080598672) + tdSql.checkData(51, 2, 0.6663667453928805) + tdSql.checkData(51, 3, 1.558041126155035) + tdSql.checkData(51, 4, 1.8325957145940461) + tdSql.checkData(51, 5, 0.17204223631998083) + tdSql.checkData(51, 6, None) + tdSql.checkData(52, 0, 2) + tdSql.checkData(52, 1, -0.7568024953079282) + tdSql.checkData(52, 2, 1.0) + tdSql.checkData(52, 3, 1.2340302976078754) + tdSql.checkData(52, 4, None) + tdSql.checkData(52, 5, 0.7554222939559553) + tdSql.checkData(52, 6, 0.05815764143055291) + tdSql.checkData(53, 0, 3) + tdSql.checkData(53, 1, -0.9589242746631385) + tdSql.checkData(53, 2, 0.6663667453928805) + tdSql.checkData(53, 3, 3.4288753232277074) + tdSql.checkData(53, 4, None) + tdSql.checkData(53, 5, 1.0087371784424417) + tdSql.checkData(53, 6, 2.5780379587267963) + tdSql.checkData(54, 0, 4) + tdSql.checkData(54, 1, -0.27941549819892586) + tdSql.checkData(54, 2, 0.6143002821164822) + tdSql.checkData(54, 3, 1.853464438509776) + tdSql.checkData(54, 4, None) + tdSql.checkData(54, 5, 0.38234027607634785) + tdSql.checkData(54, 6, 5.147179528972959) + tdSql.checkData(55, 0, 5) + tdSql.checkData(55, 1, 0.6569865987187891) + tdSql.checkData(55, 2, 0.9900590857598653) + tdSql.checkData(55, 3, 0.8864495743441427) + tdSql.checkData(55, 4, None) + tdSql.checkData(55, 5, -0.876294736008743) + tdSql.checkData(55, 6, -0.9245361171359558) + tdSql.checkData(56, 0, 6) + tdSql.checkData(56, 1, 0.9893582466233818) + tdSql.checkData(56, 2, 0.7270351311688125) + tdSql.checkData(56, 3, 3.1243204798042576) + tdSql.checkData(56, 4, None) + tdSql.checkData(56, 5, -1.8696882565721156) + tdSql.checkData(56, 6, 2.172420890614816) + tdSql.checkData(57, 0, 7) + tdSql.checkData(57, 1, 0.4121184852417566) + tdSql.checkData(57, 2, 0.574400879193934) + tdSql.checkData(57, 3, 2.137595835197328) + tdSql.checkData(57, 4, None) + tdSql.checkData(57, 5, -1.8119088619792247) + tdSql.checkData(57, 6, 4.862055338419189) + tdSql.checkData(58, 0, 8) + tdSql.checkData(58, 1, -0.5440211108893698) + tdSql.checkData(58, 2, 0.9612168045072789) + tdSql.checkData(58, 3, 0.5787344727995947) + tdSql.checkData(58, 4, None) + tdSql.checkData(58, 5, -0.7199655182148126) + tdSql.checkData(58, 6, -4.087614771885445) + tdSql.checkData(59, 0, 9) + tdSql.checkData(59, 1, -0.9999902065507035) + tdSql.checkData(59, 2, 0.7918362090144786) + tdSql.checkData(59, 3, 2.776612511546888) + tdSql.checkData(59, 4, None) + tdSql.checkData(59, 5, 0.5929886271208413) + tdSql.checkData(59, 6, 1.796697093786514) + tdSql.checkData(60, 0, 10) + tdSql.checkData(60, 1, -0.5365729180004349) + tdSql.checkData(60, 2, 0.549226270051226) + tdSql.checkData(60, 3, 2.432352856101439) + tdSql.checkData(60, 4, None) + tdSql.checkData(60, 5, 1.2185572409879093) + tdSql.checkData(60, 6, 4.561306078186714) + tdSql.checkData(61, 0, 11) + tdSql.checkData(61, 1, 0.4201670368266409) + tdSql.checkData(61, 2, 0.9162743174606308) + tdSql.checkData(61, 3, 0.44272645708128566) + tdSql.checkData(61, 4, None) + tdSql.checkData(61, 5, 0.9151372562290566) + tdSql.checkData(61, 6, -222.95969776348554) + tdSql.checkData(62, 0, 12) + tdSql.checkData(62, 1, 0.9906073556948704) + tdSql.checkData(62, 2, 0.8556343548213666) + tdSql.checkData(62, 3, 2.451594361777497) + tdSql.checkData(62, 4, None) + tdSql.checkData(62, 5, 0.24838494428124291) + tdSql.checkData(62, 6, 1.4585617093317953) + tdSql.checkData(63, 0, 13) + tdSql.checkData(63, 1, 0.6502878401571168) + tdSql.checkData(63, 2, 0.5403105467456532) + tdSql.checkData(63, 3, 2.75535470715349) + tdSql.checkData(63, 4, None) + tdSql.checkData(63, 5, 0.0009616202598659029) + tdSql.checkData(63, 6, 4.225579583416092) + tdSql.checkData(64, 0, 14) + tdSql.checkData(64, 1, -0.2879033166650653) + tdSql.checkData(64, 2, 0.859465627274523) + tdSql.checkData(64, 3, 0.5636905248139659) + tdSql.checkData(64, 4, None) + tdSql.checkData(64, 5, 0.41142163587369207) + tdSql.checkData(64, 6, 10.515512404402676) + tdSql.checkData(65, 0, 15) + tdSql.checkData(65, 1, -0.9613974918795568) + tdSql.checkData(65, 2, 0.9130208165623314) + tdSql.checkData(65, 3, 2.1554866011151765) + tdSql.checkData(65, 4, None) + tdSql.checkData(65, 5, 0.9521751875546269) + tdSql.checkData(65, 6, 1.1559749749986195) + tdSql.checkData(66, 0, 16) + tdSql.checkData(66, 1, -0.750987246771676) + tdSql.checkData(66, 2, 0.5481819942730298) + tdSql.checkData(66, 3, 3.102748784455539) + tdSql.checkData(66, 4, None) + tdSql.checkData(66, 5, 0.8513297604701857) + tdSql.checkData(66, 6, 3.852058923265594) + tdSql.checkData(67, 0, 17) + tdSql.checkData(67, 1, 0.14987720966295234) + tdSql.checkData(67, 2, 0.7959095686227995) + tdSql.checkData(67, 3, 0.864944320724419) + tdSql.checkData(67, 4, None) + tdSql.checkData(67, 5, -0.13037289959062748) + tdSql.checkData(67, 6, 7.022998331594864) + tdSql.checkData(68, 0, 18) + tdSql.checkData(68, 1, 0.9129452507276277) + tdSql.checkData(68, 2, 0.9588413200803038) + tdSql.checkData(68, 3, 1.8713332491184997) + tdSql.checkData(68, 4, None) + tdSql.checkData(68, 5, -1.3983047743451864) + tdSql.checkData(68, 6, 0.8709074342191974) + tdSql.checkData(69, 0, 19) + tdSql.checkData(69, 1, 0.8366556385360561) + tdSql.checkData(69, 2, 0.5723746128431292) + tdSql.checkData(69, 3, 3.413484890511323) + tdSql.checkData(69, 4, None) + tdSql.checkData(69, 5, -1.9952541841757747) + tdSql.checkData(69, 6, 3.4479580493217856) + tdSql.checkData(70, 0, 20) + tdSql.checkData(70, 1, -0.008851309290403876) + tdSql.checkData(70, 2, 0.7310155667453407) + tdSql.checkData(70, 3, 1.2127175951404974) + tdSql.checkData(70, 4, None) + tdSql.checkData(70, 5, -1.4304290589415767) + tdSql.checkData(70, 6, 5.982274104704091) + tdSql.checkData(71, 0, 21) + tdSql.checkData(71, 1, -0.8462204041751706) + tdSql.checkData(71, 2, 0.9887894200405688) + tdSql.checkData(71, 3, 1.5772240911721418) + tdSql.checkData(71, 4, None) + tdSql.checkData(71, 5, -0.11647857397382422) + tdSql.checkData(71, 6, 0.5559799244477626) + tdSql.checkData(72, 0, 22) + tdSql.checkData(72, 1, -0.9055783620066239) + tdSql.checkData(72, 2, 0.6114178044194122) + tdSql.checkData(72, 3, 3.5568711064263105) + tdSql.checkData(72, 4, None) + tdSql.checkData(72, 5, 0.9837833410919679) + tdSql.checkData(72, 6, 3.0265535811470983) + tdSql.checkData(73, 0, 23) + tdSql.checkData(73, 1, -0.13235175009777303) + tdSql.checkData(73, 2, 0.6699494442536529) + tdSql.checkData(73, 3, 1.5387402975985367) + tdSql.checkData(73, 4, None) + tdSql.checkData(73, 5, 1.1825447904081037) + tdSql.checkData(73, 6, 5.489941431040083) + tdSql.checkData(74, 0, 24) + tdSql.checkData(74, 1, 0.7625584504796027) + tdSql.checkData(74, 2, 0.999960827417674) + tdSql.checkData(74, 3, 1.2552318002593996) + tdSql.checkData(74, 4, None) + tdSql.checkData(74, 5, 0.6200983185456957) + tdSql.checkData(74, 6, 0.09684864095463253) + tdSql.checkData(75, 0, 25) + tdSql.checkData(75, 1, 0.956375928404503) + tdSql.checkData(75, 2, 0.6628179613691831) + tdSql.checkData(75, 3, 3.4435632194258416) + tdSql.checkData(75, 4, None) + tdSql.checkData(75, 5, 0.05676687083562715) + tdSql.checkData(75, 6, 2.6040987392745354) + tdSql.checkData(76, 0, 26) + tdSql.checkData(76, 1, 0.27090578830786904) + tdSql.checkData(76, 2, 0.6172306382193644) + tdSql.checkData(76, 3, 1.835550377607515) + tdSql.checkData(76, 4, None) + tdSql.checkData(76, 5, 0.11431954199291106) + tdSql.checkData(76, 6, 5.165381146246765) + tdSql.checkData(77, 0, 27) + tdSql.checkData(77, 1, -0.6636338842129675) + tdSql.checkData(77, 2, 0.9912542848596704) + tdSql.checkData(77, 3, 0.9080812682077812) + tdSql.checkData(77, 4, None) + tdSql.checkData(77, 5, 0.6788951190016388) + tdSql.checkData(77, 6, -0.8324928492797357) + tdSql.checkData(78, 0, 28) + tdSql.checkData(78, 1, -0.9880316240928618) + tdSql.checkData(78, 2, 0.7230710689951642) + tdSql.checkData(78, 3, 3.1457526648156393) + tdSql.checkData(78, 4, None) + tdSql.checkData(78, 5, 1.0206076417536643) + tdSql.checkData(78, 6, 2.197019393348823) + tdSql.checkData(79, 0, 29) + tdSql.checkData(79, 1, -0.404037645323065) + tdSql.checkData(79, 2, 0.5764850221962442) + tdSql.checkData(79, 3, 2.1197476343754156) + tdSql.checkData(79, 4, None) + tdSql.checkData(79, 5, 0.5162157333804713) + tdSql.checkData(79, 6, 4.8800154918827525) + tdSql.checkData(80, 0, 30) + tdSql.checkData(80, 1, 0.5514266812416906) + tdSql.checkData(80, 2, 0.9635288988181601) + tdSql.checkData(80, 3, 0.5944617511422015) + tdSql.checkData(80, 4, None) + tdSql.checkData(80, 5, -0.7022004347538967) + tdSql.checkData(80, 6, -3.710141817748492) + tdSql.checkData(81, 0, 31) + tdSql.checkData(81, 1, 0.9999118601072672) + tdSql.checkData(81, 2, 0.7877590247885756) + tdSql.checkData(81, 3, 2.7979785951133604) + tdSql.checkData(81, 4, None) + tdSql.checkData(81, 5, -1.7874722290307907) + tdSql.checkData(81, 6, 1.8191237353300793) + tdSql.checkData(82, 0, 32) + tdSql.checkData(82, 1, 0.5290826861200238) + tdSql.checkData(82, 2, 0.5503344099628432) + tdSql.checkData(82, 3, 2.413227615833899) + tdSql.checkData(82, 4, None) + tdSql.checkData(82, 5, -1.8893763681780902) + tdSql.checkData(82, 6, 4.581032079680554) + tdSql.checkData(83, 0, 33) + tdSql.checkData(83, 1, -0.428182669496151) + tdSql.checkData(83, 2, 0.9194811573015673) + tdSql.checkData(83, 3, 0.4437992589174107) + tdSql.checkData(83, 4, None) + tdSql.checkData(83, 5, -0.9001958571391758) + tdSql.checkData(83, 6, -72.33956595410905) + tdSql.checkData(84, 0, 34) + tdSql.checkData(84, 1, -0.9917788534431158) + tdSql.checkData(84, 2, 0.8517779466253769) + tdSql.checkData(84, 3, 2.470955260231499) + tdSql.checkData(84, 4, None) + tdSql.checkData(84, 5, 0.4428112547200472) + tdSql.checkData(84, 6, 1.4785733565944832) + tdSql.checkData(85, 0, 35) + tdSql.checkData(85, 1, -0.6435381333569995) + tdSql.checkData(85, 2, 0.5403764709316752) + tdSql.checkData(85, 3, 2.734210799811235) + tdSql.checkData(85, 4, None) + tdSql.checkData(85, 5, 1.1930854189064375) + tdSql.checkData(85, 6, 4.24770540197234) + tdSql.checkData(86, 0, 36) + tdSql.checkData(86, 1, 0.2963685787093853) + tdSql.checkData(86, 2, 0.8632704401895588) + tdSql.checkData(86, 3, 0.5493681603601657) + tdSql.checkData(86, 4, None) + tdSql.checkData(86, 5, 0.9944678850925007) + tdSql.checkData(86, 6, 11.004294268461184) + tdSql.checkData(87, 0, 37) + tdSql.checkData(87, 1, 0.9637953862840878) + tdSql.checkData(87, 2, 0.909721840267583) + tdSql.checkData(87, 3, 2.1734252903776303) + tdSql.checkData(87, 4, None) + tdSql.checkData(87, 5, 0.32696474077278626) + tdSql.checkData(87, 6, 1.174082484128993) + tdSql.checkData(88, 0, 38) + tdSql.checkData(88, 1, 0.7451131604793488) + tdSql.checkData(88, 2, 0.5472018255605284) + tdSql.checkData(88, 3, 3.081063350979351) + tdSql.checkData(88, 4, None) + tdSql.checkData(88, 5, -0.007381884932924798) + tdSql.checkData(88, 6, 3.8764172978929814) + tdSql.checkData(89, 0, 39) + tdSql.checkData(89, 1, -0.158622668804709) + tdSql.checkData(89, 2, 0.7999777847134487) + tdSql.checkData(89, 3, 0.8435920138756074) + tdSql.checkData(89, 4, None) + tdSql.checkData(89, 5, 0.3319994538301167) + tdSql.checkData(89, 6, 7.12853286308907) + tdSql.checkData(90, 0, 40) + tdSql.checkData(90, 1, -0.9165215479156338) + tdSql.checkData(90, 2, 0.9564033460276342) + tdSql.checkData(90, 3, 1.889162191085516) + tdSql.checkData(90, 4, None) + tdSql.checkData(90, 5, 0.90296737936602) + tdSql.checkData(90, 6, 0.888896415152729) + tdSql.checkData(91, 0, 41) + tdSql.checkData(91, 1, -0.8317747426285983) + tdSql.checkData(91, 2, 0.5704067143341829) + tdSql.checkData(91, 3, 3.397430462894578) + tdSql.checkData(91, 4, None) + tdSql.checkData(91, 5, 0.9190273051332304) + tdSql.checkData(91, 6, 3.473885481113728) + tdSql.checkData(92, 0, 42) + tdSql.checkData(92, 1, 0.017701925105413577) + tdSql.checkData(92, 2, 0.7350111780599404) + tdSql.checkData(92, 3, 1.1912997639866574) + tdSql.checkData(92, 4, None) + tdSql.checkData(92, 5, 0.036467324189017214) + tdSql.checkData(92, 6, 6.024578312510778) + tdSql.checkData(93, 0, 43) + tdSql.checkData(93, 1, 0.8509035245341184) + tdSql.checkData(93, 2, 0.9874457808369176) + tdSql.checkData(93, 3, 1.5962924548219202) + tdSql.checkData(93, 4, None) + tdSql.checkData(93, 5, -1.2490970766755156) + tdSql.checkData(93, 6, 0.5781542141407696) + tdSql.checkData(94, 0, 44) + tdSql.checkData(94, 1, 0.9017883476488092) + tdSql.checkData(94, 2, 0.6085839480802863) + tdSql.checkData(94, 3, 3.5552629892514687) + tdSql.checkData(94, 4, None) + tdSql.checkData(94, 5, -1.9810692649977342) + tdSql.checkData(94, 6, 3.0531030020123464) + tdSql.checkData(95, 0, 45) + tdSql.checkData(95, 1, 0.123573122745224) + tdSql.checkData(95, 2, 0.6735650596658175) + tdSql.checkData(95, 3, 1.5193186190030223) + tdSql.checkData(95, 4, None) + tdSql.checkData(95, 5, -1.5661895943272113) + tdSql.checkData(95, 6, 5.513771854144419) + tdSql.checkData(96, 0, 46) + tdSql.checkData(96, 1, -0.7682546613236668) + tdSql.checkData(96, 2, 0.9998433250151273) + tdSql.checkData(96, 3, 1.2763169256468458) + tdSql.checkData(96, 4, None) + tdSql.checkData(96, 5, -0.300459258677913) + tdSql.checkData(96, 6, 0.13392039926281352) + tdSql.checkData(97, 0, 47) + tdSql.checkData(97, 1, -0.9537526527594719) + tdSql.checkData(97, 2, 0.6593040763085178) + tdSql.checkData(97, 3, 3.4575106745458637) + tdSql.checkData(97, 4, None) + tdSql.checkData(97, 5, 0.8820838187306987) + tdSql.checkData(97, 6, 2.6302204463996084) + tdSql.checkData(98, 0, 48) + tdSql.checkData(98, 1, -0.26237485370392877) + tdSql.checkData(98, 2, 0.6202081141679935) + tdSql.checkData(98, 3, 1.8175857333771335) + tdSql.checkData(98, 4, None) + tdSql.checkData(98, 5, 1.211884234321115) + tdSql.checkData(98, 6, 5.183714988550632) + tdSql.checkData(99, 0, 49) + tdSql.checkData(99, 1, 0.6702291758433747) + tdSql.checkData(99, 2, 0.9923745526637894) + tdSql.checkData(99, 3, 0.9298143670243166) + tdSql.checkData(99, 4, None) + tdSql.checkData(99, 5, 0.7136182821549459) + tdSql.checkData(99, 6, -0.7462904241496138) + + tdSql.query('select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 ) order by ts limit 2;;') + tdSql.checkRows(2) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 0.7780731968879212) + tdSql.checkData(0, 2, 0.6143002821164822) + tdSql.checkData(0, 3, 3.2037266279837113) + tdSql.checkData(0, 4, None) + tdSql.checkData(0, 5, 0.02246988233490299) + tdSql.checkData(0, 6, None) + tdSql.checkData(1, 0, 1) + tdSql.checkData(1, 1, 0.1411200080598672) + tdSql.checkData(1, 2, 0.6663667453928805) + tdSql.checkData(1, 3, 1.558041126155035) + tdSql.checkData(1, 4, 1.8325957145940461) + tdSql.checkData(1, 5, 0.17204223631998083) + tdSql.checkData(1, 6, None) + + tdSql.query('select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 ) limit 2;;') + tdSql.checkRows(2) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 0.7780731968879212) + tdSql.checkData(0, 2, 0.6143002821164822) + tdSql.checkData(0, 3, 3.2037266279837113) + tdSql.checkData(0, 4, None) + tdSql.checkData(0, 5, 0.02246988233490299) + tdSql.checkData(0, 6, None) + tdSql.checkData(1, 0, 1) + tdSql.checkData(1, 1, 0.1411200080598672) + tdSql.checkData(1, 2, 0.6663667453928805) + tdSql.checkData(1, 3, 1.558041126155035) + tdSql.checkData(1, 4, 1.8325957145940461) + tdSql.checkData(1, 5, 0.17204223631998083) + tdSql.checkData(1, 6, None) + + tdSql.query('select * from (select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6, ts from st0 order by ts desc);') + tdSql.checkRows(100) + tdSql.checkData(0, 0, 49) + tdSql.checkData(0, 1, 0.6702291758433747) + tdSql.checkData(0, 2, 0.9923745526637894) + tdSql.checkData(0, 3, 0.9298143670243166) + tdSql.checkData(0, 4, None) + tdSql.checkData(0, 5, 0.7136182821549459) + tdSql.checkData(0, 6, -0.7462904241496138) + tdSql.checkData(0, 7, datetime.datetime(2020, 10, 1, 0, 49)) + tdSql.checkData(1, 0, 49) + tdSql.checkData(1, 1, 0.6702291758433747) + tdSql.checkData(1, 2, 0.9923745526637894) + tdSql.checkData(1, 3, 0.9298143670243166) + tdSql.checkData(1, 4, None) + tdSql.checkData(1, 5, 0.7136182821549459) + tdSql.checkData(1, 6, -0.7462904241496138) + tdSql.checkData(1, 7, datetime.datetime(2020, 10, 1, 0, 49)) + tdSql.checkData(2, 0, 48) + tdSql.checkData(2, 1, -0.26237485370392877) + tdSql.checkData(2, 2, 0.6202081141679935) + tdSql.checkData(2, 3, 1.8175857333771335) + tdSql.checkData(2, 4, None) + tdSql.checkData(2, 5, 1.211884234321115) + tdSql.checkData(2, 6, 5.183714988550632) + tdSql.checkData(2, 7, datetime.datetime(2020, 10, 1, 0, 48)) + tdSql.checkData(3, 0, 48) + tdSql.checkData(3, 1, -0.26237485370392877) + tdSql.checkData(3, 2, 0.6202081141679935) + tdSql.checkData(3, 3, 1.8175857333771335) + tdSql.checkData(3, 4, None) + tdSql.checkData(3, 5, 1.211884234321115) + tdSql.checkData(3, 6, 5.183714988550632) + tdSql.checkData(3, 7, datetime.datetime(2020, 10, 1, 0, 48)) + tdSql.checkData(4, 0, 47) + tdSql.checkData(4, 1, -0.9537526527594719) + tdSql.checkData(4, 2, 0.6593040763085178) + tdSql.checkData(4, 3, 3.4575106745458637) + tdSql.checkData(4, 4, None) + tdSql.checkData(4, 5, 0.8820838187306987) + tdSql.checkData(4, 6, 2.6302204463996084) + tdSql.checkData(4, 7, datetime.datetime(2020, 10, 1, 0, 47)) + tdSql.checkData(5, 0, 47) + tdSql.checkData(5, 1, -0.9537526527594719) + tdSql.checkData(5, 2, 0.6593040763085178) + tdSql.checkData(5, 3, 3.4575106745458637) + tdSql.checkData(5, 4, None) + tdSql.checkData(5, 5, 0.8820838187306987) + tdSql.checkData(5, 6, 2.6302204463996084) + tdSql.checkData(5, 7, datetime.datetime(2020, 10, 1, 0, 47)) + tdSql.checkData(6, 0, 46) + tdSql.checkData(6, 1, -0.7682546613236668) + tdSql.checkData(6, 2, 0.9998433250151273) + tdSql.checkData(6, 3, 1.2763169256468458) + tdSql.checkData(6, 4, None) + tdSql.checkData(6, 5, -0.300459258677913) + tdSql.checkData(6, 6, 0.13392039926281352) + tdSql.checkData(6, 7, datetime.datetime(2020, 10, 1, 0, 46)) + tdSql.checkData(7, 0, 46) + tdSql.checkData(7, 1, -0.7682546613236668) + tdSql.checkData(7, 2, 0.9998433250151273) + tdSql.checkData(7, 3, 1.2763169256468458) + tdSql.checkData(7, 4, None) + tdSql.checkData(7, 5, -0.300459258677913) + tdSql.checkData(7, 6, 0.13392039926281352) + tdSql.checkData(7, 7, datetime.datetime(2020, 10, 1, 0, 46)) + tdSql.checkData(8, 0, 45) + tdSql.checkData(8, 1, 0.123573122745224) + tdSql.checkData(8, 2, 0.6735650596658175) + tdSql.checkData(8, 3, 1.5193186190030223) + tdSql.checkData(8, 4, None) + tdSql.checkData(8, 5, -1.5661895943272113) + tdSql.checkData(8, 6, 5.513771854144419) + tdSql.checkData(8, 7, datetime.datetime(2020, 10, 1, 0, 45)) + tdSql.checkData(9, 0, 45) + tdSql.checkData(9, 1, 0.123573122745224) + tdSql.checkData(9, 2, 0.6735650596658175) + tdSql.checkData(9, 3, 1.5193186190030223) + tdSql.checkData(9, 4, None) + tdSql.checkData(9, 5, -1.5661895943272113) + tdSql.checkData(9, 6, 5.513771854144419) + tdSql.checkData(9, 7, datetime.datetime(2020, 10, 1, 0, 45)) + tdSql.checkData(10, 0, 44) + tdSql.checkData(10, 1, 0.9017883476488092) + tdSql.checkData(10, 2, 0.6085839480802863) + tdSql.checkData(10, 3, 3.5552629892514687) + tdSql.checkData(10, 4, None) + tdSql.checkData(10, 5, -1.9810692649977342) + tdSql.checkData(10, 6, 3.0531030020123464) + tdSql.checkData(10, 7, datetime.datetime(2020, 10, 1, 0, 44)) + tdSql.checkData(11, 0, 44) + tdSql.checkData(11, 1, 0.9017883476488092) + tdSql.checkData(11, 2, 0.6085839480802863) + tdSql.checkData(11, 3, 3.5552629892514687) + tdSql.checkData(11, 4, None) + tdSql.checkData(11, 5, -1.9810692649977342) + tdSql.checkData(11, 6, 3.0531030020123464) + tdSql.checkData(11, 7, datetime.datetime(2020, 10, 1, 0, 44)) + tdSql.checkData(12, 0, 43) + tdSql.checkData(12, 1, 0.8509035245341184) + tdSql.checkData(12, 2, 0.9874457808369176) + tdSql.checkData(12, 3, 1.5962924548219202) + tdSql.checkData(12, 4, None) + tdSql.checkData(12, 5, -1.2490970766755156) + tdSql.checkData(12, 6, 0.5781542141407696) + tdSql.checkData(12, 7, datetime.datetime(2020, 10, 1, 0, 43)) + tdSql.checkData(13, 0, 43) + tdSql.checkData(13, 1, 0.8509035245341184) + tdSql.checkData(13, 2, 0.9874457808369176) + tdSql.checkData(13, 3, 1.5962924548219202) + tdSql.checkData(13, 4, None) + tdSql.checkData(13, 5, -1.2490970766755156) + tdSql.checkData(13, 6, 0.5781542141407696) + tdSql.checkData(13, 7, datetime.datetime(2020, 10, 1, 0, 43)) + tdSql.checkData(14, 0, 42) + tdSql.checkData(14, 1, 0.017701925105413577) + tdSql.checkData(14, 2, 0.7350111780599404) + tdSql.checkData(14, 3, 1.1912997639866574) + tdSql.checkData(14, 4, None) + tdSql.checkData(14, 5, 0.036467324189017214) + tdSql.checkData(14, 6, 6.024578312510778) + tdSql.checkData(14, 7, datetime.datetime(2020, 10, 1, 0, 42)) + tdSql.checkData(15, 0, 42) + tdSql.checkData(15, 1, 0.017701925105413577) + tdSql.checkData(15, 2, 0.7350111780599404) + tdSql.checkData(15, 3, 1.1912997639866574) + tdSql.checkData(15, 4, None) + tdSql.checkData(15, 5, 0.036467324189017214) + tdSql.checkData(15, 6, 6.024578312510778) + tdSql.checkData(15, 7, datetime.datetime(2020, 10, 1, 0, 42)) + tdSql.checkData(16, 0, 41) + tdSql.checkData(16, 1, -0.8317747426285983) + tdSql.checkData(16, 2, 0.5704067143341829) + tdSql.checkData(16, 3, 3.397430462894578) + tdSql.checkData(16, 4, None) + tdSql.checkData(16, 5, 0.9190273051332304) + tdSql.checkData(16, 6, 3.473885481113728) + tdSql.checkData(16, 7, datetime.datetime(2020, 10, 1, 0, 41)) + tdSql.checkData(17, 0, 41) + tdSql.checkData(17, 1, -0.8317747426285983) + tdSql.checkData(17, 2, 0.5704067143341829) + tdSql.checkData(17, 3, 3.397430462894578) + tdSql.checkData(17, 4, None) + tdSql.checkData(17, 5, 0.9190273051332304) + tdSql.checkData(17, 6, 3.473885481113728) + tdSql.checkData(17, 7, datetime.datetime(2020, 10, 1, 0, 41)) + tdSql.checkData(18, 0, 40) + tdSql.checkData(18, 1, -0.9165215479156338) + tdSql.checkData(18, 2, 0.9564033460276342) + tdSql.checkData(18, 3, 1.889162191085516) + tdSql.checkData(18, 4, None) + tdSql.checkData(18, 5, 0.90296737936602) + tdSql.checkData(18, 6, 0.888896415152729) + tdSql.checkData(18, 7, datetime.datetime(2020, 10, 1, 0, 40)) + tdSql.checkData(19, 0, 40) + tdSql.checkData(19, 1, -0.9165215479156338) + tdSql.checkData(19, 2, 0.9564033460276342) + tdSql.checkData(19, 3, 1.889162191085516) + tdSql.checkData(19, 4, None) + tdSql.checkData(19, 5, 0.90296737936602) + tdSql.checkData(19, 6, 0.888896415152729) + tdSql.checkData(19, 7, datetime.datetime(2020, 10, 1, 0, 40)) + tdSql.checkData(20, 0, 39) + tdSql.checkData(20, 1, -0.158622668804709) + tdSql.checkData(20, 2, 0.7999777847134487) + tdSql.checkData(20, 3, 0.8435920138756074) + tdSql.checkData(20, 4, None) + tdSql.checkData(20, 5, 0.3319994538301167) + tdSql.checkData(20, 6, 7.12853286308907) + tdSql.checkData(20, 7, datetime.datetime(2020, 10, 1, 0, 39)) + tdSql.checkData(21, 0, 39) + tdSql.checkData(21, 1, -0.158622668804709) + tdSql.checkData(21, 2, 0.7999777847134487) + tdSql.checkData(21, 3, 0.8435920138756074) + tdSql.checkData(21, 4, None) + tdSql.checkData(21, 5, 0.3319994538301167) + tdSql.checkData(21, 6, 7.12853286308907) + tdSql.checkData(21, 7, datetime.datetime(2020, 10, 1, 0, 39)) + tdSql.checkData(22, 0, 38) + tdSql.checkData(22, 1, 0.7451131604793488) + tdSql.checkData(22, 2, 0.5472018255605284) + tdSql.checkData(22, 3, 3.081063350979351) + tdSql.checkData(22, 4, None) + tdSql.checkData(22, 5, -0.007381884932924798) + tdSql.checkData(22, 6, 3.8764172978929814) + tdSql.checkData(22, 7, datetime.datetime(2020, 10, 1, 0, 38)) + tdSql.checkData(23, 0, 38) + tdSql.checkData(23, 1, 0.7451131604793488) + tdSql.checkData(23, 2, 0.5472018255605284) + tdSql.checkData(23, 3, 3.081063350979351) + tdSql.checkData(23, 4, None) + tdSql.checkData(23, 5, -0.007381884932924798) + tdSql.checkData(23, 6, 3.8764172978929814) + tdSql.checkData(23, 7, datetime.datetime(2020, 10, 1, 0, 38)) + tdSql.checkData(24, 0, 37) + tdSql.checkData(24, 1, 0.9637953862840878) + tdSql.checkData(24, 2, 0.909721840267583) + tdSql.checkData(24, 3, 2.1734252903776303) + tdSql.checkData(24, 4, None) + tdSql.checkData(24, 5, 0.32696474077278626) + tdSql.checkData(24, 6, 1.174082484128993) + tdSql.checkData(24, 7, datetime.datetime(2020, 10, 1, 0, 37)) + tdSql.checkData(25, 0, 37) + tdSql.checkData(25, 1, 0.9637953862840878) + tdSql.checkData(25, 2, 0.909721840267583) + tdSql.checkData(25, 3, 2.1734252903776303) + tdSql.checkData(25, 4, None) + tdSql.checkData(25, 5, 0.32696474077278626) + tdSql.checkData(25, 6, 1.174082484128993) + tdSql.checkData(25, 7, datetime.datetime(2020, 10, 1, 0, 37)) + tdSql.checkData(26, 0, 36) + tdSql.checkData(26, 1, 0.2963685787093853) + tdSql.checkData(26, 2, 0.8632704401895588) + tdSql.checkData(26, 3, 0.5493681603601657) + tdSql.checkData(26, 4, None) + tdSql.checkData(26, 5, 0.9944678850925007) + tdSql.checkData(26, 6, 11.004294268461184) + tdSql.checkData(26, 7, datetime.datetime(2020, 10, 1, 0, 36)) + tdSql.checkData(27, 0, 36) + tdSql.checkData(27, 1, 0.2963685787093853) + tdSql.checkData(27, 2, 0.8632704401895588) + tdSql.checkData(27, 3, 0.5493681603601657) + tdSql.checkData(27, 4, None) + tdSql.checkData(27, 5, 0.9944678850925007) + tdSql.checkData(27, 6, 11.004294268461184) + tdSql.checkData(27, 7, datetime.datetime(2020, 10, 1, 0, 36)) + tdSql.checkData(28, 0, 35) + tdSql.checkData(28, 1, -0.6435381333569995) + tdSql.checkData(28, 2, 0.5403764709316752) + tdSql.checkData(28, 3, 2.734210799811235) + tdSql.checkData(28, 4, None) + tdSql.checkData(28, 5, 1.1930854189064375) + tdSql.checkData(28, 6, 4.24770540197234) + tdSql.checkData(28, 7, datetime.datetime(2020, 10, 1, 0, 35)) + tdSql.checkData(29, 0, 35) + tdSql.checkData(29, 1, -0.6435381333569995) + tdSql.checkData(29, 2, 0.5403764709316752) + tdSql.checkData(29, 3, 2.734210799811235) + tdSql.checkData(29, 4, None) + tdSql.checkData(29, 5, 1.1930854189064375) + tdSql.checkData(29, 6, 4.24770540197234) + tdSql.checkData(29, 7, datetime.datetime(2020, 10, 1, 0, 35)) + tdSql.checkData(30, 0, 34) + tdSql.checkData(30, 1, -0.9917788534431158) + tdSql.checkData(30, 2, 0.8517779466253769) + tdSql.checkData(30, 3, 2.470955260231499) + tdSql.checkData(30, 4, None) + tdSql.checkData(30, 5, 0.4428112547200472) + tdSql.checkData(30, 6, 1.4785733565944832) + tdSql.checkData(30, 7, datetime.datetime(2020, 10, 1, 0, 34)) + tdSql.checkData(31, 0, 34) + tdSql.checkData(31, 1, -0.9917788534431158) + tdSql.checkData(31, 2, 0.8517779466253769) + tdSql.checkData(31, 3, 2.470955260231499) + tdSql.checkData(31, 4, None) + tdSql.checkData(31, 5, 0.4428112547200472) + tdSql.checkData(31, 6, 1.4785733565944832) + tdSql.checkData(31, 7, datetime.datetime(2020, 10, 1, 0, 34)) + tdSql.checkData(32, 0, 33) + tdSql.checkData(32, 1, -0.428182669496151) + tdSql.checkData(32, 2, 0.9194811573015673) + tdSql.checkData(32, 3, 0.4437992589174107) + tdSql.checkData(32, 4, None) + tdSql.checkData(32, 5, -0.9001958571391758) + tdSql.checkData(32, 6, -72.33956595410905) + tdSql.checkData(32, 7, datetime.datetime(2020, 10, 1, 0, 33)) + tdSql.checkData(33, 0, 33) + tdSql.checkData(33, 1, -0.428182669496151) + tdSql.checkData(33, 2, 0.9194811573015673) + tdSql.checkData(33, 3, 0.4437992589174107) + tdSql.checkData(33, 4, None) + tdSql.checkData(33, 5, -0.9001958571391758) + tdSql.checkData(33, 6, -72.33956595410905) + tdSql.checkData(33, 7, datetime.datetime(2020, 10, 1, 0, 33)) + tdSql.checkData(34, 0, 32) + tdSql.checkData(34, 1, 0.5290826861200238) + tdSql.checkData(34, 2, 0.5503344099628432) + tdSql.checkData(34, 3, 2.413227615833899) + tdSql.checkData(34, 4, None) + tdSql.checkData(34, 5, -1.8893763681780902) + tdSql.checkData(34, 6, 4.581032079680554) + tdSql.checkData(34, 7, datetime.datetime(2020, 10, 1, 0, 32)) + tdSql.checkData(35, 0, 32) + tdSql.checkData(35, 1, 0.5290826861200238) + tdSql.checkData(35, 2, 0.5503344099628432) + tdSql.checkData(35, 3, 2.413227615833899) + tdSql.checkData(35, 4, None) + tdSql.checkData(35, 5, -1.8893763681780902) + tdSql.checkData(35, 6, 4.581032079680554) + tdSql.checkData(35, 7, datetime.datetime(2020, 10, 1, 0, 32)) + tdSql.checkData(36, 0, 31) + tdSql.checkData(36, 1, 0.9999118601072672) + tdSql.checkData(36, 2, 0.7877590247885756) + tdSql.checkData(36, 3, 2.7979785951133604) + tdSql.checkData(36, 4, None) + tdSql.checkData(36, 5, -1.7874722290307907) + tdSql.checkData(36, 6, 1.8191237353300793) + tdSql.checkData(36, 7, datetime.datetime(2020, 10, 1, 0, 31)) + tdSql.checkData(37, 0, 31) + tdSql.checkData(37, 1, 0.9999118601072672) + tdSql.checkData(37, 2, 0.7877590247885756) + tdSql.checkData(37, 3, 2.7979785951133604) + tdSql.checkData(37, 4, None) + tdSql.checkData(37, 5, -1.7874722290307907) + tdSql.checkData(37, 6, 1.8191237353300793) + tdSql.checkData(37, 7, datetime.datetime(2020, 10, 1, 0, 31)) + tdSql.checkData(38, 0, 30) + tdSql.checkData(38, 1, 0.5514266812416906) + tdSql.checkData(38, 2, 0.9635288988181601) + tdSql.checkData(38, 3, 0.5944617511422015) + tdSql.checkData(38, 4, None) + tdSql.checkData(38, 5, -0.7022004347538967) + tdSql.checkData(38, 6, -3.710141817748492) + tdSql.checkData(38, 7, datetime.datetime(2020, 10, 1, 0, 30)) + tdSql.checkData(39, 0, 30) + tdSql.checkData(39, 1, 0.5514266812416906) + tdSql.checkData(39, 2, 0.9635288988181601) + tdSql.checkData(39, 3, 0.5944617511422015) + tdSql.checkData(39, 4, None) + tdSql.checkData(39, 5, -0.7022004347538967) + tdSql.checkData(39, 6, -3.710141817748492) + tdSql.checkData(39, 7, datetime.datetime(2020, 10, 1, 0, 30)) + tdSql.checkData(40, 0, 29) + tdSql.checkData(40, 1, -0.404037645323065) + tdSql.checkData(40, 2, 0.5764850221962442) + tdSql.checkData(40, 3, 2.1197476343754156) + tdSql.checkData(40, 4, None) + tdSql.checkData(40, 5, 0.5162157333804713) + tdSql.checkData(40, 6, 4.8800154918827525) + tdSql.checkData(40, 7, datetime.datetime(2020, 10, 1, 0, 29)) + tdSql.checkData(41, 0, 29) + tdSql.checkData(41, 1, -0.404037645323065) + tdSql.checkData(41, 2, 0.5764850221962442) + tdSql.checkData(41, 3, 2.1197476343754156) + tdSql.checkData(41, 4, None) + tdSql.checkData(41, 5, 0.5162157333804713) + tdSql.checkData(41, 6, 4.8800154918827525) + tdSql.checkData(41, 7, datetime.datetime(2020, 10, 1, 0, 29)) + tdSql.checkData(42, 0, 28) + tdSql.checkData(42, 1, -0.9880316240928618) + tdSql.checkData(42, 2, 0.7230710689951642) + tdSql.checkData(42, 3, 3.1457526648156393) + tdSql.checkData(42, 4, None) + tdSql.checkData(42, 5, 1.0206076417536643) + tdSql.checkData(42, 6, 2.197019393348823) + tdSql.checkData(42, 7, datetime.datetime(2020, 10, 1, 0, 28)) + tdSql.checkData(43, 0, 28) + tdSql.checkData(43, 1, -0.9880316240928618) + tdSql.checkData(43, 2, 0.7230710689951642) + tdSql.checkData(43, 3, 3.1457526648156393) + tdSql.checkData(43, 4, None) + tdSql.checkData(43, 5, 1.0206076417536643) + tdSql.checkData(43, 6, 2.197019393348823) + tdSql.checkData(43, 7, datetime.datetime(2020, 10, 1, 0, 28)) + tdSql.checkData(44, 0, 27) + tdSql.checkData(44, 1, -0.6636338842129675) + tdSql.checkData(44, 2, 0.9912542848596704) + tdSql.checkData(44, 3, 0.9080812682077812) + tdSql.checkData(44, 4, None) + tdSql.checkData(44, 5, 0.6788951190016388) + tdSql.checkData(44, 6, -0.8324928492797357) + tdSql.checkData(44, 7, datetime.datetime(2020, 10, 1, 0, 27)) + tdSql.checkData(45, 0, 27) + tdSql.checkData(45, 1, -0.6636338842129675) + tdSql.checkData(45, 2, 0.9912542848596704) + tdSql.checkData(45, 3, 0.9080812682077812) + tdSql.checkData(45, 4, None) + tdSql.checkData(45, 5, 0.6788951190016388) + tdSql.checkData(45, 6, -0.8324928492797357) + tdSql.checkData(45, 7, datetime.datetime(2020, 10, 1, 0, 27)) + tdSql.checkData(46, 0, 26) + tdSql.checkData(46, 1, 0.27090578830786904) + tdSql.checkData(46, 2, 0.6172306382193644) + tdSql.checkData(46, 3, 1.835550377607515) + tdSql.checkData(46, 4, None) + tdSql.checkData(46, 5, 0.11431954199291106) + tdSql.checkData(46, 6, 5.165381146246765) + tdSql.checkData(46, 7, datetime.datetime(2020, 10, 1, 0, 26)) + tdSql.checkData(47, 0, 26) + tdSql.checkData(47, 1, 0.27090578830786904) + tdSql.checkData(47, 2, 0.6172306382193644) + tdSql.checkData(47, 3, 1.835550377607515) + tdSql.checkData(47, 4, None) + tdSql.checkData(47, 5, 0.11431954199291106) + tdSql.checkData(47, 6, 5.165381146246765) + tdSql.checkData(47, 7, datetime.datetime(2020, 10, 1, 0, 26)) + tdSql.checkData(48, 0, 25) + tdSql.checkData(48, 1, 0.956375928404503) + tdSql.checkData(48, 2, 0.6628179613691831) + tdSql.checkData(48, 3, 3.4435632194258416) + tdSql.checkData(48, 4, None) + tdSql.checkData(48, 5, 0.05676687083562715) + tdSql.checkData(48, 6, 2.6040987392745354) + tdSql.checkData(48, 7, datetime.datetime(2020, 10, 1, 0, 25)) + tdSql.checkData(49, 0, 25) + tdSql.checkData(49, 1, 0.956375928404503) + tdSql.checkData(49, 2, 0.6628179613691831) + tdSql.checkData(49, 3, 3.4435632194258416) + tdSql.checkData(49, 4, None) + tdSql.checkData(49, 5, 0.05676687083562715) + tdSql.checkData(49, 6, 2.6040987392745354) + tdSql.checkData(49, 7, datetime.datetime(2020, 10, 1, 0, 25)) + tdSql.checkData(50, 0, 24) + tdSql.checkData(50, 1, 0.7625584504796027) + tdSql.checkData(50, 2, 0.999960827417674) + tdSql.checkData(50, 3, 1.2552318002593996) + tdSql.checkData(50, 4, None) + tdSql.checkData(50, 5, 0.6200983185456957) + tdSql.checkData(50, 6, 0.09684864095463253) + tdSql.checkData(50, 7, datetime.datetime(2020, 10, 1, 0, 24)) + tdSql.checkData(51, 0, 24) + tdSql.checkData(51, 1, 0.7625584504796027) + tdSql.checkData(51, 2, 0.999960827417674) + tdSql.checkData(51, 3, 1.2552318002593996) + tdSql.checkData(51, 4, None) + tdSql.checkData(51, 5, 0.6200983185456957) + tdSql.checkData(51, 6, 0.09684864095463253) + tdSql.checkData(51, 7, datetime.datetime(2020, 10, 1, 0, 24)) + tdSql.checkData(52, 0, 23) + tdSql.checkData(52, 1, -0.13235175009777303) + tdSql.checkData(52, 2, 0.6699494442536529) + tdSql.checkData(52, 3, 1.5387402975985367) + tdSql.checkData(52, 4, None) + tdSql.checkData(52, 5, 1.1825447904081037) + tdSql.checkData(52, 6, 5.489941431040083) + tdSql.checkData(52, 7, datetime.datetime(2020, 10, 1, 0, 23)) + tdSql.checkData(53, 0, 23) + tdSql.checkData(53, 1, -0.13235175009777303) + tdSql.checkData(53, 2, 0.6699494442536529) + tdSql.checkData(53, 3, 1.5387402975985367) + tdSql.checkData(53, 4, None) + tdSql.checkData(53, 5, 1.1825447904081037) + tdSql.checkData(53, 6, 5.489941431040083) + tdSql.checkData(53, 7, datetime.datetime(2020, 10, 1, 0, 23)) + tdSql.checkData(54, 0, 22) + tdSql.checkData(54, 1, -0.9055783620066239) + tdSql.checkData(54, 2, 0.6114178044194122) + tdSql.checkData(54, 3, 3.5568711064263105) + tdSql.checkData(54, 4, None) + tdSql.checkData(54, 5, 0.9837833410919679) + tdSql.checkData(54, 6, 3.0265535811470983) + tdSql.checkData(54, 7, datetime.datetime(2020, 10, 1, 0, 22)) + tdSql.checkData(55, 0, 22) + tdSql.checkData(55, 1, -0.9055783620066239) + tdSql.checkData(55, 2, 0.6114178044194122) + tdSql.checkData(55, 3, 3.5568711064263105) + tdSql.checkData(55, 4, None) + tdSql.checkData(55, 5, 0.9837833410919679) + tdSql.checkData(55, 6, 3.0265535811470983) + tdSql.checkData(55, 7, datetime.datetime(2020, 10, 1, 0, 22)) + tdSql.checkData(56, 0, 21) + tdSql.checkData(56, 1, -0.8462204041751706) + tdSql.checkData(56, 2, 0.9887894200405688) + tdSql.checkData(56, 3, 1.5772240911721418) + tdSql.checkData(56, 4, None) + tdSql.checkData(56, 5, -0.11647857397382422) + tdSql.checkData(56, 6, 0.5559799244477626) + tdSql.checkData(56, 7, datetime.datetime(2020, 10, 1, 0, 21)) + tdSql.checkData(57, 0, 21) + tdSql.checkData(57, 1, -0.8462204041751706) + tdSql.checkData(57, 2, 0.9887894200405688) + tdSql.checkData(57, 3, 1.5772240911721418) + tdSql.checkData(57, 4, None) + tdSql.checkData(57, 5, -0.11647857397382422) + tdSql.checkData(57, 6, 0.5559799244477626) + tdSql.checkData(57, 7, datetime.datetime(2020, 10, 1, 0, 21)) + tdSql.checkData(58, 0, 20) + tdSql.checkData(58, 1, -0.008851309290403876) + tdSql.checkData(58, 2, 0.7310155667453407) + tdSql.checkData(58, 3, 1.2127175951404974) + tdSql.checkData(58, 4, None) + tdSql.checkData(58, 5, -1.4304290589415767) + tdSql.checkData(58, 6, 5.982274104704091) + tdSql.checkData(58, 7, datetime.datetime(2020, 10, 1, 0, 20)) + tdSql.checkData(59, 0, 20) + tdSql.checkData(59, 1, -0.008851309290403876) + tdSql.checkData(59, 2, 0.7310155667453407) + tdSql.checkData(59, 3, 1.2127175951404974) + tdSql.checkData(59, 4, None) + tdSql.checkData(59, 5, -1.4304290589415767) + tdSql.checkData(59, 6, 5.982274104704091) + tdSql.checkData(59, 7, datetime.datetime(2020, 10, 1, 0, 20)) + tdSql.checkData(60, 0, 19) + tdSql.checkData(60, 1, 0.8366556385360561) + tdSql.checkData(60, 2, 0.5723746128431292) + tdSql.checkData(60, 3, 3.413484890511323) + tdSql.checkData(60, 4, None) + tdSql.checkData(60, 5, -1.9952541841757747) + tdSql.checkData(60, 6, 3.4479580493217856) + tdSql.checkData(60, 7, datetime.datetime(2020, 10, 1, 0, 19)) + tdSql.checkData(61, 0, 19) + tdSql.checkData(61, 1, 0.8366556385360561) + tdSql.checkData(61, 2, 0.5723746128431292) + tdSql.checkData(61, 3, 3.413484890511323) + tdSql.checkData(61, 4, None) + tdSql.checkData(61, 5, -1.9952541841757747) + tdSql.checkData(61, 6, 3.4479580493217856) + tdSql.checkData(61, 7, datetime.datetime(2020, 10, 1, 0, 19)) + tdSql.checkData(62, 0, 18) + tdSql.checkData(62, 1, 0.9129452507276277) + tdSql.checkData(62, 2, 0.9588413200803038) + tdSql.checkData(62, 3, 1.8713332491184997) + tdSql.checkData(62, 4, None) + tdSql.checkData(62, 5, -1.3983047743451864) + tdSql.checkData(62, 6, 0.8709074342191974) + tdSql.checkData(62, 7, datetime.datetime(2020, 10, 1, 0, 18)) + tdSql.checkData(63, 0, 18) + tdSql.checkData(63, 1, 0.9129452507276277) + tdSql.checkData(63, 2, 0.9588413200803038) + tdSql.checkData(63, 3, 1.8713332491184997) + tdSql.checkData(63, 4, None) + tdSql.checkData(63, 5, -1.3983047743451864) + tdSql.checkData(63, 6, 0.8709074342191974) + tdSql.checkData(63, 7, datetime.datetime(2020, 10, 1, 0, 18)) + tdSql.checkData(64, 0, 17) + tdSql.checkData(64, 1, 0.14987720966295234) + tdSql.checkData(64, 2, 0.7959095686227995) + tdSql.checkData(64, 3, 0.864944320724419) + tdSql.checkData(64, 4, None) + tdSql.checkData(64, 5, -0.13037289959062748) + tdSql.checkData(64, 6, 7.022998331594864) + tdSql.checkData(64, 7, datetime.datetime(2020, 10, 1, 0, 17)) + tdSql.checkData(65, 0, 17) + tdSql.checkData(65, 1, 0.14987720966295234) + tdSql.checkData(65, 2, 0.7959095686227995) + tdSql.checkData(65, 3, 0.864944320724419) + tdSql.checkData(65, 4, None) + tdSql.checkData(65, 5, -0.13037289959062748) + tdSql.checkData(65, 6, 7.022998331594864) + tdSql.checkData(65, 7, datetime.datetime(2020, 10, 1, 0, 17)) + tdSql.checkData(66, 0, 16) + tdSql.checkData(66, 1, -0.750987246771676) + tdSql.checkData(66, 2, 0.5481819942730298) + tdSql.checkData(66, 3, 3.102748784455539) + tdSql.checkData(66, 4, None) + tdSql.checkData(66, 5, 0.8513297604701857) + tdSql.checkData(66, 6, 3.852058923265594) + tdSql.checkData(66, 7, datetime.datetime(2020, 10, 1, 0, 16)) + tdSql.checkData(67, 0, 16) + tdSql.checkData(67, 1, -0.750987246771676) + tdSql.checkData(67, 2, 0.5481819942730298) + tdSql.checkData(67, 3, 3.102748784455539) + tdSql.checkData(67, 4, None) + tdSql.checkData(67, 5, 0.8513297604701857) + tdSql.checkData(67, 6, 3.852058923265594) + tdSql.checkData(67, 7, datetime.datetime(2020, 10, 1, 0, 16)) + tdSql.checkData(68, 0, 15) + tdSql.checkData(68, 1, -0.9613974918795568) + tdSql.checkData(68, 2, 0.9130208165623314) + tdSql.checkData(68, 3, 2.1554866011151765) + tdSql.checkData(68, 4, None) + tdSql.checkData(68, 5, 0.9521751875546269) + tdSql.checkData(68, 6, 1.1559749749986195) + tdSql.checkData(68, 7, datetime.datetime(2020, 10, 1, 0, 15)) + tdSql.checkData(69, 0, 15) + tdSql.checkData(69, 1, -0.9613974918795568) + tdSql.checkData(69, 2, 0.9130208165623314) + tdSql.checkData(69, 3, 2.1554866011151765) + tdSql.checkData(69, 4, None) + tdSql.checkData(69, 5, 0.9521751875546269) + tdSql.checkData(69, 6, 1.1559749749986195) + tdSql.checkData(69, 7, datetime.datetime(2020, 10, 1, 0, 15)) + tdSql.checkData(70, 0, 14) + tdSql.checkData(70, 1, -0.2879033166650653) + tdSql.checkData(70, 2, 0.859465627274523) + tdSql.checkData(70, 3, 0.5636905248139659) + tdSql.checkData(70, 4, None) + tdSql.checkData(70, 5, 0.41142163587369207) + tdSql.checkData(70, 6, 10.515512404402676) + tdSql.checkData(70, 7, datetime.datetime(2020, 10, 1, 0, 14)) + tdSql.checkData(71, 0, 14) + tdSql.checkData(71, 1, -0.2879033166650653) + tdSql.checkData(71, 2, 0.859465627274523) + tdSql.checkData(71, 3, 0.5636905248139659) + tdSql.checkData(71, 4, None) + tdSql.checkData(71, 5, 0.41142163587369207) + tdSql.checkData(71, 6, 10.515512404402676) + tdSql.checkData(71, 7, datetime.datetime(2020, 10, 1, 0, 14)) + tdSql.checkData(72, 0, 13) + tdSql.checkData(72, 1, 0.6502878401571168) + tdSql.checkData(72, 2, 0.5403105467456532) + tdSql.checkData(72, 3, 2.75535470715349) + tdSql.checkData(72, 4, None) + tdSql.checkData(72, 5, 0.0009616202598659029) + tdSql.checkData(72, 6, 4.225579583416092) + tdSql.checkData(72, 7, datetime.datetime(2020, 10, 1, 0, 13)) + tdSql.checkData(73, 0, 13) + tdSql.checkData(73, 1, 0.6502878401571168) + tdSql.checkData(73, 2, 0.5403105467456532) + tdSql.checkData(73, 3, 2.75535470715349) + tdSql.checkData(73, 4, None) + tdSql.checkData(73, 5, 0.0009616202598659029) + tdSql.checkData(73, 6, 4.225579583416092) + tdSql.checkData(73, 7, datetime.datetime(2020, 10, 1, 0, 13)) + tdSql.checkData(74, 0, 12) + tdSql.checkData(74, 1, 0.9906073556948704) + tdSql.checkData(74, 2, 0.8556343548213666) + tdSql.checkData(74, 3, 2.451594361777497) + tdSql.checkData(74, 4, None) + tdSql.checkData(74, 5, 0.24838494428124291) + tdSql.checkData(74, 6, 1.4585617093317953) + tdSql.checkData(74, 7, datetime.datetime(2020, 10, 1, 0, 12)) + tdSql.checkData(75, 0, 12) + tdSql.checkData(75, 1, 0.9906073556948704) + tdSql.checkData(75, 2, 0.8556343548213666) + tdSql.checkData(75, 3, 2.451594361777497) + tdSql.checkData(75, 4, None) + tdSql.checkData(75, 5, 0.24838494428124291) + tdSql.checkData(75, 6, 1.4585617093317953) + tdSql.checkData(75, 7, datetime.datetime(2020, 10, 1, 0, 12)) + tdSql.checkData(76, 0, 11) + tdSql.checkData(76, 1, 0.4201670368266409) + tdSql.checkData(76, 2, 0.9162743174606308) + tdSql.checkData(76, 3, 0.44272645708128566) + tdSql.checkData(76, 4, None) + tdSql.checkData(76, 5, 0.9151372562290566) + tdSql.checkData(76, 6, -222.95969776348554) + tdSql.checkData(76, 7, datetime.datetime(2020, 10, 1, 0, 11)) + tdSql.checkData(77, 0, 11) + tdSql.checkData(77, 1, 0.4201670368266409) + tdSql.checkData(77, 2, 0.9162743174606308) + tdSql.checkData(77, 3, 0.44272645708128566) + tdSql.checkData(77, 4, None) + tdSql.checkData(77, 5, 0.9151372562290566) + tdSql.checkData(77, 6, -222.95969776348554) + tdSql.checkData(77, 7, datetime.datetime(2020, 10, 1, 0, 11)) + tdSql.checkData(78, 0, 10) + tdSql.checkData(78, 1, -0.5365729180004349) + tdSql.checkData(78, 2, 0.549226270051226) + tdSql.checkData(78, 3, 2.432352856101439) + tdSql.checkData(78, 4, None) + tdSql.checkData(78, 5, 1.2185572409879093) + tdSql.checkData(78, 6, 4.561306078186714) + tdSql.checkData(78, 7, datetime.datetime(2020, 10, 1, 0, 10)) + tdSql.checkData(79, 0, 10) + tdSql.checkData(79, 1, -0.5365729180004349) + tdSql.checkData(79, 2, 0.549226270051226) + tdSql.checkData(79, 3, 2.432352856101439) + tdSql.checkData(79, 4, None) + tdSql.checkData(79, 5, 1.2185572409879093) + tdSql.checkData(79, 6, 4.561306078186714) + tdSql.checkData(79, 7, datetime.datetime(2020, 10, 1, 0, 10)) + tdSql.checkData(80, 0, 9) + tdSql.checkData(80, 1, -0.9999902065507035) + tdSql.checkData(80, 2, 0.7918362090144786) + tdSql.checkData(80, 3, 2.776612511546888) + tdSql.checkData(80, 4, None) + tdSql.checkData(80, 5, 0.5929886271208413) + tdSql.checkData(80, 6, 1.796697093786514) + tdSql.checkData(80, 7, datetime.datetime(2020, 10, 1, 0, 9)) + tdSql.checkData(81, 0, 9) + tdSql.checkData(81, 1, -0.9999902065507035) + tdSql.checkData(81, 2, 0.7918362090144786) + tdSql.checkData(81, 3, 2.776612511546888) + tdSql.checkData(81, 4, None) + tdSql.checkData(81, 5, 0.5929886271208413) + tdSql.checkData(81, 6, 1.796697093786514) + tdSql.checkData(81, 7, datetime.datetime(2020, 10, 1, 0, 9)) + tdSql.checkData(82, 0, 8) + tdSql.checkData(82, 1, -0.5440211108893698) + tdSql.checkData(82, 2, 0.9612168045072789) + tdSql.checkData(82, 3, 0.5787344727995947) + tdSql.checkData(82, 4, None) + tdSql.checkData(82, 5, -0.7199655182148126) + tdSql.checkData(82, 6, -4.087614771885445) + tdSql.checkData(82, 7, datetime.datetime(2020, 10, 1, 0, 8)) + tdSql.checkData(83, 0, 8) + tdSql.checkData(83, 1, -0.5440211108893698) + tdSql.checkData(83, 2, 0.9612168045072789) + tdSql.checkData(83, 3, 0.5787344727995947) + tdSql.checkData(83, 4, None) + tdSql.checkData(83, 5, -0.7199655182148126) + tdSql.checkData(83, 6, -4.087614771885445) + tdSql.checkData(83, 7, datetime.datetime(2020, 10, 1, 0, 8)) + tdSql.checkData(84, 0, 7) + tdSql.checkData(84, 1, 0.4121184852417566) + tdSql.checkData(84, 2, 0.574400879193934) + tdSql.checkData(84, 3, 2.137595835197328) + tdSql.checkData(84, 4, None) + tdSql.checkData(84, 5, -1.8119088619792247) + tdSql.checkData(84, 6, 4.862055338419189) + tdSql.checkData(84, 7, datetime.datetime(2020, 10, 1, 0, 7)) + tdSql.checkData(85, 0, 7) + tdSql.checkData(85, 1, 0.4121184852417566) + tdSql.checkData(85, 2, 0.574400879193934) + tdSql.checkData(85, 3, 2.137595835197328) + tdSql.checkData(85, 4, None) + tdSql.checkData(85, 5, -1.8119088619792247) + tdSql.checkData(85, 6, 4.862055338419189) + tdSql.checkData(85, 7, datetime.datetime(2020, 10, 1, 0, 7)) + tdSql.checkData(86, 0, 6) + tdSql.checkData(86, 1, 0.9893582466233818) + tdSql.checkData(86, 2, 0.7270351311688125) + tdSql.checkData(86, 3, 3.1243204798042576) + tdSql.checkData(86, 4, None) + tdSql.checkData(86, 5, -1.8696882565721156) + tdSql.checkData(86, 6, 2.172420890614816) + tdSql.checkData(86, 7, datetime.datetime(2020, 10, 1, 0, 6)) + tdSql.checkData(87, 0, 6) + tdSql.checkData(87, 1, 0.9893582466233818) + tdSql.checkData(87, 2, 0.7270351311688125) + tdSql.checkData(87, 3, 3.1243204798042576) + tdSql.checkData(87, 4, None) + tdSql.checkData(87, 5, -1.8696882565721156) + tdSql.checkData(87, 6, 2.172420890614816) + tdSql.checkData(87, 7, datetime.datetime(2020, 10, 1, 0, 6)) + tdSql.checkData(88, 0, 5) + tdSql.checkData(88, 1, 0.6569865987187891) + tdSql.checkData(88, 2, 0.9900590857598653) + tdSql.checkData(88, 3, 0.8864495743441427) + tdSql.checkData(88, 4, None) + tdSql.checkData(88, 5, -0.876294736008743) + tdSql.checkData(88, 6, -0.9245361171359558) + tdSql.checkData(88, 7, datetime.datetime(2020, 10, 1, 0, 5)) + tdSql.checkData(89, 0, 5) + tdSql.checkData(89, 1, 0.6569865987187891) + tdSql.checkData(89, 2, 0.9900590857598653) + tdSql.checkData(89, 3, 0.8864495743441427) + tdSql.checkData(89, 4, None) + tdSql.checkData(89, 5, -0.876294736008743) + tdSql.checkData(89, 6, -0.9245361171359558) + tdSql.checkData(89, 7, datetime.datetime(2020, 10, 1, 0, 5)) + tdSql.checkData(90, 0, 4) + tdSql.checkData(90, 1, -0.27941549819892586) + tdSql.checkData(90, 2, 0.6143002821164822) + tdSql.checkData(90, 3, 1.853464438509776) + tdSql.checkData(90, 4, None) + tdSql.checkData(90, 5, 0.38234027607634785) + tdSql.checkData(90, 6, 5.147179528972959) + tdSql.checkData(90, 7, datetime.datetime(2020, 10, 1, 0, 4)) + tdSql.checkData(91, 0, 4) + tdSql.checkData(91, 1, -0.27941549819892586) + tdSql.checkData(91, 2, 0.6143002821164822) + tdSql.checkData(91, 3, 1.853464438509776) + tdSql.checkData(91, 4, None) + tdSql.checkData(91, 5, 0.38234027607634785) + tdSql.checkData(91, 6, 5.147179528972959) + tdSql.checkData(91, 7, datetime.datetime(2020, 10, 1, 0, 4)) + tdSql.checkData(92, 0, 3) + tdSql.checkData(92, 1, -0.9589242746631385) + tdSql.checkData(92, 2, 0.6663667453928805) + tdSql.checkData(92, 3, 3.4288753232277074) + tdSql.checkData(92, 4, None) + tdSql.checkData(92, 5, 1.0087371784424417) + tdSql.checkData(92, 6, 2.5780379587267963) + tdSql.checkData(92, 7, datetime.datetime(2020, 10, 1, 0, 3)) + tdSql.checkData(93, 0, 3) + tdSql.checkData(93, 1, -0.9589242746631385) + tdSql.checkData(93, 2, 0.6663667453928805) + tdSql.checkData(93, 3, 3.4288753232277074) + tdSql.checkData(93, 4, None) + tdSql.checkData(93, 5, 1.0087371784424417) + tdSql.checkData(93, 6, 2.5780379587267963) + tdSql.checkData(93, 7, datetime.datetime(2020, 10, 1, 0, 3)) + tdSql.checkData(94, 0, 2) + tdSql.checkData(94, 1, -0.7568024953079282) + tdSql.checkData(94, 2, 1.0) + tdSql.checkData(94, 3, 1.2340302976078754) + tdSql.checkData(94, 4, None) + tdSql.checkData(94, 5, 0.7554222939559553) + tdSql.checkData(94, 6, 0.05815764143055291) + tdSql.checkData(94, 7, datetime.datetime(2020, 10, 1, 0, 2)) + tdSql.checkData(95, 0, 2) + tdSql.checkData(95, 1, -0.7568024953079282) + tdSql.checkData(95, 2, 1.0) + tdSql.checkData(95, 3, 1.2340302976078754) + tdSql.checkData(95, 4, None) + tdSql.checkData(95, 5, 0.7554222939559553) + tdSql.checkData(95, 6, 0.05815764143055291) + tdSql.checkData(95, 7, datetime.datetime(2020, 10, 1, 0, 2)) + tdSql.checkData(96, 0, 1) + tdSql.checkData(96, 1, 0.1411200080598672) + tdSql.checkData(96, 2, 0.6663667453928805) + tdSql.checkData(96, 3, 1.558041126155035) + tdSql.checkData(96, 4, 1.8325957145940461) + tdSql.checkData(96, 5, 0.17204223631998083) + tdSql.checkData(96, 6, None) + tdSql.checkData(96, 7, datetime.datetime(2020, 10, 1, 0, 1)) + tdSql.checkData(97, 0, 1) + tdSql.checkData(97, 1, 0.1411200080598672) + tdSql.checkData(97, 2, 0.6663667453928805) + tdSql.checkData(97, 3, 1.558041126155035) + tdSql.checkData(97, 4, 1.8325957145940461) + tdSql.checkData(97, 5, 0.17204223631998083) + tdSql.checkData(97, 6, None) + tdSql.checkData(97, 7, datetime.datetime(2020, 10, 1, 0, 1)) + tdSql.checkData(98, 0, 0) + tdSql.checkData(98, 1, 0.7780731968879212) + tdSql.checkData(98, 2, 0.6143002821164822) + tdSql.checkData(98, 3, 3.2037266279837113) + tdSql.checkData(98, 4, None) + tdSql.checkData(98, 5, 0.02246988233490299) + tdSql.checkData(98, 6, None) + tdSql.checkData(98, 7, datetime.datetime(2020, 10, 1, 0, 0)) + tdSql.checkData(99, 0, 0) + tdSql.checkData(99, 1, 0.7780731968879212) + tdSql.checkData(99, 2, 0.6143002821164822) + tdSql.checkData(99, 3, 3.2037266279837113) + tdSql.checkData(99, 4, None) + tdSql.checkData(99, 5, 0.02246988233490299) + tdSql.checkData(99, 6, None) + tdSql.checkData(99, 7, datetime.datetime(2020, 10, 1, 0, 0)) + + tdSql.query('select * from (select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6, ts from ct1 order by ts limit 2);;') + tdSql.checkRows(2) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 0.7780731968879212) + tdSql.checkData(0, 2, 0.6143002821164822) + tdSql.checkData(0, 3, 3.2037266279837113) + tdSql.checkData(0, 4, None) + tdSql.checkData(0, 5, 0.02246988233490299) + tdSql.checkData(0, 6, None) + tdSql.checkData(0, 7, datetime.datetime(2020, 10, 1, 0, 0)) + tdSql.checkData(1, 0, 1) + tdSql.checkData(1, 1, 0.1411200080598672) + tdSql.checkData(1, 2, 0.6663667453928805) + tdSql.checkData(1, 3, 1.558041126155035) + tdSql.checkData(1, 4, 1.8325957145940461) + tdSql.checkData(1, 5, 0.17204223631998083) + tdSql.checkData(1, 6, None) + tdSql.checkData(1, 7, datetime.datetime(2020, 10, 1, 0, 1)) + + tdSql.execute('drop database db0') + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index bd5966b7961337d967aa9847382b62089a6dfd6f..68cd5ac762efe8ab0fc2cc9c30777485d4ce3074 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -560,7 +560,6 @@ 10,,script,./test.sh -f unique/stable/replica2_vnode3.sim 10,,pytest,python3 testCompress.py 10,,pytest,python3 test.py -f client/client.py -10,,script,eval sh -c \"if [ `uname -m` != aarch64 ]; then ./test.sh -f general/parser/scalar_expression.sim; fi\" 10,,script,./test.sh -f general/compute/scalar_pow.sim 9,,script,./test.sh -f general/parser/alter1.sim 9,,script,./test.sh -f general/db/delete.sim @@ -715,6 +714,8 @@ 5,,develop-test,python3 ./test.py -f 2-query/time_window_keywords.py 5,,develop-test,python3 ./test.py -f 2-query/TD-13946.py 5,,develop-test,python3 ./test.py -f 2-query/query_window_keywords.py +5,,develop-test,python3 ./test.py -f 2-query/scalar_triangle.py +5,,develop-test,python3 ./test.py -f 2-query/scalar_expression.py 4,,system-test,python3 test.py -f 4-taosAdapter/TD-12163.py 4,,system-test,python3 ./test.py -f 3-connectors/restful/restful_binddbname.py 4,,system-test,python3 ./test.py -f 2-query/TD-12614.py @@ -800,3 +801,5 @@ 2,,develop-test,python3 ./test.py -f 2-query/function_hll.py 1,,develop-test,python3 ./test.py -f 2-query/function_state.py 1,,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/demo.py +8,,pytest,python3 test.py -f update/update2.py +4,,pytest,python3 test.py -f insert/line_insert.py diff --git a/tests/pytest/update/update2.py b/tests/pytest/update/update2.py new file mode 100644 index 0000000000000000000000000000000000000000..e731e70b33b089d7e37727e3356e07712a9b25b9 --- /dev/null +++ b/tests/pytest/update/update2.py @@ -0,0 +1,90 @@ +################################################################### +# 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 -*- + +import sys +import taos +from util.log import * +from util.cases import * +from util.sql import * +from util.dnodes import * +import random +import datetime +import threading + + +class TDTestCase: + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor()) + + self.lock = threading.RLock() + self.ts = [] + + def restartTaosd(self): + tdDnodes.stop(1) + tdDnodes.startWithoutSleep(1) + tdSql.execute("use db") + + def insertData(self): + self.lock.acquire() + try: + sql = "insert into test2.warning_1 values " + for i in range(10): + ct = datetime.datetime.now() + t = int(ct.timestamp() * 1000) + self.ts.append(t) + wait = random.randint(1, 9) + time.sleep(0.0001 * wait) + sql += "(%d, %d, 0, 0, 0, %d, 0, %f, %f, 0, 0, %d, %d, False, 0, '', '', 0, False, %d)" % (t, random.randint(0, 20), random.randint(1, 10000), random.uniform(0, 1), random.uniform(0, 1), random.randint(1, 10000), random.randint(1, 10000), t) + tdSql.execute(sql) + finally: + self.lock.release() + + def updateData(self): + self.lock.acquire() + try: + sql = "insert into test2.warning_1(ts,endtime,maxspeed,endlongitude,endlatitude,drivercard_id,status,endmileage) values " + for t in self.ts: + sql += "(%d, %d, 0, %f, %f, 0, False, %d)" % (t, t, random.uniform(0, 1), random.uniform(0, 1), random.randint(1, 10000)) + tdSql.execute(sql) + self.ts.clear() + finally: + self.lock.release() + + def run(self): + + tdSql.execute("CREATE DATABASE test2 CACHE 1 BLOCKS 3 UPDATE 2") + tdSql.execute("use test2") + tdSql.execute('''CREATE TABLE test2.fx_car_warning (ts TIMESTAMP, type TINYINT, level TINYINT, origin TINYINT, endtime BIGINT, mileage INT, maxspeed DOUBLE, + longitude DOUBLE, latitude DOUBLE, endlongitude DOUBLE, endlatitude DOUBLE, drivercard_id BIGINT, infoid INT, status BOOL, endmileage INT, + duty_officer NCHAR(10), content NCHAR(100), cltime BIGINT, clstatus BOOL, starttime BIGINT) TAGS (catid BIGINT, car_id BIGINT, mytype TINYINT)''') + tdSql.execute("create table test2.warning_1 using test2.fx_car_warning tags(1, 1, 0)") + tdLog.sleep(1) + + for i in range(1000): + t1 = threading.Thread(target=self.insertData, args=( )) + t2 = threading.Thread(target=self.updateData, args=( )) + t1.start() + t2.start() + t1.join() + t2.join() + + tdSql.query("select * from test2.fx_car_warning where type is null") + tdSql.checkRows(0) + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) \ No newline at end of file diff --git a/tests/script/general/compute/cast_query1.sim b/tests/script/general/compute/cast_query1.sim index de0722bcd8c3911d94b4558c302c22bbc607defd..4bc7af7941b8fd9104a59b053d29ad4a0fa8cc5e 100644 --- a/tests/script/general/compute/cast_query1.sim +++ b/tests/script/general/compute/cast_query1.sim @@ -1159,10 +1159,14 @@ if $data40 != 4 then return -1 endi if $data50 != NULL then - return -1 + if $data50 != 9223372036854775807 then #for arm64 + return -1 + endi endi if $data60 != NULL then - return -1 + if $data60 != 9223372036854775807 then #for arm64 + return -1 + endi endi sql select cast(c6 as binary(60)) from tb1; if $rows != 7 then @@ -1234,10 +1238,14 @@ if $data40 != @70-01-01 08:00:00.004@ then return -1 endi if $data50 != NULL then - return -1 + if $data50 != @94-08-17 15:12:55.807@ then #for arm64 + return -1 + endi endi if $data60 != NULL then - return -1 + if $data60 != @94-08-17 15:12:55.807@ then #for arm64 + return -1 + endi endi sql select cast(c6 as nchar(50)) from tb1; if $rows != 7 then @@ -1332,10 +1340,14 @@ if $data40 != 4 then return -1 endi if $data50 != NULL then - return -1 + if $data50 != 9223372036854775807 then #for arm64 + return -1 + endi endi if $data60 != NULL then - return -1 + if $data60 != 9223372036854775807 then #for arm64 + return -1 + endi endi sql select cast(c7 as binary(400)) from tb1; if $rows != 7 then @@ -1407,10 +1419,14 @@ if $data40 != @70-01-01 08:00:00.004@ then return -1 endi if $data50 != NULL then - return -1 + if $data50 != @94-08-17 15:12:55.807@ then #for arm64 + return -1 + endi endi if $data60 != NULL then - return -1 + if $data60 != @94-08-17 15:12:55.807@ then #for arm64 + return -1 + endi endi sql select cast(c7 as nchar(500)) from tb1; if $rows != 7 then diff --git a/tests/script/general/compute/scalar_triangle.sim b/tests/script/general/compute/scalar_triangle.sim deleted file mode 100644 index 524a544e9fe88cc4fe5fa1d639e52a032f06222e..0000000000000000000000000000000000000000 --- a/tests/script/general/compute/scalar_triangle.sim +++ /dev/null @@ -1,1763 +0,0 @@ -system sh/stop_dnodes.sh - -system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c walLevel -v 1 -system sh/exec.sh -n dnode1 -s start -sleep 500 -sql connect - -$dbPrefix = db -$tbPrefix = ct -$mtPrefix = st -$tbNum = 2 -$rowNum = 50 - -print =============== step1 create stable/table -$i = 0 -$db = $dbPrefix . $i -$mt = $mtPrefix . $i - -sql drop database $db -x step1 -step1: -sql create database $db -sql use $db -sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 nchar(5), c9 binary(10)) TAGS (tgcol int) -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - sql create table $tb using $mt tags( $i ) - - $x = 0 - $y = 0.25 - - while $x < $rowNum - $cc = $x * 60000 - $ms = 1601481600000 + $cc - sql insert into $tb values ($ms , $x , $y , $x , $x , $x , $y , $x , $x , $x ) - $x = $x + 1 - $y = $y + 1 - endw - - $i = $i + 1 -endw - -print ================= step2 -$i = 1 -$tb = $tbPrefix . $i -$stb = $mtPrefix . 0 - - -print execute sql select c1, sin(c1), cos(c1), tan(c1), asin(c1), acos(c1), atan(c1) from ct1 -sql select c1, sin(c1), cos(c1), tan(c1), asin(c1), acos(c1), atan(c1) from ct1 -if $data00 != @0@ then - return -1 -endi -if $data01 != @0.000000000@ then - return -1 -endi -if $data02 != @1.000000000@ then - return -1 -endi -if $data03 != @0.000000000@ then - return -1 -endi -if $data04 != @0.000000000@ then - return -1 -endi -if $data05 != @1.570796327@ then - return -1 -endi -if $data06 != @0.000000000@ then - return -1 -endi -if $data10 != @1@ then - return -1 -endi -if $data11 != @0.841470985@ then - return -1 -endi -if $data12 != @0.540302306@ then - return -1 -endi -if $data13 != @1.557407725@ then - return -1 -endi -if $data14 != @1.570796327@ then - return -1 -endi -if $data15 != @0.000000000@ then - return -1 -endi -if $data16 != @0.785398163@ then - return -1 -endi -if $data20 != @2@ then - return -1 -endi -if $data21 != @0.909297427@ then - return -1 -endi -if $data22 != @-0.416146837@ then - return -1 -endi -if $data23 != @-2.185039863@ then - return -1 -endi -if $data24 != @nan@ then - return -1 -endi -if $data25 != @nan@ then - return -1 -endi -if $data26 != @1.107148718@ then - return -1 -endi -if $data30 != @3@ then - return -1 -endi -if $data31 != @0.141120008@ then - return -1 -endi -if $data32 != @-0.989992497@ then - return -1 -endi -if $data33 != @-0.142546543@ then - return -1 -endi -if $data34 != @nan@ then - return -1 -endi -if $data35 != @nan@ then - return -1 -endi -if $data36 != @1.249045772@ then - return -1 -endi -if $data40 != @4@ then - return -1 -endi -if $data41 != @-0.756802495@ then - return -1 -endi -if $data42 != @-0.653643621@ then - return -1 -endi -if $data43 != @1.157821282@ then - return -1 -endi -if $data44 != @nan@ then - return -1 -endi -if $data45 != @nan@ then - return -1 -endi -if $data46 != @1.325817664@ then - return -1 -endi -if $data50 != @5@ then - return -1 -endi -if $data51 != @-0.958924275@ then - return -1 -endi -if $data52 != @0.283662185@ then - return -1 -endi -if $data53 != @-3.380515006@ then - return -1 -endi -if $data54 != @nan@ then - return -1 -endi -if $data55 != @nan@ then - return -1 -endi -if $data56 != @1.373400767@ then - return -1 -endi -if $data60 != @6@ then - return -1 -endi -if $data61 != @-0.279415498@ then - return -1 -endi -if $data62 != @0.960170287@ then - return -1 -endi -if $data63 != @-0.291006191@ then - return -1 -endi -if $data64 != @nan@ then - return -1 -endi -if $data65 != @nan@ then - return -1 -endi -if $data66 != @1.405647649@ then - return -1 -endi -if $data70 != @7@ then - return -1 -endi -if $data71 != @0.656986599@ then - return -1 -endi -if $data72 != @0.753902254@ then - return -1 -endi -if $data73 != @0.871447983@ then - return -1 -endi -if $data74 != @nan@ then - return -1 -endi -if $data75 != @nan@ then - return -1 -endi -if $data76 != @1.428899272@ then - return -1 -endi -if $data80 != @8@ then - return -1 -endi -if $data81 != @0.989358247@ then - return -1 -endi -if $data82 != @-0.145500034@ then - return -1 -endi -if $data83 != @-6.799711455@ then - return -1 -endi -if $data84 != @nan@ then - return -1 -endi -if $data85 != @nan@ then - return -1 -endi -if $data86 != @1.446441332@ then - return -1 -endi -if $data90 != @9@ then - return -1 -endi -if $data91 != @0.412118485@ then - return -1 -endi -if $data92 != @-0.911130262@ then - return -1 -endi -if $data93 != @-0.452315659@ then - return -1 -endi -if $data94 != @nan@ then - return -1 -endi -if $data95 != @nan@ then - return -1 -endi -if $data96 != @1.460139106@ then - return -1 -endi -print execute sql select c1, sin(c2)+2, cos(c2)+2, cos(pow(c2,2)+2), tan(pow(c2,3)+log(c3, 2)+pow(c5,2)) as v4, asin(pow(c4, 4.5)+pow(c3, 2)), acos(log(c1,2)+log(c3,4)+pow(c6,2.8)+2) as v6 from ct1 where ts == 1601481600000 -sql select c1, sin(c2)+2, cos(c2)+2, cos(pow(c2,2)+2), tan(pow(c2,3)+log(c3, 2)+pow(c5,2)) as v4, asin(pow(c4, 4.5)+pow(c3, 2)), acos(log(c1,2)+log(c3,4)+pow(c6,2.8)+2) as v6 from ct1 where ts == 1601481600000 -if $data00 != @0@ then - return -1 -endi -if $data01 != @2.247403959@ then - return -1 -endi -if $data02 != @2.968912422@ then - return -1 -endi -if $data03 != @-0.472128411@ then - return -1 -endi -if $data04 != @-nan@ then - return -1 -endi -if $data05 != @0.000000000@ then - return -1 -endi -if $data06 != @nan@ then - return -1 -endi -print execute sql select c1, sin(c2), cos(c1+2), tan(c2+2)+2, sin(c2+3)+cos(c3+2)+tan(c5+2) as v4, sin(c4+4.5)+tan(c3+2), sin(c1+2)+cos(c3+4)+acos(c6+2.8)+2 as v6 from st0 where ts == 1601481600000 -sql select c1, sin(c2), cos(c1+2), tan(c2+2)+2, sin(c2+3)+cos(c3+2)+tan(c5+2) as v4, sin(c4+4.5)+tan(c3+2), sin(c1+2)+cos(c3+4)+acos(c6+2.8)+2 as v6 from st0 where ts == 1601481600000 -if $data00 != @0@ then - return -1 -endi -if $data01 != @0.247403959@ then - return -1 -endi -if $data02 != @-0.416146837@ then - return -1 -endi -if $data03 != @0.761372384@ then - return -1 -endi -if $data04 != @-2.709381834@ then - return -1 -endi -if $data05 != @-3.162569981@ then - return -1 -endi -if $data06 != @nan@ then - return -1 -endi -if $data10 != @0@ then - return -1 -endi -if $data11 != @0.247403959@ then - return -1 -endi -if $data12 != @-0.416146837@ then - return -1 -endi -if $data13 != @0.761372384@ then - return -1 -endi -if $data14 != @-2.709381834@ then - return -1 -endi -if $data15 != @-3.162569981@ then - return -1 -endi -if $data16 != @nan@ then - return -1 -endi -print execute sql select c1, tan(c2+ 2), sin(pow(c1,2)), cos(pow(c2,2)+2), tan(pow(c2,3)+log(c3, 2)+pow(c5,2)) as v4, asin(pow(c4, 4.5)+pow(c3, 2)), acos(log(c1,2)+log(c3,4)+pow(c6,2.8)+2) as v6 from st0 where c1 == 0 -sql select c1, tan(c2+ 2), sin(pow(c1,2)), cos(pow(c2,2)+2), tan(pow(c2,3)+log(c3, 2)+pow(c5,2)) as v4, asin(pow(c4, 4.5)+pow(c3, 2)), acos(log(c1,2)+log(c3,4)+pow(c6,2.8)+2) as v6 from st0 where c1 == 0 -if $data00 != @0@ then - return -1 -endi -if $data01 != @-1.238627616@ then - return -1 -endi -if $data02 != @0.000000000@ then - return -1 -endi -if $data03 != @-0.472128411@ then - return -1 -endi -if $data04 != @-nan@ then - return -1 -endi -if $data05 != @0.000000000@ then - return -1 -endi -if $data06 != @nan@ then - return -1 -endi -if $data10 != @0@ then - return -1 -endi -if $data11 != @-1.238627616@ then - return -1 -endi -if $data12 != @0.000000000@ then - return -1 -endi -if $data13 != @-0.472128411@ then - return -1 -endi -if $data14 != @-nan@ then - return -1 -endi -if $data15 != @0.000000000@ then - return -1 -endi -if $data16 != @nan@ then - return -1 -endi -print execute sql select c1, atan(c2+2), asin(c1+2), acos(c2+c1)+2, acos(c2+c3)+asin(c3+c2)+pow(c5,2) as v4, acos(c4/4.5)+asin(c3-2), asin(c1/2)+log(c3,c4)+pow(c6, 2.8)+2 as v6 from st0 where c1 == 0 -sql select c1, atan(c2+2), asin(c1+2), acos(c2+c1)+2, acos(c2+c3)+asin(c3+c2)+pow(c5,2) as v4, acos(c4/4.5)+asin(c3-2), asin(c1/2)+log(c3,c4)+pow(c6, 2.8)+2 as v6 from st0 where c1 == 0 -if $data00 != @0@ then - return -1 -endi -if $data01 != @1.152571997@ then - return -1 -endi -if $data02 != @nan@ then - return -1 -endi -if $data03 != @3.318116072@ then - return -1 -endi -if $data04 != @1.570796327@ then - return -1 -endi -if $data05 != @nan@ then - return -1 -endi -if $data06 != @-nan@ then - return -1 -endi -if $data10 != @0@ then - return -1 -endi -if $data11 != @1.152571997@ then - return -1 -endi -if $data12 != @nan@ then - return -1 -endi -if $data13 != @3.318116072@ then - return -1 -endi -if $data14 != @1.570796327@ then - return -1 -endi -if $data15 != @nan@ then - return -1 -endi -if $data16 != @-nan@ then - return -1 -endi -print execute sql select c1, cos(c2+2), cos(ceil(pow(c1,2))), sin(floor(pow(c2,2)+2)), sin(ceil(c2)+floor(c3+c2)+round(c5+c2)) as v4, atan(pow(c4, 4.5)+pow(c3, 2)), tan(log(c1,2)+cos(c3+4)+pow(c6,2.8)+2) as v6 from st0 order by ts desc -sql select c1, cos(c2+2), cos(ceil(pow(c1,2))), sin(floor(pow(c2,2)+2)), sin(ceil(c2)+floor(c3+c2)+round(c5+c2)) as v4, atan(pow(c4, 4.5)+pow(c3, 2)), tan(log(c1,2)+cos(c3+4)+pow(c6,2.8)+2) as v6 from st0 order by ts desc -if $data00 != @49@ then - return -1 -endi -if $data01 != @0.742154197@ then - return -1 -endi -if $data02 != @0.679868770@ then - return -1 -endi -if $data03 != @0.313028384@ then - return -1 -endi -if $data04 != @-0.044212563@ then - return -1 -endi -if $data05 != @1.570796302@ then - return -1 -endi -if $data06 != @0.036525682@ then - return -1 -endi -if $data10 != @49@ then - return -1 -endi -if $data11 != @0.742154197@ then - return -1 -endi -if $data12 != @0.679868770@ then - return -1 -endi -if $data13 != @0.313028384@ then - return -1 -endi -if $data14 != @-0.044212563@ then - return -1 -endi -if $data15 != @1.570796302@ then - return -1 -endi -if $data16 != @0.036525682@ then - return -1 -endi -if $data20 != @48@ then - return -1 -endi -if $data21 != @0.964966028@ then - return -1 -endi -if $data22 != @-0.350599733@ then - return -1 -endi -if $data23 != @0.070932648@ then - return -1 -endi -if $data24 != @0.945445155@ then - return -1 -endi -if $data25 != @1.570796300@ then - return -1 -endi -if $data26 != @-2.376507095@ then - return -1 -endi -if $data30 != @48@ then - return -1 -endi -if $data31 != @0.964966028@ then - return -1 -endi -if $data32 != @-0.350599733@ then - return -1 -endi -if $data33 != @0.070932648@ then - return -1 -endi -if $data34 != @0.945445155@ then - return -1 -endi -if $data35 != @1.570796300@ then - return -1 -endi -if $data36 != @-2.376507095@ then - return -1 -endi -if $data40 != @47@ then - return -1 -endi -if $data41 != @0.300592544@ then - return -1 -endi -if $data42 != @-0.895890607@ then - return -1 -endi -if $data43 != @-0.629747508@ then - return -1 -endi -if $data44 != @0.580586641@ then - return -1 -endi -if $data45 != @1.570796297@ then - return -1 -endi -if $data46 != @-0.760993034@ then - return -1 -endi -if $data50 != @47@ then - return -1 -endi -if $data51 != @0.300592544@ then - return -1 -endi -if $data52 != @-0.895890607@ then - return -1 -endi -if $data53 != @-0.629747508@ then - return -1 -endi -if $data54 != @0.580586641@ then - return -1 -endi -if $data55 != @1.570796297@ then - return -1 -endi -if $data56 != @-0.760993034@ then - return -1 -endi -if $data60 != @46@ then - return -1 -endi -if $data61 != @-0.640144339@ then - return -1 -endi -if $data62 != @0.136916383@ then - return -1 -endi -if $data63 != @0.536725534@ then - return -1 -endi -if $data64 != @-0.616064204@ then - return -1 -endi -if $data65 != @1.570796294@ then - return -1 -endi -if $data66 != @-1.929269971@ then - return -1 -endi -if $data70 != @46@ then - return -1 -endi -if $data71 != @-0.640144339@ then - return -1 -endi -if $data72 != @0.136916383@ then - return -1 -endi -if $data73 != @0.536725534@ then - return -1 -endi -if $data74 != @-0.616064204@ then - return -1 -endi -if $data75 != @1.570796294@ then - return -1 -endi -if $data76 != @-1.929269971@ then - return -1 -endi -if $data80 != @45@ then - return -1 -endi -if $data81 != @-0.992335469@ then - return -1 -endi -if $data82 != @-0.241134582@ then - return -1 -endi -if $data83 != @-0.623130100@ then - return -1 -endi -if $data84 != @-0.930094878@ then - return -1 -endi -if $data85 != @1.570796290@ then - return -1 -endi -if $data86 != @-7.205947409@ then - return -1 -endi -if $data90 != @45@ then - return -1 -endi -if $data91 != @-0.992335469@ then - return -1 -endi -if $data92 != @-0.241134582@ then - return -1 -endi -if $data93 != @-0.623130100@ then - return -1 -endi -if $data94 != @-0.930094878@ then - return -1 -endi -if $data95 != @1.570796290@ then - return -1 -endi -if $data96 != @-7.205947409@ then - return -1 -endi -print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5+c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from ct1 order by ts limit 2; -sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5+c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from ct1 order by ts limit 2; -if $data00 != @0@ then - return -1 -endi -if $data01 != @0.778073197@ then - return -1 -endi -if $data02 != @0.614300282@ then - return -1 -endi -if $data03 != @3.203726628@ then - return -1 -endi -if $data04 != @nan@ then - return -1 -endi -if $data05 != @0.022469882@ then - return -1 -endi -if $data06 != @-nan@ then - return -1 -endi -if $data10 != @1@ then - return -1 -endi -if $data11 != @0.141120008@ then - return -1 -endi -if $data12 != @0.666366745@ then - return -1 -endi -if $data13 != @1.558041126@ then - return -1 -endi -if $data14 != @2.154346269@ then - return -1 -endi -if $data15 != @0.172042236@ then - return -1 -endi -if $data16 != @-nan@ then - return -1 -endi -print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 order by ts desc) -sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 order by ts desc) -if $data00 != @49@ then - return -1 -endi -if $data01 != @0.670229176@ then - return -1 -endi -if $data02 != @0.992374553@ then - return -1 -endi -if $data03 != @0.929814367@ then - return -1 -endi -if $data04 != @nan@ then - return -1 -endi -if $data05 != @0.713618282@ then - return -1 -endi -if $data06 != @-0.746290424@ then - return -1 -endi -if $data10 != @49@ then - return -1 -endi -if $data11 != @0.670229176@ then - return -1 -endi -if $data12 != @0.992374553@ then - return -1 -endi -if $data13 != @0.929814367@ then - return -1 -endi -if $data14 != @nan@ then - return -1 -endi -if $data15 != @0.713618282@ then - return -1 -endi -if $data16 != @-0.746290424@ then - return -1 -endi -if $data20 != @48@ then - return -1 -endi -if $data21 != @-0.262374854@ then - return -1 -endi -if $data22 != @0.620208114@ then - return -1 -endi -if $data23 != @1.817585733@ then - return -1 -endi -if $data24 != @nan@ then - return -1 -endi -if $data25 != @1.211884234@ then - return -1 -endi -if $data26 != @5.183714989@ then - return -1 -endi -if $data30 != @48@ then - return -1 -endi -if $data31 != @-0.262374854@ then - return -1 -endi -if $data32 != @0.620208114@ then - return -1 -endi -if $data33 != @1.817585733@ then - return -1 -endi -if $data34 != @nan@ then - return -1 -endi -if $data35 != @1.211884234@ then - return -1 -endi -if $data36 != @5.183714989@ then - return -1 -endi -if $data40 != @47@ then - return -1 -endi -if $data41 != @-0.953752653@ then - return -1 -endi -if $data42 != @0.659304076@ then - return -1 -endi -if $data43 != @3.457510675@ then - return -1 -endi -if $data44 != @nan@ then - return -1 -endi -if $data45 != @0.882083819@ then - return -1 -endi -if $data46 != @2.630220446@ then - return -1 -endi -if $data50 != @47@ then - return -1 -endi -if $data51 != @-0.953752653@ then - return -1 -endi -if $data52 != @0.659304076@ then - return -1 -endi -if $data53 != @3.457510675@ then - return -1 -endi -if $data54 != @nan@ then - return -1 -endi -if $data55 != @0.882083819@ then - return -1 -endi -if $data56 != @2.630220446@ then - return -1 -endi -if $data60 != @46@ then - return -1 -endi -if $data61 != @-0.768254661@ then - return -1 -endi -if $data62 != @0.999843325@ then - return -1 -endi -if $data63 != @1.276316926@ then - return -1 -endi -if $data64 != @nan@ then - return -1 -endi -if $data65 != @-0.300459259@ then - return -1 -endi -if $data66 != @0.133920399@ then - return -1 -endi -if $data70 != @46@ then - return -1 -endi -if $data71 != @-0.768254661@ then - return -1 -endi -if $data72 != @0.999843325@ then - return -1 -endi -if $data73 != @1.276316926@ then - return -1 -endi -if $data74 != @nan@ then - return -1 -endi -if $data75 != @-0.300459259@ then - return -1 -endi -if $data76 != @0.133920399@ then - return -1 -endi -if $data80 != @45@ then - return -1 -endi -if $data81 != @0.123573123@ then - return -1 -endi -if $data82 != @0.673565060@ then - return -1 -endi -if $data83 != @1.519318619@ then - return -1 -endi -if $data84 != @nan@ then - return -1 -endi -if $data85 != @-1.566189594@ then - return -1 -endi -if $data86 != @5.513771854@ then - return -1 -endi -if $data90 != @45@ then - return -1 -endi -if $data91 != @0.123573123@ then - return -1 -endi -if $data92 != @0.673565060@ then - return -1 -endi -if $data93 != @1.519318619@ then - return -1 -endi -if $data94 != @nan@ then - return -1 -endi -if $data95 != @-1.566189594@ then - return -1 -endi -if $data96 != @5.513771854@ then - return -1 -endi -print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 order by ts limit 2); -sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 order by ts limit 2); -if $data00 != @0@ then - return -1 -endi -if $data01 != @0.778073197@ then - return -1 -endi -if $data02 != @0.614300282@ then - return -1 -endi -if $data03 != @3.203726628@ then - return -1 -endi -if $data04 != @nan@ then - return -1 -endi -if $data05 != @0.022469882@ then - return -1 -endi -if $data06 != @-nan@ then - return -1 -endi -if $data10 != @1@ then - return -1 -endi -if $data11 != @0.141120008@ then - return -1 -endi -if $data12 != @0.666366745@ then - return -1 -endi -if $data13 != @1.558041126@ then - return -1 -endi -if $data14 != @1.832595715@ then - return -1 -endi -if $data15 != @0.172042236@ then - return -1 -endi -if $data16 != @-nan@ then - return -1 -endi -print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 ) order by ts desc -sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 ) order by ts desc -if $data00 != @49@ then - return -1 -endi -if $data01 != @0.670229176@ then - return -1 -endi -if $data02 != @0.992374553@ then - return -1 -endi -if $data03 != @0.929814367@ then - return -1 -endi -if $data04 != @nan@ then - return -1 -endi -if $data05 != @0.713618282@ then - return -1 -endi -if $data06 != @-0.746290424@ then - return -1 -endi -if $data10 != @49@ then - return -1 -endi -if $data11 != @0.670229176@ then - return -1 -endi -if $data12 != @0.992374553@ then - return -1 -endi -if $data13 != @0.929814367@ then - return -1 -endi -if $data14 != @nan@ then - return -1 -endi -if $data15 != @0.713618282@ then - return -1 -endi -if $data16 != @-0.746290424@ then - return -1 -endi -if $data20 != @48@ then - return -1 -endi -if $data21 != @-0.262374854@ then - return -1 -endi -if $data22 != @0.620208114@ then - return -1 -endi -if $data23 != @1.817585733@ then - return -1 -endi -if $data24 != @nan@ then - return -1 -endi -if $data25 != @1.211884234@ then - return -1 -endi -if $data26 != @5.183714989@ then - return -1 -endi -if $data30 != @48@ then - return -1 -endi -if $data31 != @-0.262374854@ then - return -1 -endi -if $data32 != @0.620208114@ then - return -1 -endi -if $data33 != @1.817585733@ then - return -1 -endi -if $data34 != @nan@ then - return -1 -endi -if $data35 != @1.211884234@ then - return -1 -endi -if $data36 != @5.183714989@ then - return -1 -endi -if $data40 != @47@ then - return -1 -endi -if $data41 != @-0.953752653@ then - return -1 -endi -if $data42 != @0.659304076@ then - return -1 -endi -if $data43 != @3.457510675@ then - return -1 -endi -if $data44 != @nan@ then - return -1 -endi -if $data45 != @0.882083819@ then - return -1 -endi -if $data46 != @2.630220446@ then - return -1 -endi -if $data50 != @47@ then - return -1 -endi -if $data51 != @-0.953752653@ then - return -1 -endi -if $data52 != @0.659304076@ then - return -1 -endi -if $data53 != @3.457510675@ then - return -1 -endi -if $data54 != @nan@ then - return -1 -endi -if $data55 != @0.882083819@ then - return -1 -endi -if $data56 != @2.630220446@ then - return -1 -endi -if $data60 != @46@ then - return -1 -endi -if $data61 != @-0.768254661@ then - return -1 -endi -if $data62 != @0.999843325@ then - return -1 -endi -if $data63 != @1.276316926@ then - return -1 -endi -if $data64 != @nan@ then - return -1 -endi -if $data65 != @-0.300459259@ then - return -1 -endi -if $data66 != @0.133920399@ then - return -1 -endi -if $data70 != @46@ then - return -1 -endi -if $data71 != @-0.768254661@ then - return -1 -endi -if $data72 != @0.999843325@ then - return -1 -endi -if $data73 != @1.276316926@ then - return -1 -endi -if $data74 != @nan@ then - return -1 -endi -if $data75 != @-0.300459259@ then - return -1 -endi -if $data76 != @0.133920399@ then - return -1 -endi -if $data80 != @45@ then - return -1 -endi -if $data81 != @0.123573123@ then - return -1 -endi -if $data82 != @0.673565060@ then - return -1 -endi -if $data83 != @1.519318619@ then - return -1 -endi -if $data84 != @nan@ then - return -1 -endi -if $data85 != @-1.566189594@ then - return -1 -endi -if $data86 != @5.513771854@ then - return -1 -endi -if $data90 != @45@ then - return -1 -endi -if $data91 != @0.123573123@ then - return -1 -endi -if $data92 != @0.673565060@ then - return -1 -endi -if $data93 != @1.519318619@ then - return -1 -endi -if $data94 != @nan@ then - return -1 -endi -if $data95 != @-1.566189594@ then - return -1 -endi -if $data96 != @5.513771854@ then - return -1 -endi -print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 ) -sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 ) -if $data00 != @0@ then - return -1 -endi -if $data01 != @0.778073197@ then - return -1 -endi -if $data02 != @0.614300282@ then - return -1 -endi -if $data03 != @3.203726628@ then - return -1 -endi -if $data04 != @nan@ then - return -1 -endi -if $data05 != @0.022469882@ then - return -1 -endi -if $data06 != @-nan@ then - return -1 -endi -if $data10 != @1@ then - return -1 -endi -if $data11 != @0.141120008@ then - return -1 -endi -if $data12 != @0.666366745@ then - return -1 -endi -if $data13 != @1.558041126@ then - return -1 -endi -if $data14 != @1.832595715@ then - return -1 -endi -if $data15 != @0.172042236@ then - return -1 -endi -if $data16 != @-nan@ then - return -1 -endi -if $data20 != @2@ then - return -1 -endi -if $data21 != @-0.756802495@ then - return -1 -endi -if $data22 != @1.000000000@ then - return -1 -endi -if $data23 != @1.234030298@ then - return -1 -endi -if $data24 != @nan@ then - return -1 -endi -if $data25 != @0.755422294@ then - return -1 -endi -if $data26 != @0.058157641@ then - return -1 -endi -if $data30 != @3@ then - return -1 -endi -if $data31 != @-0.958924275@ then - return -1 -endi -if $data32 != @0.666366745@ then - return -1 -endi -if $data33 != @3.428875323@ then - return -1 -endi -if $data34 != @nan@ then - return -1 -endi -if $data35 != @1.008737178@ then - return -1 -endi -if $data36 != @2.578037959@ then - return -1 -endi -if $data40 != @4@ then - return -1 -endi -if $data41 != @-0.279415498@ then - return -1 -endi -if $data42 != @0.614300282@ then - return -1 -endi -if $data43 != @1.853464439@ then - return -1 -endi -if $data44 != @nan@ then - return -1 -endi -if $data45 != @0.382340276@ then - return -1 -endi -if $data46 != @5.147179529@ then - return -1 -endi -if $data50 != @5@ then - return -1 -endi -if $data51 != @0.656986599@ then - return -1 -endi -if $data52 != @0.990059086@ then - return -1 -endi -if $data53 != @0.886449574@ then - return -1 -endi -if $data54 != @nan@ then - return -1 -endi -if $data55 != @-0.876294736@ then - return -1 -endi -if $data56 != @-0.924536117@ then - return -1 -endi -if $data60 != @6@ then - return -1 -endi -if $data61 != @0.989358247@ then - return -1 -endi -if $data62 != @0.727035131@ then - return -1 -endi -if $data63 != @3.124320480@ then - return -1 -endi -if $data64 != @nan@ then - return -1 -endi -if $data65 != @-1.869688257@ then - return -1 -endi -if $data66 != @2.172420891@ then - return -1 -endi -if $data70 != @7@ then - return -1 -endi -if $data71 != @0.412118485@ then - return -1 -endi -if $data72 != @0.574400879@ then - return -1 -endi -if $data73 != @2.137595835@ then - return -1 -endi -if $data74 != @nan@ then - return -1 -endi -if $data75 != @-1.811908862@ then - return -1 -endi -if $data76 != @4.862055338@ then - return -1 -endi -if $data80 != @8@ then - return -1 -endi -if $data81 != @-0.544021111@ then - return -1 -endi -if $data82 != @0.961216805@ then - return -1 -endi -if $data83 != @0.578734473@ then - return -1 -endi -if $data84 != @nan@ then - return -1 -endi -if $data85 != @-0.719965518@ then - return -1 -endi -if $data86 != @-4.087614772@ then - return -1 -endi -if $data90 != @9@ then - return -1 -endi -if $data91 != @-0.999990207@ then - return -1 -endi -if $data92 != @0.791836209@ then - return -1 -endi -if $data93 != @2.776612512@ then - return -1 -endi -if $data94 != @nan@ then - return -1 -endi -if $data95 != @0.592988627@ then - return -1 -endi -if $data96 != @1.796697094@ then - return -1 -endi -print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 ) order by ts limit 2; -sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 ) order by ts limit 2; -if $data00 != @0@ then - return -1 -endi -if $data01 != @0.778073197@ then - return -1 -endi -if $data02 != @0.614300282@ then - return -1 -endi -if $data03 != @3.203726628@ then - return -1 -endi -if $data04 != @nan@ then - return -1 -endi -if $data05 != @0.022469882@ then - return -1 -endi -if $data06 != @-nan@ then - return -1 -endi -if $data10 != @1@ then - return -1 -endi -if $data11 != @0.141120008@ then - return -1 -endi -if $data12 != @0.666366745@ then - return -1 -endi -if $data13 != @1.558041126@ then - return -1 -endi -if $data14 != @1.832595715@ then - return -1 -endi -if $data15 != @0.172042236@ then - return -1 -endi -if $data16 != @-nan@ then - return -1 -endi -print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 ) limit 2; -sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 ) limit 2; -if $data00 != @0@ then - return -1 -endi -if $data01 != @0.778073197@ then - return -1 -endi -if $data02 != @0.614300282@ then - return -1 -endi -if $data03 != @3.203726628@ then - return -1 -endi -if $data04 != @nan@ then - return -1 -endi -if $data05 != @0.022469882@ then - return -1 -endi -if $data06 != @-nan@ then - return -1 -endi -if $data10 != @1@ then - return -1 -endi -if $data11 != @0.141120008@ then - return -1 -endi -if $data12 != @0.666366745@ then - return -1 -endi -if $data13 != @1.558041126@ then - return -1 -endi -if $data14 != @1.832595715@ then - return -1 -endi -if $data15 != @0.172042236@ then - return -1 -endi -if $data16 != @-nan@ then - return -1 -endi -print execute sql select * from (select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6, ts from st0 order by ts desc) -sql select * from (select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6, ts from st0 order by ts desc) -if $data00 != @49@ then - return -1 -endi -if $data01 != @0.670229176@ then - return -1 -endi -if $data02 != @0.992374553@ then - return -1 -endi -if $data03 != @0.929814367@ then - return -1 -endi -if $data04 != @nan@ then - return -1 -endi -if $data05 != @0.713618282@ then - return -1 -endi -if $data06 != @-0.746290424@ then - return -1 -endi -if $data07 != @20-10-01 00:49:00.000@ then - return -1 -endi -if $data10 != @49@ then - return -1 -endi -if $data11 != @0.670229176@ then - return -1 -endi -if $data12 != @0.992374553@ then - return -1 -endi -if $data13 != @0.929814367@ then - return -1 -endi -if $data14 != @nan@ then - return -1 -endi -if $data15 != @0.713618282@ then - return -1 -endi -if $data16 != @-0.746290424@ then - return -1 -endi -if $data17 != @20-10-01 00:49:00.000@ then - return -1 -endi -if $data20 != @48@ then - return -1 -endi -if $data21 != @-0.262374854@ then - return -1 -endi -if $data22 != @0.620208114@ then - return -1 -endi -if $data23 != @1.817585733@ then - return -1 -endi -if $data24 != @nan@ then - return -1 -endi -if $data25 != @1.211884234@ then - return -1 -endi -if $data26 != @5.183714989@ then - return -1 -endi -if $data27 != @20-10-01 00:48:00.000@ then - return -1 -endi -if $data30 != @48@ then - return -1 -endi -if $data31 != @-0.262374854@ then - return -1 -endi -if $data32 != @0.620208114@ then - return -1 -endi -if $data33 != @1.817585733@ then - return -1 -endi -if $data34 != @nan@ then - return -1 -endi -if $data35 != @1.211884234@ then - return -1 -endi -if $data36 != @5.183714989@ then - return -1 -endi -if $data37 != @20-10-01 00:48:00.000@ then - return -1 -endi -if $data40 != @47@ then - return -1 -endi -if $data41 != @-0.953752653@ then - return -1 -endi -if $data42 != @0.659304076@ then - return -1 -endi -if $data43 != @3.457510675@ then - return -1 -endi -if $data44 != @nan@ then - return -1 -endi -if $data45 != @0.882083819@ then - return -1 -endi -if $data46 != @2.630220446@ then - return -1 -endi -if $data47 != @20-10-01 00:47:00.000@ then - return -1 -endi -if $data50 != @47@ then - return -1 -endi -if $data51 != @-0.953752653@ then - return -1 -endi -if $data52 != @0.659304076@ then - return -1 -endi -if $data53 != @3.457510675@ then - return -1 -endi -if $data54 != @nan@ then - return -1 -endi -if $data55 != @0.882083819@ then - return -1 -endi -if $data56 != @2.630220446@ then - return -1 -endi -if $data57 != @20-10-01 00:47:00.000@ then - return -1 -endi -if $data60 != @46@ then - return -1 -endi -if $data61 != @-0.768254661@ then - return -1 -endi -if $data62 != @0.999843325@ then - return -1 -endi -if $data63 != @1.276316926@ then - return -1 -endi -if $data64 != @nan@ then - return -1 -endi -if $data65 != @-0.300459259@ then - return -1 -endi -if $data66 != @0.133920399@ then - return -1 -endi -if $data67 != @20-10-01 00:46:00.000@ then - return -1 -endi -if $data70 != @46@ then - return -1 -endi -if $data71 != @-0.768254661@ then - return -1 -endi -if $data72 != @0.999843325@ then - return -1 -endi -if $data73 != @1.276316926@ then - return -1 -endi -if $data74 != @nan@ then - return -1 -endi -if $data75 != @-0.300459259@ then - return -1 -endi -if $data76 != @0.133920399@ then - return -1 -endi -if $data77 != @20-10-01 00:46:00.000@ then - return -1 -endi -if $data80 != @45@ then - return -1 -endi -if $data81 != @0.123573123@ then - return -1 -endi -if $data82 != @0.673565060@ then - return -1 -endi -if $data83 != @1.519318619@ then - return -1 -endi -if $data84 != @nan@ then - return -1 -endi -if $data85 != @-1.566189594@ then - return -1 -endi -if $data86 != @5.513771854@ then - return -1 -endi -if $data87 != @20-10-01 00:45:00.000@ then - return -1 -endi -if $data90 != @45@ then - return -1 -endi -if $data91 != @0.123573123@ then - return -1 -endi -if $data92 != @0.673565060@ then - return -1 -endi -if $data93 != @1.519318619@ then - return -1 -endi -if $data94 != @nan@ then - return -1 -endi -if $data95 != @-1.566189594@ then - return -1 -endi -if $data96 != @5.513771854@ then - return -1 -endi -if $data97 != @20-10-01 00:45:00.000@ then - return -1 -endi -print execute sql select * from (select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6, ts from ct1 order by ts limit 2); -sql select * from (select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6, ts from ct1 order by ts limit 2); -if $data00 != @0@ then - return -1 -endi -if $data01 != @0.778073197@ then - return -1 -endi -if $data02 != @0.614300282@ then - return -1 -endi -if $data03 != @3.203726628@ then - return -1 -endi -if $data04 != @nan@ then - return -1 -endi -if $data05 != @0.022469882@ then - return -1 -endi -if $data06 != @-nan@ then - return -1 -endi -if $data07 != @20-10-01 00:00:00.000@ then - return -1 -endi -if $data10 != @1@ then - return -1 -endi -if $data11 != @0.141120008@ then - return -1 -endi -if $data12 != @0.666366745@ then - return -1 -endi -if $data13 != @1.558041126@ then - return -1 -endi -if $data14 != @1.832595715@ then - return -1 -endi -if $data15 != @0.172042236@ then - return -1 -endi -if $data16 != @-nan@ then - return -1 -endi -if $data17 != @20-10-01 00:01:00.000@ then - return -1 -endi - -print ===============> step 3 sql_error stable, group by, window -sql_error select sin(c2) from $stb group by tbname; - -sql_error select sin(c2) from $stb group by tgcol; - -sql_error select sin(c2) from $stb group by c3; - -sql_error select sin(c2) from $stb interval(1m); - -sql_error select sin(c2) from $stb state_window(c7); - -sql_error select sin(c2) from $tb state_window(c7); - -sql_error select sin(c2) from $stb session(ts, 30s); - -sql_error select sin(c2) from $tb session(ts, 30s); - -sql_error select sin(c2) from $stb slimit 2; - -sql_error select sin(c2) from $stb interval(1m) slimit 2; - -print =============== clear -#sql drop database $db -#sql show databases -#if $rows != 0 then -# return -1 -#endi - -#system sh/exec.sh -n dnode1 -s stop -x SIGINT - diff --git a/tests/script/general/parser/scalar_expression.sim b/tests/script/general/parser/scalar_expression.sim deleted file mode 100644 index 9f8c9c38caa81613a58aa4de596d453eae162ad7..0000000000000000000000000000000000000000 --- a/tests/script/general/parser/scalar_expression.sim +++ /dev/null @@ -1,251 +0,0 @@ - -system sh/stop_dnodes.sh - -system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c walLevel -v 1 -system sh/exec.sh -n dnode1 -s start -sleep 500 -sql connect - -$dbPrefix = db -$tbPrefix = ct -$mtPrefix = st -$tbNum = 2 -$rowNum = 50 - -print =============== step1 create stable/table -$i = 0 -$db = $dbPrefix . $i -$mt = $mtPrefix . $i - -sql drop database $db -x step1 -step1: -sql create database $db -sql use $db -sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 nchar(5), c9 binary(10)) TAGS (tgcol int) -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - sql create table $tb using $mt tags( $i ) - - $x = 0 - $y = 0.25 - - while $x < $rowNum - $cc = $x * 60000 - $ms = 1601481600000 + $cc - sql insert into $tb values ($ms , $x , $y , $x , $x , $x , $y , $x , $x , $x ) - $x = $x + 1 - $y = $y + 1 - endw - - $i = $i + 1 -endw - -print ================= step2 - -print execute sql select floor(3.0)+ceil(4.0) from ct0 -sql select floor(3.0)+ceil(4.0) from ct0 -if $data00 != @7.000000000@ then - return -1 -endi -if $data10 != @7.000000000@ then - return -1 -endi -if $data20 != @7.000000000@ then - return -1 -endi -if $data30 != @7.000000000@ then - return -1 -endi -if $data40 != @7.000000000@ then - return -1 -endi -if $data50 != @7.000000000@ then - return -1 -endi -if $data60 != @7.000000000@ then - return -1 -endi -if $data70 != @7.000000000@ then - return -1 -endi -if $data80 != @7.000000000@ then - return -1 -endi -if $data90 != @7.000000000@ then - return -1 -endi -print execute sql select sum(c1)+3.0+4.0 from st0 -sql select sum(c1)+3.0+4.0 from st0 -if $data00 != @2457.000000000@ then - return -1 -endi -print execute sql select sin(log(avg(c1),sum(c2))+3)%4 from st0 -sql select sin(log(avg(c1),sum(c2))+3)%4 from st0 -if $data00 != @-0.265074286@ then - return -1 -endi -print execute sql select log(pow(length(concat('3','4')),2),c2) from st0 -sql select log(pow(length(concat('3','4')),2),c2) from st0 -if $data00 != @-1.000000000@ then - return -1 -endi -if $data10 != @inf@ then - return -1 -endi -if $data20 != @2.000000000@ then - return -1 -endi -if $data30 != @1.261859507@ then - return -1 -endi -if $data40 != @1.000000000@ then - return -1 -endi -if $data50 != @0.861353116@ then - return -1 -endi -if $data60 != @0.773705614@ then - return -1 -endi -if $data70 != @0.712414374@ then - return -1 -endi -if $data80 != @0.666666667@ then - return -1 -endi -if $data90 != @0.630929754@ then - return -1 -endi -print execute sql select round(log(pow(length(concat('3','4')),2),c2)+floor(c3))+2 from st0 -sql select round(log(pow(length(concat('3','4')),2),c2)+floor(c3))+2 from st0 -if $data00 != @1.000000000@ then - return -1 -endi -if $data10 != @inf@ then - return -1 -endi -if $data20 != @6.000000000@ then - return -1 -endi -if $data30 != @6.000000000@ then - return -1 -endi -if $data40 != @7.000000000@ then - return -1 -endi -if $data50 != @8.000000000@ then - return -1 -endi -if $data60 != @9.000000000@ then - return -1 -endi -if $data70 != @10.000000000@ then - return -1 -endi -if $data80 != @11.000000000@ then - return -1 -endi -if $data90 != @12.000000000@ then - return -1 -endi -print execute sql select sin(pow(c1,log(c2,2))+pow(c2,2)) as val from ct0 union all select pow(c4,2)+tan(sin(c5)/cos(c6)) as val from ct1 -sql select sin(pow(c1,log(c2,2))+pow(c2,2)) as val from ct0 union all select pow(c4,2)+tan(sin(c5)/cos(c6)) as val from ct1 -if $data00 != @-nan@ then - return -1 -endi -if $data10 != @0.909297427@ then - return -1 -endi -if $data20 != @-0.279415498@ then - return -1 -endi -if $data30 != @0.843325058@ then - return -1 -endi -if $data40 != @0.551426681@ then - return -1 -endi -if $data50 != @-0.840606612@ then - return -1 -endi -if $data60 != @0.436161076@ then - return -1 -endi -if $data70 != @0.897498185@ then - return -1 -endi -if $data80 != @-0.885952778@ then - return -1 -endi -if $data90 != @0.429470715@ then - return -1 -endi -print execute sql select asin(c1) from st0 limit 1 -sql select asin(c1) from st0 limit 1 -if $data00 != @0.000000000@ then - return -1 -endi -print execute sql select pow(c1,2) from st0 limit 1 offset 2; -sql select pow(c1,2) from st0 limit 1 offset 2; -if $data00 != @4.000000000@ then - return -1 -endi -print execute sql select cos(c1) from db0.ct0, db0.ct1 where ct0.ts==ct1.ts -sql select cos(c1) from db0.ct0, db0.ct1 where ct0.ts==ct1.ts -if $data00 != @1.000000000@ then - return -1 -endi -if $data10 != @0.540302306@ then - return -1 -endi -if $data20 != @-0.416146837@ then - return -1 -endi -if $data30 != @-0.989992497@ then - return -1 -endi -if $data40 != @-0.653643621@ then - return -1 -endi -if $data50 != @0.283662185@ then - return -1 -endi -if $data60 != @0.960170287@ then - return -1 -endi -if $data70 != @0.753902254@ then - return -1 -endi -if $data80 != @-0.145500034@ then - return -1 -endi -if $data90 != @-0.911130262@ then - return -1 -endi -print ============== invalid expressions -$stb = st0 -sql_error select agg(c1)+c2 from $stb -sql_error select agg(c1+2) from $stb -sql_error select agg(ceil(c1))+c2 from $stb -sql_error select agg(ceil(c1)) from $stb -sql_error select asin(c1) from $stb group by tbname -sql_error select asin(c2) from $stb group by tgcol -sql_error select asin(c1) from $stb session_window(ts, 1s) -sql_error select cos(c1) from $stb state_window(f1) -sql_error select pow(c2,2) from $stb interval(1s) sliding(500a) -sql_error select pow(c2,2) from $stb state_window(f1) -sql_error select tan(c1) from $stb from d.st slimit 1 -sql_error select c1+2, tbname from $stb group by tbname -sql select sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(c1)))))))))))))))) from $stb -sql_error select sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(c1))))))))))))))))) from $stb -print =============== clear -sql drop database $db -sql show databases -if $rows != 0 then - return -1 -endi - -system sh/exec.sh -n dnode1 -s stop -x SIGINT -