Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions be/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ Reusable exec join hash table algorithms without join nodes, pipeline, storage,
### Orchestration (`orchestration`)
Orchestration layer below Service for query, fragment, and ingestion lifecycle entrypoints over concrete runtime and execution modules.
- Targets: `Orchestration`
- Allowed internal include prefixes: `orchestration/`, `data_workflows/`, `connector_primitive/`, `column/`, `exec/`, `exec_primitive/`, `runtime/`, `compute_env/`, `platform/`, `common/`, `base/`, `gutil/`, `gen_cpp/`, `types/`
- Allowed target deps: `DataWorkflows`, `Runtime`, `Exec`, `ExecRuntime`, `ExecPrimitive`, `ComputeEnv`, `ConnectorPrimitive`, `Platform`, `ColumnCore`, `Runtime`, `Common`, `Base`, `Gutil`, `StarRocksGen`, `Types`
- Allowed internal include prefixes: `orchestration/`, `data_workflows/`, `data_sink/result/`, `data_sink/exchange/`, `data_sink/tablet/`, `connector_primitive/`, `column/`, `exec/`, `exec_primitive/`, `runtime/`, `compute_env/`, `platform/`, `common/`, `base/`, `gutil/`, `gen_cpp/`, `types/`
- Allowed target deps: `DataWorkflows`, `DataSinkResult`, `DataSinkExchange`, `DataSinkTablet`, `Runtime`, `Exec`, `ExecRuntime`, `ExecPrimitive`, `ComputeEnv`, `ConnectorPrimitive`, `Platform`, `ColumnCore`, `Runtime`, `Common`, `Base`, `Gutil`, `StarRocksGen`, `Types`
- Core tests: `orchestration_test`
- Remediation: Keep Orchestration below Service; move transport-specific RPC handling to Service and lower reusable execution/runtime or ingestion primitives to their owning modules.

