apache / apache/datafusion-sqlparser-rs

Implement SQL writer

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

Description

It is often useful to be able to generate SQL from the AST. This opens up possibilities for SQL manipulation or translation. The write should recursively walk the AST and write SQL to a writer / output stream.

A secondary benefit of having a writer is that it often simplifies writing unit tests for the parser, since a SQL statement can be parsed and re-written and then the output can be compared with the input (ignoring whitespace differences)

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test path is named. Start by locating the AST definitions and parser entry points, then inspect existing parser unit tests. Done means recursively writing the parsed AST as SQL through a writer or output stream, with round-trip tests comparing parsed and rewritten statements while ignoring whitespace differences.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sql
Domain
compilers, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.