mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 06:18:17 +00:00
Add support for trailing commas (#810)
* Add support for trailing commas * Support trailing commas for brace/bracket * Andrew's comments
This commit is contained in:
parent
2285bb44ba
commit
b45306819c
2 changed files with 65 additions and 23 deletions
|
@ -181,6 +181,8 @@ fn parse_join_constraint_unnest_alias() {
|
|||
fn parse_trailing_comma() {
|
||||
for (sql, canonical) in [
|
||||
("SELECT a,", "SELECT a"),
|
||||
("SELECT 1,", "SELECT 1"),
|
||||
("SELECT 1,2,", "SELECT 1, 2"),
|
||||
("SELECT a, b,", "SELECT a, b"),
|
||||
("SELECT a, b AS c,", "SELECT a, b AS c"),
|
||||
("SELECT a, b AS c, FROM t", "SELECT a, b AS c FROM t"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue