Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
9fb7bd5
[refactor](catalog) fe-connector-api/spi: write down the connector de…
morningman Jul 25, 2026
815041e
[refactor](catalog) fe-connector-api: correct interface docs that con…
morningman Jul 25, 2026
3131c17
[refactor](catalog) fe-connector-api: split ConnectorTableOps into do…
morningman Jul 25, 2026
04cd83b
[fix](hive) forward nested column DDL to the iceberg sibling on an HM…
morningman Jul 25, 2026
d6e45e5
[fix](hive) report an iceberg-on-HMS table's comment through the gate…
morningman Jul 25, 2026
9e0567b
[doc](catalog) record the first connector-interface batch and correct…
morningman Jul 25, 2026
74b51a7
[refactor](catalog) fe-connector-api: delete six pieces of dead conne…
morningman Jul 25, 2026
a1e576d
[refactor](catalog) fe-connector-api: remove the LIMIT pushdown entry…
morningman Jul 25, 2026
1e336f6
[refactor](catalog) fe-connector-api: drop the create-table request's…
morningman Jul 25, 2026
27132d4
[refactor](catalog) fe-connector-api: drop the partition-value list n…
morningman Jul 25, 2026
c4cc7ba
[refactor](catalog) fe-connector-api: delete the unwired property-des…
morningman Jul 25, 2026
50719cf
[doc](catalog) record the dead-surface deletion batch and correct fou…
morningman Jul 25, 2026
15fe039
[refactor](catalog) remove the catalog type allow-list so a registere…
morningman Jul 25, 2026
970b01f
[doc](catalog) stop pointing at the deleted catalog type allow-list
morningman Jul 25, 2026
e4a6edf
[doc](catalog) record the allow-list removal and correct six task-doc…
morningman Jul 25, 2026
e7f332d
[fix](catalog) fe-connector-trino: fold every arm of an OR predicate,…
morningman Jul 25, 2026
ef01d3f
[fix](catalog) fe-connector-trino: carry STRUCT field names, and enfo…
morningman Jul 25, 2026
e490a60
[fix](catalog) fe-connector-paimon: stop pushing null-safe equality d…
morningman Jul 25, 2026
ae9d7d8
[fix](catalog) fe-connector-paimon: only push a LIKE pattern that is …
morningman Jul 25, 2026
8594763
[fix](catalog) fe-connector-hudi: report last-modified as epoch milli…
morningman Jul 25, 2026
8a2111e
[refactor](catalog) fe-connector-spi: add a forwarding context base s…
morningman Jul 25, 2026
aa98a87
[doc](catalog) record the correctness-defect batch and correct two ta…
morningman Jul 25, 2026
ce059f1
[doc](catalog) fe-connector-api: write down the predicate-pushdown co…
morningman Jul 25, 2026
547bd2a
[refactor](catalog) delete the connector-to-engine cache invalidation…
morningman Jul 25, 2026
a485250
[refactor](catalog) fe-connector-api: delete the scan-range-type enum…
morningman Jul 25, 2026
9abc087
[refactor](catalog) fe-connector-api: delete four zero-consumer SPI g…
morningman Jul 25, 2026
8d682af
[doc](catalog) record the pushdown-contract and dead-surface batch
morningman Jul 25, 2026
fe459a8
[refactor](catalog) fe-connector-api: centralize the scan-node proper…
morningman Jul 25, 2026
85dfa8b
[refactor](catalog) fe-connector-spi: let connectors declare what two…
morningman Jul 25, 2026
954a2c4
[refactor](catalog) fe-connector-api: decide BE file-cache admission …
morningman Jul 25, 2026
4ef0507
[fix](catalog) fe-core: drop two never-populated data-source rows fro…
morningman Jul 25, 2026
2eddcbc
[doc](catalog) record the property-key contract and source-name-branc…
morningman Jul 25, 2026
671c078
[refactor](catalog) fe-connector-hive: reflect only the per-table-res…
morningman Jul 26, 2026
a96f953
[refactor](catalog) fe-connector-api: type the per-table capability c…
morningman Jul 26, 2026
6aeeebc
[refactor](catalog) fe-core: one accessor for catalog-scope connector…
morningman Jul 26, 2026
2f28996
[refactor](catalog) fe-connector-api: delete the write-trait mirrors …
morningman Jul 26, 2026
5ade58e
[doc](catalog) record the capability-shape batch and a build regressi…
morningman Jul 26, 2026
942e6e0
[refactor](catalog) fe-connector-api: sink the directory-name null-pa…
morningman Jul 26, 2026
b30778e
[refactor](catalog) fe-connector-api: give the canonical NULL partiti…
morningman Jul 26, 2026
ea9b0d8
[refactor](catalog) fe-core: hand the distributed procedure's result …
morningman Jul 26, 2026
6239b41
[refactor](catalog) fe-connector-api: move the HTTP passthrough off t…
morningman Jul 26, 2026
4d5ed06
[refactor](catalog) fe-core: move the source-specific early-stop deci…
morningman Jul 26, 2026
4e99cd0
[doc](catalog) record the neutralization batch and what its plan docs…
morningman Jul 26, 2026
0defa0c
[doc](catalog) check in the same-day SPI design review, unmodified
morningman Jul 26, 2026
7543e91
[doc](catalog) date-stamp the SPI design review against the tree it n…
morningman Jul 26, 2026
890a849
[doc](catalog) correct three stale code comments the review cross-che…
morningman Jul 26, 2026
dbebf24
[doc](catalog) record the review-doc batch and why its own errata lis…
morningman Jul 26, 2026
211ffe4
[refactor](catalog) fe-core: delete the dead MODIFY ENGINE subsystem
morningman Jul 26, 2026
e317a0c
[refactor](catalog) fe-connector-spi: let each catalog answer for its…
morningman Jul 26, 2026
cb6504f
[refactor](catalog) fe-core: route CREATE TABLE by catalog instead of…
morningman Jul 26, 2026
86fa243
[refactor](catalog) fe-core: reduce the internal catalog's create-tab…
morningman Jul 26, 2026
f9aa2c4
[doc](catalog) fe-connector-api: make the file-size listing contract …
morningman Jul 26, 2026
88063ea
[doc](catalog) record the engine-concept batch and what its task doc …
morningman Jul 26, 2026
979eec8
[doc](catalog) fe-core: drop the last comment reference to a deleted …
morningman Jul 26, 2026
d33e05c
[refactor](catalog) fe-connector-spi: let a connector name the engine…
morningman Jul 26, 2026
0d2f983
[refactor](catalog) fe-core: drop the last two source-name switches f…
morningman Jul 26, 2026
60f79e9
[test](catalog) rebase the ENGINE= baselines on the connector-declare…
morningman Jul 26, 2026
d8b155f
[doc](catalog) record the display-engine-name batch and what its hand…
morningman Jul 26, 2026
c90caf5
[refactor](catalog) fe-connector-spi: give a catalog's storage servic…
morningman Jul 26, 2026
f60f043
[refactor](catalog) fe-connector-spi: name the URL check for what it …
morningman Jul 26, 2026
51a6055
[doc](catalog) record the storage-context split and its obsolete risk…
morningman Jul 26, 2026
5933c1e
[refactor](catalog) fe-connector-api: delete the scan-range count est…
morningman Jul 26, 2026
c855908
[doc](catalog) fe-connector-api: state the three contracts these inte…
morningman Jul 26, 2026
6401ea2
[test](catalog) fe-connector-hive: give the partition-hash-write inva…
morningman Jul 26, 2026
94b1c53
[refactor](catalog) fe-connector-api: name the write handle's map for…
morningman Jul 26, 2026
2216bcc
[refactor](catalog) fe-core: give the passthrough query TVF a connect…
morningman Jul 26, 2026
e38fc0e
[refactor](catalog) fe-connector-api: drop the create-database mirror…
morningman Jul 26, 2026
f1a5033
[refactor](catalog) connectors: make the CAST-predicate answer delibe…
morningman Jul 26, 2026
51387f8
[refactor](catalog) fe-connector-api: give SQL passthrough its own op…
morningman Jul 26, 2026
5ae2839
[doc](catalog) record the open-item batch and what its own registry g…
morningman Jul 26, 2026
3d5d4c9
[refactor](catalog) fe-connector-api: one planScan, one request object
morningman Jul 26, 2026
af4f54b
[doc](catalog) record the scan-request batch, closing the open-item list
morningman Jul 26, 2026
9a65f0c
[fix](catalog) fe-connector-paimon: reconcile the rebased-in cpp-flag…
morningman Jul 26, 2026
fb792af
[test](catalog) fe-connector-api: refresh the ConnectorMetadata surfa…
morningman Jul 26, 2026
c663538
[doc](catalog) record the rebase round: zero textual conflicts, two r…
morningman Jul 26, 2026
8712ee5
[doc](catalog) record the rebase onto ceb33843d4b and the one merge d…
morningman Jul 27, 2026
d3163c3
[fix](catalog) fe-core: discard the plugin runtime on every connector…
morningman Jul 27, 2026
d6564c4
[fix](catalog) fe-core: carry the whole column type into the connecto…
morningman Jul 27, 2026
784d11d
[test](catalog) fe-connector-hive: repair three stale createTable fix…
morningman Jul 27, 2026
fa136c2
[doc](catalog) HANDOFF: record the rebase onto e48a96ae488 and two th…
morningman Jul 27, 2026
7e90aea
[doc](catalog) HANDOFF: correct the build-invocation note -- known tr…
morningman Jul 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion fe/fe-connector/fe-connector-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ under the License.
<packaging>jar</packaging>
<name>Doris FE Connector API</name>
<description>
Consumer-facing API for the Doris FE connector abstraction layer.
The interfaces a Doris FE connector plugin implements, and the engine consumes.
Contains the core Connector interface, ConnectorMetadata sub-interfaces,
opaque Handle types, ConnectorSession, value objects, and capability enums.
Design rules for the whole connector surface are documented in this module's
org.apache.doris.connector.api package-info.

