apache / apache/datafusion-sqlparser-rs

Expected literal number, found: $1

未关闭
#486 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
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

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。