Skip to content

Add classify support: view and dropIndex#684

Merged
morgo merged 3 commits into
block:mainfrom
morgo:add-classify-view-dropindex
Apr 6, 2026
Merged

Add classify support: view and dropIndex#684
morgo merged 3 commits into
block:mainfrom
morgo:add-classify-view-dropindex

Conversation

@morgo
Copy link
Copy Markdown
Collaborator

@morgo morgo commented Apr 6, 2026

A Pull Request should be associated with an Issue.

We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
and potentially we'll be able to point development in a particular direction.
Further notes in https://github.com/block/spirit/blob/main/.github/CONTRIBUTING.md

This adds support to classify more statements.

morgo added 2 commits April 6, 2026 12:43
…INDEX rewrite in New()

- Classify now recognizes DROP INDEX and CREATE VIEW statements
- New() now handles DROP INDEX by rewriting to ALTER TABLE ... DROP INDEX
  (matching the existing CREATE INDEX → ALTER TABLE rewrite pattern)
- Added tests for all new functionality
…ith spaces

Fixes the TODO about quoting identifiers. Index names and column names
are now backtick-quoted in the rewritten ALTER TABLE statement, so names
like 'an index' or 'a table' no longer break the re-parse step.
@morgo morgo changed the title Add classify view dropindex Add classify support: view and dropIndex Apr 6, 2026
@morgo morgo requested a review from aparajon April 6, 2026 22:43
@morgo morgo merged commit ad5f291 into block:main Apr 6, 2026
12 checks passed
@morgo morgo deleted the add-classify-view-dropindex branch April 6, 2026 23:35
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