fix dbapi executemany insert routing - #1015
Merged
Merged
Conversation
|
Docs drift check: resolved, docs now match this PR's changes. |
joe-clickhouse
requested
a balanced review from Copilot
and removed request for
peter-leonov-ch
August 31, 2026 18:51
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes DB-API executemany() routing while retaining safe Native insert paths.
Changes:
- Preserves SQL semantics for parameterized inserts.
- Adds validated Native plans for bare VALUES and SQLAlchemy inserts.
- Updates row counts, tests, documentation, and changelog.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
clickhouse_connect/dbapi/cursor.py |
Implements routing, validation, and row counting. |
clickhouse_connect/cc_sqlalchemy/dialect.py |
Builds safe SQLAlchemy Native insert plans. |
tests/unit_tests/test_driver/test_cursor.py |
Tests DB-API routing and results. |
tests/unit_tests/test_sqlalchemy/test_native_insert.py |
Tests SQLAlchemy Native planning. |
tests/unit_tests/test_sqlalchemy/test_query_settings.py |
Updates settings coverage. |
tests/integration_tests/test_dbapi.py |
Adds DB-API regressions. |
tests/integration_tests/test_sqlalchemy/test_inserts.py |
Adds SQLAlchemy integration coverage. |
docs/driver-api.mdx |
Documents DB-API behavior. |
docs/sqlalchemy.mdx |
Documents SQLAlchemy routing. |
CHANGELOG.md |
Records the user-facing fix. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Joe Spadola <joe.spadola@clickhouse.com>
Signed-off-by: Joe Spadola <joe.spadola@clickhouse.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
executemany()insertsbind_expression()types, and joined-table inheritanceCloses #930
Closes #932
Closes #934
Checklist
Delete items not relevant to your PR: