mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-15 17:52:57 +00:00
* add some cases Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix sqlness test Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * impl atan2 and power Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix instant manipulator Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix clippy Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
create table data (ts timestamp(3) time index, val double);
|
|
|
|
Affected Rows: 0
|
|
|
|
insert into data values (0, 1), (10000, 2), (20000, 3);
|
|
|
|
Affected Rows: 3
|
|
|
|
tql eval (0, 30, '10s'), data < 1;
|
|
|
|
++
|
|
++
|
|
|
|
tql eval (0, 30, '10s'), data + (1 < bool 2);
|
|
|
|
+---------------------+-------------------------------+
|
|
| ts | val + Float64(1) < Float64(2) |
|
|
+---------------------+-------------------------------+
|
|
| 1970-01-01T00:00:00 | 2.0 |
|
|
| 1970-01-01T00:00:10 | 3.0 |
|
|
| 1970-01-01T00:00:20 | 4.0 |
|
|
| 1970-01-01T00:00:30 | 4.0 |
|
|
+---------------------+-------------------------------+
|
|
|
|
tql eval (0, 30, '10s'), data + (1 > bool 2);
|
|
|
|
+---------------------+-------------------------------+
|
|
| ts | val + Float64(1) > Float64(2) |
|
|
+---------------------+-------------------------------+
|
|
| 1970-01-01T00:00:00 | 1.0 |
|
|
| 1970-01-01T00:00:10 | 2.0 |
|
|
| 1970-01-01T00:00:20 | 3.0 |
|
|
| 1970-01-01T00:00:30 | 3.0 |
|
|
+---------------------+-------------------------------+
|
|
|
|
drop table data;
|
|
|
|
Affected Rows: 1
|
|
|