feat(postgres): parse column storage options - #4
Merged
Conversation
amaksimo
added a commit
to awslabs/aurora-dsql-tools
that referenced
this pull request
Aug 7, 2026
## Summary - refresh the vendored grammar with current output from the internal DSQL grammar generator - upgrade to `sqlparser-dsql` 0.62.4 for native `ALTER COLUMN ... SET STORAGE` and column-definition `STORAGE` parsing - treat all five storage modes as supported and validate `ALTER COLUMN`, `CREATE TABLE`, and `ADD COLUMN` forms against a live DSQL cluster - validate both `ENABLE/DISABLE TRIGGER ALL` and `ENABLE/DISABLE TRIGGER USER` against the live cluster - align `UnsupportedDropTrigger` with the newly supported guarded form: `DROP TRIGGER IF EXISTS name ON table [CASCADE | RESTRICT]` - remove the obsolete `AtUnsupportedDropColumn` rule after live-cluster validation confirmed `ALTER TABLE ... DROP COLUMN` is supported - validate rejected drop-trigger boundaries against the live cluster - repair the `ValidateConstraintAsync` cluster fixture so its rewritten SQL targets an existing named CHECK constraint ## Parser dependency `sqlparser-dsql` 0.62.4 adds typed column-definition `STORAGE` parsing and retains the typed `AlterColumnOperation::SetStorage` representation. No token rewriting or parser compatibility shim is used. Release: https://crates.io/crates/sqlparser-dsql/0.62.4 Parser PR: amaksimo/datafusion-sqlparser-rs#4 ## Grammar diff The refreshed grammar and curated corpus complete without parse errors. ## Validation - `cargo fmt --all -- --check` - `cargo clippy --all-targets --all-features -- -D warnings` - `cargo test` - `cargo test --all-features` - `BLESS_MIRROR=1 cargo test --features grammar-diff --test grammar_corpus_mirror_test` - `RUSTFLAGS='--cfg dsql_cluster' cargo test --all-features --test dsql_cluster_test --no-run`\n\nThe GitHub Actions workflow provisions a temporary Aurora DSQL cluster and executes the shared clean and rejection matrices through `psql`.\n\nThis replaces #132 with a same-repository branch so secret-backed CI jobs can run.
This file contains hidden or 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
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.
Summary
STORAGEoptions into a typed AST variantALTER COLUMN ... SET STORAGEsqlparser-dsqlto 0.62.4Validation
cargo fmt --all -- --checkcargo test --all-featurescargo clippy --all-targets --all-features -- -D warningscargo package --allow-dirty