apache / apache/datafusion-sqlparser-rs

ast: provider builders for convenient programmatic construction

Open
#1,642 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.5k
Forks
772
Avg merge
4d 9h
Merged PRs (30d)
17

Description

I have a use case where I'm generating SQL strings, and in general having `sqlparser::ast` is quite good, but the structs are particularly painful to construct programatically. It'd be interesting if the ast structs offered an optional feature that had https://github.com/elastio/bon builders derived to build them.

Maybe somebody will teach me how to safely construct strings that I can then parse (that'd be fine! I just am not generally eager to be doing string formatting to produce sql, particularly given I don't have full control over the identifiers). For now I am generally just doing this formatting, but I don't love it.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names sqlparser::ast and an optional bon-derived builder feature as the entry points; inspect how AST structs and optional features are currently defined. Completion should be an agreed, usable builder approach for the relevant AST structs, reducing the need to manually format SQL strings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sql
Domain
backend-api-design, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.