Open
Conversation
91297fc to
0cf8e78
Compare
82c202a to
011a740
Compare
011a740 to
880da89
Compare
0cf8e78 to
1665b4a
Compare
bergundy
reviewed
Mar 2, 2026
Member
bergundy
left a comment
There was a problem hiding this comment.
Overall LGTM, I would just rather not export any member from the chasm package that libraries do not consume directly. And please treat any exported member as it is going to be consumed by an external contributor. We are aiming to keep the bar high on this.
| return SearchAttributesMap{values: values} | ||
| } | ||
|
|
||
| func NewSearchAttributesMapFromProto( |
Member
There was a problem hiding this comment.
I would rather not expose this from the chasm package since we don't expect libraries to use this.
Also make sure to properly document any exported function in this framework.
| func (v VisibilityValueInt64) MustEncode() *commonpb.Payload { | ||
| p, _ := payload.Encode(int64(v)) | ||
| sadefs.SetMetadataType(p, enumspb.INDEXED_VALUE_TYPE_INT) | ||
| p, _ := sadefs.EncodeValue(int64(v), enumspb.INDEXED_VALUE_TYPE_INT) |
Member
There was a problem hiding this comment.
This should panic if there's an error instead of silently ignoring it.
Comment on lines
6
to
8
| ov, ok := other.(VisibilityValueInt) | ||
| if !ok { | ||
| return false | ||
| func VisibilityValueFromPayload(p *commonpb.Payload) (VisibilityValue, error) { |
Member
There was a problem hiding this comment.
Prefer not to export this here.
2572793 to
22af7e7
Compare
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.
What changed?
Add some util functions to CHASM Visibility objects.
Why?
Easy way to encode/decode search attributes map/payloads.
How did you test it?
Potential risks