apache / apache/datafusion-sqlparser-rs

rule to detect extra col in multiline insert

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

Description

Description
```INSERT INTO y.x (a,b,c) VALUES ('1','1','1'), ('1','1','1','1'), ('1','1','1');```

Use case
want this parse to fail as 4th column in 2nd row but only 3 cols in the values

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the supplied INSERT statement with the SQL parser and inspect how it handles column counts across rows in a VALUES list. Then find the existing INSERT parser tests and add coverage for the extra value in the second row; done means that input fails while the valid rows are accepted.

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
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.