4paradigm / 4paradigm/OpenMLDB

disk table supports duplicate key?

Ouverte
#2,318 0 commentaires 0 réactions 1 personne assignée Réclamée par @zhanghaohit Voir sur GitHub
enhancement storage-engine
Langage dominant
C++
Étoiles
1.7k
Forks
331
Merge moyen
12 j 12 h
PR mergées (30 j)
1

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
sql
Domaine
backend, databases
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.