refactor(connectors): extract row-processing logic into reusable process_row method#3198
Open
atharvalade wants to merge 1 commit intoapache:masterfrom
Open
refactor(connectors): extract row-processing logic into reusable process_row method#3198atharvalade wants to merge 1 commit intoapache:masterfrom
atharvalade wants to merge 1 commit intoapache:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3198 +/- ##
=============================================
- Coverage 74.10% 19.22% -54.88%
Complexity 943 943
=============================================
Files 1159 1157 -2
Lines 102033 90344 -11689
Branches 79083 67394 -11689
=============================================
- Hits 75607 17371 -58236
- Misses 23765 72575 +48810
+ Partials 2661 398 -2263
🚀 New features to boost your workflow:
|
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.
Which issue does this PR close?
Closes #3173
Rationale
Row-processing logic lived inline in
poll_tables, making it impossible to reuse across future parallel/chunked polling paths without duplication.What changed?
The column-iteration, value-extraction, JSON-payload construction, and
ProducedMessageassembly were tightly coupled insidepoll_tables's inner loop (~80 lines). Any new polling variant (parallel, chunked) would need to copy-paste this block.Extracted a
process_rowmethod that accepts aRowProcessingConfig(table, tracking/pk columns, format flags) and returns aProcessedRow(message + offset + pk). Thepoll_tablesloop now delegates to this single-responsibility method in ~12 lines.Local Execution
AI Usage