Skip to content

feat(postgres): parse column storage options - #4

Merged
amaksimo merged 1 commit into
dsql-async-indexfrom
feat/dsql-column-storage
Aug 7, 2026
Merged

feat(postgres): parse column storage options#4
amaksimo merged 1 commit into
dsql-async-indexfrom
feat/dsql-column-storage

Conversation

@amaksimo

@amaksimo amaksimo commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • parse PostgreSQL column-definition STORAGE options into a typed AST variant
  • share storage-value parsing with ALTER COLUMN ... SET STORAGE
  • cover all five storage modes for PostgreSQL and generic dialects
  • bump sqlparser-dsql to 0.62.4

Validation

  • cargo fmt --all -- --check
  • cargo test --all-features
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo package --allow-dirty

@amaksimo
amaksimo merged commit 4b17db5 into dsql-async-index Aug 7, 2026
19 checks passed
@amaksimo
amaksimo deleted the feat/dsql-column-storage branch August 7, 2026 20:38
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.
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.

1 participant