-
Notifications
You must be signed in to change notification settings - Fork 407
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
Fix parser span over SQL adapter #8399
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@msullivan, would you know how could I get the query source into |
msullivan
approved these changes
Mar 3, 2025
msullivan
pushed a commit
that referenced
this pull request
Mar 4, 2025
Closes #8390 - **remove usage of lineno** libpg_query's `PgQueryError` contains field `lineno`, which we assumed is the line of the query source where the error occurred. It is not. It is line of the .c file that has produced the parser error. We don't ever want to use this. - **minor optimization of inflate_span** Just something I noticed. - **don't emit bogus positions** When we didn't have line and col info, we used to default to 0. Which is worse than nothing, so I removed it. This also adds code for computing line&col, but I'm not yet calling it, because that requires the original source, which I don't know how to get.
msullivan
added a commit
that referenced
this pull request
Mar 5, 2025
Bug was introduced in by a typo #8399 and hasn't made it out to a release yet. It turns out we never test for the end of spans in the server test suite, so this got caught by the CLI!
msullivan
added a commit
that referenced
this pull request
Mar 5, 2025
Bug was introduced in by a typo #8399 and hasn't made it out to a release yet. It turns out we never test for the end of spans in the server test suite, so this got caught by the CLI!
msullivan
pushed a commit
that referenced
this pull request
Mar 5, 2025
Closes #8390 - **remove usage of lineno** libpg_query's `PgQueryError` contains field `lineno`, which we assumed is the line of the query source where the error occurred. It is not. It is line of the .c file that has produced the parser error. We don't ever want to use this. - **minor optimization of inflate_span** Just something I noticed. - **don't emit bogus positions** When we didn't have line and col info, we used to default to 0. Which is worse than nothing, so I removed it. This also adds code for computing line&col, but I'm not yet calling it, because that requires the original source, which I don't know how to get.
msullivan
added a commit
that referenced
this pull request
Mar 5, 2025
Bug was introduced in by a typo #8399 and hasn't made it out to a release yet. It turns out we never test for the end of spans in the server test suite, so this got caught by the CLI!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #8390
I suggest reviewing this commit by commit:
libpg_query's
PgQueryError
contains fieldlineno
, which we assumed is the line of the query source where the error occurred. It is not. It is line of the .c file that has produced the parser error. We don't ever want to use this.Just something I noticed.
When we didn't have line and col info, we used to default to 0. Which is worse than nothing, so I removed it.
This also adds code for computing line&col, but I'm not yet calling it, because that requires the original source, which I don't know how to get.