Support WITH clause in CREATE TABLE Statements
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Is your feature request related to a problem or challenge?
In https://github.com/ArroyoSystems/arroyo we use DataFusion to parse and plan SQL queries, before mapping the logical plan into a streaming dataflow. As such, our sources will tend to be datastores such as Kafka. The typical way to define a kafka source in the streaming world is with the WITH statement, e.g.
```
CREATE TABLE people (
id INT not null,
name STRING not null,
) with (connection='kafka', topic='output');
SELECT * FROM people;
```
### Describe the solution you'd like
The logical plan should accept Statement::CreateTable with a non-empty with_options, so that systems that use DataFusion for planning don't need to fall back on the raw AST.
### Describe alternatives you've considered
We're currently checking the raw AST to see if it has with_options and manually translating that.
### Additional context
_No response_
Contributor guide
Research direction
Start by tracing Statement::CreateTable through DataFusion's logical-plan handling and inspect how non-empty with_options are represented. Confirm the planner accepts the WITH options without requiring raw AST translation, using the existing CREATE TABLE planning path to verify completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100