-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix: bug fix for empty key values pair in elastic search mapping #11004
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe recent code changes enhance the robustness of the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SearchDocumentTransformer
participant TestEntityUtil
participant JSONParser
User->>SearchDocumentTransformer: Call setSearchableValue(fieldValue)
SearchDocumentTransformer->>JSONParser: Parse fieldValue
JSONParser-->>SearchDocumentTransformer: Return parsed key-values
SearchDocumentTransformer->>User: Return transformed document
User->>TestEntityUtil: Call getTestEntityInfo(urn, key3, value3)
TestEntityUtil-->>User: Return TestEntityInfo
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- metadata-io/src/main/java/com/linkedin/metadata/search/transformer/SearchDocumentTransformer.java (1 hunks)
- metadata-io/src/test/java/com/linkedin/metadata/TestEntityUtil.java (1 hunks)
- metadata-io/src/test/java/com/linkedin/metadata/search/transformer/SearchDocumentTransformerTest.java (1 hunks)
Additional comments not posted (3)
metadata-io/src/test/java/com/linkedin/metadata/TestEntityUtil.java (1)
68-69
: Ensure the new key-value pair is necessary.The addition of the
"key3"
key with an empty string value to thecustomProperties
map should be verified to ensure it is necessary and correctly handled downstream.metadata-io/src/test/java/com/linkedin/metadata/search/transformer/SearchDocumentTransformerTest.java (1)
88-88
: LGTM!The new assertion correctly verifies that the value of the "key3" field within the "esObjectField" object in the parsed JSON is an empty string.
metadata-io/src/main/java/com/linkedin/metadata/search/transformer/SearchDocumentTransformer.java (1)
290-293
: LGTM!The added check correctly handles cases where the
fieldValue
string does not contain an equal sign, preventing potential runtime exceptions.
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.
Thanks!
@milindgupta9 - Please take a look at the test failures in the following module.
|
8be26fe
to
9e9ca9b
Compare
@david-leifker your approval is required. Can you approve it? |
@milindgupta9 - Please take a look at the failing
|
@david-leifker I have fixed unit tests, can you take a pass now. |
Nice, tests passing. Thank you! |
Thanks @david-leifker for merging the PR |
Checklist
Summary by CodeRabbit
New Features
Bug Fixes
Tests