4paradigm / 4paradigm/OpenMLDB

SQL: Add Identifier Length Limits

Đang mở
#850 0 bình luận 0 reaction 1 người được giao Được @jingchen2222 nhận Xem trên GitHub
enhancement
Ngôn ngữ chính
C++
Star
1.7k
Fork
331
Merge trung bình
12 ngày 12 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
sql
Lĩnh vực
backend, database
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.