Note that despite the module names, this is the module a connector implements;
fe-connector-spi holds the plugin entry point plus the engine services a
connector consumes.

The fe-thrift dependency (provided scope) allows connectors to construct
typed TTableDescriptor objects for the FE-BE protocol. At runtime the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@

import org.apache.doris.connector.api.event.ConnectorEventSource;
import org.apache.doris.connector.api.handle.ConnectorTableHandle;
import org.apache.doris.connector.api.handle.WriteOperation;
import org.apache.doris.connector.api.procedure.ConnectorProcedureOps;
import org.apache.doris.connector.api.rest.ConnectorRestPassthrough;
import org.apache.doris.connector.api.scan.ConnectorScanPlanProvider;
import org.apache.doris.connector.api.write.ConnectorWritePlanProvider;

import java.io.Closeable;
import java.io.IOException;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.OptionalLong;
Expand All @@ -38,10 +37,28 @@
*
* <p>A {@code Connector} instance is created once per catalog and provides
* access to metadata, scan planning, and optional write operations.</p>
*
* <p><b>This interface does not mirror any provider's switches, and must not start.</b> A subsystem trait
* (write operations, parallel write, partition-hash write, ...) is declared on the provider that owns it and
* read from there; a forwarding copy here would be a second overridable answer to one question, and a
* connector overriding the copy while leaving the provider at its default would produce two divergent
* answers with no compile error and no failing test. The engine reaches a trait by fetching the provider
* ({@link #getWritePlanProvider(ConnectorTableHandle)} for a per-table answer, {@link #getWritePlanProvider()}
* for a connector-wide one) and asking it, treating a {@code null} provider as "not supported".</p>
*
* <p>The getters that return {@code null} ({@code getScanPlanProvider}, {@code getWritePlanProvider},
* {@code getProcedureOps}, {@code getEventSource}, {@code getRestPassthrough}) are the opposite case: those
* ARE the declaration points for "this subsystem exists". See the {@code org.apache.doris.connector.api}
* package documentation for the full rule.</p>
*/
public interface Connector extends Closeable {

/** Returns the metadata interface for the given session. */
/**
* Returns the metadata interface for the given session. The engine calls this exactly once per catalog per
* statement through its own single entry point and closes the result when the statement ends, so an
* implementation may return a fresh, statement-scoped object; see {@link ConnectorMetadata} for the
* lifecycle contract.
*/
ConnectorMetadata getMetadata(ConnectorSession session);

/**
Expand Down Expand Up @@ -107,84 +124,6 @@ default ConnectorWritePlanProvider getWritePlanProvider(ConnectorTableHandle han
return getWritePlanProvider();
}

/**
* The write operations the engine may perform on this connector — the single admission source. Reads the
* write provider's {@link ConnectorWritePlanProvider#supportedOperations()}; no provider ⇒ empty set ⇒ all
* writes rejected. The engine consults this instead of {@code getWritePlanProvider() != null}.
*/
default Set<WriteOperation> supportedWriteOperations() {
ConnectorWritePlanProvider p = getWritePlanProvider();
return p == null ? EnumSet.noneOf(WriteOperation.class) : p.supportedOperations();
}

/**
* Per-table view of {@link #supportedWriteOperations()}: derives from {@link #getWritePlanProvider(
* ConnectorTableHandle)} so a heterogeneous gateway admits the right operations for {@code handle} (e.g. an
* iceberg-on-HMS table admits DELETE/MERGE that the hive provider does not). The default routes through the
* per-handle provider, so every single-format connector is unaffected.
*/
default Set<WriteOperation> supportedWriteOperations(ConnectorTableHandle handle) {
ConnectorWritePlanProvider p = getWritePlanProvider(handle);
return p == null ? EnumSet.noneOf(WriteOperation.class) : p.supportedOperations();
}

/** Null-safe view of {@link ConnectorWritePlanProvider#supportsWriteBranch()}. No provider ⇒ false. */
default boolean supportsWriteBranch() {
ConnectorWritePlanProvider p = getWritePlanProvider();
return p != null && p.supportsWriteBranch();
}

/** Per-table view of {@link #supportsWriteBranch()} (derives from the per-handle provider). */
default boolean supportsWriteBranch(ConnectorTableHandle handle) {
ConnectorWritePlanProvider p = getWritePlanProvider(handle);
return p != null && p.supportsWriteBranch();
}

/** Null-safe view of {@link ConnectorWritePlanProvider#requiresParallelWrite()}. No provider ⇒ false. */
default boolean requiresParallelWrite() {
ConnectorWritePlanProvider p = getWritePlanProvider();
return p != null && p.requiresParallelWrite();
}

/** Null-safe view of {@link ConnectorWritePlanProvider#requiresFullSchemaWriteOrder()}. No provider ⇒ false. */
default boolean requiresFullSchemaWriteOrder() {
ConnectorWritePlanProvider p = getWritePlanProvider();
return p != null && p.requiresFullSchemaWriteOrder();
}

/** Null-safe view of {@link ConnectorWritePlanProvider#requiresPartitionLocalSort()}. No provider ⇒ false. */
default boolean requiresPartitionLocalSort() {
ConnectorWritePlanProvider p = getWritePlanProvider();
return p != null && p.requiresPartitionLocalSort();
}

/** Null-safe view of {@link ConnectorWritePlanProvider#requiresPartitionHashWrite()}. No provider ⇒ false. */
default boolean requiresPartitionHashWrite() {
ConnectorWritePlanProvider p = getWritePlanProvider();
return p != null && p.requiresPartitionHashWrite();
}

/** Per-table view of {@link #requiresPartitionHashWrite()} (derives from the per-handle provider). */
default boolean requiresPartitionHashWrite(ConnectorTableHandle handle) {
ConnectorWritePlanProvider p = getWritePlanProvider(handle);
return p != null && p.requiresPartitionHashWrite();
}

/**
* Null-safe view of {@link ConnectorWritePlanProvider#requiresMaterializeStaticPartitionValues()}. No
* provider ⇒ false.
*/
default boolean requiresMaterializeStaticPartitionValues() {
ConnectorWritePlanProvider p = getWritePlanProvider();
return p != null && p.requiresMaterializeStaticPartitionValues();
}

/** Per-table view of {@link #requiresMaterializeStaticPartitionValues()} (derives from the per-handle provider). */
default boolean requiresMaterializeStaticPartitionValues(ConnectorTableHandle handle) {
ConnectorWritePlanProvider p = getWritePlanProvider(handle);
return p != null && p.requiresMaterializeStaticPartitionValues();
}

/**
* Returns the procedure ops for {@code ALTER TABLE EXECUTE} dispatch, or {@code null} if this
* connector exposes no table procedures. Procedure-side analogue of {@link #getWritePlanProvider()}.
Expand Down Expand Up @@ -214,10 +153,10 @@ default Set<ConnectorCapability> getCapabilities() {

/**
* Storage-configuration defaults this connector derives from its own catalog properties, which the raw
* catalog map does not already supply. Design S8: storage-property derivation is owned by the connector —
* catalog map does not already supply. Storage-property derivation is owned by the connector —
* fe-core does not parse metastore properties. fe-core folds the returned map into the catalog's storage
* properties as DEFAULTS (an explicit user key always wins via {@code putIfAbsent}), and does so BEFORE
* both the fe-filesystem bind ({@code ConnectorContext.getStorageProperties()}) and the BE storage map
* both the fe-filesystem bind ({@code ConnectorStorageContext.getStorageProperties()}) and the BE storage map
* ({@code getBackendStorageProperties()}), so the FE bind and the BE scan see the same derived storage.
*
* <p>The default is empty (no derivation), so every connector that does not need it is unaffected. The
Expand All @@ -231,16 +170,6 @@ default Map<String, String> deriveStorageProperties(Map<String, String> rawCatal
return Collections.emptyMap();
}

/** Returns the table-level property descriptors. */
default List<ConnectorPropertyMetadata<?>> getTableProperties() {
return Collections.emptyList();
}

/** Returns the session-level property descriptors. */
default List<ConnectorPropertyMetadata<?>> getSessionProperties() {
return Collections.emptyList();
}

/**
* Returns whether connectivity testing should be enabled by default when
* the user does not explicitly set the {@code test_connection} property.
Expand Down Expand Up @@ -289,21 +218,6 @@ default ConnectorTestResult testConnection(ConnectorSession session) {
default void close() throws IOException {
}

/**
* Execute a REST passthrough request against the underlying data source.
*
* <p>Connectors that expose HTTP endpoints (e.g., Elasticsearch) can
* override this to proxy REST requests from FE REST APIs.</p>
*
* @param path the relative URL path (e.g., "index_name/_search")
* @param body the request body (may be null for GET-style requests)
* @return the response body as a JSON string
* @throws UnsupportedOperationException if the connector doesn't support REST
*/
default String executeRestRequest(String path, String body) {
throw new UnsupportedOperationException("REST passthrough not supported by this connector");
}

/**
* Invalidates any connector-side per-table cache (e.g. a latest-snapshot/version cache) so a subsequent
* read reflects the latest external state. Called by the engine on {@code REFRESH TABLE}. The names are
Expand Down Expand Up @@ -348,6 +262,17 @@ default ConnectorEventSource getEventSource() {
return null;
}

/**
* Returns this connector's HTTP passthrough capability, or {@code null} if it has none. A capability-probe
* getter with the same shape as {@link #getEventSource()}: the caller probes for {@code null}, never via
* {@code instanceof}. Consumed by FE HTTP endpoints that speak one source's HTTP dialect (today
* {@code ESCatalogAction}), which narrow to that catalog type first and only then ask for the capability.
* The default returns {@code null}, so no connector inherits an entry point it cannot serve.
*/
default ConnectorRestPassthrough getRestPassthrough() {
return null;
}

/**
* Optional per-connector override of the catalog's schema-cache TTL (in seconds), consulted generically by
* the engine when sizing the schema meta-cache. Semantics match {@code schema.cache.ttl-second}:
Expand Down
Loading
Loading