-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pkg/ottl] Conflict resolution strategy for set
function
#32020
Conversation
}, nil | ||
} | ||
|
||
func isDefaultValue(val any) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we have something better for this please let me know. i see following pattern repeated for many use cases
…tor-contrib into set-conflicts
set
functionset
function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinging code owners @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley
I am currently stuck on this thought we're discussing in the issue. Since OTTL can use |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Description:
Added conflict resolution strategy option for
set
function.Available behaviors are:
insert
creates a field in case it's missing but returns an error otherwise.ending up with following signature:
set(target, value, [Optional] conflict_resolution_strategy)
making sure current signature still works.Link to tracking Issue:
#31808
Testing:
Mostly updated unit test to cover new functionalities, verify current behavior is kept as default and UT for testing default values behavior for cases when field is present but unset or containing zero value
Documentation:
updated
pkg/ottl/ottlfuncs/README.md