Repository navigation
Feat: Add Apache Doris engine adapter with OLAP and Iceberg multi-catalog support - #6154
Open
brucearctor wants to merge 4 commits into
Open
brucearctor wants to merge 4 commits into
brucearctor wants to merge 4 commits into
Conversation
brucearctor
force-pushed
the
feat/doris-engine-adapter
branch
2 times, most recently
from
October 18, 2026 23:55
c7d92a2 to
0b5eaea
Compare
…alog support Closes SQLMesh#5875 Co-authored-by: xinge.ji <xinge.ji@outlook.com> Signed-off-by: Bruce Arctor <5032356+brucearctor@users.noreply.github.com>
brucearctor
force-pushed
the
feat/doris-engine-adapter
branch
from
October 19, 2026 00:35
0b5eaea to
8a5ce1c
Compare
…ris constraints Co-authored-by: xinge.ji <xinge.ji@outlook.com> Signed-off-by: Bruce Arctor <5032356+brucearctor@users.noreply.github.com>
…t-for-db.sh Co-authored-by: xinge.ji <xinge.ji@outlook.com> Signed-off-by: Bruce Arctor <5032356+brucearctor@users.noreply.github.com>
…s, and move MV tests to test_integration_doris Co-authored-by: xinge.ji <xinge.ji@outlook.com> Signed-off-by: Bruce Arctor <5032356+brucearctor@users.noreply.github.com>
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.
Summary
Adds first-class Apache Doris (
DorisEngineAdapterandDorisConnectionConfig) engine support to SQLMesh, including both native Doris OLAP tables (UNIQUE KEYMerge-on-Write,DUPLICATE KEY,AGGREGATE KEY) and Doris-backed Apache Iceberg multi-catalog tables (catalog.db.table/table_format = 'iceberg').Closes #5875
Supersedes / builds upon #5033 (with
Co-authored-by: xinge.ji <xinge.ji@outlook.com>)Key Capabilities
DorisConnectionConfig):PyMySQL(sqlmesh[doris]) withautocommit=Trueand automatic cursor reconnect on transient MySQL-protocol disconnects (OperationalError2006 / 2013 / 2055) when outside a transaction.catalog,session_variables(e.g.,workload_group,enable_unique_key_partial_update),ssl, and configurableconnect_timeout/read_timeout/write_timeout.FORBIDDEN_STATE_SYNC_ENGINESwith a clear configuration error guiding users to configure a dedicatedstate_connection.UNIQUE KEY(includingINCREMENTAL_BY_UNIQUE_KEYauto-propagation, Merge-on-Write properties, and customorder_bysort keys),DUPLICATE KEY, andAGGREGATE KEY.CREATE TABLEschemas and CTAS projections (_reorder_olap_columns) and ensures column index 0 is a valid Doris OLAP key type (neverFLOAT,DOUBLE,ARRAY,MAP,STRUCT,JSON, orVARIANT).DeleteHandler& Logical Merge Semantics:DELETE FROM ... WHERE col IN (SELECT ...)(andCONCAT_WScomposite keys fromLogicalMergeMixin) into Doris'sDELETE FROM target AS _t1 USING (...) AS _t2 WHERE ...syntax forUNIQUE KEYtables.DELETE(_delete_by_literal_keys) forDUPLICATE KEY,AGGREGATE KEY, and Iceberg tables without emittingORorBETWEENpredicates rejected by Doris'sDeleteHandler.RANGE,LIST, Dynamic,AUTO PARTITION, and Iceberg Transforms):RANGE/LISTpartitions,dynamic_partition.*properties,auto_partition(AUTO PARTITION BY RANGE (DATE_TRUNC(...)) ()), and Iceberg partition transforms (PARTITION BY LIST (day(ts), region) ()).insert_overwrite_by_partition.MTMV& Sync RollupMV):BUILD IMMEDIATE|DEFERRED,REFRESH ... ON MANUAL|COMMIT|SCHEDULE) and synchronized single-table rollup materialized views (materialized_type = 'SYNC').CatalogSupport.FULL_SUPPORT):catalog.db.tablenaming,SWITCH <catalog>, catalog-scopedinformation_schema.tablesdiscovery,INSERT OVERWRITE TABLEfor Iceberg full refresh, and safe view guards /environment_catalog_mappingsupport when targeting external catalogs.Testing
tests/core/engine_adapter/test_doris.pyandtests/core/test_connection_config.py.apache/doris:fe-4.0.8&apache/doris:be-4.0.8):tests/core/engine_adapter/integration/test_integration.py(-m "doris", includingtest_sushiinfullanddev_onlymodes,test_value_normalization,test_table_diff,test_alter_table,test_materialized_view, SCD Type 2, and incremental strategies) pass against Doris 4.0.8.tests/core/engine_adapter/integration/test_integration_doris.py.