feat(query): add system.materialized_views - #20362
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8da460a699
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| fn is_listed_materialized_view_invalid(item: &ListedMaterializedView) -> bool { | ||
| let binding_invalid = item.source.bound_source_generation.is_none() | ||
| || item.source.current_source_generation.is_none() | ||
| || item.source.bound_source_generation != item.source.current_source_generation; | ||
| binding_invalid || listed_materialized_view_invalid_reason(&item.mv.table_meta.data).is_some() |
There was a problem hiding this comment.
Mark renamed or dropped sources invalid
When a source table is renamed or dropped, its MV binding and source generation are deliberately left unchanged, so all three checks here still pass even though reads and refreshes reject the MV (refresh separately detects a changed query resolution or TableMeta.drop_on). As a result, system.materialized_views reports invalid = false for these unusable MVs; the listing needs to incorporate source lifecycle/query-binding validity rather than relying only on generation presence and equality.
Useful? React with 👍 / 👎.
d9fd9da to
f8973bf
Compare
🤖 CI Job Analysis (Retry 1)
📊 Summary
❌ NO RETRY NEEDEDAll failures appear to be code/test issues requiring manual fixes. 🔍 Job Details
🤖 AboutAutomated analysis using job annotations to distinguish infrastructure issues (auto-retried) from code/test issues (manual fixes needed). |
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
add system.materialized_views
Tests
Type of change
AI assistance
This change is