Make pcommon value comparable - #49214
Merged
TylerHelmuth merged 13 commits intoAug 5, 2026
Merged
Conversation
alexcams
requested review from
a team,
TylerHelmuth,
bogdandrutu,
edmocosta and
evan-bradley
as code owners
June 22, 2026 11:45
Contributor
Author
|
/rerun |
edmocosta
reviewed
Jun 30, 2026
Contributor
Author
|
@edmocosta I've addressed all comments abobe. Thanks for the review :) |
Pull request dashboard statusMerged · refreshed 2026-08-05 19:13 UTC Status above doesn't look right?
|
edmocosta
reviewed
Jul 15, 2026
edmocosta
reviewed
Jul 16, 2026
alexcams
force-pushed
the
make-pcommon-Value-comparable
branch
from
July 17, 2026 09:07
f3caa82 to
243a0e7
Compare
edmocosta
approved these changes
Aug 5, 2026
Contributor
There was a problem hiding this comment.
LGTM! @TylerHelmuth @evan-bradley could you please take a look and share your thoughts? Thanks!
TylerHelmuth
approved these changes
Aug 5, 2026
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.
Description
Adds support for comparing pcommon.Value in the OTTL ValueComparator. Previously, pcommon.Value was not handled, comparisons involving attribute values (which are pcommon.Value at runtime) would fall through to Go's == operator, failing for inequality operators (<, <=, >=, >).
OTTL expressions like attributes["status_code"] > 200 or attributes["a"] >= attributes["b"] now work correctly with all comparison operators on all value types (int, float, string, bool, bytes, map, slice, empty).
Link to tracking issue
Resolves #49170
Testing
Added propper test cases covering many different scenarios.
Documentation
Documentation added to this PR at
LANGUAGE.mdfile.