Skip to content

Support Redshift materialized view BACKUP clauses - #2557

Open
minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:feat/redshift-view-backup
Open

Support Redshift materialized view BACKUP clauses#2557
minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:feat/redshift-view-backup

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

Fixes #1735

Changes

  • Support BACKUP YES and BACKUP NO after a Redshift materialized view name, including combinations with AUTO REFRESH.
  • Store the explicit choice as a nullable Boolean so an omitted BACKUP clause remains omitted when rendering.
  • Share materialization-option rendering between CreateView and CreateViewDeParser.
  • Reject malformed, duplicated, or misordered BACKUP clauses and BACKUP on ordinary views, without making BACKUP a globally reserved identifier.

This is deliberately scoped to BACKUP. It does not add Redshift distribution or sort-key clauses.

Verification

  • Full Gradle check (tests, Checkstyle, PMD, Spotless).
  • Maven clean verify with Java 17.
  • Round-trip, AST mutation, invalid syntax, AUTO REFRESH, and table-discovery regression tests.

Reference: Amazon Redshift CREATE MATERIALIZED VIEW.

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.

[BUG] JSQLParser 4.6 : Redshift : CREATE MATERIALIZED VIEW with BACKUP NO is not supported

1 participant