Skip to content

Spans: (some of the) ALTER statements - #2572

Closed
LucaCappelletti94 wants to merge 1 commit into
span-create-statementsfrom
span-alter-statements
Closed

LucaCappelletti94 wants to merge 1 commit into
span-create-statementsfrom
span-alter-statements

Conversation

@LucaCappelletti94

@LucaCappelletti94 LucaCappelletti94 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

[THIS CHAIN OF PRS IS AT LEAST TEMPORARELY CLOSED BECAUSE SPANS ARE A VERY LARGE REFACTORING]

Twelve ALTER statements had an empty span, among them ALTER FUNCTION, ALTER USER, ALTER ROLE, ALTER TYPE and the operator forms. They now store their first and last token, set in Parser::parse_statement like the DROP and CREATE statements. The span baseline loses 402 lines and gains none.

Part of #1548.

@LucaCappelletti94
LucaCappelletti94 added this pull request to stack #2568 September 24, 2026 12:32
@github-actions

Copy link
Copy Markdown

No dialect label was applied because the title does not name a SQL dialect.

If this change targets one or more dialects, edit the title to <Dialect>[, <Dialect>]: <description>, add a Dialects: <Dialect>[, <Dialect>] line to the description, or reply with one. Reply Dialects: none if the change is dialect-agnostic.

Changed files touch PostgreSQL, Snowflake, SQL Server.

@LucaCappelletti94 LucaCappelletti94 changed the title Record the first and last token of ALTER statements for their spans Spans: (some of the) ALTER statements Sep 24, 2026
@codecov-commenter

codecov-commenter commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.78261% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.09%. Comparing base (0e88024) to head (b38942e).

Files with missing lines Patch % Lines
src/parser/mod.rs 92.30% 0 Missing and 5 partials ⚠️
src/ast/spans.rs 96.55% 1 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           span-create-statements    #2572      +/-   ##
==========================================================
- Coverage                   85.11%   85.09%   -0.03%     
==========================================================
  Files                          43       43              
  Lines                       34062    34123      +61     
  Branches                    34062    34123      +61     
==========================================================
+ Hits                        28993    29038      +45     
- Misses                       1595     1596       +1     
- Partials                     3474     3489      +15     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants