Skip to content

[Tracking][Catalog] Catalog SPI migration — decouple built-in connectors from FE core into loadable plugins #65185

Description

@morningman

Development branch: branch-catalog-spi — all migration PRs target this branch; it merges to master once the migration completes.

Background

Today Apache Doris FE hard-codes every external data source (hive, iceberg, paimon,
hudi, trino-connector, maxcompute, jdbc, es, …) inside fe/fe-core/.../datasource/,
wired into the catalog and planner layers through switch-case and
instanceof *ExternalTable checks. Adding or changing a connector means touching FE
core.

This tracking issue covers the effort to decouple each concrete connector into an
independent, loadable plugin module under fe/fe-connector/*
, leaving only generic
infrastructure and a stable catalog SPI bridge in fe-core.

End state: each connector ships as a self-contained plugin zip; fe-core has no
compile-time knowledge of any specific connector; the runtime discovers and loads
connectors through the catalog SPI (PluginDrivenExternalCatalog / …Table /
…ScanNode).

In scope: FE-side connector code under
datasource/{hive,iceberg,paimon,hudi,trinoconnector,maxcompute,jdbc,es,…}, plus the
reverse couplings (instanceof *ExternalTable, connector-specific sinks / scan-nodes)
scattered across nereids / planner / tablefunction / alter.

Out of scope: BE-side readers; fe-fs-spi file-system plugin work (separate
workstream); extension-spi; kafka / kinesis / odbc / Doris-to-Doris federation
(tracked separately); lakesoul / RemoteDoris legacy types (handled at the end or
separately).

All work lands on the branch-catalog-spi
feature branch and will be merged to master once the migration is complete.

Design invariants (acceptance criteria)

These three invariants must hold at every step:

  1. One-way dependency fe-connector → fe-core. No connector module may
    import org.apache.doris.{catalog,common,datasource,qe,analysis,nereids,planner}.
    Enforced by a CI grep gate.
  2. Metadata backward compatibility. Old FE images holding GSON types such as
    IcebergExternalCatalog / PaimonExternalDatabase must deserialize and migrate
    transparently to PluginDrivenExternalCatalog.
  3. No user-visible behavior regression. SHOW CREATE CATALOG, SHOW TABLE STATUS,
    information_schema.tables, EXPLAIN output, error messages, and catalog type /
    engine names are all preserved.

Progress — phases

Each phase lands as one or more PRs against branch-catalog-spi.

Supporting refactor (landed alongside the phases above):

Connector status

Connector Target module Status Landed in
jdbc fe-connector-jdbc ✅ Done (SPI baseline / reference) pre-existing
es fe-connector-es ✅ Done (SPI baseline / reference) pre-existing
trino-connector fe-connector-trino ✅ Done P2 (#64096)
maxcompute fe-connector-maxcompute ✅ Done P4 (#64300)
paimon fe-connector-paimon ✅ Done P5 (#64446, #64653)
hudi fe-connector-hudi 🔵 In progress P3 (#64143), P7 (#65473)
iceberg fe-connector-iceberg ✅ Done P6 (#64688)
hive (+HMS) fe-connector-hive / fe-connector-hms 🔵 In progress P7 (#65473)

This is an umbrella tracking issue; individual PRs reference it for detailed
per-phase design and review.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions