This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.0.1 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
commit 0d52bad20a6be9a5252c1cbaf7fed280100641f9 Author: zhannngchen <[email protected]> AuthorDate: Sat May 7 20:39:44 2022 +0800 [refactor] some code cleanup for min/max function. (#8874) --- be/src/exprs/aggregate_functions.cpp | 36 +++------------------- .../main/java/org/apache/doris/common/Config.java | 10 +++--- 2 files changed, 9 insertions(+), 37 deletions(-) diff --git a/be/src/exprs/aggregate_functions.cpp b/be/src/exprs/aggregate_functions.cpp index 506a87a821..700851aad0 100644 --- a/be/src/exprs/aggregate_functions.cpp +++ b/be/src/exprs/aggregate_functions.cpp @@ -655,22 +655,6 @@ void AggregateFunctions::min(FunctionContext*, const DecimalV2Val& src, DecimalV } } -template <> -void AggregateFunctions::min(FunctionContext*, const LargeIntVal& src, LargeIntVal* dst) { - if (src.is_null) { - return; - } - - if (dst->is_null) { - *dst = src; - return; - } - - if (src.val < dst->val) { - dst->val = src.val; - } -} - template <> void AggregateFunctions::max(FunctionContext*, const DecimalV2Val& src, DecimalV2Val* dst) { if (src.is_null) { @@ -689,22 +673,6 @@ void AggregateFunctions::max(FunctionContext*, const DecimalV2Val& src, DecimalV } } -template <> -void AggregateFunctions::max(FunctionContext*, const LargeIntVal& src, LargeIntVal* dst) { - if (src.is_null) { - return; - } - - if (dst->is_null) { - *dst = src; - return; - } - - if (src.val > dst->val) { - dst->val = src.val; - } -} - void AggregateFunctions::init_null_string(FunctionContext* c, StringVal* dst) { dst->is_null = true; dst->ptr = nullptr; @@ -2676,6 +2644,8 @@ template void AggregateFunctions::min<SmallIntVal>(FunctionContext*, const Small template void AggregateFunctions::min<IntVal>(FunctionContext*, const IntVal& src, IntVal* dst); template void AggregateFunctions::min<BigIntVal>(FunctionContext*, const BigIntVal& src, BigIntVal* dst); +template void AggregateFunctions::min<LargeIntVal>(FunctionContext*, const LargeIntVal& src, + LargeIntVal* dst); template void AggregateFunctions::min<FloatVal>(FunctionContext*, const FloatVal& src, FloatVal* dst); template void AggregateFunctions::min<DoubleVal>(FunctionContext*, const DoubleVal& src, @@ -2724,6 +2694,8 @@ template void AggregateFunctions::max<SmallIntVal>(FunctionContext*, const Small template void AggregateFunctions::max<IntVal>(FunctionContext*, const IntVal& src, IntVal* dst); template void AggregateFunctions::max<BigIntVal>(FunctionContext*, const BigIntVal& src, BigIntVal* dst); +template void AggregateFunctions::max<LargeIntVal>(FunctionContext*, const LargeIntVal& src, + LargeIntVal* dst); template void AggregateFunctions::max<FloatVal>(FunctionContext*, const FloatVal& src, FloatVal* dst); template void AggregateFunctions::max<DoubleVal>(FunctionContext*, const DoubleVal& src, diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/Config.java b/fe/fe-core/src/main/java/org/apache/doris/common/Config.java index b70ec7c5a9..82552ff2b3 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/Config.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/Config.java @@ -335,16 +335,16 @@ public class Config extends ConfigBase { * and one thread can handle the read and write of many sockets, so the number of thread pools is small. * * For most projects, only 1-2 acceptors threads are needed, and 2 to 4 selectors threads are sufficient. - * Workers are obstructive business logic, often have more database operations, and require a large number of threads. T - * he specific number depends on the proportion of QPS and IO events of the application. The higher the QPS, - * the more threads are required, the higher the proportion of IO, - * the more threads waiting, and the more total threads required. + * Workers are obstructive business logic, often have more database operations, and require a large number of + * threads. The specific number depends on the proportion of QPS and IO events of the application. The higher the + * QPS, the more threads are required, the higher the proportion of IO, the more threads waiting, and the more + * total threads required. */ @ConfField public static int jetty_server_acceptors = 2; @ConfField public static int jetty_server_selectors = 4; @ConfField public static int jetty_server_workers = 0; /** - * jetty Maximum number of bytes in put or post method,default:100MB + * Jetty maximum number of bytes in put or post method,default:100MB */ @ConfField public static int jetty_server_max_http_post_size = 100 * 1024 * 1024; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
