Skip to content

Add ADBC driver support for unified database connectivity#52

Merged
nicosuave merged 2 commits intomainfrom
nicosuave/dbc-driver-support
Jan 6, 2026
Merged

Add ADBC driver support for unified database connectivity#52
nicosuave merged 2 commits intomainfrom
nicosuave/dbc-driver-support

Conversation

@nicosuave
Copy link
Copy Markdown
Member

Summary

Implement ADBC (Arrow Database Connectivity) adapter enabling connection to multiple databases through the DBC driver manager. Supports PostgreSQL, MySQL, Snowflake, BigQuery, SQLite, and other ADBC-compatible databases via unified interface.

Changes

  • New ADBCAdapter class with DB-API compatible interface
  • Support for adbc:// URL scheme and YAML dict-style configs
  • Automatic cursor lifecycle management to prevent resource leaks
  • Hierarchical fallback for metadata retrieval (native → information_schema)
  • SQL injection prevention via identifier validation
  • Optional dependency group for adbc-driver-manager
  • 25 comprehensive tests including DBC driver integration

Testing

  • All 25 ADBC tests passing
  • All 1629 existing tests still passing
  • Tested with SQLite driver (both DBC-installed and pip package)
  • SemanticLayer integration verified

Implement ADBC (Arrow Database Connectivity) adapter enabling connection
to multiple databases through the DBC driver manager. Supports PostgreSQL,
MySQL, Snowflake, BigQuery, SQLite, and other ADBC-compatible databases.

- New ADBCAdapter class with DB-API compatible interface
- Support for adbc:// URL scheme and YAML dict-style configs
- Automatic cursor lifecycle management to prevent resource leaks
- Hierarchical fallback for metadata retrieval (native -> information_schema)
- SQL injection prevention via identifier validation
- Optional dependency group for adbc-driver-manager and pyarrow
- 25 comprehensive tests including DBC driver integration
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d91f7eb56

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread sidemantic/db/adbc.py
Comment on lines +345 to +349
# Parse query parameters
params = parse_qs(parsed.query)

# Extract uri if provided
uri = params.pop("uri", [None])[0]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Parse adbc://driver/uri path for connection URI

The new ADBC URL parser only pulls the connection URI from the query string (params.pop("uri", ...)) and never uses parsed.path. As a result, the documented format adbc://driver/uri (see SemanticLayer docstring) will drop the URI entirely and attempt to connect without it (or default :memory: for sqlite), which will fail for drivers that require a URI. This is a regression for users following the newly documented example; consider extracting parsed.path as the URI when present or supporting both path and ?uri= formats.

Useful? React with 👍 / 👎.

Support adbc://driver/uri format in addition to adbc://driver?uri=...
This fixes a regression where the documented path format would drop
the URI entirely and fail for drivers requiring a connection URI.
@nicosuave nicosuave merged commit d91653f into main Jan 6, 2026
10 checks passed
@nicosuave nicosuave deleted the nicosuave/dbc-driver-support branch January 6, 2026 15:11
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.

1 participant