4paradigm / 4paradigm/OpenMLDB
disk table supports duplicate key?
- Ngôn ngữ chính
- C++
- Star
- 1.7k
- Fork
- 331
- Merge trung bình
- 12 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
**Describe the feature you'd like**
One big difference between disk table and mem table is that disk table only allows one unique key per index.
For example, if the index is . the rows we inserted are:
|id |col1 | col2|
|-------| ------ | ----- |
1 | k1 | 1
2 | k1 | 1
3 | k2 | 1
4 | k2 | 2
In mem table, it will be:
|id |col1 | col2|
|-------| ------ | ----- |
1 | k1 | 1
2 | k1 | 1
3 | k2 | 1
4 | k2 | 2
However, in disk table, it will be:
|id |col1 | col2|
|-------| ------ | ----- |
1 | k1 | 1
3 | k2 | 1
4 | k2 | 2
because row 1 and row 2 have the same value of .
We should discuss whether we should support the same semantics for both disk table and memory table.
**Additional context**
One possible solution is to add a sequence number to the combined key for disk table.
Hướng dẫn đóng góp
Hướng nghiên cứu
Look at the disk table and memory table implementations to understand how keys are handled. The issue suggests adding a sequence number to the combined key for disk tables to allow duplicates. Start by examining the index structures and insertion logic, then design a change that maintains performance while supporting duplicate keys. Testing will involve verifying that duplicate rows are preserved in disk tables as they are in memory tables.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- sql
- Lĩnh vực
- backend, databases
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 45/100