apache / apache/datafusion-sqlparser-rs
did sql ast restore sql supported?
- 主要語言
- Rust
- 星號
- 3.5k
- 分支
- 772
- 平均合併
- 4 天 9 小時
- 30 天內合併 PR
- 17
描述
like
`
AST: [Query(Query { ctes: [], body: Select(Select { distinct: false, projection: [UnnamedExpr(Identifier("a")), UnnamedExpr(Identifier("b")), UnnamedExpr(Value(Long(123))), UnnamedExpr(Function(Function { name: ObjectName(["myfunc"]), args: [Identifier("b")], over: None, distinct: false }))], from: [TableWithJoins { relation: Table { name: ObjectName(["table_1"]), alias: None, args: [], with_hints: [] }, joins: [] }], selection: Some(BinaryOp { left: BinaryOp { left: Identifier("a"), op: Gt, right: Identifier("b") }, op: And, right: BinaryOp { left: Identifier("b"), op: Lt, right: Value(Long(100)) } }), group_by: [], having: None }), order_by: [OrderByExpr { expr: Identifier("a"), asc: Some(false) }, OrderByExpr { expr: Identifier("b"), asc: None }], limit: None, offset: None, fetch: None })]
`
restore to
`
SELECT a, b, 123, myfunc(b) \
FROM table_1 \
WHERE a > b AND b < 100 \
ORDER BY a DESC, b"
`
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
issue 中沒有指定檔案、測試或進入點。先定位 AST-to-SQL 還原功能,然後使用提供的 AST 和預期的 SELECT 輸出作為驗收案例,包括其中的 WHERE 和 ORDER BY 子句。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- rust, sql
- 領域
- databases
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100