Expand Down
120 changes: 119 additions & 1 deletion be/module_boundary_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,121 @@
"allowed_test_link_deps": ["DataSinkFile", "FormatCore", "FormatCsv", "FormatParquet", "Expr", "Runtime", "FileSystem", "ChunkCore", "ColumnCore", "Types", "Common", "Base", "Gutil", "StarRocksGen"],
"remediation": "Keep file serialization builders independent of full Exec and concrete Storage; place sink lifecycle and orchestration in higher data-sink modules instead of expanding this leaf target."
},
{
"id": "datasinkresult",
"doc_label": "DataSinkResult",
"summary": "Query-result and memory-scratch sinks plus their protocol and file writers over explicit compute-result, execution-contract, format, filesystem, expression, and runtime dependencies without full Exec or concrete Storage coupling.",
"agents_path": "be/src/data_sink/AGENTS.md",
"owned_targets": ["DataSinkResult"],
"owned_roots": ["be/src/data_sink/result"],
"allowed_include_prefixes": [
"data_sink/result/",
"data_sink/file/",
"compute_env/result/",
"exec_primitive/",
"formats/",
"exprs/",
"runtime/",
"platform/",
"fs/",
"column/",
"types/",
"common/",
"base/",
"gutil/",
"gen_cpp/"
],
"forbidden_include_prefixes": ["exec/", "storage/", "service/", "connector/", "agent/", "http/", "cache/", "data_workflows/", "orchestration/"],
"forbidden_includes": ["exec/exec_env.h"],
"allowed_target_deps": ["DataSinkFile", "ComputeEnv", "ExecPrimitive", "FormatCore", "FormatCsv", "FormatParquet", "Expr", "Runtime", "Platform", "FileSystem", "ChunkCore", "ColumnCore", "Types", "Common", "Base", "Gutil", "StarRocksGen"],
"allowed_test_targets": ["data_sink_result_test"],
"allowed_test_link_deps": ["DataSinkResult", "ServiceBE", "Service", "SchemaScannerBuiltin"],
"remediation": "Keep result serialization and delivery in DataSinkResult over compute-result and lower contracts; keep concrete storage, full Exec composition, and service/bootstrap behavior outside this module."
},
{
"id": "datasinkexchange",
"doc_label": "DataSinkExchange",
"summary": "Inter-backend exchange sink implementations over compute data-stream services, execution contracts, expressions, runtime serialization, and RPC primitives without full Exec, Storage, or service coupling.",
"agents_path": "be/src/data_sink/AGENTS.md",
"owned_targets": ["DataSinkExchange"],
"owned_roots": ["be/src/data_sink/exchange"],
"allowed_include_prefixes": [
"data_sink/exchange/",
"compute_env/data_stream/",
"exec_primitive/",
"exprs/",
"runtime/",
"column/",
"types/",
"common/",
"base/",
"gutil/",
"gen_cpp/"
],
"forbidden_include_prefixes": ["exec/", "storage/", "service/", "connector/", "agent/", "http/", "cache/", "data_workflows/", "orchestration/"],
"forbidden_includes": ["exec/exec_env.h"],
"allowed_target_deps": ["ComputeEnv", "ExecPrimitive", "Expr", "Runtime", "ChunkCore", "ColumnCore", "Types", "Common", "Base", "Gutil", "StarRocksGen"],
"remediation": "Keep exchange sending in DataSinkExchange over compute data-stream and lower contracts; keep pipeline composition, storage, and service/bootstrap behavior outside this module."
},
{
"id": "datasinkexternal",
"doc_label": "DataSinkExternal",
"summary": "Export, MySQL, schema, blackhole, and no-op sinks over reusable file builders, formats, filesystem, execution contracts, and runtime helpers without full Exec or concrete Storage coupling.",
"agents_path": "be/src/data_sink/AGENTS.md",
"owned_targets": ["DataSinkExternal"],
"owned_roots": ["be/src/data_sink/external"],
"allowed_include_prefixes": [
"data_sink/external/",
"data_sink/file/",
"storage_primitive/",
"exec_primitive/",
"formats/",
"exprs/",
"runtime/",
"platform/",
"fs/",
"column/",
"types/",
"common/",
"base/",
"gutil/",
"gen_cpp/"
],
"forbidden_include_prefixes": ["exec/", "storage/", "service/", "connector/", "agent/", "http/", "cache/", "compute_env/", "data_workflows/", "orchestration/"],
"forbidden_includes": ["exec/exec_env.h"],
"allowed_target_deps": ["DataSinkFile", "StoragePrimitive", "ExecPrimitive", "FormatCore", "FormatCsv", "Expr", "Runtime", "Platform", "FileSystem", "ChunkCore", "ColumnCore", "Types", "Common", "Base", "Gutil", "StarRocksGen"],
"remediation": "Keep non-tablet external and administrative sinks in DataSinkExternal over file, format, filesystem, and lower contracts; keep concrete storage, full Exec composition, and service/bootstrap behavior outside this module."
},
{
"id": "datasinktablet",
"doc_label": "DataSinkTablet",
"summary": "OLAP tablet routing, validation, channel management, and RPC sending over explicit Storage, ComputeEnv, execution-contract, expression, and runtime dependencies without full Exec or service coupling.",
"agents_path": "be/src/data_sink/AGENTS.md",
"owned_targets": ["DataSinkTablet"],
"owned_roots": ["be/src/data_sink/tablet"],
"allowed_include_prefixes": [
"data_sink/tablet/",
"storage/",
"storage_primitive/",
"compute_env/",
"exec_primitive/",
"exprs/",
"runtime/",
"platform/",
"column/",
"types/",
"common/",
"base/",
"gutil/",
"gen_cpp/"
],
"forbidden_include_prefixes": ["exec/", "service/", "connector/", "agent/", "http/", "data_workflows/", "orchestration/"],
"forbidden_includes": ["exec/exec_env.h"],
"allowed_target_deps": ["Storage", "StoragePrimitive", "ComputeEnv", "ExecPrimitive", "Expr", "Runtime", "Platform", "ChunkCore", "ColumnCore", "Types", "Common", "Base", "Gutil", "StarRocksGen"],
"allowed_test_targets": ["data_sink_tablet_test"],
"allowed_test_link_deps": ["DataSinkTablet", "ServiceBE", "Service", "SchemaScannerBuiltin"],
"remediation": "Keep tablet routing and write-channel behavior in DataSinkTablet over explicit Storage, ComputeEnv, and lower contracts; keep full Exec composition and service/bootstrap behavior outside this module."
},
{
"id": "storageprimitive",
"doc_label": "StoragePrimitive",
Expand Down Expand Up @@ -1262,6 +1377,9 @@
"allowed_include_prefixes": [
"orchestration/",
"data_workflows/",
"data_sink/result/",
"data_sink/exchange/",
"data_sink/tablet/",
"connector_primitive/",
"column/",
"exec/",
Expand All @@ -1276,7 +1394,7 @@
"types/"
],
"forbidden_include_prefixes": ["service/", "http/", "agent/"],
"allowed_target_deps": ["DataWorkflows", "Runtime", "Exec", "ExecRuntime", "ExecPrimitive", "ComputeEnv", "ConnectorPrimitive", "Platform", "ColumnCore", "Runtime", "Common", "Base", "Gutil", "StarRocksGen", "Types"],
"allowed_target_deps": ["DataWorkflows", "DataSinkResult", "DataSinkExchange", "DataSinkTablet", "Runtime", "Exec", "ExecRuntime", "ExecPrimitive", "ComputeEnv", "ConnectorPrimitive", "Platform", "ColumnCore", "Runtime", "Common", "Base", "Gutil", "StarRocksGen", "Types"],
"allowed_test_targets": ["orchestration_test"],
"allowed_test_link_deps": ["Orchestration"],
"remediation": "Keep Orchestration below Service; move transport-specific RPC handling to Service and lower reusable execution/runtime or ingestion primitives to their owning modules."
Expand Down
30 changes: 30 additions & 0 deletions be/src/data_sink/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,34 @@ Reusable file sink builders for delimited text and Parquet output over explicit
- Allowed target deps: `FormatCore`, `FormatCsv`, `FormatParquet`, `Expr`, `FileSystem`, `ChunkCore`, `ColumnCore`, `Types`, `Common`, `Base`, `Gutil`, `StarRocksGen`
- Core tests: `data_sink_file_test`
- Remediation: Keep file serialization builders independent of full Exec and concrete Storage; place sink lifecycle and orchestration in higher data-sink modules instead of expanding this leaf target.

### DataSinkResult (`datasinkresult`)
Query-result and memory-scratch sinks plus their protocol and file writers over explicit compute-result, execution-contract, format, filesystem, expression, and runtime dependencies without full Exec or concrete Storage coupling.
- Targets: `DataSinkResult`
- Allowed internal include prefixes: `data_sink/result/`, `data_sink/file/`, `compute_env/result/`, `exec_primitive/`, `formats/`, `exprs/`, `runtime/`, `platform/`, `fs/`, `column/`, `types/`, `common/`, `base/`, `gutil/`, `gen_cpp/`
- Allowed target deps: `DataSinkFile`, `ComputeEnv`, `ExecPrimitive`, `FormatCore`, `FormatCsv`, `FormatParquet`, `Expr`, `Runtime`, `Platform`, `FileSystem`, `ChunkCore`, `ColumnCore`, `Types`, `Common`, `Base`, `Gutil`, `StarRocksGen`
- Core tests: `data_sink_result_test`
- Remediation: Keep result serialization and delivery in DataSinkResult over compute-result and lower contracts; keep concrete storage, full Exec composition, and service/bootstrap behavior outside this module.

### DataSinkExchange (`datasinkexchange`)
Inter-backend exchange sink implementations over compute data-stream services, execution contracts, expressions, runtime serialization, and RPC primitives without full Exec, Storage, or service coupling.
- Targets: `DataSinkExchange`
- Allowed internal include prefixes: `data_sink/exchange/`, `compute_env/data_stream/`, `exec_primitive/`, `exprs/`, `runtime/`, `column/`, `types/`, `common/`, `base/`, `gutil/`, `gen_cpp/`
- Allowed target deps: `ComputeEnv`, `ExecPrimitive`, `Expr`, `Runtime`, `ChunkCore`, `ColumnCore`, `Types`, `Common`, `Base`, `Gutil`, `StarRocksGen`
- Remediation: Keep exchange sending in DataSinkExchange over compute data-stream and lower contracts; keep pipeline composition, storage, and service/bootstrap behavior outside this module.

### DataSinkExternal (`datasinkexternal`)
Export, MySQL, schema, blackhole, and no-op sinks over reusable file builders, formats, filesystem, execution contracts, and runtime helpers without full Exec or concrete Storage coupling.
- Targets: `DataSinkExternal`
- Allowed internal include prefixes: `data_sink/external/`, `data_sink/file/`, `storage_primitive/`, `exec_primitive/`, `formats/`, `exprs/`, `runtime/`, `platform/`, `fs/`, `column/`, `types/`, `common/`, `base/`, `gutil/`, `gen_cpp/`
- Allowed target deps: `DataSinkFile`, `StoragePrimitive`, `ExecPrimitive`, `FormatCore`, `FormatCsv`, `Expr`, `Runtime`, `Platform`, `FileSystem`, `ChunkCore`, `ColumnCore`, `Types`, `Common`, `Base`, `Gutil`, `StarRocksGen`
- Remediation: Keep non-tablet external and administrative sinks in DataSinkExternal over file, format, filesystem, and lower contracts; keep concrete storage, full Exec composition, and service/bootstrap behavior outside this module.

### DataSinkTablet (`datasinktablet`)
OLAP tablet routing, validation, channel management, and RPC sending over explicit Storage, ComputeEnv, execution-contract, expression, and runtime dependencies without full Exec or service coupling.
- Targets: `DataSinkTablet`
- Allowed internal include prefixes: `data_sink/tablet/`, `storage/`, `storage_primitive/`, `compute_env/`, `exec_primitive/`, `exprs/`, `runtime/`, `platform/`, `column/`, `types/`, `common/`, `base/`, `gutil/`, `gen_cpp/`
- Allowed target deps: `Storage`, `StoragePrimitive`, `ComputeEnv`, `ExecPrimitive`, `Expr`, `Runtime`, `Platform`, `ChunkCore`, `ColumnCore`, `Types`, `Common`, `Base`, `Gutil`, `StarRocksGen`
- Core tests: `data_sink_tablet_test`
- Remediation: Keep tablet routing and write-channel behavior in DataSinkTablet over explicit Storage, ComputeEnv, and lower contracts; keep full Exec composition and service/bootstrap behavior outside this module.
<!-- END GENERATED: BE MODULE HARNESSES -->
119 changes: 119 additions & 0 deletions be/src/data_sink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,122 @@ target_link_libraries(DataSinkFile PRIVATE
Expr
Gutil
)

ADD_BE_LIB(DataSinkResult
result/arrow_result_writer.cpp
result/buffer_control_result_writer.cpp
result/customized_result_writer.cpp
result/file_result_writer.cpp
result/http_result_writer.cpp
result/memory_scratch_sink.cpp
result/metadata_result_writer.cpp
result/mysql_result_writer.cpp
result/result_sink.cpp
result/statistic_result_writer.cpp
result/variable_result_writer.cpp
)

target_link_libraries(DataSinkResult PUBLIC
ComputeEnv
ExecPrimitive
FormatParquet
Runtime
FileSystem
ChunkCore
ColumnCore
Types
Common
Base
StarRocksGen
)

target_link_libraries(DataSinkResult PRIVATE
DataSinkFile
FormatCore
FormatCsv
Expr
Platform
Gutil
)

ADD_BE_LIB(DataSinkExchange
exchange/data_stream_sender.cpp
exchange/multi_cast_data_stream_sink.cpp
)

target_link_libraries(DataSinkExchange PUBLIC
ExecPrimitive
Runtime
ChunkCore
ColumnCore
Types
Common
Base
StarRocksGen
)

target_link_libraries(DataSinkExchange PRIVATE
ComputeEnv
Expr
Gutil
)

ADD_BE_LIB(DataSinkExternal
external/blackhole_table_sink.cpp
external/export_sink.cpp
external/mysql_table_sink.cpp
external/mysql_table_writer.cpp
external/schema_table_sink.cpp
)

target_link_libraries(DataSinkExternal PUBLIC
ExecPrimitive
FormatCore
FormatCsv
Runtime
FileSystem
ChunkCore
ColumnCore
Types
Common
Base
StarRocksGen
)

target_link_libraries(DataSinkExternal PRIVATE
DataSinkFile
StoragePrimitive
Expr
Platform
Gutil
)

ADD_BE_LIB(DataSinkTablet
tablet/multi_olap_table_sink.cpp
tablet/range_router.cpp
tablet/range_tablet_sink_sender.cpp
tablet/tablet_sink.cpp
tablet/tablet_sink_colocate_sender.cpp
tablet/tablet_sink_index_channel.cpp
tablet/tablet_sink_sender.cpp
)

target_link_libraries(DataSinkTablet PUBLIC
StoragePrimitive
ExecPrimitive
Runtime
ChunkCore
ColumnCore
Types
Common
Base
StarRocksGen
)

target_link_libraries(DataSinkTablet PRIVATE
Storage
ComputeEnv
Expr
Platform
Gutil
)
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// specific language governing permissions and limitations
// under the License.

#include "exec/data_sinks/data_stream_sender.h"
#include "data_sink/exchange/data_stream_sender.h"

#include <arpa/inet.h>
#include <fmt/format.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "exec/data_sinks/multi_cast_data_stream_sink.h"
#include "data_sink/exchange/multi_cast_data_stream_sink.h"

#include "exprs/expr_factory.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#pragma once

#include "exec/data_sinks/data_stream_sender.h"
#include "data_sink/exchange/data_stream_sender.h"
#include "runtime/runtime_state.h"

namespace starrocks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "exec/data_sinks/blackhole_table_sink.h"
#include "data_sink/external/blackhole_table_sink.h"

#include "runtime/runtime_state.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// specific language governing permissions and limitations
// under the License.

#include "exec/data_sinks/export_sink.h"
#include "data_sink/external/export_sink.h"

#include <memory>
#include <sstream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// specific language governing permissions and limitations
// under the License.

#include "exec/data_sinks/mysql_table_sink.h"
#include "data_sink/external/mysql_table_sink.h"

#include <memory>
#include <sstream>
Expand All @@ -43,7 +43,7 @@
#include "exprs/expr_factory.h"
#include "runtime/runtime_state.h"
#ifndef __APPLE__
#include "exec/data_sinks/mysql_table_writer.h"
#include "data_sink/external/mysql_table_writer.h"
#endif

namespace starrocks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <vector>

#include "common/status.h"
#include "exec/data_sinks/mysql_table_writer.h"
#include "data_sink/external/mysql_table_writer.h"
#include "exec_primitive/data_sink.h"

namespace starrocks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#define __StarRocksMysql MYSQL
#include <sstream>

#include "exec/data_sinks/mysql_table_writer.h"
#include "data_sink/external/mysql_table_writer.h"
#include "exprs/expr.h"
#include "exprs/expr_context.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "exec/data_sinks/schema_table_sink.h"
#include "data_sink/external/schema_table_sink.h"

#include <memory>
#include <sstream>
Expand Down
Loading
Loading