iffyio commented on code in PR #2097:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2097#discussion_r2518859282
##########
src/parser/mod.rs:
##########
@@ -51,13 +51,14 @@ mod alter;
pub enum ParserError {
TokenizerError(String),
ParserError(String),
+ SpannedParserError(String, Span),
Review Comment:
Yeah there are three distinct error variants today - they can't be confused
for each other because they flag different things to the user. That isn't the
case with `ParserError` vs `SpannedParserError` (e.g. the user can't tell what
kinds of errors show up as the former vs the latter, and it wouldn't be nice
that an error that was previously thrown under the former suddenly starts being
thrown as the latter).
Returning an empty span is fine in this case, as the documentation mentions,
the empty span flags that the info is unknown at that point in time. We're
gradually working our way through span coverage, please [see
here](https://github.com/apache/datafusion-sqlparser-rs?tab=readme-ov-file#source-locations-work-in-progress)
some context
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]