Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the Arguments and Signature fields from database objects (Function, Procedure, Aggregate) and uses the Parameters array as the single source of truth for parameter information.
- Removes redundant
ArgumentsandSignaturefields from Function, Procedure, and Aggregate structs - Adds
GetArguments()method to Function for dynamic argument string generation - Updates normalization and comparison logic to use the
Parametersarray exclusively
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| testdata/diff/migrate/v5/plan.json | Updates source fingerprint hash for test data |
| testdata/diff/create_procedure/drop_procedure/plan.json | Updates source fingerprint hash for procedure test |
| testdata/diff/create_procedure/alter_procedure/plan.json | Updates source fingerprint hash for procedure test |
| testdata/diff/create_function/drop_function/plan.json | Updates source fingerprint hash for function test |
| testdata/diff/create_function/alter_function_same_signature/plan.json | Updates source fingerprint hash for function test |
| testdata/diff/create_function/alter_function_different_signature/plan.json | Updates source fingerprint hash for function test |
| testdata/diff/create_function/add_function/plan.txt | Adds new parameter note varchar DEFAULT '' to function signature |
| testdata/diff/create_function/add_function/plan.sql | Adds new parameter note varchar DEFAULT '' to function SQL |
| testdata/diff/create_function/add_function/plan.json | Updates SQL statement with new parameter |
| testdata/diff/create_function/add_function/new.sql | Adds new parameter to function definition |
| testdata/diff/create_function/add_function/diff.sql | Shows diff with new parameter added |
| ir/parser.go | Removes code that builds Arguments and Signature strings from parameters |
| ir/normalize.go | Removes signature normalization and updates parameter normalization |
| ir/ir.go | Removes Arguments/Signature fields and adds GetArguments() method |
| ir/inspector.go | Removes population of Arguments and Signature fields |
| internal/diff/procedure.go | Updates to use Parameters array exclusively |
| internal/diff/function.go | Updates to use GetArguments() method and Parameters array |
| internal/diff/diff.go | Updates function key generation to use GetArguments() |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
2f1bc3f to
8cd2aa9
Compare
8cd2aa9 to
3a48310
Compare
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.
Use parameter as the SOT
Fix #92