apache / apache/datafusion-sqlparser-rs
Expected literal number, found: $1
- 主要語言
- Rust
- 星號
- 3.5k
- 分支
- 772
- 平均合併
- 4 天 9 小時
- 30 天內合併 PR
- 17
描述
test code:
```rust
#[test]
fn test_sql() {
let sql = "select distinct incident0_.incident_id as incident1_39_ from incident incident0_ where 1=1 order by incident0_.create_time desc limit $1";
Parser::parse_sql(&dialect, sql).unwrap();
}
```
result:
```text
called `Result::unwrap()` on an `Err` value: ParserError("Expected literal number, found: $1")
thread 'interceptor::pg::tests::test_sql' panicked at 'called `Result::unwrap()` on an `Err` value: ParserError("Expected literal number, found: $1")',
```
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
Start with the provided test case and the Parser::parse_sql entry point, then trace how the LIMIT expression handles the $1 parameter. The issue is done when this SQL parses successfully without the “Expected literal number” error.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- rust, sql
- 領域
- databases
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100