apache / apache/datafusion-sqlparser-rs

The syntax of mysql RENAME TABLE tb1 TO tb2 is not supported.

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

Description

```rust
let sql = "RENAME TABLE `test`.`test` TO `test`.`test2`";

let dialect = MySqlDialect {};
let ast = Parser::parse_sql(&dialect, sql).unwrap();

println!("AST: {:#?}", ast);
```

output error:
```
called `Result::unwrap()` on an `Err` value: ParserError("Expected: an SQL statement, found: RENAME at Line: 1, Column: 1")
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Parser::parse_sql call using MySqlDialect and the failing RENAME TABLE example in the issue. Trace how MySQL statements are recognized and represented, then verify that the example parses successfully and produces an AST for renaming `test`.`test` to `test`.`test2`.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, rust
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.