4paradigm / 4paradigm/OpenMLDB
SQL: Add Identifier Length Limits
- Langage dominant
- C++
- Étoiles
- 1.7k
- Forks
- 331
- Merge moyen
- 12 j 12 h
- PR mergées (30 j)
- 1
Description
**Is your feature request related to a problem? Please describe.**
Certain objects within OpenMLDB, including database, table, index, column, etc are known as identifiers.
Now the identifiers in OpenMLDB do not have specific string limits which might introduce risks into our system.
In this issue, we are going to apply restrictions on the maximum length of each type of identifier.
#### reference
https://dev.mysql.com/doc/refman/8.0/en/identifier-length.html
**Describe the solution you'd like**
- Assert identifier length size in ASTNodeConverter.
- Identifier size should be <= 64
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
The issue mentions adding length checks in ASTNodeConverter. Start by locating this converter in the codebase, likely in the SQL parser or compiler module. Examine how identifiers are currently handled and where validation can be added. Refer to the MySQL documentation link for length limits. Write tests to verify that identifiers longer than 64 characters are rejected.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- sql
- Domaine
- backend, database
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100