Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support error line/column number reporting during parsing #7863

Closed
lmatz opened this issue Feb 13, 2023 · 7 comments
Closed

Support error line/column number reporting during parsing #7863

lmatz opened this issue Feb 13, 2023 · 7 comments
Labels
difficulty/hard Issues that need deep insight of the system and expected to cost lot of work help wanted Issues that need help from contributors needs-investigation priority/high
Milestone

Comments

@lmatz
Copy link
Contributor

lmatz commented Feb 13, 2023

Considering it can make SQL debugging quite painful, especially when SQL is long, it is critical to user experience.

Wonder if chatGPT can do a good job of finding the location of this type of error. 馃ぃ

@github-actions github-actions bot added this to the release-0.1.17 milestone Feb 13, 2023
@lmatz lmatz added help wanted Issues that need help from contributors difficulty/hard Issues that need deep insight of the system and expected to cost lot of work needs-investigation labels Feb 13, 2023
@kwannoel
Copy link
Contributor

kwannoel commented Feb 13, 2023

+1 for this, I guess we will first persist it in AST and eventually in bound query for error reporting?

Are there any user facing errors that are only reported during optimization? Yes, stream nested loop join etc... but I guess these are rare, don't need to persist line/column number in planner for error reporting.

@BugenZhao
Copy link
Member

BugenZhao commented Feb 13, 2023

This requires a lot of work as the sqlparser-rs does not involve any "span"s during parsing. FYI, databend has rebuilt the parser from scratch, which provides enough information for clear error reporting in both parser and planner.

https://databend.rs/blog/databend-release-v0.8#new-parser-the-best-parser
https://databend.rs/blog/new-planner

@fuyufjh
Copy link
Contributor

fuyufjh commented Feb 17, 2023

Refactoring sqlparser-rs may take lots of effort. How about starting by reporting line/pos in the parser now?

@xxchan
Copy link
Member

xxchan commented Feb 17, 2023

Refactoring sqlparser-rs may take lots of effort. How about starting by reporting line/pos in the parser now?

What do you mean? I think it is reporting line/pos in the parser that requires a large refactoring 馃サ

@xxchan
Copy link
Member

xxchan commented Feb 17, 2023

For reference, some upstream issues:

@fuyufjh
Copy link
Contributor

fuyufjh commented Mar 9, 2023

@chenzl25 Ping, any updates?

@chenzl25
Copy link
Contributor

chenzl25 commented Mar 9, 2023

@chenzl25 Ping, any updates?

No updates currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/hard Issues that need deep insight of the system and expected to cost lot of work help wanted Issues that need help from contributors needs-investigation priority/high
Projects
None yet
Development

No branches or pull requests

6 participants