diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index cc0b6bbdc1..0ca8ae7b4f 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -76,6 +76,10 @@ else() endif() option(USE_JEMALLOC "Use jemalloc" ON) +if (DISPLAY_BUILD_TIME) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "time -f 'TimeUsage: real=%es, user=%Us, sys=%Ss'") +endif() + message(STATUS "GLIBC_COMPATIBILITY is ${GLIBC_COMPATIBILITY}") message(STATUS "USE_LIBCPP is ${USE_LIBCPP}") message(STATUS "USE_MEM_TRACKER is ${USE_MEM_TRACKER}") @@ -132,7 +136,7 @@ set(Boost_DEBUG FALSE) set(Boost_USE_MULTITHREADED ON) set(Boost_ROOT ${THIRDPARTY_DIR}) set(Boost_NO_BOOST_CMAKE OFF) -set(BOOST_VERSION "1.73.0") +set(BOOST_VERSION "1.81.0") if (NOT APPLE) find_package(Boost ${BOOST_VERSION} REQUIRED COMPONENTS system date_time) @@ -935,7 +939,7 @@ endif () get_directory_property(COMPILER_FLAGS COMPILE_OPTIONS) get_directory_property(COMPILER_DEFINES COMPILE_DEFINITIONS) -message(STATUS "Compiler: ${CMAKE_CXX_COMPILER_ID}") +message(STATUS "Compiler: ${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}") message(STATUS "CXX Standard: ${CMAKE_CXX_STANDARD}") message(STATUS "C Standard: ${CMAKE_C_STANDARD}") message(STATUS "CXX Flags: ${CMAKE_CXX_FLAGS}") diff --git a/be/src/vec/CMakeLists.txt b/be/src/vec/CMakeLists.txt index 49cfd007e1..ce61f91af9 100644 --- a/be/src/vec/CMakeLists.txt +++ b/be/src/vec/CMakeLists.txt @@ -30,7 +30,8 @@ set(VEC_FILES aggregate_functions/aggregate_function_sum.cpp aggregate_functions/aggregate_function_sort.cpp aggregate_functions/aggregate_function_min_max.cpp - aggregate_functions/aggregate_function_min_max_by.cpp + aggregate_functions/aggregate_function_min_by.cpp + aggregate_functions/aggregate_function_max_by.cpp aggregate_functions/aggregate_function_uniq.cpp aggregate_functions/aggregate_function_hll_union_agg.cpp aggregate_functions/aggregate_function_bit.cpp diff --git a/be/src/vec/aggregate_functions/aggregate_function_max_by.cpp b/be/src/vec/aggregate_functions/aggregate_function_max_by.cpp new file mode 100644 index 0000000000..b2c44689bc --- /dev/null +++ b/be/src/vec/aggregate_functions/aggregate_function_max_by.cpp @@ -0,0 +1,29 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "vec/aggregate_functions/aggregate_function_min_max_by.h" +#include "vec/aggregate_functions/aggregate_function_simple_factory.h" + +namespace doris::vectorized { + +void register_aggregate_function_max_by(AggregateFunctionSimpleFactory& factory) { + factory.register_function_both( + "max_by", create_aggregate_function_min_max_by); +} + +} // namespace doris::vectorized diff --git a/be/src/vec/aggregate_functions/aggregate_function_min_by.cpp b/be/src/vec/aggregate_functions/aggregate_function_min_by.cpp new file mode 100644 index 0000000000..a860bea088 --- /dev/null +++ b/be/src/vec/aggregate_functions/aggregate_function_min_by.cpp @@ -0,0 +1,29 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "vec/aggregate_functions/aggregate_function_min_max_by.h" +#include "vec/aggregate_functions/aggregate_function_simple_factory.h" + +namespace doris::vectorized { + +void register_aggregate_function_min_by(AggregateFunctionSimpleFactory& factory) { + factory.register_function_both( + "min_by", create_aggregate_function_min_max_by); +} + +} // namespace doris::vectorized diff --git a/be/src/vec/aggregate_functions/aggregate_function_min_max.h b/be/src/vec/aggregate_functions/aggregate_function_min_max.h index f4692bc818..1afd8e75f6 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_min_max.h +++ b/be/src/vec/aggregate_functions/aggregate_function_min_max.h @@ -447,12 +447,10 @@ struct AggregateFunctionMaxData : public Data { using Self = AggregateFunctionMaxData; using Data::IsFixedLength; - bool change_if_better(const IColumn& column, size_t row_num, Arena* arena) { - return this->change_if_greater(column, row_num, arena); - } - bool change_if_better(const Self& to, Arena* arena) { - return this->change_if_greater(to, arena); + void change_if_better(const IColumn& column, size_t row_num, Arena* arena) { + this->change_if_greater(column, row_num, arena); } + void change_if_better(const Self& to, Arena* arena) { this->change_if_greater(to, arena); } static const char* name() { return "max"; } }; @@ -462,10 +460,10 @@ struct AggregateFunctionMinData : Data { using Self = AggregateFunctionMinData; using Data::IsFixedLength; - bool change_if_better(const IColumn& column, size_t row_num, Arena* arena) { - return this->change_if_less(column, row_num, arena); + void change_if_better(const IColumn& column, size_t row_num, Arena* arena) { + this->change_if_less(column, row_num, arena); } - bool change_if_better(const Self& to, Arena* arena) { return this->change_if_less(to, arena); } + void change_if_better(const Self& to, Arena* arena) { this->change_if_less(to, arena); } static const char* name() { return "min"; } }; @@ -475,12 +473,10 @@ struct AggregateFunctionAnyData : Data { using Self = AggregateFunctionAnyData; using Data::IsFixedLength; - bool change_if_better(const IColumn& column, size_t row_num, Arena* arena) { - return this->change_first_time(column, row_num, arena); - } - bool change_if_better(const Self& to, Arena* arena) { - return this->change_first_time(to, arena); + void change_if_better(const IColumn& column, size_t row_num, Arena* arena) { + this->change_first_time(column, row_num, arena); } + void change_if_better(const Self& to, Arena* arena) { this->change_first_time(to, arena); } static const char* name() { return "any"; } }; 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 deleted file mode 100644 index 7d0dd084be..0000000000 --- a/be/src/vec/aggregate_functions/aggregate_function_min_max_by.cpp +++ /dev/null @@ -1,131 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -#include "vec/aggregate_functions/aggregate_function_min_max_by.h" - -#include "vec/aggregate_functions/aggregate_function_min_max.h" -#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 { - -/// min_by, max_by -template