4paradigm / 4paradigm/OpenMLDB

SQL: Add Identifier Length Limits

Abierto
#850 0 comentarios 0 reacciones 1 asignado Reclamado por @jingchen2222 Ver en GitHub
enhancement
Lenguaje dominante
C++
Estrellas
1.7k
Forks
331
Merge medio
12 d 12 h
PR fusionados (30 d)
1

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
sql
Área
backend, database
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.