Skip to content

Conversation

@tianzhou
Copy link
Contributor

@tianzhou tianzhou commented Nov 14, 2025

Refine the fix in #163

Copilot AI review requested due to automatic review settings November 14, 2025 16:41
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 refines the handling of custom array types by moving type resolution from Go-based string manipulation to SQL query-level logic. Instead of post-processing type names with a _ prefix, the system now detects and resolves array types directly in PostgreSQL queries by inspecting the element type relationship.

  • Removed Go code that converted internal PostgreSQL array notation (e.g., _my_enum_type) to standard array syntax
  • Enhanced SQL queries to detect array types and resolve their element type schemas at query time
  • Updated test data to verify proper handling of custom enum array columns

Reviewed Changes

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

Show a summary per file
File Description
ir/normalize.go Removed obsolete custom array type string manipulation logic
ir/queries/queries.sql Added array type detection and element type resolution for both GetColumns and GetColumnsForSchema queries
ir/queries/queries.sql.go Generated code corresponding to the SQL query changes
testdata/diff/create_table/enum_array_column/* Removed old test data files
testdata/diff/create_table/add_column_array/* Updated test data to include enum array type column with version bump to 1.4.1

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tianzhou tianzhou requested a review from Copilot November 14, 2025 16:48
@tianzhou tianzhou merged commit a54d2d8 into main Nov 14, 2025
6 checks passed
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tianzhou tianzhou deleted the custom_array_type branch November 23, 2025 14:51
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