4paradigm / 4paradigm/OpenMLDB

SQL: Add Identifier Length Limits

未关闭
#850 0 条评论 0 个 reaction 已指派 1 人 已被 @jingchen2222 认领 在 GitHub 查看
enhancement
主要语言
C++
星标
1.7k
派生
331
平均合并
12 天 12 小时
30 天内合并 PR
1

描述

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

贡献指南

打开贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
sql
领域
backend, database
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。