Skip to content

feat: add adapter type-system release groundwork#603

Merged
cofin merged 25 commits into
mainfrom
codex/adapter-type-system-release
Jul 6, 2026
Merged

feat: add adapter type-system release groundwork#603
cofin merged 25 commits into
mainfrom
codex/adapter-type-system-release

Conversation

@cofin

@cofin cofin commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Add disabled-first adapter type-system contract scaffolding and source-equivalence tripwires.
  • Optimize shared schema conversion, serializer metadata caching, row-format checks, row-format assertions, and benchmark coverage.
  • Switch Oracle JSON output handling to driver metadata and make ordinary CLOB/BLOB fetches metadata-driven rather than content-sniffed.
  • Align Oracle LOB fetch behavior across buffered, streamed, Arrow, and async cached paths with fetch_lobs=False as the default and fetch_lobs=True as the explicit locator escape hatch.
  • Add Spanner metadata-driven row plans and native row streaming with buffered/streamed parity and preserved per-call execution options.
  • Move Cloud/Arrow hot paths toward native row materialization: ADBC Arrow-table rows, BigQuery stream row mappings, and serializer hooks for Arrow ODBC/MSSQL configs.
  • Align PG-family and embedded adapters with single-pass parameter handling, row-format detection, faster aiosqlite/duckdb paths, and explicit Cockroach transaction-level retry callbacks.
  • Remove dead output converter cache paths and obsolete adapter converter helpers while preserving live conversion surfaces.

Local verification

  • uv run ruff check on touched adapter/test slices and file-level uvx prek for changed files.
  • Focused unit and integration slices for Oracle JSON/LOB behavior, Spanner row plans/streaming, schema conversion, serializers/type guards, adapter converter cleanup, Cloud/Arrow row conversion, PG/embedded adapter behavior, and Cockroach transaction retry behavior.
  • uv run mypy
  • uv run pyright
  • SQLite extended benchmark smoke with schema_type_numpy scenario.
  • Aiosqlite extended benchmark smoke with worker_hops scenario.

Full matrix, long mypyc compilation, and service-backed integration checks are left to remote CI.

@codecov-commenter

codecov-commenter commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.32422% with 257 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.70%. Comparing base (2a1daf1) to head (f29831b).

Files with missing lines Patch % Lines
sqlspec/adapters/aiosqlite/driver.py 57.69% 37 Missing and 18 partials ⚠️
sqlspec/adapters/mssql_python/driver.py 79.16% 16 Missing and 9 partials ⚠️
sqlspec/adapters/duckdb/driver.py 67.12% 13 Missing and 11 partials ⚠️
sqlspec/adapters/oracledb/driver.py 77.02% 10 Missing and 7 partials ⚠️
sqlspec/adapters/spanner/driver.py 86.51% 7 Missing and 5 partials ⚠️
sqlspec/adapters/adbc/driver.py 82.53% 6 Missing and 5 partials ⚠️
sqlspec/adapters/aiomysql/core.py 77.27% 5 Missing and 5 partials ⚠️
sqlspec/adapters/asyncmy/core.py 77.27% 5 Missing and 5 partials ⚠️
sqlspec/adapters/mysqlconnector/core.py 82.75% 5 Missing and 5 partials ⚠️
sqlspec/adapters/pymysql/core.py 76.74% 5 Missing and 5 partials ⚠️
... and 22 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #603      +/-   ##
==========================================
+ Coverage   75.57%   75.70%   +0.13%     
==========================================
  Files         474      471       -3     
  Lines       62126    62720     +594     
  Branches     9309     9424     +115     
==========================================
+ Hits        46951    47483     +532     
+ Misses      12164    12145      -19     
- Partials     3011     3092      +81     
Flag Coverage Δ
integration 60.11% <55.02%> (+0.94%) ⬆️
py3.10 73.96% <78.11%> (+0.12%) ⬆️
py3.11 73.98% <78.27%> (+0.13%) ⬆️
py3.12 73.97% <78.11%> (+0.12%) ⬆️
py3.13 73.97% <78.27%> (+0.12%) ⬆️
py3.14 74.91% <78.92%> (+0.14%) ⬆️
unit 61.93% <69.34%> (+0.48%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sqlspec/adapters/adbc/config.py 92.72% <100.00%> (+0.04%) ⬆️
sqlspec/adapters/adbc/type_converter.py 76.92% <100.00%> (+23.79%) ⬆️
sqlspec/adapters/aiomysql/config.py 93.54% <100.00%> (-0.07%) ⬇️
sqlspec/adapters/aiosqlite/core.py 90.09% <100.00%> (-0.28%) ⬇️
sqlspec/adapters/bigquery/core.py 72.11% <100.00%> (+0.35%) ⬆️
sqlspec/adapters/duckdb/core.py 85.52% <100.00%> (+0.91%) ⬆️
sqlspec/adapters/mysqlconnector/config.py 94.73% <100.00%> (+0.06%) ⬆️
sqlspec/adapters/oracledb/_typing.py 92.92% <ø> (ø)
sqlspec/adapters/oracledb/type_converter.py 92.85% <100.00%> (+8.24%) ⬆️
sqlspec/adapters/psqlpy/type_converter.py 66.66% <100.00%> (+15.05%) ⬆️
... and 42 more

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from feat/test-harness-updates to main July 5, 2026 21:16
@cofin cofin force-pushed the codex/adapter-type-system-release branch from f478ab1 to a040bb9 Compare July 5, 2026 21:19
@cofin cofin marked this pull request as ready for review July 5, 2026 23:50
@cofin cofin merged commit 4cea944 into main Jul 6, 2026
23 checks passed
@cofin cofin deleted the codex/adapter-type-system-release branch July 6, 2026 12:58
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.

2 participants