Refactor getBulkOperationForAction into BulkOperationFactory#6748
Merged
dinujoh merged 3 commits intoApr 13, 2026
Merged
Conversation
5d9f19a to
67fd627
Compare
Extract bulk operation creation logic from OpenSearchSink into a dedicated BulkOperationFactory class for improved testability and separation of concerns. Signed-off-by: Dinu John <86094133+dinujoh@users.noreply.github.com>
e08b0dc to
f281fce
Compare
dlvenable
previously approved these changes
Apr 10, 2026
graytaylor0
reviewed
Apr 10, 2026
Add BulkOperationFactoryTest covering create, index, update, upsert, delete, default action, optional fields, document filters, and pipeline setting. Update OpenSearchSinkScriptTest to test BulkOperationFactory directly instead of going through OpenSearchSink. Signed-off-by: Dinu John <86094133+dinujoh@users.noreply.github.com>
f281fce to
d8bfbec
Compare
graytaylor0
previously approved these changes
Apr 13, 2026
Pass filteredJsonNode instead of jsonNode to scriptManager.buildScript so that params.doc in the script reflects the post-filter document, consistent with how builder.document() and builder.upsert() use the filtered version. Signed-off-by: Dinu John <86094133+dinujoh@users.noreply.github.com>
graytaylor0
approved these changes
Apr 13, 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
Extract bulk operation creation logic from OpenSearchSink into a dedicated BulkOperationFactory class for improved testability and separation of concerns. Update unit tests to test the factory directly.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.