From 6f7bdd71c199ed70478ca7bb4d77ffc38c753c4d Mon Sep 17 00:00:00 2001 From: alvin-phoenix-ai Date: Sun, 12 Jul 2026 18:16:15 +0800 Subject: [PATCH 1/3] [Refactor] Consolidate built-in connector registration Signed-off-by: alvin-phoenix-ai --- be/AGENTS.md | 17 +++----- be/CMakeLists.txt | 9 ---- be/module_boundary_manifest.json | 25 ++--------- be/src/connector/CMakeLists.txt | 13 ------ be/src/connector/builtin_connector_registry.h | 25 ----------- be/src/connector/connector_registry_init.cpp | 41 ------------------- be/src/exec/CMakeLists.txt | 2 +- be/src/exec/exec_env.cpp | 3 -- be/src/module/CMakeLists.txt | 1 + be/src/module/connector_bootstrap.cpp | 2 + be/test/module/module_bootstrap_test.cpp | 6 ++- 11 files changed, 17 insertions(+), 127 deletions(-) delete mode 100644 be/src/connector/builtin_connector_registry.h delete mode 100644 be/src/connector/connector_registry_init.cpp diff --git a/be/AGENTS.md b/be/AGENTS.md index 86901637052242..9d9e19ff58c67e 100644 --- a/be/AGENTS.md +++ b/be/AGENTS.md @@ -284,18 +284,11 @@ Reusable connector sink/file-writer helpers above connector contracts, including - Core tests: `connector_common_test` - Remediation: Keep ConnectorCommon limited to reusable connector sink/file-writer helpers expressed through connector contracts and compute/runtime lower layers; move concrete connectors, registry wiring, service, HTTP, storage-engine-specific behavior, and full Exec integration upward. -### ConnectorBuiltinRegistry (`connectorbuiltinregistry`) -Top-level built-in connector registration composition above connector contracts and concrete connector libraries. -- Targets: `ConnectorBuiltinRegistry` -- Allowed internal include prefixes: `connector/builtin_connector_registry.h`, `connector/`, `common/`, `base/`, `gutil/`, `gen_cpp/` -- Allowed target deps: `Connector`, `ConnectorFile`, `ConnectorPrimitive`, `Common`, `Base`, `Gutil`, `StarRocksGen` -- Remediation: Keep legacy built-in connector registration as top-level composition for unsplit connector libraries; split connector libraries register through ModuleBootstrap instead of depending back on this target. - ### ModuleBootstrap (`modulebootstrap`) -Default BE module bootstrap composition for built-in module registration, including filesystem provider registry installation and split connector registration. +Default BE module bootstrap composition for built-in module registration, including filesystem provider registry installation and connector registration. - Targets: `ModuleBootstrap` -- Allowed internal include prefixes: `module/`, `connector/benchmark/`, `connector/cache_stats/`, `connector/hive/`, `connector/iceberg/`, `connector/lake/`, `connector/jdbc/`, `connector/elasticsearch/`, `connector/mysql/`, `connector_primitive/`, `connector/connector_registry.h`, `fs/`, `fs_ext/hdfs/`, `compute_env/staros/starlet_filesystem.h`, `common/`, `base/`, `gutil/`, `gen_cpp/` -- Allowed target deps: `FileSystem`, `HdfsFileSystem`, `ComputeEnv`, `Connector`, `ConnectorHive`, `ConnectorIceberg`, `ConnectorLake`, `ConnectorBenchmark`, `ConnectorCacheStats`, `ConnectorJDBC`, `ConnectorElasticsearch`, `ConnectorMySQL`, `ConnectorPrimitive`, `Common`, `Base`, `Gutil`, `StarRocksGen` +- Allowed internal include prefixes: `module/`, `connector/benchmark/`, `connector/cache_stats/`, `connector/file/`, `connector/hive/`, `connector/iceberg/`, `connector/lake/`, `connector/jdbc/`, `connector/elasticsearch/`, `connector/mysql/`, `connector_primitive/`, `connector/connector_registry.h`, `fs/`, `fs_ext/hdfs/`, `compute_env/staros/starlet_filesystem.h`, `common/`, `base/`, `gutil/`, `gen_cpp/` +- Allowed target deps: `FileSystem`, `HdfsFileSystem`, `ComputeEnv`, `Connector`, `ConnectorFile`, `ConnectorHive`, `ConnectorIceberg`, `ConnectorLake`, `ConnectorBenchmark`, `ConnectorCacheStats`, `ConnectorJDBC`, `ConnectorElasticsearch`, `ConnectorMySQL`, `ConnectorPrimitive`, `Common`, `Base`, `Gutil`, `StarRocksGen` - Core tests: `module_bootstrap_test` - Remediation: Keep ModuleBootstrap as top-level default module composition; module implementations should expose registration hooks here instead of depending on service startup directly. @@ -335,7 +328,7 @@ Orchestration layer below Service for query, fragment, and ingestion lifecycle e Diagnostic script execution and command dispatch layer below Service, HttpService, Tools, and AgentServer, and above the remaining reusable BE modules. - Targets: `Script` - Allowed internal include prefixes: `script/`, `base/`, `cache/`, `column/`, `common/`, `connector/`, `compute_env/`, `data_workflows/`, `exec/`, `exec_primitive/`, `exprs/`, `formats/`, `fs/`, `gen_cpp/`, `geo/`, `gutil/`, `io/`, `orchestration/`, `platform/`, `runtime/`, `storage/`, `storage_primitive/`, `types/` -- Allowed target deps: `Base`, `Gutil`, `Common`, `Cache`, `IO`, `FileSystem`, `Platform`, `Types`, `ColumnCore`, `ChunkCore`, `ColumnSortCore`, `Runtime`, `Runtime`, `Runtime`, `Formats`, `StoragePrimitive`, `StorageBase`, `Storage`, `ComputeEnv`, `DataWorkflows`, `Expr`, `ExprDict`, `ExprTableFunction`, `ExprUtility`, `ExecPrimitive`, `ExecRuntime`, `ExecSchemaScannerCore`, `ExecSchemaScanners`, `ExecJoinCore`, `Exec`, `ConnectorPrimitive`, `Connector`, `ConnectorBenchmark`, `ConnectorCacheStats`, `ConnectorElasticsearch`, `ConnectorMySQL`, `ConnectorBuiltinRegistry`, `Orchestration`, `Geo`, `StarRocksGen` +- Allowed target deps: `Base`, `Gutil`, `Common`, `Cache`, `IO`, `FileSystem`, `Platform`, `Types`, `ColumnCore`, `ChunkCore`, `ColumnSortCore`, `Runtime`, `Runtime`, `Runtime`, `Formats`, `StoragePrimitive`, `StorageBase`, `Storage`, `ComputeEnv`, `DataWorkflows`, `Expr`, `ExprDict`, `ExprTableFunction`, `ExprUtility`, `ExecPrimitive`, `ExecRuntime`, `ExecSchemaScannerCore`, `ExecSchemaScanners`, `ExecJoinCore`, `Exec`, `ConnectorPrimitive`, `Connector`, `ConnectorBenchmark`, `ConnectorCacheStats`, `ConnectorElasticsearch`, `ConnectorMySQL`, `Orchestration`, `Geo`, `StarRocksGen` - Core tests: `script_test` - Remediation: Keep Script below Service, HttpService, Tools, and AgentServer; lower reusable behavior can live in lower BE modules that Script is allowed to depend on. @@ -343,7 +336,7 @@ Diagnostic script execution and command dispatch layer below Service, HttpServic Shared service-layer target above Script, runtime, cache, compute, and AgentServer without owning ServiceBE bootstrap code. - Targets: `Service` - Allowed internal include prefixes: `service/`, `script/`, `agent/`, `base/`, `cache/`, `column/`, `common/`, `connector/`, `compute_env/`, `exec/`, `exec_primitive/`, `exprs/`, `formats/`, `fs/`, `gen_cpp/`, `gutil/`, `http/`, `io/`, `platform/`, `orchestration/`, `runtime/`, `storage/`, `storage_primitive/`, `types/` -- Allowed target deps: `Script`, `Runtime`, `Orchestration`, `Runtime`, `Runtime`, `Cache`, `AgentServer`, `ComputeEnv`, `ExecRuntime`, `ExecPrimitive`, `Platform`, `Storage`, `StoragePrimitive`, `StorageBase`, `FileSystem`, `IO`, `HttpService`, `Common`, `Base`, `Gutil`, `StarRocksGen`, `Connector`, `ConnectorFile`, `ConnectorPrimitive`, `ConnectorBuiltinRegistry`, `Exec`, `Formats`, `ChunkCore`, `ColumnCore`, `Types` +- Allowed target deps: `Script`, `Runtime`, `Orchestration`, `Runtime`, `Runtime`, `Cache`, `AgentServer`, `ComputeEnv`, `ExecRuntime`, `ExecPrimitive`, `Platform`, `Storage`, `StoragePrimitive`, `StorageBase`, `FileSystem`, `IO`, `HttpService`, `Common`, `Base`, `Gutil`, `StarRocksGen`, `Connector`, `ConnectorFile`, `ConnectorPrimitive`, `Exec`, `Formats`, `ChunkCore`, `ColumnCore`, `Types` - Remediation: Keep shared Service below ServiceBE and depend on checked module targets such as AgentServer instead of ad hoc lower-layer reach-through. diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index 3b9cd4fa57d93f..b0d24d2dd08e78 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -550,14 +550,6 @@ set(STARROCKS_LINK_LIBS Orchestration DataWorkflows ${WL_START_GROUP} - Connector - ConnectorLake - ConnectorFile - ConnectorHive - ConnectorIceberg - # Keep legacy connector registration in the static library group so its - # concrete file connector registration is retained by static linking. - ConnectorBuiltinRegistry Exec ${WL_WHOLE_ARCHIVE_PREFIX} ${EXPR_EXTENSION_LIBS} ${WL_WHOLE_ARCHIVE_SUFFIX} ${WL_END_GROUP} @@ -890,7 +882,6 @@ endif() set (TEST_LINK_LIBS Orchestration ${STARROCKS_LINK_LIBS} - ConnectorBuiltinRegistry TestUtil ${WL_START_GROUP} gmock diff --git a/be/module_boundary_manifest.json b/be/module_boundary_manifest.json index ae784daea569bf..99a715f1ce0009 100644 --- a/be/module_boundary_manifest.json +++ b/be/module_boundary_manifest.json @@ -1119,34 +1119,17 @@ "allowed_test_link_deps": ["ConnectorMySQL", "ConnectorPrimitive", "Expr", "Runtime", "ChunkCore", "ColumnCore", "Types", "Common", "Base", "Gutil", "StarRocksGen"], "remediation": "Keep ConnectorMySQL limited to MySQL read-side scan and scanner logic; move registration into ModuleBootstrap and avoid pulling Connector, storage, service, or full Exec code into the connector library." }, - { - "id": "connectorbuiltinregistry", - "doc_label": "ConnectorBuiltinRegistry", - "summary": "Top-level built-in connector registration composition above connector contracts and concrete connector libraries.", - "owned_targets": ["ConnectorBuiltinRegistry"], - "additional_owned_globs": ["be/src/connector/builtin_connector_registry.h"], - "allowed_include_prefixes": [ - "connector/builtin_connector_registry.h", - "connector/", - "common/", - "base/", - "gutil/", - "gen_cpp/" - ], - "forbidden_include_prefixes": ["exec/", "runtime/", "storage/", "service/", "http/", "cache/", "util/"], - "allowed_target_deps": ["Connector", "ConnectorFile", "ConnectorPrimitive", "Common", "Base", "Gutil", "StarRocksGen"], - "remediation": "Keep legacy built-in connector registration as top-level composition for unsplit connector libraries; split connector libraries register through ModuleBootstrap instead of depending back on this target." - }, { "id": "modulebootstrap", "doc_label": "ModuleBootstrap", - "summary": "Default BE module bootstrap composition for built-in module registration, including filesystem provider registry installation and split connector registration.", + "summary": "Default BE module bootstrap composition for built-in module registration, including filesystem provider registry installation and connector registration.", "owned_targets": ["ModuleBootstrap"], "owned_roots": ["be/src/module"], "allowed_include_prefixes": [ "module/", "connector/benchmark/", "connector/cache_stats/", + "connector/file/", "connector/hive/", "connector/iceberg/", "connector/lake/", @@ -1164,7 +1147,7 @@ "gen_cpp/" ], "forbidden_include_prefixes": ["agent/", "cache/", "connector/", "data_workflows/", "exec/", "http/", "runtime/", "script/", "service/", "storage/", "util/"], - "allowed_target_deps": ["FileSystem", "HdfsFileSystem", "ComputeEnv", "Connector", "ConnectorHive", "ConnectorIceberg", "ConnectorLake", "ConnectorBenchmark", "ConnectorCacheStats", "ConnectorJDBC", "ConnectorElasticsearch", "ConnectorMySQL", "ConnectorPrimitive", "Common", "Base", "Gutil", "StarRocksGen"], + "allowed_target_deps": ["FileSystem", "HdfsFileSystem", "ComputeEnv", "Connector", "ConnectorFile", "ConnectorHive", "ConnectorIceberg", "ConnectorLake", "ConnectorBenchmark", "ConnectorCacheStats", "ConnectorJDBC", "ConnectorElasticsearch", "ConnectorMySQL", "ConnectorPrimitive", "Common", "Base", "Gutil", "StarRocksGen"], "allowed_test_targets": ["module_bootstrap_test"], "allowed_test_link_deps": ["ModuleBootstrap"], "remediation": "Keep ModuleBootstrap as top-level default module composition; module implementations should expose registration hooks here instead of depending on service startup directly." @@ -1331,7 +1314,6 @@ "ConnectorCacheStats", "ConnectorElasticsearch", "ConnectorMySQL", - "ConnectorBuiltinRegistry", "Orchestration", "Geo", "StarRocksGen" @@ -1397,7 +1379,6 @@ "Connector", "ConnectorFile", "ConnectorPrimitive", - "ConnectorBuiltinRegistry", "Exec", "Formats", "ChunkCore", diff --git a/be/src/connector/CMakeLists.txt b/be/src/connector/CMakeLists.txt index 1ec1cac9257ede..a3241e096e86ce 100644 --- a/be/src/connector/CMakeLists.txt +++ b/be/src/connector/CMakeLists.txt @@ -319,16 +319,3 @@ if (WITH_CONNECTOR_JDBC) libxml2 ) endif() - -ADD_BE_LIB(ConnectorBuiltinRegistry - connector_registry_init.cpp -) - -target_link_libraries(ConnectorBuiltinRegistry PUBLIC - Connector - ConnectorFile - Common - Base - Gutil - StarRocksGen -) diff --git a/be/src/connector/builtin_connector_registry.h b/be/src/connector/builtin_connector_registry.h deleted file mode 100644 index 557f3e15bb6360..00000000000000 --- a/be/src/connector/builtin_connector_registry.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2021-present StarRocks, Inc. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#pragma once - -#include "common/status.h" - -namespace starrocks::connector { - -class ConnectorRegistry; - -Status install_builtin_connectors(ConnectorRegistry* registry); - -} // namespace starrocks::connector diff --git a/be/src/connector/connector_registry_init.cpp b/be/src/connector/connector_registry_init.cpp deleted file mode 100644 index 0298edcc0e7bbf..00000000000000 --- a/be/src/connector/connector_registry_init.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021-present StarRocks, Inc. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include -#include - -#include "connector/builtin_connector_registry.h" -#include "connector/connector_registry.h" -#include "connector/file/file_connector.h" - -namespace starrocks::connector { - -namespace { - -template -void install_if_absent(ConnectorRegistry* registry, const std::string& name) { - if (registry->get(name) == nullptr) { - registry->put(name, std::make_unique()); - } -} - -} // namespace - -Status install_builtin_connectors(ConnectorRegistry* registry) { - DCHECK(registry != nullptr); - install_if_absent(registry, Connector::FILE); - return Status::OK(); -} - -} // namespace starrocks::connector diff --git a/be/src/exec/CMakeLists.txt b/be/src/exec/CMakeLists.txt index 2f306226867edc..8cf8024eae1a1b 100644 --- a/be/src/exec/CMakeLists.txt +++ b/be/src/exec/CMakeLists.txt @@ -489,4 +489,4 @@ ADD_BE_LIB(Exec ) target_link_libraries(Exec PUBLIC ExecRuntime ExecPrimitive ExecSchemaScannerCore ExecSchemaScanners ExecJoinCore Runtime ComputeEnv Cache) -target_link_libraries(Exec PRIVATE Formats Platform Connector ConnectorLake ConnectorFile ConnectorHive ConnectorIceberg ConnectorBuiltinRegistry) +target_link_libraries(Exec PRIVATE Formats Platform Connector ConnectorLake ConnectorFile ConnectorHive ConnectorIceberg) diff --git a/be/src/exec/exec_env.cpp b/be/src/exec/exec_env.cpp index 390723a19a5db1..4dcc4e0e24fa65 100644 --- a/be/src/exec/exec_env.cpp +++ b/be/src/exec/exec_env.cpp @@ -49,9 +49,7 @@ #include "compute_env/pipeline/driver_limiter.h" #include "compute_env/workgroup/scan_executor.h" #include "compute_env/workgroup/work_group_manager.h" -#include "connector/builtin_connector_registry.h" #include "connector/common/connector_sink_executor.h" -#include "connector/connector_registry.h" #include "exec/batch_write/batch_write_mgr.h" #include "exec/lookup_stream_mgr.h" #include "exec/pipeline/query_context.h" @@ -193,7 +191,6 @@ Status ExecEnv::init(ProcessMetricsRegistry* process_metrics_registry, RuntimeEn if (_compute_env == nullptr) { return Status::InternalError("ComputeEnv is not attached"); } - RETURN_IF_ERROR(connector::install_builtin_connectors(connector::ConnectorRegistry::default_instance())); _process_metrics_registry = process_metrics_registry; auto* process_metrics = process_metrics_registry->root_registry(); _table_metrics_mgr = process_metrics_registry->table_metrics_mgr(); diff --git a/be/src/module/CMakeLists.txt b/be/src/module/CMakeLists.txt index 779c53354e1f87..45d35528b99b2b 100644 --- a/be/src/module/CMakeLists.txt +++ b/be/src/module/CMakeLists.txt @@ -28,6 +28,7 @@ target_link_libraries(ModuleBootstrap PRIVATE HdfsFileSystem ComputeEnv Connector + ConnectorFile ConnectorHive ConnectorIceberg ConnectorLake diff --git a/be/src/module/connector_bootstrap.cpp b/be/src/module/connector_bootstrap.cpp index 689fd5a8f12b23..edb40519696015 100644 --- a/be/src/module/connector_bootstrap.cpp +++ b/be/src/module/connector_bootstrap.cpp @@ -19,6 +19,7 @@ #include "connector/cache_stats/cache_stats_connector.h" #include "connector/connector_registry.h" +#include "connector/file/file_connector.h" #include "connector/hive/hive_connector.h" #include "connector/lake/lake_connector.h" #include "connector_primitive/connector.h" @@ -61,6 +62,7 @@ Status bootstrap_builtin_connectors() { auto* registry = ConnectorRegistry::default_instance(); DCHECK(registry != nullptr); install_if_absent(registry, Connector::HIVE); + install_if_absent(registry, Connector::FILE); install_if_absent(registry, Connector::LAKE); install_if_absent(registry, Connector::CACHE_STATS); #ifndef __APPLE__ diff --git a/be/test/module/module_bootstrap_test.cpp b/be/test/module/module_bootstrap_test.cpp index d95129091b37da..2fceb279e90341 100644 --- a/be/test/module/module_bootstrap_test.cpp +++ b/be/test/module/module_bootstrap_test.cpp @@ -19,7 +19,7 @@ namespace starrocks::connector { -TEST(ModuleBootstrapTest, BootstrapBuiltinConnectorsInstallsSplitConnectorsIdempotently) { +TEST(ModuleBootstrapTest, BootstrapBuiltinConnectorsInstallsConnectorsIdempotently) { auto* registry = ConnectorRegistry::default_instance(); ASSERT_NE(nullptr, registry); @@ -31,6 +31,9 @@ TEST(ModuleBootstrapTest, BootstrapBuiltinConnectorsInstallsSplitConnectorsIdemp const auto* hive = registry->get(Connector::HIVE); ASSERT_NE(nullptr, hive); EXPECT_EQ(ConnectorType::HIVE, hive->connector_type()); + const auto* file = registry->get(Connector::FILE); + ASSERT_NE(nullptr, file); + EXPECT_EQ(ConnectorType::FILE, file->connector_type()); const auto* lake = registry->get(Connector::LAKE); ASSERT_NE(nullptr, lake); EXPECT_EQ(ConnectorType::LAKE, lake->connector_type()); @@ -44,6 +47,7 @@ TEST(ModuleBootstrapTest, BootstrapBuiltinConnectorsInstallsSplitConnectorsIdemp ASSERT_TRUE(status.ok()) << status; EXPECT_EQ(cache_stats, registry->get(Connector::CACHE_STATS)); EXPECT_EQ(hive, registry->get(Connector::HIVE)); + EXPECT_EQ(file, registry->get(Connector::FILE)); EXPECT_EQ(lake, registry->get(Connector::LAKE)); #ifndef __APPLE__ EXPECT_EQ(iceberg, registry->get(Connector::ICEBERG)); From eb0cb7a97a8bac4cd6c144fbbe6361654766891a Mon Sep 17 00:00:00 2001 From: alvin-phoenix-ai Date: Sun, 12 Jul 2026 20:01:17 +0800 Subject: [PATCH 2/3] Fix Test Signed-off-by: alvin-phoenix-ai --- be/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index b0d24d2dd08e78..739fca996c155b 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -884,6 +884,14 @@ set (TEST_LINK_LIBS ${STARROCKS_LINK_LIBS} TestUtil ${WL_START_GROUP} + # Broad test object libraries directly exercise concrete connector implementations. + # Keep these as explicit test dependencies: PRIVATE dependencies of shared BE modules + # are intentionally not propagated when ENABLE_MULTI_DYNAMIC_LIBS is enabled. + Connector + ConnectorLake + ConnectorFile + ConnectorHive + ConnectorIceberg gmock gtest ${WL_END_GROUP} From f45caf22cd4f6b3d8316218704bc02d0799c0f38 Mon Sep 17 00:00:00 2001 From: alvin-phoenix-ai Date: Sun, 12 Jul 2026 20:41:08 +0800 Subject: [PATCH 3/3] Fix Test Signed-off-by: alvin-phoenix-ai --- be/CMakeLists.txt | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index 739fca996c155b..2d26104e9e9e3c 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -876,6 +876,17 @@ if (WITH_GCOV) set(STARROCKS_LINK_LIBS ${STARROCKS_LINK_LIBS} --coverage) endif() +# Broad test and benchmark executables directly exercise concrete connector implementations. +# Keep these explicit: PRIVATE dependencies of shared BE modules are intentionally not propagated +# when ENABLE_MULTI_DYNAMIC_LIBS is enabled. +set (DIRECT_CONNECTOR_LINK_LIBS + Connector + ConnectorLake + ConnectorFile + ConnectorHive + ConnectorIceberg +) + # Set libraries for test. TestUtil is UT-only and intentionally stays out of # STARROCKS_LINK_LIBS so normal BE, format-lib, and benchmark builds do not # compile or link test helper code. @@ -884,20 +895,18 @@ set (TEST_LINK_LIBS ${STARROCKS_LINK_LIBS} TestUtil ${WL_START_GROUP} - # Broad test object libraries directly exercise concrete connector implementations. - # Keep these as explicit test dependencies: PRIVATE dependencies of shared BE modules - # are intentionally not propagated when ENABLE_MULTI_DYNAMIC_LIBS is enabled. - Connector - ConnectorLake - ConnectorFile - ConnectorHive - ConnectorIceberg + ${DIRECT_CONNECTOR_LINK_LIBS} gmock gtest ${WL_END_GROUP} ) -set (BENCH_LINK_LIBS ${STARROCKS_LINK_LIBS}) +set (BENCH_LINK_LIBS + ${STARROCKS_LINK_LIBS} + ${WL_START_GROUP} + ${DIRECT_CONNECTOR_LINK_LIBS} + ${WL_END_GROUP} +) # Only build static libs set(BUILD_SHARED_LIBS OFF)