refactor(connectors): extract row-processing logic into reusable process_row method#3198
refactor(connectors): extract row-processing logic into reusable process_row method#3198atharvalade wants to merge 1 commit intoapache:masterfrom
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. 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 pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need a review, please ensure CI is green and the PR is rebased on the latest master. Don't hesitate to ping the maintainers - either @core on Discord or by mentioning them directly here on the PR. Thank you for your contribution! |
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