Files
greptimedb/tests/compatibility/cases/last_row_merge/verify.result
discord9 6b587eb0a5 test: add recent sqlness compat cases (#8395)
* test: add recent sqlness compat cases

Signed-off-by: discord9 <discord9@163.com>

* test: add more sqlness compat cases

Signed-off-by: discord9 <discord9@163.com>

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-02 03:13:53 +00:00

42 lines
1.8 KiB
Plaintext

SELECT host, ts, cpu, memory
FROM t_last_row_merge
ORDER BY host, ts;
+-------+-------------------------+------+--------+
| host | ts | cpu | memory |
+-------+-------------------------+------+--------+
| host1 | 1970-01-01T00:00:00 | | 10.0 |
| host2 | 1970-01-01T00:00:00.001 | 11.0 | |
+-------+-------------------------+------+--------+
SELECT host, cpu, memory
FROM t_last_row_merge
WHERE memory IS NULL
ORDER BY host;
+-------+------+--------+
| host | cpu | memory |
+-------+------+--------+
| host2 | 11.0 | |
+-------+------+--------+
SHOW CREATE TABLE t_last_row_merge;
+------------------+-------------------------------------------------+
| Table | Create Table |
+------------------+-------------------------------------------------+
| t_last_row_merge | CREATE TABLE IF NOT EXISTS "t_last_row_merge" ( |
| | "host" STRING NULL, |
| | "ts" TIMESTAMP(3) NOT NULL, |
| | "cpu" DOUBLE NULL, |
| | "memory" DOUBLE NULL, |
| | TIME INDEX ("ts"), |
| | PRIMARY KEY ("host") |
| | ) |
| | |
| | ENGINE=mito |
| | WITH( |
| | merge_mode = 'last_row' |
| | ) |
+------------------+-------------------------------------------------+