Skip to content

Commit a263305

Browse files
committed
docs: update query-meta compatibility chart
1 parent 79d0986 commit a263305

File tree

3 files changed

+19
-23
lines changed

3 files changed

+19
-23
lines changed

src/meta/README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,11 @@ To add a new feature(add new type or update an type), the developer should do:
7474

7575
## Compatibility with Databend Query
7676

77-
The following is an illustration of the latest query-meta compatibility:
77+
The Query-Meta compatibility changes when `MIN_METASRV_SEMVER` or `MIN_METACLI_SEMVER` changes.
7878

79-
`[, a.b.c)` denotes the range of versions from previous version(on the left column)(inclusive)
80-
upto `a.b.c` (exclusive).
79+
The compatibility is stored in [compat.py](compat.py), and a corresponding illustration is generated:
8180

82-
83-
| `Meta\Query` | 1.2.287) | [, 1.2.361) | [, 1.2.715) | [, 1.2.726) | [, +∞) |
84-
|:-------------------|:---------|:------------|:------------|:-----------------|:-------|
85-
| [1.2.63, 1.2.226) | |||||
86-
| [1.2.226, 1.2.258) | |||||
87-
| [1.2.258, 1.2.663) | ||| ✅(no semaphore) ||
88-
| [1.2.663, 1.2.677) | ||| ✅(no semaphore) ||
89-
| [1.2.677, +∞) | |||||
81+
![](compatibility_chart.png)
9082

9183
History versions that are not included in the above chart:
9284

src/meta/compat.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import matplotlib.patches as patches
44

55
meta_to_query_compat = [
6-
# upto meta version(exclusive) : compatible query version(left open, right closed)
6+
# upto meta version(exclusive) : compatible query version [from, to) (left closed, right open)
77

88
"0.0.0 0.0.0 0.0.0 ",
99
"0.8.30 0.0.0 0.0.0 ",
@@ -15,9 +15,10 @@
1515
"1.2.258 0.9.41 1.2.361 ",
1616
"1.2.663 0.9.41 1.2.726 ",
1717
"1.2.677 1.2.287 1.2.726 ",
18-
"1.2.755 1.2.676 ∞ ",
19-
"1.2.756 1.2.676 ∞ ",
20-
"1.2.764 1.2.676 ∞ ",
18+
"1.2.755 1.2.676 1.2.821 ",
19+
"1.2.756 1.2.676 1.2.821 ",
20+
"1.2.764 1.2.676 1.2.821 ",
21+
"1.2.768 1.2.676 1.2.821 ",
2122
"∞ 1.2.676 ∞ ",
2223
]
2324

@@ -59,23 +60,26 @@ def version_key(v):
5960
# Create compatibility rectangles
6061
for i, (meta, q_from, q_to) in enumerate(ranges):
6162
# Get positions
62-
meta_x = meta_pos[meta]
63+
meta_end_x = meta_pos[meta] # This is the exclusive upper bound
6364
q_from_y = query_pos[q_from]
6465
q_to_y = query_pos[q_to]
6566

66-
# Determine the width of the rectangle (next meta version - current)
67-
next_meta_idx = sorted_meta_versions.index(meta) + 1
68-
if next_meta_idx < len(sorted_meta_versions):
69-
width = meta_pos[sorted_meta_versions[next_meta_idx]] - meta_x
67+
# Determine the start position (previous meta version or 0)
68+
meta_idx = sorted_meta_versions.index(meta)
69+
if meta_idx > 0:
70+
meta_start_x = meta_pos[sorted_meta_versions[meta_idx - 1]]
7071
else:
71-
width = 1.0 # Width for the last range
72+
meta_start_x = -0.5 # Start from beginning for first range
7273

73-
# Height of the rectangle
74+
# Width of the rectangle (up to but not including current meta version)
75+
width = meta_end_x - meta_start_x
76+
77+
# Height of the rectangle ([from, to) range - covers q_from_y to just before q_to_y)
7478
height = q_to_y - q_from_y
7579

7680
# Create rectangle patch
7781
rect = patches.Rectangle(
78-
(meta_x, q_from_y),
82+
(meta_start_x, q_from_y),
7983
width,
8084
height,
8185
linewidth=1,

src/meta/compatibility_chart.png

4.39 KB
Loading

0 commit comments

Comments
 (0)