Files
greptimedb/tests/cases/standalone/common/tql/literal_only.result
Ruihang Xia 605776f49c feat: support bool operator with other computation (#1844)
* 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>
2023-06-29 19:23:54 +08:00

41 lines
1.1 KiB
Plaintext

TQL EVAL (0, 10, '5s') 1;
+---------------------+-------+
| time | value |
+---------------------+-------+
| 1970-01-01T00:00:00 | 1.0 |
| 1970-01-01T00:00:05 | 1.0 |
| 1970-01-01T00:00:10 | 1.0 |
+---------------------+-------+
TQL EVAL (0, 10, '5s') 1+1;
+---------------------+-------+
| time | value |
+---------------------+-------+
| 1970-01-01T00:00:00 | 2.0 |
| 1970-01-01T00:00:05 | 2.0 |
| 1970-01-01T00:00:10 | 2.0 |
+---------------------+-------+
TQL EVAL (0, 10, '5s') "1+1";
+---------------------+-------+
| time | value |
+---------------------+-------+
| 1970-01-01T00:00:00 | 1+1 |
| 1970-01-01T00:00:05 | 1+1 |
| 1970-01-01T00:00:10 | 1+1 |
+---------------------+-------+
TQL EVAL (0, 10, '5s') 1 * 2 + 4 / 6 - 10 % 2 ^ 2;
+---------------------+--------------------+
| time | value |
+---------------------+--------------------+
| 1970-01-01T00:00:00 | 0.6666666666666665 |
| 1970-01-01T00:00:05 | 0.6666666666666665 |
| 1970-01-01T00:00:10 | 0.6666666666666665 |
+---------------------+--------------------+