Skip to content

feat: support storage policy in table details and create matview quick action#563

Open
emrberk wants to merge 5 commits into
mainfrom
fix/store-policy-ttl
Open

feat: support storage policy in table details and create matview quick action#563
emrberk wants to merge 5 commits into
mainfrom
fix/store-policy-ttl

Conversation

@emrberk
Copy link
Copy Markdown
Collaborator

@emrberk emrberk commented May 21, 2026

Two related changes around retention on Enterprise.

Matview generator: Create materialized view on a table with STORAGE POLICY(...) was throwing an error. The generator now projects each clause into the matview's partition unit (DAY → DAYS, MONTH → MONTHS, YEAR → YEARS), preserves the toParquet ≤ dropNative ≤ dropLocal ≤ dropRemote order, and ladder-bumps the terminal clause so the matview retention outlives the source. TTL is floored at the partition unit with the same logic.

Table details drawer: The drawer now surfaces storage policy:

  • If the DDL has clauses, the Storage Policy section renders each clause as a label/value card.
  • On Enterprise, the section is always rendered; with no policy it shows a gray "Not configured" placeholder (same icon/style as the WAL-disabled row).
  • The TTL card only shows when actually configured (ttlValue !== 0).

Test plan

  • Right-click a table with STORAGE POLICY(...)Create materialized view → resulting DDL validates on Enterprise (months-based, monotonic).
  • Open the schema drawer for a table on Enterprise:
    • with a storage policy → clause cards render;
    • without one → "Not configured" placeholder.
  • OSS: no Storage Policy section unless the source DDL carries one.
  • TTL card: visible only when the table actually has a TTL.

@emrberk emrberk changed the title fix: create matview action respects storage policy, bump parser to 0.1.13 feat: support storage policy in table details and create matview quick action May 21, 2026
@emrberk emrberk requested a review from glasstiger May 21, 2026 14:15
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