Skip to content

Commit 1a3faff

Browse files
committed
docs: update compat_fuse README to match current implementation
1 parent 9f17bcd commit 1a3faff

File tree

1 file changed

+50
-17
lines changed

1 file changed

+50
-17
lines changed

tests/compat_fuse/README.md

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,68 @@
11
# Fuse table compatibility test
22

3-
This script tests whether a newer version databend-query can read fuse table data written
4-
by a older version databend-query.
3+
Tests write-then-read compatibility of fuse-table format across databend-query versions.
4+
5+
- **Backward compat**: old writer → current reader
6+
- **Forward compat**: current writer → old reader
7+
8+
## Test matrix
9+
10+
All test cases are defined in `test_cases.yaml`. Each entry specifies:
11+
12+
| Field | Description |
13+
|----------|--------------------------------------------------------------------|
14+
| `writer` | Query version that writes data (`"current"` = latest build) |
15+
| `reader` | Query version that reads data (`"current"` = latest build) |
16+
| `meta` | Meta-service versions to run in order (upgrades on-disk meta data) |
17+
| `suite` | sqllogictest sub-directory under `compat-logictest/` |
18+
19+
To add a test case, append an entry to `test_cases.yaml`.
520

621
## Usage
722

23+
Run all cases (CI mode):
24+
825
```shell
9-
python3 tests/compat_fuse/test_compat_fuse.py --writer-version <old_ver> --reader-version current --meta-versions <meta_ver>
10-
tests/compat_fuse/test_compat_fuse_forward.sh <old_ver>
26+
python3 tests/compat_fuse/test_compat_fuse.py --run-all
1127
```
1228

13-
E.g. `tests/compat_fuse/test-compat_fuse.sh 0.7.151` tests if the fuse-table written
14-
by **databend-query-0.7.151** can be read by **current** version databend-query.
29+
Dry run (print cases without executing):
1530

16-
`tests/compat_fuse/test-fuse-forward-compat.sh 1.2.307` tests if the fuse-table written
17-
by **current** can be read by **databend-query-0.7.151** version databend-query.
31+
```shell
32+
python3 tests/compat_fuse/test_compat_fuse.py --run-all --dry-run
33+
```
34+
35+
Run a single case (local debugging):
36+
37+
```shell
38+
python3 tests/compat_fuse/test_compat_fuse.py \
39+
--writer-version 1.2.46 \
40+
--reader-version current \
41+
--meta-versions 1.2.527 1.2.677 1.2.833 \
42+
--logictest-path base
43+
```
1844

1945
## Prerequisites
2046

21-
- Current version of databend-query and databend-meta must reside in `./bins`:
22-
- `./bins/current/databend-query`
23-
- `./bins/current/databend-meta`
47+
Current version binaries must reside in `./bins/current/bin/`:
48+
49+
- `databend-query`
50+
- `databend-meta`
51+
- `databend-sqllogictests`
52+
53+
This is handled by the CI setup action. Old version binaries are downloaded automatically.
54+
55+
## Test flow
2456

25-
Since building a binary takes several minutes,
26-
this step is usually done by the calling process, e.g., the CI script.
57+
For each case, the script runs three phases:
2758

59+
1. **Write** — start meta (first version) + query (writer version), run `fuse_compat_write`
60+
2. **Meta upgrade** — cycle through all meta versions to upgrade on-disk data
61+
3. **Read** — start meta (last version) + query (reader version), run `fuse_compat_read`
2862

2963
## Testing data
3064

31-
- Suite `tests/compat_fuse/compat-logictest/fuse_compat_write` writes data into a fuse table via an old version query.
32-
- Suite `tests/compat_fuse/compat-logictest/fuse_compat_read` reads the data via current version query.
65+
Each suite under `compat-logictest/` contains two sqllogictest files:
3366

34-
Fuse table maintainers update these two `logictest` scripts to let the write/read
35-
operations cover fuse-table features.
67+
- `fuse_compat_write` — creates tables and writes data
68+
- `fuse_compat_read` — reads and verifies the data

0 commit comments

Comments
 (0)