Skip to content

fix(connectors): handle unrecognized types with explicit coverage and diagnostics#3196

Open
atharvalade wants to merge 3 commits intoapache:masterfrom
atharvalade:fix/postgres-unrecognized-types-coerce-string
Open

fix(connectors): handle unrecognized types with explicit coverage and diagnostics#3196
atharvalade wants to merge 3 commits intoapache:masterfrom
atharvalade:fix/postgres-unrecognized-types-coerce-string

Conversation

@atharvalade
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #3175

Rationale

Unrecognized Postgres types silently coerced to String, returning opaque InvalidRecord on failure with no column or type context.

What changed?

The default _ branch in extract_column_value attempted to read any unrecognized Postgres type as Option<String>, failing silently with Error::InvalidRecord and no indication of which column or type caused it.

Added explicit handlers for DATE, TIME, INTERVAL, OID, NAME, BPCHAR, and 13 array types (_BOOL, _INT2, _INT4, _INT8, _FLOAT4, _FLOAT8, _TEXT, _VARCHAR, _CHAR, _BPCHAR, _UUID, _JSON, _JSONB). The default branch now logs a warning with column name and type before attempting String fallback, and returns InvalidRecordValue with a diagnostic message on failure.

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

  1. Opus 4.6
  2. Scaffolding, Writing comments, Writing PR Description
  3. Verified via cargo check, clippy, fmt, and full test suite (24/24 pass)
  4. Yes, all code can be explained

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 36.04061% with 126 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.23%. Comparing base (611fca0) to head (73fcce0).

Files with missing lines Patch % Lines
core/connectors/sources/postgres_source/src/lib.rs 36.04% 124 Missing and 2 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3196       +/-   ##
=============================================
- Coverage     74.10%   19.23%   -54.87%     
  Complexity      943      943               
=============================================
  Files          1159     1157        -2     
  Lines        102033    90511    -11522     
  Branches      79083    67579    -11504     
=============================================
- Hits          75607    17414    -58193     
- Misses        23765    72678    +48913     
+ Partials       2661      419     -2242     
Components Coverage Δ
Rust Core 1.05% <36.04%> (-74.28%) ⬇️
Java SDK 60.14% <ø> (ø)
C# SDK 69.07% <ø> (-0.31%) ⬇️
Python SDK 81.43% <ø> (ø)
Node SDK 91.40% <ø> (-0.13%) ⬇️
Go SDK 39.43% <ø> (ø)
Files with missing lines Coverage Δ
core/connectors/sources/postgres_source/src/lib.rs 41.04% <36.04%> (-26.14%) ⬇️

... 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 changed the title fix(postgres): handle unrecognized types with explicit coverage and diagnostics fix(connectors): handle unrecognized types with explicit coverage and diagnostics Apr 29, 2026
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.

Unrecognized Postgres types silently coerce to String

1 participant