This is an automated email from the ASF dual-hosted git repository.
gabriellee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 5caff62521f [minor](refactor) Delete unused code (#41953)
5caff62521f is described below
commit 5caff62521f0299353a699e15ed5a0aaa13aeaca
Author: Gabriel <[email protected]>
AuthorDate: Wed Oct 16 20:01:33 2024 +0800
[minor](refactor) Delete unused code (#41953)
---
be/src/pipeline/exec/operator.h | 8 ++++++--
be/src/pipeline/pipeline_fragment_context.cpp | 2 --
be/src/runtime/runtime_state.cpp | 4 ----
be/src/runtime/runtime_state.h | 15 +--------------
.../aggregate_function_simple_factory.h | 4 ++--
be/src/vec/exprs/vectorized_agg_fn.cpp | 4 ++--
6 files changed, 11 insertions(+), 26 deletions(-)
diff --git a/be/src/pipeline/exec/operator.h b/be/src/pipeline/exec/operator.h
index 142949cc5d9..b5bd0fe4713 100644
--- a/be/src/pipeline/exec/operator.h
+++ b/be/src/pipeline/exec/operator.h
@@ -160,7 +160,9 @@ public:
RuntimeProfile::Counter* exec_time_counter() { return _exec_timer; }
RuntimeProfile::Counter* memory_used_counter() { return
_memory_used_counter; }
- RuntimeProfile::Counter* peak_memory_usage_counter() { return
_peak_memory_usage_counter; }
+ RuntimeProfile::HighWaterMarkCounter* peak_memory_usage_counter() {
+ return _peak_memory_usage_counter;
+ }
OperatorXBase* parent() { return _parent; }
RuntimeState* state() { return _state; }
vectorized::VExprContextSPtrs& conjuncts() { return _conjuncts; }
@@ -341,7 +343,9 @@ public:
RuntimeProfile::Counter* rows_input_counter() { return
_rows_input_counter; }
RuntimeProfile::Counter* exec_time_counter() { return _exec_timer; }
RuntimeProfile::Counter* memory_used_counter() { return
_memory_used_counter; }
- RuntimeProfile::Counter* peak_memory_usage_counter() { return
_peak_memory_usage_counter; }
+ RuntimeProfile::HighWaterMarkCounter* peak_memory_usage_counter() {
+ return _peak_memory_usage_counter;
+ }
virtual std::vector<Dependency*> dependencies() const { return {nullptr}; }
// override in exchange sink , AsyncWriterSink
diff --git a/be/src/pipeline/pipeline_fragment_context.cpp
b/be/src/pipeline/pipeline_fragment_context.cpp
index ba158bd1416..11898952276 100644
--- a/be/src/pipeline/pipeline_fragment_context.cpp
+++ b/be/src/pipeline/pipeline_fragment_context.cpp
@@ -114,8 +114,6 @@
namespace doris::pipeline {
#include "common/compile_check_begin.h"
-bvar::Adder<int64_t> g_pipeline_tasks_count("doris_pipeline_tasks_count");
-
PipelineFragmentContext::PipelineFragmentContext(
const TUniqueId& query_id, const int fragment_id,
std::shared_ptr<QueryContext> query_ctx,
ExecEnv* exec_env, const std::function<void(RuntimeState*, Status*)>&
call_back,
diff --git a/be/src/runtime/runtime_state.cpp b/be/src/runtime/runtime_state.cpp
index d4e3cba36cd..e3f9d075c8f 100644
--- a/be/src/runtime/runtime_state.cpp
+++ b/be/src/runtime/runtime_state.cpp
@@ -69,7 +69,6 @@ RuntimeState::RuntimeState(const TPlanFragmentExecParams&
fragment_exec_params,
_num_print_error_rows(0),
_num_bytes_load_total(0),
_num_finished_scan_range(0),
- _normal_row_number(0),
_error_row_number(0),
_query_ctx(ctx) {
Status status =
@@ -110,7 +109,6 @@ RuntimeState::RuntimeState(const TUniqueId& instance_id,
const TUniqueId& query_
_num_print_error_rows(0),
_num_bytes_load_total(0),
_num_finished_scan_range(0),
- _normal_row_number(0),
_error_row_number(0),
_query_ctx(ctx) {
[[maybe_unused]] auto status = init(instance_id, query_options,
query_globals, exec_env);
@@ -143,7 +141,6 @@
RuntimeState::RuntimeState(pipeline::PipelineFragmentContext*, const TUniqueId&
_num_print_error_rows(0),
_num_bytes_load_total(0),
_num_finished_scan_range(0),
- _normal_row_number(0),
_error_row_number(0),
_query_ctx(ctx) {
[[maybe_unused]] auto status = init(instance_id, query_options,
query_globals, exec_env);
@@ -174,7 +171,6 @@ RuntimeState::RuntimeState(const TUniqueId& query_id,
int32_t fragment_id,
_num_print_error_rows(0),
_num_bytes_load_total(0),
_num_finished_scan_range(0),
- _normal_row_number(0),
_error_row_number(0),
_query_ctx(ctx) {
// TODO: do we really need instance id?
diff --git a/be/src/runtime/runtime_state.h b/be/src/runtime/runtime_state.h
index f5fd7547532..34ce79ec7a7 100644
--- a/be/src/runtime/runtime_state.h
+++ b/be/src/runtime/runtime_state.h
@@ -113,12 +113,6 @@ public:
return _query_options.__isset.scan_queue_mem_limit ?
_query_options.scan_queue_mem_limit
:
_query_options.mem_limit / 20;
}
- int64_t query_mem_limit() const {
- if (_query_options.__isset.mem_limit && (_query_options.mem_limit >
0)) {
- return _query_options.mem_limit;
- }
- return 0;
- }
ObjectPool* obj_pool() const { return _obj_pool.get(); }
@@ -174,7 +168,7 @@ public:
_query_options.check_overflow_for_decimal;
}
- bool enable_decima256() const {
+ bool enable_decimal256() const {
return _query_options.__isset.enable_decimal256 &&
_query_options.enable_decimal256;
}
@@ -605,10 +599,6 @@ public:
int task_num() const { return _task_num; }
- vectorized::ColumnInt64* partial_update_auto_inc_column() {
- return _partial_update_auto_inc_column;
- };
-
private:
Status create_error_log_file();
@@ -693,7 +683,6 @@ private:
size_t _content_length = 0;
// mini load
- int64_t _normal_row_number;
int64_t _error_row_number;
std::string _error_log_file_path;
std::unique_ptr<std::ofstream> _error_log_file; // error file path,
absolute path
@@ -724,8 +713,6 @@ private:
// prohibit copies
RuntimeState(const RuntimeState&);
- vectorized::ColumnInt64* _partial_update_auto_inc_column;
-
// save error log to s3
std::shared_ptr<io::S3FileSystem> _s3_error_fs;
// error file path on s3,
${bucket}/${prefix}/error_log/${label}_${fragment_instance_id}
diff --git a/be/src/vec/aggregate_functions/aggregate_function_simple_factory.h
b/be/src/vec/aggregate_functions/aggregate_function_simple_factory.h
index cdd0c1a900b..7f6a200bcb2 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_simple_factory.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_simple_factory.h
@@ -119,7 +119,7 @@ public:
AggregateFunctionPtr get(const std::string& name, const DataTypes&
argument_types,
const bool result_is_nullable, int be_version,
- bool enable_decima256 = false) {
+ bool enable_decimal256 = false) {
bool nullable = false;
for (const auto& type : argument_types) {
if (type->is_nullable()) {
@@ -128,7 +128,7 @@ public:
}
std::string name_str = name;
- if (enable_decima256) {
+ if (enable_decimal256) {
if (name_str == "sum" || name_str == "avg") {
name_str += "_decimal256";
}
diff --git a/be/src/vec/exprs/vectorized_agg_fn.cpp
b/be/src/vec/exprs/vectorized_agg_fn.cpp
index 4f40ff76ce5..786986f4c78 100644
--- a/be/src/vec/exprs/vectorized_agg_fn.cpp
+++ b/be/src/vec/exprs/vectorized_agg_fn.cpp
@@ -198,11 +198,11 @@ Status AggFnEvaluator::prepare(RuntimeState* state, const
RowDescriptor& desc,
_function = AggregateFunctionSimpleFactory::instance().get(
_fn.name.function_name, argument_types,
AggregateFunctionSimpleFactory::result_nullable_by_foreach(_data_type),
- state->be_exec_version(), state->enable_decima256());
+ state->be_exec_version(), state->enable_decimal256());
} else {
_function = AggregateFunctionSimpleFactory::instance().get(
_fn.name.function_name, argument_types,
_data_type->is_nullable(),
- state->be_exec_version(), state->enable_decima256());
+ state->be_exec_version(), state->enable_decimal256());
}
}
if (_function == nullptr) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]