Skip to content

add statement docs#589

Merged
morgo merged 10 commits intoblock:mainfrom
morgo:statement-docs
Feb 2, 2026
Merged

add statement docs#589
morgo merged 10 commits intoblock:mainfrom
morgo:statement-docs

Conversation

@morgo
Copy link
Collaborator

@morgo morgo commented Feb 1, 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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds package-level documentation for pkg/statement, describing how Spirit parses and analyzes DDL (via TiDB parser), including safety checks and CREATE TABLE structural parsing helpers.

Changes:

  • Added pkg/statement/README.md documenting core statement parsing APIs and safety analysis helpers.
  • Documented CREATE TABLE structured parsing types (columns, indexes, constraints, partitions) and helper functions for index deferral/restore workflows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

morgo and others added 5 commits February 1, 2026 09:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Limitations

1. **Functional Indexes**: `CREATE INDEX` with functional expressions cannot be converted to `ALTER TABLE`
2. **Single Schema**: Multi-table operations must use the same schema
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this return an error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it does

@morgo morgo merged commit 8c93e44 into block:main Feb 2, 2026
7 checks passed
@morgo morgo deleted the statement-docs branch February 2, 2026 21:18
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.

3 participants