Skip to content

Comments

refactor: dedup index code#70

Merged
tianzhou merged 1 commit intomainfrom
materialized_cleanup
Oct 11, 2025
Merged

refactor: dedup index code#70
tianzhou merged 1 commit intomainfrom
materialized_cleanup

Conversation

@tianzhou
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings October 11, 2025 15:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors duplicated index handling code by extracting shared logic into a common function. The refactoring consolidates identical index modification patterns used in both table and materialized view processing.

Key changes:

  • Created a shared generateIndexModifications function to handle index drops, adds, and online replacements
  • Added a helper generateIndexComment function for comment operations
  • Replaced duplicated code in both table and view diff generation with calls to the new shared function

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
internal/diff/view.go Replaced inline index modification logic with call to shared function
internal/diff/table.go Replaced duplicated index handling code with call to shared function
internal/diff/index.go Added new shared functions for index modifications and comment generation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tianzhou tianzhou force-pushed the materialized_cleanup branch from cd1d4f1 to bef1107 Compare October 11, 2025 15:50
@tianzhou tianzhou merged commit 09fb7cc into main Oct 11, 2025
2 checks passed
@tianzhou tianzhou deleted the materialized_cleanup branch October 23, 2025 09: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