This is an automated email from the ASF dual-hosted git repository.
lihaopeng pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new 2706711703 [Bug] fix min_may_by for datetimeV2 (#19277)
2706711703 is described below
commit 2706711703eb493ec184296804e96757f6f64372
Author: zclllyybb <[email protected]>
AuthorDate: Thu May 4 22:02:07 2023 +0800
[Bug] fix min_may_by for datetimeV2 (#19277)
---
.../aggregate_function_min_max_by.cpp | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/be/src/vec/aggregate_functions/aggregate_function_min_max_by.cpp
b/be/src/vec/aggregate_functions/aggregate_function_min_max_by.cpp
index 41c73d1451..9ca6d949a8 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_min_max_by.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_min_max_by.cpp
@@ -21,6 +21,7 @@
#include "vec/aggregate_functions/aggregate_function_simple_factory.h"
#include "vec/aggregate_functions/factory_helpers.h"
#include "vec/aggregate_functions/helpers.h"
+#include "vec/core/types.h"
namespace doris::vectorized {
@@ -51,6 +52,10 @@ static IAggregateFunction*
create_aggregate_function_min_max_by_impl(
return new AggregateFunctionTemplate<Data<VT,
SingleValueDataFixed<UInt32>>, false>(
value_arg_type, key_arg_type);
}
+ if (which.idx == TypeIndex::DateTimeV2) {
+ return new AggregateFunctionTemplate<Data<VT,
SingleValueDataFixed<UInt64>>, false>(
+ value_arg_type, key_arg_type);
+ }
if (which.idx == TypeIndex::Decimal32) {
return new AggregateFunctionTemplate<Data<VT,
SingleValueDataDecimal<Decimal32>>, false>(
value_arg_type, key_arg_type);
@@ -103,6 +108,11 @@ static IAggregateFunction*
create_aggregate_function_min_max_by(const String& na
SingleValueDataFixed<UInt32>>(
argument_types);
}
+ if (which.idx == TypeIndex::DateTimeV2) {
+ return
create_aggregate_function_min_max_by_impl<AggregateFunctionTemplate, Data,
+
SingleValueDataFixed<UInt64>>(
+ argument_types);
+ }
if (which.idx == TypeIndex::Decimal128) {
return
create_aggregate_function_min_max_by_impl<AggregateFunctionTemplate, Data,
SingleValueDataDecimal<Decimal128>>(
@@ -123,16 +133,6 @@ static IAggregateFunction*
create_aggregate_function_min_max_by(const String& na
SingleValueDataDecimal<Decimal128I>>(
argument_types);
}
- if (which.idx == TypeIndex::DateV2) {
- return
create_aggregate_function_min_max_by_impl<AggregateFunctionTemplate, Data,
-
SingleValueDataFixed<UInt32>>(
- argument_types);
- }
- if (which.idx == TypeIndex::DateTimeV2) {
- return
create_aggregate_function_min_max_by_impl<AggregateFunctionTemplate, Data,
-
SingleValueDataFixed<UInt64>>(
- argument_types);
- }
return nullptr;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]