4paradigm / 4paradigm/OpenMLDB

SQL: Add Identifier Length Limits

オープン
#850 コメント 0 件 リアクション 0 件 担当者 1 名 @jingchen2222 が担当を希望しています GitHub で見る
enhancement
主要言語
C++
スター
1.7k
フォーク
331
平均マージ
12日 12時間
マージ済み PR(30日)
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 を短くまとめたダイジェスト。