You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/05/07 12:39:49 UTC
[incubator-doris] branch master updated: [refactor] some code cleanup for min/max function. (#8874)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 4235db8902 [refactor] some code cleanup for min/max function. (#8874)
4235db8902 is described below
commit 4235db8902c1c412c5dc64378eeb32dd8997e938
Author: zhannngchen <48...@users.noreply.github.com>
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 257aca4a38..c1c0c2d90a 100644
--- a/be/src/exprs/aggregate_functions.cpp
+++ b/be/src/exprs/aggregate_functions.cpp
@@ -656,22 +656,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) {
@@ -690,22 +674,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;
@@ -2680,6 +2648,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,
@@ -2728,6 +2698,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 beeec3fe33..1d5299a6e0 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,10 +335,10 @@ 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;
@@ -354,7 +354,7 @@ public class Config extends ConfigBase {
@ConfField public static int jetty_threadPool_maxThreads = 400;
/**
- * 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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org