Repository navigation
chore(clickhouse): 移除内置 ClickHouse 插件,改走 clickhouse IPC 驱动扩展 - #436
Merged
Merged
Conversation
- 删除 crates/db/src/clickhouse 原生插件(plugin/connection/codec),移除 db 的 clickhouse 依赖与 lib 模块导出,workspace 依赖同步清理 - DatabaseType::ClickHouse 纳入 external_driver_id(-> "clickhouse"),连接表单/ 打开守卫/新建入口/IPC 协议按外部驱动路由;DbManager 复用 resolve_external_plugin, ipc/plugin 的本地兼容实现返回 None - required_driver_for_config 为 ClickHouse 走驱动守卫,未安装时引导从扩展市场安装, 与 DuckDB/TDengine 同策略,兼容历史内置连接 - 新建入口未安装 clickhouse 驱动时不展示 ClickHouse(数据库类目本就有其他成员, 不追加空态安装入口);onetcli_runtime 的连接表单改由 driver.json 声明式提供 - 依赖内置插件的测试改写而非静默删除:copy_format 改用 compatible_database_type= ClickHouse 的外部驱动断言布尔仍格式化为 true;表设计器 DDL 断言排除无原生插件类型; sync_plan 中外键忽略用例的行为已由扩展侧 ddl 单测覆盖 - 更新 README/README_CN 描述;新增 clickhouse_routes_to_external_driver 与 clickhouse_kind_follows_driver_installation 单测 - cargo check --workspace --all-targets 通过;db 1311、db_view 943、main 674、 navop_runtime 全部单测通过
Merged
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.
Description
Host-side half of moving ClickHouse onto the extension-driver architecture (same treatment TDengine got when it moved out of the host): the built-in native ClickHouse plugin is removed and
DatabaseType::ClickHousenow routes through an IPC external driver withdriver_id = "clickhouse".What changed:
crates/db/src/clickhouse(plugin.rs/connection.rs/codec.rs, ~3.6k lines), theclickhousedependency incrates/dband the workspace, and thelibmodule export.DatabaseType::external_driver_id()mapsClickHousetoSome("clickhouse"), so the connection form, open guard, tree menu and IPC protocol all resolve the extension.DbManager::get_pluginnow callsresolve_external_plugin(CLICKHOUSE_IPC_DRIVER_ID); the local compatibility path inipc/plugin.rsreturnsNonefor ClickHouse, exactly like TDengine.required_driver_for_configuses the driver guard, so opening a historical built-in ClickHouse connection prompts to install the extension from the extension market (same policy as DuckDB/TDengine).clickhousedriver is installed (the category already has other members, so no empty-state install row is added).driver.json:navop_runtimeno longer asks the built-in plugin for aui_manifest; the form is declared by the extension'sdriver.json.copy_format: the ClickHouse boolean literal assertion now goes through the external driver'scompatible_database_type = ClickHouseand still formatstrue;clickhouse_routes_to_external_driverandclickhouse_kind_follows_driver_installation.Dependency before merge
This PR is only useful once the companion extension is published:
navop-extensions, branchfeat/clickhouse-ipc-driver, commit958cd54(extensions/ipc/clickhouse, HTTP interface, 25 wire methods,driver.jsonwithcompatible_database_type=ClickHouse);published: falseand is not yet on the extension market.Until that extension ships, merging this PR means no ClickHouse support at all: existing ClickHouse connections will show the "install driver" guard. The
navop-extensionssubmodule pointer is intentionally left untouched, matching the TDengine migration, because the driver is delivered through the market rather than bundled.Break Changes
clickhouseIPC driver extension. Legacy built-in ClickHouse connections keep their stored config and are routed to the driver byDatabaseType::ClickHouse.ddltests.INVALID_PARAMSandaffected_rowsis reported as 0 rather than fabricated (extension-side detail, listed here so reviewers can see the capability delta).How to Test
Local results on the rebased branch (base
main@db76dd449):Manual checks:
clickhousedriver installed: New Connection → database category shows ClickHouse; the form comes fromdriver.json; connecting and browsing a database works.Checklist
cargo runfor story tests related to the changes.