be/src/exprs/aggregate/aggregate_function_uniq.h
Line | Count | Source |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | // This file is copied from |
18 | | // https://github.com/ClickHouse/ClickHouse/blob/master/src/AggregateFunctions/AggregateFunctionUniq.h |
19 | | // and modified by Doris |
20 | | |
21 | | #pragma once |
22 | | |
23 | | #include <stddef.h> |
24 | | |
25 | | #include <boost/iterator/iterator_facade.hpp> |
26 | | #include <memory> |
27 | | #include <type_traits> |
28 | | #include <vector> |
29 | | |
30 | | #include "common/compiler_util.h" // IWYU pragma: keep |
31 | | #include "core/arena.h" |
32 | | #include "core/assert_cast.h" |
33 | | #include "core/column/column.h" |
34 | | #include "core/column/column_decimal.h" |
35 | | #include "core/column/column_vector.h" |
36 | | #include "core/data_type/data_type_number.h" |
37 | | #include "core/data_type/primitive_type.h" |
38 | | #include "core/string_buffer.hpp" |
39 | | #include "core/string_ref.h" |
40 | | #include "core/types.h" |
41 | | #include "core/uint128.h" |
42 | | #include "exec/common/hash_table/hash.h" |
43 | | #include "exec/common/hash_table/phmap_fwd_decl.h" |
44 | | #include "exprs/aggregate/aggregate_function.h" |
45 | | #include "util/var_int.h" |
46 | | |
47 | | template <typename T> |
48 | | struct HashCRC32; |
49 | | |
50 | | namespace doris { |
51 | | |
52 | | class Arena; |
53 | | class BufferReadable; |
54 | | class BufferWritable; |
55 | | template <PrimitiveType T> |
56 | | class ColumnDecimal; |
57 | | /// uniqExact |
58 | | |
59 | | template <PrimitiveType T> |
60 | | struct AggregateFunctionUniqExactData { |
61 | | static constexpr bool is_string_key = is_string_type(T) || is_varbinary(T); |
62 | | using Key = std::conditional_t< |
63 | | is_string_key, UInt128, |
64 | | std::conditional_t<T == TYPE_ARRAY, UInt64, |
65 | | std::conditional_t<T == TYPE_BOOLEAN, UInt8, |
66 | | typename PrimitiveTypeTraits<T>::CppType>>>; |
67 | | using Hash = HashCRC32<Key>; |
68 | | |
69 | | using Set = flat_hash_set<Key, Hash>; |
70 | | |
71 | 10.6k | static UInt128 ALWAYS_INLINE get_key(const StringRef& value) { |
72 | 10.6k | auto hash_value = XXH_INLINE_XXH128(value.data, value.size, 0); |
73 | 10.6k | return UInt128 {hash_value.high64, hash_value.low64}; |
74 | 10.6k | } _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE10EE7get_keyERKNS_9StringRefE Line | Count | Source | 71 | 10.6k | static UInt128 ALWAYS_INLINE get_key(const StringRef& value) { | 72 | 10.6k | auto hash_value = XXH_INLINE_XXH128(value.data, value.size, 0); | 73 | 10.6k | return UInt128 {hash_value.high64, hash_value.low64}; | 74 | 10.6k | } |
_ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE41EE7get_keyERKNS_9StringRefE Line | Count | Source | 71 | 24 | static UInt128 ALWAYS_INLINE get_key(const StringRef& value) { | 72 | 24 | auto hash_value = XXH_INLINE_XXH128(value.data, value.size, 0); | 73 | 24 | return UInt128 {hash_value.high64, hash_value.low64}; | 74 | 24 | } |
|
75 | 14 | static UInt64 ALWAYS_INLINE get_key(const IColumn& column, size_t row_num) { |
76 | 14 | UInt64 hash_value = 0; |
77 | 14 | column.update_xxHash_with_value(row_num, row_num + 1, hash_value, nullptr); |
78 | 14 | return hash_value; |
79 | 14 | } |
80 | | |
81 | | Set set; |
82 | | |
83 | 51 | static String get_name() { return "multi_distinct"; }Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE2EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE3EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE4EE8get_nameB5cxx11Ev _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE5EE8get_nameB5cxx11Ev Line | Count | Source | 83 | 38 | static String get_name() { return "multi_distinct"; } |
Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE6EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE7EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE28EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE29EE8get_nameB5cxx11Ev _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE30EE8get_nameB5cxx11Ev Line | Count | Source | 83 | 10 | static String get_name() { return "multi_distinct"; } |
Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE35EE8get_nameB5cxx11Ev _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE10EE8get_nameB5cxx11Ev Line | Count | Source | 83 | 3 | static String get_name() { return "multi_distinct"; } |
Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE17EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE8EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE9EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE25EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE26EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE42EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE41EE8get_nameB5cxx11Ev |
84 | | |
85 | 34 | void reset() { set.clear(); }Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE2EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE3EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE4EE5resetEv _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE5EE5resetEv Line | Count | Source | 85 | 31 | void reset() { set.clear(); } |
Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE6EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE7EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE28EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE29EE5resetEv _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE30EE5resetEv Line | Count | Source | 85 | 3 | void reset() { set.clear(); } |
Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE35EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE10EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE17EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE8EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE9EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE25EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE26EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE42EE5resetEv Unexecuted instantiation: _ZN5doris30AggregateFunctionUniqExactDataILNS_13PrimitiveTypeE41EE5resetEv |
86 | | }; |
87 | | |
88 | | struct AggregateFunctionUniqVariantData { |
89 | | using Set = flat_hash_set<StringRef, StringRefHash>; |
90 | | |
91 | | Set set; |
92 | | |
93 | 0 | static String get_name() { return "multi_distinct"; } |
94 | | |
95 | 1 | void reset() { set.clear(); } |
96 | | |
97 | 20 | void insert_borrowed(StringRef key, Arena& arena) { |
98 | 20 | if (set.contains(key)) { |
99 | 11 | return; |
100 | 11 | } |
101 | 9 | key.data = arena.insert(key.data, key.size); |
102 | 9 | set.emplace(key); |
103 | 9 | } |
104 | | }; |
105 | | |
106 | | namespace detail { |
107 | | |
108 | | /** The structure for the delegation work to add one element to the `uniq` aggregate functions. |
109 | | * Used for partial specialization to add strings. |
110 | | */ |
111 | | template <PrimitiveType T, typename Data> |
112 | | struct OneAdder { |
113 | 726 | static void ALWAYS_INLINE add(Data& data, const IColumn& column, size_t row_num) { |
114 | 726 | if constexpr (is_string_type(T) || is_varbinary(T)) { |
115 | 456 | StringRef value = column.get_data_at(row_num); |
116 | 456 | data.set.insert(Data::get_key(value)); |
117 | 456 | } else if constexpr (T == TYPE_ARRAY) { |
118 | 14 | data.set.insert(Data::get_key(column, row_num)); |
119 | 256 | } else { |
120 | 256 | data.set.insert(assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&, |
121 | 256 | TypeCheckOnRelease::DISABLE>(column) |
122 | 256 | .get_data()[row_num]); |
123 | 256 | } |
124 | 726 | } _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS2_2EEEE3addERS4_RKNS_7IColumnEm Line | Count | Source | 113 | 15 | static void ALWAYS_INLINE add(Data& data, const IColumn& column, size_t row_num) { | 114 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 115 | | StringRef value = column.get_data_at(row_num); | 116 | | data.set.insert(Data::get_key(value)); | 117 | | } else if constexpr (T == TYPE_ARRAY) { | 118 | | data.set.insert(Data::get_key(column, row_num)); | 119 | 15 | } else { | 120 | 15 | data.set.insert(assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&, | 121 | 15 | TypeCheckOnRelease::DISABLE>(column) | 122 | 15 | .get_data()[row_num]); | 123 | 15 | } | 124 | 15 | } |
Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS2_3EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS2_4EEEE3addERS4_RKNS_7IColumnEm _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS2_5EEEE3addERS4_RKNS_7IColumnEm Line | Count | Source | 113 | 178 | static void ALWAYS_INLINE add(Data& data, const IColumn& column, size_t row_num) { | 114 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 115 | | StringRef value = column.get_data_at(row_num); | 116 | | data.set.insert(Data::get_key(value)); | 117 | | } else if constexpr (T == TYPE_ARRAY) { | 118 | | data.set.insert(Data::get_key(column, row_num)); | 119 | 178 | } else { | 120 | 178 | data.set.insert(assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&, | 121 | 178 | TypeCheckOnRelease::DISABLE>(column) | 122 | 178 | .get_data()[row_num]); | 123 | 178 | } | 124 | 178 | } |
_ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS2_6EEEE3addERS4_RKNS_7IColumnEm Line | Count | Source | 113 | 15 | static void ALWAYS_INLINE add(Data& data, const IColumn& column, size_t row_num) { | 114 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 115 | | StringRef value = column.get_data_at(row_num); | 116 | | data.set.insert(Data::get_key(value)); | 117 | | } else if constexpr (T == TYPE_ARRAY) { | 118 | | data.set.insert(Data::get_key(column, row_num)); | 119 | 15 | } else { | 120 | 15 | data.set.insert(assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&, | 121 | 15 | TypeCheckOnRelease::DISABLE>(column) | 122 | 15 | .get_data()[row_num]); | 123 | 15 | } | 124 | 15 | } |
Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS2_7EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS2_28EEEE3addERS4_RKNS_7IColumnEm _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS2_29EEEE3addERS4_RKNS_7IColumnEm Line | Count | Source | 113 | 4 | static void ALWAYS_INLINE add(Data& data, const IColumn& column, size_t row_num) { | 114 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 115 | | StringRef value = column.get_data_at(row_num); | 116 | | data.set.insert(Data::get_key(value)); | 117 | | } else if constexpr (T == TYPE_ARRAY) { | 118 | | data.set.insert(Data::get_key(column, row_num)); | 119 | 4 | } else { | 120 | 4 | data.set.insert(assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&, | 121 | 4 | TypeCheckOnRelease::DISABLE>(column) | 122 | 4 | .get_data()[row_num]); | 123 | 4 | } | 124 | 4 | } |
_ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS2_30EEEE3addERS4_RKNS_7IColumnEm Line | Count | Source | 113 | 17 | static void ALWAYS_INLINE add(Data& data, const IColumn& column, size_t row_num) { | 114 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 115 | | StringRef value = column.get_data_at(row_num); | 116 | | data.set.insert(Data::get_key(value)); | 117 | | } else if constexpr (T == TYPE_ARRAY) { | 118 | | data.set.insert(Data::get_key(column, row_num)); | 119 | 17 | } else { | 120 | 17 | data.set.insert(assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&, | 121 | 17 | TypeCheckOnRelease::DISABLE>(column) | 122 | 17 | .get_data()[row_num]); | 123 | 17 | } | 124 | 17 | } |
Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS2_35EEEE3addERS4_RKNS_7IColumnEm _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS2_10EEEE3addERS4_RKNS_7IColumnEm Line | Count | Source | 113 | 456 | static void ALWAYS_INLINE add(Data& data, const IColumn& column, size_t row_num) { | 114 | 456 | if constexpr (is_string_type(T) || is_varbinary(T)) { | 115 | 456 | StringRef value = column.get_data_at(row_num); | 116 | 456 | data.set.insert(Data::get_key(value)); | 117 | | } else if constexpr (T == TYPE_ARRAY) { | 118 | | data.set.insert(Data::get_key(column, row_num)); | 119 | | } else { | 120 | | data.set.insert(assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&, | 121 | | TypeCheckOnRelease::DISABLE>(column) | 122 | | .get_data()[row_num]); | 123 | | } | 124 | 456 | } |
_ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS2_17EEEE3addERS4_RKNS_7IColumnEm Line | Count | Source | 113 | 14 | static void ALWAYS_INLINE add(Data& data, const IColumn& column, size_t row_num) { | 114 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 115 | | StringRef value = column.get_data_at(row_num); | 116 | | data.set.insert(Data::get_key(value)); | 117 | 14 | } else if constexpr (T == TYPE_ARRAY) { | 118 | 14 | data.set.insert(Data::get_key(column, row_num)); | 119 | | } else { | 120 | | data.set.insert(assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&, | 121 | | TypeCheckOnRelease::DISABLE>(column) | 122 | | .get_data()[row_num]); | 123 | | } | 124 | 14 | } |
Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS2_8EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS2_9EEEE3addERS4_RKNS_7IColumnEm _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS2_25EEEE3addERS4_RKNS_7IColumnEm Line | Count | Source | 113 | 6 | static void ALWAYS_INLINE add(Data& data, const IColumn& column, size_t row_num) { | 114 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 115 | | StringRef value = column.get_data_at(row_num); | 116 | | data.set.insert(Data::get_key(value)); | 117 | | } else if constexpr (T == TYPE_ARRAY) { | 118 | | data.set.insert(Data::get_key(column, row_num)); | 119 | 6 | } else { | 120 | 6 | data.set.insert(assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&, | 121 | 6 | TypeCheckOnRelease::DISABLE>(column) | 122 | 6 | .get_data()[row_num]); | 123 | 6 | } | 124 | 6 | } |
_ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS2_26EEEE3addERS4_RKNS_7IColumnEm Line | Count | Source | 113 | 15 | static void ALWAYS_INLINE add(Data& data, const IColumn& column, size_t row_num) { | 114 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 115 | | StringRef value = column.get_data_at(row_num); | 116 | | data.set.insert(Data::get_key(value)); | 117 | | } else if constexpr (T == TYPE_ARRAY) { | 118 | | data.set.insert(Data::get_key(column, row_num)); | 119 | 15 | } else { | 120 | 15 | data.set.insert(assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&, | 121 | 15 | TypeCheckOnRelease::DISABLE>(column) | 122 | 15 | .get_data()[row_num]); | 123 | 15 | } | 124 | 15 | } |
_ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS2_42EEEE3addERS4_RKNS_7IColumnEm Line | Count | Source | 113 | 6 | static void ALWAYS_INLINE add(Data& data, const IColumn& column, size_t row_num) { | 114 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 115 | | StringRef value = column.get_data_at(row_num); | 116 | | data.set.insert(Data::get_key(value)); | 117 | | } else if constexpr (T == TYPE_ARRAY) { | 118 | | data.set.insert(Data::get_key(column, row_num)); | 119 | 6 | } else { | 120 | 6 | data.set.insert(assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&, | 121 | 6 | TypeCheckOnRelease::DISABLE>(column) | 122 | 6 | .get_data()[row_num]); | 123 | 6 | } | 124 | 6 | } |
Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS2_41EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE3ENS_38AggregateFunctionUniqDistributeKeyDataILS2_3EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE4ENS_38AggregateFunctionUniqDistributeKeyDataILS2_4EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE5ENS_38AggregateFunctionUniqDistributeKeyDataILS2_5EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE6ENS_38AggregateFunctionUniqDistributeKeyDataILS2_6EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE7ENS_38AggregateFunctionUniqDistributeKeyDataILS2_7EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE28ENS_38AggregateFunctionUniqDistributeKeyDataILS2_28EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE29ENS_38AggregateFunctionUniqDistributeKeyDataILS2_29EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE30ENS_38AggregateFunctionUniqDistributeKeyDataILS2_30EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE35ENS_38AggregateFunctionUniqDistributeKeyDataILS2_35EEEE3addERS4_RKNS_7IColumnEm Unexecuted instantiation: _ZN5doris6detail8OneAdderILNS_13PrimitiveTypeE10ENS_38AggregateFunctionUniqDistributeKeyDataILS2_10EEEE3addERS4_RKNS_7IColumnEm |
125 | | }; |
126 | | |
127 | | } // namespace detail |
128 | | |
129 | | /// Calculates the number of different values approximately or exactly. |
130 | | template <PrimitiveType T, typename Data> |
131 | | class AggregateFunctionUniq final |
132 | | : public IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>, |
133 | | VarargsExpression, |
134 | | NotNullableAggregateFunction { |
135 | | public: |
136 | | using KeyType = std::conditional_t< |
137 | | is_string_type(T) || is_varbinary(T), UInt128, |
138 | | std::conditional_t<T == TYPE_ARRAY, UInt64, typename PrimitiveTypeTraits<T>::CppType>>; |
139 | | AggregateFunctionUniq(const DataTypes& argument_types_) |
140 | 1.32k | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {}_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 2 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 10 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 575 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 81 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 2 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 12 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 1 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 13 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 585 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 4 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 9 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 2 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 8 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 140 | 16 | : IAggregateFunctionDataHelper<Data, AggregateFunctionUniq<T, Data>>(argument_types_) {} |
|
141 | | |
142 | 51 | String get_name() const override { return Data::get_name(); }Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE8get_nameB5cxx11Ev _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE8get_nameB5cxx11Ev Line | Count | Source | 142 | 38 | String get_name() const override { return Data::get_name(); } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE8get_nameB5cxx11Ev _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE8get_nameB5cxx11Ev Line | Count | Source | 142 | 10 | String get_name() const override { return Data::get_name(); } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE8get_nameB5cxx11Ev _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE8get_nameB5cxx11Ev Line | Count | Source | 142 | 3 | String get_name() const override { return Data::get_name(); } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE8get_nameB5cxx11Ev |
143 | | |
144 | 8.28k | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); }_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE15get_return_typeEv Line | Count | Source | 144 | 9 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE15get_return_typeEv Line | Count | Source | 144 | 99 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE15get_return_typeEv _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE15get_return_typeEv Line | Count | Source | 144 | 3.11k | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE15get_return_typeEv Line | Count | Source | 144 | 653 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE15get_return_typeEv Line | Count | Source | 144 | 67 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE15get_return_typeEv _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE15get_return_typeEv Line | Count | Source | 144 | 94 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE15get_return_typeEv Line | Count | Source | 144 | 17 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE15get_return_typeEv Line | Count | Source | 144 | 149 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE15get_return_typeEv Line | Count | Source | 144 | 3.88k | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE15get_return_typeEv Line | Count | Source | 144 | 12 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE15get_return_typeEv Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE15get_return_typeEv _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE15get_return_typeEv Line | Count | Source | 144 | 69 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE15get_return_typeEv Line | Count | Source | 144 | 6 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE15get_return_typeEv Line | Count | Source | 144 | 52 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE15get_return_typeEv Line | Count | Source | 144 | 48 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
|
145 | | |
146 | 34 | void reset(AggregateDataPtr __restrict place) const override { this->data(place).reset(); }Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE5resetEPc _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE5resetEPc Line | Count | Source | 146 | 31 | void reset(AggregateDataPtr __restrict place) const override { this->data(place).reset(); } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE5resetEPc _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE5resetEPc Line | Count | Source | 146 | 3 | void reset(AggregateDataPtr __restrict place) const override { this->data(place).reset(); } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE5resetEPc Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE5resetEPc |
147 | | |
148 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
149 | 726 | Arena&) const override { |
150 | 726 | detail::OneAdder<T, Data>::add(this->data(place), *columns[0], row_num); |
151 | 726 | } _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 149 | 15 | Arena&) const override { | 150 | 15 | detail::OneAdder<T, Data>::add(this->data(place), *columns[0], row_num); | 151 | 15 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 149 | 178 | Arena&) const override { | 150 | 178 | detail::OneAdder<T, Data>::add(this->data(place), *columns[0], row_num); | 151 | 178 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 149 | 15 | Arena&) const override { | 150 | 15 | detail::OneAdder<T, Data>::add(this->data(place), *columns[0], row_num); | 151 | 15 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 149 | 4 | Arena&) const override { | 150 | 4 | detail::OneAdder<T, Data>::add(this->data(place), *columns[0], row_num); | 151 | 4 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 149 | 17 | Arena&) const override { | 150 | 17 | detail::OneAdder<T, Data>::add(this->data(place), *columns[0], row_num); | 151 | 17 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 149 | 456 | Arena&) const override { | 150 | 456 | detail::OneAdder<T, Data>::add(this->data(place), *columns[0], row_num); | 151 | 456 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 149 | 14 | Arena&) const override { | 150 | 14 | detail::OneAdder<T, Data>::add(this->data(place), *columns[0], row_num); | 151 | 14 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 149 | 6 | Arena&) const override { | 150 | 6 | detail::OneAdder<T, Data>::add(this->data(place), *columns[0], row_num); | 151 | 6 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 149 | 15 | Arena&) const override { | 150 | 15 | detail::OneAdder<T, Data>::add(this->data(place), *columns[0], row_num); | 151 | 15 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 149 | 6 | Arena&) const override { | 150 | 6 | detail::OneAdder<T, Data>::add(this->data(place), *columns[0], row_num); | 151 | 6 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE3addEPcPPKNS_7IColumnElRNS_5ArenaE |
152 | | |
153 | | static ALWAYS_INLINE const KeyType* get_keys(std::vector<KeyType>& keys_container, |
154 | 1.39k | const IColumn& column, size_t batch_size) { |
155 | 1.39k | if constexpr (is_string_type(T) || is_varbinary(T)) { |
156 | 264 | keys_container.resize(batch_size); |
157 | 10.4k | for (size_t i = 0; i != batch_size; ++i) { |
158 | 10.1k | StringRef value = column.get_data_at(i); |
159 | 10.1k | keys_container[i] = Data::get_key(value); |
160 | 10.1k | } |
161 | 264 | return keys_container.data(); |
162 | 264 | } else if constexpr (T == TYPE_ARRAY) { |
163 | 0 | keys_container.resize(batch_size); |
164 | 0 | for (size_t i = 0; i != batch_size; ++i) { |
165 | 0 | keys_container[i] = Data::get_key(column, i); |
166 | 0 | } |
167 | 0 | return keys_container.data(); |
168 | 1.12k | } else { |
169 | 1.12k | return assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&>(column) |
170 | 1.12k | .get_data() |
171 | 1.12k | .data(); |
172 | 1.12k | } |
173 | 1.39k | } Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE8get_keysERSt6vectorIhSaIhEERKNS_7IColumnEm _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE8get_keysERSt6vectorIaSaIaEERKNS_7IColumnEm Line | Count | Source | 154 | 16 | const IColumn& column, size_t batch_size) { | 155 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 156 | | keys_container.resize(batch_size); | 157 | | for (size_t i = 0; i != batch_size; ++i) { | 158 | | StringRef value = column.get_data_at(i); | 159 | | keys_container[i] = Data::get_key(value); | 160 | | } | 161 | | return keys_container.data(); | 162 | | } else if constexpr (T == TYPE_ARRAY) { | 163 | | keys_container.resize(batch_size); | 164 | | for (size_t i = 0; i != batch_size; ++i) { | 165 | | keys_container[i] = Data::get_key(column, i); | 166 | | } | 167 | | return keys_container.data(); | 168 | 16 | } else { | 169 | 16 | return assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&>(column) | 170 | 16 | .get_data() | 171 | 16 | .data(); | 172 | 16 | } | 173 | 16 | } |
Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE8get_keysERSt6vectorIsSaIsEERKNS_7IColumnEm _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE8get_keysERSt6vectorIiSaIiEERKNS_7IColumnEm Line | Count | Source | 154 | 643 | const IColumn& column, size_t batch_size) { | 155 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 156 | | keys_container.resize(batch_size); | 157 | | for (size_t i = 0; i != batch_size; ++i) { | 158 | | StringRef value = column.get_data_at(i); | 159 | | keys_container[i] = Data::get_key(value); | 160 | | } | 161 | | return keys_container.data(); | 162 | | } else if constexpr (T == TYPE_ARRAY) { | 163 | | keys_container.resize(batch_size); | 164 | | for (size_t i = 0; i != batch_size; ++i) { | 165 | | keys_container[i] = Data::get_key(column, i); | 166 | | } | 167 | | return keys_container.data(); | 168 | 643 | } else { | 169 | 643 | return assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&>(column) | 170 | 643 | .get_data() | 171 | 643 | .data(); | 172 | 643 | } | 173 | 643 | } |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE8get_keysERSt6vectorIlSaIlEERKNS_7IColumnEm Line | Count | Source | 154 | 244 | const IColumn& column, size_t batch_size) { | 155 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 156 | | keys_container.resize(batch_size); | 157 | | for (size_t i = 0; i != batch_size; ++i) { | 158 | | StringRef value = column.get_data_at(i); | 159 | | keys_container[i] = Data::get_key(value); | 160 | | } | 161 | | return keys_container.data(); | 162 | | } else if constexpr (T == TYPE_ARRAY) { | 163 | | keys_container.resize(batch_size); | 164 | | for (size_t i = 0; i != batch_size; ++i) { | 165 | | keys_container[i] = Data::get_key(column, i); | 166 | | } | 167 | | return keys_container.data(); | 168 | 244 | } else { | 169 | 244 | return assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&>(column) | 170 | 244 | .get_data() | 171 | 244 | .data(); | 172 | 244 | } | 173 | 244 | } |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE8get_keysERSt6vectorInSaInEERKNS_7IColumnEm Line | Count | Source | 154 | 4 | const IColumn& column, size_t batch_size) { | 155 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 156 | | keys_container.resize(batch_size); | 157 | | for (size_t i = 0; i != batch_size; ++i) { | 158 | | StringRef value = column.get_data_at(i); | 159 | | keys_container[i] = Data::get_key(value); | 160 | | } | 161 | | return keys_container.data(); | 162 | | } else if constexpr (T == TYPE_ARRAY) { | 163 | | keys_container.resize(batch_size); | 164 | | for (size_t i = 0; i != batch_size; ++i) { | 165 | | keys_container[i] = Data::get_key(column, i); | 166 | | } | 167 | | return keys_container.data(); | 168 | 4 | } else { | 169 | 4 | return assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&>(column) | 170 | 4 | .get_data() | 171 | 4 | .data(); | 172 | 4 | } | 173 | 4 | } |
Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE8get_keysERSt6vectorINS_7DecimalIiEESaIS7_EERKNS_7IColumnEm _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE8get_keysERSt6vectorINS_7DecimalIlEESaIS7_EERKNS_7IColumnEm Line | Count | Source | 154 | 5 | const IColumn& column, size_t batch_size) { | 155 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 156 | | keys_container.resize(batch_size); | 157 | | for (size_t i = 0; i != batch_size; ++i) { | 158 | | StringRef value = column.get_data_at(i); | 159 | | keys_container[i] = Data::get_key(value); | 160 | | } | 161 | | return keys_container.data(); | 162 | | } else if constexpr (T == TYPE_ARRAY) { | 163 | | keys_container.resize(batch_size); | 164 | | for (size_t i = 0; i != batch_size; ++i) { | 165 | | keys_container[i] = Data::get_key(column, i); | 166 | | } | 167 | | return keys_container.data(); | 168 | 5 | } else { | 169 | 5 | return assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&>(column) | 170 | 5 | .get_data() | 171 | 5 | .data(); | 172 | 5 | } | 173 | 5 | } |
Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE8get_keysERSt6vectorINS_12Decimal128V3ESaIS6_EERKNS_7IColumnEm _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE8get_keysERSt6vectorINS_7DecimalIN4wide7integerILm256EiEEEESaISA_EERKNS_7IColumnEm Line | Count | Source | 154 | 11 | const IColumn& column, size_t batch_size) { | 155 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 156 | | keys_container.resize(batch_size); | 157 | | for (size_t i = 0; i != batch_size; ++i) { | 158 | | StringRef value = column.get_data_at(i); | 159 | | keys_container[i] = Data::get_key(value); | 160 | | } | 161 | | return keys_container.data(); | 162 | | } else if constexpr (T == TYPE_ARRAY) { | 163 | | keys_container.resize(batch_size); | 164 | | for (size_t i = 0; i != batch_size; ++i) { | 165 | | keys_container[i] = Data::get_key(column, i); | 166 | | } | 167 | | return keys_container.data(); | 168 | 11 | } else { | 169 | 11 | return assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&>(column) | 170 | 11 | .get_data() | 171 | 11 | .data(); | 172 | 11 | } | 173 | 11 | } |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE8get_keysERSt6vectorIN4wide7integerILm128EjEESaIS8_EERKNS_7IColumnEm Line | Count | Source | 154 | 240 | const IColumn& column, size_t batch_size) { | 155 | 240 | if constexpr (is_string_type(T) || is_varbinary(T)) { | 156 | 240 | keys_container.resize(batch_size); | 157 | 10.4k | for (size_t i = 0; i != batch_size; ++i) { | 158 | 10.1k | StringRef value = column.get_data_at(i); | 159 | 10.1k | keys_container[i] = Data::get_key(value); | 160 | 10.1k | } | 161 | 240 | return keys_container.data(); | 162 | | } else if constexpr (T == TYPE_ARRAY) { | 163 | | keys_container.resize(batch_size); | 164 | | for (size_t i = 0; i != batch_size; ++i) { | 165 | | keys_container[i] = Data::get_key(column, i); | 166 | | } | 167 | | return keys_container.data(); | 168 | | } else { | 169 | | return assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&>(column) | 170 | | .get_data() | 171 | | .data(); | 172 | | } | 173 | 240 | } |
Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE8get_keysERSt6vectorImSaImEERKNS_7IColumnEm Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE8get_keysERSt6vectorIfSaIfEERKNS_7IColumnEm Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE8get_keysERSt6vectorIdSaIdEERKNS_7IColumnEm _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE8get_keysERSt6vectorINS_11DateV2ValueINS_15DateV2ValueTypeEEESaIS8_EERKNS_7IColumnEm Line | Count | Source | 154 | 169 | const IColumn& column, size_t batch_size) { | 155 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 156 | | keys_container.resize(batch_size); | 157 | | for (size_t i = 0; i != batch_size; ++i) { | 158 | | StringRef value = column.get_data_at(i); | 159 | | keys_container[i] = Data::get_key(value); | 160 | | } | 161 | | return keys_container.data(); | 162 | | } else if constexpr (T == TYPE_ARRAY) { | 163 | | keys_container.resize(batch_size); | 164 | | for (size_t i = 0; i != batch_size; ++i) { | 165 | | keys_container[i] = Data::get_key(column, i); | 166 | | } | 167 | | return keys_container.data(); | 168 | 169 | } else { | 169 | 169 | return assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&>(column) | 170 | 169 | .get_data() | 171 | 169 | .data(); | 172 | 169 | } | 173 | 169 | } |
Unexecuted instantiation: _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE8get_keysERSt6vectorINS_11DateV2ValueINS_19DateTimeV2ValueTypeEEESaIS8_EERKNS_7IColumnEm _ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE8get_keysERSt6vectorINS_16TimestampTzValueESaIS6_EERKNS_7IColumnEm Line | Count | Source | 154 | 36 | const IColumn& column, size_t batch_size) { | 155 | | if constexpr (is_string_type(T) || is_varbinary(T)) { | 156 | | keys_container.resize(batch_size); | 157 | | for (size_t i = 0; i != batch_size; ++i) { | 158 | | StringRef value = column.get_data_at(i); | 159 | | keys_container[i] = Data::get_key(value); | 160 | | } | 161 | | return keys_container.data(); | 162 | | } else if constexpr (T == TYPE_ARRAY) { | 163 | | keys_container.resize(batch_size); | 164 | | for (size_t i = 0; i != batch_size; ++i) { | 165 | | keys_container[i] = Data::get_key(column, i); | 166 | | } | 167 | | return keys_container.data(); | 168 | 36 | } else { | 169 | 36 | return assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&>(column) | 170 | 36 | .get_data() | 171 | 36 | .data(); | 172 | 36 | } | 173 | 36 | } |
_ZN5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE8get_keysERSt6vectorIN4wide7integerILm128EjEESaIS8_EERKNS_7IColumnEm Line | Count | Source | 154 | 24 | const IColumn& column, size_t batch_size) { | 155 | 24 | if constexpr (is_string_type(T) || is_varbinary(T)) { | 156 | 24 | keys_container.resize(batch_size); | 157 | 48 | for (size_t i = 0; i != batch_size; ++i) { | 158 | 24 | StringRef value = column.get_data_at(i); | 159 | 24 | keys_container[i] = Data::get_key(value); | 160 | 24 | } | 161 | 24 | return keys_container.data(); | 162 | | } else if constexpr (T == TYPE_ARRAY) { | 163 | | keys_container.resize(batch_size); | 164 | | for (size_t i = 0; i != batch_size; ++i) { | 165 | | keys_container[i] = Data::get_key(column, i); | 166 | | } | 167 | | return keys_container.data(); | 168 | | } else { | 169 | | return assert_cast<const typename PrimitiveTypeTraits<T>::ColumnType&>(column) | 170 | | .get_data() | 171 | | .data(); | 172 | | } | 173 | 24 | } |
|
174 | | |
175 | | void add_batch(size_t batch_size, AggregateDataPtr* places, size_t place_offset, |
176 | 850 | const IColumn** columns, Arena&, bool /*agg_many*/) const override { |
177 | 850 | std::vector<KeyType> keys_container; |
178 | 850 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); |
179 | | |
180 | 850 | std::vector<typename Data::Set*> array_of_data_set(batch_size); |
181 | | |
182 | 40.9k | for (size_t i = 0; i != batch_size; ++i) { |
183 | 40.1k | array_of_data_set[i] = &(this->data(places[i] + place_offset).set); |
184 | 40.1k | } |
185 | | |
186 | | // Precompute hash values to avoid double computation in prefetch + insert |
187 | 850 | std::vector<size_t> hash_values(batch_size); |
188 | 40.9k | for (size_t i = 0; i < batch_size; ++i) { |
189 | 40.1k | hash_values[i] = array_of_data_set[i]->hash(keys[i]); |
190 | 40.1k | } |
191 | | |
192 | 40.9k | for (size_t i = 0; i != batch_size; ++i) { |
193 | 40.1k | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { |
194 | 36.0k | array_of_data_set[i + HASH_MAP_PREFETCH_DIST]->prefetch_hash( |
195 | 36.0k | hash_values[i + HASH_MAP_PREFETCH_DIST]); |
196 | 36.0k | } |
197 | | |
198 | 40.1k | array_of_data_set[i]->emplace_with_hash(hash_values[i], keys[i]); |
199 | 40.1k | } |
200 | 850 | } Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb Line | Count | Source | 176 | 4 | const IColumn** columns, Arena&, bool /*agg_many*/) const override { | 177 | 4 | std::vector<KeyType> keys_container; | 178 | 4 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 179 | | | 180 | 4 | std::vector<typename Data::Set*> array_of_data_set(batch_size); | 181 | | | 182 | 10 | for (size_t i = 0; i != batch_size; ++i) { | 183 | 6 | array_of_data_set[i] = &(this->data(places[i] + place_offset).set); | 184 | 6 | } | 185 | | | 186 | | // Precompute hash values to avoid double computation in prefetch + insert | 187 | 4 | std::vector<size_t> hash_values(batch_size); | 188 | 10 | for (size_t i = 0; i < batch_size; ++i) { | 189 | 6 | hash_values[i] = array_of_data_set[i]->hash(keys[i]); | 190 | 6 | } | 191 | | | 192 | 10 | for (size_t i = 0; i != batch_size; ++i) { | 193 | 6 | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 194 | 0 | array_of_data_set[i + HASH_MAP_PREFETCH_DIST]->prefetch_hash( | 195 | 0 | hash_values[i + HASH_MAP_PREFETCH_DIST]); | 196 | 0 | } | 197 | | | 198 | 6 | array_of_data_set[i]->emplace_with_hash(hash_values[i], keys[i]); | 199 | 6 | } | 200 | 4 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb Line | Count | Source | 176 | 410 | const IColumn** columns, Arena&, bool /*agg_many*/) const override { | 177 | 410 | std::vector<KeyType> keys_container; | 178 | 410 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 179 | | | 180 | 410 | std::vector<typename Data::Set*> array_of_data_set(batch_size); | 181 | | | 182 | 38.7k | for (size_t i = 0; i != batch_size; ++i) { | 183 | 38.3k | array_of_data_set[i] = &(this->data(places[i] + place_offset).set); | 184 | 38.3k | } | 185 | | | 186 | | // Precompute hash values to avoid double computation in prefetch + insert | 187 | 410 | std::vector<size_t> hash_values(batch_size); | 188 | 38.7k | for (size_t i = 0; i < batch_size; ++i) { | 189 | 38.3k | hash_values[i] = array_of_data_set[i]->hash(keys[i]); | 190 | 38.3k | } | 191 | | | 192 | 38.7k | for (size_t i = 0; i != batch_size; ++i) { | 193 | 38.3k | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 194 | 35.8k | array_of_data_set[i + HASH_MAP_PREFETCH_DIST]->prefetch_hash( | 195 | 35.8k | hash_values[i + HASH_MAP_PREFETCH_DIST]); | 196 | 35.8k | } | 197 | | | 198 | 38.3k | array_of_data_set[i]->emplace_with_hash(hash_values[i], keys[i]); | 199 | 38.3k | } | 200 | 410 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb Line | Count | Source | 176 | 76 | const IColumn** columns, Arena&, bool /*agg_many*/) const override { | 177 | 76 | std::vector<KeyType> keys_container; | 178 | 76 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 179 | | | 180 | 76 | std::vector<typename Data::Set*> array_of_data_set(batch_size); | 181 | | | 182 | 259 | for (size_t i = 0; i != batch_size; ++i) { | 183 | 183 | array_of_data_set[i] = &(this->data(places[i] + place_offset).set); | 184 | 183 | } | 185 | | | 186 | | // Precompute hash values to avoid double computation in prefetch + insert | 187 | 76 | std::vector<size_t> hash_values(batch_size); | 188 | 259 | for (size_t i = 0; i < batch_size; ++i) { | 189 | 183 | hash_values[i] = array_of_data_set[i]->hash(keys[i]); | 190 | 183 | } | 191 | | | 192 | 259 | for (size_t i = 0; i != batch_size; ++i) { | 193 | 183 | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 194 | 0 | array_of_data_set[i + HASH_MAP_PREFETCH_DIST]->prefetch_hash( | 195 | 0 | hash_values[i + HASH_MAP_PREFETCH_DIST]); | 196 | 0 | } | 197 | | | 198 | 183 | array_of_data_set[i]->emplace_with_hash(hash_values[i], keys[i]); | 199 | 183 | } | 200 | 76 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb Line | Count | Source | 176 | 5 | const IColumn** columns, Arena&, bool /*agg_many*/) const override { | 177 | 5 | std::vector<KeyType> keys_container; | 178 | 5 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 179 | | | 180 | 5 | std::vector<typename Data::Set*> array_of_data_set(batch_size); | 181 | | | 182 | 35 | for (size_t i = 0; i != batch_size; ++i) { | 183 | 30 | array_of_data_set[i] = &(this->data(places[i] + place_offset).set); | 184 | 30 | } | 185 | | | 186 | | // Precompute hash values to avoid double computation in prefetch + insert | 187 | 5 | std::vector<size_t> hash_values(batch_size); | 188 | 35 | for (size_t i = 0; i < batch_size; ++i) { | 189 | 30 | hash_values[i] = array_of_data_set[i]->hash(keys[i]); | 190 | 30 | } | 191 | | | 192 | 35 | for (size_t i = 0; i != batch_size; ++i) { | 193 | 30 | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 194 | 0 | array_of_data_set[i + HASH_MAP_PREFETCH_DIST]->prefetch_hash( | 195 | 0 | hash_values[i + HASH_MAP_PREFETCH_DIST]); | 196 | 0 | } | 197 | | | 198 | 30 | array_of_data_set[i]->emplace_with_hash(hash_values[i], keys[i]); | 199 | 30 | } | 200 | 5 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb Line | Count | Source | 176 | 11 | const IColumn** columns, Arena&, bool /*agg_many*/) const override { | 177 | 11 | std::vector<KeyType> keys_container; | 178 | 11 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 179 | | | 180 | 11 | std::vector<typename Data::Set*> array_of_data_set(batch_size); | 181 | | | 182 | 65 | for (size_t i = 0; i != batch_size; ++i) { | 183 | 54 | array_of_data_set[i] = &(this->data(places[i] + place_offset).set); | 184 | 54 | } | 185 | | | 186 | | // Precompute hash values to avoid double computation in prefetch + insert | 187 | 11 | std::vector<size_t> hash_values(batch_size); | 188 | 65 | for (size_t i = 0; i < batch_size; ++i) { | 189 | 54 | hash_values[i] = array_of_data_set[i]->hash(keys[i]); | 190 | 54 | } | 191 | | | 192 | 65 | for (size_t i = 0; i != batch_size; ++i) { | 193 | 54 | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 194 | 0 | array_of_data_set[i + HASH_MAP_PREFETCH_DIST]->prefetch_hash( | 195 | 0 | hash_values[i + HASH_MAP_PREFETCH_DIST]); | 196 | 0 | } | 197 | | | 198 | 54 | array_of_data_set[i]->emplace_with_hash(hash_values[i], keys[i]); | 199 | 54 | } | 200 | 11 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb Line | Count | Source | 176 | 139 | const IColumn** columns, Arena&, bool /*agg_many*/) const override { | 177 | 139 | std::vector<KeyType> keys_container; | 178 | 139 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 179 | | | 180 | 139 | std::vector<typename Data::Set*> array_of_data_set(batch_size); | 181 | | | 182 | 511 | for (size_t i = 0; i != batch_size; ++i) { | 183 | 372 | array_of_data_set[i] = &(this->data(places[i] + place_offset).set); | 184 | 372 | } | 185 | | | 186 | | // Precompute hash values to avoid double computation in prefetch + insert | 187 | 139 | std::vector<size_t> hash_values(batch_size); | 188 | 511 | for (size_t i = 0; i < batch_size; ++i) { | 189 | 372 | hash_values[i] = array_of_data_set[i]->hash(keys[i]); | 190 | 372 | } | 191 | | | 192 | 511 | for (size_t i = 0; i != batch_size; ++i) { | 193 | 372 | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 194 | 5 | array_of_data_set[i + HASH_MAP_PREFETCH_DIST]->prefetch_hash( | 195 | 5 | hash_values[i + HASH_MAP_PREFETCH_DIST]); | 196 | 5 | } | 197 | | | 198 | 372 | array_of_data_set[i]->emplace_with_hash(hash_values[i], keys[i]); | 199 | 372 | } | 200 | 139 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb Line | Count | Source | 176 | 169 | const IColumn** columns, Arena&, bool /*agg_many*/) const override { | 177 | 169 | std::vector<KeyType> keys_container; | 178 | 169 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 179 | | | 180 | 169 | std::vector<typename Data::Set*> array_of_data_set(batch_size); | 181 | | | 182 | 1.22k | for (size_t i = 0; i != batch_size; ++i) { | 183 | 1.05k | array_of_data_set[i] = &(this->data(places[i] + place_offset).set); | 184 | 1.05k | } | 185 | | | 186 | | // Precompute hash values to avoid double computation in prefetch + insert | 187 | 169 | std::vector<size_t> hash_values(batch_size); | 188 | 1.22k | for (size_t i = 0; i < batch_size; ++i) { | 189 | 1.05k | hash_values[i] = array_of_data_set[i]->hash(keys[i]); | 190 | 1.05k | } | 191 | | | 192 | 1.22k | for (size_t i = 0; i != batch_size; ++i) { | 193 | 1.05k | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 194 | 152 | array_of_data_set[i + HASH_MAP_PREFETCH_DIST]->prefetch_hash( | 195 | 152 | hash_values[i + HASH_MAP_PREFETCH_DIST]); | 196 | 152 | } | 197 | | | 198 | 1.05k | array_of_data_set[i]->emplace_with_hash(hash_values[i], keys[i]); | 199 | 1.05k | } | 200 | 169 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb Line | Count | Source | 176 | 36 | const IColumn** columns, Arena&, bool /*agg_many*/) const override { | 177 | 36 | std::vector<KeyType> keys_container; | 178 | 36 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 179 | | | 180 | 36 | std::vector<typename Data::Set*> array_of_data_set(batch_size); | 181 | | | 182 | 106 | for (size_t i = 0; i != batch_size; ++i) { | 183 | 70 | array_of_data_set[i] = &(this->data(places[i] + place_offset).set); | 184 | 70 | } | 185 | | | 186 | | // Precompute hash values to avoid double computation in prefetch + insert | 187 | 36 | std::vector<size_t> hash_values(batch_size); | 188 | 106 | for (size_t i = 0; i < batch_size; ++i) { | 189 | 70 | hash_values[i] = array_of_data_set[i]->hash(keys[i]); | 190 | 70 | } | 191 | | | 192 | 106 | for (size_t i = 0; i != batch_size; ++i) { | 193 | 70 | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 194 | 0 | array_of_data_set[i + HASH_MAP_PREFETCH_DIST]->prefetch_hash( | 195 | 0 | hash_values[i + HASH_MAP_PREFETCH_DIST]); | 196 | 0 | } | 197 | | | 198 | 70 | array_of_data_set[i]->emplace_with_hash(hash_values[i], keys[i]); | 199 | 70 | } | 200 | 36 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE9add_batchEmPPcmPPKNS_7IColumnERNS_5ArenaEb |
201 | | |
202 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
203 | 76 | Arena&) const override { |
204 | 76 | auto& rhs_set = this->data(rhs).set; |
205 | 76 | if (rhs_set.size() == 0) return; |
206 | | |
207 | 76 | auto& set = this->data(place).set; |
208 | 76 | set.rehash(set.size() + rhs_set.size()); |
209 | | |
210 | 87 | for (auto elem : rhs_set) { |
211 | 87 | set.insert(elem); |
212 | 87 | } |
213 | 76 | } Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE5mergeEPcPKcRNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 203 | 76 | Arena&) const override { | 204 | 76 | auto& rhs_set = this->data(rhs).set; | 205 | 76 | if (rhs_set.size() == 0) return; | 206 | | | 207 | 76 | auto& set = this->data(place).set; | 208 | 76 | set.rehash(set.size() + rhs_set.size()); | 209 | | | 210 | 87 | for (auto elem : rhs_set) { | 211 | 87 | set.insert(elem); | 212 | 87 | } | 213 | 76 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE5mergeEPcPKcRNS_5ArenaE |
214 | | |
215 | | void add_batch_single_place(size_t batch_size, AggregateDataPtr place, const IColumn** columns, |
216 | 541 | Arena&) const override { |
217 | 541 | std::vector<KeyType> keys_container; |
218 | 541 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); |
219 | 541 | auto& set = this->data(place).set; |
220 | | |
221 | | // Precompute hash values to avoid double computation in prefetch + insert |
222 | 541 | std::vector<size_t> hash_values(batch_size); |
223 | 61.6k | for (size_t i = 0; i < batch_size; ++i) { |
224 | 61.1k | hash_values[i] = set.hash(keys[i]); |
225 | 61.1k | } |
226 | | |
227 | 61.5k | for (size_t i = 0; i != batch_size; ++i) { |
228 | 61.0k | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { |
229 | 56.0k | set.prefetch_hash(hash_values[i + HASH_MAP_PREFETCH_DIST]); |
230 | 56.0k | } |
231 | 61.0k | set.emplace_with_hash(hash_values[i], keys[i]); |
232 | 61.0k | } |
233 | 541 | } Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Line | Count | Source | 216 | 12 | Arena&) const override { | 217 | 12 | std::vector<KeyType> keys_container; | 218 | 12 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 219 | 12 | auto& set = this->data(place).set; | 220 | | | 221 | | // Precompute hash values to avoid double computation in prefetch + insert | 222 | 12 | std::vector<size_t> hash_values(batch_size); | 223 | 39 | for (size_t i = 0; i < batch_size; ++i) { | 224 | 27 | hash_values[i] = set.hash(keys[i]); | 225 | 27 | } | 226 | | | 227 | 39 | for (size_t i = 0; i != batch_size; ++i) { | 228 | 27 | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 229 | 0 | set.prefetch_hash(hash_values[i + HASH_MAP_PREFETCH_DIST]); | 230 | 0 | } | 231 | 27 | set.emplace_with_hash(hash_values[i], keys[i]); | 232 | 27 | } | 233 | 12 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Line | Count | Source | 216 | 232 | Arena&) const override { | 217 | 232 | std::vector<KeyType> keys_container; | 218 | 232 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 219 | 232 | auto& set = this->data(place).set; | 220 | | | 221 | | // Precompute hash values to avoid double computation in prefetch + insert | 222 | 232 | std::vector<size_t> hash_values(batch_size); | 223 | 2.14k | for (size_t i = 0; i < batch_size; ++i) { | 224 | 1.91k | hash_values[i] = set.hash(keys[i]); | 225 | 1.91k | } | 226 | | | 227 | 2.15k | for (size_t i = 0; i != batch_size; ++i) { | 228 | 1.91k | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 229 | 512 | set.prefetch_hash(hash_values[i + HASH_MAP_PREFETCH_DIST]); | 230 | 512 | } | 231 | 1.91k | set.emplace_with_hash(hash_values[i], keys[i]); | 232 | 1.91k | } | 233 | 232 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Line | Count | Source | 216 | 168 | Arena&) const override { | 217 | 168 | std::vector<KeyType> keys_container; | 218 | 168 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 219 | 168 | auto& set = this->data(place).set; | 220 | | | 221 | | // Precompute hash values to avoid double computation in prefetch + insert | 222 | 168 | std::vector<size_t> hash_values(batch_size); | 223 | 49.5k | for (size_t i = 0; i < batch_size; ++i) { | 224 | 49.3k | hash_values[i] = set.hash(keys[i]); | 225 | 49.3k | } | 226 | | | 227 | 49.4k | for (size_t i = 0; i != batch_size; ++i) { | 228 | 49.2k | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 229 | 47.3k | set.prefetch_hash(hash_values[i + HASH_MAP_PREFETCH_DIST]); | 230 | 47.3k | } | 231 | 49.2k | set.emplace_with_hash(hash_values[i], keys[i]); | 232 | 49.2k | } | 233 | 168 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Line | Count | Source | 216 | 4 | Arena&) const override { | 217 | 4 | std::vector<KeyType> keys_container; | 218 | 4 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 219 | 4 | auto& set = this->data(place).set; | 220 | | | 221 | | // Precompute hash values to avoid double computation in prefetch + insert | 222 | 4 | std::vector<size_t> hash_values(batch_size); | 223 | 8 | for (size_t i = 0; i < batch_size; ++i) { | 224 | 4 | hash_values[i] = set.hash(keys[i]); | 225 | 4 | } | 226 | | | 227 | 8 | for (size_t i = 0; i != batch_size; ++i) { | 228 | 4 | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 229 | 0 | set.prefetch_hash(hash_values[i + HASH_MAP_PREFETCH_DIST]); | 230 | 0 | } | 231 | 4 | set.emplace_with_hash(hash_values[i], keys[i]); | 232 | 4 | } | 233 | 4 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Line | Count | Source | 216 | 101 | Arena&) const override { | 217 | 101 | std::vector<KeyType> keys_container; | 218 | 101 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 219 | 101 | auto& set = this->data(place).set; | 220 | | | 221 | | // Precompute hash values to avoid double computation in prefetch + insert | 222 | 101 | std::vector<size_t> hash_values(batch_size); | 223 | 9.91k | for (size_t i = 0; i < batch_size; ++i) { | 224 | 9.81k | hash_values[i] = set.hash(keys[i]); | 225 | 9.81k | } | 226 | | | 227 | 9.88k | for (size_t i = 0; i != batch_size; ++i) { | 228 | 9.78k | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 229 | 8.20k | set.prefetch_hash(hash_values[i + HASH_MAP_PREFETCH_DIST]); | 230 | 8.20k | } | 231 | 9.78k | set.emplace_with_hash(hash_values[i], keys[i]); | 232 | 9.78k | } | 233 | 101 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Line | Count | Source | 216 | 24 | Arena&) const override { | 217 | 24 | std::vector<KeyType> keys_container; | 218 | 24 | const KeyType* keys = get_keys(keys_container, *columns[0], batch_size); | 219 | 24 | auto& set = this->data(place).set; | 220 | | | 221 | | // Precompute hash values to avoid double computation in prefetch + insert | 222 | 24 | std::vector<size_t> hash_values(batch_size); | 223 | 48 | for (size_t i = 0; i < batch_size; ++i) { | 224 | 24 | hash_values[i] = set.hash(keys[i]); | 225 | 24 | } | 226 | | | 227 | 48 | for (size_t i = 0; i != batch_size; ++i) { | 228 | 24 | if (i + HASH_MAP_PREFETCH_DIST < batch_size) { | 229 | 0 | set.prefetch_hash(hash_values[i + HASH_MAP_PREFETCH_DIST]); | 230 | 0 | } | 231 | 24 | set.emplace_with_hash(hash_values[i], keys[i]); | 232 | 24 | } | 233 | 24 | } |
|
234 | | |
235 | 7.51k | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
236 | 7.51k | auto& set = this->data(place).set; |
237 | 7.51k | buf.write_var_uint(set.size()); |
238 | 25.4k | for (const auto& elem : set) { |
239 | 25.4k | buf.write_binary(elem); |
240 | 25.4k | } |
241 | 7.51k | } _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 11 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 11 | auto& set = this->data(place).set; | 237 | 11 | buf.write_var_uint(set.size()); | 238 | 11 | for (const auto& elem : set) { | 239 | 11 | buf.write_binary(elem); | 240 | 11 | } | 241 | 11 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 6 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 6 | auto& set = this->data(place).set; | 237 | 6 | buf.write_var_uint(set.size()); | 238 | 6 | for (const auto& elem : set) { | 239 | 6 | buf.write_binary(elem); | 240 | 6 | } | 241 | 6 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE9serializeEPKcRNS_14BufferWritableE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 6.32k | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 6.32k | auto& set = this->data(place).set; | 237 | 6.32k | buf.write_var_uint(set.size()); | 238 | 24.4k | for (const auto& elem : set) { | 239 | 24.4k | buf.write_binary(elem); | 240 | 24.4k | } | 241 | 6.32k | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 60 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 60 | auto& set = this->data(place).set; | 237 | 60 | buf.write_var_uint(set.size()); | 238 | 62 | for (const auto& elem : set) { | 239 | 62 | buf.write_binary(elem); | 240 | 62 | } | 241 | 60 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE9serializeEPKcRNS_14BufferWritableE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 11 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 11 | auto& set = this->data(place).set; | 237 | 11 | buf.write_var_uint(set.size()); | 238 | 24 | for (const auto& elem : set) { | 239 | 24 | buf.write_binary(elem); | 240 | 24 | } | 241 | 11 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE9serializeEPKcRNS_14BufferWritableE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 10 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 10 | auto& set = this->data(place).set; | 237 | 10 | buf.write_var_uint(set.size()); | 238 | 20 | for (const auto& elem : set) { | 239 | 20 | buf.write_binary(elem); | 240 | 20 | } | 241 | 10 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 973 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 973 | auto& set = this->data(place).set; | 237 | 973 | buf.write_var_uint(set.size()); | 238 | 973 | for (const auto& elem : set) { | 239 | 740 | buf.write_binary(elem); | 240 | 740 | } | 241 | 973 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 2 | auto& set = this->data(place).set; | 237 | 2 | buf.write_var_uint(set.size()); | 238 | 12 | for (const auto& elem : set) { | 239 | 12 | buf.write_binary(elem); | 240 | 12 | } | 241 | 2 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE9serializeEPKcRNS_14BufferWritableE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 51 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 51 | auto& set = this->data(place).set; | 237 | 51 | buf.write_var_uint(set.size()); | 238 | 55 | for (const auto& elem : set) { | 239 | 55 | buf.write_binary(elem); | 240 | 55 | } | 241 | 51 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 1 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 1 | auto& set = this->data(place).set; | 237 | 1 | buf.write_var_uint(set.size()); | 238 | 12 | for (const auto& elem : set) { | 239 | 12 | buf.write_binary(elem); | 240 | 12 | } | 241 | 1 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 42 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 42 | auto& set = this->data(place).set; | 237 | 42 | buf.write_var_uint(set.size()); | 238 | 68 | for (const auto& elem : set) { | 239 | 68 | buf.write_binary(elem); | 240 | 68 | } | 241 | 42 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 235 | 24 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 236 | 24 | auto& set = this->data(place).set; | 237 | 24 | buf.write_var_uint(set.size()); | 238 | 24 | for (const auto& elem : set) { | 239 | 24 | buf.write_binary(elem); | 240 | 24 | } | 241 | 24 | } |
|
242 | | |
243 | | void deserialize_and_merge(AggregateDataPtr __restrict place, AggregateDataPtr __restrict rhs, |
244 | 7.37k | BufferReadable& buf, Arena&) const override { |
245 | 7.37k | auto& set = this->data(place).set; |
246 | 7.37k | UInt64 size; |
247 | 7.37k | buf.read_var_uint(size); |
248 | | |
249 | 7.37k | set.rehash(size + set.size()); |
250 | | |
251 | 32.6k | for (size_t i = 0; i < size; ++i) { |
252 | 25.3k | KeyType ref; |
253 | 25.3k | buf.read_binary(ref); |
254 | 25.3k | set.insert(ref); |
255 | 25.3k | } |
256 | 7.37k | } _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 11 | BufferReadable& buf, Arena&) const override { | 245 | 11 | auto& set = this->data(place).set; | 246 | 11 | UInt64 size; | 247 | 11 | buf.read_var_uint(size); | 248 | | | 249 | 11 | set.rehash(size + set.size()); | 250 | | | 251 | 22 | for (size_t i = 0; i < size; ++i) { | 252 | 11 | KeyType ref; | 253 | 11 | buf.read_binary(ref); | 254 | 11 | set.insert(ref); | 255 | 11 | } | 256 | 11 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 6 | BufferReadable& buf, Arena&) const override { | 245 | 6 | auto& set = this->data(place).set; | 246 | 6 | UInt64 size; | 247 | 6 | buf.read_var_uint(size); | 248 | | | 249 | 6 | set.rehash(size + set.size()); | 250 | | | 251 | 12 | for (size_t i = 0; i < size; ++i) { | 252 | 6 | KeyType ref; | 253 | 6 | buf.read_binary(ref); | 254 | 6 | set.insert(ref); | 255 | 6 | } | 256 | 6 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 6.28k | BufferReadable& buf, Arena&) const override { | 245 | 6.28k | auto& set = this->data(place).set; | 246 | 6.28k | UInt64 size; | 247 | 6.28k | buf.read_var_uint(size); | 248 | | | 249 | 6.28k | set.rehash(size + set.size()); | 250 | | | 251 | 30.6k | for (size_t i = 0; i < size; ++i) { | 252 | 24.4k | KeyType ref; | 253 | 24.4k | buf.read_binary(ref); | 254 | 24.4k | set.insert(ref); | 255 | 24.4k | } | 256 | 6.28k | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 60 | BufferReadable& buf, Arena&) const override { | 245 | 60 | auto& set = this->data(place).set; | 246 | 60 | UInt64 size; | 247 | 60 | buf.read_var_uint(size); | 248 | | | 249 | 60 | set.rehash(size + set.size()); | 250 | | | 251 | 122 | for (size_t i = 0; i < size; ++i) { | 252 | 62 | KeyType ref; | 253 | 62 | buf.read_binary(ref); | 254 | 62 | set.insert(ref); | 255 | 62 | } | 256 | 60 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 11 | BufferReadable& buf, Arena&) const override { | 245 | 11 | auto& set = this->data(place).set; | 246 | 11 | UInt64 size; | 247 | 11 | buf.read_var_uint(size); | 248 | | | 249 | 11 | set.rehash(size + set.size()); | 250 | | | 251 | 35 | for (size_t i = 0; i < size; ++i) { | 252 | 24 | KeyType ref; | 253 | 24 | buf.read_binary(ref); | 254 | 24 | set.insert(ref); | 255 | 24 | } | 256 | 11 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 10 | BufferReadable& buf, Arena&) const override { | 245 | 10 | auto& set = this->data(place).set; | 246 | 10 | UInt64 size; | 247 | 10 | buf.read_var_uint(size); | 248 | | | 249 | 10 | set.rehash(size + set.size()); | 250 | | | 251 | 30 | for (size_t i = 0; i < size; ++i) { | 252 | 20 | KeyType ref; | 253 | 20 | buf.read_binary(ref); | 254 | 20 | set.insert(ref); | 255 | 20 | } | 256 | 10 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 877 | BufferReadable& buf, Arena&) const override { | 245 | 877 | auto& set = this->data(place).set; | 246 | 877 | UInt64 size; | 247 | 877 | buf.read_var_uint(size); | 248 | | | 249 | 877 | set.rehash(size + set.size()); | 250 | | | 251 | 1.50k | for (size_t i = 0; i < size; ++i) { | 252 | 627 | KeyType ref; | 253 | 627 | buf.read_binary(ref); | 254 | 627 | set.insert(ref); | 255 | 627 | } | 256 | 877 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 2 | BufferReadable& buf, Arena&) const override { | 245 | 2 | auto& set = this->data(place).set; | 246 | 2 | UInt64 size; | 247 | 2 | buf.read_var_uint(size); | 248 | | | 249 | 2 | set.rehash(size + set.size()); | 250 | | | 251 | 14 | for (size_t i = 0; i < size; ++i) { | 252 | 12 | KeyType ref; | 253 | 12 | buf.read_binary(ref); | 254 | 12 | set.insert(ref); | 255 | 12 | } | 256 | 2 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 51 | BufferReadable& buf, Arena&) const override { | 245 | 51 | auto& set = this->data(place).set; | 246 | 51 | UInt64 size; | 247 | 51 | buf.read_var_uint(size); | 248 | | | 249 | 51 | set.rehash(size + set.size()); | 250 | | | 251 | 106 | for (size_t i = 0; i < size; ++i) { | 252 | 55 | KeyType ref; | 253 | 55 | buf.read_binary(ref); | 254 | 55 | set.insert(ref); | 255 | 55 | } | 256 | 51 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 1 | BufferReadable& buf, Arena&) const override { | 245 | 1 | auto& set = this->data(place).set; | 246 | 1 | UInt64 size; | 247 | 1 | buf.read_var_uint(size); | 248 | | | 249 | 1 | set.rehash(size + set.size()); | 250 | | | 251 | 13 | for (size_t i = 0; i < size; ++i) { | 252 | 12 | KeyType ref; | 253 | 12 | buf.read_binary(ref); | 254 | 12 | set.insert(ref); | 255 | 12 | } | 256 | 1 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 41 | BufferReadable& buf, Arena&) const override { | 245 | 41 | auto& set = this->data(place).set; | 246 | 41 | UInt64 size; | 247 | 41 | buf.read_var_uint(size); | 248 | | | 249 | 41 | set.rehash(size + set.size()); | 250 | | | 251 | 109 | for (size_t i = 0; i < size; ++i) { | 252 | 68 | KeyType ref; | 253 | 68 | buf.read_binary(ref); | 254 | 68 | set.insert(ref); | 255 | 68 | } | 256 | 41 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE21deserialize_and_mergeEPcS5_RNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 244 | 24 | BufferReadable& buf, Arena&) const override { | 245 | 24 | auto& set = this->data(place).set; | 246 | 24 | UInt64 size; | 247 | 24 | buf.read_var_uint(size); | 248 | | | 249 | 24 | set.rehash(size + set.size()); | 250 | | | 251 | 48 | for (size_t i = 0; i < size; ++i) { | 252 | 24 | KeyType ref; | 253 | 24 | buf.read_binary(ref); | 254 | 24 | set.insert(ref); | 255 | 24 | } | 256 | 24 | } |
|
257 | | |
258 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
259 | 76 | Arena&) const override { |
260 | 76 | auto& set = this->data(place).set; |
261 | 76 | UInt64 size; |
262 | 76 | buf.read_var_uint(size); |
263 | | |
264 | 76 | set.rehash(size + set.size()); |
265 | | |
266 | 163 | for (size_t i = 0; i < size; ++i) { |
267 | 87 | KeyType ref; |
268 | 87 | buf.read_binary(ref); |
269 | 87 | set.insert(ref); |
270 | 87 | } |
271 | 76 | } Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 259 | 76 | Arena&) const override { | 260 | 76 | auto& set = this->data(place).set; | 261 | 76 | UInt64 size; | 262 | 76 | buf.read_var_uint(size); | 263 | | | 264 | 76 | set.rehash(size + set.size()); | 265 | | | 266 | 163 | for (size_t i = 0; i < size; ++i) { | 267 | 87 | KeyType ref; | 268 | 87 | buf.read_binary(ref); | 269 | 87 | set.insert(ref); | 270 | 87 | } | 271 | 76 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE |
272 | | |
273 | 10.8k | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
274 | 10.8k | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( |
275 | 10.8k | this->data(place).set.size()); |
276 | 10.8k | } _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE2ENS_30AggregateFunctionUniqExactDataILS1_2EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 11 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 11 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 11 | this->data(place).set.size()); | 276 | 11 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE3ENS_30AggregateFunctionUniqExactDataILS1_3EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 32 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 32 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 32 | this->data(place).set.size()); | 276 | 32 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE4ENS_30AggregateFunctionUniqExactDataILS1_4EEEE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE5ENS_30AggregateFunctionUniqExactDataILS1_5EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 9.36k | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 9.36k | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 9.36k | this->data(place).set.size()); | 276 | 9.36k | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE6ENS_30AggregateFunctionUniqExactDataILS1_6EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 330 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 330 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 330 | this->data(place).set.size()); | 276 | 330 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE7ENS_30AggregateFunctionUniqExactDataILS1_7EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 32 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 32 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 32 | this->data(place).set.size()); | 276 | 32 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE28ENS_30AggregateFunctionUniqExactDataILS1_28EEEE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE29ENS_30AggregateFunctionUniqExactDataILS1_29EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 11 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 11 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 11 | this->data(place).set.size()); | 276 | 11 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE30ENS_30AggregateFunctionUniqExactDataILS1_30EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 17 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 17 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 17 | this->data(place).set.size()); | 276 | 17 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE35ENS_30AggregateFunctionUniqExactDataILS1_35EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 16 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 16 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 16 | this->data(place).set.size()); | 276 | 16 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE10ENS_30AggregateFunctionUniqExactDataILS1_10EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 888 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 888 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 888 | this->data(place).set.size()); | 276 | 888 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE17ENS_30AggregateFunctionUniqExactDataILS1_17EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 2 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 2 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 2 | this->data(place).set.size()); | 276 | 2 | } |
Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE8ENS_30AggregateFunctionUniqExactDataILS1_8EEEE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE9ENS_30AggregateFunctionUniqExactDataILS1_9EEEE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE25ENS_30AggregateFunctionUniqExactDataILS1_25EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 95 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 95 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 95 | this->data(place).set.size()); | 276 | 95 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE26ENS_30AggregateFunctionUniqExactDataILS1_26EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 1 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 1 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 1 | this->data(place).set.size()); | 276 | 1 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE42ENS_30AggregateFunctionUniqExactDataILS1_42EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 42 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 42 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 42 | this->data(place).set.size()); | 276 | 42 | } |
_ZNK5doris21AggregateFunctionUniqILNS_13PrimitiveTypeE41ENS_30AggregateFunctionUniqExactDataILS1_41EEEE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 273 | 8 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 274 | 8 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( | 275 | 8 | this->data(place).set.size()); | 276 | 8 | } |
|
277 | | }; |
278 | | |
279 | | class AggregateFunctionUniqVariant final |
280 | | : public IAggregateFunctionDataHelper<AggregateFunctionUniqVariantData, |
281 | | AggregateFunctionUniqVariant>, |
282 | | UnaryExpression, |
283 | | NotNullableAggregateFunction { |
284 | | public: |
285 | | using Base = IAggregateFunctionDataHelper<AggregateFunctionUniqVariantData, |
286 | | AggregateFunctionUniqVariant>; |
287 | | |
288 | | explicit AggregateFunctionUniqVariant(const DataTypes& argument_types_) |
289 | 4 | : Base(argument_types_) {} |
290 | | |
291 | 0 | String get_name() const override { return AggregateFunctionUniqVariantData::get_name(); } |
292 | | |
293 | 0 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeInt64>(); } |
294 | | |
295 | 1 | void reset(AggregateDataPtr __restrict place) const override { Base::data(place).reset(); } |
296 | | |
297 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
298 | 38 | Arena& arena) const override { |
299 | 38 | const char* begin = nullptr; |
300 | 38 | const StringRef key = columns[0]->serialize_value_into_arena(row_num, arena, begin); |
301 | 38 | const auto [unused, inserted] = Base::data(place).set.emplace(key); |
302 | 38 | static_cast<void>(unused); |
303 | 38 | if (!inserted) { |
304 | 11 | const auto* rolled_back = static_cast<const char*>(arena.rollback(key.size)); |
305 | 11 | DCHECK_EQ(rolled_back, key.data); |
306 | 11 | } |
307 | 38 | } |
308 | | |
309 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
310 | 2 | Arena& arena) const override { |
311 | 2 | auto& destination = Base::data(place); |
312 | 2 | const auto& source = Base::data(rhs); |
313 | 2 | destination.set.reserve(destination.set.size() + source.set.size()); |
314 | 5 | for (const StringRef key : source.set) { |
315 | 5 | destination.insert_borrowed(key, arena); |
316 | 5 | } |
317 | 2 | } |
318 | | |
319 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
320 | 2 | const auto& set = Base::data(place).set; |
321 | 2 | buf.write_var_uint(set.size()); |
322 | 10 | for (const StringRef key : set) { |
323 | 10 | buf.write_binary(key); |
324 | 10 | } |
325 | 2 | } |
326 | | |
327 | | void deserialize_and_merge(AggregateDataPtr __restrict place, AggregateDataPtr __restrict rhs, |
328 | 1 | BufferReadable& buf, Arena& arena) const override { |
329 | 1 | static_cast<void>(rhs); |
330 | 1 | deserialize(place, buf, arena); |
331 | 1 | } |
332 | | |
333 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
334 | 3 | Arena& arena) const override { |
335 | 3 | auto& data = Base::data(place); |
336 | 3 | UInt64 size = 0; |
337 | 3 | buf.read_var_uint(size); |
338 | 3 | data.set.reserve(data.set.size() + size); |
339 | 18 | for (size_t index = 0; index < size; ++index) { |
340 | 15 | StringRef borrowed; |
341 | 15 | buf.read_binary(borrowed); |
342 | 15 | data.insert_borrowed(borrowed, arena); |
343 | 15 | } |
344 | 3 | } |
345 | | |
346 | 10 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
347 | 10 | assert_cast<ColumnInt64&, TypeCheckOnRelease::DISABLE>(to).get_data().push_back( |
348 | 10 | Base::data(place).set.size()); |
349 | 10 | } |
350 | | }; |
351 | | |
352 | | } // namespace doris |