[feature](external) Add generic connector write framework prerequisites - #68320
Open
suxiaogang223 wants to merge 6 commits into
Open
suxiaogang223 wants to merge 6 commits into
suxiaogang223 wants to merge 6 commits into
Conversation
suxiaogang223
requested review from
924060929,
CalvinKirs,
englefly,
morrySnow and
starocean999
as code owners
September 21, 2026 07:27
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
suxiaogang223
force-pushed
the
codex/paimon-write-framework
branch
from
September 21, 2026 07:29
fc95401 to
4b96e9f
Compare
### What problem does this PR solve? Issue Number: apache#65086 Related PR: apache#67395 Problem Summary: External-file commit reports only carry source-specific Thrift structs. A new connector would need branches in FE core and could miss the existing acknowledgement and retry-safe ownership transfer. Add an opaque binary commit-data field, share the BE report-size budget with Iceberg, and feed the bytes into the owning connector transaction through both coordinator paths. Keep the existing Hive, Iceberg, and MaxCompute fields unchanged. ### Release note None ### Check List (For Author) - Test: FE build with ./build.sh --fe -j 4; FE unit tests with ./run-fe-ut.sh --run org.apache.doris.qe.QeProcessorImplReportAckTest,org.apache.doris.transaction.CommitDataSerializerTest; BE clang-format 16 check and header hygiene check. BE compile and unit tests not run. - Behavior changed: Yes (new opt-in connector commit-data report channel; existing connector paths unchanged) - Does this need documentation: No
### What problem does this PR solve? Issue Number: apache#65086 Related PR: apache#67395 Problem Summary: The shared row-level DML registry selected the Iceberg transform solely from DELETE or MERGE capability. A connector such as Paimon can support the same operations while encoding changes as changelog rows, which would incorrectly route it through Iceberg position-delete planning. Add an engine-neutral row-change representation to the connector SPI, declare Iceberg as position-delete, select its transform by both representation and operation, and fail loudly when a connector advertises row-level writes before its representation has a registered plan. The SPI surface changes, so bump the connector plugin API major and update the recorded surface in the same commit. ### Release note None ### Check List (For Author) - Test: Unit Test - Connector SPI test suite - IcebergRowLevelDmlTransformTest and PluginDrivenExternalTableTest - IcebergWritePlanProviderTest#declaresFullWriteOperationSet - FE-core, connector SPI, and Iceberg checkstyle - Behavior changed: Yes (connector row-level DML is selected by its declared representation) - Does this need documentation: No
suxiaogang223
force-pushed
the
codex/paimon-write-framework
branch
from
September 21, 2026 07:31
4b96e9f to
06ddfc3
Compare
### What problem does this PR solve? Issue Number: apache#65086 Related PR: apache#67395 Problem Summary: Generic connector commit payloads were acknowledged by query execution but were not handled consistently by all execution report paths. Centralize payload detection and dispatch so coordinator, load, and job reports all deliver opaque connector commit data to the transaction. ### Release note None ### Check List (For Author) - Test: Unit Test - ./run-fe-ut.sh --run CommitDataSerializerTest,AbstractJobProcessorTest,QeProcessorImplReportAckTest - Behavior changed: No - Does this need documentation: No
### What problem does this PR solve? Issue Number: apache#65086 Related PR: apache#67395 Problem Summary: The master row-level DML framework only models position-delete sinks and carries Iceberg-specific routing details in FE Core. Add a connector-neutral changelog row representation for DELETE, UPDATE, and MERGE, move connector-owned encoding and validation behind the write SPI, and generalize the existing position-delete transform. Preserve required short-circuit evaluation for MERGE branch expressions and track the operation-column row shape explicitly through connector sinks. ### Release note Add connector-neutral framework support for changelog row-level writes. ### Check List (For Author) - Test: Unit Test - run-fe-ut.sh --run ConnectorPluginSurfaceTest,ConnectorRowLevelDmlContractTest,ConnectorChangelogPlanBuilderTest,PositionDeleteRowLevelDmlTransformTest,PhysicalConnectorTableSinkTest,CaseWhenToCompoundPredicateTest - Behavior changed: Yes. Connector row-level DML is routed by connector-declared row representation and capabilities. - Does this need documentation: No
### What problem does this PR solve? Issue Number: apache#65086 Related PR: apache#67395 Problem Summary: Master lacks the generic Binary Variant V2 Arrow transport and nested constructor support needed by connector writes. Add generic binary-struct serialization and connector target casts while preserving master's Variant property compatibility rules. ### Release note Support Binary Variant V2 serialization for connector writes. ### Check List (For Author) - Test: - FE Unit Test: `./run-fe-ut.sh --run CheckCastTest,FunctionRegistryTest` - BE format check: `build-support/clang-format.sh` and `build-support/check-format.sh` - Behavior changed: Yes. Connector writes can serialize Binary Variant V2 values and construct nested Variant values. - Does this need documentation: No
### What problem does this PR solve? Issue Number: apache#65086 Related PR: apache#66685 Problem Summary: Connector-specific bucket routing was previously modeled with data-source classes and enums in FE Core. Add a connector-neutral write-distribution SPI and an opaque external partition-function transport. FE Core now resolves route columns and forwards the function name and options without knowing a connector, while BE provides the common writer-assignment framework and validates supported functions. ### Release note Add a generic external table writer distribution framework. ### Check List (For Author) - Test: - FE Unit Test: `./run-fe-ut.sh --run ConnectorPluginSurfaceTest,ConnectorWriteDistributionTest,PhysicalConnectorTableSinkTest` - BE format check: `build-support/clang-format.sh` and `build-support/check-format.sh` - BE build hygiene: `build-support/check-build-hygiene.sh` - Behavior changed: Yes. Connectors can request opaque external writer routing without adding data-source code to FE Core. - Does this need documentation: No
Member
Author
|
run buildall |
Contributor
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
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.
What problem does this PR solve?
Issue Number: #65086
Related PR: #67395
Problem Summary:
Forward-porting Paimon table writes exposes four gaps in the generic connector write framework. Implementing them as Paimon-specific branches in FE Core would duplicate the existing write pipeline and would also cause Paimon row-level changes to be planned with Iceberg position-delete semantics.
This PR adds the missing connector-neutral framework capabilities:
The implementation intentionally does not add Paimon-specific planner classes, hidden-column names, Thrift structures, or a new write system. Paimon-specific table rules, fixed-bucket hash implementation, writer, and transaction interpretation remain in the Paimon integration that will follow this prerequisite PR.
The connector SPI surface changes once, so
connector.plugin.api.versionis increased from 10 to 11 once for the whole PR.Release note
None
Check List (For Author)
build-support/check-format.shbuild-support/check-build-hygiene.sh