4paradigm / 4paradigm/OpenMLDB
Support SQL syntax of limit with parameter
- 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ả
Now we are using Python SDK and get this error.
```
[SQL: SELECT employees.name, employees.age
FROM employees
LIMIT ?]
[parameters: (1,)]
```
```
SQLQuery:W0331 15:00:52.237329 1441265280 sql_compiler.cc:329] Fail create sql plan: Un-support LIMIT with expression type LimitOffset
(At /Users/tobe/code/4pd/OpenMLDB/hybridse/src/planv2/planner_v2.cc:40)
(At /Users/tobe/code/4pd/OpenMLDB/hybridse/src/planv2/ast_node_converter.cc:1811)
(At /Users/tobe/code/4pd/OpenMLDB/hybridse/src/planv2/ast_node_converter.cc:536)
(At /Users/tobe/code/4pd/OpenMLDB/hybridse/src/planv2/ast_node_converter.cc:1243)
(At /Users/tobe/code/4pd/OpenMLDB/hybridse/src/planv2/ast_node_converter.cc:1215)
(Caused by) Un-support LIMIT with expression type LimitOffset
W0331 15:00:52.237375 1441265280 sql_cluster_router.cc:1053] Status: [1002] fail to explain SELECT employees.name, employees.age
FROM employees
LIMIT ?--Un-support LIMIT with expression type LimitOffset
```
Hướng dẫn đóng góp
Hướng nghiên cứu
The error originates in hybridse/src/planv2/ast_node_converter.cc and sql_compiler.cc, indicating unsupported LIMIT with parameter expression. Start by examining the SQL parser and planner code to understand how LIMIT clauses are currently handled. Look for where LimitOffset expressions are processed and extend support for parameterized limits. Testing involves running SQL queries with parameterized LIMIT through the Python SDK to verify the fix.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python, sql
- Lĩnh vực
- backend, databases, machine-learning
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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