4paradigm / 4paradigm/OpenMLDB

disk table supports duplicate key?

オープン
#2,318 コメント 0 件 リアクション 0 件 担当者 1 名 @zhanghaohit が担当を希望しています GitHub で見る
enhancement storage-engine
主要言語
C++
スター
1.7k
フォーク
331
平均マージ
12日 12時間
マージ済み PR(30日)
1

説明

**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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
sql
領域
backend, databases
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。