-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Attach Diagnostic to syntax errors #15680
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @logan-keede !
Is it possible to add a test for this feature, perhaps in
datafusion/datafusion/sql/tests/cases/diagnostic.rs
Lines 156 to 163 in 63f37a3
fn test_qualified_column_not_found() -> Result<()> { | |
let query = "SELECT /*a*/person.first_namex/*a*/ FROM person"; | |
let spans = get_spans(query); | |
let diag = do_query(query); | |
assert_snapshot!(diag.message, @"column 'first_namex' not found in 'person'"); | |
assert_eq!(diag.span, Some(spans["a"])); | |
Ok(()) | |
} |
Yes, I will do that. Thanks for the review!! |
Which issue does this PR close?
Diagnostic
to syntax errors #14437.Rationale for this change
converting ParserError into DataFusionError to attach diagnostic through
expected
.What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?