Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the summary display for materialized views that are recreated due to table dependencies. Previously, such views were incorrectly counted as "adds" when they should be counted as "modifications" since the view existed before and is being recreated.
- Introduces a new
DiffOperationRecreateoperation to distinguish DROP operations that are part of a DROP+CREATE cycle - Updates plan summary logic to treat recreate operations as modifications rather than additions
- Ensures consistent display across both the plan summary counts and the detailed change list
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| testdata/diff/dependency/table_to_materialized_view/plan.txt | Test data showing expected output where recreated materialized view is now correctly shown as "2 to modify" instead of "1 to add, 1 to modify" |
| internal/diff/diff.go | Adds DiffOperationRecreate enum value and uses it in generatePreDropMaterializedViewsSQL to mark views that will be recreated |
| internal/plan/plan.go | Updates summary calculation and display logic to track recreate operations and convert subsequent create operations to modifications |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.