Skip to content

fix(connectors): unify extract_column_value into single free function#3199

Open
atharvalade wants to merge 1 commit intoapache:masterfrom
atharvalade:fix/unify-extract-column-value
Open

fix(connectors): unify extract_column_value into single free function#3199
atharvalade wants to merge 1 commit intoapache:masterfrom
atharvalade:fix/unify-extract-column-value

Conversation

@atharvalade
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #3172

Rationale

Bug fixes or new type support added to one copy of extract_column_value silently won't apply to the other, causing divergence between sequential and parallel code paths.

What changed?

The Postgres source connector had extract_column_value as a method on PostgresSource (&self), making it impossible to call from static/parallel contexts without duplicating the function. Any future parallel/chunked path would need its own copy.

Converted it to a single free function callable from any context. Added missing DATE (via chrono::NaiveDate) and BPCHAR type handling that the parallel copy on the benchmark branch had but this version lacked.

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

  1. Opus 4.6
  2. exploration and implementation guidance
  3. Verified via cargo check, clippy -D warnings, fmt --check, all 19 unit tests passing, CI lint scripts passing
  4. Yes, all code can be explained

@atharvalade atharvalade changed the title fix(postgres): unify extract_column_value into single free function fix(connectors): unify extract_column_value into single free function Apr 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 0% with 108 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.21%. Comparing base (611fca0) to head (08153c5).

Files with missing lines Patch % Lines
core/connectors/sources/postgres_source/src/lib.rs 0.00% 108 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3199       +/-   ##
=============================================
- Coverage     74.10%   19.21%   -54.89%     
  Complexity      943      943               
=============================================
  Files          1159     1157        -2     
  Lines        102033    90323    -11710     
  Branches      79083    67391    -11692     
=============================================
- Hits          75607    17356    -58251     
- Misses        23765    72553    +48788     
+ Partials       2661      414     -2247     
Components Coverage Δ
Rust Core 0.95% <0.00%> (-74.38%) ⬇️
Java SDK 60.14% <ø> (ø)
C# SDK 69.11% <ø> (-0.28%) ⬇️
Python SDK 81.43% <ø> (ø)
Node SDK 91.53% <ø> (ø)
Go SDK 39.43% <ø> (ø)
Files with missing lines Coverage Δ
core/connectors/sources/postgres_source/src/lib.rs 41.71% <0.00%> (-25.47%) ⬇️

... and 657 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@atharvalade atharvalade force-pushed the fix/unify-extract-column-value branch from 022bacc to 6a3e441 Compare April 29, 2026 18:07
@atharvalade atharvalade force-pushed the fix/unify-extract-column-value branch from 6a3e441 to 08153c5 Compare April 29, 2026 18:07
@lukaszzborek
Copy link
Copy Markdown
Contributor

lukaszzborek commented Apr 29, 2026

@atharvalade
In issue is Postgres source connector has two nearly identical functions and to remove one. But i don't see second one.
I'm jus asking for clarification, if i don't see something

Also remeber about #3196 where you also add Date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two diverging copies of extract_column_value

2 participants