This is an automated email from the ASF dual-hosted git repository. panxiaolei 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 f517022d32d [Chore](exec) remove some unused code (#37094) f517022d32d is described below commit f517022d32d0d7997a9c5db6fc5cfd2b23642d85 Author: Pxl <pxl...@qq.com> AuthorDate: Tue Jul 2 14:39:18 2024 +0800 [Chore](exec) remove some unused code (#37094) ## Proposed changes remove some unused code --- be/src/pipeline/exec/exchange_sink_operator.cpp | 1 - be/src/vec/data_types/data_type_decimal.h | 20 +++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/be/src/pipeline/exec/exchange_sink_operator.cpp b/be/src/pipeline/exec/exchange_sink_operator.cpp index 198bc555024..2a8aa56dc62 100644 --- a/be/src/pipeline/exec/exchange_sink_operator.cpp +++ b/be/src/pipeline/exec/exchange_sink_operator.cpp @@ -108,7 +108,6 @@ Status ExchangeSinkLocalState::open(RuntimeState* state) { SCOPED_TIMER(_open_timer); RETURN_IF_ERROR(Base::open(state)); auto& p = _parent->cast<ExchangeSinkOperatorX>(); - _part_type = p._part_type; SCOPED_CONSUME_MEM_TRACKER(_mem_tracker.get()); int local_size = 0; diff --git a/be/src/vec/data_types/data_type_decimal.h b/be/src/vec/data_types/data_type_decimal.h index a8e9184739a..7b6ea532b74 100644 --- a/be/src/vec/data_types/data_type_decimal.h +++ b/be/src/vec/data_types/data_type_decimal.h @@ -288,16 +288,6 @@ public: return x % get_scale_multiplier(); } - T max_whole_value() const { return get_scale_multiplier(max_precision() - scale) - T(1); } - - bool can_store_whole(T x) const { - T max = max_whole_value(); - if (x > max || x < T(-max)) { - return false; - } - return true; - } - /// @returns multiplier for U to become T with correct scale template <typename U> T scale_factor_for(const DataTypeDecimal<U>& x, bool) const { @@ -388,19 +378,19 @@ const DataTypeDecimal<T>* check_decimal(const IDataType& data_type) { } inline UInt32 get_decimal_scale(const IDataType& data_type, UInt32 default_value = 0) { - if (auto* decimal_type = check_decimal<Decimal32>(data_type)) { + if (const auto* decimal_type = check_decimal<Decimal32>(data_type)) { return decimal_type->get_scale(); } - if (auto* decimal_type = check_decimal<Decimal64>(data_type)) { + if (const auto* decimal_type = check_decimal<Decimal64>(data_type)) { return decimal_type->get_scale(); } - if (auto* decimal_type = check_decimal<Decimal128V2>(data_type)) { + if (const auto* decimal_type = check_decimal<Decimal128V2>(data_type)) { return decimal_type->get_scale(); } - if (auto* decimal_type = check_decimal<Decimal128V3>(data_type)) { + if (const auto* decimal_type = check_decimal<Decimal128V3>(data_type)) { return decimal_type->get_scale(); } - if (auto* decimal_type = check_decimal<Decimal256>(data_type)) { + if (const auto* decimal_type = check_decimal<Decimal256>(data_type)) { return decimal_type->get_scale(); } return default_value; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org