-
Notifications
You must be signed in to change notification settings - Fork 1.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
[pdata] Change outcome of Value collections accessors misuse #5034
[pdata] Change outcome of Value collections accessors misuse #5034
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5034 +/- ##
==========================================
+ Coverage 91.03% 91.07% +0.03%
==========================================
Files 180 180
Lines 10808 10808
==========================================
+ Hits 9839 9843 +4
+ Misses 750 747 -3
+ Partials 219 218 -1
Continue to review full report at Codecov.
|
2c9d1af
to
da0f165
Compare
da0f165
to
b324b96
Compare
b324b96
to
1ab0579
Compare
Failing tests :) |
@bogdandrutu the failing test is checking the following input which unlikely to be caught in reality but I think we still need to handle it:
To handle it, we would have to add another if check to the construction that you suggested, it'll look like this (Updated):
I run the benchmarks showing that original code of this PR appeared to be more performant: Original:
Updated:
|
Change misuse outcome of `pdata.AttributeMap.MapVal()` and `pdata.AttributeValueSlice.SliceVal()` function calls. In case of type mismatch, they now return an invalid zero-initialized instance instead of returning a valid detached collection.
1ab0579
to
504fd0d
Compare
I've brought back the original code for map and slice value getters for now |
…-telemetry#5034) Change misuse outcome of `pdata.AttributeMap.MapVal()` and `pdata.AttributeValueSlice.SliceVal()` function calls. In case of type mismatch, they now return an invalid zero-initialized instance instead of returning a valid detached collection.
Change outcome of
pdata.Value.MapVal()
andpdata.Value.SliceVal()
functions misuse. In case of type mismatch, they now return an invalid zero-initialized instance instead of a valid detached collection.This PR implements the approach that was agreed upon in #4775 as a replacement for #4909