apache / apache/datafusion-sqlparser-rs
DuckDB COPY FROM DATABASE memory TO ... can't be parsed
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
For example:
```sql
COPY FROM DATABASE memory TO my_database;
```
gives the error:
```rs
ParserError("Expected: FROM or TO, found: DATABASE at Line: 1, Column: 11")
```
Documentation: https://duckdb.org/docs/stable/guides/snippets/copy_in-memory_database_to_file.html
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the documented `COPY FROM DATABASE memory TO my_database` statement and trace how the SQL parser handles COPY syntax. Check the existing parser tests for COPY statements, then add coverage for this form; done means the statement parses successfully without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100