Skip to content

fix: refresh persisted View metadata after dependency DDL - #26876

Draft
ck89119 wants to merge 19 commits into
matrixorigin:mainfrom
ck89119:issue-26227-main
Draft

fix: refresh persisted View metadata after dependency DDL#26876
ck89119 wants to merge 19 commits into
matrixorigin:mainfrom
ck89119:issue-26227-main

Conversation

@ck89119

@ck89119 ck89119 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

fixes #26227

What this PR does / why we need it:

View queries rebind their stored SQL against current dependencies, while DESC and
information_schema.columns read the persisted View TableDef. Dependency DDL could
therefore leave durable View column metadata stale even though SELECT and CTAS used the
new schema.

This change:

  • captures exact direct relation dependencies while using the existing authoritative
    View schema generator;
  • refreshes complete persisted View column definitions after relevant dependency DDL,
    including transitive View-of-View propagation;
  • performs guarded, identity-preserving catalog replacement while retaining the stored
    View SQL, binding context, ownership, privileges, and other relation attributes;
  • adds bounded, generation-protected recovery for deferred and legacy View refreshes;
  • resolves ordinary tenant, cross-database, subscription, snapshot, and system/cluster
    dependencies under their binding identities;
  • prevents DESC and information_schema.columns from presenting non-current metadata
    as current;
  • adds planner, compile, catalog/engine, recovery, concurrency, and public SQL regressions.

Validation includes CGo package tests for all affected owners, focused and package-wide
race tests, protobuf regeneration, a fresh-instance public SQL regression, build,
go list, go vet, and git diff --check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: View metadata stays stale after source column type changes

2 participants