Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9cefdd4
[opt](build) Add --compile-bench mode for BE compile speed analysis
morningman Aug 3, 2026
ba7307d
[opt](build) Add include-edge analysis tools for compile-bench
morningman Aug 3, 2026
9feb756
[opt](build) Prepare WorkloadGroup isolation: fwd header, seeds, inli…
morningman Aug 3, 2026
124fa68
[opt](build) Cut workload_group.h and schema scanner out of hot headers
morningman Aug 3, 2026
f14f1ba
[opt](build) Prepare ExecEnv slimming: fwd decls, setter sinks, seeds
morningman Aug 3, 2026
0134170
[opt](build) Cut file cache, frontend info and cluster info out of ex…
morningman Aug 3, 2026
7b1ed40
[opt](build) Prepare ExecEnv slimming: ThreadPool/StorePath fwd, seeds
morningman Aug 3, 2026
f968cec
[opt](build) Cut olap_file.pb.h, threadpool.h and options.h out of ex…
morningman Aug 3, 2026
91d55fa
[opt](build) Prepare RuntimeState/ThreadContext slimming: fwd decls, …
morningman Aug 3, 2026
50a2c72
[opt](build) Cut s3_file_system, resource_context and data.pb out of …
morningman Aug 3, 2026
7097715
[fix](build) Add missing <condition_variable>/<mutex> includes
morningman Aug 4, 2026
12ca7ad
[fix](build) Add missing s3_file_system/s3_util includes in cloud tests
morningman Aug 4, 2026
5724ada
[fix](build) Add missing std headers in tests for libstdc++
morningman Aug 4, 2026
9f75770
[fix](build) Add missing includes in tests exposed by header slimming
morningman Aug 4, 2026
b74fb2b
[fix](build) Add file_reader/file_writer includes where aliases need …
morningman Aug 4, 2026
0a977fe
Merge apache master into wt-compile-be
morningman Aug 4, 2026
cb9cd81
[fix](build) Guard --exclude-libs from Apple ld on macOS
morningman Aug 4, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ fe/fe-core/src/main/java/org/apache/parquet
be/build*/
be/cmake-build*/
be/ut_build*/
be/compile-bench-results/
be/src/gen_cpp/*.[cc, cpp, h]
be/src/gen_cpp/opcode
be/tags
Expand Down
1 change: 1 addition & 0 deletions be/src/agent/agent_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "common/config.h"
#include "common/logging.h"
#include "common/status.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "storage/olap_define.h"
#include "storage/options.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/agent/task_worker_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#include "io/fs/path.h"
#include "io/fs/remote_file_system.h"
#include "io/fs/s3_file_system.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "runtime/fragment_mgr.h"
#include "runtime/index_policy/index_policy_mgr.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/cloud/cloud_compaction_stop_token.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "cloud/cloud_meta_mgr.h"
#include "cloud/config.h"
#include "common/logging.h"
#include "service/backend_options.h"

namespace doris {

Expand Down
1 change: 1 addition & 0 deletions be/src/cloud/cloud_index_change_compaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "cloud/config.h"
#include "common/status.h"
#include "cpp/sync_point.h"
#include "service/backend_options.h"

namespace doris {

Expand Down
2 changes: 2 additions & 0 deletions be/src/cloud/cloud_meta_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
#include "cpp/sync_point.h"
#include "io/fs/obj_storage_client.h"
#include "load/stream_load/stream_load_context.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "service/backend_options.h"
#include "storage/olap_common.h"
#include "storage/rowset/rowset.h"
#include "storage/rowset/rowset_factory.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/cloud/cloud_storage_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
#include "load/memtable/memtable_flush_executor.h"
#include "runtime/exec_env.h"
#include "runtime/memory/cache_manager.h"
#include "service/backend_options.h"
#include "storage/compaction/cumulative_compaction_policy.h"
#include "storage/compaction/cumulative_compaction_time_series_policy.h"
#include "storage/compaction_task_tracker.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/cloud/cloud_warm_up_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "common/logging.h"
#include "cpp/sync_point.h"
#include "io/cache/block_file_cache_downloader.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "service/backend_options.h"
#include "storage/index/inverted/inverted_index_desc.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/common/signal_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

#pragma once

#include <butil/macros.h> // ARRAYSIZE_UNSAFE
#include <glog/logging.h>

#include <boost/stacktrace.hpp>
Expand Down
1 change: 1 addition & 0 deletions be/src/core/block/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "core/block/block.h"

#include <concurrentqueue.h>
#include <fmt/format.h>
#include <gen_cpp/data.pb.h>
#include <glog/logging.h>
Expand Down
7 changes: 7 additions & 0 deletions be/src/core/data_type/data_type_timestamptz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@

#include "core/data_type/data_type_timestamptz.h"

#include <gen_cpp/data.pb.h>

#include "exprs/function/cast/cast_to_timestamptz.h"

namespace doris {
void DataTypeTimeStampTz::to_pb_column_meta(PColumnMeta* col_meta) const {
DataTypeNumberBase<PrimitiveType::TYPE_TIMESTAMPTZ>::to_pb_column_meta(col_meta);
col_meta->mutable_decimal_param()->set_scale(_scale);
}

Field DataTypeTimeStampTz::get_field(const TExprNode& node) const {
TimestampTzValue res;
CastParameters params {.status = Status::OK(), .is_strict = true};
Expand Down
5 changes: 1 addition & 4 deletions be/src/core/data_type/data_type_timestamptz.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ class DataTypeTimeStampTz final : public DataTypeNumberBase<PrimitiveType::TYPE_
scalar_type->set_scale(_scale);
}

void to_pb_column_meta(PColumnMeta* col_meta) const override {
DataTypeNumberBase<PrimitiveType::TYPE_TIMESTAMPTZ>::to_pb_column_meta(col_meta);
col_meta->mutable_decimal_param()->set_scale(_scale);
}
void to_pb_column_meta(PColumnMeta* col_meta) const override;

UInt32 get_scale() const override { return _scale; }

Expand Down
2 changes: 1 addition & 1 deletion be/src/exec/exchange/vdata_stream_recvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
#include "runtime/runtime_profile.h"
#include "runtime/task_execution_context.h"
#include "runtime/thread_context.h"
#include "runtime/workload_group/workload_group.h"
#include "util/stopwatch.hpp"

namespace doris {
class MemTracker;
class PBlock;
class PTransmitDataParams;
class MemTrackerLimiter;
class RuntimeState;

Expand Down
1 change: 1 addition & 0 deletions be/src/exec/operator/materialization_opertor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "exec/operator/operator.h"
#include "exec/rowid_fetcher.h"
#include "exec/scan/file_scanner.h"
#include "runtime/workload_group/workload_group.h"
#include "util/brpc_client_cache.h"
#include "util/brpc_closure.h"
#include "util/pretty_printer.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/exec/pipeline/dependency.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <sqltypes.h>

#include <atomic>
#include <condition_variable>
#include <functional>
#include <memory>
#include <mutex>
Expand Down
1 change: 1 addition & 0 deletions be/src/exec/pipeline/pipeline_fragment_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
#include "exec/spill/spill_file.h"
#include "io/fs/stream_load_pipe.h"
#include "load/stream_load/new_load_stream_mgr.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "runtime/fragment_mgr.h"
#include "runtime/result_buffer_mgr.h"
Expand Down
1 change: 0 additions & 1 deletion be/src/exec/pipeline/task_scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "exec/pipeline/pipeline_task.h"
#include "exec/pipeline/task_queue.h"
#include "runtime/query_context.h"
#include "runtime/workload_group/workload_group.h"
#include "util/thread.h"
#include "util/uid_util.h"

Expand Down
2 changes: 2 additions & 0 deletions be/src/exec/rowid_fetcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#include <gen_cpp/DataSinks_types.h>
#include <gen_cpp/internal_service.pb.h>

#include <condition_variable>
#include <memory>
#include <mutex>
#include <semaphore>
#include <utility>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions be/src/exec/scan/file_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
#include "runtime/descriptors.h"
#include "runtime/runtime_profile.h"
#include "runtime/runtime_state.h"
#include "service/backend_options.h"

namespace cctz {
class time_zone;
Expand Down
1 change: 1 addition & 0 deletions be/src/exec/scan/meta_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "core/data_type/define_primitive_type.h"
#include "core/types.h"
#include "format/table/parquet_metadata_reader.h"
#include "runtime/cluster_info.h"
#include "runtime/descriptors.h"
#include "runtime/exec_env.h"
#include "runtime/runtime_state.h"
Expand Down
14 changes: 14 additions & 0 deletions be/src/exec/scan/scanner_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#include "runtime/exec_env.h"
#include "runtime/runtime_profile.h"
#include "runtime/runtime_state.h"
#include "runtime/thread_context.h"
#include "runtime/workload_management/resource_context.h"
#include "storage/tablet/tablet.h"
#include "util/time.h"
#include "util/uid_util.h"
Expand All @@ -53,6 +55,18 @@ namespace doris {

using namespace std::chrono_literals;

// ==================== ScanTask ====================
ScanTask::ScanTask(std::weak_ptr<ScannerDelegate> delegate_scanner) : scanner(delegate_scanner) {
_resource_ctx = thread_context()->resource_ctx();
DorisMetrics::instance()->scanner_task_cnt->increment(1);
}

ScanTask::~ScanTask() {
SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(_resource_ctx->memory_context()->mem_tracker());
DorisMetrics::instance()->scanner_task_cnt->increment(-1);
cached_block.reset();
}

// ==================== ScannerContext ====================
ScannerContext::ScannerContext(RuntimeState* state, ScanLocalStateBase* local_state,
const TupleDescriptor* output_tuple_desc,
Expand Down
12 changes: 3 additions & 9 deletions be/src/exec/scan/scanner_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

namespace doris {

class ResourceContext;
class RuntimeState;
class TupleDescriptor;
class WorkloadGroup;
Expand Down Expand Up @@ -96,16 +97,9 @@ class ScanTask {
COMPLETED, // finished with result or error, waiting to be collected by scan node
EOS, // finished and no more data, waiting to be collected by scan node
};
ScanTask(std::weak_ptr<ScannerDelegate> delegate_scanner) : scanner(delegate_scanner) {
_resource_ctx = thread_context()->resource_ctx();
DorisMetrics::instance()->scanner_task_cnt->increment(1);
}
ScanTask(std::weak_ptr<ScannerDelegate> delegate_scanner);

~ScanTask() {
SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(_resource_ctx->memory_context()->mem_tracker());
DorisMetrics::instance()->scanner_task_cnt->increment(-1);
cached_block.reset();
}
~ScanTask();

private:
// whether current scanner is finished
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <atomic>
#include <chrono>
#include <condition_variable>
#include <future>
#include <memory>
#include <mutex>
Expand Down
1 change: 1 addition & 0 deletions be/src/exec/sink/autoinc_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "common/logging.h"
#include "common/status.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "runtime/runtime_profile.h"
#include "util/client_cache.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/exec/sink/vrow_distribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "core/column/column_vector.h"
#include "core/data_type/data_type.h"
#include "exec/sink/writer/vtablet_writer.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "runtime/query_context.h"
#include "runtime/runtime_state.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/exec/sink/writer/async_result_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "runtime/exec_env.h"
#include "runtime/fragment_mgr.h"
#include "runtime/runtime_state.h"
#include "runtime/workload_group/workload_group.h"

namespace doris {
class ObjectPool;
Expand Down
1 change: 1 addition & 0 deletions be/src/exec/sink/writer/maxcompute/vmc_table_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "exprs/vexpr.h"
#include "exprs/vexpr_context.h"
#include "format/transformer/vjni_format_transformer.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "runtime/runtime_state.h"
#include "util/uid_util.h"
Expand Down
2 changes: 2 additions & 0 deletions be/src/exec/sink/writer/vtablet_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@
#include "exec/sink/vtablet_finder.h"
#include "exprs/vexpr.h"
#include "exprs/vexpr_fwd.h"
#include "load/memtable/memtable_memory_limiter.h"
#include "runtime/descriptors.h"
#include "runtime/exec_env.h"
#include "runtime/memory/memory_reclamation.h"
#include "runtime/query_context.h"
#include "runtime/runtime_profile.h"
#include "runtime/runtime_state.h"
#include "runtime/thread_context.h"
#include "runtime/workload_group/workload_group.h"
#include "service/backend_options.h"
#include "storage/binlog.h"
#include "storage/tablet_info.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/exec/sink/writer/vtablet_writer_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#include "exec/sink/load_stream_stub.h" // IWYU pragma: keep
#include "exec/sink/vtablet_block_convertor.h"
#include "exec/sink/vtablet_finder.h"
#include "load/memtable/memtable_memory_limiter.h"

namespace doris {

Expand Down
1 change: 1 addition & 0 deletions be/src/exec/sink/writer/vwal_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <sstream>

#include "io/fs/encrypted_fs_factory.h"
#include "io/fs/local_file_system.h"
#include "util/debug_points.h"

namespace doris {
Expand Down
1 change: 1 addition & 0 deletions be/src/exprs/aggregate/aggregate_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ namespace doris {
class Arena;
class IColumn;
class IDataType;
class QueryContext;

struct AggregateFunctionAttr {
bool is_window_function {false};
Expand Down
2 changes: 2 additions & 0 deletions be/src/exprs/function/function_java_udf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <bthread/bthread.h>

#include <future>
#include <memory>
#include <string>

Expand All @@ -29,6 +30,7 @@
#include "runtime/exec_env.h"
#include "runtime/user_function_cache.h"
#include "util/jni-util.h"
#include "util/threadpool.h"

const char* EXECUTOR_CLASS = "org/apache/doris/udf/UdfExecutor";
const char* EXECUTOR_CTOR_SIGNATURE = "([B)V";
Expand Down
1 change: 1 addition & 0 deletions be/src/exprs/vectorized_agg_fn.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <vector>

#include "common/be_mock_util.h"
#include "common/factory_creator.h"
#include "common/status.h"
#include "core/data_type/data_type.h"
#include "exec/sort/sort_description.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/format/parquet/parquet_predicate.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "format/parquet/parquet_column_convert.h"
#include "format/parquet/parquet_common.h"
#include "format/parquet/schema_desc.h"
#include "io/fs/file_reader.h"
#include "storage/olap_scan_common.h"
#include "storage/segment/row_ranges.h"
#include "util/timezone_utils.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/format/table/paimon_jni_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "runtime/descriptors.h"
#include "runtime/exec_env.h"
#include "runtime/runtime_state.h"
#include "storage/options.h"
#include "util/string_util.h"
#include "util/uid_util.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "core/block/block.h"
#include "core/data_type/data_type_factory.hpp"
#include "core/string_ref.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "runtime/runtime_state.h"
#include "util/client_cache.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "core/data_type/data_type_factory.hpp"
#include "core/string_ref.h"
#include "information_schema/schema_helper.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "runtime/runtime_state.h"
#include "util/client_cache.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "core/block/block.h"
#include "core/data_type/define_primitive_type.h"
#include "core/string_ref.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "runtime/runtime_state.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "core/block/block.h"
#include "core/data_type/define_primitive_type.h"
#include "core/string_ref.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "runtime/runtime_state.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "core/data_type/data_type_factory.hpp"
#include "core/string_ref.h"
#include "information_schema/schema_helper.h"
#include "runtime/cluster_info.h"
#include "runtime/exec_env.h"
#include "runtime/runtime_state.h"
#include "util/client_cache.h"
Expand Down
Loading
Loading