diff --git a/docs/en/06-advanced/03-stream.md b/docs/en/06-advanced/03-stream.md index f005109a3d..2fde52cc9a 100644 --- a/docs/en/06-advanced/03-stream.md +++ b/docs/en/06-advanced/03-stream.md @@ -26,7 +26,7 @@ CREATE STREAM [IF NOT EXISTS] stream_name [stream_options] INTO stb_name SUBTABLE(expression) AS subquery stream_options: { - TRIGGER [AT_ONCE | WINDOW_CLOSE | MAX_DELAY time] + TRIGGER [AT_ONCE | WINDOW_CLOSE | MAX_DELAY time | FORCE_WINDOW_CLOSE] WATERMARK time IGNORE EXPIRED [0|1] DELETE_MARK time @@ -56,13 +56,17 @@ window_clause: { } ``` -The subquery supports session windows, state windows, and sliding windows. When used with supertables, session windows and state windows must be used together with `partition by tbname`. +The subquery supports session windows, state windows, time windows, event windows, and count windows. When used with supertables, state windows, event windows, and count windows must be used together with `partition by tbname`. 1. SESSION is a session window, where tol_val is the maximum range of the time interval. All data within the tol_val time interval belong to the same window. If the time interval between two consecutive data points exceeds tol_val, the next window automatically starts. -2. EVENT_WINDOW is an event window, defined by start and end conditions. The window starts when the start_trigger_condition is met and closes when the end_trigger_condition is met. start_trigger_condition and end_trigger_condition can be any condition expressions supported by TDengine and can include different columns. +2. STATE_WINDOW is a state window. The col is used to identify the state value. Values with the same state value belong to the same state window. When the value of col changes, the current window ends and the next window is automatically opened. -3. COUNT_WINDOW is a counting window, divided by a fixed number of data rows. count_val is a constant, a positive integer, and must be at least 2 and less than 2147483648. count_val represents the maximum number of data rows in each COUNT_WINDOW. If the total number of data rows cannot be evenly divided by count_val, the last window will have fewer rows than count_val. sliding_val is a constant, representing the number of rows the window slides, similar to the SLIDING in INTERVAL. +3. INTERVAL is a time window, which can be further divided into sliding time windows and tumbling time windows.The INTERVAL clause is used to specify the equal time period of the window, and the SLIDING clause is used to specify the time by which the window slides forward. When the value of interval_val is equal to the value of sliding_val, the time window is a tumbling time window; otherwise, it is a sliding time window. Note: The value of sliding_val must be less than or equal to the value of interval_val. + +4. EVENT_WINDOW is an event window, defined by start and end conditions. The window starts when the start_trigger_condition is met and closes when the end_trigger_condition is met. start_trigger_condition and end_trigger_condition can be any condition expressions supported by TDengine and can include different columns. + +5. COUNT_WINDOW is a counting window, divided by a fixed number of data rows. count_val is a constant, a positive integer, and must be at least 2 and less than 2147483648. count_val represents the maximum number of data rows in each COUNT_WINDOW. If the total number of data rows cannot be evenly divided by count_val, the last window will have fewer rows than count_val. sliding_val is a constant, representing the number of rows the window slides, similar to the SLIDING in INTERVAL. The definition of a window is exactly the same as in the time-series data window query, for details refer to the TDengine window functions section. diff --git a/docs/en/14-reference/01-components/12-tdinsight.md b/docs/en/14-reference/01-components/12-tdinsight.md index c9464760e7..db77aecf86 100644 --- a/docs/en/14-reference/01-components/12-tdinsight.md +++ b/docs/en/14-reference/01-components/12-tdinsight.md @@ -70,6 +70,7 @@ Metric details (from top to bottom, left to right): - **Databases** - Number of databases. - **Connections** - Current number of connections. - **DNodes/MNodes/VGroups/VNodes**: Total and alive count of each resource. +- **Classified Connection Counts**: The current number of active connections, classified by user, application, and IP. - **DNodes/MNodes/VGroups/VNodes Alive Percent**: The ratio of alive/total for each resource, enable alert rules, and trigger when the resource survival rate (average healthy resource ratio within 1 minute) is less than 100%. - **Measuring Points Used**: Number of measuring points used with alert rules enabled (no data for community edition, healthy by default). @@ -183,22 +184,22 @@ After importing, click on "Alert rules" on the left side of the Grafana interfac The specific configuration of the 14 alert rules is as follows: -| alert rule| Rule threshold| Behavior when no data | Data scanning interval |Duration | SQL | -| ------ | --------- | ---------------- | ----------- |------- |----------------------| -|CPU load of dnode node|average > 80%|Trigger alert|5 minutes|5 minutes |`select now(), dnode_id, last(cpu_system) as cup_use from log.taosd_dnodes_info where _ts >= (now- 5m) and _ts < now partition by dnode_id having first(_ts) > 0 `| -|Memory of dnode node |average > 60%|Trigger alert|5 minutes|5 minutes|`select now(), dnode_id, last(mem_engine) / last(mem_total) * 100 as taosd from log.taosd_dnodes_info where _ts >= (now- 5m) and _ts 80%|Trigger alert|5 minutes|5 minutes|`select now(), dnode_id, data_dir_level, data_dir_name, last(used) / last(total) * 100 as used from log.taosd_dnodes_data_dirs where _ts >= (now - 5m) and _ts < now partition by dnode_id, data_dir_level, data_dir_name`| -|Authorization expires |< 60天|Trigger alert|1 day|0 0 seconds|`select now(), cluster_id, last(grants_expire_time) / 86400 as expire_time from log.taosd_cluster_info where _ts >= (now - 24h) and _ts < now partition by cluster_id having first(_ts) > 0 `| -|The used measurement points has reached the authorized number|>= 90%|Trigger alert|1 day|0 seconds|`select now(), cluster_id, CASE WHEN max(grants_timeseries_total) > 0.0 THEN max(grants_timeseries_used) /max(grants_timeseries_total) * 100.0 ELSE 0.0 END AS result from log.taosd_cluster_info where _ts >= (now - 30s) and _ts < now partition by cluster_id having timetruncate(first(_ts), 1m) > 0`| -|Number of concurrent query requests | > 100|Do not trigger alert|1 minute|0 seconds|`select now() as ts, count(*) as slow_count from performance_schema.perf_queries`| -|Maximum time for slow query execution (no time window) |> 300秒|Do not trigger alert|1 minute|0 seconds|`select now() as ts, count(*) as slow_count from performance_schema.perf_queries where exec_usec>300000000`| -|dnode offline |total != alive|Trigger alert|30 seconds|0 seconds|`select now(), cluster_id, last(dnodes_total) - last(dnodes_alive) as dnode_offline from log.taosd_cluster_info where _ts >= (now -30s) and _ts < now partition by cluster_id having first(_ts) > 0`| -|vnode offline |total != alive|Trigger alert|30 seconds|0 seconds|`select now(), cluster_id, last(vnodes_total) - last(vnodes_alive) as vnode_offline from log.taosd_cluster_info where _ts >= (now - 30s) and _ts < now partition by cluster_id having first(_ts) > 0 `| -|Number of data deletion requests |> 0|Do not trigger alert|30 seconds|0 seconds|``select now(), count(`count`) as `delete_count` from log.taos_sql_req where sql_type = 'delete' and _ts >= (now -30s) and _ts < now``| -|Adapter RESTful request fail |> 5|Do not trigger alert|30 seconds|0 seconds|``select now(), sum(`fail`) as `Failed` from log.adapter_requests where req_type=0 and ts >= (now -30s) and ts < now``| -|Adapter WebSocket request fail |> 5|Do not trigger alert|30 seconds|0 seconds|``select now(), sum(`fail`) as `Failed` from log.adapter_requests where req_type=1 and ts >= (now -30s) and ts < now``| -|Dnode data reporting is missing |< 3|Trigger alert|180 seconds|0 seconds|`select now(), cluster_id, count(*) as dnode_report from log.taosd_cluster_info where _ts >= (now -180s) and _ts < now partition by cluster_id having timetruncate(first(_ts), 1h) > 0`| -|Restart dnode |max(update_time) > last(update_time)|Trigger alert|90 seconds|0 seconds|`select now(), dnode_id, max(uptime) - last(uptime) as dnode_restart from log.taosd_dnodes_info where _ts >= (now - 90s) and _ts < now partition by dnode_id`| +| alert rule | Rule threshold | Behavior when no data | Data scanning interval | Duration | SQL | +| ------------------------------------------------------------- | ------------------------------------ | --------------------- | ---------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| CPU load of dnode node | average > 80% | Trigger alert | 5 minutes | 5 minutes | `select now(), dnode_id, last(cpu_system) as cup_use from log.taosd_dnodes_info where _ts >= (now- 5m) and _ts < now partition by dnode_id having first(_ts) > 0 ` | +| Memory of dnode node | average > 60% | Trigger alert | 5 minutes | 5 minutes | `select now(), dnode_id, last(mem_engine) / last(mem_total) * 100 as taosd from log.taosd_dnodes_info where _ts >= (now- 5m) and _ts 80% | Trigger alert | 5 minutes | 5 minutes | `select now(), dnode_id, data_dir_level, data_dir_name, last(used) / last(total) * 100 as used from log.taosd_dnodes_data_dirs where _ts >= (now - 5m) and _ts < now partition by dnode_id, data_dir_level, data_dir_name` | +| Authorization expires | < 60天 | Trigger alert | 1 day | 0 0 seconds | `select now(), cluster_id, last(grants_expire_time) / 86400 as expire_time from log.taosd_cluster_info where _ts >= (now - 24h) and _ts < now partition by cluster_id having first(_ts) > 0 ` | +| The used measurement points has reached the authorized number | >= 90% | Trigger alert | 1 day | 0 seconds | `select now(), cluster_id, CASE WHEN max(grants_timeseries_total) > 0.0 THEN max(grants_timeseries_used) /max(grants_timeseries_total) * 100.0 ELSE 0.0 END AS result from log.taosd_cluster_info where _ts >= (now - 30s) and _ts < now partition by cluster_id having timetruncate(first(_ts), 1m) > 0` | +| Number of concurrent query requests | > 100 | Do not trigger alert | 1 minute | 0 seconds | `select now() as ts, count(*) as slow_count from performance_schema.perf_queries` | +| Maximum time for slow query execution (no time window) | > 300秒 | Do not trigger alert | 1 minute | 0 seconds | `select now() as ts, count(*) as slow_count from performance_schema.perf_queries where exec_usec>300000000` | +| dnode offline | total != alive | Trigger alert | 30 seconds | 0 seconds | `select now(), cluster_id, last(dnodes_total) - last(dnodes_alive) as dnode_offline from log.taosd_cluster_info where _ts >= (now -30s) and _ts < now partition by cluster_id having first(_ts) > 0` | +| vnode offline | total != alive | Trigger alert | 30 seconds | 0 seconds | `select now(), cluster_id, last(vnodes_total) - last(vnodes_alive) as vnode_offline from log.taosd_cluster_info where _ts >= (now - 30s) and _ts < now partition by cluster_id having first(_ts) > 0 ` | +| Number of data deletion requests | > 0 | Do not trigger alert | 30 seconds | 0 seconds | ``select now(), count(`count`) as `delete_count` from log.taos_sql_req where sql_type = 'delete' and _ts >= (now -30s) and _ts < now`` | +| Adapter RESTful request fail | > 5 | Do not trigger alert | 30 seconds | 0 seconds | ``select now(), sum(`fail`) as `Failed` from log.adapter_requests where req_type=0 and ts >= (now -30s) and ts < now`` | +| Adapter WebSocket request fail | > 5 | Do not trigger alert | 30 seconds | 0 seconds | ``select now(), sum(`fail`) as `Failed` from log.adapter_requests where req_type=1 and ts >= (now -30s) and ts < now`` | +| Dnode data reporting is missing | < 3 | Trigger alert | 180 seconds | 0 seconds | `select now(), cluster_id, count(*) as dnode_report from log.taosd_cluster_info where _ts >= (now -180s) and _ts < now partition by cluster_id having timetruncate(first(_ts), 1h) > 0` | +| Restart dnode | max(update_time) > last(update_time) | Trigger alert | 90 seconds | 0 seconds | `select now(), dnode_id, max(uptime) - last(uptime) as dnode_restart from log.taosd_dnodes_info where _ts >= (now - 90s) and _ts < now partition by dnode_id` | TDengine users can modify and improve these alert rules according to their own business needs. In Grafana 7.5 and below versions, the Dashboard and Alert rules functions are combined, while in subsequent new versions, the two functions are separated. To be compatible with Grafana7.5 and below versions, an Alert Used Only panel has been added to the TDinsight panel, which is only required for Grafana7.5 and below versions. @@ -258,19 +259,19 @@ Install and configure TDinsight dashboard in Grafana on Ubuntu 18.04/20.04 syste Most command line options can also be achieved through environment variables. -| Short Option | Long Option | Environment Variable | Description | -| ------------ | ------------------------------- | ------------------------------ | -------------------------------------------------------- | -| -v | --plugin-version | TDENGINE_PLUGIN_VERSION | TDengine datasource plugin version, default is latest. | -| -P | --grafana-provisioning-dir | GF_PROVISIONING_DIR | Grafana provisioning directory, default is `/etc/grafana/provisioning/` | -| -G | --grafana-plugins-dir | GF_PLUGINS_DIR | Grafana plugins directory, default is `/var/lib/grafana/plugins`. | -| -O | --grafana-org-id | GF_ORG_ID | Grafana organization ID, default is 1. | -| -n | --tdengine-ds-name | TDENGINE_DS_NAME | TDengine datasource name, default is TDengine. | -| -a | --tdengine-api | TDENGINE_API | TDengine REST API endpoint. Default is `http://127.0.0.1:6041`. | -| -u | --tdengine-user | TDENGINE_USER | TDengine user name. [default: root] | -| -p | --tdengine-password | TDENGINE_PASSWORD | TDengine password. [default: taosdata] | -| -i | --tdinsight-uid | TDINSIGHT_DASHBOARD_UID | TDinsight dashboard `uid`. [default: tdinsight] | -| -t | --tdinsight-title | TDINSIGHT_DASHBOARD_TITLE | TDinsight dashboard title. [default: TDinsight] | -| -e | --tdinsight-editable | TDINSIGHT_DASHBOARD_EDITABLE | If the provisioning dashboard could be editable. [default: false] | +| Short Option | Long Option | Environment Variable | Description | +| ------------ | -------------------------- | ---------------------------- | ----------------------------------------------------------------------- | +| -v | --plugin-version | TDENGINE_PLUGIN_VERSION | TDengine datasource plugin version, default is latest. | +| -P | --grafana-provisioning-dir | GF_PROVISIONING_DIR | Grafana provisioning directory, default is `/etc/grafana/provisioning/` | +| -G | --grafana-plugins-dir | GF_PLUGINS_DIR | Grafana plugins directory, default is `/var/lib/grafana/plugins`. | +| -O | --grafana-org-id | GF_ORG_ID | Grafana organization ID, default is 1. | +| -n | --tdengine-ds-name | TDENGINE_DS_NAME | TDengine datasource name, default is TDengine. | +| -a | --tdengine-api | TDENGINE_API | TDengine REST API endpoint. Default is `http://127.0.0.1:6041`. | +| -u | --tdengine-user | TDENGINE_USER | TDengine user name. [default: root] | +| -p | --tdengine-password | TDENGINE_PASSWORD | TDengine password. [default: taosdata] | +| -i | --tdinsight-uid | TDINSIGHT_DASHBOARD_UID | TDinsight dashboard `uid`. [default: tdinsight] | +| -t | --tdinsight-title | TDINSIGHT_DASHBOARD_TITLE | TDinsight dashboard title. [default: TDinsight] | +| -e | --tdinsight-editable | TDINSIGHT_DASHBOARD_EDITABLE | If the provisioning dashboard could be editable. [default: false] | :::note The new version of the plugin uses the Grafana unified alerting feature, the `-E` option is no longer supported. diff --git a/docs/en/14-reference/02-tools/09-taosdump.md b/docs/en/14-reference/02-tools/09-taosdump.md index 75747f2f57..1ce08ff825 100644 --- a/docs/en/14-reference/02-tools/09-taosdump.md +++ b/docs/en/14-reference/02-tools/09-taosdump.md @@ -10,11 +10,7 @@ slug: /tdengine-reference/tools/taosdump ## Installation -Taosdump provides two installation methods: - -- Taosdump is the default installation component in the TDengine installation package, which can be used after installing TDengine. For how to install TDengine, please refer to [TDengine Installation](../../../get-started/) - -- Compile and install taos tools separately, refer to [taos tools](https://github.com/taosdata/taos-tools) . +taosdump is the default installation component in the TDengine installation package, which can be used after installing TDengine. For how to install TDengine, please refer to [TDengine Installation](../../../get-started/) ## Common Use Cases diff --git a/docs/en/14-reference/02-tools/10-taosbenchmark.md b/docs/en/14-reference/02-tools/10-taosbenchmark.md index 4925f4cb3b..cfca7e23b9 100644 --- a/docs/en/14-reference/02-tools/10-taosbenchmark.md +++ b/docs/en/14-reference/02-tools/10-taosbenchmark.md @@ -8,11 +8,7 @@ TaosBenchmark is a performance benchmarking tool for TDengine products, providin ## Installation -taosBenchmark provides two installation methods: - -- taosBenchmark is the default installation component in the TDengine installation package, which can be used after installing TDengine. For how to install TDengine, please refer to [TDengine Installation](../../../get started/) - -- Compile and install taos tools separately, refer to [taos tools](https://github.com/taosdata/taos-tools) . +taosBenchmark is the default installation component in the TDengine installation package, which can be used after installing TDengine. For how to install TDengine, please refer to [TDengine Installation](../../../get started/) ## Operation @@ -63,7 +59,7 @@ taosBenchmark -f insert.json ```json -{{#include /taos-tools/example/insert.json}} +{{#include /TDengine/tools/taos-tools/example/insert.json}} ``` @@ -74,7 +70,7 @@ taosBenchmark -f query.json ```json -{{#include /taos-tools/example/query.json}} +{{#include /TDengine/tools/taos-tools/example/query.json}} ``` @@ -85,7 +81,7 @@ taosBenchmark -f tmq.json ```json -{{#include /taos-tools/example/tmq.json}} +{{#include /TDengine/tools/taos-tools/example/tmq.json}} ``` diff --git a/docs/en/14-reference/03-taos-sql/14-stream.md b/docs/en/14-reference/03-taos-sql/14-stream.md index 2652729e2c..704a7ebcbc 100644 --- a/docs/en/14-reference/03-taos-sql/14-stream.md +++ b/docs/en/14-reference/03-taos-sql/14-stream.md @@ -11,7 +11,7 @@ import imgStream from './assets/stream-processing-01.png'; ```sql CREATE STREAM [IF NOT EXISTS] stream_name [stream_options] INTO stb_name[(field1_name, field2_name [PRIMARY KEY], ...)] [TAGS (create_definition [, create_definition] ...)] SUBTABLE(expression) AS subquery stream_options: { - TRIGGER [AT_ONCE | WINDOW_CLOSE | MAX_DELAY time] + TRIGGER [AT_ONCE | WINDOW_CLOSE | MAX_DELAY time | FORCE_WINDOW_CLOSE] WATERMARK time IGNORE EXPIRED [0|1] DELETE_MARK time @@ -58,6 +58,10 @@ window_clause: { Where SESSION is a session window, tol_val is the maximum range of the time interval. All data within the tol_val time interval belong to the same window. If the time between two consecutive data points exceeds tol_val, the next window automatically starts. The window's_wend equals the last data point's time plus tol_val. +STATE_WINDOW is a state window. The col is used to identify the state value. Values with the same state value belong to the same state window. When the value of col changes, the current window ends and the next window is automatically opened. + +INTERVAL is a time window, which can be further divided into sliding time windows and tumbling time windows.The INTERVAL clause is used to specify the equal time period of the window, and the SLIDING clause is used to specify the time by which the window slides forward. When the value of interval_val is equal to the value of sliding_val, the time window is a tumbling time window; otherwise, it is a sliding time window. Note: The value of sliding_val must be less than or equal to the value of interval_val. + EVENT_WINDOW is an event window, defined by start and end conditions. The window starts when the start_trigger_condition is met and closes when the end_trigger_condition is met. start_trigger_condition and end_trigger_condition can be any condition expression supported by TDengine and can include different columns. COUNT_WINDOW is a count window, dividing the window by a fixed number of data rows. count_val is a constant, a positive integer, must be at least 2 and less than 2147483648. count_val represents the maximum number of data rows each COUNT_WINDOW contains. If the total number of data rows is not divisible by count_val, the last window will have fewer rows than count_val. sliding_val is a constant, representing the number of rows the window slides, similar to the SLIDING in INTERVAL. diff --git a/docs/en/28-releases/02-tools.md b/docs/en/28-releases/02-tools.md index fc5b196210..6bd51d6ed6 100644 --- a/docs/en/28-releases/02-tools.md +++ b/docs/en/28-releases/02-tools.md @@ -4,7 +4,7 @@ title: taosTools Release History and Download Links slug: /release-history/taostools --- -Download links for various versions of taosTools are as follows: +Starting from version 3.0.6.0, taosTools has been integrated into the TDengine installation package and is no longer provided separately. Download links for various versions of taosTools (corresponding to TDengine 3.0.5.2 and earlier) are as follows: For other historical versions, please visit [here](https://tdengine.com/downloads/historical) diff --git a/docs/zh/06-advanced/03-stream.md b/docs/zh/06-advanced/03-stream.md index 333dabd189..8692afad45 100644 --- a/docs/zh/06-advanced/03-stream.md +++ b/docs/zh/06-advanced/03-stream.md @@ -23,7 +23,7 @@ CREATE STREAM [IF NOT EXISTS] stream_name [stream_options] INTO stb_name SUBTABLE(expression) AS subquery stream_options: { - TRIGGER [AT_ONCE | WINDOW_CLOSE | MAX_DELAY time] + TRIGGER [AT_ONCE | WINDOW_CLOSE | MAX_DELAY time | FORCE_WINDOW_CLOSE] WATERMARK time IGNORE EXPIRED [0|1] DELETE_MARK time @@ -52,13 +52,17 @@ window_cluse: { } ``` -subquery 支持会话窗口、状态窗口与滑动窗口。其中,会话窗口与状态窗口搭配超级表时必须与 partition by tbname 一起使用。 +subquery 支持会话窗口、状态窗口、时间窗口、事件窗口与计数窗口。其中,状态窗口、事件窗口与计数窗口搭配超级表时必须与 partition by tbname 一起使用。 1. 其中,SESSION 是会话窗口,tol_val 是时间间隔的最大范围。在 tol_val 时间间隔范围内的数据都属于同一个窗口,如果连续的两条数据的时间间隔超过 tol_val,则自动开启下一个窗口。 -2. EVENT_WINDOW 是事件窗口,根据开始条件和结束条件来划定窗口。当 start_trigger_condition 满足时则窗口开始,直到 end_trigger_condition 满足时窗口关闭。 start_trigger_condition 和 end_trigger_condition 可以是任意 TDengine 支持的条件表达式,且可以包含不同的列。 +2. STATE_WINDOW 是状态窗口,col 用来标识状态量,相同的状态量数值则归属于同一个状态窗口,col 数值改变后则当前窗口结束,自动开启下一个窗口。 -3. COUNT_WINDOW 是计数窗口,按固定的数据行数来划分窗口。 count_val 是常量,是正整数,必须大于等于 2,小于 2147483648。 count_val 表示每个 COUNT_WINDOW 包含的最大数据行数,总数据行数不能整除 count_val 时,最后一个窗口的行数会小于 count_val 。 sliding_val 是常量,表示窗口滑动的数量,类似于 INTERVAL 的 SLIDING 。 +3. INTERVAL 是时间窗口,又可分为滑动时间窗口和翻转时间窗口。INTERVAL 子句用于指定窗口相等时间周期,SLIDING 字句用于指定窗口向前滑动的时间。当 interval_val 与 sliding_val 相等的时候,时间窗口即为翻转时间窗口,否则为滑动时间窗口,注意:sliding_val 必须小于等于 interval_val。 + +4. EVENT_WINDOW 是事件窗口,根据开始条件和结束条件来划定窗口。当 start_trigger_condition 满足时则窗口开始,直到 end_trigger_condition 满足时窗口关闭。 start_trigger_condition 和 end_trigger_condition 可以是任意 TDengine 支持的条件表达式,且可以包含不同的列。 + +5. COUNT_WINDOW 是计数窗口,按固定的数据行数来划分窗口。 count_val 是常量,是正整数,必须大于等于 2,小于 2147483648。 count_val 表示每个 COUNT_WINDOW 包含的最大数据行数,总数据行数不能整除 count_val 时,最后一个窗口的行数会小于 count_val 。 sliding_val 是常量,表示窗口滑动的数量,类似于 INTERVAL 的 SLIDING 。 窗口的定义与时序数据窗口查询中的定义完全相同,具体可参考 TDengine 窗口函数部分。 diff --git a/docs/zh/14-reference/01-components/12-tdinsight/assets/TDinsight-1-cluster-status.webp b/docs/zh/14-reference/01-components/12-tdinsight/assets/TDinsight-1-cluster-status.webp index 7f7792b2e9..1076e5fcb1 100644 Binary files a/docs/zh/14-reference/01-components/12-tdinsight/assets/TDinsight-1-cluster-status.webp and b/docs/zh/14-reference/01-components/12-tdinsight/assets/TDinsight-1-cluster-status.webp differ diff --git a/docs/zh/14-reference/01-components/12-tdinsight/index.mdx b/docs/zh/14-reference/01-components/12-tdinsight/index.mdx index 0f6ea46ffd..61aa044235 100644 --- a/docs/zh/14-reference/01-components/12-tdinsight/index.mdx +++ b/docs/zh/14-reference/01-components/12-tdinsight/index.mdx @@ -60,6 +60,7 @@ TDinsight 仪表盘旨在提供 TDengine 相关资源的使用情况和状态, - **Databases** - 数据库个数。 - **Connections** - 当前连接个数。 - **DNodes/MNodes/VGroups/VNodes**:每种资源的总数和存活数。 +- **Classified Connection Counts**:当前活跃连接数,按用户、应用和 ip 分类。 - **DNodes/MNodes/VGroups/VNodes Alive Percent**:每种资源的存活数/总数的比例,启用告警规则,并在资源存活率(1 分钟内平均健康资源比例)不足 100%时触发。 - **Measuring Points Used**:启用告警规则的测点数用量(社区版无数据,默认情况下是健康的)。 diff --git a/docs/zh/14-reference/02-tools/09-taosdump.md b/docs/zh/14-reference/02-tools/09-taosdump.md index 6a4df44f25..4286cda73a 100644 --- a/docs/zh/14-reference/02-tools/09-taosdump.md +++ b/docs/zh/14-reference/02-tools/09-taosdump.md @@ -9,11 +9,7 @@ taosdump 是为开源用户提供的 TDengine 数据备份/恢复工具,备份 ## 安装 -taosdump 提供两种安装方式: - -- taosdump 是 TDengine 安装包中默认安装组件,安装 TDengine 后即可使用,可参考[TDengine 安装](../../../get-started/) - -- 单独编译 taos-tools 并安装, 参考 [taos-tools](https://github.com/taosdata/taos-tools) 仓库。 +taosdump 是 TDengine 安装包中默认安装组件,安装 TDengine 后即可使用,可参考 [TDengine 安装](../../../get-started/) ## 常用使用场景 diff --git a/docs/zh/14-reference/02-tools/10-taosbenchmark.md b/docs/zh/14-reference/02-tools/10-taosbenchmark.md index 99ba8bdbff..78c82bb905 100644 --- a/docs/zh/14-reference/02-tools/10-taosbenchmark.md +++ b/docs/zh/14-reference/02-tools/10-taosbenchmark.md @@ -8,11 +8,7 @@ taosBenchmark 是 TDengine 产品性能基准测试工具,提供对 TDengine ## 安装 -taosBenchmark 提供两种安装方式: - -- taosBenchmark 是 TDengine 安装包中默认安装组件,安装 TDengine 后即可使用,参考 [TDengine 安装](../../../get-started/) - -- 单独编译 taos-tools 并安装, 参考 [taos-tools](https://github.com/taosdata/taos-tools) 仓库。 +taosBenchmark 是 TDengine 安装包中默认安装组件,安装 TDengine 后即可使用,参考 [TDengine 安装](../../../get-started/) ## 运行 @@ -62,7 +58,7 @@ taosBenchmark -f insert.json ```json -{{#include /taos-tools/example/insert.json}} +{{#include /TDengine/tools/taos-tools/example/insert.json}} ``` @@ -73,7 +69,7 @@ taosBenchmark -f query.json ```json -{{#include /taos-tools/example/query.json}} +{{#include /TDengine/tools/taos-tools/example/query.json}} ``` @@ -84,12 +80,12 @@ taosBenchmark -f tmq.json ```json -{{#include /taos-tools/example/tmq.json}} +{{#include /TDengine/tools/taos-tools/example/tmq.json}} ``` -查看更多 json 配置文件示例可 [点击这里](https://github.com/taosdata/taos-tools/tree/main/example) +查看更多 json 配置文件示例可 [点击这里](https://github.com/taosdata/TDengine/tree/main/tools/taos-tools/example) ## 命令行参数详解 | 命令行参数 | 功能说明 | diff --git a/docs/zh/14-reference/03-taos-sql/03-table.md b/docs/zh/14-reference/03-taos-sql/03-table.md index 5c49d79823..df4248c813 100644 --- a/docs/zh/14-reference/03-taos-sql/03-table.md +++ b/docs/zh/14-reference/03-taos-sql/03-table.md @@ -44,7 +44,7 @@ table_option: { 1. 表(列)名命名规则参见[名称命名规则](./19-limit.md#名称命名规则)。 2. 表名最大长度为 192。 3. 表的第一个字段必须是 TIMESTAMP,并且系统自动将其设为主键。 -4. 除时间戳主键列之外,还可以通过 PRIMARY KEY 关键字指定第二列为额外的主键列。被指定为主键列的第二列必须为整型或字符串类型(VARCHAR)。 +4. 除时间戳主键列之外,还可以通过 PRIMARY KEY 关键字指定第二列为额外的主键列,该列与时间戳列共同组成复合主键。当设置了复合主键时,两条记录的时间戳列与 PRIMARY KEY 列都相同,才会被认为是重复记录,数据库只保留最新的一条;否则视为两条记录,全部保留。注意:被指定为主键列的第二列必须为整型或字符串类型(VARCHAR)。 5. 表的每行长度不能超过 48KB(从 3.0.5.0 版本开始为 64KB);(注意:每个 VARCHAR/NCHAR/GEOMETRY 类型的列还会额外占用 2 个字节的存储位置)。 6. 使用数据类型 VARCHAR/NCHAR/GEOMETRY,需指定其最长的字节数,如 VARCHAR(20),表示 20 字节。 7. 关于 `ENCODE` 和 `COMPRESS` 的使用,请参考[按列压缩](../compress) diff --git a/docs/zh/14-reference/03-taos-sql/04-stable.md b/docs/zh/14-reference/03-taos-sql/04-stable.md index 97e2b95089..7a8b453546 100644 --- a/docs/zh/14-reference/03-taos-sql/04-stable.md +++ b/docs/zh/14-reference/03-taos-sql/04-stable.md @@ -26,7 +26,7 @@ table_option: { **使用说明** 1. 超级表中列的最大个数为 4096,需要注意,这里的 4096 是包含 TAG 列在内的,最小个数为 3,包含一个时间戳主键、一个 TAG 列和一个数据列。 -2. 除时间戳主键列之外,还可以通过 PRIMARY KEY 关键字指定第二列为额外的主键列。被指定为主键列的第二列必须为整型或字符串类型(varchar) +2. 除时间戳主键列之外,还可以通过 PRIMARY KEY 关键字指定第二列为额外的主键列,该列与时间戳列共同组成复合主键。当设置了复合主键时,两条记录的时间戳列与 PRIMARY KEY 列都相同,才会被认为是重复记录,数据库只保留最新的一条;否则视为两条记录,全部保留。注意:被指定为主键列的第二列必须为整型或字符串类型(varchar)。 3. TAGS语法指定超级表的标签列,标签列需要遵循以下约定: - TAGS 中的 TIMESTAMP 列写入数据时需要提供给定值,而暂不支持四则运算,例如 NOW + 10s 这类表达式。 - TAGS 列名不能与其他列名相同。 diff --git a/docs/zh/14-reference/03-taos-sql/14-stream.md b/docs/zh/14-reference/03-taos-sql/14-stream.md index 6cb983f4b2..5e5a82b95c 100644 --- a/docs/zh/14-reference/03-taos-sql/14-stream.md +++ b/docs/zh/14-reference/03-taos-sql/14-stream.md @@ -10,7 +10,7 @@ description: 流式计算的相关 SQL 的详细语法 ```sql CREATE STREAM [IF NOT EXISTS] stream_name [stream_options] INTO stb_name[(field1_name, field2_name [PRIMARY KEY], ...)] [TAGS (create_definition [, create_definition] ...)] SUBTABLE(expression) AS subquery stream_options: { - TRIGGER [AT_ONCE | WINDOW_CLOSE | MAX_DELAY time] + TRIGGER [AT_ONCE | WINDOW_CLOSE | MAX_DELAY time | FORCE_WINDOW_CLOSE] WATERMARK time IGNORE EXPIRED [0|1] DELETE_MARK time @@ -56,6 +56,10 @@ window_clause: { 其中,SESSION 是会话窗口,tol_val 是时间间隔的最大范围。在 tol_val 时间间隔范围内的数据都属于同一个窗口,如果连续的两条数据的时间超过 tol_val,则自动开启下一个窗口。该窗口的 _wend 等于最后一条数据的时间加上 tol_val。 +STATE_WINDOW 是状态窗口,col 用来标识状态量,相同的状态量数值则归属于同一个状态窗口,col 数值改变后则当前窗口结束,自动开启下一个窗口。 + +INTERVAL 是时间窗口,又可分为滑动时间窗口和翻转时间窗口。INTERVAL 子句用于指定窗口相等时间周期,SLIDING 字句用于指定窗口向前滑动的时间。当 interval_val 与 sliding_val 相等的时候,时间窗口即为翻转时间窗口,否则为滑动时间窗口,注意:sliding_val 必须小于等于 interval_val。 + EVENT_WINDOW 是事件窗口,根据开始条件和结束条件来划定窗口。当 start_trigger_condition 满足时则窗口开始,直到 end_trigger_condition 满足时窗口关闭。 start_trigger_condition 和 end_trigger_condition 可以是任意 TDengine 支持的条件表达式,且可以包含不同的列。 COUNT_WINDOW 是计数窗口,按固定的数据行数来划分窗口。 count_val 是常量,是正整数,必须大于等于2,小于2147483648。 count_val 表示每个 COUNT_WINDOW 包含的最大数据行数,总数据行数不能整除 count_val 时,最后一个窗口的行数会小于 count_val 。 sliding_val 是常量,表示窗口滑动的数量,类似于 INTERVAL 的 SLIDING 。 diff --git a/docs/zh/28-releases/02-tools.md b/docs/zh/28-releases/02-tools.md index ba58ed9600..0f17407534 100644 --- a/docs/zh/28-releases/02-tools.md +++ b/docs/zh/28-releases/02-tools.md @@ -4,9 +4,9 @@ title: taosTools 发布历史及下载链接 description: taosTools 的发布历史、Release Notes 和下载链接 --- -taosTools 各版本安装包下载链接如下: +从 3.0.6.0 开始,taosTools 集成到 TDengine 的安装包中,不再单独提供。taosTools(对应 TDengine 3.0.5.2及以下)各版本安装包下载链接如下: -其他历史版本安装包请访问[这里](https://www.taosdata.com/all-downloads) +2.6 的历史版本安装包请访问[这里](https://www.taosdata.com/all-downloads) import Release from "/components/ReleaseV3"; diff --git a/include/common/tglobal.h b/include/common/tglobal.h index 4e9a9bd801..bb3f0964de 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -326,7 +326,6 @@ int32_t tDeserializeSConfigArray(SDecoder *pDecoder, SArray *array); int32_t setAllConfigs(SConfig *pCfg); void printConfigNotMatch(SArray *array); -int32_t compareSConfigItemArrays(SArray *mArray, const SArray *dArray, SArray *diffArray); bool isConifgItemLazyMode(SConfigItem *item); int32_t taosUpdateTfsItemDisable(SConfig *pCfg, const char *value, void *pTfs); diff --git a/include/common/ttypes.h b/include/common/ttypes.h index c50ce7ba73..d0cddd87a9 100644 --- a/include/common/ttypes.h +++ b/include/common/ttypes.h @@ -216,55 +216,43 @@ typedef struct { } \ } while (0) -#define NUM_TO_STRING(_inputType, _input, _outputBytes, _output) \ - do { \ - switch (_inputType) { \ - case TSDB_DATA_TYPE_TINYINT: \ - snprintf(_output, (int32_t)(_outputBytes), "%d", *(int8_t *)(_input)); \ - break; \ - case TSDB_DATA_TYPE_UTINYINT: \ - snprintf(_output, (int32_t)(_outputBytes), "%d", *(uint8_t *)(_input)); \ - break; \ - case TSDB_DATA_TYPE_SMALLINT: \ - snprintf(_output, (int32_t)(_outputBytes), "%d", *(int16_t *)(_input)); \ - break; \ - case TSDB_DATA_TYPE_USMALLINT: \ - snprintf(_output, (int32_t)(_outputBytes), "%d", *(uint16_t *)(_input)); \ - break; \ - case TSDB_DATA_TYPE_TIMESTAMP: \ - case TSDB_DATA_TYPE_BIGINT: \ - snprintf(_output, (int32_t)(_outputBytes), "%" PRId64, *(int64_t *)(_input)); \ - break; \ - case TSDB_DATA_TYPE_UBIGINT: \ - snprintf(_output, (int32_t)(_outputBytes), "%" PRIu64, *(uint64_t *)(_input)); \ - break; \ - case TSDB_DATA_TYPE_FLOAT: { \ - int32_t n = snprintf(_output, (int32_t)(_outputBytes), "%f", *(float *)(_input)); \ - if (n >= (_outputBytes)) { \ - n = snprintf(_output, (int32_t)(_outputBytes), "%.7e", *(float *)(_input)); \ - if (n >= (_outputBytes)) { \ - snprintf(_output, (int32_t)(_outputBytes), "%f", *(float *)(_input)); \ - } \ - } \ - break; \ - } \ - case TSDB_DATA_TYPE_DOUBLE: { \ - int32_t n = snprintf(_output, (int32_t)(_outputBytes), "%f", *(double *)(_input)); \ - if (n >= (_outputBytes)) { \ - snprintf(_output, (int32_t)(_outputBytes), "%.15e", *(double *)(_input)); \ - if (n >= (_outputBytes)) { \ - snprintf(_output, (int32_t)(_outputBytes), "%f", *(double *)(_input)); \ - } \ - } \ - break; \ - } \ - case TSDB_DATA_TYPE_UINT: \ - snprintf(_output, (int32_t)(_outputBytes), "%u", *(uint32_t *)(_input)); \ - break; \ - default: \ - snprintf(_output, (int32_t)(_outputBytes), "%d", *(int32_t *)(_input)); \ - break; \ - } \ +#define NUM_TO_STRING(_inputType, _input, _outputBytes, _output) \ + do { \ + switch (_inputType) { \ + case TSDB_DATA_TYPE_TINYINT: \ + snprintf(_output, (int32_t)(_outputBytes), "%d", *(int8_t *)(_input)); \ + break; \ + case TSDB_DATA_TYPE_UTINYINT: \ + snprintf(_output, (int32_t)(_outputBytes), "%d", *(uint8_t *)(_input)); \ + break; \ + case TSDB_DATA_TYPE_SMALLINT: \ + snprintf(_output, (int32_t)(_outputBytes), "%d", *(int16_t *)(_input)); \ + break; \ + case TSDB_DATA_TYPE_USMALLINT: \ + snprintf(_output, (int32_t)(_outputBytes), "%d", *(uint16_t *)(_input)); \ + break; \ + case TSDB_DATA_TYPE_TIMESTAMP: \ + case TSDB_DATA_TYPE_BIGINT: \ + snprintf(_output, (int32_t)(_outputBytes), "%" PRId64, *(int64_t *)(_input)); \ + break; \ + case TSDB_DATA_TYPE_UBIGINT: \ + snprintf(_output, (int32_t)(_outputBytes), "%" PRIu64, *(uint64_t *)(_input)); \ + break; \ + case TSDB_DATA_TYPE_FLOAT: { \ + snprintf(_output, (int32_t)(_outputBytes), "%.*g", FLT_DIG, *(float *)(_input)); \ + break; \ + } \ + case TSDB_DATA_TYPE_DOUBLE: { \ + snprintf(_output, (int32_t)(_outputBytes), "%.*g", DBL_DIG, *(double *)(_input)); \ + break; \ + } \ + case TSDB_DATA_TYPE_UINT: \ + snprintf(_output, (int32_t)(_outputBytes), "%u", *(uint32_t *)(_input)); \ + break; \ + default: \ + snprintf(_output, (int32_t)(_outputBytes), "%d", *(int32_t *)(_input)); \ + break; \ + } \ } while (0) // TODO: use varchar(0) to represent NULL type diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 26482a87d4..76db5e29a4 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -82,6 +82,7 @@ typedef struct SDatabaseOptions { int32_t minRowsPerBlock; SNodeList* pKeep; int64_t keep[3]; + SValueNode* pKeepTimeOffsetNode; int32_t keepTimeOffset; int32_t pages; int32_t pagesize; diff --git a/include/os/osTimezone.h b/include/os/osTimezone.h index f770a9dba0..10aed0a964 100644 --- a/include/os/osTimezone.h +++ b/include/os/osTimezone.h @@ -35,6 +35,7 @@ time_t mktime_z(timezone_t, struct tm *); timezone_t tzalloc(char const *); void tzfree(timezone_t); void getTimezoneStr(char *tz); +void truncateTimezoneString(char *tz); #endif diff --git a/packaging/tools/mac_before_install.txt b/packaging/tools/mac_before_install.txt index 4ce2374b7f..fafee0bf51 100644 --- a/packaging/tools/mac_before_install.txt +++ b/packaging/tools/mac_before_install.txt @@ -1,9 +1,4 @@ TDengine is an open-source, cloud-native time-series database optimized for Internet of Things (IoT), Connected Cars, and Industrial IoT. With its built-in caching, stream processing, and data subscription capabilities, TDengine offers a simplified solution for time-series data processing. -• To configure TDengine, edit /etc/taos/taos.cfg -• To start service, run launchctl start com.tdengine.taosd -• To start Taos Adapter, run launchctl start com.tdengine.taosadapter -• To access TDengine from your local machine, run taos - If you're experiencing problems installing TDengine, check the file /var/log/taos/tdengine_install.log to help troubleshoot the installation. diff --git a/packaging/tools/mac_before_install_client.txt b/packaging/tools/mac_before_install_client.txt index cce8191667..506e04ca21 100644 --- a/packaging/tools/mac_before_install_client.txt +++ b/packaging/tools/mac_before_install_client.txt @@ -1,9 +1,3 @@ TDengine is an open-source, cloud-native time-series database optimized for Internet of Things (IoT), Connected Cars, and Industrial IoT. With its built-in caching, stream processing, and data subscription capabilities, TDengine offers a simplified solution for time-series data processing. -After the installation process is complete, perform the following steps to start using TDengine: -1: Open Terminal on your Mac. -2: To connect to a TDengine server using the default settings and credentials, run the taos command. -3: To connect to a TDengine server using custom settings or credentials, run taos --help for more information. -4: To connect to TDengine Cloud, follow the instructions on the Tools - TDengine CLI page in your TDengine Cloud account. - -If any issues occur during installation, check the /var/log/taos/tdengine_install.log file to troubleshoot. \ No newline at end of file +If any issues occur during installation, check the /var/log/taos/tdengine_install.log file to troubleshoot. diff --git a/packaging/tools/mac_install_summary_client.txt b/packaging/tools/mac_install_summary_client.txt index f49703c555..e70ef55e1b 100644 --- a/packaging/tools/mac_install_summary_client.txt +++ b/packaging/tools/mac_install_summary_client.txt @@ -1,4 +1,6 @@ TDengine client is installed successfully. Please open a terminal and execute the commands below: -To configure TDengine client, sudo vi /etc/taos/taos.cfg -To access TDengine command line interface, taos -h YouServerName \ No newline at end of file +1: To configure TDengine client, sudo vi /etc/taos/taos.cfg +2: To get help information to run taos, taos --help +3: To connect to a TDengine server, taos -h YourServerName +4: To connect to TDengine Cloud, follow the instructions on the Tools - TDengine CLI page in your TDengine Cloud account. diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 190a724151..27e21d9a58 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -699,13 +699,13 @@ int taos_print_row_with_size(char *str, uint32_t size, TAOS_ROW row, TAOS_FIELD case TSDB_DATA_TYPE_FLOAT: { float fv = 0; fv = GET_FLOAT_VAL(row[i]); - len += tsnprintf(str + len, size - len, "%f", fv); + len += snprintf(str + len, size - len, "%.*g", FLT_DIG, fv); } break; case TSDB_DATA_TYPE_DOUBLE: { double dv = 0; dv = GET_DOUBLE_VAL(row[i]); - len += tsnprintf(str + len, size - len, "%lf", dv); + len += snprintf(str + len, size - len, "%.*g", DBL_DIG, dv); } break; case TSDB_DATA_TYPE_VARBINARY: { diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 83b1845fd4..051e5f838a 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -713,11 +713,11 @@ static int32_t taosAddClientCfg(SConfig *pCfg) { tsNumOfRpcThreads = tsNumOfCores / 2; tsNumOfRpcThreads = TRANGE(tsNumOfRpcThreads, 2, TSDB_MAX_RPC_THREADS); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "numOfRpcThreads", tsNumOfRpcThreads, 1, 1024, CFG_SCOPE_BOTH, CFG_DYN_BOTH_LAZY, - CFG_CATEGORY_GLOBAL)); + CFG_CATEGORY_LOCAL)); tsNumOfRpcSessions = TRANGE(tsNumOfRpcSessions, 100, 100000); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "numOfRpcSessions", tsNumOfRpcSessions, 1, 100000, CFG_SCOPE_BOTH, - CFG_DYN_BOTH_LAZY, CFG_CATEGORY_GLOBAL)); + CFG_DYN_BOTH_LAZY, CFG_CATEGORY_LOCAL)); tsShareConnLimit = TRANGE(tsShareConnLimit, 1, 512); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "shareConnLimit", tsShareConnLimit, 1, 512, CFG_SCOPE_BOTH, CFG_DYN_BOTH_LAZY, @@ -734,7 +734,7 @@ static int32_t taosAddClientCfg(SConfig *pCfg) { tsNumOfTaskQueueThreads = TMAX(tsNumOfTaskQueueThreads, 16); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "numOfTaskQueueThreads", tsNumOfTaskQueueThreads, 4, 1024, CFG_SCOPE_CLIENT, - CFG_DYN_CLIENT_LAZY, CFG_CATEGORY_GLOBAL)); + CFG_DYN_CLIENT_LAZY, CFG_CATEGORY_LOCAL)); TAOS_CHECK_RETURN( cfgAddBool(pCfg, "experimental", tsExperimental, CFG_SCOPE_BOTH, CFG_DYN_BOTH_LAZY, CFG_CATEGORY_GLOBAL)); TAOS_CHECK_RETURN(cfgAddBool(pCfg, "multiResultFunctionStarReturnTags", tsMultiResultFunctionStarReturnTags, @@ -864,12 +864,12 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "numOfSnodeSharedThreads", tsNumOfSnodeStreamThreads, 2, 1024, CFG_SCOPE_SERVER, CFG_DYN_SERVER_LAZY,CFG_CATEGORY_LOCAL)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "numOfSnodeUniqueThreads", tsNumOfSnodeWriteThreads, 2, 1024, CFG_SCOPE_SERVER, CFG_DYN_SERVER_LAZY,CFG_CATEGORY_LOCAL)); - TAOS_CHECK_RETURN(cfgAddInt64(pCfg, "rpcQueueMemoryAllowed", tsQueueMemoryAllowed, TSDB_MAX_MSG_SIZE * RPC_MEMORY_USAGE_RATIO * 10L, INT64_MAX, CFG_SCOPE_SERVER, CFG_DYN_SERVER,CFG_CATEGORY_GLOBAL)); - TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "syncElectInterval", tsElectInterval, 10, 1000 * 60 * 24 * 2, CFG_SCOPE_SERVER, CFG_DYN_SERVER,CFG_CATEGORY_GLOBAL)); - TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "syncHeartbeatInterval", tsHeartbeatInterval, 10, 1000 * 60 * 24 * 2, CFG_SCOPE_SERVER, CFG_DYN_SERVER,CFG_CATEGORY_GLOBAL)); - TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "syncHeartbeatTimeout", tsHeartbeatTimeout, 10, 1000 * 60 * 24 * 2, CFG_SCOPE_SERVER, CFG_DYN_SERVER,CFG_CATEGORY_GLOBAL)); + TAOS_CHECK_RETURN(cfgAddInt64(pCfg, "rpcQueueMemoryAllowed", tsQueueMemoryAllowed, TSDB_MAX_MSG_SIZE * RPC_MEMORY_USAGE_RATIO * 10L, INT64_MAX, CFG_SCOPE_SERVER, CFG_DYN_SERVER,CFG_CATEGORY_LOCAL)); + TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "syncElectInterval", tsElectInterval, 10, 1000 * 60 * 24 * 2, CFG_SCOPE_SERVER, CFG_DYN_NONE,CFG_CATEGORY_GLOBAL)); + TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "syncHeartbeatInterval", tsHeartbeatInterval, 10, 1000 * 60 * 24 * 2, CFG_SCOPE_SERVER, CFG_DYN_NONE,CFG_CATEGORY_GLOBAL)); + TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "syncHeartbeatTimeout", tsHeartbeatTimeout, 10, 1000 * 60 * 24 * 2, CFG_SCOPE_SERVER, CFG_DYN_NONE,CFG_CATEGORY_GLOBAL)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "syncSnapReplMaxWaitN", tsSnapReplMaxWaitN, 16, (TSDB_SYNC_SNAP_BUFFER_SIZE >> 2), CFG_SCOPE_SERVER, CFG_DYN_SERVER,CFG_CATEGORY_GLOBAL)); - TAOS_CHECK_RETURN(cfgAddInt64(pCfg, "syncLogBufferMemoryAllowed", tsLogBufferMemoryAllowed, TSDB_MAX_MSG_SIZE * 10L, INT64_MAX, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER,CFG_CATEGORY_GLOBAL)); + TAOS_CHECK_RETURN(cfgAddInt64(pCfg, "syncLogBufferMemoryAllowed", tsLogBufferMemoryAllowed, TSDB_MAX_MSG_SIZE * 10L, INT64_MAX, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER,CFG_CATEGORY_LOCAL)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "arbHeartBeatIntervalSec", tsArbHeartBeatIntervalSec, 1, 60 * 24 * 2, CFG_SCOPE_SERVER, CFG_DYN_SERVER,CFG_CATEGORY_GLOBAL)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "arbCheckSyncIntervalSec", tsArbCheckSyncIntervalSec, 1, 60 * 24 * 2, CFG_SCOPE_SERVER, CFG_DYN_SERVER,CFG_CATEGORY_GLOBAL)); @@ -3193,57 +3193,6 @@ _exit: return code; } -bool compareSConfigItem(const SConfigItem *item1, const SConfigItem *item2) { - switch (item1->dtype) { - case CFG_DTYPE_BOOL: - if (item1->bval != item2->bval) return false; - break; - case CFG_DTYPE_FLOAT: - if (item1->fval != item2->fval) return false; - break; - case CFG_DTYPE_INT32: - if (item1->i32 != item2->i32) return false; - break; - case CFG_DTYPE_INT64: - if (item1->i64 != item2->i64) return false; - break; - case CFG_DTYPE_STRING: - case CFG_DTYPE_DIR: - case CFG_DTYPE_LOCALE: - case CFG_DTYPE_CHARSET: - case CFG_DTYPE_TIMEZONE: - if (strcmp(item1->str, item2->str) != 0) return false; - break; - default: - return false; - } - return true; -} - -int32_t compareSConfigItemArrays(SArray *mArray, const SArray *dArray, SArray *diffArray) { - int32_t code = 0; - int32_t msz = taosArrayGetSize(mArray); - int32_t dsz = taosArrayGetSize(dArray); - - if (msz != dsz) { - return TSDB_CODE_FAILED; - } - - for (int i = 0; i < msz; i++) { - SConfigItem *mItem = (SConfigItem *)taosArrayGet(mArray, i); - SConfigItem *dItem = (SConfigItem *)taosArrayGet(dArray, i); - if (!compareSConfigItem(mItem, dItem)) { - code = TSDB_CODE_FAILED; - if (taosArrayPush(diffArray, mItem) == NULL) { - code = terrno; - return code; - } - } - } - - return code; -} - void printConfigNotMatch(SArray *array) { uError( "The global configuration parameters in the configuration file do not match those in the cluster. Please " diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c index 4400d7fac0..00fa2a8c95 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c @@ -711,6 +711,21 @@ static void vmCloseVnodes(SVnodeMgmt *pMgmt) { pMgmt->state.openVnodes = 0; dInfo("close %d vnodes with %d threads", numOfVnodes, threadNum); + int64_t st = taosGetTimestampMs(); + dInfo("notify all streams closed in all %d vnodes, ts:%" PRId64, numOfVnodes, st); + if (ppVnodes != NULL) { + for (int32_t i = 0; i < numOfVnodes; ++i) { + if (ppVnodes[i] != NULL) { + if (ppVnodes[i]->pImpl != NULL) { + tqNotifyClose(ppVnodes[i]->pImpl->pTq); + } + } + } + } + + int64_t et = taosGetTimestampMs(); + dInfo("notify close stream completed in %d vnodes, elapsed time: %" PRId64 "ms", numOfVnodes, et - st); + for (int32_t t = 0; t < threadNum; ++t) { SVnodeThread *pThread = &threads[t]; if (pThread->vnodeNum == 0) continue; @@ -718,6 +733,7 @@ static void vmCloseVnodes(SVnodeMgmt *pMgmt) { TdThreadAttr thAttr; (void)taosThreadAttrInit(&thAttr); (void)taosThreadAttrSetDetachState(&thAttr, PTHREAD_CREATE_JOINABLE); + if (taosThreadCreate(&pThread->thread, &thAttr, vmCloseVnodeInThread, pThread) != 0) { dError("thread:%d, failed to create thread to close vnode since %s", pThread->threadIndex, strerror(errno)); } diff --git a/source/dnode/mnode/impl/src/mndConfig.c b/source/dnode/mnode/impl/src/mndConfig.c index 0d4265f8e7..099fff7aee 100644 --- a/source/dnode/mnode/impl/src/mndConfig.c +++ b/source/dnode/mnode/impl/src/mndConfig.c @@ -40,6 +40,7 @@ static int32_t initConfigArrayFromSdb(SMnode *pMnode, SArray *array); static int32_t mndTryRebuildConfigSdb(SRpcMsg *pReq); static void cfgArrayCleanUp(SArray *array); static void cfgObjArrayCleanUp(SArray *array); +int32_t compareSConfigItemArrays(SMnode *pMnode, const SArray *dArray, SArray *diffArray); static int32_t mndConfigUpdateTrans(SMnode *pMnode, const char *name, char *pValue, ECfgDataType dtype, int32_t tsmmConfigVersion); @@ -250,7 +251,12 @@ static int32_t mndProcessConfigReq(SRpcMsg *pReq) { configRsp.cver = vObj->i32; if (configRsp.forceReadConfig) { // compare config array from configReq with current config array - if (compareSConfigItemArrays(taosGetGlobalCfg(tsCfg), configReq.array, array)) { + code = compareSConfigItemArrays(pMnode, configReq.array, array); + if (code != TSDB_CODE_SUCCESS) { + mError("failed to compare config array, since %s", tstrerror(code)); + goto _OVER; + } + if (taosArrayGetSize(array) > 0) { configRsp.array = array; } else { configRsp.isConifgVerified = 1; @@ -293,7 +299,7 @@ _OVER: } sdbRelease(pMnode->pSdb, vObj); cfgArrayCleanUp(array); - return TSDB_CODE_SUCCESS; + return code; } int32_t mndInitWriteCfg(SMnode *pMnode) { @@ -921,4 +927,85 @@ _OVER: tFreeSShowVariablesRsp(&rsp); TAOS_RETURN(code); +} + +int32_t compareSConfigItem(const SConfigObj *item1, SConfigItem *item2, bool *compare) { + switch (item1->dtype) { + case CFG_DTYPE_BOOL: + if (item1->bval != item2->bval) { + item2->bval = item1->bval; + *compare = false; + } + break; + case CFG_DTYPE_FLOAT: + if (item1->fval != item2->fval) { + item2->fval = item1->fval; + *compare = false; + } + break; + case CFG_DTYPE_INT32: + if (item1->i32 != item2->i32) { + item2->i32 = item1->i32; + *compare = false; + } + break; + case CFG_DTYPE_INT64: + if (item1->i64 != item2->i64) { + item2->i64 = item1->i64; + *compare = false; + } + break; + case CFG_DTYPE_STRING: + case CFG_DTYPE_DIR: + case CFG_DTYPE_LOCALE: + case CFG_DTYPE_CHARSET: + case CFG_DTYPE_TIMEZONE: + if (strcmp(item1->str, item2->str) != 0) { + taosMemoryFree(item2->str); + item2->str = taosStrdup(item1->str); + if (item2->str == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } + *compare = false; + } + break; + default: + *compare = false; + return TSDB_CODE_INVALID_CFG; + } + *compare = true; + return TSDB_CODE_SUCCESS; +} + +int32_t compareSConfigItemArrays(SMnode *pMnode, const SArray *dArray, SArray *diffArray) { + int32_t code = 0; + int32_t dsz = taosArrayGetSize(dArray); + bool compare = false; + + for (int i = 0; i < dsz; i++) { + SConfigItem *dItem = (SConfigItem *)taosArrayGet(dArray, i); + SConfigObj *mObj = sdbAcquire(pMnode->pSdb, SDB_CFG, dItem->name); + if (mObj == NULL) { + code = terrno; + mError("failed to acquire config:%s from sdb, since %s", dItem->name, tstrerror(code)); + return code; + } + + code = compareSConfigItem(mObj, dItem, &compare); + if (code != TSDB_CODE_SUCCESS) { + sdbRelease(pMnode->pSdb, mObj); + return code; + } + + if (!compare) { + if (taosArrayPush(diffArray, dItem) == NULL) { + sdbRelease(pMnode->pSdb, mObj); + return terrno; + } + } + + sdbRelease(pMnode->pSdb, mObj); + } + + return code; } \ No newline at end of file diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index 43abc842f4..ebf7f86ea6 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -1708,9 +1708,6 @@ static int32_t mndDropDb(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb) { TAOS_CHECK_GOTO(mndSetDropDbPrepareLogs(pMnode, pTrans, pDb), NULL, _OVER); TAOS_CHECK_GOTO(mndSetDropDbCommitLogs(pMnode, pTrans, pDb), NULL, _OVER); - /*if (mndDropOffsetByDB(pMnode, pTrans, pDb) != 0) goto _OVER;*/ - /*if (mndDropSubByDB(pMnode, pTrans, pDb) != 0) goto _OVER;*/ - /*if (mndDropTopicByDB(pMnode, pTrans, pDb) != 0) goto _OVER;*/ TAOS_CHECK_GOTO(mndDropStreamByDb(pMnode, pTrans, pDb), NULL, _OVER); #ifdef TD_ENTERPRISE TAOS_CHECK_GOTO(mndDropViewByDb(pMnode, pTrans, pDb), NULL, _OVER); diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 21516e6848..65de7be704 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -2755,6 +2755,7 @@ int32_t mndProcessConsensusInTmr(SRpcMsg *pMsg) { code = mndGetStreamObj(pMnode, pInfo->streamId, &pStream); if (pStream == NULL || code != 0) { // stream has been dropped already mDebug("stream:0x%" PRIx64 " dropped already, continue", pInfo->streamId); + void *p = taosArrayPush(pStreamList, &pInfo->streamId); taosArrayDestroy(pList); continue; } diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 5b19d4cd87..1c0f73249c 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -174,7 +174,10 @@ void tqNotifyClose(STQ* pTq) { if (pTq == NULL) { return; } - streamMetaNotifyClose(pTq->pStreamMeta); + + if (pTq->pStreamMeta != NULL) { + streamMetaNotifyClose(pTq->pStreamMeta); + } } void tqPushEmptyDataRsp(STqHandle* pHandle, int32_t vgId) { diff --git a/source/dnode/vnode/src/tqCommon/tqCommon.c b/source/dnode/vnode/src/tqCommon/tqCommon.c index 1880156f61..a73d7f849c 100644 --- a/source/dnode/vnode/src/tqCommon/tqCommon.c +++ b/source/dnode/vnode/src/tqCommon/tqCommon.c @@ -968,9 +968,9 @@ int32_t tqStreamTaskProcessTaskResetReq(SStreamMeta* pMeta, char* pMsg) { tqDebug("s-task:%s receive task-reset msg from mnode, reset status and ready for data processing", pTask->id.idStr); streamMutexLock(&pTask->lock); - streamTaskClearCheckInfo(pTask, true); streamTaskSetFailedCheckpointId(pTask, pReq->chkptId); + streamTaskClearCheckInfo(pTask, true); // clear flag set during do checkpoint, and open inputQ for all upstream tasks SStreamTaskState pState = streamTaskGetStatus(pTask); diff --git a/source/dnode/vnode/src/tsdb/tsdbRead2.c b/source/dnode/vnode/src/tsdb/tsdbRead2.c index 4ca140c03e..57041e851a 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead2.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead2.c @@ -978,6 +978,10 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S if (pRecord->firstKey.key.ts > w.ekey || pRecord->lastKey.key.ts < w.skey) { continue; } + // The data block's time range must intersect with the query time range + if (pRecord->firstKey.key.ts > pReader->info.window.ekey || pRecord->lastKey.key.ts < pReader->info.window.skey) { + continue; + } if (asc) { if (pkCompEx(&pRecord->lastKey.key, &pScanInfo->lastProcKey) <= 0) { diff --git a/source/libs/catalog/inc/catalogInt.h b/source/libs/catalog/inc/catalogInt.h index 359bdc2b45..dd553ac301 100644 --- a/source/libs/catalog/inc/catalogInt.h +++ b/source/libs/catalog/inc/catalogInt.h @@ -1119,7 +1119,7 @@ void ctgFreeBatch(SCtgBatch* pBatch); void ctgFreeBatchs(SHashObj* pBatchs); int32_t ctgCloneVgInfo(SDBVgInfo* src, SDBVgInfo** dst); int32_t ctgCloneMetaOutput(STableMetaOutput* output, STableMetaOutput** pOutput); -int32_t ctgGenerateVgList(SCatalog* pCtg, SHashObj* vgHash, SArray** pList); +int32_t ctgGenerateVgList(SCatalog* pCtg, SHashObj* vgHash, SArray** pList, const char* dbFName); void ctgFreeJob(void* job); void ctgFreeHandleImpl(SCatalog* pCtg); int32_t ctgGetVgInfoFromHashValue(SCatalog* pCtg, SEpSet* pMgmtEps, SDBVgInfo* dbInfo, const SName* pTableName, @@ -1159,7 +1159,8 @@ int32_t ctgGetTbHashVgroup(SCatalog* pCtg, SRequestConnInfo* pConn, const SName* int32_t ctgGetFetchName(SArray* pNames, SCtgFetch* pFetch, SName** ppName); int32_t ctgdGetOneHandle(SCatalog** pHandle); int ctgVgInfoComp(const void* lp, const void* rp); -int32_t ctgMakeVgArray(SDBVgInfo* dbInfo); +int32_t ctgMakeVgArray(SDBVgInfo* dbInfo, const char* dbName, bool isFullName); +int32_t ctgMakeVgArraySortBy(SDBVgInfo* dbInfo, __compar_fn_t sort_func); int32_t ctgChkSetAuthRes(SCatalog* pCtg, SCtgAuthReq* req, SCtgAuthRsp* res); int32_t ctgReadDBCfgFromCache(SCatalog* pCtg, const char* dbFName, SDbCfgInfo* pDbCfg); diff --git a/source/libs/catalog/src/catalog.c b/source/libs/catalog/src/catalog.c index 2e16b0968a..0355babbf0 100644 --- a/source/libs/catalog/src/catalog.c +++ b/source/libs/catalog/src/catalog.c @@ -505,7 +505,7 @@ int32_t ctgGetTbDistVgInfo(SCatalog* pCtg, SRequestConnInfo* pConn, SName* pTabl } if (tbMeta->tableType == TSDB_SUPER_TABLE) { - CTG_ERR_JRET(ctgGenerateVgList(pCtg, vgHash, pVgList)); + CTG_ERR_JRET(ctgGenerateVgList(pCtg, vgHash, pVgList, db)); } else { // USE HASH METHOD INSTEAD OF VGID IN TBMETA ctgError("invalid method to get none stb vgInfo, tbType:%d", tbMeta->tableType); @@ -1029,7 +1029,7 @@ int32_t catalogGetDBVgList(SCatalog* pCtg, SRequestConnInfo* pConn, const char* vgHash = vgInfo->vgHash; } - CTG_ERR_JRET(ctgGenerateVgList(pCtg, vgHash, &vgList)); + CTG_ERR_JRET(ctgGenerateVgList(pCtg, vgHash, &vgList, dbFName)); *vgroupList = vgList; vgList = NULL; diff --git a/source/libs/catalog/src/ctgAsync.c b/source/libs/catalog/src/ctgAsync.c index 18532e7ad7..917d9feed6 100644 --- a/source/libs/catalog/src/ctgAsync.c +++ b/source/libs/catalog/src/ctgAsync.c @@ -1970,7 +1970,7 @@ static int32_t ctgHandleGetTbNamesRsp(SCtgTaskReq* tReq, int32_t reqType, const switch (reqType) { case TDMT_MND_USE_DB: { SUseDbOutput* pOut = (SUseDbOutput*)pMsgCtx->out; - CTG_ERR_RET(ctgMakeVgArray(pOut->dbVgroup)); + CTG_ERR_RET(ctgMakeVgArray(pOut->dbVgroup, pName->dbname, false)); SArray* pVgArray = NULL; TSWAP(pVgArray, pOut->dbVgroup->vgArray); int32_t vgSize = taosArrayGetSize(pVgArray); @@ -2142,7 +2142,7 @@ int32_t ctgHandleGetDbVgRsp(SCtgTaskReq* tReq, int32_t reqType, const SDataBuf* SUseDbOutput* pOut = (SUseDbOutput*)pTask->msgCtx.out; SDBVgInfo* pDb = NULL; - CTG_ERR_JRET(ctgGenerateVgList(pCtg, pOut->dbVgroup->vgHash, (SArray**)&pTask->res)); + CTG_ERR_JRET(ctgGenerateVgList(pCtg, pOut->dbVgroup->vgHash, (SArray**)&pTask->res, ctx->dbFName)); CTG_ERR_JRET(cloneDbVgInfo(pOut->dbVgroup, &pDb)); CTG_ERR_JRET(ctgUpdateVgroupEnqueue(pCtg, ctx->dbFName, pOut->dbId, pDb, false)); @@ -3175,7 +3175,7 @@ int32_t ctgLaunchGetDbVgTask(SCtgTask* pTask) { CTG_ERR_JRET(ctgBuildUseDbOutput((SUseDbOutput**)&pMsgCtx->out, dbCache->vgCache.vgInfo)); } - CTG_ERR_JRET(ctgGenerateVgList(pCtg, dbCache->vgCache.vgInfo->vgHash, (SArray**)&pTask->res)); + CTG_ERR_JRET(ctgGenerateVgList(pCtg, dbCache->vgCache.vgInfo->vgHash, (SArray**)&pTask->res, pCtx->dbFName)); ctgReleaseVgInfoToCache(pCtg, dbCache); dbCache = NULL; diff --git a/source/libs/catalog/src/ctgCache.c b/source/libs/catalog/src/ctgCache.c index ef5da66bfe..c05f4704aa 100644 --- a/source/libs/catalog/src/ctgCache.c +++ b/source/libs/catalog/src/ctgCache.c @@ -1116,7 +1116,7 @@ int32_t ctgUpdateVgroupEnqueue(SCatalog *pCtg, const char *dbFName, int64_t dbId dbFName = p + 1; } - code = ctgMakeVgArray(dbInfo); + code = ctgMakeVgArray(dbInfo, dbFName, false); if (code) { taosMemoryFree(op); taosMemoryFree(msg); @@ -2082,7 +2082,7 @@ void ctgFreeAllHandles(void) { taosHashClear(gCtgMgmt.pCluster); } -int32_t ctgVgInfoIdComp(void const *lp, void const *rp) { +int32_t ctgVgInfoIdCompId(void const *lp, void const *rp) { int32_t *key = (int32_t *)lp; SVgroupInfo *pVg = (SVgroupInfo *)rp; @@ -2695,7 +2695,7 @@ int32_t ctgOpUpdateEpset(SCtgCacheOperation *operation) { goto _return; } - SVgroupInfo *pInfo2 = taosArraySearch(vgInfo->vgArray, &msg->vgId, ctgVgInfoIdComp, TD_EQ); + SVgroupInfo *pInfo2 = taosArraySearch(vgInfo->vgArray, &msg->vgId, ctgVgInfoIdCompId, TD_EQ); if (NULL == pInfo2) { ctgDebug("no vgroup %d in db %s vgArray, ignore epset update", msg->vgId, msg->dbFName); goto _return; diff --git a/source/libs/catalog/src/ctgUtil.c b/source/libs/catalog/src/ctgUtil.c index 5ab19c4419..0ade1be0d6 100644 --- a/source/libs/catalog/src/ctgUtil.c +++ b/source/libs/catalog/src/ctgUtil.c @@ -1147,12 +1147,28 @@ int32_t ctgGetHashFunction(int8_t hashMethod, tableNameHashFp* fp) { return TSDB_CODE_SUCCESS; } -int32_t ctgGenerateVgList(SCatalog* pCtg, SHashObj* vgHash, SArray** pList) { +int32_t ctgVgInfoIdComp(void const *lp, void const *rp) { + SVgroupInfo* pVg1 = (SVgroupInfo*)lp; + SVgroupInfo* pVg2 = (SVgroupInfo*)rp; + + if (pVg1->vgId < pVg2->vgId) { + return -1; + } else if (pVg1->vgId > pVg2->vgId) { + return 1; + } + + return 0; +} + +int32_t ctgGenerateVgList(SCatalog* pCtg, SHashObj* vgHash, SArray** pList, const char* dbFName) { SHashObj* vgroupHash = NULL; SVgroupInfo* vgInfo = NULL; SArray* vgList = NULL; int32_t code = 0; int32_t vgNum = taosHashGetSize(vgHash); + SName name = {0}; + code = tNameFromString(&name, dbFName, T_NAME_ACCT | T_NAME_DB); + CTG_ERR_RET(code); vgList = taosArrayInit(vgNum, sizeof(SVgroupInfo)); if (NULL == vgList) { @@ -1173,7 +1189,10 @@ int32_t ctgGenerateVgList(SCatalog* pCtg, SHashObj* vgHash, SArray** pList) { pIter = taosHashIterate(vgHash, pIter); } - taosArraySort(vgList, ctgVgInfoComp); + if (IS_SYS_DBNAME(name.dbname)) + taosArraySort(vgList, ctgVgInfoIdComp); + else + taosArraySort(vgList, ctgVgInfoComp); *pList = vgList; @@ -1218,7 +1237,7 @@ int32_t ctgHashValueComp(void const* lp, void const* rp) { int32_t ctgGetVgInfoFromHashValue(SCatalog* pCtg, SEpSet* pMgmtEps, SDBVgInfo* dbInfo, const SName* pTableName, SVgroupInfo* pVgroup) { int32_t code = 0; - CTG_ERR_RET(ctgMakeVgArray(dbInfo)); + CTG_ERR_RET(ctgMakeVgArray(dbInfo, pTableName->dbname, false)); int32_t vgNum = taosArrayGetSize(dbInfo->vgArray); char db[TSDB_DB_FNAME_LEN] = {0}; @@ -1288,7 +1307,7 @@ int32_t ctgGetVgInfosFromHashValue(SCatalog* pCtg, SEpSet* pMgmgEpSet, SCtgTaskR SMetaRes res = {0}; SVgroupInfo* vgInfo = NULL; - CTG_ERR_RET(ctgMakeVgArray(dbInfo)); + CTG_ERR_RET(ctgMakeVgArray(dbInfo, dbFName, true)); int32_t tbNum = taosArrayGetSize(pNames); @@ -1450,7 +1469,7 @@ int32_t ctgGetVgInfosFromHashValue(SCatalog* pCtg, SEpSet* pMgmgEpSet, SCtgTaskR int32_t ctgGetVgIdsFromHashValue(SCatalog* pCtg, SDBVgInfo* dbInfo, char* dbFName, const char* pTbs[], int32_t tbNum, int32_t* vgId) { int32_t code = 0; - CTG_ERR_RET(ctgMakeVgArray(dbInfo)); + CTG_ERR_RET(ctgMakeVgArray(dbInfo, dbFName, true)); int32_t vgNum = taosArrayGetSize(dbInfo->vgArray); if (vgNum <= 0) { @@ -1563,7 +1582,22 @@ int32_t ctgTSMAVersionSortCompare(const void* key1, const void* key2) { } } -int32_t ctgMakeVgArray(SDBVgInfo* dbInfo) { +int32_t ctgMakeVgArray(SDBVgInfo* dbInfo, const char* dbName, bool isFullName) { + __compar_fn_t sortFunc = ctgVgInfoComp; + if (dbName) { + const char* realDbName = dbName; + SName name = {0}; + if (isFullName) { + int32_t code = tNameFromString(&name, dbName, T_NAME_ACCT | T_NAME_DB); + CTG_ERR_RET(code); + realDbName = name.dbname; + } + if (IS_SYS_DBNAME(realDbName)) sortFunc = ctgVgInfoIdComp; + } + return ctgMakeVgArraySortBy(dbInfo, sortFunc); +} + +int32_t ctgMakeVgArraySortBy(SDBVgInfo* dbInfo, __compar_fn_t sort_func) { if (NULL == dbInfo) { return TSDB_CODE_SUCCESS; } @@ -1585,14 +1619,14 @@ int32_t ctgMakeVgArray(SDBVgInfo* dbInfo) { pIter = taosHashIterate(dbInfo->vgHash, pIter); } - taosArraySort(dbInfo->vgArray, ctgVgInfoComp); + taosArraySort(dbInfo->vgArray, sort_func); } return TSDB_CODE_SUCCESS; } int32_t ctgCloneVgInfo(SDBVgInfo* src, SDBVgInfo** dst) { - CTG_ERR_RET(ctgMakeVgArray(src)); + CTG_ERR_RET(ctgMakeVgArray(src, NULL, false)); *dst = taosMemoryMalloc(sizeof(SDBVgInfo)); if (NULL == *dst) { diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index 3966315c30..e0a917ace9 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -434,7 +434,7 @@ static int32_t setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbName, "PRECISION '%s' REPLICA %d " "WAL_LEVEL %d VGROUPS %d SINGLE_STABLE %d TABLE_PREFIX %d TABLE_SUFFIX %d TSDB_PAGESIZE %d " "WAL_RETENTION_PERIOD %d WAL_RETENTION_SIZE %" PRId64 - " KEEP_TIME_OFFSET %dh ENCRYPT_ALGORITHM '%s' S3_CHUNKPAGES %d S3_KEEPLOCAL %dm S3_COMPACT %d " + " KEEP_TIME_OFFSET %d ENCRYPT_ALGORITHM '%s' S3_CHUNKPAGES %d S3_KEEPLOCAL %dm S3_COMPACT %d " "COMPACT_INTERVAL %s COMPACT_TIME_RANGE %s,%s COMPACT_TIME_OFFSET %"PRIi8 "h", dbName, pCfg->buffer, pCfg->cacheSize, cacheModelStr(pCfg->cacheLast), pCfg->compression, durationStr, pCfg->walFsyncPeriod, pCfg->maxRows, pCfg->minRows, pCfg->sstTrigger, keep0Str, keep1Str, keep2Str, diff --git a/source/libs/function/src/tudf.c b/source/libs/function/src/tudf.c index b057194cdb..3ee35b921d 100644 --- a/source/libs/function/src/tudf.c +++ b/source/libs/function/src/tudf.c @@ -2219,7 +2219,7 @@ int32_t callUdf(UdfcFuncHandle handle, int8_t callType, SSDataBlock *input, SUdf break; } } - }; + } taosMemoryFree(task); return code; } diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index f178b42988..ccc4d97a14 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -1176,6 +1176,7 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode((SNode*)pOptions->pCompactIntervalNode); nodesDestroyList(pOptions->pCompactTimeRangeList); nodesDestroyNode((SNode*)pOptions->pCompactTimeOffsetNode); + nodesDestroyNode((SNode*)pOptions->pKeepTimeOffsetNode); break; } case QUERY_NODE_TABLE_OPTIONS: { diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 9642eb7f5b..56b9afad9b 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -296,6 +296,7 @@ db_options(A) ::= db_options(B) S3_KEEPLOCAL NK_INTEGER(C). db_options(A) ::= db_options(B) S3_KEEPLOCAL NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_S3_KEEPLOCAL, &C); } db_options(A) ::= db_options(B) S3_COMPACT NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_S3_COMPACT, &C); } db_options(A) ::= db_options(B) KEEP_TIME_OFFSET NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_KEEP_TIME_OFFSET, &C); } +db_options(A) ::= db_options(B) KEEP_TIME_OFFSET NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_KEEP_TIME_OFFSET, &C); } db_options(A) ::= db_options(B) ENCRYPT_ALGORITHM NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_ENCRYPT_ALGORITHM, &C); } db_options(A) ::= db_options(B) DNODES NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_DNODES, &C); } db_options(A) ::= db_options(B) COMPACT_INTERVAL NK_INTEGER (C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_INTERVAL, &C); } @@ -337,6 +338,7 @@ alter_db_option(A) ::= S3_KEEPLOCAL NK_INTEGER(B). alter_db_option(A) ::= S3_KEEPLOCAL NK_VARIABLE(B). { A.type = DB_OPTION_S3_KEEPLOCAL; A.val = B; } alter_db_option(A) ::= S3_COMPACT NK_INTEGER(B). { A.type = DB_OPTION_S3_COMPACT, A.val = B; } alter_db_option(A) ::= KEEP_TIME_OFFSET NK_INTEGER(B). { A.type = DB_OPTION_KEEP_TIME_OFFSET; A.val = B; } +alter_db_option(A) ::= KEEP_TIME_OFFSET NK_VARIABLE(B). { A.type = DB_OPTION_KEEP_TIME_OFFSET; A.val = B; } alter_db_option(A) ::= ENCRYPT_ALGORITHM NK_STRING(B). { A.type = DB_OPTION_ENCRYPT_ALGORITHM; A.val = B; } alter_db_option(A) ::= COMPACT_INTERVAL NK_INTEGER(B). { A.type = DB_OPTION_COMPACT_INTERVAL; A.val = B; } alter_db_option(A) ::= COMPACT_INTERVAL NK_VARIABLE(B). { A.type = DB_OPTION_COMPACT_INTERVAL; A.val = B; } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 0c0c42def5..64143ada3e 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -2023,7 +2023,11 @@ static SNode* setDatabaseOptionImpl(SAstCreateContext* pCxt, SNode* pOptions, ED pDbOptions->s3Compact = taosStr2Int8(((SToken*)pVal)->z, NULL, 10); break; case DB_OPTION_KEEP_TIME_OFFSET: - pDbOptions->keepTimeOffset = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); + if (TK_NK_INTEGER == ((SToken*)pVal)->type) { + pDbOptions->keepTimeOffset = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); + } else { + pDbOptions->pKeepTimeOffsetNode = (SValueNode*)createDurationValueNode(pCxt, (SToken*)pVal); + } break; case DB_OPTION_ENCRYPT_ALGORITHM: COPY_STRING_FORM_STR_TOKEN(pDbOptions->encryptAlgorithmStr, (SToken*)pVal); diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 43ac27ea33..f33a6a63c7 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -7957,6 +7957,17 @@ static int32_t checkDbKeepOption(STranslateContext* pCxt, SDatabaseOptions* pOpt } static int32_t checkDbKeepTimeOffsetOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { + if (pOptions->pKeepTimeOffsetNode) { + if (DEAL_RES_ERROR == translateValue(pCxt, pOptions->pKeepTimeOffsetNode)) { + return pCxt->errCode; + } + if (TIME_UNIT_HOUR != pOptions->pKeepTimeOffsetNode->unit) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option keep_time_offset unit: %c, only %c allowed", + pOptions->pKeepTimeOffsetNode->unit, TIME_UNIT_HOUR); + } + pOptions->keepTimeOffset = getBigintFromValueNode(pOptions->pKeepTimeOffsetNode) / 60; + } if (pOptions->keepTimeOffset < TSDB_MIN_KEEP_TIME_OFFSET || pOptions->keepTimeOffset > TSDB_MAX_KEEP_TIME_OFFSET) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, "Invalid option keep_time_offset: %d" diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index e7ea028e5a..38f2e5024f 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -635,7 +635,9 @@ static EDealRes pdcJoinIsCrossTableCond(SNode* pNode, void* pContext) { if (QUERY_NODE_COLUMN == nodeType(pNode)) { if (pdcJoinColInTableList(pNode, pCxt->pLeftTbls)) { pCxt->havaLeftCol = true; - } else if (pdcJoinColInTableList(pNode, pCxt->pRightTbls)) { + } + + if (pdcJoinColInTableList(pNode, pCxt->pRightTbls)) { pCxt->haveRightCol = true; } return pCxt->havaLeftCol && pCxt->haveRightCol ? DEAL_RES_END : DEAL_RES_CONTINUE; @@ -2809,10 +2811,17 @@ static bool joinCondMayBeOptimized(SLogicNode* pNode, void* pCtx) { return false; } + if (pJoin->pPrimKeyEqCond && QUERY_NODE_OPERATOR == nodeType(pJoin->pPrimKeyEqCond)) { + SOperatorNode* pOp = (SOperatorNode*)pJoin->pPrimKeyEqCond; + if ((pOp->pLeft && QUERY_NODE_COLUMN != nodeType(pOp->pLeft)) || (pOp->pRight && QUERY_NODE_COLUMN != nodeType(pOp->pRight))) { + return false; + } + } + return true; } -static void joinCondMergeScanRand(STimeWindow* pDst, STimeWindow* pSrc) { +static void joinCondMergeScanRange(STimeWindow* pDst, STimeWindow* pSrc) { if (pSrc->skey > pDst->skey) { pDst->skey = pSrc->skey; } @@ -2840,7 +2849,7 @@ static int32_t joinCondOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSub } SNode* pNode = NULL; STimeWindow scanRange = TSWINDOW_INITIALIZER; - FOREACH(pNode, pScanList) { joinCondMergeScanRand(&scanRange, &((SScanLogicNode*)pNode)->scanRange); } + FOREACH(pNode, pScanList) { joinCondMergeScanRange(&scanRange, &((SScanLogicNode*)pNode)->scanRange); } FOREACH(pNode, pScanList) { ((SScanLogicNode*)pNode)->scanRange.skey = scanRange.skey; ((SScanLogicNode*)pNode)->scanRange.ekey = scanRange.ekey; @@ -2857,7 +2866,7 @@ static int32_t joinCondOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSub if (NULL == pLScan || NULL == pRScan) { return TSDB_CODE_SUCCESS; } - joinCondMergeScanRand(&pRScan->scanRange, &pLScan->scanRange); + joinCondMergeScanRange(&pRScan->scanRange, &pLScan->scanRange); break; } case JOIN_TYPE_RIGHT: { @@ -2869,7 +2878,7 @@ static int32_t joinCondOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSub if (NULL == pLScan || NULL == pRScan) { return TSDB_CODE_SUCCESS; } - joinCondMergeScanRand(&pLScan->scanRange, &pRScan->scanRange); + joinCondMergeScanRange(&pLScan->scanRange, &pRScan->scanRange); break; } default: diff --git a/source/libs/planner/src/planSpliter.c b/source/libs/planner/src/planSpliter.c index 03de345936..c3d407c548 100644 --- a/source/libs/planner/src/planSpliter.c +++ b/source/libs/planner/src/planSpliter.c @@ -768,7 +768,7 @@ static int32_t stbSplSplitIntervalForBatch(SSplitContext* pCxt, SStableSplitInfo SLogicSubplan* pSubplan = (SLogicSubplan*)pNode; pSubplan->id.groupId = pCxt->groupId; pSubplan->id.queryId = pCxt->queryId; - pSubplan->splitFlag = SPLIT_FLAG_STABLE_SPLIT; + //pSubplan->splitFlag = SPLIT_FLAG_STABLE_SPLIT; splSetSubplanVgroups(pSubplan, pSubplan->pNode); code = stbSplCreatePartWindowNode((SWindowLogicNode*)pSubplan->pNode, &pPartWindow); if (TSDB_CODE_SUCCESS == code) { @@ -892,7 +892,7 @@ static int32_t stbSplSplitSessionOrStateForBatch(SSplitContext* pCxt, SStableSpl if (TSDB_CODE_SUCCESS == code) { stbSplSetTableMergeScan(pChild); pInfo->pSubplan->subplanType = SUBPLAN_TYPE_MERGE; - SPLIT_FLAG_SET_MASK(pInfo->pSubplan->splitFlag, SPLIT_FLAG_STABLE_SPLIT); + //SPLIT_FLAG_SET_MASK(pInfo->pSubplan->splitFlag, SPLIT_FLAG_STABLE_SPLIT); ++(pCxt->groupId); } else { nodesDestroyList(pMergeKeys); @@ -1201,7 +1201,7 @@ static int32_t stbSplSplitAggNodeForCrossTableMulSubplan(SSplitContext* pCxt, SS SLogicSubplan* pSubplan = (SLogicSubplan*)pNode; pSubplan->id.groupId = pCxt->groupId; pSubplan->id.queryId = pCxt->queryId; - pSubplan->splitFlag = SPLIT_FLAG_STABLE_SPLIT; + //pSubplan->splitFlag = SPLIT_FLAG_STABLE_SPLIT; splSetSubplanVgroups(pSubplan, pSubplan->pNode); code = stbSplCreatePartAggNode((SAggLogicNode*)pSubplan->pNode, &pPartAgg); if (code) break; diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index 89cb4153fe..5e099712ca 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -464,8 +464,8 @@ int32_t streamTransferStateDoPrepare(SStreamTask* pTask) { // 2. send msg to mnode to launch a checkpoint to keep the state for current stream code = streamTaskSendCheckpointReq(pStreamTask); - // 3. assign the status to the value that will be kept in disk - pStreamTask->status.taskStatus = streamTaskGetStatus(pStreamTask).state; + // 3. the default task status should be ready or something, not halt. + // status to the value that will be kept in disk // 4. open the inputQ for all upstream tasks streamTaskOpenAllUpstreamInput(pStreamTask); diff --git a/source/os/src/osTimezone.c b/source/os/src/osTimezone.c index cad3f426f2..4b06930118 100644 --- a/source/os/src/osTimezone.c +++ b/source/os/src/osTimezone.c @@ -872,6 +872,13 @@ END: } #endif +void truncateTimezoneString(char *tz) { + char *spacePos = strchr(tz, ' '); + if (spacePos != NULL) { + *spacePos = '\0'; + } +} + int32_t taosGetSystemTimezone(char *outTimezoneStr) { #ifdef WINDOWS char value[100] = {0}; diff --git a/source/util/src/tconfig.c b/source/util/src/tconfig.c index 54d9be4df6..15860f64ea 100644 --- a/source/util/src/tconfig.c +++ b/source/util/src/tconfig.c @@ -102,6 +102,7 @@ int32_t cfgLoadFromArray(SConfig *pCfg, SArray *pArgs) { } int32_t cfgUpdateFromArray(SConfig *pCfg, SArray *pArgs) { + int32_t code = TSDB_CODE_SUCCESS; int32_t size = taosArrayGetSize(pArgs); for (int32_t i = 0; i < size; ++i) { SConfigItem *pItemNew = taosArrayGet(pArgs, i); @@ -129,9 +130,6 @@ int32_t cfgUpdateFromArray(SConfig *pCfg, SArray *pArgs) { break; case CFG_DTYPE_STRING: case CFG_DTYPE_DIR: - case CFG_DTYPE_LOCALE: - case CFG_DTYPE_CHARSET: - case CFG_DTYPE_TIMEZONE: taosMemoryFree(pItemOld->str); pItemOld->str = taosStrdup(pItemNew->str); if (pItemOld->str == NULL) { @@ -139,6 +137,22 @@ int32_t cfgUpdateFromArray(SConfig *pCfg, SArray *pArgs) { TAOS_RETURN(terrno); } break; + case CFG_DTYPE_LOCALE: + case CFG_DTYPE_CHARSET: + code = cfgSetItemVal(pItemOld, pItemNew->name, pItemNew->str, pItemNew->stype); + if (code != TSDB_CODE_SUCCESS) { + (void)taosThreadMutexUnlock(&pCfg->lock); + TAOS_RETURN(code); + } + break; + case CFG_DTYPE_TIMEZONE: + truncateTimezoneString(pItemNew->str); + code = cfgSetItemVal(pItemOld, pItemNew->name, pItemNew->str, pItemNew->stype); + if (code != TSDB_CODE_SUCCESS) { + (void)taosThreadMutexUnlock(&pCfg->lock); + TAOS_RETURN(code); + } + break; default: break; } diff --git a/source/util/src/ttimer.c b/source/util/src/ttimer.c index e8ed86b4bf..ec300c5206 100644 --- a/source/util/src/ttimer.c +++ b/source/util/src/ttimer.c @@ -138,7 +138,9 @@ static uintptr_t getNextTimerId() { return id; } -static void timerAddRef(tmr_obj_t* timer) { (void)atomic_add_fetch_8(&timer->refCount, 1); } +static void timerAddRef(tmr_obj_t* timer) { + (void)atomic_add_fetch_8(&timer->refCount, 1); +} static void timerDecRef(tmr_obj_t* timer) { if (atomic_sub_fetch_8(&timer->refCount, 1) == 0) { diff --git a/tests/army/alter/alterConfig.py b/tests/army/alter/alterConfig.py index 3fd0a51576..2b85e16a90 100644 --- a/tests/army/alter/alterConfig.py +++ b/tests/army/alter/alterConfig.py @@ -176,7 +176,12 @@ class TDTestCase(TBase): def alter_err_case(self): tdSql.error(f"alter local 'audit 0'",expectErrInfo="Config not found") tdSql.error(f"alter dnode 1 'audit 1'",expectErrInfo="Invalid config option") - + + def alter_dnode_1_case(self): + tdSql.execute("alter dnode 1 'numOfRpcThreads' '5'") + tdSql.execute("alter dnode 1 'rpcQueueMemoryAllowed' '15242880'") + tdSql.execute("alter dnode 1 'syncLogBufferMemoryAllowed' '115728640'") + # run def run(self): tdLog.debug(f"start to excute {__file__}") @@ -191,6 +196,7 @@ class TDTestCase(TBase): self.alterBypassFlag() # TS-5007 self.alter_err_case() + self.alter_dnode_1_case() tdLog.success(f"{__file__} successfully executed") diff --git a/tests/army/query/function/ans/ascii.csv b/tests/army/query/function/ans/ascii.csv index 3f1e6b8c5b..8d186f63e3 100644 --- a/tests/army/query/function/ans/ascii.csv +++ b/tests/army/query/function/ans/ascii.csv @@ -27,12 +27,12 @@ taos> select ASCII('北京涛思数据科技有限公司') taos> select ASCII('hello') + 1 ascii('hello') + 1 | ============================ - 105.000000000000000 | + 105 | taos> select ASCII('hello') - 1 ascii('hello') - 1 | ============================ - 103.000000000000000 | + 103 | taos> select ASCII('hello') from ts_4893.meters limit 5 ascii('hello') | @@ -46,7 +46,7 @@ taos> select ASCII('hello') from ts_4893.meters limit 5 taos> select ASCII('hello') + 1 from ts_4893.meters limit 1 ascii('hello') + 1 | ============================ - 105.000000000000000 | + 105 | taos> select ASCII('hello') + ASCII('hello') from ts_4893.meters limit 1 ascii('hello') + ascii('hello') | @@ -92,20 +92,20 @@ taos> select ASCII(cast(nch1 as varchar)) from ts_4893.meters order by ts limit taos> select pow(ASCII(nch1), 2) from ts_4893.meters order by ts limit 5 pow(ascii(nch1), 2) | ============================ - 12100.000000000000000 | - 51984.000000000000000 | - 13689.000000000000000 | - 12544.000000000000000 | - 12100.000000000000000 | + 12100 | + 51984 | + 13689 | + 12544 | + 12100 | taos> select sqrt(ASCII(nch1)) from ts_4893.meters order by ts limit 5 sqrt(ascii(nch1)) | ============================ - 10.488088481701515 | - 15.099668870541500 | - 10.816653826391969 | - 10.583005244258363 | - 10.488088481701515 | + 10.4880884817015 | + 15.0996688705415 | + 10.816653826392 | + 10.5830052442584 | + 10.4880884817015 | taos> select cast(ASCII(nch1) as int) from ts_4893.meters order by ts limit 5 cast(ascii(nch1) as int) | diff --git a/tests/army/query/function/ans/char_length.csv b/tests/army/query/function/ans/char_length.csv index a872e8cd88..4b79a42bfa 100644 --- a/tests/army/query/function/ans/char_length.csv +++ b/tests/army/query/function/ans/char_length.csv @@ -27,12 +27,12 @@ taos> select CHAR_LENGTH('北京涛思数据科技有限公司') taos> select CHAR_LENGTH('hello') + 1 char_length('hello') + 1 | ============================ - 6.000000000000000 | + 6 | taos> select CHAR_LENGTH('hello') - 1 char_length('hello') - 1 | ============================ - 4.000000000000000 | + 4 | taos> select CHAR_LENGTH('hello') from ts_4893.meters limit 5 char_length('hello') | @@ -46,7 +46,7 @@ taos> select CHAR_LENGTH('hello') from ts_4893.meters limit 5 taos> select CHAR_LENGTH('hello') + 1 from ts_4893.meters limit 1 char_length('hello') + 1 | ============================ - 6.000000000000000 | + 6 | taos> select CHAR_LENGTH('hello') + CHAR_LENGTH('hello') from ts_4893.meters limit 1 char_length('hello') + char_length('hello') | @@ -92,20 +92,20 @@ taos> select CHAR_LENGTH(cast(nch1 as varchar)) from ts_4893.meters order by ts taos> select pow(CHAR_LENGTH(nch1), 2) from ts_4893.meters order by ts limit 5 pow(char_length(nch1), 2) | ============================ - 25.000000000000000 | - 100.000000000000000 | - 36.000000000000000 | - 49.000000000000000 | - 25.000000000000000 | + 25 | + 100 | + 36 | + 49 | + 25 | taos> select sqrt(CHAR_LENGTH(nch1)) from ts_4893.meters order by ts limit 5 sqrt(char_length(nch1)) | ============================ - 2.236067977499790 | - 3.162277660168380 | - 2.449489742783178 | - 2.645751311064591 | - 2.236067977499790 | + 2.23606797749979 | + 3.16227766016838 | + 2.44948974278318 | + 2.64575131106459 | + 2.23606797749979 | taos> select cast(CHAR_LENGTH(nch1) as int) from ts_4893.meters order by ts limit 5 cast(char_length(nch1) as int) | @@ -255,5 +255,5 @@ taos> select groupid, max(char_length(name)) from ts_4893.meters group by groupi taos> select location, avg(char_length(name)) from ts_4893.meters group by location order by location location | avg(char_length(name)) | ================================================= - beijing | 3.244600000000000 | + beijing | 3.2446 | diff --git a/tests/army/query/function/ans/degrees.csv b/tests/army/query/function/ans/degrees.csv index 9c68c92a9c..692f6c6c9b 100644 --- a/tests/army/query/function/ans/degrees.csv +++ b/tests/army/query/function/ans/degrees.csv @@ -2,149 +2,149 @@ taos> select DEGREES(0) degrees(0) | ============================ - 0.000000000000000 | + 0 | taos> select DEGREES(1) degrees(1) | ============================ - 57.295779513082323 | + 57.2957795130823 | taos> select DEGREES(1.5) degrees(1.5) | ============================ - 85.943669269623484 | + 85.9436692696235 | taos> select DEGREES(100) degrees(100) | ============================ - 5729.577951308232514 | + 5729.57795130823 | taos> select DEGREES(-1) degrees(-1) | ============================ - -57.295779513082323 | + -57.2957795130823 | taos> select DEGREES(-1.5) degrees(-1.5) | ============================ - -85.943669269623484 | + -85.9436692696235 | taos> select DEGREES(-100) degrees(-100) | ============================ - -5729.577951308232514 | + -5729.57795130823 | taos> select DEGREES(1) + 1 degrees(1) + 1 | ============================ - 58.295779513082323 | + 58.2957795130823 | taos> select DEGREES(1) - 1 degrees(1) - 1 | ============================ - 56.295779513082323 | + 56.2957795130823 | taos> select DEGREES(1) * 1 degrees(1) * 1 | ============================ - 57.295779513082323 | + 57.2957795130823 | taos> select DEGREES(1) / 1 degrees(1) / 1 | ============================ - 57.295779513082323 | + 57.2957795130823 | taos> select DEGREES(1) from ts_4893.meters limit 5 degrees(1) | ============================ - 57.295779513082323 | - 57.295779513082323 | - 57.295779513082323 | - 57.295779513082323 | - 57.295779513082323 | + 57.2957795130823 | + 57.2957795130823 | + 57.2957795130823 | + 57.2957795130823 | + 57.2957795130823 | taos> select DEGREES(1) + 1 from ts_4893.meters limit 1 degrees(1) + 1 | ============================ - 58.295779513082323 | + 58.2957795130823 | taos> select DEGREES(1) - 1 from ts_4893.meters limit 1 degrees(1) - 1 | ============================ - 56.295779513082323 | + 56.2957795130823 | taos> select DEGREES(1) * 2 from ts_4893.meters limit 1 degrees(1) * 2 | ============================ - 114.591559026164646 | + 114.591559026165 | taos> select DEGREES(1) / 2 from ts_4893.meters limit 1 degrees(1) / 2 | ============================ - 28.647889756541161 | + 28.6478897565412 | taos> select DEGREES(2) + DEGREES(1) from ts_4893.meters limit 1 degrees(2) + degrees(1) | ============================ - 171.887338539246969 | + 171.887338539247 | taos> select DEGREES(2) - DEGREES(1) from ts_4893.meters limit 1 degrees(2) - degrees(1) | ============================ - 57.295779513082323 | + 57.2957795130823 | taos> select DEGREES(2) * DEGREES(1) from ts_4893.meters limit 1 degrees(2) * degrees(1) | ============================ - 6565.612700023488287 | + 6565.61270002349 | taos> select DEGREES(2) / DEGREES(1) from ts_4893.meters limit 1 degrees(2) / degrees(1) | ============================ - 2.000000000000000 | + 2 | taos> select DEGREES(1) + id from ts_4893.meters order by ts limit 5 degrees(1) + id | ============================ - 57.295779513082323 | - 58.295779513082323 | - 59.295779513082323 | - 60.295779513082323 | - 61.295779513082323 | + 57.2957795130823 | + 58.2957795130823 | + 59.2957795130823 | + 60.2957795130823 | + 61.2957795130823 | taos> select DEGREES(id) + id from ts_4893.meters order by ts limit 5 degrees(id) + id | ============================ - 0.000000000000000 | - 58.295779513082323 | - 116.591559026164646 | - 174.887338539246969 | - 233.183118052329291 | + 0 | + 58.2957795130823 | + 116.591559026165 | + 174.887338539247 | + 233.183118052329 | taos> select DEGREES(abs(10)) degrees(abs(10)) | ============================ - 572.957795130823229 | + 572.957795130823 | taos> select DEGREES(PI()) degrees(pi()) | ============================ - 180.000000000000000 | + 180 | taos> select abs(DEGREES(10)) abs(degrees(10)) | ============================ - 572.957795130823229 | + 572.957795130823 | taos> select pow(DEGREES(10), 2) pow(degrees(10), 2) | ============================ - 328280.635001174407080 | + 328280.635001174 | taos> select sqrt(DEGREES(10)) sqrt(degrees(10)) | ============================ - 23.936536824085962 | + 23.936536824086 | taos> select cast(DEGREES(10) as int) cast(degrees(10) as int) | @@ -154,44 +154,44 @@ taos> select cast(DEGREES(10) as int) taos> select DEGREES(sqrt(id)) from ts_4893.meters order by ts limit 5 degrees(sqrt(id)) | ============================ - 0.000000000000000 | - 57.295779513082323 | - 81.028468454139556 | - 99.239201175922574 | - 114.591559026164646 | + 0 | + 57.2957795130823 | + 81.0284684541396 | + 99.2392011759226 | + 114.591559026165 | taos> select degrees(pi()) degrees(pi()) | ============================ - 180.000000000000000 | + 180 | taos> select degrees(current) from ts_4893.d0 order by ts limit 10 degrees(current) | ============================ - 610.200029957721426 | - 491.254034090376820 | - 561.212164701962479 | - 643.603479905018958 | - 613.408634263739941 | - 487.472513516777667 | - 549.810284033650078 | - 628.076328902558998 | - 643.202411196955836 | - 592.266466706882511 | + 610.200029957721 | + 491.254034090377 | + 561.212164701962 | + 643.603479905019 | + 613.40863426374 | + 487.472513516778 | + 549.81028403365 | + 628.076328902559 | + 643.202411196956 | + 592.266466706883 | taos> select degrees(current) from ts_4893.meters order by ts limit 10 degrees(current) | ============================ - 610.200029957721426 | - 491.254034090376820 | - 561.212164701962479 | - 643.603479905018958 | - 613.408634263739941 | - 487.472513516777667 | - 549.810284033650078 | - 628.076328902558998 | - 643.202411196955836 | - 592.266466706882511 | + 610.200029957721 | + 491.254034090377 | + 561.212164701962 | + 643.603479905019 | + 613.40863426374 | + 487.472513516778 | + 549.81028403365 | + 628.076328902559 | + 643.202411196956 | + 592.266466706883 | taos> select degrees(null) degrees(null) | @@ -201,70 +201,70 @@ taos> select degrees(null) taos> select degrees(-5) degrees(-5) | ============================ - -286.478897565411614 | + -286.478897565412 | taos> select degrees(3.14) degrees(3.14) | ============================ - 179.908747671078515 | + 179.908747671079 | taos> select degrees(2*pi()) degrees(2*pi()) | ============================ - 360.000000000000000 | + 360 | taos> select degrees(pi()/2) degrees(pi()/2) | ============================ - 90.000000000000000 | + 90 | taos> select degrees(-pi()/2) degrees(-pi()/2) | ============================ - -90.000000000000000 | + -90 | taos> select degrees(1000000) degrees(1000000) | ============================ - 57295779.513082325458527 | + 57295779.5130823 | taos> select degrees(sin(1)) degrees(sin(1)) | ============================ - 48.212736012209490 | + 48.2127360122095 | taos> select degrees(cos(1)) degrees(cos(1)) | ============================ - 30.957041787430903 | + 30.9570417874309 | taos> select degrees(tan(1)) degrees(tan(1)) | ============================ - 89.232889603798512 | + 89.2328896037985 | taos> select degrees(radians(90)) degrees(radians(90)) | ============================ - 90.000000000000000 | + 90 | taos> select degrees(atan(1)) degrees(atan(1)) | ============================ - 45.000000000000000 | + 45 | taos> select degrees(phase) from ts_4893.meters limit 1 degrees(phase) | ============================ - 29.157708736569255 | + 29.1577087365693 | taos> select degrees(current) from ts_4893.meters limit 1 degrees(current) | ============================ - 610.200029957721426 | + 610.200029957721 | taos> select degrees(voltage) from ts_4893.meters limit 1 degrees(voltage) | ============================ - 12662.367272391193183 | + 12662.3672723912 | diff --git a/tests/army/query/function/ans/exp.csv b/tests/army/query/function/ans/exp.csv index c30efe4f55..7831bd8b06 100644 --- a/tests/army/query/function/ans/exp.csv +++ b/tests/army/query/function/ans/exp.csv @@ -2,22 +2,22 @@ taos> select EXP(0) exp(0) | ============================ - 1.000000000000000 | + 1 | taos> select EXP(1) exp(1) | ============================ - 2.718281828459045 | + 2.71828182845905 | taos> select EXP(1.5) exp(1.5) | ============================ - 4.481689070338065 | + 4.48168907033806 | taos> select EXP(100) exp(100) | ============================ - 2.688117141816136e+43 | + 2.68811714181614e+43 | taos> select EXP(-1) exp(-1) | @@ -27,114 +27,114 @@ taos> select EXP(-1) taos> select EXP(-1.5) exp(-1.5) | ============================ - 0.223130160148430 | + 0.22313016014843 | taos> select EXP(-100) exp(-100) | ============================ - 0.000000000000000 | + 3.72007597602084e-44 | taos> select EXP(1) + 1 exp(1) + 1 | ============================ - 3.718281828459045 | + 3.71828182845905 | taos> select EXP(1) - 1 exp(1) - 1 | ============================ - 1.718281828459045 | + 1.71828182845905 | taos> select EXP(1) * 1 exp(1) * 1 | ============================ - 2.718281828459045 | + 2.71828182845905 | taos> select EXP(1) / 1 exp(1) / 1 | ============================ - 2.718281828459045 | + 2.71828182845905 | taos> select exp(1) from ts_4893.meters limit 5 exp(1) | ============================ - 2.718281828459045 | - 2.718281828459045 | - 2.718281828459045 | - 2.718281828459045 | - 2.718281828459045 | + 2.71828182845905 | + 2.71828182845905 | + 2.71828182845905 | + 2.71828182845905 | + 2.71828182845905 | taos> select exp(1) + 1 from ts_4893.meters limit 1 exp(1) + 1 | ============================ - 3.718281828459045 | + 3.71828182845905 | taos> select exp(1) - 1 from ts_4893.meters limit 1 exp(1) - 1 | ============================ - 1.718281828459045 | + 1.71828182845905 | taos> select exp(1) * 2 from ts_4893.meters limit 1 exp(1) * 2 | ============================ - 5.436563656918090 | + 5.43656365691809 | taos> select exp(1) / 2 from ts_4893.meters limit 1 exp(1) / 2 | ============================ - 1.359140914229523 | + 1.35914091422952 | taos> select exp(2) + exp(1) from ts_4893.meters limit 1 exp(2) + exp(1) | ============================ - 10.107337927389695 | + 10.1073379273897 | taos> select exp(2) - exp(1) from ts_4893.meters limit 1 exp(2) - exp(1) | ============================ - 4.670774270471606 | + 4.67077427047161 | taos> select exp(2) * exp(1) from ts_4893.meters limit 1 exp(2) * exp(1) | ============================ - 20.085536923187668 | + 20.0855369231877 | taos> select exp(2) / exp(1) from ts_4893.meters limit 1 exp(2) / exp(1) | ============================ - 2.718281828459046 | + 2.71828182845905 | taos> select exp(1) + id from ts_4893.meters order by ts limit 5 exp(1) + id | ============================ - 2.718281828459045 | - 3.718281828459045 | - 4.718281828459045 | - 5.718281828459045 | - 6.718281828459045 | + 2.71828182845905 | + 3.71828182845905 | + 4.71828182845904 | + 5.71828182845904 | + 6.71828182845904 | taos> select exp(id) + id from ts_4893.meters order by ts limit 5 exp(id) + id | ============================ - 1.000000000000000 | - 3.718281828459045 | - 9.389056098930650 | - 23.085536923187668 | - 58.598150033144236 | + 1 | + 3.71828182845905 | + 9.38905609893065 | + 23.0855369231877 | + 58.5981500331442 | taos> select abs(EXP(10)) abs(exp(10)) | ============================ - 22026.465794806717895 | + 22026.4657948067 | taos> select pow(EXP(10), 2) pow(exp(10), 2) | ============================ - 485165195.409790337085724 | + 485165195.40979 | taos> select sqrt(EXP(10)) sqrt(exp(10)) | ============================ - 148.413159102576600 | + 148.413159102577 | taos> select cast(EXP(10) as int) cast(exp(10) as int) | @@ -144,54 +144,54 @@ taos> select cast(EXP(10) as int) taos> select EXP(sqrt(id)) from ts_4893.meters order by ts limit 5 exp(sqrt(id)) | ============================ - 1.000000000000000 | - 2.718281828459045 | - 4.113250378782928 | - 5.652233674034091 | - 7.389056098930650 | + 1 | + 2.71828182845905 | + 4.11325037878293 | + 5.65223367403409 | + 7.38905609893065 | taos> select EXP(EXP(EXP(EXP(0)))) exp(exp(exp(exp(0)))) | ============================ - 3814279.104760214220732 | + 3814279.10476021 | taos> select exp(2) exp(2) | ============================ - 7.389056098930650 | + 7.38905609893065 | taos> select exp(0.5) exp(0.5) | ============================ - 1.648721270700128 | + 1.64872127070013 | taos> select exp(current) from ts_4893.d0 order by ts limit 10 exp(current) | ============================ - 42192.578453635847836 | - 5292.258432380726845 | - 17943.802618770550907 | - 75583.992598717435612 | - 44622.804904812772293 | - 4954.246535954979663 | - 14705.836248958077704 | - 57641.604897186582093 | - 75056.754435561466380 | - 30853.327779395312973 | + 42192.5784536358 | + 5292.25843238073 | + 17943.8026187706 | + 75583.9925987174 | + 44622.8049048128 | + 4954.24653595498 | + 14705.8362489581 | + 57641.6048971866 | + 75056.7544355615 | + 30853.3277793953 | taos> select exp(current) from ts_4893.meters order by ts limit 10 exp(current) | ============================ - 42192.578453635847836 | - 5292.258432380726845 | - 17943.802618770550907 | - 75583.992598717435612 | - 44622.804904812772293 | - 4954.246535954979663 | - 14705.836248958077704 | - 57641.604897186582093 | - 75056.754435561466380 | - 30853.327779395312973 | + 42192.5784536358 | + 5292.25843238073 | + 17943.8026187706 | + 75583.9925987174 | + 44622.8049048128 | + 4954.24653595498 | + 14705.8362489581 | + 57641.6048971866 | + 75056.7544355615 | + 30853.3277793953 | taos> select exp(null) exp(null) | @@ -206,55 +206,55 @@ taos> select exp(100000) taos> select exp(-1000) exp(-1000) | ============================ - 0.000000000000000 | + 0 | taos> select exp(-9999999999) exp(-9999999999) | ============================ - 0.000000000000000 | + 0 | taos> select exp(0.0001) exp(0.0001) | ============================ - 1.000100005000167 | + 1.00010000500017 | taos> select exp(pi()) exp(pi()) | ============================ - 23.140692632779267 | + 23.1406926327793 | taos> select exp(voltage) from ts_4893.meters limit 1 exp(voltage) | ============================ - 9.529727902367202e+95 | + 9.5297279023672e+95 | taos> select exp(current) from ts_4893.meters limit 1 exp(current) | ============================ - 42192.578453635847836 | + 42192.5784536358 | taos> select exp(phase) from ts_4893.meters limit 1 exp(phase) | ============================ - 1.663457087766762 | + 1.66345708776676 | taos> select exp(voltage + current) from ts_4893.meters limit 1 exp(voltage + current) | ============================ - 4.020837921624308e+100 | + 4.02083792162431e+100 | taos> select exp(abs(current)) from ts_4893.meters limit 1 exp(abs(current)) | ============================ - 42192.578453635847836 | + 42192.5784536358 | taos> select exp(log(voltage)) from ts_4893.meters limit 1 exp(log(voltage)) | ============================ - 220.999999999999915 | + 221 | taos> select round(exp(voltage), 2) from ts_4893.meters limit 1 round(exp(voltage), 2) | ============================ - 9.529727902367202e+95 | + 9.5297279023672e+95 | diff --git a/tests/army/query/function/ans/ln.csv b/tests/army/query/function/ans/ln.csv index 5d6443ab79..3ffcf05582 100644 --- a/tests/army/query/function/ans/ln.csv +++ b/tests/army/query/function/ans/ln.csv @@ -2,7 +2,7 @@ taos> select LN(100) ln(100) | ============================ - 4.605170185988092 | + 4.60517018598809 | taos> select LN(1.5) ln(1.5) | @@ -12,71 +12,71 @@ taos> select LN(1.5) taos> select LN(100) ln(100) | ============================ - 4.605170185988092 | + 4.60517018598809 | taos> select LN(100) + 1 ln(100) + 1 | ============================ - 5.605170185988092 | + 5.60517018598809 | taos> select LN(100) - 1 ln(100) - 1 | ============================ - 3.605170185988092 | + 3.60517018598809 | taos> select LN(100) * 1 ln(100) * 1 | ============================ - 4.605170185988092 | + 4.60517018598809 | taos> select LN(100) / 1 ln(100) / 1 | ============================ - 4.605170185988092 | + 4.60517018598809 | taos> select LN(100) from ts_4893.meters limit 5 ln(100) | ============================ - 4.605170185988092 | - 4.605170185988092 | - 4.605170185988092 | - 4.605170185988092 | - 4.605170185988092 | + 4.60517018598809 | + 4.60517018598809 | + 4.60517018598809 | + 4.60517018598809 | + 4.60517018598809 | taos> select LN(100) + 1 from ts_4893.meters limit 1 ln(100) + 1 | ============================ - 5.605170185988092 | + 5.60517018598809 | taos> select LN(100) - 1 from ts_4893.meters limit 1 ln(100) - 1 | ============================ - 3.605170185988092 | + 3.60517018598809 | taos> select LN(100) * 2 from ts_4893.meters limit 1 ln(100) * 2 | ============================ - 9.210340371976184 | + 9.21034037197618 | taos> select LN(100) / 2 from ts_4893.meters limit 1 ln(100) / 2 | ============================ - 2.302585092994046 | + 2.30258509299405 | taos> select LN(2) + LN(100) from ts_4893.meters limit 1 ln(2) + ln(100) | ============================ - 5.298317366548037 | + 5.29831736654804 | taos> select LN(2) - LN(100) from ts_4893.meters limit 1 ln(2) - ln(100) | ============================ - -3.912023005428146 | + -3.91202300542815 | taos> select LN(2) * LN(100) from ts_4893.meters limit 1 ln(2) * ln(100) | ============================ - 3.192060730416365 | + 3.19206073041636 | taos> select LN(2) / LN(100) from ts_4893.meters limit 1 ln(2) / ln(100) | @@ -86,20 +86,20 @@ taos> select LN(2) / LN(100) from ts_4893.meters limit 1 taos> select LN(100) + id from ts_4893.meters order by ts limit 5 ln(100) + id | ============================ - 4.605170185988092 | - 5.605170185988092 | - 6.605170185988092 | - 7.605170185988092 | - 8.605170185988092 | + 4.60517018598809 | + 5.60517018598809 | + 6.60517018598809 | + 7.60517018598809 | + 8.60517018598809 | taos> select LN(id + 1) + id from ts_4893.meters order by ts limit 5 ln(id + 1) + id | ============================ - 0.000000000000000 | - 1.693147180559945 | - 3.098612288668110 | - 4.386294361119891 | - 5.609437912434101 | + 0 | + 1.69314718055995 | + 3.09861228866811 | + 4.38629436111989 | + 5.6094379124341 | taos> select ln(null) ln(null) | @@ -119,17 +119,17 @@ taos> select ln(-5) taos> select abs(LN(10)) abs(ln(10)) | ============================ - 2.302585092994046 | + 2.30258509299405 | taos> select pow(LN(10), 2) pow(ln(10), 2) | ============================ - 5.301898110478399 | + 5.3018981104784 | taos> select sqrt(LN(10)) sqrt(ln(10)) | ============================ - 1.517427129385146 | + 1.51742712938515 | taos> select cast(LN(10) as int) cast(ln(10) as int) | @@ -139,11 +139,11 @@ taos> select cast(LN(10) as int) taos> select LN(sqrt(id) + 1) from ts_4893.meters order by ts limit 5 ln(sqrt(id) + 1) | ============================ - 0.000000000000000 | + 0 | 0.693147180559945 | 0.881373587019543 | - 1.005052538742381 | - 1.098612288668110 | + 1.00505253874238 | + 1.09861228866811 | taos> select LN(LN(LN(LN(10000)))) ln(ln(ln(ln(10000)))) | @@ -153,70 +153,70 @@ taos> select LN(LN(LN(LN(10000)))) taos> select LN(EXP(2)) ln(exp(2)) | ============================ - 2.000000000000000 | + 2 | taos> select ln(10) ln(10) | ============================ - 2.302585092994046 | + 2.30258509299405 | taos> select ln(pi()) ln(pi()) | ============================ - 1.144729885849400 | + 1.1447298858494 | taos> select ln(current) from ts_4893.d0 order by ts limit 10 ln(current) | ============================ - 2.365559856336680 | - 2.148734409997751 | - 2.281872059185575 | - 2.418855857000369 | - 2.370804362614190 | - 2.141006941277850 | - 2.261346315560232 | - 2.394434736880126 | - 2.418232501568406 | - 2.335729681253415 | + 2.36555985633668 | + 2.14873440999775 | + 2.28187205918557 | + 2.41885585700037 | + 2.37080436261419 | + 2.14100694127785 | + 2.26134631556023 | + 2.39443473688013 | + 2.41823250156841 | + 2.33572968125342 | taos> select ln(current) from ts_4893.meters order by ts limit 10 ln(current) | ============================ - 2.365559856336680 | - 2.148734409997751 | - 2.281872059185575 | - 2.418855857000369 | - 2.370804362614190 | - 2.141006941277850 | - 2.261346315560232 | - 2.394434736880126 | - 2.418232501568406 | - 2.335729681253415 | + 2.36555985633668 | + 2.14873440999775 | + 2.28187205918557 | + 2.41885585700037 | + 2.37080436261419 | + 2.14100694127785 | + 2.26134631556023 | + 2.39443473688013 | + 2.41823250156841 | + 2.33572968125342 | taos> select ln(1) ln(1) | ============================ - 0.000000000000000 | + 0 | taos> select ln(20) ln(20) | ============================ - 2.995732273553991 | + 2.99573227355399 | taos> select ln(100) ln(100) | ============================ - 4.605170185988092 | + 4.60517018598809 | taos> select ln(99999999999999) ln(99999999999999) | ============================ - 32.236191301916627 | + 32.2361913019166 | taos> select ln(0.1) ln(0.1) | ============================ - -2.302585092994045 | + -2.30258509299405 | taos> select ln(2.718) ln(2.718) | @@ -226,17 +226,17 @@ taos> select ln(2.718) taos> select ln(exp(1)) ln(exp(1)) | ============================ - 1.000000000000000 | + 1 | taos> select ln(voltage) from ts_4893.meters where voltage > 0 limit 1 ln(voltage) | ============================ - 5.398162701517752 | + 5.39816270151775 | taos> select ln(current) from ts_4893.meters where current > 0 limit 1 ln(current) | ============================ - 2.365559856336680 | + 2.36555985633668 | taos> select ln(phase) from ts_4893.meters where phase > 0 limit 1 ln(phase) | @@ -246,12 +246,12 @@ taos> select ln(phase) from ts_4893.meters where phase > 0 limit 1 taos> select ln(exp(voltage)) from ts_4893.meters where voltage > 0 limit 1 ln(exp(voltage)) | ============================ - 221.000000000000000 | + 221 | taos> select ln(abs(current)) from ts_4893.meters where current != 0 limit 1 ln(abs(current)) | ============================ - 2.365559856336680 | + 2.36555985633668 | taos> select ln(sqrt(phase)) from ts_4893.meters where phase >= 0 limit 1 ln(sqrt(phase)) | diff --git a/tests/army/query/function/ans/max.csv b/tests/army/query/function/ans/max.csv index 1570e1ebc9..40f8b2ac23 100644 --- a/tests/army/query/function/ans/max.csv +++ b/tests/army/query/function/ans/max.csv @@ -2,7 +2,7 @@ taos> select MAX(current) from ts_4893.meters max(current) | ======================= - 11.9989996 | + 11.999 | taos> select MAX(voltage) from ts_4893.meters max(voltage) | @@ -100,65 +100,65 @@ taos> select MAX(id) from ts_4893.meters interval(60d) taos> select MAX(current) from ts_4893.meters interval(60d) max(current) | ======================= - 11.9989996 | - 11.9969997 | - 11.9969997 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9969997 | - 11.9989996 | - 11.9980001 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9969997 | - 11.9989996 | - 11.9980001 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9969997 | - 11.9989996 | - 11.9980001 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9969997 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9969997 | - 11.9989996 | - 11.9980001 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9969997 | - 11.9989996 | - 11.9980001 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9969997 | - 11.9989996 | - 11.9980001 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9969997 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9969997 | - 11.9989996 | - 11.9989996 | - 11.9989996 | - 11.9860001 | + 11.999 | + 11.997 | + 11.997 | + 11.999 | + 11.999 | + 11.999 | + 11.999 | + 11.997 | + 11.999 | + 11.998 | + 11.999 | + 11.999 | + 11.999 | + 11.997 | + 11.999 | + 11.998 | + 11.999 | + 11.999 | + 11.999 | + 11.997 | + 11.999 | + 11.998 | + 11.999 | + 11.999 | + 11.999 | + 11.997 | + 11.999 | + 11.999 | + 11.999 | + 11.999 | + 11.997 | + 11.999 | + 11.998 | + 11.999 | + 11.999 | + 11.999 | + 11.997 | + 11.999 | + 11.998 | + 11.999 | + 11.999 | + 11.999 | + 11.997 | + 11.999 | + 11.998 | + 11.999 | + 11.999 | + 11.999 | + 11.997 | + 11.999 | + 11.999 | + 11.999 | + 11.999 | + 11.999 | + 11.997 | + 11.999 | + 11.999 | + 11.999 | + 11.986 | taos> select MAX(voltage) from ts_4893.meters interval(60d) max(voltage) | @@ -561,7 +561,7 @@ taos> select max(id) from ts_4893.meters where id <= 0 taos> select max(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59' max(phase) | ======================= - 0.9999660 | + 0.999966 | taos> select max(voltage) from ts_4893.meters where voltage is not null max(voltage) | @@ -581,12 +581,12 @@ taos> select round(max(current), 2) from ts_4893.meters taos> select pow(max(current), 2) from ts_4893.meters pow(max(current), 2) | ============================ - 143.975991296219036 | + 143.975991296219 | taos> select log(max(voltage) + 1) from ts_4893.meters log(max(voltage) + 1) | ============================ - 5.416100402204420 | + 5.41610040220442 | taos> select groupid, max(voltage) from ts_4893.meters group by groupid order by groupid groupid | max(voltage) | @@ -601,7 +601,7 @@ taos> select location, max(id) from ts_4893.meters group by location order by lo taos> select location, max(current) from ts_4893.meters group by location order by location location | max(current) | ============================================ - beijing | 11.9989996 | + beijing | 11.999 | taos> select max(1) max(1) | @@ -656,5 +656,5 @@ taos> select max(cast(1.1 as float)) taos> select max(cast(1.1 as double)) max(cast(1.1 as double)) | ============================ - 1.100000000000000 | + 1.1 | diff --git a/tests/army/query/function/ans/min.csv b/tests/army/query/function/ans/min.csv index 1ea0c47e81..d77744a4f9 100644 --- a/tests/army/query/function/ans/min.csv +++ b/tests/army/query/function/ans/min.csv @@ -7,7 +7,7 @@ taos> select MIN(id) from ts_4893.meters taos> select MIN(current) from ts_4893.meters min(current) | ======================= - 8.0000000 | + 8 | taos> select MIN(voltage) from ts_4893.meters min(voltage) | @@ -105,65 +105,65 @@ taos> select MIN(id) from ts_4893.meters interval(60d) taos> select MIN(current) from ts_4893.meters interval(60d) min(current) | ======================= - 8.0000000 | - 8.0000000 | - 8.0000000 | - 8.0010004 | - 8.0010004 | - 8.0000000 | - 8.0000000 | - 8.0000000 | - 8.0019999 | - 8.0010004 | - 8.0000000 | - 8.0030003 | - 8.0000000 | - 8.0000000 | - 8.0019999 | - 8.0010004 | - 8.0000000 | - 8.0030003 | - 8.0000000 | - 8.0000000 | - 8.0019999 | - 8.0010004 | - 8.0000000 | - 8.0000000 | - 8.0000000 | - 8.0000000 | - 8.0019999 | - 8.0010004 | - 8.0000000 | - 8.0000000 | - 8.0000000 | - 8.0000000 | - 8.0010004 | - 8.0089998 | - 8.0000000 | - 8.0000000 | - 8.0000000 | - 8.0019999 | - 8.0010004 | - 8.0000000 | - 8.0030003 | - 8.0000000 | - 8.0000000 | - 8.0019999 | - 8.0010004 | - 8.0000000 | - 8.0019999 | - 8.0000000 | - 8.0000000 | - 8.0019999 | - 8.0010004 | - 8.0000000 | - 8.0000000 | - 8.0000000 | - 8.0000000 | - 8.0019999 | - 8.0010004 | - 8.0000000 | - 8.0050001 | + 8 | + 8 | + 8 | + 8.001 | + 8.001 | + 8 | + 8 | + 8 | + 8.002 | + 8.001 | + 8 | + 8.003 | + 8 | + 8 | + 8.002 | + 8.001 | + 8 | + 8.003 | + 8 | + 8 | + 8.002 | + 8.001 | + 8 | + 8 | + 8 | + 8 | + 8.002 | + 8.001 | + 8 | + 8 | + 8 | + 8 | + 8.001 | + 8.009 | + 8 | + 8 | + 8 | + 8.002 | + 8.001 | + 8 | + 8.003 | + 8 | + 8 | + 8.002 | + 8.001 | + 8 | + 8.002 | + 8 | + 8 | + 8.002 | + 8.001 | + 8 | + 8 | + 8 | + 8 | + 8.002 | + 8.001 | + 8 | + 8.005 | taos> select MIN(voltage) from ts_4893.meters interval(60d) min(voltage) | @@ -561,7 +561,7 @@ taos> select min(id) from ts_4893.meters where id <= 0 taos> select min(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59' min(phase) | ======================= - 0.0001700 | + 0.00017 | taos> select min(voltage) from ts_4893.meters where voltage is not null min(voltage) | @@ -581,12 +581,12 @@ taos> select round(min(current), 2) from ts_4893.meters taos> select pow(min(current), 2) from ts_4893.meters pow(min(current), 2) | ============================ - 64.000000000000000 | + 64 | taos> select log(min(voltage) + 1) from ts_4893.meters log(min(voltage) + 1) | ============================ - 5.375278407684165 | + 5.37527840768417 | taos> select groupid, min(voltage) from ts_4893.meters group by groupid order by groupid groupid | min(voltage) | @@ -596,7 +596,7 @@ taos> select groupid, min(voltage) from ts_4893.meters group by groupid order by taos> select location, min(current) from ts_4893.meters group by location order by location location | min(current) | ============================================ - beijing | 8.0000000 | + beijing | 8 | taos> select location, min(id) from ts_4893.meters group by location order by location location | min(id) | @@ -656,5 +656,5 @@ taos> select min(cast(1.1 as float)) taos> select min(cast(1.1 as double)) min(cast(1.1 as double)) | ============================ - 1.100000000000000 | + 1.1 | diff --git a/tests/army/query/function/ans/mod.csv b/tests/army/query/function/ans/mod.csv index fb0a09c14c..9d2232f49d 100644 --- a/tests/army/query/function/ans/mod.csv +++ b/tests/army/query/function/ans/mod.csv @@ -2,7 +2,7 @@ taos> select MOD(10.55, 3) mod(10.55, 3) | ============================ - 1.550000000000001 | + 1.55 | taos> select MOD(10.55, 2) mod(10.55, 2) | @@ -32,12 +32,12 @@ taos> select MOD(-10.55, 1) taos> select MOD(99, 1) mod(99, 1) | ============================ - 0.000000000000000 | + 0 | taos> select MOD(10.55, 1) + 1 mod(10.55, 1) + 1 | ============================ - 1.550000000000001 | + 1.55 | taos> select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123.123456789, 9), 8), 7), 6), 5), 4), 3) mod(mod(mod(mod(mod(mod(mod(123.123456789, 9), 8), 7), 6), 5), 4 | @@ -69,12 +69,12 @@ taos> select MOD(current, id + 1) from ts_4893.meters order by ts limit 10 0.649999618530273 | 0.574000358581543 | 0.795000076293945 | - 3.232999801635742 | + 3.23299980163574 | 0.706000328063965 | - 2.508000373840332 | - 2.595999717712402 | - 2.961999893188477 | - 2.225999832153320 | + 2.50800037384033 | + 2.5959997177124 | + 2.96199989318848 | + 2.22599983215332 | 0.336999893188477 | taos> select MOD(current, 1) from ts_4893.meters order by ts limit 10 @@ -88,7 +88,7 @@ taos> select MOD(current, 1) from ts_4893.meters order by ts limit 10 0.508000373840332 | 0.595999717712402 | 0.961999893188477 | - 0.225999832153320 | + 0.22599983215332 | 0.336999893188477 | taos> select MOD(sqrt(current), abs(id + 1)) from ts_4893.meters order by ts limit 10 @@ -108,40 +108,40 @@ taos> select MOD(sqrt(current), abs(id + 1)) from ts_4893.meters order by ts lim taos> select mod(10, -3) mod(10, -3) | ============================ - 1.000000000000000 | + 1 | taos> select mod(10, 3) mod(10, 3) | ============================ - 1.000000000000000 | + 1 | taos> select mod(id, 3) from ts_4893.d0 order by ts limit 10 mod(id, 3) | ============================ - 0.000000000000000 | - 1.000000000000000 | - 2.000000000000000 | - 0.000000000000000 | - 1.000000000000000 | - 2.000000000000000 | - 0.000000000000000 | - 1.000000000000000 | - 2.000000000000000 | - 0.000000000000000 | + 0 | + 1 | + 2 | + 0 | + 1 | + 2 | + 0 | + 1 | + 2 | + 0 | taos> select mod(id, 3) from ts_4893.meters order by ts limit 10 mod(id, 3) | ============================ - 0.000000000000000 | - 1.000000000000000 | - 2.000000000000000 | - 0.000000000000000 | - 1.000000000000000 | - 2.000000000000000 | - 0.000000000000000 | - 1.000000000000000 | - 2.000000000000000 | - 0.000000000000000 | + 0 | + 1 | + 2 | + 0 | + 1 | + 2 | + 0 | + 1 | + 2 | + 0 | taos> select mod(null, 2) mod(null, 2) | @@ -171,37 +171,37 @@ taos> select mod(5, 0) taos> select mod(0, 1) mod(0, 1) | ============================ - 0.000000000000000 | + 0 | taos> select mod(1, 1) mod(1, 1) | ============================ - 0.000000000000000 | + 0 | taos> select mod(5, 2) mod(5, 2) | ============================ - 1.000000000000000 | + 1 | taos> select mod(5, -3) mod(5, -3) | ============================ - 2.000000000000000 | + 2 | taos> select mod(15, 4) mod(15, 4) | ============================ - 3.000000000000000 | + 3 | taos> select mod(-5, 3) mod(-5, 3) | ============================ - -2.000000000000000 | + -2 | taos> select mod(voltage, 2) from ts_4893.meters limit 1 mod(voltage, 2) | ============================ - 1.000000000000000 | + 1 | taos> select mod(current, 10) from ts_4893.meters limit 1 mod(current, 10) | @@ -211,7 +211,7 @@ taos> select mod(current, 10) from ts_4893.meters limit 1 taos> select mod(current, log(100)) from ts_4893.meters limit 1 mod(current, log(100)) | ============================ - 1.439659246554090 | + 1.43965924655409 | taos> select mod(phase, 4) from ts_4893.meters limit 1 mod(phase, 4) | @@ -221,7 +221,7 @@ taos> select mod(phase, 4) from ts_4893.meters limit 1 taos> select mod(abs(voltage), 3) from ts_4893.meters limit 1 mod(abs(voltage), 3) | ============================ - 2.000000000000000 | + 2 | taos> select mod(phase, sqrt(16)) from ts_4893.meters limit 1 mod(phase, sqrt(16)) | @@ -231,5 +231,5 @@ taos> select mod(phase, sqrt(16)) from ts_4893.meters limit 1 taos> select mod(round(voltage), 5) from ts_4893.meters limit 1 mod(round(voltage), 5) | ============================ - 1.000000000000000 | + 1 | diff --git a/tests/army/query/function/ans/pi.csv b/tests/army/query/function/ans/pi.csv index 1afc45f953..fb7d662ca3 100644 --- a/tests/army/query/function/ans/pi.csv +++ b/tests/army/query/function/ans/pi.csv @@ -2,100 +2,100 @@ taos> select pi() pi() | ============================ - 3.141592653589793 | + 3.14159265358979 | taos> select pi() + 1 pi() + 1 | ============================ - 4.141592653589793 | + 4.14159265358979 | taos> select pi() - 1 pi() - 1 | ============================ - 2.141592653589793 | + 2.14159265358979 | taos> select pi() * 2 pi() * 2 | ============================ - 6.283185307179586 | + 6.28318530717959 | taos> select pi() / 2 pi() / 2 | ============================ - 1.570796326794897 | + 1.5707963267949 | taos> select pi() from ts_4893.meters limit 5 pi() | ============================ - 3.141592653589793 | - 3.141592653589793 | - 3.141592653589793 | - 3.141592653589793 | - 3.141592653589793 | + 3.14159265358979 | + 3.14159265358979 | + 3.14159265358979 | + 3.14159265358979 | + 3.14159265358979 | taos> select pi() + 1 from ts_4893.meters limit 1 pi() + 1 | ============================ - 4.141592653589793 | + 4.14159265358979 | taos> select pi() - 1 from ts_4893.meters limit 1 pi() - 1 | ============================ - 2.141592653589793 | + 2.14159265358979 | taos> select pi() * 2 from ts_4893.meters limit 1 pi() * 2 | ============================ - 6.283185307179586 | + 6.28318530717959 | taos> select pi() / 2 from ts_4893.meters limit 1 pi() / 2 | ============================ - 1.570796326794897 | + 1.5707963267949 | taos> select pi() + pi() from ts_4893.meters limit 1 pi() + pi() | ============================ - 6.283185307179586 | + 6.28318530717959 | taos> select pi() - pi() from ts_4893.meters limit 1 pi() - pi() | ============================ - 0.000000000000000 | + 0 | taos> select pi() * pi() from ts_4893.meters limit 1 pi() * pi() | ============================ - 9.869604401089358 | + 9.86960440108936 | taos> select pi() / pi() from ts_4893.meters limit 1 pi() / pi() | ============================ - 1.000000000000000 | + 1 | taos> select pi() + id from ts_4893.meters order by ts limit 5 pi() + id | ============================ - 3.141592653589793 | - 4.141592653589793 | - 5.141592653589793 | - 6.141592653589793 | - 7.141592653589793 | + 3.14159265358979 | + 4.14159265358979 | + 5.14159265358979 | + 6.14159265358979 | + 7.14159265358979 | taos> select abs(pi()) abs(pi()) | ============================ - 3.141592653589793 | + 3.14159265358979 | taos> select pow(pi(), 2) pow(pi(), 2) | ============================ - 9.869604401089358 | + 9.86960440108936 | taos> select sqrt(pi()) sqrt(pi()) | ============================ - 1.772453850905516 | + 1.77245385090552 | taos> select cast(pi() as int) cast(pi() as int) | @@ -105,7 +105,7 @@ taos> select cast(pi() as int) taos> select pi() pi() | ============================ - 3.141592653589793 | + 3.14159265358979 | taos> select substring_index(null, '.', 2) substring_index(null, '.', 2) | @@ -120,7 +120,7 @@ taos> select pi() + null taos> select pi() * 0 pi() * 0 | ============================ - 0.000000000000000 | + 0 | taos> select pi() / 0 pi() / 0 | @@ -130,62 +130,62 @@ taos> select pi() / 0 taos> select pi() * 0.5 pi() * 0.5 | ============================ - 1.570796326794897 | + 1.5707963267949 | taos> select pi() * -1 pi() * -1 | ============================ - -3.141592653589793 | + -3.14159265358979 | taos> select pi() * name from ts_4893.meters limit 1 pi() * name | ============================ - 0.000000000000000 | + 0 | taos> select pi() * voltage from ts_4893.meters limit 1 pi() * voltage | ============================ - 694.291976443344311 | + 694.291976443344 | taos> select pi() * phase * 2 from ts_4893.meters limit 1 pi() * phase * 2 | ============================ - 3.197500560801395 | + 3.19750056080139 | taos> select round(pi(), 6) round(pi(), 6) | ============================ - 3.141593000000000 | + 3.141593 | taos> select round(pi() * phase, 2) from ts_4893.meters limit 1 round(pi() * phase, 2) | ============================ - 1.600000000000000 | + 1.6 | taos> select sqrt(pi() * voltage) from ts_4893.meters limit 1 sqrt(pi() * voltage) | ============================ - 26.349420799010826 | + 26.3494207990108 | taos> select sqrt(current / pi()) from ts_4893.meters limit 1 sqrt(current / pi()) | ============================ - 1.841195309148865 | + 1.84119530914887 | taos> select abs(pi() * phase) from ts_4893.meters limit 1 abs(pi() * phase) | ============================ - 1.598750280400697 | + 1.5987502804007 | taos> select log(pi() * voltage) from ts_4893.meters limit 1 log(pi() * voltage) | ============================ - 6.542892587367153 | + 6.54289258736715 | taos> select voltage / pi() from ts_4893.meters limit 1 voltage / pi() | ============================ - 70.346484846617741 | + 70.3464848466177 | taos> select id, case when voltage > 100 then pi() else pi() / 2 end from ts_4893.meters limit 1 id | case when voltage > 100 then pi() else pi() / 2 end | diff --git a/tests/army/query/function/ans/radians.csv b/tests/army/query/function/ans/radians.csv index 83814344bc..13042cfc72 100644 --- a/tests/army/query/function/ans/radians.csv +++ b/tests/army/query/function/ans/radians.csv @@ -2,42 +2,42 @@ taos> select RADIANS(0) radians(0) | ============================ - 0.000000000000000 | + 0 | taos> select RADIANS(1) radians(1) | ============================ - 0.017453292519943 | + 0.0174532925199433 | taos> select RADIANS(1.5) radians(1.5) | ============================ - 0.026179938779915 | + 0.0261799387799149 | taos> select RADIANS(100) radians(100) | ============================ - 1.745329251994330 | + 1.74532925199433 | taos> select RADIANS(-1) radians(-1) | ============================ - -0.017453292519943 | + -0.0174532925199433 | taos> select RADIANS(-1.5) radians(-1.5) | ============================ - -0.026179938779915 | + -0.0261799387799149 | taos> select RADIANS(-100) radians(-100) | ============================ - -1.745329251994330 | + -1.74532925199433 | taos> select RADIANS(1) + 1 radians(1) + 1 | ============================ - 1.017453292519943 | + 1.01745329251994 | taos> select RADIANS(1) - 1 radians(1) - 1 | @@ -47,26 +47,26 @@ taos> select RADIANS(1) - 1 taos> select RADIANS(1) * 1 radians(1) * 1 | ============================ - 0.017453292519943 | + 0.0174532925199433 | taos> select RADIANS(1) / 1 radians(1) / 1 | ============================ - 0.017453292519943 | + 0.0174532925199433 | taos> select RADIANS(1) from ts_4893.meters limit 5 radians(1) | ============================ - 0.017453292519943 | - 0.017453292519943 | - 0.017453292519943 | - 0.017453292519943 | - 0.017453292519943 | + 0.0174532925199433 | + 0.0174532925199433 | + 0.0174532925199433 | + 0.0174532925199433 | + 0.0174532925199433 | taos> select RADIANS(1) + 1 from ts_4893.meters limit 1 radians(1) + 1 | ============================ - 1.017453292519943 | + 1.01745329251994 | taos> select RADIANS(1) - 1 from ts_4893.meters limit 1 radians(1) - 1 | @@ -76,50 +76,50 @@ taos> select RADIANS(1) - 1 from ts_4893.meters limit 1 taos> select RADIANS(1) * 2 from ts_4893.meters limit 1 radians(1) * 2 | ============================ - 0.034906585039887 | + 0.0349065850398866 | taos> select RADIANS(1) / 2 from ts_4893.meters limit 1 radians(1) / 2 | ============================ - 0.008726646259972 | + 0.00872664625997165 | taos> select RADIANS(2) + RADIANS(1) from ts_4893.meters limit 1 radians(2) + radians(1) | ============================ - 0.052359877559830 | + 0.0523598775598299 | taos> select RADIANS(2) - RADIANS(1) from ts_4893.meters limit 1 radians(2) - radians(1) | ============================ - 0.017453292519943 | + 0.0174532925199433 | taos> select RADIANS(2) * RADIANS(1) from ts_4893.meters limit 1 radians(2) * radians(1) | ============================ - 0.000609234839573 | + 0.000609234839573417 | taos> select RADIANS(2) / RADIANS(1) from ts_4893.meters limit 1 radians(2) / radians(1) | ============================ - 2.000000000000000 | + 2 | taos> select RADIANS(1) + id from ts_4893.meters order by ts limit 5 radians(1) + id | ============================ - 0.017453292519943 | - 1.017453292519943 | - 2.017453292519943 | - 3.017453292519943 | - 4.017453292519943 | + 0.0174532925199433 | + 1.01745329251994 | + 2.01745329251994 | + 3.01745329251994 | + 4.01745329251994 | taos> select RADIANS(id) + id from ts_4893.meters order by ts limit 5 radians(id) + id | ============================ - 0.000000000000000 | - 1.017453292519943 | - 2.034906585039887 | - 3.052359877559830 | - 4.069813170079773 | + 0 | + 1.01745329251994 | + 2.03490658503989 | + 3.05235987755983 | + 4.06981317007977 | taos> select RADIANS(abs(10)) radians(abs(10)) | @@ -129,7 +129,7 @@ taos> select RADIANS(abs(10)) taos> select RADIANS(DEGREES(PI())) radians(degrees(pi())) | ============================ - 3.141592653589793 | + 3.14159265358979 | taos> select abs(RADIANS(10)) abs(radians(10)) | @@ -139,7 +139,7 @@ taos> select abs(RADIANS(10)) taos> select pow(RADIANS(10), 2) pow(radians(10), 2) | ============================ - 0.030461741978671 | + 0.0304617419786709 | taos> select sqrt(RADIANS(10)) sqrt(radians(10)) | @@ -154,16 +154,16 @@ taos> select cast(RADIANS(10) as int) taos> select RADIANS(sqrt(id)) from ts_4893.meters order by ts limit 5 radians(sqrt(id)) | ============================ - 0.000000000000000 | - 0.017453292519943 | - 0.024682682989769 | - 0.030229989403904 | - 0.034906585039887 | + 0 | + 0.0174532925199433 | + 0.0246826829897687 | + 0.0302299894039036 | + 0.0349065850398866 | taos> select radians(180) radians(180) | ============================ - 3.141592653589793 | + 3.14159265358979 | taos> select radians(current) from ts_4893.d0 order by ts limit 10 radians(current) | @@ -201,7 +201,7 @@ taos> select radians(null) taos> select radians(0) radians(0) | ============================ - 0.000000000000000 | + 0 | taos> select radians(45) radians(45) | @@ -216,22 +216,22 @@ taos> select radians(-45) taos> select radians(90) radians(90) | ============================ - 1.570796326794897 | + 1.5707963267949 | taos> select radians(-90) radians(-90) | ============================ - -1.570796326794897 | + -1.5707963267949 | taos> select radians(360) radians(360) | ============================ - 6.283185307179586 | + 6.28318530717959 | taos> select radians(1000000) radians(1000000) | ============================ - 17453.292519943293883 | + 17453.2925199433 | taos> select radians(sin(1)) radians(sin(1)) | @@ -241,22 +241,22 @@ taos> select radians(sin(1)) taos> select radians(cos(1)) radians(cos(1)) | ============================ - 0.009430054193517 | + 0.00943005419351652 | taos> select radians(tan(1)) radians(tan(1)) | ============================ - 0.027181892591221 | + 0.0271818925912213 | taos> select radians(degrees(90)) radians(degrees(90)) | ============================ - 89.999999999999986 | + 90 | taos> select radians(atan(1)) radians(atan(1)) | ============================ - 0.013707783890402 | + 0.0137077838904019 | taos> select radians(current) from ts_4893.meters limit 1 radians(current) | @@ -266,10 +266,10 @@ taos> select radians(current) from ts_4893.meters limit 1 taos> select radians(voltage) from ts_4893.meters limit 1 radians(voltage) | ============================ - 3.857177646907469 | + 3.85717764690747 | taos> select radians(phase) from ts_4893.meters limit 1 radians(phase) | ============================ - 0.008881946002226 | + 0.0088819460022261 | diff --git a/tests/army/query/function/ans/rand.csv b/tests/army/query/function/ans/rand.csv index 98a096233c..2e87f3404f 100644 --- a/tests/army/query/function/ans/rand.csv +++ b/tests/army/query/function/ans/rand.csv @@ -7,8 +7,8 @@ taos> select RAND(1245) taos> select RAND(id) from ts_4893.d0 limit 10 rand(id) | ============================ - 0.840187717154710 | - 0.840187717154710 | + 0.84018771715471 | + 0.84018771715471 | 0.700976369297587 | 0.561380175203728 | 0.916457875592847 | @@ -35,12 +35,12 @@ taos> select RAND(id) from ts_4893.d0 order by id desc limit 10 taos> select rand(0) rand(0) | ============================ - 0.840187717154710 | + 0.84018771715471 | taos> select rand(1) rand(1) | ============================ - 0.840187717154710 | + 0.84018771715471 | taos> select rand(-1) rand(-1) | @@ -65,13 +65,13 @@ taos> select rand(12345), rand(12345) taos> select rand(9999999999) where rand(9999999999) >= 0 and rand(9999999999) < 1 rand(9999999999) | ============================ - 0.321409397442550 | + 0.32140939744255 | taos> select rand(id) from ts_4893.meters limit 100 rand(id) | ============================ - 0.840187717154710 | - 0.840187717154710 | + 0.84018771715471 | + 0.84018771715471 | 0.700976369297587 | 0.561380175203728 | 0.916457875592847 | @@ -89,22 +89,22 @@ taos> select rand(id) from ts_4893.meters limit 100 0.215437470104283 | 0.571794000254848 | 0.929072778173291 | - 0.290233385418650 | - 0.148812267532950 | + 0.29023338541865 | + 0.14881226753295 | 0.505899571117898 | 0.865026922367991 | 0.727581746283724 | - 0.087714229285584 | + 0.0877142292855839 | 0.939356191986872 | 0.795545781867367 | 0.659832971943465 | 0.517155105023251 | 0.875989373715589 | - 0.229967075041480 | + 0.22996707504148 | 0.592119012303706 | 0.449675684072858 | 0.307948935454688 | - 0.168970021497910 | + 0.16897002149791 | 0.524489704763745 | 0.381259786142623 | 0.239412393066758 | @@ -112,29 +112,29 @@ taos> select rand(id) from ts_4893.meters limit 100 0.957148446215851 | 0.819422913165494 | 0.670246056127477 | - 0.033469948001890 | + 0.0334699480018904 | 0.392149003405193 | 0.749737140606035 | - 0.608923980318440 | + 0.60892398031844 | 0.469695958061933 | 0.825680229266025 | 0.683865774275673 | - 0.041811583583155 | + 0.0418115835831555 | 0.894321223206036 | - 0.760580372885140 | + 0.76058037288514 | 0.615916447069457 | 0.977703406930763 | - 0.329537633959920 | - 0.193522962831670 | - 0.052021294390793 | + 0.32953763395992 | + 0.19352296283167 | + 0.0520212943907926 | 0.911150676622591 | 0.766549994129012 | 0.126697651635249 | - 0.985316422761100 | - 0.843173408342140 | + 0.9853164227611 | + 0.84317340834214 | 0.699550600116863 | 0.557263156192965 | - 0.419794161068180 | + 0.41979416106818 | 0.278590486048996 | 0.133239280028846 | 0.488706417143674 | @@ -147,25 +147,25 @@ taos> select rand(id) from ts_4893.meters limit 100 0.998458440880505 | 0.356983164025928 | 0.218767986269094 | - 0.076468908263589 | + 0.0764689082635888 | 0.431104593179703 | 0.293163777931204 | - 0.650123746902740 | + 0.65012374690274 | 0.510736836358317 | 0.864335399057872 | 0.725284450559544 | - 0.085677149279824 | + 0.0856771492798241 | 0.942077809917777 | 0.798407114482674 | 0.163865051774245 | - 0.017995767769402 | + 0.0179957677694018 | 0.879516513030751 | 0.736922031145972 | 0.589669372695344 | 0.954449085497507 | 0.811225361568493 | 0.172090128609953 | - 0.525153056031630 | + 0.52515305603163 | 0.386470556904781 | 0.744990266275122 | 0.100015020510189 | diff --git a/tests/army/query/function/ans/round.csv b/tests/army/query/function/ans/round.csv index 4f9151c1ad..2c185abd73 100644 --- a/tests/army/query/function/ans/round.csv +++ b/tests/army/query/function/ans/round.csv @@ -2,42 +2,42 @@ taos> select ROUND(10.55, 3) round(10.55, 3) | ============================ - 10.550000000000001 | + 10.55 | taos> select ROUND(10.55, 2) round(10.55, 2) | ============================ - 10.550000000000001 | + 10.55 | taos> select ROUND(10.55, 1) round(10.55, 1) | ============================ - 10.600000000000000 | + 10.6 | taos> select ROUND(10.55, 0) round(10.55, 0) | ============================ - 11.000000000000000 | + 11 | taos> select ROUND(10.55) round(10.55) | ============================ - 11.000000000000000 | + 11 | taos> select ROUND(10.55, -1) round(10.55, -1) | ============================ - 10.000000000000000 | + 10 | taos> select ROUND(10.55, -10) round(10.55, -10) | ============================ - 0.000000000000000 | + 0 | taos> select ROUND(-10.55, 1) round(-10.55, 1) | ============================ - -10.600000000000000 | + -10.6 | taos> select ROUND(99, 1) round(99, 1) | @@ -47,22 +47,22 @@ taos> select ROUND(99, 1) taos> select ROUND(111.1111) round(111.1111) | ============================ - 111.000000000000000 | + 111 | taos> select ROUND(111.5111) round(111.5111) | ============================ - 112.000000000000000 | + 112 | taos> select ROUND(10.55) + 1 round(10.55) + 1 | ============================ - 12.000000000000000 | + 12 | taos> select ROUND(10.55, 1) + 1 round(10.55, 1) + 1 | ============================ - 11.600000000000000 | + 11.6 | taos> select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123.123456789, 9), 8), 7), 6), 5), 4)) round(round(round(round(round(round(round(123.123456789, 9), 8), | @@ -77,26 +77,26 @@ taos> select ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(ROUND(123456789.123456789, -1), taos> select ROUND(current) from ts_4893.meters order by ts limit 20 round(current) | ======================= - 11.0000000 | - 9.0000000 | - 10.0000000 | - 11.0000000 | - 11.0000000 | - 9.0000000 | - 10.0000000 | - 11.0000000 | - 11.0000000 | - 10.0000000 | - 11.0000000 | - 9.0000000 | - 11.0000000 | - 8.0000000 | - 12.0000000 | - 9.0000000 | - 10.0000000 | - 10.0000000 | - 10.0000000 | - 10.0000000 | + 11 | + 9 | + 10 | + 11 | + 11 | + 9 | + 10 | + 11 | + 11 | + 10 | + 11 | + 9 | + 11 | + 8 | + 12 | + 9 | + 10 | + 10 | + 10 | + 10 | taos> select ROUND(87654321.123456789, id) from ts_4893.meters order by ts limit 10 round(87654321.123456789, id) | @@ -115,70 +115,70 @@ taos> select ROUND(87654321.123456789, id) from ts_4893.meters order by ts limit taos> select ROUND(current, id) from ts_4893.meters order by ts limit 10 round(current, id) | ======================= - 11.0000000 | - 8.6000004 | - 9.8000002 | - 11.2329998 | - 10.7060003 | - 8.5080004 | - 9.5959997 | - 10.9619999 | - 11.2259998 | - 10.3369999 | + 11 | + 8.6 | + 9.8 | + 11.233 | + 10.706 | + 8.508 | + 9.596 | + 10.962 | + 11.226 | + 10.337 | taos> select ROUND(current, 1) from ts_4893.meters order by ts limit 10 round(current, 1) | ======================= - 10.6999998 | - 8.6000004 | - 9.8000002 | - 11.1999998 | - 10.6999998 | - 8.5000000 | - 9.6000004 | - 11.0000000 | - 11.1999998 | - 10.3000002 | + 10.7 | + 8.6 | + 9.8 | + 11.2 | + 10.7 | + 8.5 | + 9.6 | + 11 | + 11.2 | + 10.3 | taos> select round(10.55, 3) round(10.55, 3) | ============================ - 10.550000000000001 | + 10.55 | taos> select round(10.55, 2) round(10.55, 2) | ============================ - 10.550000000000001 | + 10.55 | taos> select round(10.55, 1) round(10.55, 1) | ============================ - 10.600000000000000 | + 10.6 | taos> select round(10.55, 0) round(10.55, 0) | ============================ - 11.000000000000000 | + 11 | taos> select round(10.55) round(10.55) | ============================ - 11.000000000000000 | + 11 | taos> select round(10.55, -1) round(10.55, -1) | ============================ - 10.000000000000000 | + 10 | taos> select round(10.55, -10) round(10.55, -10) | ============================ - 0.000000000000000 | + 0 | taos> select round(-10.55, 1) round(-10.55, 1) | ============================ - -10.600000000000000 | + -10.6 | taos> select round(99, 1) round(99, 1) | @@ -188,30 +188,30 @@ taos> select round(99, 1) taos> select round(current) from ts_4893.d0 order by ts limit 10 round(current) | ======================= - 11.0000000 | - 9.0000000 | - 10.0000000 | - 11.0000000 | - 11.0000000 | - 9.0000000 | - 10.0000000 | - 11.0000000 | - 11.0000000 | - 10.0000000 | + 11 | + 9 | + 10 | + 11 | + 11 | + 9 | + 10 | + 11 | + 11 | + 10 | taos> select round(current) from ts_4893.meters order by ts limit 10 round(current) | ======================= - 11.0000000 | - 9.0000000 | - 10.0000000 | - 11.0000000 | - 11.0000000 | - 9.0000000 | - 10.0000000 | - 11.0000000 | - 11.0000000 | - 10.0000000 | + 11 | + 9 | + 10 | + 11 | + 11 | + 9 | + 10 | + 11 | + 11 | + 10 | taos> select round(10, null) round(10, null) | @@ -236,32 +236,32 @@ taos> select round(100) taos> select round(0.00123, -2) round(0.00123, -2) | ============================ - 0.000000000000000 | + 0 | taos> select round(123.456, 0) round(123.456, 0) | ============================ - 123.000000000000000 | + 123 | taos> select round(123.456, -5) round(123.456, -5) | ============================ - 0.000000000000000 | + 0 | taos> select round(12345.6789, -2) round(12345.6789, -2) | ============================ - 12300.000000000000000 | + 12300 | taos> select round(-123.456, 2) round(-123.456, 2) | ============================ - -123.459999999999994 | + -123.46 | taos> select round(-1234.5678, 2) round(-1234.5678, 2) | ============================ - -1234.569999999999936 | + -1234.57 | taos> select round(voltage, 0) from ts_4893.meters limit 1 round(voltage, 0) | @@ -271,12 +271,12 @@ taos> select round(voltage, 0) from ts_4893.meters limit 1 taos> select round(current, 1) from ts_4893.meters limit 1 round(current, 1) | ======================= - 10.6999998 | + 10.7 | taos> select round(phase, 3) from ts_4893.meters limit 1 round(phase, 3) | ======================= - 0.5090000 | + 0.509 | taos> select round(voltage, -1) from ts_4893.meters limit 1 round(voltage, -1) | @@ -296,17 +296,17 @@ taos> select round(abs(voltage), 2) from ts_4893.meters limit 1 taos> select round(pi() * phase, 3) from ts_4893.meters limit 1 round(pi() * phase, 3) | ============================ - 1.599000000000000 | + 1.599 | taos> select round(sqrt(voltage), 2) from ts_4893.meters limit 1 round(sqrt(voltage), 2) | ============================ - 14.869999999999999 | + 14.87 | taos> select round(log(current), 2) from ts_4893.meters limit 1 round(log(current), 2) | ============================ - 2.370000000000000 | + 2.37 | taos> select round(cast(1.0e+400 as float), 0); round(cast(1.0e+400 as float), 0) | diff --git a/tests/army/query/function/ans/sign.csv b/tests/army/query/function/ans/sign.csv index 45679af07f..f8fc961c2b 100644 --- a/tests/army/query/function/ans/sign.csv +++ b/tests/army/query/function/ans/sign.csv @@ -12,7 +12,7 @@ taos> select SIGN(1) taos> select SIGN(1.5) sign(1.5) | ============================ - 1.000000000000000 | + 1 | taos> select SIGN(100) sign(100) | @@ -27,7 +27,7 @@ taos> select SIGN(-1) taos> select SIGN(-1.5) sign(-1.5) | ============================ - -1.000000000000000 | + -1 | taos> select SIGN(-100) sign(-100) | @@ -37,22 +37,22 @@ taos> select SIGN(-100) taos> select SIGN(1) + 1 sign(1) + 1 | ============================ - 2.000000000000000 | + 2 | taos> select SIGN(1) - 1 sign(1) - 1 | ============================ - 0.000000000000000 | + 0 | taos> select SIGN(1) * 1 sign(1) * 1 | ============================ - 1.000000000000000 | + 1 | taos> select SIGN(1) / 1 sign(1) / 1 | ============================ - 1.000000000000000 | + 1 | taos> select SIGN(1) from ts_4893.meters limit 5 sign(1) | @@ -66,60 +66,60 @@ taos> select SIGN(1) from ts_4893.meters limit 5 taos> select SIGN(1) + 1 from ts_4893.meters limit 1 sign(1) + 1 | ============================ - 2.000000000000000 | + 2 | taos> select SIGN(1) - 1 from ts_4893.meters limit 1 sign(1) - 1 | ============================ - 0.000000000000000 | + 0 | taos> select SIGN(1) * 2 from ts_4893.meters limit 1 sign(1) * 2 | ============================ - 2.000000000000000 | + 2 | taos> select SIGN(1) / 2 from ts_4893.meters limit 1 sign(1) / 2 | ============================ - 0.500000000000000 | + 0.5 | taos> select SIGN(2) + SIGN(1) from ts_4893.meters limit 1 sign(2) + sign(1) | ============================ - 2.000000000000000 | + 2 | taos> select SIGN(2) - SIGN(1) from ts_4893.meters limit 1 sign(2) - sign(1) | ============================ - 0.000000000000000 | + 0 | taos> select SIGN(2) * SIGN(1) from ts_4893.meters limit 1 sign(2) * sign(1) | ============================ - 1.000000000000000 | + 1 | taos> select SIGN(2) / SIGN(1) from ts_4893.meters limit 1 sign(2) / sign(1) | ============================ - 1.000000000000000 | + 1 | taos> select SIGN(1) + id from ts_4893.meters order by ts limit 5 sign(1) + id | ============================ - 1.000000000000000 | - 2.000000000000000 | - 3.000000000000000 | - 4.000000000000000 | - 5.000000000000000 | + 1 | + 2 | + 3 | + 4 | + 5 | taos> select SIGN(id) + id from ts_4893.meters order by ts limit 5 sign(id) + id | ============================ - 0.000000000000000 | - 2.000000000000000 | - 3.000000000000000 | - 4.000000000000000 | - 5.000000000000000 | + 0 | + 2 | + 3 | + 4 | + 5 | taos> select sign(cast(1 as tinyint)) sign(cast(1 as tinyint)) | @@ -169,7 +169,7 @@ taos> select sign(cast(1 as float)) taos> select sign(cast(1 as double)) sign(cast(1 as double)) | ============================ - 1.000000000000000 | + 1 | taos> select sign(cast(NULL as tinyint)) sign(cast(null as tinyint)) | @@ -239,12 +239,12 @@ taos> select abs(SIGN(10)) taos> select pow(SIGN(10), 2) pow(sign(10), 2) | ============================ - 1.000000000000000 | + 1 | taos> select sqrt(SIGN(10)) sqrt(sign(10)) | ============================ - 1.000000000000000 | + 1 | taos> select cast(SIGN(10) as int) cast(sign(10) as int) | @@ -254,11 +254,11 @@ taos> select cast(SIGN(10) as int) taos> select SIGN(sqrt(id)) from ts_4893.meters order by ts limit 5 sign(sqrt(id)) | ============================ - 0.000000000000000 | - 1.000000000000000 | - 1.000000000000000 | - 1.000000000000000 | - 1.000000000000000 | + 0 | + 1 | + 1 | + 1 | + 1 | taos> select SIGN(SIGN(SIGN(SIGN(0)))) sign(sign(sign(sign(0)))) | @@ -288,30 +288,30 @@ taos> select sign(-10) taos> select sign(current) from ts_4893.d0 order by ts limit 10 sign(current) | ======================= - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | + 1 | + 1 | + 1 | + 1 | + 1 | + 1 | + 1 | + 1 | + 1 | + 1 | taos> select sign(current) from ts_4893.meters order by ts limit 10 sign(current) | ======================= - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | - 1.0000000 | + 1 | + 1 | + 1 | + 1 | + 1 | + 1 | + 1 | + 1 | + 1 | + 1 | taos> select sign(cast(current as float)) from ts_4893.d0 order by ts limit 10 sign(cast(current as float)) | @@ -359,17 +359,17 @@ taos> select sign(-10) taos> select sign(0.1) sign(0.1) | ============================ - 1.000000000000000 | + 1 | taos> select sign(-0.1) sign(-0.1) | ============================ - -1.000000000000000 | + -1 | taos> select sign(current) from ts_4893.meters limit 1 sign(current) | ======================= - 1.0000000 | + 1 | taos> select sign(voltage) from ts_4893.meters limit 1 sign(voltage) | @@ -379,7 +379,7 @@ taos> select sign(voltage) from ts_4893.meters limit 1 taos> select sign(phase) from ts_4893.meters limit 1 sign(phase) | ======================= - 1.0000000 | + 1 | taos> select sign(abs(voltage)) from ts_4893.meters limit 1 sign(abs(voltage)) | @@ -389,15 +389,15 @@ taos> select sign(abs(voltage)) from ts_4893.meters limit 1 taos> select sign(round(current)) from ts_4893.meters limit 1 sign(round(current)) | ======================= - 1.0000000 | + 1 | taos> select sign(sqrt(voltage)) from ts_4893.meters limit 1 sign(sqrt(voltage)) | ============================ - 1.000000000000000 | + 1 | taos> select sign(log(current + 1)) from ts_4893.meters limit 1 sign(log(current + 1)) | ============================ - 1.000000000000000 | + 1 | diff --git a/tests/army/query/function/ans/stddev.csv b/tests/army/query/function/ans/stddev.csv index 95af278013..c0f93a9bcd 100644 --- a/tests/army/query/function/ans/stddev.csv +++ b/tests/army/query/function/ans/stddev.csv @@ -2,7 +2,7 @@ taos> select STDDEV(current) from ts_4893.meters stddev(current) | ============================ - 1.154339668872967 | + 1.15433966887297 | taos> select STDDEV(current) from ts_4893.meters interval(1d) order by 1 limit 10 stddev(current) | @@ -21,40 +21,40 @@ taos> select STDDEV(current) from ts_4893.meters interval(1d) order by 1 limit 1 taos> select STDDEV(id) from ts_4893.meters stddev(id) | ============================ - 2886.751331514371941 | + 2886.75133151437 | taos> select STDDEV(id) from ts_4893.meters interval(1d) limit 10 stddev(id) | ============================ - 4.609772228646444 | - 8.366600265340756 | - 8.366600265340756 | - 8.366600265340756 | - 8.366600265340756 | - 8.077747210701755 | - 8.366600265340756 | - 8.366600265340756 | - 8.366600265340756 | - 8.366600265340756 | + 4.60977222864644 | + 8.36660026534076 | + 8.36660026534076 | + 8.36660026534076 | + 8.36660026534076 | + 8.07774721070176 | + 8.36660026534076 | + 8.36660026534076 | + 8.36660026534076 | + 8.36660026534076 | taos> select STDDEV(id) from ts_4893.meters where id > 100 stddev(id) | ============================ - 2857.595142773027419 | + 2857.59514277303 | taos> select STDDEV(id) from ts_4893.meters interval(1d) order by 1 limit 10 stddev(id) | ============================ - 4.609772228646444 | - 5.477225575051661 | - 8.077747210701755 | - 8.077747210701755 | - 8.077747210701755 | - 8.077747210701755 | - 8.077747210701755 | - 8.077747210701755 | - 8.077747210701755 | - 8.077747210701755 | + 4.60977222864644 | + 5.47722557505166 | + 8.07774721070176 | + 8.07774721070176 | + 8.07774721070176 | + 8.07774721070176 | + 8.07774721070176 | + 8.07774721070176 | + 8.07774721070176 | + 8.07774721070176 | taos> select stddev_pop(null) from ts_4893.meters stddev_pop(null) | @@ -64,32 +64,32 @@ taos> select stddev_pop(null) from ts_4893.meters taos> select stddev_pop(id) from ts_4893.d0 stddev_pop(id) | ============================ - 2886.751331514371941 | + 2886.75133151437 | taos> select stddev_pop(id) from ts_4893.meters stddev_pop(id) | ============================ - 2886.751331514371941 | + 2886.75133151437 | taos> select stddev_pop(current) from ts_4893.d0 stddev_pop(current) | ============================ - 1.154339668872967 | + 1.15433966887297 | taos> select stddev_pop(current) from ts_4893.meters stddev_pop(current) | ============================ - 1.154339668872967 | + 1.15433966887297 | taos> select stddev_pop(voltage) from ts_4893.meters stddev_pop(voltage) | ============================ - 2.876459705957324 | + 2.87645970595732 | taos> select stddev_pop(voltage) from ts_4893.meters where voltage is not null stddev_pop(voltage) | ============================ - 2.876459705957324 | + 2.87645970595732 | taos> select stddev_pop(phase) from ts_4893.meters stddev_pop(phase) | @@ -104,7 +104,7 @@ taos> select stddev_pop(phase) from ts_4893.meters where ts between '2023-01-01 taos> select stddev_pop(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location) stddev_pop(total_voltage) | ============================ - 0.000000000000000 | + 0 | taos> select round(stddev_pop(current), 2) from ts_4893.meters round(stddev_pop(current), 2) | @@ -124,15 +124,15 @@ taos> select log(stddev_pop(voltage) + 1) from ts_4893.meters taos> select groupid, stddev_pop(voltage) from ts_4893.meters group by groupid order by groupid groupid | stddev_pop(voltage) | ====================================== - 1 | 2.876459705957324 | + 1 | 2.87645970595732 | taos> select location, stddev_pop(current) from ts_4893.meters group by location order by location location | stddev_pop(current) | ================================================= - beijing | 1.154339668872967 | + beijing | 1.15433966887297 | taos> select location, stddev_pop(voltage) from ts_4893.meters group by location order by location location | stddev_pop(voltage) | ================================================= - beijing | 2.876459705957324 | + beijing | 2.87645970595732 | diff --git a/tests/army/query/function/ans/sum.csv b/tests/army/query/function/ans/sum.csv index 3444b3f710..0074b775b7 100644 --- a/tests/army/query/function/ans/sum.csv +++ b/tests/army/query/function/ans/sum.csv @@ -47,10 +47,10 @@ taos> select sum(cast(10000000000 as bigint unsigned)) taos> select sum(cast(1.1 as float)) sum(cast(1.1 as float)) | ============================ - 1.100000023841858 | + 1.10000002384186 | taos> select sum(cast(1.1 as double)) sum(cast(1.1 as double)) | ============================ - 1.100000000000000 | + 1.1 | diff --git a/tests/army/query/function/ans/trunc.csv b/tests/army/query/function/ans/trunc.csv index e553f3acb5..15411afbf3 100644 --- a/tests/army/query/function/ans/trunc.csv +++ b/tests/army/query/function/ans/trunc.csv @@ -2,37 +2,37 @@ taos> select TRUNCATE(10.55, 3) truncate(10.55, 3) | ============================ - 10.550000000000001 | + 10.55 | taos> select TRUNCATE(10.55, 2) truncate(10.55, 2) | ============================ - 10.550000000000001 | + 10.55 | taos> select TRUNCATE(10.55, 1) truncate(10.55, 1) | ============================ - 10.500000000000000 | + 10.5 | taos> select TRUNCATE(10.55, 0) truncate(10.55, 0) | ============================ - 10.000000000000000 | + 10 | taos> select TRUNCATE(10.55, -1) truncate(10.55, -1) | ============================ - 10.000000000000000 | + 10 | taos> select TRUNCATE(10.55, -10) truncate(10.55, -10) | ============================ - 0.000000000000000 | + 0 | taos> select TRUNCATE(-10.55, 1) truncate(-10.55, 1) | ============================ - -10.500000000000000 | + -10.5 | taos> select TRUNCATE(99, 1) truncate(99, 1) | @@ -42,7 +42,7 @@ taos> select TRUNCATE(99, 1) taos> select TRUNCATE(10.55, 1) + 1 truncate(10.55, 1) + 1 | ============================ - 11.500000000000000 | + 11.5 | taos> select TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(TRUNCATE(123.123456789, 9), 8), 7), 6), 5), 4), 3) truncate(truncate(truncate(truncate(truncate(truncate(truncate(1 | @@ -85,51 +85,51 @@ taos> select TRUNCATE(current, id) from ts_4893.meters order by ts limit 10 taos> select TRUNCATE(current, 1) from ts_4893.meters order by ts limit 10 truncate(current, 1) | ======================= - 10.6000004 | - 8.5000000 | - 9.6999998 | - 11.1999998 | - 10.6999998 | - 8.5000000 | - 9.5000000 | - 10.8999996 | - 11.1999998 | - 10.3000002 | + 10.6 | + 8.5 | + 9.7 | + 11.2 | + 10.7 | + 8.5 | + 9.5 | + 10.9 | + 11.2 | + 10.3 | taos> select TRUNC(10.55, 3) trunc(10.55, 3) | ============================ - 10.550000000000001 | + 10.55 | taos> select TRUNC(10.55, 2) trunc(10.55, 2) | ============================ - 10.550000000000001 | + 10.55 | taos> select TRUNC(10.55, 1) trunc(10.55, 1) | ============================ - 10.500000000000000 | + 10.5 | taos> select TRUNC(10.55, 0) trunc(10.55, 0) | ============================ - 10.000000000000000 | + 10 | taos> select TRUNC(10.55, -1) trunc(10.55, -1) | ============================ - 10.000000000000000 | + 10 | taos> select TRUNC(10.55, -10) trunc(10.55, -10) | ============================ - 0.000000000000000 | + 0 | taos> select TRUNC(-10.55, 1) trunc(-10.55, 1) | ============================ - -10.500000000000000 | + -10.5 | taos> select TRUNC(99, 1) trunc(99, 1) | @@ -139,7 +139,7 @@ taos> select TRUNC(99, 1) taos> select TRUNC(10.55, 1) + 1 trunc(10.55, 1) + 1 | ============================ - 11.500000000000000 | + 11.5 | taos> select TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(TRUNC(123.123456789, 9), 8), 7), 6), 5), 4), 3) trunc(trunc(trunc(trunc(trunc(trunc(trunc(123.123456789, 9), 8), | @@ -168,60 +168,60 @@ taos> select TRUNC(87654321.123456789, id) from ts_4893.meters order by ts limit taos> select TRUNC(current, id) from ts_4893.meters order by ts limit 10 trunc(current, id) | ======================= - 10.0000000 | - 8.5000000 | - 9.7900000 | - 11.2329998 | - 10.7060003 | - 8.5080004 | - 9.5959997 | - 10.9619999 | - 11.2259998 | - 10.3369999 | + 10 | + 8.5 | + 9.79 | + 11.233 | + 10.706 | + 8.508 | + 9.596 | + 10.962 | + 11.226 | + 10.337 | taos> select TRUNC(current, 1) from ts_4893.meters order by ts limit 10 trunc(current, 1) | ======================= - 10.6000004 | - 8.5000000 | - 9.6999998 | - 11.1999998 | - 10.6999998 | - 8.5000000 | - 9.5000000 | - 10.8999996 | - 11.1999998 | - 10.3000002 | + 10.6 | + 8.5 | + 9.7 | + 11.2 | + 10.7 | + 8.5 | + 9.5 | + 10.9 | + 11.2 | + 10.3 | taos> select truncate(99.99, 3) truncate(99.99, 3) | ============================ - 99.989999999999995 | + 99.99 | taos> select truncate(99.99, 2) truncate(99.99, 2) | ============================ - 99.989999999999995 | + 99.99 | taos> select truncate(99.99, 1) truncate(99.99, 1) | ============================ - 99.900000000000006 | + 99.9 | taos> select truncate(99.99, 0) truncate(99.99, 0) | ============================ - 99.000000000000000 | + 99 | taos> select truncate(99.99, -1) truncate(99.99, -1) | ============================ - 90.000000000000000 | + 90 | taos> select truncate(99.99, -10) truncate(99.99, -10) | ============================ - 0.000000000000000 | + 0 | taos> select truncate(99, 1) truncate(99, 1) | @@ -231,30 +231,30 @@ taos> select truncate(99, 1) taos> select truncate(current, 1) from ts_4893.d0 order by ts limit 10 truncate(current, 1) | ======================= - 10.6000004 | - 8.5000000 | - 9.6999998 | - 11.1999998 | - 10.6999998 | - 8.5000000 | - 9.5000000 | - 10.8999996 | - 11.1999998 | - 10.3000002 | + 10.6 | + 8.5 | + 9.7 | + 11.2 | + 10.7 | + 8.5 | + 9.5 | + 10.9 | + 11.2 | + 10.3 | taos> select truncate(current, 1) from ts_4893.meters order by ts limit 10 truncate(current, 1) | ======================= - 10.6000004 | - 8.5000000 | - 9.6999998 | - 11.1999998 | - 10.6999998 | - 8.5000000 | - 9.5000000 | - 10.8999996 | - 11.1999998 | - 10.3000002 | + 10.6 | + 8.5 | + 9.7 | + 11.2 | + 10.7 | + 8.5 | + 9.5 | + 10.9 | + 11.2 | + 10.3 | taos> select truncate(99.99, null) truncate(99.99, null) | @@ -269,22 +269,22 @@ taos> select truncate(null, 3) taos> select truncate(1.0001, 3) truncate(1.0001, 3) | ============================ - 1.000000000000000 | + 1 | taos> select truncate(2.71828, 4) truncate(2.71828, 4) | ============================ - 2.718200000000000 | + 2.7182 | taos> select truncate(3.14159, 2) truncate(3.14159, 2) | ============================ - 3.140000000000000 | + 3.14 | taos> select truncate(100.9876, 2) truncate(100.9876, 2) | ============================ - 100.980000000000004 | + 100.98 | taos> select truncate(99999999999999.9999, 2) truncate(99999999999999.9999, 2) | @@ -294,7 +294,7 @@ taos> select truncate(99999999999999.9999, 2) taos> select truncate(-5.678, 2) truncate(-5.678, 2) | ============================ - -5.670000000000000 | + -5.67 | taos> select truncate(voltage, 2) from ts_4893.meters limit 1 truncate(voltage, 2) | @@ -304,12 +304,12 @@ taos> select truncate(voltage, 2) from ts_4893.meters limit 1 taos> select truncate(current, 1) from ts_4893.meters limit 1 truncate(current, 1) | ======================= - 10.6000004 | + 10.6 | taos> select truncate(phase, 3) from ts_4893.meters limit 1 truncate(phase, 3) | ======================= - 0.5080000 | + 0.508 | taos> select truncate(voltage + current, 2) from ts_4893.meters limit 1 truncate(voltage + current, 2) | @@ -334,10 +334,10 @@ taos> select truncate(abs(current), 1) from ts_4893.meters limit 1 taos> select truncate(exp(phase), 2) from ts_4893.meters limit 1 truncate(exp(phase), 2) | ============================ - 1.660000000000000 | + 1.66 | taos> select truncate(log(current), 1) from ts_4893.meters limit 1 truncate(log(current), 1) | ============================ - 2.300000000000000 | + 2.3 | diff --git a/tests/army/query/function/ans/varpop.csv b/tests/army/query/function/ans/varpop.csv index 7cfb67dbea..829996d978 100644 --- a/tests/army/query/function/ans/varpop.csv +++ b/tests/army/query/function/ans/varpop.csv @@ -2,7 +2,7 @@ taos> select VAR_POP(current) from ts_4893.meters var_pop(current) | ============================ - 1.332500071133751 | + 1.33250007113375 | taos> select VAR_POP(current) from ts_4893.meters interval(1d) order by 1 limit 10 var_pop(current) | @@ -14,47 +14,47 @@ taos> select VAR_POP(current) from ts_4893.meters interval(1d) order by 1 limit 0.706550935286586 | 0.713306900568867 | 0.716868311383919 | - 0.717430738826280 | + 0.71743073882628 | 0.717718552465783 | 0.719483293517456 | taos> select VAR_POP(id) from ts_4893.meters var_pop(id) | ============================ - 8333333.250000000000000 | + 8333333.25 | taos> select VAR_POP(id) from ts_4893.meters interval(1d) limit 10 var_pop(id) | ============================ - 21.250000000000000 | - 70.000000000000000 | - 70.000000000000000 | - 70.000000000000000 | - 70.000000000000000 | - 65.250000000000000 | - 70.000000000000000 | - 70.000000000000000 | - 70.000000000000000 | - 70.000000000000000 | + 21.25 | + 70 | + 70 | + 70 | + 70 | + 65.25 | + 70 | + 70 | + 70 | + 70 | taos> select VAR_POP(id) from ts_4893.meters where id > 100 var_pop(id) | ============================ - 8165850.000000000000000 | + 8165850 | taos> select VAR_POP(id) from ts_4893.meters interval(1d) order by 1 limit 10 var_pop(id) | ============================ - 21.250000000000000 | - 30.000000000000000 | - 65.250000000000000 | - 65.250000000000000 | - 65.250000000000000 | - 65.250000000000000 | - 65.250000000000000 | - 65.250000000000000 | - 65.250000000000000 | - 65.250000000000000 | + 21.25 | + 30 | + 65.25 | + 65.25 | + 65.25 | + 65.25 | + 65.25 | + 65.25 | + 65.25 | + 65.25 | taos> select var_pop(null) from ts_4893.meters var_pop(null) | @@ -64,37 +64,37 @@ taos> select var_pop(null) from ts_4893.meters taos> select var_pop(id) from ts_4893.d0 var_pop(id) | ============================ - 8333333.250000000000000 | + 8333333.25 | taos> select var_pop(current) from ts_4893.d0 var_pop(current) | ============================ - 1.332500071133751 | + 1.33250007113375 | taos> select var_pop(voltage) from ts_4893.meters var_pop(voltage) | ============================ - 8.274020439996093 | + 8.27402043999609 | taos> select var_pop(voltage) from ts_4893.meters where voltage is not null var_pop(voltage) | ============================ - 8.274020439996093 | + 8.27402043999609 | taos> select var_pop(phase) from ts_4893.meters var_pop(phase) | ============================ - 0.083287338468169 | + 0.0832873384681693 | taos> select var_pop(phase) from ts_4893.meters where ts between '2023-01-01 00:00:00' and '2023-12-31 23:59:59' var_pop(phase) | ============================ - 0.082987411872200 | + 0.0829874118722003 | taos> select var_pop(total_voltage) from (select sum(voltage) as total_voltage from ts_4893.meters group by location) var_pop(total_voltage) | ============================ - 0.000000000000000 | + 0 | taos> select round(var_pop(current), 2) from ts_4893.meters round(var_pop(current), 2) | @@ -104,25 +104,25 @@ taos> select round(var_pop(current), 2) from ts_4893.meters taos> select pow(var_pop(current), 2) from ts_4893.meters pow(var_pop(current), 2) | ============================ - 1.775556439571451 | + 1.77555643957145 | taos> select log(var_pop(voltage) + 1) from ts_4893.meters log(var_pop(voltage) + 1) | ============================ - 2.227216989977633 | + 2.22721698997763 | taos> select groupid, var_pop(voltage) from ts_4893.meters group by groupid order by groupid groupid | var_pop(voltage) | ====================================== - 1 | 8.274020439996093 | + 1 | 8.27402043999609 | taos> select location, var_pop(current) from ts_4893.meters group by location order by location location | var_pop(current) | ================================================= - beijing | 1.332500071133751 | + beijing | 1.33250007113375 | taos> select location, var_pop(voltage) from ts_4893.meters group by location order by location location | var_pop(voltage) | ================================================= - beijing | 8.274020439996093 | + beijing | 8.27402043999609 | diff --git a/tests/army/query/function/cast.py b/tests/army/query/function/cast.py index af72f1de2c..977ec82697 100644 --- a/tests/army/query/function/cast.py +++ b/tests/army/query/function/cast.py @@ -265,8 +265,9 @@ class TDTestCase(TBase): tdSql.checkData(0, 0, 3.141) sql = f"select cast({float_1001} as binary(10)) as re;" + tdLog.debug(sql) tdSql.query(sql) - tdSql.checkData(0, 0, 3.141593) + tdSql.checkData(0, 0, 3.14159265) tdSql.query(f"select cast({float_1001} as nchar(5));") tdSql.checkData(0, 0, 3.141) @@ -540,6 +541,18 @@ class TDTestCase(TBase): tdSql.query(f"select cast({add1}+{test_str} as nchar(2)) re;") tdSql.checkData(0, 0, "12") + + def ts5972(self): + tdSql.execute("CREATE DATABASE IF NOT EXISTS ts5972;") + tdSql.execute("DROP TABLE IF EXISTS ts5972.t1;") + tdSql.execute("DROP TABLE IF EXISTS ts5972.t1;") + tdSql.execute("CREATE TABLE ts5972.t1(time TIMESTAMP, c0 DOUBLE);") + tdSql.execute("INSERT INTO ts5972.t1(time, c0) VALUES (1641024000000, 0.018518518518519), (1641024005000, 0.015151515151515), (1641024010000, 0.1234567891012345);") + tdSql.query("SELECT c0, CAST(c0 AS BINARY(50)) FROM ts5972.t1 WHERE CAST(c0 AS BINARY(50)) != c0;") + tdSql.checkRows(0) + tdSql.query("SELECT c0, CAST(c0 AS BINARY(50)) FROM ts5972.t1 WHERE CAST(c0 AS BINARY(50)) == c0;") + tdSql.checkRows(3) + def cast_without_from(self): self.cast_from_int_to_other() @@ -556,6 +569,7 @@ class TDTestCase(TBase): def run(self): # 'from table' case see system-test/2-query/cast.py self.cast_without_from() + self.ts5972() tdLog.success(f"{__file__} successfully executed") diff --git a/tests/army/query/queryBugs.py b/tests/army/query/queryBugs.py index 19459c9581..cd61b8c620 100644 --- a/tests/army/query/queryBugs.py +++ b/tests/army/query/queryBugs.py @@ -170,9 +170,166 @@ class TDTestCase(TBase): tdSql.checkData(0, 1, 2) tdSql.checkData(2, 1, 1) + def ts5946(self): + tdLog.info("check bug TD_xx ...\n") + sqls = [ + "drop database if exists ctg_tsdb", + "create database ctg_tsdb cachemodel 'both' stt_trigger 1;", + "use ctg_tsdb;", + "CREATE STABLE `stb_sxny_cn` (`dt` TIMESTAMP ENCODE 'delta-i' COMPRESS 'lz4' LEVEL 'medium', \ + `val` DOUBLE ENCODE 'delta-d' COMPRESS 'tsz' LEVEL 'medium') TAGS (`point` VARCHAR(50), \ + `point_name` VARCHAR(64), `point_path` VARCHAR(2000), `index_name` VARCHAR(64), \ + `country_equipment_code` VARCHAR(64), `index_code` VARCHAR(64), `ps_code` VARCHAR(50), \ + `cnstationno` VARCHAR(255), `index_level` VARCHAR(10), `cz_flag` VARCHAR(255), \ + `blq_flag` VARCHAR(255), `dcc_flag` VARCHAR(255))", + + + "CREATE STABLE `stb_popo_power_station_all` (`ts` TIMESTAMP ENCODE 'delta-i' COMPRESS 'lz4' LEVEL 'medium', \ + `assemble_capacity` DOUBLE ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium', `ps_status` DOUBLE ENCODE \ + 'delta-d' COMPRESS 'lz4' LEVEL 'medium') TAGS (`ps_type` VARCHAR(255), `ps_type_code` VARCHAR(255), \ + `belorg_name` VARCHAR(255), `belorg_code` VARCHAR(255), `country_code` VARCHAR(255), `country_name` \ + VARCHAR(255), `area_name` VARCHAR(255), `area_code` VARCHAR(255), `ps_name` VARCHAR(255), `ps_code` \ + VARCHAR(255), `ps_aab` VARCHAR(255), `ps_type_sec_lvl` VARCHAR(255), `ps_type_sec_lvl_name` VARCHAR(255), \ + `ps_type_name` VARCHAR(255), `longitude` DOUBLE, `latitude` DOUBLE, `is_china` VARCHAR(255), `is_access` \ + VARCHAR(255), `first_put_production_date` VARCHAR(255), `all_put_production_date` VARCHAR(255), `merge_date` \ + VARCHAR(255), `sold_date` VARCHAR(255), `cap_detail` VARCHAR(500), `ps_unit` VARCHAR(255), `region_name` \ + VARCHAR(255))", + ] + + + tdSql.executes(sqls) + + ts = 1657146000000 + + # create subtable and insert data for super table stb_sxny_cn + for i in range(1, 1000): + sql = f"CREATE TABLE `stb_sxny_cn_{i}` USING `stb_sxny_cn` (point, point_name, point_path, index_name, country_equipment_code, \ + index_code, ps_code, cnstationno, index_level, cz_flag, blq_flag, dcc_flag) TAGS('point{i}', 'point_name{i}', 'point_path{i}', 'index_name{i}', \ + 'country_equipment_code{i}', 'index_code{i}', 'ps_code{i%500}', 'cnstationno{i}', '{i}', 'cz_flag{i}', 'blq_flag{i}', 'dcc_flag{i}');" + tdSql.execute(sql) + sql = f"INSERT INTO `stb_sxny_cn_{i}` VALUES " + values = [] + for j in range(1, 100): + values.append(f"({ts+(i%5)*86400000 + j}, {i%500 + j/20})") + sql += ", ".join(values) + tdSql.execute(sql) + tdLog.debug(f"create table stb_sxny_cn_{i} and insert data successfully") + + # create subtable and insert data for super table stb_popo_power_station_all + for i in range(1, 1000): + sql = f"CREATE TABLE `stb_popo_power_station_all_{i}` USING `stb_popo_power_station_all` (ps_type, ps_type_code, belorg_name, belorg_code, \ + country_code, country_name, area_name, area_code, ps_name, ps_code, ps_aab, ps_type_sec_lvl, ps_type_sec_lvl_name, ps_type_name, \ + longitude, latitude, is_china, is_access, first_put_production_date, all_put_production_date, merge_date, sold_date, cap_detail, ps_unit, \ + region_name) TAGS ('ps_type{i}', 'ps_type_code{i}', 'belorg_name{i}', 'belorg_code{i}', 'country_code{i}', 'country_name{i}', 'area_name{i}', \ + 'area_code{i}', 'ps_name{i}', 'ps_code{i}', 'ps_aab{i}', 'ps_type_sec_lvl{i}', 'ps_type_sec_lvl_name{i}', 'ps_type_name{i}', {i}, \ + {i}, 'is_china{i}', 'is_access{i}', 'first_put_production_date{i}', 'all_put_production_date{i}', 'merge_date{i}', 'sold_date{i}', \ + 'cap_detail{i}', 'ps_unit{i}', 'region_name{i}');" + tdSql.execute(sql) + sql = f"INSERT INTO `stb_popo_power_station_all_{i}` VALUES " + values = [] + for j in range(1, 6): + values.append(f"({ts+(j-1)*86400000}, {i*10 + j%10}, {j})") + sql += ", ".join(values) + tdSql.execute(sql) + tdLog.debug(f"create table stb_popo_power_station_all_{i} and insert data successfully") + + for i in range(1, 499, 20): + pscode = f"ps_code{i}" + + querySql = f"select t2.ts ,tt.ps_code,t2.ps_code from \ + ( select TIMETRUNCATE(t1.dt, 1d, 1) dt, t1.ps_code, first(dt) \ + from ctg_tsdb.stb_sxny_cn t1 where ps_code<>'0' and dt >= '2022-07-07 00:00:00.000' \ + and t1.ps_code='{pscode}' partition by point state_window(cast(val as int)) order by \ + TIMETRUNCATE(t1.dt, 1d, 0) ) tt \ + left join ctg_tsdb.stb_popo_power_station_all t2 \ + on TIMETRUNCATE(tt.dt, 1d, 1)=TIMETRUNCATE(t2.ts, 1d, 1) \ + and tt.ps_code = t2.ps_code " + tdSql.query(querySql) + tdSql.checkData(0, 1, pscode) + tdSql.checkData(0, 2, pscode) + tdLog.debug(f"execute sql: {pscode}") + + querySql = f"select t2.ts ,tt.ps_code,t2.ps_code from ( select last(t1.dt) dt, t1.ps_code, first(dt) \ + from ctg_tsdb.stb_sxny_cn t1 where ps_code<>'0' and dt >= '2022-07-07 00:00:00.000' and \ + t1.ps_code='{pscode}' group by tbname order by dt) tt left join \ + ctg_tsdb.stb_popo_power_station_all t2 on TIMETRUNCATE(tt.dt, 1d, 1)=TIMETRUNCATE(t2.ts, 1d, 1) \ + and tt.ps_code = t2.ps_code" + tdSql.query(querySql) + tdSql.checkData(0, 1, pscode) + tdSql.checkData(0, 2, pscode) + tdLog.debug(f"execute sql: {pscode}") + + querySql = f"select t2.ts ,tt.ps_code,t2.ps_code from ( select last(t1.dt) dt, last(ps_code) ps_code \ + from ctg_tsdb.stb_sxny_cn t1 where ps_code<>'0' and dt >= '2022-07-07 00:00:00.000' and \ + t1.ps_code='{pscode}' order by dt) tt left join ctg_tsdb.stb_popo_power_station_all t2 on \ + TIMETRUNCATE(tt.dt, 1d, 1)=TIMETRUNCATE(t2.ts, 1d, 1) and tt.ps_code = t2.ps_code" + tdSql.query(querySql) + tdSql.checkData(0, 1, pscode) + tdSql.checkData(0, 2, pscode) + tdLog.debug(f"execute sql: {pscode}") + + querySql = f"select t2.ts ,tt.ps_code,t2.ps_code from ( select _wstart dt, t1.ps_code, first(dt) \ + from ctg_tsdb.stb_sxny_cn t1 where ps_code<>'0' and dt >= '2022-07-07 00:00:00.000' and \ + t1.ps_code='{pscode}' interval(1m) order by dt) tt left join ctg_tsdb.stb_popo_power_station_all t2 \ + on TIMETRUNCATE(tt.dt, 1d, 1)=TIMETRUNCATE(t2.ts, 1d, 1) and tt.ps_code = t2.ps_code" + tdSql.query(querySql) + tdSql.checkData(0, 1, pscode) + tdSql.checkData(0, 2, pscode) + tdLog.debug(f"execute sql: {pscode}") + + querySql = f"select t2.ts ,tt.ps_code,t2.ps_code from (select first(dt) dt, t1.ps_code from \ + ctg_tsdb.stb_sxny_cn t1 where ps_code<>'0' and dt >= '2022-07-07 00:00:00.000' and t1.ps_code='{pscode}' \ + session(dt, 1m) order by dt) tt left join ctg_tsdb.stb_popo_power_station_all t2 on \ + TIMETRUNCATE(tt.dt, 1d, 1)=TIMETRUNCATE(t2.ts, 1d, 1) and tt.ps_code = t2.ps_code" + tdSql.query(querySql) + tdSql.checkData(0, 1, pscode) + tdSql.checkData(0, 2, pscode) + tdLog.debug(f"execute sql: {pscode}") + + def FIX_TS_5984(self): + tdLog.info("check bug TS_5984 ...\n") + # prepare data + sqls = [ + "drop database if exists ts_5984;", + "create database ts_5984 minrows 10;", + "use ts_5984;", + "create table t1 (ts timestamp, str varchar(10) primary key, c1 int);", + """insert into t1 values + ('2025-01-01 00:00:00', 'a', 1), + ('2025-01-01 00:00:00', 'b', 2), + ('2025-01-01 00:00:00', 'c', 3), + ('2025-01-01 00:00:00', 'd', 4), + ('2025-01-01 00:00:00', 'e', 5), + ('2025-01-01 00:00:00', 'f', 6), + ('2025-01-01 00:00:00', 'g', 7), + ('2025-01-01 00:00:00', 'h', 8), + ('2025-01-01 00:00:00', 'i', 9), + ('2025-01-01 00:00:00', 'j', 10), + ('2025-01-01 00:00:00', 'k', 11), + ('2025-01-01 00:00:00', 'l', 12), + ('2025-01-01 00:00:00', 'm', 13), + ('2025-01-01 00:00:00', 'n', 14);""" + ] + tdSql.executes(sqls) + # do flush and compact + tdSql.execute("flush database ts_5984;") + time.sleep(3) + tdSql.execute("compact database ts_5984;") + while True: + tdSql.query("show compacts;") + # break if no compact task + if tdSql.getRows() == 0: + break + time.sleep(3) + + tdSql.query("select * from t1 where ts > '2025-01-01 00:00:00';") + tdSql.checkRows(0) + # run def run(self): tdLog.debug(f"start to excute {__file__}") + + self.ts5946() # TD BUGS self.FIX_TD_30686() @@ -182,6 +339,7 @@ class TDTestCase(TBase): self.FIX_TS_5105() self.FIX_TS_5143() self.FIX_TS_5239() + self.FIX_TS_5984() tdLog.success(f"{__file__} successfully executed") diff --git a/tests/army/query/test_case_when.py b/tests/army/query/test_case_when.py index e772914183..101311d6c0 100644 --- a/tests/army/query/test_case_when.py +++ b/tests/army/query/test_case_when.py @@ -142,13 +142,14 @@ class TDTestCase(TBase): assert(tdSql.checkRows(10) and all([item[0] is None for item in tdSql.res])) tdSql.query("select case when c_float is not null then c_float else c_null end from st1;") - assert(tdSql.checkRows(10) and tdSql.res == [('2.200000',), ('3.300000',), ('4.400000',), ('5.500000',), ('6.600000',), ('7.700000',), ('8.800000',), ('9.900000',), ('10.100000',), (None,)]) + assert(tdSql.checkRows(10) and tdSql.res == [('2.2',), ('3.3',), ('4.4',), ('5.5',), ('6.6',), ('7.7',), ('8.8',), ('9.9',), ('10.1',), (None,)]) tdSql.query("select case when c_double is null then c_double else c_null end from st1;") assert(tdSql.checkRows(10) and all([item[0] is None for item in tdSql.res])) - + tdSql.query("select case when c_double is not null then c_double else c_null end from st1;") - assert(tdSql.checkRows(10) and tdSql.res == [('2.220000',), ('3.330000',), ('4.440000',), ('5.550000',), ('6.660000',), ('7.770000',), ('8.880000',), ('9.990000',), ('10.101000',), (None,)]) + + assert(tdSql.checkRows(10) and tdSql.res == [('2.22',), ('3.33',), ('4.44',), ('5.55',), ('6.66',), ('7.77',), ('8.88',), ('9.99',), ('10.101',), (None,)]) tdSql.query("select case when c_varchar is null then c_varchar else c_null end from st1;") assert(tdSql.checkRows(10) and all([item[0] is None for item in tdSql.res])) @@ -344,7 +345,8 @@ class TDTestCase(TBase): assert(tdSql.checkRows(10) and tdSql.res == [('-2147483648',), ('three',), ('4294967295',), ('4294967295',), ('4294967295',), ('4294967295',), ('4294967295',), ('4294967295',), ('4294967295',), ('4294967295',)]) tdSql.query("select case c_float when 2.2 then 9.2233720e+18 when 3.3 then -9.2233720e+18 else 'aa' end from st1;") - assert(tdSql.checkRows(10) and tdSql.res == [('9223372000000000000.000000',), ('-9223372000000000000.000000',), ('aa',), ('aa',), ('aa',), ('aa',), ('aa',), ('aa',), ('aa',), ('aa',)]) + print(tdSql.res) + assert(tdSql.checkRows(10) and tdSql.res == [('9.223372e+18',), ('-9.223372e+18',), ('aa',), ('aa',), ('aa',), ('aa',), ('aa',), ('aa',), ('aa',), ('aa',)]) tdSql.query("select case t1.c_int when 2 then 'run' when t1.c_int is null then 'other' else t2.c_varchar end from st1 t1, st2 t2 where t1.ts=t2.ts;") print(tdSql.res) diff --git a/tests/develop-test/2-query/show_create_db.py b/tests/develop-test/2-query/show_create_db.py index 16e9b1d62c..949760835c 100644 --- a/tests/develop-test/2-query/show_create_db.py +++ b/tests/develop-test/2-query/show_create_db.py @@ -22,10 +22,37 @@ class TDTestCase: tdDnodes.startWithoutSleep(index) tdSql.execute(f"use scd") + def showCreateDbCheck(self, dbname, expectShowCreateDb, maxRetry=30, dropDbAndRecheck=False, dropDbAfterCheck=False): + retry_count = 0 + success = False + while retry_count < maxRetry and not success: + try: + tdSql.query(f"show create database {dbname};") + tdSql.checkRows(1) + tdSql.checkData(0, 0, dbname) + tdSql.checkEqual(tdSql.queryResult[0][1], expectShowCreateDb) + tdLog.info(f"check passed after {retry_count} seconds") + success = True + except Exception as e: + retry_count += 1 + tdLog.info(f"Attempt to check {retry_count} time(s): show create database {dbname}") + if retry_count >= maxRetry: + raise Exception(repr(e)) + time.sleep(1) + if dropDbAndRecheck == True: + tdSql.execute(f"drop database if exists {dbname}") + tdSql.execute(expectShowCreateDb) + tdSql.query(f"show create database {dbname};") + tdSql.checkRows(1) + tdSql.checkData(0, 0, dbname) + tdSql.checkData(0, 1, expectShowCreateDb) + if dropDbAfterCheck == True: + tdSql.execute(f"drop database if exists {dbname}") + def run(self): print("running {}".format(__file__)) tdSql.execute("drop database if exists scd") - tdSql.execute("create database if not exists scd compact_interval 0") + tdSql.execute("create database if not exists scd compact_interval 0 keep_time_offset 0") tdSql.execute('use scd') tdSql.execute('create table stb1 (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(10), c9 nchar(10), c10 tinyint unsigned, c11 smallint unsigned, c12 int unsigned, c13 bigint unsigned) TAGS(t1 int, t2 binary(10), t3 double);') @@ -35,44 +62,24 @@ class TDTestCase: tdSql.execute("create table tb3 using stb1 tags(3,'3',3.0);") - tdSql.execute('create database scd2 stt_trigger 3 compact_interval 1;') + tdSql.execute('create database scd2 stt_trigger 3 compact_interval 1 keep_time_offset 0h;') tdSql.execute('create database scd4 stt_trigger 13 compact_interval 12h compact_time_range -60,-10 compact_time_offset 23h;') - tdSql.query('show create database scd;') - tdSql.checkRows(1) - tdSql.checkData(0, 0, 'scd') - tdSql.checkData(0, 1, "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0h ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 0d COMPACT_TIME_RANGE 0d,0d COMPACT_TIME_OFFSET 0h") + self.showCreateDbCheck('scd', "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 0d COMPACT_TIME_RANGE 0d,0d COMPACT_TIME_OFFSET 0h") - tdSql.query('show create database scd2;') - tdSql.checkRows(1) - tdSql.checkData(0, 0, 'scd2') - tdSql.checkData(0, 1, "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0h ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 1d COMPACT_TIME_RANGE 0d,0d COMPACT_TIME_OFFSET 0h") - - tdSql.query('show create database scd4') - tdSql.checkRows(1) - tdSql.checkData(0, 0, 'scd4') - tdSql.checkData(0, 1, "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0h ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 12h COMPACT_TIME_RANGE -60d,-10d COMPACT_TIME_OFFSET 23h") + self.showCreateDbCheck('scd2', "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 1d COMPACT_TIME_RANGE 0d,0d COMPACT_TIME_OFFSET 0h") + self.showCreateDbCheck('scd4', "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 12h COMPACT_TIME_RANGE -60d,-10d COMPACT_TIME_OFFSET 23h") self.restartTaosd(1, dbname='scd') + tdLog.info("recheck after restart taosd") + self.showCreateDbCheck('scd', "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 0d COMPACT_TIME_RANGE 0d,0d COMPACT_TIME_OFFSET 0h", 30, True, True) - tdSql.query('show create database scd;') - tdSql.checkRows(1) - tdSql.checkData(0, 0, 'scd') - tdSql.checkData(0, 1, "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0h ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 0d COMPACT_TIME_RANGE 0d,0d COMPACT_TIME_OFFSET 0h") + self.showCreateDbCheck('scd2', "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 1d COMPACT_TIME_RANGE 0d,0d COMPACT_TIME_OFFSET 0h", 30, True, True) - tdSql.query('show create database scd2;') - tdSql.checkRows(1) - tdSql.checkData(0, 0, 'scd2') - tdSql.checkData(0, 1, "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0h ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 1d COMPACT_TIME_RANGE 0d,0d COMPACT_TIME_OFFSET 0h") - tdSql.query('show create database scd4') - tdSql.checkRows(1) - tdSql.checkData(0, 0, 'scd4') - tdSql.checkData(0, 1, "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0h ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 12h COMPACT_TIME_RANGE -60d,-10d COMPACT_TIME_OFFSET 23h") + self.showCreateDbCheck('scd4', "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 12h COMPACT_TIME_RANGE -60d,-10d COMPACT_TIME_OFFSET 23h", 30, True, True) - - tdSql.execute('drop database scd') def stop(self): tdSql.close() tdLog.success("%s successfully executed" % __file__) diff --git a/tests/pytest/util/sql.py b/tests/pytest/util/sql.py index cdfe3ce8a0..8d247a690a 100644 --- a/tests/pytest/util/sql.py +++ b/tests/pytest/util/sql.py @@ -414,6 +414,29 @@ class TDSql: self.checkRowCol(row, col) return self.cursor.istype(col, dataType) + def checkFloatString(self, row, col, data, show = False): + if row >= self.queryRows: + caller = inspect.getframeinfo(inspect.stack()[1][0]) + args = (caller.filename, caller.lineno, self.sql, row+1, self.queryRows) + tdLog.exit("%s(%d) failed: sql:%s, row:%d is larger than queryRows:%d" % args) + if col >= self.queryCols: + caller = inspect.getframeinfo(inspect.stack()[1][0]) + args = (caller.filename, caller.lineno, self.sql, col+1, self.queryCols) + tdLog.exit("%s(%d) failed: sql:%s, col:%d is larger than queryCols:%d" % args) + + self.checkRowCol(row, col) + + val = float(self.queryResult[row][col]) + if abs(data) >= 1 and abs((val - data) / data) <= 0.000001: + if(show): + tdLog.info("check successfully") + elif abs(data) < 1 and abs(val - data) <= 0.000001: + if(show): + tdLog.info("check successfully") + else: + caller = inspect.getframeinfo(inspect.stack()[1][0]) + args = (caller.filename, caller.lineno, self.sql, row, col, self.queryResult[row][col], data) + tdLog.exit("%s(%d) failed: sql:%s row:%d col:%d data:%s != expect:%s" % args) def checkData(self, row, col, data, show = False): if row >= self.queryRows: diff --git a/tests/script/tsim/join/join_nested.sim b/tests/script/tsim/join/join_nested.sim index 77785c9d4d..ed84e7d1aa 100644 --- a/tests/script/tsim/join/join_nested.sim +++ b/tests/script/tsim/join/join_nested.sim @@ -32,6 +32,13 @@ sql select a.t1 from (select * from sta partition by tbname order by ts desc) a if $rows != 12 then return -1 endi +sql select a.ts from (select last(tba1.ts) as ts from tba1, tba2 where tba1.ts = tba2.ts) as a join (select ts from tba2) as tba2 on a.ts = tba2.ts; +if $rows != 1 then + return -1 +endi +if $data00 != @23-11-17 16:29:03.000@ then + return -1 +endi #left join + non join sql_error select a.*,b.* from (select * from sta partition by tbname) a left join (select * from sta partition by tbname order by ts) b on a.ts = b.ts; diff --git a/tests/script/tsim/scalar/caseWhen.sim b/tests/script/tsim/scalar/caseWhen.sim index 4753e24513..0fbec52572 100644 --- a/tests/script/tsim/scalar/caseWhen.sim +++ b/tests/script/tsim/scalar/caseWhen.sim @@ -397,7 +397,7 @@ sql select case when f1 then f1 when f1 + 1 then f1 + 1 else f1 is null end from if $rows != 4 then return -1 endi -if $data00 != 1.000000 then +if $data00 != 1 then return -1 endi if $data10 != 1 then @@ -659,10 +659,10 @@ endi if $data00 != 0 then return -1 endi -if $data10 != 10.000000 then +if $data10 != 10 then return -1 endi -if $data20 != 50.000000 then +if $data20 != 50 then return -1 endi if $data30 != -1 then @@ -889,19 +889,19 @@ endi if $data10 != 0 then return -1 endi -if $data11 != -99.000000 then +if $data11 != -99 then return -1 endi if $data20 != 1 then return -1 endi -if $data21 != 100.000000 then +if $data21 != 100 then return -1 endi if $data30 != 5 then return -1 endi -if $data31 != -94.000000 then +if $data31 != -94 then return -1 endi @@ -1028,7 +1028,7 @@ endi if $data00 != NULL then return -1 endi -if $data10 != -99.000000 then +if $data10 != -99 then return -1 endi if $data20 != 1 then @@ -1051,10 +1051,10 @@ endi if $data21 != NULL then return -1 endi -if $data31 != 101.000000 then +if $data31 != 101 then return -1 endi -if $data41 != 103.000000 then +if $data41 != 103 then return -1 endi @@ -1071,7 +1071,7 @@ sql select case when c_int > 100 then c_float else c_int end as result from t_te if $rows != 1 then return -1 endi -if $data00 != 123.449997 then +if $data00 != 123.45 then return -1 endi @@ -1079,7 +1079,7 @@ sql select case when c_bigint > 100000 then c_double else c_bigint end as result if $rows != 1 then return -1 endi -if $data00 != 678.900000 then +if $data00 != 678.9 then return -1 endi diff --git a/tests/script/tsim/show/basic.sim b/tests/script/tsim/show/basic.sim index 7569cd832c..0acb97f1b6 100644 --- a/tests/script/tsim/show/basic.sim +++ b/tests/script/tsim/show/basic.sim @@ -230,7 +230,7 @@ endi sql_error show create stable t0; sql show variables; -if $rows != 93 then +if $rows != 88 then return -1 endi diff --git a/tests/script/tsim/stream/streamTwaInterpFwc.sim b/tests/script/tsim/stream/streamTwaInterpFwc.sim index 050e0282e2..34e6ed8cb7 100644 --- a/tests/script/tsim/stream/streamTwaInterpFwc.sim +++ b/tests/script/tsim/stream/streamTwaInterpFwc.sim @@ -435,7 +435,7 @@ if $data01 != @t12@ then return -1 endi -if $data03 != @100000.000@ then +if $data03 != @100000@ then return -1 endi diff --git a/tests/script/tsim/valgrind/checkError1.sim b/tests/script/tsim/valgrind/checkError1.sim index 64f9cdec1f..8ac43ebaf3 100644 --- a/tests/script/tsim/valgrind/checkError1.sim +++ b/tests/script/tsim/valgrind/checkError1.sim @@ -120,7 +120,7 @@ if $rows != 3 then endi sql show variables; -if $rows != 93 then +if $rows != 88 then return -1 endi diff --git a/tests/system-test/1-insert/alter_database.py b/tests/system-test/1-insert/alter_database.py index 17a0664926..ad44182366 100644 --- a/tests/system-test/1-insert/alter_database.py +++ b/tests/system-test/1-insert/alter_database.py @@ -98,13 +98,61 @@ class TDTestCase: tdSql.query(option_sql) index += 1 tdSql.execute('drop database db') + + def showCreateDbCheck(self, dbname, expectShowCreateDb, maxRetry=30, dropDbAndRecheck=False, dropDbAfterCheck=False): + retry_count = 0 + success = False + while retry_count < maxRetry and not success: + try: + tdSql.query(f"show create database {dbname};") + tdSql.checkRows(1) + tdSql.checkData(0, 0, dbname) + tdSql.checkEqual(tdSql.queryResult[0][1], expectShowCreateDb) + tdLog.info(f"check passed after {retry_count} seconds") + success = True + except Exception as e: + retry_count += 1 + tdLog.info(f"Attempt to check {retry_count} time(s): show create database {dbname}") + if retry_count >= maxRetry: + raise Exception(repr(e)) + time.sleep(1) + if dropDbAndRecheck == True: + tdSql.execute(f"drop database if exists {dbname}") + tdSql.execute(expectShowCreateDb) + tdSql.query(f"show create database {dbname};") + tdSql.checkRows(1) + tdSql.checkData(0, 0, dbname) + tdSql.checkData(0, 1, expectShowCreateDb) + if dropDbAfterCheck == True: + tdSql.execute(f"drop database if exists {dbname}") + + def alter_keep_time_offset(self): + tdSql.execute('drop database if exists db') + tdSql.checkEqual("Invalid option keep_time_offset unit: d, only h allowed", tdSql.error('create database db keep_time_offset 0d')) + tdSql.checkEqual("syntax error near \"-1\"", tdSql.error('create database db keep_time_offset -1')) + tdSql.checkEqual("syntax error near \"-100h\"", tdSql.error('create database db keep_time_offset -100h')) + tdSql.checkEqual("Invalid option keep_time_offset: 24 valid range: [0, 23]", tdSql.error('create database db keep_time_offset 24h')) + tdSql.execute('create database db keep_time_offset 20h') + self.showCreateDbCheck('db', "CREATE DATABASE `db` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 20 ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 0d COMPACT_TIME_RANGE 0d,0d COMPACT_TIME_OFFSET 0h", 30, True, False) + tdSql.checkEqual("Invalid option keep_time_offset unit: d, only h allowed", tdSql.error('alter database db keep_time_offset 0d')) + tdSql.checkEqual("syntax error near \"-1\"", tdSql.error('alter database db keep_time_offset -1')) + tdSql.checkEqual("syntax error near \"-100h\"", tdSql.error('alter database db keep_time_offset -100h')) + tdSql.checkEqual("Invalid option keep_time_offset: 24 valid range: [0, 23]", tdSql.error('alter database db keep_time_offset 24h')) + tdLog.info('alter database db keep_time_offset 23h') + tdSql.execute('alter database db keep_time_offset 23h') + self.showCreateDbCheck('db', "CREATE DATABASE `db` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 23 ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 0d COMPACT_TIME_RANGE 0d,0d COMPACT_TIME_OFFSET 0h", 30, True, False) + tdLog.info('alter database db keep_time_offset 0') + tdSql.execute('alter database db keep_time_offset 0') + self.showCreateDbCheck('db', "CREATE DATABASE `db` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKPAGES 131072 S3_KEEPLOCAL 525600m S3_COMPACT 1 COMPACT_INTERVAL 0d COMPACT_TIME_RANGE 0d,0d COMPACT_TIME_OFFSET 0h", 30, True, True) + def run(self): self.alter_buffer() self.alter_pages() self.alter_encrypt_alrogithm() self.alter_same_options() + self.alter_keep_time_offset() def stop(self): tdSql.close() diff --git a/tests/system-test/2-query/cast.py b/tests/system-test/2-query/cast.py index 11013e09a8..298039f7cc 100644 --- a/tests/system-test/2-query/cast.py +++ b/tests/system-test/2-query/cast.py @@ -305,30 +305,30 @@ class TDTestCase: tdLog.printNoPrefix("==========step21: cast float to binary, expect changes to str(int) ") tdSql.query(f"select cast(c5 as binary(32)) as b from {self.dbname}.ct4") for i in range(len(data_ct4_c5)): - tdSql.checkData( i, 0, str(data_ct4_c5[i]) ) if data_ct4_c5[i] is None else tdSql.checkData( i, 0, f'{data_ct4_c5[i]:.6f}' ) + tdSql.checkData( i, 0, str(data_ct4_c5[i]) ) if data_ct4_c5[i] is None else tdSql.checkFloatString( i, 0, data_ct4_c5[i]) tdSql.query(f"select cast(c5 as binary(32)) as b from {self.dbname}.t1") for i in range(len(data_t1_c5)): - tdSql.checkData( i, 0, str(data_t1_c5[i]) ) if data_t1_c5[i] is None else tdSql.checkData( i, 0, f'{data_t1_c5[i]:.6f}' ) + tdSql.checkData( i, 0, str(data_t1_c5[i]) ) if data_t1_c5[i] is None else tdSql.checkFloatString( i, 0, data_t1_c5[i]) tdSql.query(f"select cast(c5 as binary) as b from {self.dbname}.ct4") for i in range(len(data_ct4_c5)): - tdSql.checkData( i, 0, str(data_ct4_c5[i]) ) if data_ct4_c5[i] is None else tdSql.checkData( i, 0, f'{data_ct4_c5[i]:.6f}' ) + tdSql.checkData( i, 0, str(data_ct4_c5[i]) ) if data_ct4_c5[i] is None else tdSql.checkFloatString( i, 0, data_ct4_c5[i]) tdSql.query(f"select cast(c5 as binary) as b from {self.dbname}.t1") for i in range(len(data_t1_c5)): - tdSql.checkData( i, 0, str(data_t1_c5[i]) ) if data_t1_c5[i] is None else tdSql.checkData( i, 0, f'{data_t1_c5[i]:.6f}' ) + tdSql.checkData( i, 0, str(data_t1_c5[i]) ) if data_t1_c5[i] is None else tdSql.checkFloatString( i, 0, data_t1_c5[i]) tdLog.printNoPrefix("==========step22: cast float to nchar, expect changes to str(int) ") tdSql.query(f"select cast(c5 as nchar(32)) as b from {self.dbname}.ct4") for i in range(len(data_ct4_c5)): - tdSql.checkData( i, 0, None ) if data_ct4_c5[i] is None else tdSql.checkData( i, 0, f'{data_ct4_c5[i]:.6f}' ) + tdSql.checkData( i, 0, None ) if data_ct4_c5[i] is None else tdSql.checkFloatString( i, 0, data_ct4_c5[i]) tdSql.query(f"select cast(c5 as nchar(32)) as b from {self.dbname}.t1") for i in range(len(data_t1_c5)): - tdSql.checkData( i, 0, None ) if data_t1_c5[i] is None else tdSql.checkData( i, 0, f'{data_t1_c5[i]:.6f}' ) + tdSql.checkData( i, 0, None ) if data_t1_c5[i] is None else tdSql.checkFloatString( i, 0, data_t1_c5[i]) tdSql.query(f"select cast(c5 as nchar) as b from {self.dbname}.t1") for i in range(len(data_t1_c5)): - tdSql.checkData( i, 0, None ) if data_t1_c5[i] is None else tdSql.checkData( i, 0, f'{data_t1_c5[i]:.6f}' ) + tdSql.checkData( i, 0, None ) if data_t1_c5[i] is None else tdSql.checkFloatString( i, 0, data_t1_c5[i]) tdSql.query(f"select cast(c5 as varchar) as b from {self.dbname}.t1") for i in range(len(data_t1_c5)): - tdSql.checkData( i, 0, None ) if data_t1_c5[i] is None else tdSql.checkData( i, 0, f'{data_t1_c5[i]:.6f}' ) + tdSql.checkData( i, 0, None ) if data_t1_c5[i] is None else tdSql.checkFloatString( i, 0, data_t1_c5[i]) tdLog.printNoPrefix("==========step23: cast float to timestamp, expect changes to timestamp ") tdSql.query(f"select cast(c5 as timestamp) as b from {self.dbname}.ct4") @@ -367,18 +367,18 @@ class TDTestCase: tdLog.printNoPrefix("==========step25: cast double to binary, expect changes to str(int) ") tdSql.query(f"select cast(c6 as binary(32)) as b from {self.dbname}.ct4") for i in range(len(data_ct4_c6)): - tdSql.checkData( i, 0, None ) if data_ct4_c6[i] is None else tdSql.checkData( i, 0, f'{data_ct4_c6[i]:.6f}' ) + tdSql.checkData( i, 0, None ) if data_ct4_c6[i] is None else tdSql.checkFloatString( i, 0, data_ct4_c6[i]) tdSql.query(f"select cast(c6 as binary(32)) as b from {self.dbname}.t1") for i in range(len(data_t1_c6)): - tdSql.checkData( i, 0, None ) if data_t1_c6[i] is None else tdSql.checkData( i, 0, f'{data_t1_c6[i]:.6f}' ) + tdSql.checkData( i, 0, None ) if data_t1_c6[i] is None else tdSql.checkFloatString( i, 0, data_t1_c6[i]) tdLog.printNoPrefix("==========step26: cast double to nchar, expect changes to str(int) ") tdSql.query(f"select cast(c6 as nchar(32)) as b from {self.dbname}.ct4") for i in range(len(data_ct4_c6)): - tdSql.checkData( i, 0, None ) if data_ct4_c6[i] is None else tdSql.checkData( i, 0, f'{data_ct4_c6[i]:.6f}' ) + tdSql.checkData( i, 0, None ) if data_ct4_c6[i] is None else tdSql.checkFloatString( i, 0, data_ct4_c6[i]) tdSql.query(f"select cast(c6 as nchar(32)) as b from {self.dbname}.t1") for i in range(len(data_t1_c6)): - tdSql.checkData( i, 0, None ) if data_t1_c6[i] is None else tdSql.checkData( i, 0, f'{data_t1_c6[i]:.6f}' ) + tdSql.checkData( i, 0, None ) if data_t1_c6[i] is None else tdSql.checkFloatString( i, 0, data_t1_c6[i]) tdLog.printNoPrefix("==========step27: cast double to timestamp, expect changes to timestamp ") tdSql.query(f"select cast(c6 as timestamp) as b from {self.dbname}.ct4") diff --git a/tests/system-test/2-query/db.py b/tests/system-test/2-query/db.py index 66776e0a23..895df852c7 100644 --- a/tests/system-test/2-query/db.py +++ b/tests/system-test/2-query/db.py @@ -47,7 +47,7 @@ class TDTestCase: def case2(self): tdSql.query("show variables") - tdSql.checkRows(93) + tdSql.checkRows(88) for i in range(self.replicaVar): tdSql.query("show dnode %d variables like 'debugFlag'" % (i + 1)) diff --git a/tests/system-test/2-query/join_cond.py b/tests/system-test/2-query/join_cond.py new file mode 100644 index 0000000000..77108ca5bc --- /dev/null +++ b/tests/system-test/2-query/join_cond.py @@ -0,0 +1,29 @@ +from os import system +from util.log import * +from util.sql import * +from util.cases import * +from util.sqlset import * +class TDTestCase: + def init(self, conn, logSql, replicaVar=1): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(),True) + + def test_join(self): + sql_file = './2-query/join_cond.sql' + + os.system(f'taos -f {sql_file}') + tdSql.query('use csv_import') + tdSql.query('SELECT * FROM trans,candle WHERE trans.tradeTime BETWEEN to_timestamp("2010-01-01", "yyyy-mm-dd") AND to_timestamp("2010-01-21", "yyyy-mm-dd")+1d-1a AND candle.date BETWEEN to_timestamp("2010-01-01", "yyyy-mm-dd") AND to_timestamp("2010-01-21", "yyyy-mm-dd") AND timetruncate(trans.tradeTime, 1d) = candle.date AND trans.securityId = cast(substring_index(candle.order_book_id, ".", 1) as INT) AND trans.securityid = 600884;', queryTimes=1) + tdSql.checkRows(460) + tdSql.query('SELECT * FROM (SELECT * FROM trans WHERE tradeTime BETWEEN to_timestamp("2010-01-01", "yyyy-mm-dd") AND to_timestamp("2010-01-21", "yyyy-mm-dd")+1d-1a AND securityid = 600884) as t INNER JOIN(SELECT * FROM candle WHERE date BETWEEN to_timestamp("2010-01-01", "yyyy-mm-dd") AND to_timestamp("2010-01-21", "yyyy-mm-dd") ) as c ON timetruncate(t.tradeTime, 1d) = c.date AND t.securityId = cast(substring_index(c.order_book_id, ".", 1) as INT);', queryTimes=1) + tdSql.checkRows(460) + + def run(self): + self.test_join() + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/system-test/2-query/pre_candle.csv b/tests/system-test/2-query/pre_candle.csv new file mode 100755 index 0000000000..fdb33bf99c --- /dev/null +++ b/tests/system-test/2-query/pre_candle.csv @@ -0,0 +1,8 @@ +"candle_XSHG_600592","600592.XSHG","2010-01-04 00:00:00",0,20418867,0,211797052,0,6.2908,6.2609,6.0982,6.0916,"2025-01-08 20:16:49" +"candle_XSHG_600884","600884.XSHG","2010-01-04 00:00:00",0,20418867,0,211797052,0,6.2908,6.2609,6.0982,6.0916,"2025-01-08 20:16:49" +"candle_XSHG_600019","600019.XSHG","2010-01-04 00:00:00",0,20418867,0,211797052,0,6.2908,6.2609,6.0982,6.0916,"2025-01-08 20:16:49" +"candle_XSHG_600905","600905.XSHG","2010-01-04 00:00:00",0,20418867,0,211797052,0,6.2908,6.2609,6.0982,6.0916,"2025-01-08 20:16:49" +"candle_XSHG_600592","600592.XSHG","2010-01-21 00:00:00",0,20418867,0,211797052,0,6.2908,6.2609,6.0982,6.0916,"2025-01-08 20:16:49" +"candle_XSHG_600884","600884.XSHG","2010-01-21 00:00:00",0,20418867,0,211797052,0,6.2908,6.2609,6.0982,6.0916,"2025-01-08 20:16:49" +"candle_XSHG_600019","600019.XSHG","2010-01-21 00:00:00",0,20418867,0,211797052,0,6.2908,6.2609,6.0982,6.0916,"2025-01-08 20:16:49" +"candle_XSHG_600905","600905.XSHG","2010-01-21 00:00:00",0,20418867,0,211797052,0,6.2908,6.2609,6.0982,6.0916,"2025-01-08 20:16:49" \ No newline at end of file diff --git a/tests/system-test/2-query/pre_transaction-2010-01-04.csv b/tests/system-test/2-query/pre_transaction-2010-01-04.csv new file mode 100755 index 0000000000..4f799c39e8 --- /dev/null +++ b/tests/system-test/2-query/pre_transaction-2010-01-04.csv @@ -0,0 +1,240 @@ +"trans_1_600739",1,600739,"2010-01-04 9:25:00.98",19.5900000000,6000.0,"N",5.0,13863.0,226580.0,222710.0,1600780995.0,512221364.0,512221364.0,"N",129827.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13864.0,170994.0,1168.0,1600780996.0,512221370.0,512221370.0,"N",131459.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13865.0,170994.0,150343.0,1600780997.0,512221371.0,512221371.0,"N",131460.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13866.0,170994.0,170676.0,1600780998.0,512221372.0,512221372.0,"N",131461.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13867.0,170994.0,171073.0,1600780999.0,512221372.0,512221372.0,"N",131462.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13868.0,170994.0,171164.0,1600781000.0,512221373.0,512221373.0,"N",131463.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13869.0,170994.0,171290.0,1600781001.0,512221374.0,512221374.0,"N",131464.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13870.0,170994.0,171349.0,1600781002.0,512221375.0,512221375.0,"N",131465.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13871.0,170994.0,184934.0,1600781003.0,512221376.0,512221376.0,"N",131466.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13872.0,189376.0,72622.0,1600781004.0,512221376.0,512221376.0,"N",131467.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,13873.0,190234.0,72622.0,1600781005.0,512221377.0,512221377.0,"N",131468.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,600.0,"N",5.0,13874.0,193816.0,72622.0,1600781006.0,512221378.0,512221378.0,"N",131469.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13875.0,206794.0,72622.0,1600781007.0,512221378.0,512221378.0,"N",131470.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,13876.0,208785.0,72622.0,1600781008.0,512221379.0,512221379.0,"N",131471.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13877.0,212908.0,72622.0,1600781009.0,512221380.0,512221380.0,"N",131472.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13878.0,215154.0,72622.0,1600781010.0,512221384.0,512221385.0,"N",131473.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13879.0,215217.0,72622.0,1600781011.0,512221386.0,512221386.0,"N",131474.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,700.0,"N",5.0,13880.0,218560.0,72622.0,1600781012.0,512221386.0,512221386.0,"N",131475.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13881.0,217936.0,72622.0,1600781013.0,512221387.0,512221387.0,"N",131476.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1500.0,"N",5.0,13882.0,168303.0,72622.0,1600781014.0,512221388.0,512221388.0,"N",131477.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13883.0,205862.0,72622.0,1600781015.0,512221389.0,512221389.0,"N",131478.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,700.0,"N",5.0,13884.0,227586.0,72622.0,1600781016.0,512221390.0,512221390.0,"N",131479.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13885.0,228163.0,72622.0,1600781017.0,512221876.0,512221876.0,"N",131480.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13886.0,228163.0,184394.0,1600781018.0,512221877.0,512221877.0,"N",131481.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,13887.0,228163.0,218053.0,1600781019.0,512221878.0,512221878.0,"N",131482.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,13888.0,202432.0,218053.0,1600781020.0,512221879.0,512221879.0,"N",131483.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13889.0,202432.0,210583.0,1600781021.0,512221880.0,512221880.0,"N",131484.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13890.0,223452.0,210583.0,1600781022.0,512221881.0,512221881.0,"N",131485.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,13891.0,224091.0,210583.0,1600781023.0,512221881.0,512221881.0,"N",131486.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13892.0,174039.0,210583.0,1600781024.0,512221882.0,512221882.0,"N",131487.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13893.0,174169.0,211003.0,1600781025.0,512221883.0,512221883.0,"N",131488.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,13894.0,174169.0,211027.0,1600781026.0,512221883.0,512221883.0,"N",131489.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13895.0,174169.0,175330.0,1600781027.0,512221884.0,512221884.0,"N",131490.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13896.0,174169.0,175361.0,1600781028.0,512221885.0,512221885.0,"N",131491.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,13897.0,174169.0,5427.0,1600781029.0,512221886.0,512221886.0,"N",131492.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13898.0,174169.0,104968.0,1600781030.0,512221886.0,512221886.0,"N",131493.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13899.0,174169.0,197157.0,1600781031.0,512221887.0,512221887.0,"N",131494.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,900.0,"N",5.0,13900.0,174169.0,213073.0,1600781032.0,512221888.0,512221888.0,"N",131495.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13901.0,174202.0,213073.0,1600781033.0,512221889.0,512221889.0,"N",131496.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,13902.0,156858.0,213073.0,1600781034.0,512221889.0,512221889.0,"N",131497.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13903.0,221850.0,213073.0,1600781035.0,512221890.0,512221890.0,"N",131498.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13904.0,15931.0,213073.0,1600781036.0,512221891.0,512221891.0,"N",131499.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1200.0,"N",5.0,13905.0,173320.0,213073.0,1600781037.0,512221892.0,512221892.0,"N",131500.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1200.0,"N",5.0,13906.0,187298.0,213073.0,1600781038.0,512221898.0,512221898.0,"N",131501.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,13907.0,187298.0,189061.0,1600781039.0,512221899.0,512221899.0,"N",131502.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13908.0,187298.0,77668.0,1600781040.0,512221900.0,512221900.0,"N",131503.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1200.0,"N",5.0,13909.0,187298.0,220591.0,1600781041.0,512221900.0,512221900.0,"N",131504.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,800.0,"N",5.0,13910.0,204097.0,220591.0,1600781042.0,512221901.0,512221901.0,"N",131505.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2800.0,"N",5.0,13911.0,226770.0,220591.0,1600781043.0,512221902.0,512221902.0,"N",131506.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13912.0,226770.0,221099.0,1600781044.0,512221903.0,512221903.0,"N",131507.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13913.0,226770.0,77667.0,1600781045.0,512221908.0,512221908.0,"N",131508.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1700.0,"N",5.0,13914.0,226770.0,176213.0,1600781046.0,512221909.0,512221909.0,"N",131509.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,900.0,"N",5.0,13915.0,226770.0,179993.0,1600781047.0,512221910.0,512221910.0,"N",131510.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13916.0,226770.0,201007.0,1600781048.0,512221910.0,512221910.0,"N",131511.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,5300.0,"N",5.0,13917.0,226770.0,227813.0,1600781049.0,512221912.0,512221912.0,"N",131512.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13918.0,226770.0,222044.0,1600781050.0,512221913.0,512221913.0,"N",131513.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1300.0,"N",5.0,13919.0,226770.0,222052.0,1600781051.0,512221913.0,512221913.0,"N",131514.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13920.0,226770.0,222073.0,1600781052.0,512221914.0,512221914.0,"N",131515.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,13921.0,226770.0,222111.0,1600781053.0,512221918.0,512221918.0,"N",131516.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13922.0,226770.0,223816.0,1600781054.0,512221918.0,512221919.0,"N",131517.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13923.0,226770.0,223893.0,1600781055.0,512221919.0,512221919.0,"N",131518.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13924.0,226770.0,200492.0,1600781056.0,512221920.0,512221920.0,"N",131519.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13925.0,226770.0,213208.0,1600781057.0,512221921.0,512221921.0,"N",131520.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13926.0,226770.0,377.0,1600781058.0,512221925.0,512221925.0,"N",131521.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13927.0,226770.0,10179.0,1600781059.0,512221926.0,512221926.0,"N",131522.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13928.0,226770.0,10813.0,1600781060.0,512221926.0,512221926.0,"N",131523.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13929.0,226770.0,14213.0,1600781061.0,512221927.0,512221927.0,"N",131524.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13930.0,226770.0,45125.0,1600781062.0,512221928.0,512221928.0,"N",131525.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13931.0,223735.0,45125.0,1600781063.0,512221928.0,512221928.0,"N",131526.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13932.0,223735.0,66436.0,1600781064.0,512221934.0,512221934.0,"N",131527.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,4900.0,"N",5.0,13933.0,223735.0,96261.0,1600781065.0,512221935.0,512221935.0,"N",131528.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,5000.0,"N",5.0,13934.0,224814.0,96261.0,1600781066.0,512221935.0,512221935.0,"N",131529.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,3800.0,"N",5.0,13935.0,225287.0,96261.0,1600781067.0,512221936.0,512221936.0,"N",131530.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13936.0,225287.0,110161.0,1600781068.0,512221937.0,512221937.0,"N",131531.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13937.0,225287.0,50745.0,1600781069.0,512221938.0,512221938.0,"N",131532.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13938.0,225287.0,65667.0,1600781070.0,512221938.0,512221938.0,"N",131533.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13939.0,225287.0,106360.0,1600781071.0,512221939.0,512221939.0,"N",131534.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13940.0,225287.0,109850.0,1600781072.0,512221940.0,512221940.0,"N",131535.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,900.0,"N",5.0,13941.0,225287.0,140212.0,1600781073.0,512221940.0,512221940.0,"N",131536.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13942.0,225287.0,160766.0,1600781074.0,512221941.0,512221941.0,"N",131537.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13943.0,225287.0,168951.0,1600781075.0,512221942.0,512221942.0,"N",131538.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13944.0,225287.0,186616.0,1600781076.0,512221943.0,512221943.0,"N",131539.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13945.0,191244.0,186616.0,1600781077.0,512221950.0,512221950.0,"N",131540.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13946.0,191244.0,195935.0,1600781078.0,512221952.0,512221952.0,"N",131541.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13947.0,191244.0,171637.0,1600781079.0,512221954.0,512221954.0,"N",131542.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,700.0,"N",5.0,13948.0,108848.0,171637.0,1600781080.0,512221956.0,512221956.0,"N",131543.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13949.0,173892.0,171637.0,1600781081.0,512221958.0,512221958.0,"N",131544.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13950.0,223874.0,171637.0,1600781082.0,512221960.0,512221960.0,"N",131545.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13951.0,228894.0,171637.0,1600781083.0,512221962.0,512221962.0,"N",131546.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,13952.0,228894.0,171763.0,1600781084.0,512221964.0,512221964.0,"N",131547.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13953.0,228894.0,183729.0,1600781085.0,512221966.0,512221966.0,"N",131548.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,600.0,"N",5.0,13954.0,228894.0,94633.0,1600781086.0,512221968.0,512221968.0,"N",131549.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13955.0,228894.0,204698.0,1600781087.0,512221970.0,512221970.0,"N",131550.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13956.0,228894.0,227169.0,1600781088.0,512221972.0,512221972.0,"N",131551.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,4400.0,"N",5.0,13957.0,228894.0,227349.0,1600781089.0,512221974.0,512221974.0,"N",131552.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1333.0,"N",5.0,13958.0,228894.0,227502.0,1600781090.0,512221976.0,512221976.0,"N",131553.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,4000.0,"N",5.0,13959.0,228894.0,227832.0,1600781091.0,512221978.0,512221978.0,"N",131554.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1500.0,"N",5.0,13960.0,228894.0,176491.0,1600781092.0,512221980.0,512221980.0,"N",131555.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2200.0,"N",5.0,13961.0,228894.0,179359.0,1600781093.0,512221982.0,512221982.0,"N",131556.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13962.0,228894.0,180509.0,1600781094.0,512221983.0,512221983.0,"N",131557.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13963.0,228894.0,182047.0,1600781095.0,512221985.0,512221985.0,"N",131558.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13964.0,228894.0,225255.0,1600781096.0,512221987.0,512221987.0,"N",131559.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2700.0,"N",5.0,13965.0,228894.0,159257.0,1600781097.0,512221989.0,512221989.0,"N",131560.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1500.0,"N",5.0,13966.0,228894.0,192167.0,1600781098.0,512221991.0,512221991.0,"N",131561.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,4700.0,"N",5.0,13967.0,228894.0,193069.0,1600781099.0,512221993.0,512221993.0,"N",131562.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13968.0,228894.0,199946.0,1600781100.0,512221995.0,512221995.0,"N",131563.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,13969.0,228894.0,223594.0,1600781101.0,512221997.0,512221997.0,"N",131564.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,13970.0,228894.0,186461.0,1600781102.0,512221999.0,512221999.0,"N",131565.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,13971.0,228894.0,144395.0,1600781103.0,512222001.0,512222001.0,"N",131566.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,3000.0,"N",5.0,13972.0,228894.0,212191.0,1600781104.0,512222003.0,512222003.0,"N",131567.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2000.0,"N",5.0,13973.0,228894.0,219800.0,1600781105.0,512222005.0,512222005.0,"N",131568.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,13974.0,228894.0,53198.0,1600781106.0,512222007.0,512222007.0,"N",131569.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,13975.0,228894.0,186418.0,1600781107.0,512222008.0,512222008.0,"N",131570.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,10000.0,"N",5.0,13976.0,228894.0,225024.0,1600781108.0,512222008.0,512222008.0,"N",131571.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13977.0,228894.0,226826.0,1600781109.0,512222028.0,512222028.0,"N",131572.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13978.0,228894.0,6191.0,1600781110.0,512222030.0,512222030.0,"N",131573.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,13979.0,228894.0,32709.0,1600781111.0,512222031.0,512222031.0,"N",131574.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2000.0,"N",5.0,13980.0,228894.0,41545.0,1600781112.0,512222032.0,512222032.0,"N",131575.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,9400.0,"N",5.0,13981.0,228894.0,105187.0,1600781113.0,512222033.0,512222033.0,"N",131576.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,13982.0,228894.0,210020.0,1600781114.0,512222033.0,512222033.0,"N",131577.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2000.0,"N",5.0,13983.0,228894.0,218652.0,1600781115.0,512222034.0,512222034.0,"N",131578.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,767.0,"N",5.0,13984.0,228894.0,222077.0,1600781116.0,512222035.0,512222035.0,"N",131579.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,33.0,"N",5.0,13985.0,228897.0,222077.0,1600781117.0,512222035.0,512222035.0,"N",131580.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,13986.0,228897.0,182463.0,1600781118.0,512222036.0,512222036.0,"N",131581.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,13987.0,228897.0,202893.0,1600781119.0,512222042.0,512222042.0,"N",131582.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13988.0,228897.0,202997.0,1600781120.0,512222044.0,512222044.0,"N",131583.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13989.0,228897.0,206771.0,1600781121.0,512222047.0,512222047.0,"N",131584.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,767.0,"N",5.0,13990.0,228897.0,209568.0,1600781122.0,512222047.0,512222047.0,"N",131585.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,233.0,"N",5.0,13991.0,228899.0,209568.0,1600781123.0,512222053.0,512222053.0,"N",131586.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,3000.0,"N",5.0,13992.0,228899.0,212809.0,1600781124.0,512222054.0,512222054.0,"N",131587.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,13993.0,228899.0,213551.0,1600781125.0,512222055.0,512222055.0,"N",131588.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13994.0,228899.0,214370.0,1600781126.0,512222055.0,512222056.0,"N",131589.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13995.0,228899.0,217539.0,1600781127.0,512222056.0,512222056.0,"N",131590.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,13996.0,228899.0,218375.0,1600781128.0,512222057.0,512222057.0,"N",131591.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,13997.0,228899.0,62045.0,1600781129.0,512222058.0,512222058.0,"N",131592.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2700.0,"N",5.0,13998.0,228899.0,225322.0,1600781130.0,512222059.0,512222059.0,"N",131593.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,8900.0,"N",5.0,13999.0,228899.0,220252.0,1600781131.0,512222059.0,512222059.0,"N",131594.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,5000.0,"N",5.0,14000.0,228899.0,221928.0,1600781132.0,512222060.0,512222060.0,"N",131595.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,14001.0,228899.0,221977.0,1600781133.0,512222061.0,512222061.0,"N",131596.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,14002.0,228899.0,63584.0,1600781134.0,512222061.0,512222062.0,"N",131597.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,14003.0,228899.0,224215.0,1600781135.0,512222068.0,512222068.0,"N",131598.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2100.0,"N",5.0,14004.0,228899.0,225003.0,1600781136.0,512222069.0,512222069.0,"N",131599.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14005.0,228899.0,179710.0,1600781137.0,512222070.0,512222070.0,"N",131600.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14006.0,228899.0,62046.0,1600781138.0,512222071.0,512222071.0,"N",131601.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,700.0,"N",5.0,14007.0,228899.0,224762.0,1600781139.0,512222072.0,512222072.0,"N",131602.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,600.0,"N",5.0,14008.0,228899.0,225780.0,1600781140.0,512222072.0,512222072.0,"N",131603.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,14009.0,228899.0,228048.0,1600781141.0,512222073.0,512222073.0,"N",131604.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,14010.0,228899.0,32710.0,1600781142.0,512222074.0,512222074.0,"N",131605.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2000.0,"N",5.0,14011.0,228899.0,130340.0,1600781143.0,512222075.0,512222075.0,"N",131606.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,14012.0,228899.0,176768.0,1600781144.0,512222075.0,512222075.0,"N",131607.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14013.0,228899.0,62049.0,1600781145.0,512222076.0,512222076.0,"N",131608.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,800.0,"N",5.0,14014.0,228899.0,177524.0,1600781146.0,512222077.0,512222077.0,"N",131609.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14015.0,228899.0,181229.0,1600781147.0,512222078.0,512222078.0,"N",131610.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,14016.0,228899.0,41053.0,1600781148.0,512222078.0,512222078.0,"N",131611.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14017.0,228899.0,201890.0,1600781149.0,512222079.0,512222079.0,"N",131612.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,14018.0,228899.0,3587.0,1600781150.0,512222080.0,512222080.0,"N",131613.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14019.0,228899.0,41028.0,1600781151.0,512222081.0,512222081.0,"N",131614.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,14020.0,228899.0,63585.0,1600781152.0,512222083.0,512222083.0,"N",131615.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,14021.0,228899.0,218421.0,1600781153.0,512222091.0,512222091.0,"N",131616.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,14022.0,228899.0,167040.0,1600781154.0,512222092.0,512222092.0,"N",131617.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14023.0,228899.0,34308.0,1600781155.0,512222093.0,512222093.0,"N",131618.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14024.0,228899.0,62050.0,1600781156.0,512222094.0,512222094.0,"N",131619.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1100.0,"N",5.0,14025.0,228899.0,166014.0,1600781157.0,512222095.0,512222095.0,"N",131620.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14026.0,228899.0,202364.0,1600781158.0,512222095.0,512222095.0,"N",131621.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14027.0,228899.0,214924.0,1600781159.0,512222096.0,512222096.0,"N",131622.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14028.0,228899.0,226028.0,1600781160.0,512222097.0,512222097.0,"N",131623.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,14029.0,228899.0,32711.0,1600781161.0,512222097.0,512222098.0,"N",131624.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14030.0,228899.0,76807.0,1600781162.0,512222098.0,512222098.0,"N",131625.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,14031.0,228899.0,150649.0,1600781163.0,512222099.0,512222099.0,"N",131626.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,14032.0,228899.0,71032.0,1600781164.0,512222099.0,512222099.0,"N",131627.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,14033.0,228899.0,83193.0,1600781165.0,512222100.0,512222100.0,"N",131628.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,867.0,"N",5.0,14034.0,228899.0,140568.0,1600781166.0,512222101.0,512222101.0,"N",131629.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,3400.0,"N",5.0,14035.0,228902.0,140568.0,1600781167.0,512222101.0,512222102.0,"N",131630.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,14036.0,215644.0,140568.0,1600781168.0,512222102.0,512222102.0,"N",131631.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2133.0,"N",5.0,14037.0,223828.0,140568.0,1600781169.0,512222103.0,512222103.0,"N",131632.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14038.0,223828.0,179126.0,1600781170.0,512222104.0,512222104.0,"N",131633.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14039.0,223828.0,205582.0,1600781171.0,512222109.0,512222109.0,"N",131634.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14040.0,223828.0,216581.0,1600781172.0,512222110.0,512222110.0,"N",131635.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14041.0,223828.0,12989.0,1600781173.0,512222111.0,512222111.0,"N",131636.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14042.0,223828.0,62047.0,1600781174.0,512222112.0,512222112.0,"N",131637.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14043.0,223828.0,62048.0,1600781175.0,512222112.0,512222112.0,"N",131638.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,67.0,"N",5.0,14044.0,223828.0,135040.0,1600781176.0,512222113.0,512222113.0,"N",131639.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14045.0,220953.0,135040.0,1600781177.0,512222131.0,512222131.0,"N",131640.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,33.0,"N",5.0,14046.0,106911.0,135040.0,1600781178.0,512222133.0,512222133.0,"N",131641.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,14047.0,106911.0,192893.0,1600781179.0,512222134.0,512222134.0,"N",131642.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,167.0,"N",5.0,14048.0,106911.0,63586.0,1600781180.0,512222137.0,512222137.0,"N",131643.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,833.0,"N",5.0,14049.0,220739.0,63586.0,1600781181.0,512222139.0,512222139.0,"N",131644.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2700.0,"N",5.0,14050.0,220739.0,12652.0,1600781182.0,512222140.0,512222140.0,"N",131645.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14051.0,220739.0,109385.0,1600781183.0,512222143.0,512222143.0,"N",131646.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,700.0,"N",5.0,14052.0,220739.0,216747.0,1600781184.0,512222145.0,512222145.0,"N",131647.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14053.0,220739.0,12990.0,1600781185.0,512222146.0,512222146.0,"N",131648.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14054.0,220739.0,61809.0,1600781186.0,512222148.0,512222148.0,"N",131649.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14055.0,220739.0,62051.0,1600781187.0,512222149.0,512222149.0,"N",131650.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14056.0,220739.0,165534.0,1600781188.0,512222150.0,512222150.0,"N",131651.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2000.0,"N",5.0,14057.0,220739.0,198784.0,1600781189.0,512222156.0,512222156.0,"N",131652.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,14058.0,220739.0,32712.0,1600781190.0,512222158.0,512222158.0,"N",131653.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2000.0,"N",5.0,14059.0,220739.0,41546.0,1600781191.0,512222160.0,512222160.0,"N",131654.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2400.0,"N",5.0,14060.0,220739.0,214219.0,1600781192.0,512222162.0,512222162.0,"N",131655.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,8900.0,"N",5.0,14061.0,220739.0,75249.0,1600781193.0,512222164.0,512222164.0,"N",131656.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,800.0,"N",5.0,14062.0,220739.0,115157.0,1600781194.0,512222166.0,512222166.0,"N",131657.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2200.0,"N",5.0,14063.0,220739.0,170983.0,1600781195.0,512222168.0,512222168.0,"N",131658.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,14064.0,220739.0,188284.0,1600781196.0,512222170.0,512222170.0,"N",131659.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,14065.0,220739.0,208374.0,1600781197.0,512222172.0,512222172.0,"N",131660.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,4000.0,"N",5.0,14066.0,220739.0,212016.0,1600781198.0,512222174.0,512222174.0,"N",131661.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14067.0,220739.0,205044.0,1600781199.0,512222176.0,512222176.0,"N",131662.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,14068.0,220739.0,207106.0,1600781200.0,512222178.0,512222178.0,"N",131663.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14069.0,220739.0,22366.0,1600781201.0,512222180.0,512222180.0,"N",131664.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14070.0,220739.0,62052.0,1600781202.0,512222182.0,512222182.0,"N",131665.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,14071.0,220739.0,153017.0,1600781203.0,512222184.0,512222184.0,"N",131666.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14072.0,220739.0,209919.0,1600781204.0,512222186.0,512222186.0,"N",131667.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,14073.0,220739.0,213931.0,1600781205.0,512222188.0,512222188.0,"N",131668.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,300.0,"N",5.0,14074.0,220739.0,144375.0,1600781206.0,512222190.0,512222190.0,"N",131669.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2000.0,"N",5.0,14075.0,220739.0,190115.0,1600781207.0,512222192.0,512222192.0,"N",131670.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,2000.0,"N",5.0,14076.0,220739.0,203179.0,1600781208.0,512222193.0,512222194.0,"N",131671.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14077.0,220739.0,42575.0,1600781209.0,512222195.0,512222195.0,"N",131672.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14078.0,220739.0,109383.0,1600781210.0,512222198.0,512222198.0,"N",131673.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,400.0,"N",5.0,14079.0,220739.0,139296.0,1600781211.0,512222200.0,512222200.0,"N",131674.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14080.0,220739.0,12991.0,1600781212.0,512222202.0,512222202.0,"N",131675.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14081.0,220739.0,63754.0,1600781213.0,512222203.0,512222203.0,"N",131676.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14082.0,220739.0,96471.0,1600781214.0,512222207.0,512222207.0,"N",131677.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14083.0,220739.0,193136.0,1600781215.0,512222208.0,512222208.0,"N",131678.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,14084.0,220739.0,32713.0,1600781216.0,512222210.0,512222210.0,"N",131679.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,1000.0,"N",5.0,14085.0,220739.0,63587.0,1600781217.0,512222212.0,512222212.0,"N",131680.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14086.0,220739.0,12992.0,1600781218.0,512222215.0,512222215.0,"N",131681.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,500.0,"N",5.0,14087.0,220739.0,63755.0,1600781219.0,512222217.0,512222217.0,"N",131682.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14088.0,220739.0,84942.0,1600781220.0,512222218.0,512222218.0,"N",131683.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,600.0,"N",5.0,14089.0,220739.0,99310.0,1600781221.0,512222219.0,512222219.0,"N",131684.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14090.0,220739.0,107389.0,1600781222.0,512222220.0,512222220.0,"N",131685.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,200.0,"N",5.0,14091.0,220739.0,148978.0,1600781223.0,512222220.0,512222220.0,"N",131686.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,100.0,"N",5.0,14092.0,220739.0,208949.0,1600781224.0,512222226.0,512222226.0,"N",131687.0 +"trans_1_600884",1,600884,"2010-01-04 9:25:00.98",33.4600000000,5867.0,"N",5.0,14093.0,220739.0,219098.0,1600781225.0,512222228.0,512222228.0,"N",131688.0 +"trans_1_600885",1,600885,"2010-01-04 9:25:00.98",74.7700000000,100.0,"N",5.0,14094.0,218502.0,88013.0,1600781226.0,512222230.0,512222230.0,"N",131887.0 +"trans_1_600885",1,600885,"2010-01-04 9:25:00.98",74.7700000000,100.0,"N",5.0,14095.0,174159.0,88013.0,1600781227.0,512222232.0,512222232.0,"N",131888.0 +"trans_1_600885",1,600885,"2010-01-04 9:25:00.98",74.7700000000,100.0,"N",5.0,14096.0,210980.0,88013.0,1600781228.0,512222234.0,512222234.0,"N",131889.0 +"trans_1_600885",1,600885,"2010-01-04 9:25:00.98",74.7700000000,100.0,"N",5.0,14097.0,221813.0,88013.0,1600781229.0,512222236.0,512222236.0,"N",131890.0 +"trans_1_600885",1,600885,"2010-01-04 9:25:00.98",74.7700000000,600.0,"N",5.0,14098.0,61974.0,88013.0,1600781230.0,512222238.0,512222238.0,"N",131891.0 +"trans_1_600885",1,600885,"2010-01-04 9:25:00.98",74.7700000000,700.0,"N",5.0,14099.0,194981.0,166774.0,1600781231.0,512222240.0,512222240.0,"N",131892.0 +"trans_1_600885",1,600885,"2010-01-04 9:25:00.98",74.7700000000,100.0,"N",5.0,14100.0,196093.0,166774.0,1600781232.0,512222242.0,512222242.0,"N",131893.0 +"trans_1_600885",1,600885,"2010-01-04 9:25:00.98",74.7700000000,100.0,"N",5.0,14101.0,196093.0,225148.0,1600781233.0,512222244.0,512222244.0,"N",131894.0 + diff --git a/tests/system-test/2-query/pre_transaction-2010-01-21.csv b/tests/system-test/2-query/pre_transaction-2010-01-21.csv new file mode 100755 index 0000000000..287483d339 --- /dev/null +++ b/tests/system-test/2-query/pre_transaction-2010-01-21.csv @@ -0,0 +1,235 @@ +"trans_1_600739",1,600739,"2010-01-21 9:25:00.98",19.5900000000,500.0,"N",5.0,13862.0,224487.0,222710.0,1600780994.0,512221364.0,512221364.0,"N",129826.0 +"trans_1_600739",1,600739,"2010-01-21 9:25:00.98",19.5900000000,6000.0,"N",5.0,13863.0,226580.0,222710.0,1600780995.0,512221364.0,512221364.0,"N",129827.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13864.0,170994.0,1168.0,1600780996.0,512221370.0,512221370.0,"N",131459.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13865.0,170994.0,150343.0,1600780997.0,512221371.0,512221371.0,"N",131460.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13866.0,170994.0,170676.0,1600780998.0,512221372.0,512221372.0,"N",131461.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13867.0,170994.0,171073.0,1600780999.0,512221372.0,512221372.0,"N",131462.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13868.0,170994.0,171164.0,1600781000.0,512221373.0,512221373.0,"N",131463.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13869.0,170994.0,171290.0,1600781001.0,512221374.0,512221374.0,"N",131464.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13870.0,170994.0,171349.0,1600781002.0,512221375.0,512221375.0,"N",131465.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13871.0,170994.0,184934.0,1600781003.0,512221376.0,512221376.0,"N",131466.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13872.0,189376.0,72622.0,1600781004.0,512221376.0,512221376.0,"N",131467.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,13873.0,190234.0,72622.0,1600781005.0,512221377.0,512221377.0,"N",131468.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,600.0,"N",5.0,13874.0,193816.0,72622.0,1600781006.0,512221378.0,512221378.0,"N",131469.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13875.0,206794.0,72622.0,1600781007.0,512221378.0,512221378.0,"N",131470.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,13876.0,208785.0,72622.0,1600781008.0,512221379.0,512221379.0,"N",131471.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13877.0,212908.0,72622.0,1600781009.0,512221380.0,512221380.0,"N",131472.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13878.0,215154.0,72622.0,1600781010.0,512221384.0,512221385.0,"N",131473.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13879.0,215217.0,72622.0,1600781011.0,512221386.0,512221386.0,"N",131474.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,700.0,"N",5.0,13880.0,218560.0,72622.0,1600781012.0,512221386.0,512221386.0,"N",131475.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13881.0,217936.0,72622.0,1600781013.0,512221387.0,512221387.0,"N",131476.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1500.0,"N",5.0,13882.0,168303.0,72622.0,1600781014.0,512221388.0,512221388.0,"N",131477.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13883.0,205862.0,72622.0,1600781015.0,512221389.0,512221389.0,"N",131478.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,700.0,"N",5.0,13884.0,227586.0,72622.0,1600781016.0,512221390.0,512221390.0,"N",131479.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13885.0,228163.0,72622.0,1600781017.0,512221876.0,512221876.0,"N",131480.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13886.0,228163.0,184394.0,1600781018.0,512221877.0,512221877.0,"N",131481.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,13887.0,228163.0,218053.0,1600781019.0,512221878.0,512221878.0,"N",131482.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,13888.0,202432.0,218053.0,1600781020.0,512221879.0,512221879.0,"N",131483.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13889.0,202432.0,210583.0,1600781021.0,512221880.0,512221880.0,"N",131484.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13890.0,223452.0,210583.0,1600781022.0,512221881.0,512221881.0,"N",131485.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,13891.0,224091.0,210583.0,1600781023.0,512221881.0,512221881.0,"N",131486.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13892.0,174039.0,210583.0,1600781024.0,512221882.0,512221882.0,"N",131487.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13893.0,174169.0,211003.0,1600781025.0,512221883.0,512221883.0,"N",131488.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,13894.0,174169.0,211027.0,1600781026.0,512221883.0,512221883.0,"N",131489.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13895.0,174169.0,175330.0,1600781027.0,512221884.0,512221884.0,"N",131490.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13896.0,174169.0,175361.0,1600781028.0,512221885.0,512221885.0,"N",131491.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,13897.0,174169.0,5427.0,1600781029.0,512221886.0,512221886.0,"N",131492.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13898.0,174169.0,104968.0,1600781030.0,512221886.0,512221886.0,"N",131493.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13899.0,174169.0,197157.0,1600781031.0,512221887.0,512221887.0,"N",131494.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,900.0,"N",5.0,13900.0,174169.0,213073.0,1600781032.0,512221888.0,512221888.0,"N",131495.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13901.0,174202.0,213073.0,1600781033.0,512221889.0,512221889.0,"N",131496.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,13902.0,156858.0,213073.0,1600781034.0,512221889.0,512221889.0,"N",131497.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13903.0,221850.0,213073.0,1600781035.0,512221890.0,512221890.0,"N",131498.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13904.0,15931.0,213073.0,1600781036.0,512221891.0,512221891.0,"N",131499.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1200.0,"N",5.0,13905.0,173320.0,213073.0,1600781037.0,512221892.0,512221892.0,"N",131500.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1200.0,"N",5.0,13906.0,187298.0,213073.0,1600781038.0,512221898.0,512221898.0,"N",131501.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,13907.0,187298.0,189061.0,1600781039.0,512221899.0,512221899.0,"N",131502.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13908.0,187298.0,77668.0,1600781040.0,512221900.0,512221900.0,"N",131503.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1200.0,"N",5.0,13909.0,187298.0,220591.0,1600781041.0,512221900.0,512221900.0,"N",131504.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,800.0,"N",5.0,13910.0,204097.0,220591.0,1600781042.0,512221901.0,512221901.0,"N",131505.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2800.0,"N",5.0,13911.0,226770.0,220591.0,1600781043.0,512221902.0,512221902.0,"N",131506.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13912.0,226770.0,221099.0,1600781044.0,512221903.0,512221903.0,"N",131507.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13913.0,226770.0,77667.0,1600781045.0,512221908.0,512221908.0,"N",131508.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1700.0,"N",5.0,13914.0,226770.0,176213.0,1600781046.0,512221909.0,512221909.0,"N",131509.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,900.0,"N",5.0,13915.0,226770.0,179993.0,1600781047.0,512221910.0,512221910.0,"N",131510.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13916.0,226770.0,201007.0,1600781048.0,512221910.0,512221910.0,"N",131511.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,5300.0,"N",5.0,13917.0,226770.0,227813.0,1600781049.0,512221912.0,512221912.0,"N",131512.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13918.0,226770.0,222044.0,1600781050.0,512221913.0,512221913.0,"N",131513.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1300.0,"N",5.0,13919.0,226770.0,222052.0,1600781051.0,512221913.0,512221913.0,"N",131514.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13920.0,226770.0,222073.0,1600781052.0,512221914.0,512221914.0,"N",131515.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,13921.0,226770.0,222111.0,1600781053.0,512221918.0,512221918.0,"N",131516.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13922.0,226770.0,223816.0,1600781054.0,512221918.0,512221919.0,"N",131517.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13923.0,226770.0,223893.0,1600781055.0,512221919.0,512221919.0,"N",131518.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13924.0,226770.0,200492.0,1600781056.0,512221920.0,512221920.0,"N",131519.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13925.0,226770.0,213208.0,1600781057.0,512221921.0,512221921.0,"N",131520.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13926.0,226770.0,377.0,1600781058.0,512221925.0,512221925.0,"N",131521.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13927.0,226770.0,10179.0,1600781059.0,512221926.0,512221926.0,"N",131522.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13928.0,226770.0,10813.0,1600781060.0,512221926.0,512221926.0,"N",131523.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13929.0,226770.0,14213.0,1600781061.0,512221927.0,512221927.0,"N",131524.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13930.0,226770.0,45125.0,1600781062.0,512221928.0,512221928.0,"N",131525.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13931.0,223735.0,45125.0,1600781063.0,512221928.0,512221928.0,"N",131526.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13932.0,223735.0,66436.0,1600781064.0,512221934.0,512221934.0,"N",131527.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,4900.0,"N",5.0,13933.0,223735.0,96261.0,1600781065.0,512221935.0,512221935.0,"N",131528.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,5000.0,"N",5.0,13934.0,224814.0,96261.0,1600781066.0,512221935.0,512221935.0,"N",131529.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,3800.0,"N",5.0,13935.0,225287.0,96261.0,1600781067.0,512221936.0,512221936.0,"N",131530.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13936.0,225287.0,110161.0,1600781068.0,512221937.0,512221937.0,"N",131531.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13937.0,225287.0,50745.0,1600781069.0,512221938.0,512221938.0,"N",131532.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13938.0,225287.0,65667.0,1600781070.0,512221938.0,512221938.0,"N",131533.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13939.0,225287.0,106360.0,1600781071.0,512221939.0,512221939.0,"N",131534.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13940.0,225287.0,109850.0,1600781072.0,512221940.0,512221940.0,"N",131535.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,900.0,"N",5.0,13941.0,225287.0,140212.0,1600781073.0,512221940.0,512221940.0,"N",131536.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13942.0,225287.0,160766.0,1600781074.0,512221941.0,512221941.0,"N",131537.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13943.0,225287.0,168951.0,1600781075.0,512221942.0,512221942.0,"N",131538.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13944.0,225287.0,186616.0,1600781076.0,512221943.0,512221943.0,"N",131539.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13945.0,191244.0,186616.0,1600781077.0,512221950.0,512221950.0,"N",131540.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13946.0,191244.0,195935.0,1600781078.0,512221952.0,512221952.0,"N",131541.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13947.0,191244.0,171637.0,1600781079.0,512221954.0,512221954.0,"N",131542.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,700.0,"N",5.0,13948.0,108848.0,171637.0,1600781080.0,512221956.0,512221956.0,"N",131543.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13949.0,173892.0,171637.0,1600781081.0,512221958.0,512221958.0,"N",131544.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13950.0,223874.0,171637.0,1600781082.0,512221960.0,512221960.0,"N",131545.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13951.0,228894.0,171637.0,1600781083.0,512221962.0,512221962.0,"N",131546.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,13952.0,228894.0,171763.0,1600781084.0,512221964.0,512221964.0,"N",131547.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13953.0,228894.0,183729.0,1600781085.0,512221966.0,512221966.0,"N",131548.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,600.0,"N",5.0,13954.0,228894.0,94633.0,1600781086.0,512221968.0,512221968.0,"N",131549.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13955.0,228894.0,204698.0,1600781087.0,512221970.0,512221970.0,"N",131550.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13956.0,228894.0,227169.0,1600781088.0,512221972.0,512221972.0,"N",131551.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,4400.0,"N",5.0,13957.0,228894.0,227349.0,1600781089.0,512221974.0,512221974.0,"N",131552.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1333.0,"N",5.0,13958.0,228894.0,227502.0,1600781090.0,512221976.0,512221976.0,"N",131553.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,4000.0,"N",5.0,13959.0,228894.0,227832.0,1600781091.0,512221978.0,512221978.0,"N",131554.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1500.0,"N",5.0,13960.0,228894.0,176491.0,1600781092.0,512221980.0,512221980.0,"N",131555.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2200.0,"N",5.0,13961.0,228894.0,179359.0,1600781093.0,512221982.0,512221982.0,"N",131556.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13962.0,228894.0,180509.0,1600781094.0,512221983.0,512221983.0,"N",131557.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13963.0,228894.0,182047.0,1600781095.0,512221985.0,512221985.0,"N",131558.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13964.0,228894.0,225255.0,1600781096.0,512221987.0,512221987.0,"N",131559.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2700.0,"N",5.0,13965.0,228894.0,159257.0,1600781097.0,512221989.0,512221989.0,"N",131560.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1500.0,"N",5.0,13966.0,228894.0,192167.0,1600781098.0,512221991.0,512221991.0,"N",131561.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,4700.0,"N",5.0,13967.0,228894.0,193069.0,1600781099.0,512221993.0,512221993.0,"N",131562.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13968.0,228894.0,199946.0,1600781100.0,512221995.0,512221995.0,"N",131563.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,13969.0,228894.0,223594.0,1600781101.0,512221997.0,512221997.0,"N",131564.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,13970.0,228894.0,186461.0,1600781102.0,512221999.0,512221999.0,"N",131565.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,13971.0,228894.0,144395.0,1600781103.0,512222001.0,512222001.0,"N",131566.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,3000.0,"N",5.0,13972.0,228894.0,212191.0,1600781104.0,512222003.0,512222003.0,"N",131567.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2000.0,"N",5.0,13973.0,228894.0,219800.0,1600781105.0,512222005.0,512222005.0,"N",131568.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,13974.0,228894.0,53198.0,1600781106.0,512222007.0,512222007.0,"N",131569.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,13975.0,228894.0,186418.0,1600781107.0,512222008.0,512222008.0,"N",131570.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,10000.0,"N",5.0,13976.0,228894.0,225024.0,1600781108.0,512222008.0,512222008.0,"N",131571.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13977.0,228894.0,226826.0,1600781109.0,512222028.0,512222028.0,"N",131572.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13978.0,228894.0,6191.0,1600781110.0,512222030.0,512222030.0,"N",131573.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,13979.0,228894.0,32709.0,1600781111.0,512222031.0,512222031.0,"N",131574.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2000.0,"N",5.0,13980.0,228894.0,41545.0,1600781112.0,512222032.0,512222032.0,"N",131575.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,9400.0,"N",5.0,13981.0,228894.0,105187.0,1600781113.0,512222033.0,512222033.0,"N",131576.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,13982.0,228894.0,210020.0,1600781114.0,512222033.0,512222033.0,"N",131577.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2000.0,"N",5.0,13983.0,228894.0,218652.0,1600781115.0,512222034.0,512222034.0,"N",131578.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,767.0,"N",5.0,13984.0,228894.0,222077.0,1600781116.0,512222035.0,512222035.0,"N",131579.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,33.0,"N",5.0,13985.0,228897.0,222077.0,1600781117.0,512222035.0,512222035.0,"N",131580.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,13986.0,228897.0,182463.0,1600781118.0,512222036.0,512222036.0,"N",131581.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,13987.0,228897.0,202893.0,1600781119.0,512222042.0,512222042.0,"N",131582.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13988.0,228897.0,202997.0,1600781120.0,512222044.0,512222044.0,"N",131583.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13989.0,228897.0,206771.0,1600781121.0,512222047.0,512222047.0,"N",131584.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,767.0,"N",5.0,13990.0,228897.0,209568.0,1600781122.0,512222047.0,512222047.0,"N",131585.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,233.0,"N",5.0,13991.0,228899.0,209568.0,1600781123.0,512222053.0,512222053.0,"N",131586.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,3000.0,"N",5.0,13992.0,228899.0,212809.0,1600781124.0,512222054.0,512222054.0,"N",131587.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,13993.0,228899.0,213551.0,1600781125.0,512222055.0,512222055.0,"N",131588.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13994.0,228899.0,214370.0,1600781126.0,512222055.0,512222056.0,"N",131589.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13995.0,228899.0,217539.0,1600781127.0,512222056.0,512222056.0,"N",131590.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,13996.0,228899.0,218375.0,1600781128.0,512222057.0,512222057.0,"N",131591.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,13997.0,228899.0,62045.0,1600781129.0,512222058.0,512222058.0,"N",131592.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2700.0,"N",5.0,13998.0,228899.0,225322.0,1600781130.0,512222059.0,512222059.0,"N",131593.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,8900.0,"N",5.0,13999.0,228899.0,220252.0,1600781131.0,512222059.0,512222059.0,"N",131594.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,5000.0,"N",5.0,14000.0,228899.0,221928.0,1600781132.0,512222060.0,512222060.0,"N",131595.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,14001.0,228899.0,221977.0,1600781133.0,512222061.0,512222061.0,"N",131596.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,14002.0,228899.0,63584.0,1600781134.0,512222061.0,512222062.0,"N",131597.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,14003.0,228899.0,224215.0,1600781135.0,512222068.0,512222068.0,"N",131598.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2100.0,"N",5.0,14004.0,228899.0,225003.0,1600781136.0,512222069.0,512222069.0,"N",131599.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14005.0,228899.0,179710.0,1600781137.0,512222070.0,512222070.0,"N",131600.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14006.0,228899.0,62046.0,1600781138.0,512222071.0,512222071.0,"N",131601.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,700.0,"N",5.0,14007.0,228899.0,224762.0,1600781139.0,512222072.0,512222072.0,"N",131602.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,600.0,"N",5.0,14008.0,228899.0,225780.0,1600781140.0,512222072.0,512222072.0,"N",131603.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,14009.0,228899.0,228048.0,1600781141.0,512222073.0,512222073.0,"N",131604.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,14010.0,228899.0,32710.0,1600781142.0,512222074.0,512222074.0,"N",131605.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2000.0,"N",5.0,14011.0,228899.0,130340.0,1600781143.0,512222075.0,512222075.0,"N",131606.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,14012.0,228899.0,176768.0,1600781144.0,512222075.0,512222075.0,"N",131607.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14013.0,228899.0,62049.0,1600781145.0,512222076.0,512222076.0,"N",131608.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,800.0,"N",5.0,14014.0,228899.0,177524.0,1600781146.0,512222077.0,512222077.0,"N",131609.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14015.0,228899.0,181229.0,1600781147.0,512222078.0,512222078.0,"N",131610.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,14016.0,228899.0,41053.0,1600781148.0,512222078.0,512222078.0,"N",131611.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14017.0,228899.0,201890.0,1600781149.0,512222079.0,512222079.0,"N",131612.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,14018.0,228899.0,3587.0,1600781150.0,512222080.0,512222080.0,"N",131613.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14019.0,228899.0,41028.0,1600781151.0,512222081.0,512222081.0,"N",131614.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,14020.0,228899.0,63585.0,1600781152.0,512222083.0,512222083.0,"N",131615.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,14021.0,228899.0,218421.0,1600781153.0,512222091.0,512222091.0,"N",131616.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,14022.0,228899.0,167040.0,1600781154.0,512222092.0,512222092.0,"N",131617.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14023.0,228899.0,34308.0,1600781155.0,512222093.0,512222093.0,"N",131618.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14024.0,228899.0,62050.0,1600781156.0,512222094.0,512222094.0,"N",131619.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1100.0,"N",5.0,14025.0,228899.0,166014.0,1600781157.0,512222095.0,512222095.0,"N",131620.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14026.0,228899.0,202364.0,1600781158.0,512222095.0,512222095.0,"N",131621.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14027.0,228899.0,214924.0,1600781159.0,512222096.0,512222096.0,"N",131622.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14028.0,228899.0,226028.0,1600781160.0,512222097.0,512222097.0,"N",131623.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,14029.0,228899.0,32711.0,1600781161.0,512222097.0,512222098.0,"N",131624.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14030.0,228899.0,76807.0,1600781162.0,512222098.0,512222098.0,"N",131625.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,14031.0,228899.0,150649.0,1600781163.0,512222099.0,512222099.0,"N",131626.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,14032.0,228899.0,71032.0,1600781164.0,512222099.0,512222099.0,"N",131627.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,14033.0,228899.0,83193.0,1600781165.0,512222100.0,512222100.0,"N",131628.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,867.0,"N",5.0,14034.0,228899.0,140568.0,1600781166.0,512222101.0,512222101.0,"N",131629.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,3400.0,"N",5.0,14035.0,228902.0,140568.0,1600781167.0,512222101.0,512222102.0,"N",131630.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,14036.0,215644.0,140568.0,1600781168.0,512222102.0,512222102.0,"N",131631.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2133.0,"N",5.0,14037.0,223828.0,140568.0,1600781169.0,512222103.0,512222103.0,"N",131632.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14038.0,223828.0,179126.0,1600781170.0,512222104.0,512222104.0,"N",131633.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14039.0,223828.0,205582.0,1600781171.0,512222109.0,512222109.0,"N",131634.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14040.0,223828.0,216581.0,1600781172.0,512222110.0,512222110.0,"N",131635.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14041.0,223828.0,12989.0,1600781173.0,512222111.0,512222111.0,"N",131636.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14042.0,223828.0,62047.0,1600781174.0,512222112.0,512222112.0,"N",131637.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14043.0,223828.0,62048.0,1600781175.0,512222112.0,512222112.0,"N",131638.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,67.0,"N",5.0,14044.0,223828.0,135040.0,1600781176.0,512222113.0,512222113.0,"N",131639.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14045.0,220953.0,135040.0,1600781177.0,512222131.0,512222131.0,"N",131640.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,33.0,"N",5.0,14046.0,106911.0,135040.0,1600781178.0,512222133.0,512222133.0,"N",131641.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,14047.0,106911.0,192893.0,1600781179.0,512222134.0,512222134.0,"N",131642.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,167.0,"N",5.0,14048.0,106911.0,63586.0,1600781180.0,512222137.0,512222137.0,"N",131643.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,833.0,"N",5.0,14049.0,220739.0,63586.0,1600781181.0,512222139.0,512222139.0,"N",131644.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2700.0,"N",5.0,14050.0,220739.0,12652.0,1600781182.0,512222140.0,512222140.0,"N",131645.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14051.0,220739.0,109385.0,1600781183.0,512222143.0,512222143.0,"N",131646.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,700.0,"N",5.0,14052.0,220739.0,216747.0,1600781184.0,512222145.0,512222145.0,"N",131647.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14053.0,220739.0,12990.0,1600781185.0,512222146.0,512222146.0,"N",131648.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14054.0,220739.0,61809.0,1600781186.0,512222148.0,512222148.0,"N",131649.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14055.0,220739.0,62051.0,1600781187.0,512222149.0,512222149.0,"N",131650.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14056.0,220739.0,165534.0,1600781188.0,512222150.0,512222150.0,"N",131651.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2000.0,"N",5.0,14057.0,220739.0,198784.0,1600781189.0,512222156.0,512222156.0,"N",131652.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,14058.0,220739.0,32712.0,1600781190.0,512222158.0,512222158.0,"N",131653.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2000.0,"N",5.0,14059.0,220739.0,41546.0,1600781191.0,512222160.0,512222160.0,"N",131654.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2400.0,"N",5.0,14060.0,220739.0,214219.0,1600781192.0,512222162.0,512222162.0,"N",131655.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,8900.0,"N",5.0,14061.0,220739.0,75249.0,1600781193.0,512222164.0,512222164.0,"N",131656.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,800.0,"N",5.0,14062.0,220739.0,115157.0,1600781194.0,512222166.0,512222166.0,"N",131657.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2200.0,"N",5.0,14063.0,220739.0,170983.0,1600781195.0,512222168.0,512222168.0,"N",131658.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,14064.0,220739.0,188284.0,1600781196.0,512222170.0,512222170.0,"N",131659.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,14065.0,220739.0,208374.0,1600781197.0,512222172.0,512222172.0,"N",131660.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,4000.0,"N",5.0,14066.0,220739.0,212016.0,1600781198.0,512222174.0,512222174.0,"N",131661.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14067.0,220739.0,205044.0,1600781199.0,512222176.0,512222176.0,"N",131662.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,14068.0,220739.0,207106.0,1600781200.0,512222178.0,512222178.0,"N",131663.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14069.0,220739.0,22366.0,1600781201.0,512222180.0,512222180.0,"N",131664.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14070.0,220739.0,62052.0,1600781202.0,512222182.0,512222182.0,"N",131665.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,14071.0,220739.0,153017.0,1600781203.0,512222184.0,512222184.0,"N",131666.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14072.0,220739.0,209919.0,1600781204.0,512222186.0,512222186.0,"N",131667.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,14073.0,220739.0,213931.0,1600781205.0,512222188.0,512222188.0,"N",131668.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,300.0,"N",5.0,14074.0,220739.0,144375.0,1600781206.0,512222190.0,512222190.0,"N",131669.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2000.0,"N",5.0,14075.0,220739.0,190115.0,1600781207.0,512222192.0,512222192.0,"N",131670.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,2000.0,"N",5.0,14076.0,220739.0,203179.0,1600781208.0,512222193.0,512222194.0,"N",131671.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14077.0,220739.0,42575.0,1600781209.0,512222195.0,512222195.0,"N",131672.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14078.0,220739.0,109383.0,1600781210.0,512222198.0,512222198.0,"N",131673.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,400.0,"N",5.0,14079.0,220739.0,139296.0,1600781211.0,512222200.0,512222200.0,"N",131674.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14080.0,220739.0,12991.0,1600781212.0,512222202.0,512222202.0,"N",131675.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14081.0,220739.0,63754.0,1600781213.0,512222203.0,512222203.0,"N",131676.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14082.0,220739.0,96471.0,1600781214.0,512222207.0,512222207.0,"N",131677.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14083.0,220739.0,193136.0,1600781215.0,512222208.0,512222208.0,"N",131678.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,14084.0,220739.0,32713.0,1600781216.0,512222210.0,512222210.0,"N",131679.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,1000.0,"N",5.0,14085.0,220739.0,63587.0,1600781217.0,512222212.0,512222212.0,"N",131680.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14086.0,220739.0,12992.0,1600781218.0,512222215.0,512222215.0,"N",131681.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,500.0,"N",5.0,14087.0,220739.0,63755.0,1600781219.0,512222217.0,512222217.0,"N",131682.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14088.0,220739.0,84942.0,1600781220.0,512222218.0,512222218.0,"N",131683.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,600.0,"N",5.0,14089.0,220739.0,99310.0,1600781221.0,512222219.0,512222219.0,"N",131684.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14090.0,220739.0,107389.0,1600781222.0,512222220.0,512222220.0,"N",131685.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,200.0,"N",5.0,14091.0,220739.0,148978.0,1600781223.0,512222220.0,512222220.0,"N",131686.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,100.0,"N",5.0,14092.0,220739.0,208949.0,1600781224.0,512222226.0,512222226.0,"N",131687.0 +"trans_1_600884",1,600884,"2010-01-21 9:25:00.98",33.4600000000,5867.0,"N",5.0,14093.0,220739.0,219098.0,1600781225.0,512222228.0,512222228.0,"N",131688.0 +"trans_1_600885",1,600885,"2010-01-21 9:25:00.98",74.7700000000,100.0,"N",5.0,14094.0,218502.0,88013.0,1600781226.0,512222230.0,512222230.0,"N",131887.0 +"trans_1_600885",1,600885,"2010-01-21 9:25:00.98",74.7700000000,100.0,"N",5.0,14095.0,174159.0,88013.0,1600781227.0,512222232.0,512222232.0,"N",131888.0 +"trans_1_600885",1,600885,"2010-01-21 9:25:00.98",74.7700000000,100.0,"N",5.0,14096.0,210980.0,88013.0,1600781228.0,512222234.0,512222234.0,"N",131889.0 \ No newline at end of file diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py index 4f3b2e2def..9eea490eba 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py @@ -191,12 +191,21 @@ class TDTestCase: tdSql.execute(create_db_replica_3_vgroups_100) self.vote_leader_time_costs(db3) - + def test_TS_5968(self): + conn = TDCom().newTdSql() + sql = "select db_name,sum(columns-1) from information_schema.ins_tables group by db_name" + conn.query(sql, queryTimes=10) + balance_sql = "balance vgroup leader database db_2" + tdSql.execute(balance_sql, queryTimes=1) + conn.query(sql, queryTimes=10) + tdLog.info("waiting for catalog update finished") + conn.close() def run(self): self.check_setup_cluster_status() self.test_init_vgroups_time_costs() + self.test_TS_5968() def stop(self): diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index f56a9797f3..37da47bae6 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -672,7 +672,7 @@ void shellPrintField(const char *val, TAOS_FIELD *field, int32_t width, int32_t if (tsEnableScience) { printf("%*.7e", width, GET_FLOAT_VAL(val)); } else { - n = tsnprintf(buf, LENGTH, "%*.7f", width, GET_FLOAT_VAL(val)); + n = snprintf(buf, LENGTH, "%*.*g", width, FLT_DIG, GET_FLOAT_VAL(val)); if (n > SHELL_FLOAT_WIDTH) { printf("%*.7e", width, GET_FLOAT_VAL(val)); } else { @@ -685,7 +685,7 @@ void shellPrintField(const char *val, TAOS_FIELD *field, int32_t width, int32_t snprintf(buf, LENGTH, "%*.15e", width, GET_DOUBLE_VAL(val)); printf("%s", buf); } else { - n = tsnprintf(buf, LENGTH, "%*.15f", width, GET_DOUBLE_VAL(val)); + n = snprintf(buf, LENGTH, "%*.*g", width, DBL_DIG, GET_DOUBLE_VAL(val)); if (n > SHELL_DOUBLE_WIDTH) { printf("%*.15e", width, GET_DOUBLE_VAL(val)); } else {