4paradigm / 4paradigm/OpenMLDB
Support SQL syntax of limit with parameter
- 主要言語
- C++
- スター
- 1.7k
- フォーク
- 331
- 平均マージ
- 12日 12時間
- マージ済み PR(30日)
- 1
説明
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
```
コントリビューションガイド
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python, sql
- 領域
- backend, databases, machine-learning
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100