Skip to content

Remove chDB-owned clickhouse-connect backend and make clickhouse-connect the single owner #633

Description

@ShawnChen-Sirius

Background

chDB added its own clickhouse-connect compatibility backend in chdb.cc_backend,
registered through the clickhouse_connect.backends entry point and shipped via
the chdb[clickhouse-connect] extra.

That made sense when clickhouse-connect only provided the pluggable backend
protocol. However, clickhouse-connect 1.6.0 now ships an experimental in-process
chDB backend directly: get_client(interface='chdb') / chdb:// returns a
standard clickhouse-connect client backed by embedded chDB.

This means there are now two competing implementations of the same integration
surface:

  • chDB repo: chdb/cc_backend.py, chdb/cc_extension.py,
    tests/clickhouse_connect/*, clickhouse_connect.backends entry point
  • clickhouse-connect repo: native chDB backend maintained alongside the shared
    client/backend core

Proposal

Remove the clickhouse-connect compatibility backend from the chDB repository and
make clickhouse-connect the single owner of the chDB backend implementation.

Concretely, chDB should eventually remove:

  • chdb.cc_backend
  • chdb.cc_extension, if no longer needed by the clickhouse-connect-owned backend
  • the clickhouse-connect optional extra
  • the clickhouse_connect.backends entry point
  • chDB-side clickhouse-connect backend tests and CI workflow

Rationale

Keeping both implementations creates version skew and ambiguous ownership:

  • bug fixes may need to be duplicated across repositories
  • public behavior can diverge depending on which backend path users install
  • compatibility with clickhouse-connect internals is best maintained in
    clickhouse-connect itself
  • chDB can keep exposing the core embedded engine API while clickhouse-connect
    owns client-level parity

Migration target

The supported user path should become:

import clickhouse_connect

client = clickhouse_connect.get_client(interface="chdb")
# or
client = clickhouse_connect.get_client("chdb://memory")

with installation handled by clickhouse-connect, e.g.:

pip install "clickhouse-connect[chdb]"

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions