Skip to content

Commit 30358f0

Browse files
committed
Revert last three commits in favor of #40931
1 parent 15921d0 commit 30358f0

File tree

2 files changed

+1
-1681
lines changed

2 files changed

+1
-1681
lines changed

pkg/ottl/contexts/internal/ctxprofile/profile.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -348,27 +348,11 @@ func accessAttributesKey[K Context](key []ottl.Key[K]) ottl.StandardGetSetter[K]
348348
if err != nil {
349349
return err
350350
}
351-
v := getAttributeValue(tCtx, *newKey)
351+
v := pcommon.NewValueEmpty()
352352
if err = ctxutil.SetIndexableValue[K](ctx, tCtx, v, val, key[1:]); err != nil {
353353
return err
354354
}
355355
return pprofile.PutAttribute(tCtx.GetProfilesDictionary().AttributeTable(), tCtx.GetProfile(), *newKey, v)
356356
},
357357
}
358358
}
359-
360-
func getAttributeValue[K ProfileContext](tCtx K, key string) pcommon.Value {
361-
// Find the index of the attribute in the profile's attribute indices
362-
// and return the corresponding value from the attribute table.
363-
table := tCtx.GetProfilesDictionary().AttributeTable()
364-
indices := tCtx.GetProfile().AttributeIndices().AsRaw()
365-
366-
for _, tableIndex := range indices {
367-
attr := table.At(int(tableIndex))
368-
if attr.Key() == key {
369-
return attr.Value()
370-
}
371-
}
372-
373-
return pcommon.NewValueEmpty()
374-
}

0 commit comments

Comments
 (0)