Files
greptimedb/tests/compatibility/cases/legacy_jsonb/verify.result
discord9 16a2b18c2b test: add sqlness compatibility runner (#8334)
* test: add sqlness compatibility runner

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

* fix: update remote dyn filter request

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

* fix: satisfy compat runner clippy

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

* test: add legacy jsonb compatibility case

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

* test: align legacy jsonb compat assertion

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

* fix: align remote dyn filter proto fields

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

* test: simplify compat topology and SQL handling

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

* fix: switch compat runner to target binary

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

* test: drop compat SQLNESS comment handling

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

* test: support sqlness commands in compat

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

* test: fix compat protocol reconnect

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

* test: filter compat cases by version

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

* test: add merge mode compat case

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

* test: harden compat runner setup

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

* test: address compat review follow-ups

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

* test: tighten compat case validation

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

* test: require explicit compat expectations

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

* test: generate missing compat snapshots

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

* test: add compat dry run

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-06-26 04:15:27 +00:00

40 lines
1.7 KiB
Plaintext

SELECT ts, host, json_to_string(j) AS j
FROM legacy_jsonb
ORDER BY ts, host;
+---------------------+------+----------------------------+
| ts | host | j |
+---------------------+------+----------------------------+
| 2024-01-01T00:00:01 | r1 | {"a":10,"msg":"old-jsonb"} |
| 2024-01-01T00:00:02 | r2 | {"a":20,"msg":"old-jsonb"} |
| 2024-01-01T00:00:03 | r3 | {"msg":"no-a"} |
+---------------------+------+----------------------------+
SELECT host, json_to_string(j) AS j
FROM legacy_jsonb
WHERE json_get_int(j, 'a') = 10
ORDER BY host;
+------+----------------------------+
| host | j |
+------+----------------------------+
| r1 | {"a":10,"msg":"old-jsonb"} |
+------+----------------------------+
SHOW CREATE TABLE legacy_jsonb;
+--------------+---------------------------------------------+
| Table | Create Table |
+--------------+---------------------------------------------+
| legacy_jsonb | CREATE TABLE IF NOT EXISTS "legacy_jsonb" ( |
| | "ts" TIMESTAMP(3) NOT NULL, |
| | "host" STRING NULL, |
| | "j" JSON NULL, |
| | TIME INDEX ("ts"), |
| | PRIMARY KEY ("host") |
| | ) |
| | |
| | ENGINE=mito |
| | |
+--------------+---------------------------------------------+