test: add data compatibility test (#3109)

* test: data files compatibility test

* rework compatibility test

* revert unneeded changes

* revert unneeded changes

* debug CI

* Update .github/workflows/develop.yml

Co-authored-by: Ruihang Xia <waynestxia@gmail.com>

---------

Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
LFC
2024-02-20 15:44:04 +08:00
committed by GitHub
parent b1f54d8a03
commit eded08897d
9 changed files with 234 additions and 8 deletions

View File

@@ -0,0 +1,13 @@
select ts, i, s, f from foo order by ts;
+---------------------+---+----------+-----+
| ts | i | s | f |
+---------------------+---+----------+-----+
| 2024-02-01T17:00:00 | 1 | my_tag_1 | |
| 2024-02-01T18:00:00 | 2 | my_tag_2 | |
| 2024-02-01T19:00:00 | 3 | my_tag_3 | |
| 2024-02-01T20:00:00 | 4 | my_tag_4 | 4.4 |
| 2024-02-01T21:00:00 | 5 | my_tag_5 | 5.5 |
| 2024-02-01T22:00:00 | 6 | my_tag_6 | 6.6 |
+---------------------+---+----------+-----+

View File

@@ -0,0 +1 @@
select ts, i, s, f from foo order by ts;

View File

@@ -0,0 +1,25 @@
create table foo(ts timestamp time index, s string primary key, i int);
Affected Rows: 0
insert into foo values
("2024-02-02 01:00:00+0800", "my_tag_1", 1),
("2024-02-02 02:00:00+0800", "my_tag_2", 2),
("2024-02-02 03:00:00+0800", "my_tag_3", 3);
Affected Rows: 3
-- Alter the table to trigger a flush (will be executed before process being terminated).
-- Otherwise the SST might not be generated (the data could be remained in WAL).
-- If we have the explicitly flush table interface in the future, it's still good to have the alter table in the test.
alter table foo add column f float;
Affected Rows: 0
insert into foo values
("2024-02-02 04:00:00+0800", "my_tag_4", 4, 4.4),
("2024-02-02 05:00:00+0800", "my_tag_5", 5, 5.5),
("2024-02-02 06:00:00+0800", "my_tag_6", 6, 6.6);
Affected Rows: 3

View File

@@ -0,0 +1,16 @@
create table foo(ts timestamp time index, s string primary key, i int);
insert into foo values
("2024-02-02 01:00:00+0800", "my_tag_1", 1),
("2024-02-02 02:00:00+0800", "my_tag_2", 2),
("2024-02-02 03:00:00+0800", "my_tag_3", 3);
-- Alter the table to trigger a flush (will be executed before process being terminated).
-- Otherwise the SST might not be generated (the data could be remained in WAL).
-- If we have the explicitly flush table interface in the future, it's still good to have the alter table in the test.
alter table foo add column f float;
insert into foo values
("2024-02-02 04:00:00+0800", "my_tag_4", 4, 4.4),
("2024-02-02 05:00:00+0800", "my_tag_5", 5, 5.5),
("2024-02-02 06:00:00+0800", "my_tag_6", 6, 6.6);