From 25f85da294580e7997f9fd930613060e6ac8a88a Mon Sep 17 00:00:00 2001 From: Ankit Patel <8731662+ankitpatel96@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:58:26 -0400 Subject: [PATCH] add comment about ambiguous inverts --- processor/schemaprocessor/internal/migrate/attributes.go | 1 + 1 file changed, 1 insertion(+) diff --git a/processor/schemaprocessor/internal/migrate/attributes.go b/processor/schemaprocessor/internal/migrate/attributes.go index c7307c77e172..ced10436dda8 100644 --- a/processor/schemaprocessor/internal/migrate/attributes.go +++ b/processor/schemaprocessor/internal/migrate/attributes.go @@ -25,6 +25,7 @@ type AttributeChangeSet struct { // NewAttributeChangeSet allows for typed strings to be used as part // of the invocation that will be converted into the default string type. func NewAttributeChangeSet(mappings ast.AttributeMap) AttributeChangeSet { + // for ambiguous rollbacks (if updates contains entries with multiple keys that have the same value), rollback contains the last key iterated over in mappings attr := AttributeChangeSet{ updates: make(map[string]string, len(mappings)), rollback: make(map[string]string, len(mappings)),