be/src/exprs/aggregate/aggregate_function_distinct.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/AggregateFunctionDistinct.h |
19 | | // and modified by Doris |
20 | | |
21 | | #pragma once |
22 | | |
23 | | #include <assert.h> |
24 | | #include <glog/logging.h> |
25 | | #include <stddef.h> |
26 | | |
27 | | #include <type_traits> |
28 | | #include <utility> |
29 | | #include <vector> |
30 | | |
31 | | #include "core/assert_cast.h" |
32 | | #include "core/column/column.h" |
33 | | #include "core/data_type/data_type.h" |
34 | | #include "core/string_ref.h" |
35 | | #include "core/types.h" |
36 | | #include "exprs/aggregate/aggregate_function.h" |
37 | | |
38 | | namespace doris { |
39 | | #include "common/compile_check_begin.h" |
40 | | class Arena; |
41 | | class BufferReadable; |
42 | | class BufferWritable; |
43 | | template <PrimitiveType> |
44 | | class ColumnVector; |
45 | | } // namespace doris |
46 | | template <typename, typename> |
47 | | struct DefaultHash; |
48 | | |
49 | | namespace doris { |
50 | | |
51 | | template <PrimitiveType T, bool stable> |
52 | | struct AggregateFunctionDistinctSingleNumericData { |
53 | | /// When creating, the hash table must be small. |
54 | | using Container = std::conditional_t< |
55 | | stable, phmap::flat_hash_map<typename PrimitiveTypeTraits<T>::CppType, uint32_t>, |
56 | | phmap::flat_hash_set<typename PrimitiveTypeTraits<T>::CppType>>; |
57 | | using Self = AggregateFunctionDistinctSingleNumericData<T, stable>; |
58 | | Container data; |
59 | | |
60 | 434 | void clear() { data.clear(); }Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE5clearEv Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE5clearEv _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE5clearEv Line | Count | Source | 60 | 8 | void clear() { data.clear(); } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE5clearEv _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE5clearEv Line | Count | Source | 60 | 346 | void clear() { data.clear(); } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE5clearEv _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE5clearEv Line | Count | Source | 60 | 80 | void clear() { data.clear(); } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE5clearEv Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE5clearEv Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE5clearEv |
61 | | |
62 | 8.99k | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { |
63 | 8.99k | const auto& vec = |
64 | 8.99k | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) |
65 | 8.99k | .get_data(); |
66 | 8.99k | if constexpr (stable) { |
67 | 0 | data.emplace(vec[row_num], data.size()); |
68 | 8.99k | } else { |
69 | 8.99k | data.insert(vec[row_num]); |
70 | 8.99k | } |
71 | 8.99k | } Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 62 | 2.05k | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { | 63 | 2.05k | const auto& vec = | 64 | 2.05k | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) | 65 | 2.05k | .get_data(); | 66 | | if constexpr (stable) { | 67 | | data.emplace(vec[row_num], data.size()); | 68 | 2.05k | } else { | 69 | 2.05k | data.insert(vec[row_num]); | 70 | 2.05k | } | 71 | 2.05k | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 62 | 4.81k | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { | 63 | 4.81k | const auto& vec = | 64 | 4.81k | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) | 65 | 4.81k | .get_data(); | 66 | | if constexpr (stable) { | 67 | | data.emplace(vec[row_num], data.size()); | 68 | 4.81k | } else { | 69 | 4.81k | data.insert(vec[row_num]); | 70 | 4.81k | } | 71 | 4.81k | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 62 | 2.12k | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { | 63 | 2.12k | const auto& vec = | 64 | 2.12k | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) | 65 | 2.12k | .get_data(); | 66 | | if constexpr (stable) { | 67 | | data.emplace(vec[row_num], data.size()); | 68 | 2.12k | } else { | 69 | 2.12k | data.insert(vec[row_num]); | 70 | 2.12k | } | 71 | 2.12k | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE |
72 | | |
73 | 508 | void merge(const Self& rhs, Arena&) { |
74 | 508 | DCHECK(!stable); |
75 | 508 | if constexpr (!stable) { |
76 | 508 | data.merge(Container(rhs.data)); |
77 | 508 | } |
78 | 508 | } Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE5mergeERKS2_RNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE5mergeERKS2_RNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE5mergeERKS2_RNS_5ArenaE Line | Count | Source | 73 | 2 | void merge(const Self& rhs, Arena&) { | 74 | 2 | DCHECK(!stable); | 75 | 2 | if constexpr (!stable) { | 76 | 2 | data.merge(Container(rhs.data)); | 77 | 2 | } | 78 | 2 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE5mergeERKS2_RNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE5mergeERKS2_RNS_5ArenaE Line | Count | Source | 73 | 458 | void merge(const Self& rhs, Arena&) { | 74 | 458 | DCHECK(!stable); | 75 | 458 | if constexpr (!stable) { | 76 | 458 | data.merge(Container(rhs.data)); | 77 | 458 | } | 78 | 458 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE5mergeERKS2_RNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE5mergeERKS2_RNS_5ArenaE Line | Count | Source | 73 | 48 | void merge(const Self& rhs, Arena&) { | 74 | 48 | DCHECK(!stable); | 75 | 48 | if constexpr (!stable) { | 76 | 48 | data.merge(Container(rhs.data)); | 77 | 48 | } | 78 | 48 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE5mergeERKS2_RNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE5mergeERKS2_RNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE5mergeERKS2_RNS_5ArenaE |
79 | | |
80 | 587 | void serialize(BufferWritable& buf) const { |
81 | 587 | DCHECK(!stable); |
82 | 587 | if constexpr (!stable) { |
83 | 587 | buf.write_var_uint(data.size()); |
84 | 4.68k | for (const auto& value : data) { |
85 | 4.68k | buf.write_binary(value); |
86 | 4.68k | } |
87 | 587 | } |
88 | 587 | } Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE9serializeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE9serializeERNS_14BufferWritableE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE9serializeERNS_14BufferWritableE Line | Count | Source | 80 | 2 | void serialize(BufferWritable& buf) const { | 81 | 2 | DCHECK(!stable); | 82 | 2 | if constexpr (!stable) { | 83 | 2 | buf.write_var_uint(data.size()); | 84 | 2 | for (const auto& value : data) { | 85 | 2 | buf.write_binary(value); | 86 | 2 | } | 87 | 2 | } | 88 | 2 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE9serializeERNS_14BufferWritableE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE9serializeERNS_14BufferWritableE Line | Count | Source | 80 | 537 | void serialize(BufferWritable& buf) const { | 81 | 537 | DCHECK(!stable); | 82 | 537 | if constexpr (!stable) { | 83 | 537 | buf.write_var_uint(data.size()); | 84 | 2.58k | for (const auto& value : data) { | 85 | 2.58k | buf.write_binary(value); | 86 | 2.58k | } | 87 | 537 | } | 88 | 537 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE9serializeERNS_14BufferWritableE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE9serializeERNS_14BufferWritableE Line | Count | Source | 80 | 48 | void serialize(BufferWritable& buf) const { | 81 | 48 | DCHECK(!stable); | 82 | 48 | if constexpr (!stable) { | 83 | 48 | buf.write_var_uint(data.size()); | 84 | 2.09k | for (const auto& value : data) { | 85 | 2.09k | buf.write_binary(value); | 86 | 2.09k | } | 87 | 48 | } | 88 | 48 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE9serializeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE9serializeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE9serializeERNS_14BufferWritableE |
89 | | |
90 | 508 | void deserialize(BufferReadable& buf, Arena&) { |
91 | 508 | DCHECK(!stable); |
92 | 508 | if constexpr (!stable) { |
93 | 508 | uint64_t new_size = 0; |
94 | 508 | buf.read_var_uint(new_size); |
95 | 508 | typename PrimitiveTypeTraits<T>::CppType x; |
96 | 5.11k | for (size_t i = 0; i < new_size; ++i) { |
97 | 4.60k | buf.read_binary(x); |
98 | 4.60k | data.insert(x); |
99 | 4.60k | } |
100 | 508 | } |
101 | 508 | } Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 90 | 2 | void deserialize(BufferReadable& buf, Arena&) { | 91 | 2 | DCHECK(!stable); | 92 | 2 | if constexpr (!stable) { | 93 | 2 | uint64_t new_size = 0; | 94 | 2 | buf.read_var_uint(new_size); | 95 | 2 | typename PrimitiveTypeTraits<T>::CppType x; | 96 | 4 | for (size_t i = 0; i < new_size; ++i) { | 97 | 2 | buf.read_binary(x); | 98 | 2 | data.insert(x); | 99 | 2 | } | 100 | 2 | } | 101 | 2 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 90 | 458 | void deserialize(BufferReadable& buf, Arena&) { | 91 | 458 | DCHECK(!stable); | 92 | 458 | if constexpr (!stable) { | 93 | 458 | uint64_t new_size = 0; | 94 | 458 | buf.read_var_uint(new_size); | 95 | 458 | typename PrimitiveTypeTraits<T>::CppType x; | 96 | 2.96k | for (size_t i = 0; i < new_size; ++i) { | 97 | 2.50k | buf.read_binary(x); | 98 | 2.50k | data.insert(x); | 99 | 2.50k | } | 100 | 458 | } | 101 | 458 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 90 | 48 | void deserialize(BufferReadable& buf, Arena&) { | 91 | 48 | DCHECK(!stable); | 92 | 48 | if constexpr (!stable) { | 93 | 48 | uint64_t new_size = 0; | 94 | 48 | buf.read_var_uint(new_size); | 95 | 48 | typename PrimitiveTypeTraits<T>::CppType x; | 96 | 2.14k | for (size_t i = 0; i < new_size; ++i) { | 97 | 2.09k | buf.read_binary(x); | 98 | 2.09k | data.insert(x); | 99 | 2.09k | } | 100 | 48 | } | 101 | 48 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE |
102 | | |
103 | 361 | MutableColumns get_arguments(const DataTypes& argument_types) const { |
104 | 361 | MutableColumns argument_columns; |
105 | 361 | argument_columns.emplace_back(argument_types[0]->create_column()); |
106 | | |
107 | 361 | if constexpr (stable) { |
108 | 0 | argument_columns[0]->resize(data.size()); |
109 | | // argument_columns[0] is a mutable column created using create_column. |
110 | | // since get_raw_data returns a StringRef, const_cast is required here. |
111 | 0 | auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>( |
112 | 0 | argument_columns[0]->get_raw_data().data); |
113 | 0 | for (auto it : data) { |
114 | 0 | ptr[it.second] = it.first; |
115 | 0 | } |
116 | 361 | } else { |
117 | 4.53k | for (const auto& elem : data) { |
118 | 4.53k | argument_columns[0]->insert(Field::create_field<T>(elem)); |
119 | 4.53k | } |
120 | 361 | } |
121 | | |
122 | 361 | return argument_columns; |
123 | 361 | } Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 103 | 8 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 104 | 8 | MutableColumns argument_columns; | 105 | 8 | argument_columns.emplace_back(argument_types[0]->create_column()); | 106 | | | 107 | | if constexpr (stable) { | 108 | | argument_columns[0]->resize(data.size()); | 109 | | // argument_columns[0] is a mutable column created using create_column. | 110 | | // since get_raw_data returns a StringRef, const_cast is required here. | 111 | | auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>( | 112 | | argument_columns[0]->get_raw_data().data); | 113 | | for (auto it : data) { | 114 | | ptr[it.second] = it.first; | 115 | | } | 116 | 8 | } else { | 117 | 8 | for (const auto& elem : data) { | 118 | 8 | argument_columns[0]->insert(Field::create_field<T>(elem)); | 119 | 8 | } | 120 | 8 | } | 121 | | | 122 | 8 | return argument_columns; | 123 | 8 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 103 | 289 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 104 | 289 | MutableColumns argument_columns; | 105 | 289 | argument_columns.emplace_back(argument_types[0]->create_column()); | 106 | | | 107 | | if constexpr (stable) { | 108 | | argument_columns[0]->resize(data.size()); | 109 | | // argument_columns[0] is a mutable column created using create_column. | 110 | | // since get_raw_data returns a StringRef, const_cast is required here. | 111 | | auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>( | 112 | | argument_columns[0]->get_raw_data().data); | 113 | | for (auto it : data) { | 114 | | ptr[it.second] = it.first; | 115 | | } | 116 | 289 | } else { | 117 | 2.42k | for (const auto& elem : data) { | 118 | 2.42k | argument_columns[0]->insert(Field::create_field<T>(elem)); | 119 | 2.42k | } | 120 | 289 | } | 121 | | | 122 | 289 | return argument_columns; | 123 | 289 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 103 | 64 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 104 | 64 | MutableColumns argument_columns; | 105 | 64 | argument_columns.emplace_back(argument_types[0]->create_column()); | 106 | | | 107 | | if constexpr (stable) { | 108 | | argument_columns[0]->resize(data.size()); | 109 | | // argument_columns[0] is a mutable column created using create_column. | 110 | | // since get_raw_data returns a StringRef, const_cast is required here. | 111 | | auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>( | 112 | | argument_columns[0]->get_raw_data().data); | 113 | | for (auto it : data) { | 114 | | ptr[it.second] = it.first; | 115 | | } | 116 | 64 | } else { | 117 | 2.10k | for (const auto& elem : data) { | 118 | 2.10k | argument_columns[0]->insert(Field::create_field<T>(elem)); | 119 | 2.10k | } | 120 | 64 | } | 121 | | | 122 | 64 | return argument_columns; | 123 | 64 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE |
124 | | }; |
125 | | |
126 | | template <bool stable> |
127 | | struct AggregateFunctionDistinctGenericData { |
128 | | /// When creating, the hash table must be small. |
129 | | using Container = std::conditional_t<stable, phmap::flat_hash_map<StringRef, uint32_t>, |
130 | | phmap::flat_hash_set<StringRef, StringRefHash>>; |
131 | | using Self = AggregateFunctionDistinctGenericData; |
132 | | Container data; |
133 | | |
134 | 332 | void clear() { data.clear(); }_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5clearEv Line | Count | Source | 134 | 232 | void clear() { data.clear(); } |
_ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5clearEv Line | Count | Source | 134 | 100 | void clear() { data.clear(); } |
|
135 | | |
136 | 227 | void merge(const Self& rhs, Arena& arena) { |
137 | 227 | DCHECK(!stable); |
138 | 227 | if constexpr (!stable) { |
139 | 257 | for (const auto& elem : rhs.data) { |
140 | 257 | StringRef key = elem; |
141 | 257 | key.data = arena.insert(key.data, key.size); |
142 | 257 | data.emplace(key); |
143 | 257 | } |
144 | 227 | } |
145 | 227 | } _ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5mergeERKS1_RNS_5ArenaE Line | Count | Source | 136 | 227 | void merge(const Self& rhs, Arena& arena) { | 137 | 227 | DCHECK(!stable); | 138 | 227 | if constexpr (!stable) { | 139 | 257 | for (const auto& elem : rhs.data) { | 140 | 257 | StringRef key = elem; | 141 | 257 | key.data = arena.insert(key.data, key.size); | 142 | 257 | data.emplace(key); | 143 | 257 | } | 144 | 227 | } | 145 | 227 | } |
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5mergeERKS1_RNS_5ArenaE |
146 | | |
147 | 273 | void serialize(BufferWritable& buf) const { |
148 | 273 | DCHECK(!stable); |
149 | 273 | if constexpr (!stable) { |
150 | 273 | buf.write_var_uint(data.size()); |
151 | 305 | for (const auto& elem : data) { |
152 | 305 | buf.write_binary(elem); |
153 | 305 | } |
154 | 273 | } |
155 | 273 | } _ZNK5doris36AggregateFunctionDistinctGenericDataILb0EE9serializeERNS_14BufferWritableE Line | Count | Source | 147 | 273 | void serialize(BufferWritable& buf) const { | 148 | 273 | DCHECK(!stable); | 149 | 273 | if constexpr (!stable) { | 150 | 273 | buf.write_var_uint(data.size()); | 151 | 305 | for (const auto& elem : data) { | 152 | 305 | buf.write_binary(elem); | 153 | 305 | } | 154 | 273 | } | 155 | 273 | } |
Unexecuted instantiation: _ZNK5doris36AggregateFunctionDistinctGenericDataILb1EE9serializeERNS_14BufferWritableE |
156 | | |
157 | 227 | void deserialize(BufferReadable& buf, Arena& arena) { |
158 | 227 | DCHECK(!stable); |
159 | 227 | if constexpr (!stable) { |
160 | 227 | UInt64 size; |
161 | 227 | buf.read_var_uint(size); |
162 | | |
163 | 227 | StringRef ref; |
164 | 484 | for (size_t i = 0; i < size; ++i) { |
165 | 257 | buf.read_binary(ref); |
166 | 257 | data.insert(ref); |
167 | 257 | } |
168 | 227 | } |
169 | 227 | } _ZN5doris36AggregateFunctionDistinctGenericDataILb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 157 | 227 | void deserialize(BufferReadable& buf, Arena& arena) { | 158 | 227 | DCHECK(!stable); | 159 | 227 | if constexpr (!stable) { | 160 | 227 | UInt64 size; | 161 | 227 | buf.read_var_uint(size); | 162 | | | 163 | 227 | StringRef ref; | 164 | 484 | for (size_t i = 0; i < size; ++i) { | 165 | 257 | buf.read_binary(ref); | 166 | 257 | data.insert(ref); | 167 | 257 | } | 168 | 227 | } | 169 | 227 | } |
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE |
170 | | }; |
171 | | |
172 | | template <bool stable> |
173 | | struct AggregateFunctionDistinctSingleGenericData |
174 | | : public AggregateFunctionDistinctGenericData<stable> { |
175 | | using Base = AggregateFunctionDistinctGenericData<stable>; |
176 | | using Base::data; |
177 | 658 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) { |
178 | 658 | auto key = columns[0]->get_data_at(row_num); |
179 | 658 | key.data = arena.insert(key.data, key.size); |
180 | | |
181 | 658 | if constexpr (stable) { |
182 | 179 | data.emplace(key, data.size()); |
183 | 479 | } else { |
184 | 479 | data.insert(key); |
185 | 479 | } |
186 | 658 | } _ZN5doris42AggregateFunctionDistinctSingleGenericDataILb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 177 | 479 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) { | 178 | 479 | auto key = columns[0]->get_data_at(row_num); | 179 | 479 | key.data = arena.insert(key.data, key.size); | 180 | | | 181 | | if constexpr (stable) { | 182 | | data.emplace(key, data.size()); | 183 | 479 | } else { | 184 | 479 | data.insert(key); | 185 | 479 | } | 186 | 479 | } |
_ZN5doris42AggregateFunctionDistinctSingleGenericDataILb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 177 | 179 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) { | 178 | 179 | auto key = columns[0]->get_data_at(row_num); | 179 | 179 | key.data = arena.insert(key.data, key.size); | 180 | | | 181 | 179 | if constexpr (stable) { | 182 | 179 | data.emplace(key, data.size()); | 183 | | } else { | 184 | | data.insert(key); | 185 | | } | 186 | 179 | } |
|
187 | | |
188 | 231 | MutableColumns get_arguments(const DataTypes& argument_types) const { |
189 | 231 | MutableColumns argument_columns; |
190 | 231 | argument_columns.emplace_back(argument_types[0]->create_column()); |
191 | 231 | if constexpr (stable) { |
192 | 64 | std::vector<StringRef> tmp(data.size()); |
193 | 109 | for (auto it : data) { |
194 | 109 | tmp[it.second] = it.first; |
195 | 109 | } |
196 | 173 | for (int i = 0; i < data.size(); i++) { |
197 | 109 | argument_columns[0]->insert_data(tmp[i].data, tmp[i].size); |
198 | 109 | } |
199 | 167 | } else { |
200 | 223 | for (const auto& elem : data) { |
201 | 223 | argument_columns[0]->insert_data(elem.data, elem.size); |
202 | 223 | } |
203 | 167 | } |
204 | | |
205 | 231 | return argument_columns; |
206 | 231 | } _ZNK5doris42AggregateFunctionDistinctSingleGenericDataILb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE Line | Count | Source | 188 | 167 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 189 | 167 | MutableColumns argument_columns; | 190 | 167 | argument_columns.emplace_back(argument_types[0]->create_column()); | 191 | | if constexpr (stable) { | 192 | | std::vector<StringRef> tmp(data.size()); | 193 | | for (auto it : data) { | 194 | | tmp[it.second] = it.first; | 195 | | } | 196 | | for (int i = 0; i < data.size(); i++) { | 197 | | argument_columns[0]->insert_data(tmp[i].data, tmp[i].size); | 198 | | } | 199 | 167 | } else { | 200 | 223 | for (const auto& elem : data) { | 201 | 223 | argument_columns[0]->insert_data(elem.data, elem.size); | 202 | 223 | } | 203 | 167 | } | 204 | | | 205 | 167 | return argument_columns; | 206 | 167 | } |
_ZNK5doris42AggregateFunctionDistinctSingleGenericDataILb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE Line | Count | Source | 188 | 64 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 189 | 64 | MutableColumns argument_columns; | 190 | 64 | argument_columns.emplace_back(argument_types[0]->create_column()); | 191 | 64 | if constexpr (stable) { | 192 | 64 | std::vector<StringRef> tmp(data.size()); | 193 | 109 | for (auto it : data) { | 194 | 109 | tmp[it.second] = it.first; | 195 | 109 | } | 196 | 173 | for (int i = 0; i < data.size(); i++) { | 197 | 109 | argument_columns[0]->insert_data(tmp[i].data, tmp[i].size); | 198 | 109 | } | 199 | | } else { | 200 | | for (const auto& elem : data) { | 201 | | argument_columns[0]->insert_data(elem.data, elem.size); | 202 | | } | 203 | | } | 204 | | | 205 | 64 | return argument_columns; | 206 | 64 | } |
|
207 | | }; |
208 | | |
209 | | template <bool stable> |
210 | | struct AggregateFunctionDistinctMultipleGenericData |
211 | | : public AggregateFunctionDistinctGenericData<stable> { |
212 | | using Base = AggregateFunctionDistinctGenericData<stable>; |
213 | | using Base::data; |
214 | 99 | void add(const IColumn** columns, size_t columns_num, size_t row_num, Arena& arena) { |
215 | 99 | const char* begin = nullptr; |
216 | 99 | StringRef key(begin, 0); |
217 | 297 | for (size_t i = 0; i < columns_num; ++i) { |
218 | 198 | auto cur_ref = columns[i]->serialize_value_into_arena(row_num, arena, begin); |
219 | 198 | key.data = cur_ref.data - key.size; |
220 | 198 | key.size += cur_ref.size; |
221 | 198 | } |
222 | | |
223 | 99 | if constexpr (stable) { |
224 | 70 | data.emplace(key, data.size()); |
225 | 70 | } else { |
226 | 29 | data.emplace(key); |
227 | 29 | } |
228 | 99 | } _ZN5doris44AggregateFunctionDistinctMultipleGenericDataILb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 214 | 29 | void add(const IColumn** columns, size_t columns_num, size_t row_num, Arena& arena) { | 215 | 29 | const char* begin = nullptr; | 216 | 29 | StringRef key(begin, 0); | 217 | 87 | for (size_t i = 0; i < columns_num; ++i) { | 218 | 58 | auto cur_ref = columns[i]->serialize_value_into_arena(row_num, arena, begin); | 219 | 58 | key.data = cur_ref.data - key.size; | 220 | 58 | key.size += cur_ref.size; | 221 | 58 | } | 222 | | | 223 | | if constexpr (stable) { | 224 | | data.emplace(key, data.size()); | 225 | 29 | } else { | 226 | 29 | data.emplace(key); | 227 | 29 | } | 228 | 29 | } |
_ZN5doris44AggregateFunctionDistinctMultipleGenericDataILb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 214 | 70 | void add(const IColumn** columns, size_t columns_num, size_t row_num, Arena& arena) { | 215 | 70 | const char* begin = nullptr; | 216 | 70 | StringRef key(begin, 0); | 217 | 210 | for (size_t i = 0; i < columns_num; ++i) { | 218 | 140 | auto cur_ref = columns[i]->serialize_value_into_arena(row_num, arena, begin); | 219 | 140 | key.data = cur_ref.data - key.size; | 220 | 140 | key.size += cur_ref.size; | 221 | 140 | } | 222 | | | 223 | 70 | if constexpr (stable) { | 224 | 70 | data.emplace(key, data.size()); | 225 | | } else { | 226 | | data.emplace(key); | 227 | | } | 228 | 70 | } |
|
229 | | |
230 | 54 | MutableColumns get_arguments(const DataTypes& argument_types) const { |
231 | 54 | MutableColumns argument_columns(argument_types.size()); |
232 | 162 | for (size_t i = 0; i < argument_types.size(); ++i) { |
233 | 108 | argument_columns[i] = argument_types[i]->create_column(); |
234 | 108 | } |
235 | | |
236 | 54 | if constexpr (stable) { |
237 | 36 | std::vector<StringRef> tmp(data.size()); |
238 | 68 | for (auto it : data) { |
239 | 68 | tmp[it.second] = it.first; |
240 | 68 | } |
241 | 104 | for (int i = 0; i < data.size(); i++) { |
242 | 68 | const char* begin = tmp[i].data; |
243 | 136 | for (auto& column : argument_columns) { |
244 | 136 | begin = column->deserialize_and_insert_from_arena(begin); |
245 | 136 | } |
246 | 68 | } |
247 | 36 | } else { |
248 | 18 | for (const auto& elem : data) { |
249 | 18 | const char* begin = elem.data; |
250 | 36 | for (auto& column : argument_columns) { |
251 | 36 | begin = column->deserialize_and_insert_from_arena(begin); |
252 | 36 | } |
253 | 18 | } |
254 | 18 | } |
255 | | |
256 | 54 | return argument_columns; |
257 | 54 | } _ZNK5doris44AggregateFunctionDistinctMultipleGenericDataILb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE Line | Count | Source | 230 | 18 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 231 | 18 | MutableColumns argument_columns(argument_types.size()); | 232 | 54 | for (size_t i = 0; i < argument_types.size(); ++i) { | 233 | 36 | argument_columns[i] = argument_types[i]->create_column(); | 234 | 36 | } | 235 | | | 236 | | if constexpr (stable) { | 237 | | std::vector<StringRef> tmp(data.size()); | 238 | | for (auto it : data) { | 239 | | tmp[it.second] = it.first; | 240 | | } | 241 | | for (int i = 0; i < data.size(); i++) { | 242 | | const char* begin = tmp[i].data; | 243 | | for (auto& column : argument_columns) { | 244 | | begin = column->deserialize_and_insert_from_arena(begin); | 245 | | } | 246 | | } | 247 | 18 | } else { | 248 | 18 | for (const auto& elem : data) { | 249 | 18 | const char* begin = elem.data; | 250 | 36 | for (auto& column : argument_columns) { | 251 | 36 | begin = column->deserialize_and_insert_from_arena(begin); | 252 | 36 | } | 253 | 18 | } | 254 | 18 | } | 255 | | | 256 | 18 | return argument_columns; | 257 | 18 | } |
_ZNK5doris44AggregateFunctionDistinctMultipleGenericDataILb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE Line | Count | Source | 230 | 36 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 231 | 36 | MutableColumns argument_columns(argument_types.size()); | 232 | 108 | for (size_t i = 0; i < argument_types.size(); ++i) { | 233 | 72 | argument_columns[i] = argument_types[i]->create_column(); | 234 | 72 | } | 235 | | | 236 | 36 | if constexpr (stable) { | 237 | 36 | std::vector<StringRef> tmp(data.size()); | 238 | 68 | for (auto it : data) { | 239 | 68 | tmp[it.second] = it.first; | 240 | 68 | } | 241 | 104 | for (int i = 0; i < data.size(); i++) { | 242 | 68 | const char* begin = tmp[i].data; | 243 | 136 | for (auto& column : argument_columns) { | 244 | 136 | begin = column->deserialize_and_insert_from_arena(begin); | 245 | 136 | } | 246 | 68 | } | 247 | | } else { | 248 | | for (const auto& elem : data) { | 249 | | const char* begin = elem.data; | 250 | | for (auto& column : argument_columns) { | 251 | | begin = column->deserialize_and_insert_from_arena(begin); | 252 | | } | 253 | | } | 254 | | } | 255 | | | 256 | 36 | return argument_columns; | 257 | 36 | } |
|
258 | | }; |
259 | | |
260 | | /** Adaptor for aggregate functions. |
261 | | * Adding -Distinct suffix to aggregate function |
262 | | **/ |
263 | | template <template <bool stable> typename Data, bool stable = false> |
264 | | class AggregateFunctionDistinct |
265 | | : public IAggregateFunctionDataHelper<Data<stable>, |
266 | | AggregateFunctionDistinct<Data, stable>>, |
267 | | VarargsExpression, |
268 | | NullableAggregateFunction { |
269 | | private: |
270 | | size_t prefix_size; |
271 | | AggregateFunctionPtr nested_func; |
272 | | size_t arguments_num; |
273 | | |
274 | 6.93k | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { |
275 | 6.93k | return place + prefix_size; |
276 | 6.93k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE16get_nested_placeEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE16get_nested_placeEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE16get_nested_placeEPc Line | Count | Source | 274 | 40 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 40 | return place + prefix_size; | 276 | 40 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE16get_nested_placeEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE16get_nested_placeEPc Line | Count | Source | 274 | 3.26k | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 3.26k | return place + prefix_size; | 276 | 3.26k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE16get_nested_placeEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE16get_nested_placeEPc Line | Count | Source | 274 | 510 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 510 | return place + prefix_size; | 276 | 510 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE16get_nested_placeEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE16get_nested_placeEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE16get_nested_placeEPc _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE16get_nested_placeEPc Line | Count | Source | 274 | 1.78k | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 1.78k | return place + prefix_size; | 276 | 1.78k | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE16get_nested_placeEPc Line | Count | Source | 274 | 835 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 835 | return place + prefix_size; | 276 | 835 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE16get_nested_placeEPc Line | Count | Source | 274 | 136 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 136 | return place + prefix_size; | 276 | 136 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE16get_nested_placeEPc Line | Count | Source | 274 | 360 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 360 | return place + prefix_size; | 276 | 360 | } |
|
277 | | |
278 | | ConstAggregateDataPtr get_nested_place(ConstAggregateDataPtr __restrict place) const noexcept { |
279 | | return place + prefix_size; |
280 | | } |
281 | | |
282 | | public: |
283 | | AggregateFunctionDistinct(AggregateFunctionPtr nested_func_, const DataTypes& arguments) |
284 | 2.21k | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( |
285 | 2.21k | arguments), |
286 | 2.21k | nested_func(std::move(nested_func_)), |
287 | 2.21k | arguments_num(arguments.size()) { |
288 | 2.21k | size_t nested_size = nested_func->align_of_data(); |
289 | 2.21k | CHECK_GT(nested_size, 0); |
290 | 2.21k | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; |
291 | 2.21k | } Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE Line | Count | Source | 284 | 6 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 285 | 6 | arguments), | 286 | 6 | nested_func(std::move(nested_func_)), | 287 | 6 | arguments_num(arguments.size()) { | 288 | 6 | size_t nested_size = nested_func->align_of_data(); | 289 | | CHECK_GT(nested_size, 0); | 290 | 6 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 291 | 6 | } |
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE Line | Count | Source | 284 | 913 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 285 | 913 | arguments), | 286 | 913 | nested_func(std::move(nested_func_)), | 287 | 913 | arguments_num(arguments.size()) { | 288 | 913 | size_t nested_size = nested_func->align_of_data(); | 289 | | CHECK_GT(nested_size, 0); | 290 | 913 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 291 | 913 | } |
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE Line | Count | Source | 284 | 345 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 285 | 345 | arguments), | 286 | 345 | nested_func(std::move(nested_func_)), | 287 | 345 | arguments_num(arguments.size()) { | 288 | 345 | size_t nested_size = nested_func->align_of_data(); | 289 | | CHECK_GT(nested_size, 0); | 290 | 345 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 291 | 345 | } |
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE _ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 284 | 869 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 285 | 869 | arguments), | 286 | 869 | nested_func(std::move(nested_func_)), | 287 | 869 | arguments_num(arguments.size()) { | 288 | 869 | size_t nested_size = nested_func->align_of_data(); | 289 | | CHECK_GT(nested_size, 0); | 290 | 869 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 291 | 869 | } |
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 284 | 47 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 285 | 47 | arguments), | 286 | 47 | nested_func(std::move(nested_func_)), | 287 | 47 | arguments_num(arguments.size()) { | 288 | 47 | size_t nested_size = nested_func->align_of_data(); | 289 | | CHECK_GT(nested_size, 0); | 290 | 47 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 291 | 47 | } |
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 284 | 27 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 285 | 27 | arguments), | 286 | 27 | nested_func(std::move(nested_func_)), | 287 | 27 | arguments_num(arguments.size()) { | 288 | 27 | size_t nested_size = nested_func->align_of_data(); | 289 | | CHECK_GT(nested_size, 0); | 290 | 27 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 291 | 27 | } |
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 284 | 12 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 285 | 12 | arguments), | 286 | 12 | nested_func(std::move(nested_func_)), | 287 | 12 | arguments_num(arguments.size()) { | 288 | 12 | size_t nested_size = nested_func->align_of_data(); | 289 | | CHECK_GT(nested_size, 0); | 290 | 12 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 291 | 12 | } |
|
292 | | |
293 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
294 | 9.75k | Arena& arena) const override { |
295 | 9.75k | this->data(place).add(columns, arguments_num, row_num, arena); |
296 | 9.75k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 294 | 2.05k | Arena& arena) const override { | 295 | 2.05k | this->data(place).add(columns, arguments_num, row_num, arena); | 296 | 2.05k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 294 | 4.81k | Arena& arena) const override { | 295 | 4.81k | this->data(place).add(columns, arguments_num, row_num, arena); | 296 | 4.81k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 294 | 2.12k | Arena& arena) const override { | 295 | 2.12k | this->data(place).add(columns, arguments_num, row_num, arena); | 296 | 2.12k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 294 | 479 | Arena& arena) const override { | 295 | 479 | this->data(place).add(columns, arguments_num, row_num, arena); | 296 | 479 | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 294 | 179 | Arena& arena) const override { | 295 | 179 | this->data(place).add(columns, arguments_num, row_num, arena); | 296 | 179 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 294 | 29 | Arena& arena) const override { | 295 | 29 | this->data(place).add(columns, arguments_num, row_num, arena); | 296 | 29 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 294 | 70 | Arena& arena) const override { | 295 | 70 | this->data(place).add(columns, arguments_num, row_num, arena); | 296 | 70 | } |
|
297 | | |
298 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
299 | 735 | Arena& arena) const override { |
300 | 735 | this->data(place).merge(this->data(rhs), arena); |
301 | 735 | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 299 | 2 | Arena& arena) const override { | 300 | 2 | this->data(place).merge(this->data(rhs), arena); | 301 | 2 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 299 | 458 | Arena& arena) const override { | 300 | 458 | this->data(place).merge(this->data(rhs), arena); | 301 | 458 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 299 | 48 | Arena& arena) const override { | 300 | 48 | this->data(place).merge(this->data(rhs), arena); | 301 | 48 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 299 | 212 | Arena& arena) const override { | 300 | 212 | this->data(place).merge(this->data(rhs), arena); | 301 | 212 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 299 | 15 | Arena& arena) const override { | 300 | 15 | this->data(place).merge(this->data(rhs), arena); | 301 | 15 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE5mergeEPcPKcRNS_5ArenaE |
302 | | |
303 | 860 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
304 | 860 | this->data(place).serialize(buf); |
305 | 860 | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 303 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 304 | 2 | this->data(place).serialize(buf); | 305 | 2 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 303 | 537 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 304 | 537 | this->data(place).serialize(buf); | 305 | 537 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 303 | 48 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 304 | 48 | this->data(place).serialize(buf); | 305 | 48 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 303 | 258 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 304 | 258 | this->data(place).serialize(buf); | 305 | 258 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 303 | 15 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 304 | 15 | this->data(place).serialize(buf); | 305 | 15 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE |
306 | | |
307 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
308 | 735 | Arena& arena) const override { |
309 | 735 | this->data(place).deserialize(buf, arena); |
310 | 735 | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 308 | 2 | Arena& arena) const override { | 309 | 2 | this->data(place).deserialize(buf, arena); | 310 | 2 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 308 | 458 | Arena& arena) const override { | 309 | 458 | this->data(place).deserialize(buf, arena); | 310 | 458 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 308 | 48 | Arena& arena) const override { | 309 | 48 | this->data(place).deserialize(buf, arena); | 310 | 48 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 308 | 212 | Arena& arena) const override { | 309 | 212 | this->data(place).deserialize(buf, arena); | 310 | 212 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 308 | 15 | Arena& arena) const override { | 309 | 15 | this->data(place).deserialize(buf, arena); | 310 | 15 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE |
311 | | |
312 | 646 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { |
313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. |
314 | 646 | auto* place = const_cast<AggregateDataPtr>(targetplace); |
315 | 646 | auto arguments = this->data(place).get_arguments(this->argument_types); |
316 | 646 | ColumnRawPtrs arguments_raw(arguments.size()); |
317 | 1.34k | for (size_t i = 0; i < arguments.size(); ++i) { |
318 | 700 | arguments_raw[i] = arguments[i].get(); |
319 | 700 | } |
320 | | |
321 | 646 | assert(!arguments.empty()); |
322 | 646 | Arena arena; |
323 | 646 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), |
324 | 646 | arguments_raw.data(), arena); |
325 | 646 | nested_func->insert_result_into(get_nested_place(place), to); |
326 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. |
327 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows |
328 | | // so we need to clear the data, thus not to affect the next insert_result_into |
329 | 646 | this->data(place).clear(); |
330 | 646 | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 312 | 8 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 314 | 8 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 315 | 8 | auto arguments = this->data(place).get_arguments(this->argument_types); | 316 | 8 | ColumnRawPtrs arguments_raw(arguments.size()); | 317 | 16 | for (size_t i = 0; i < arguments.size(); ++i) { | 318 | 8 | arguments_raw[i] = arguments[i].get(); | 319 | 8 | } | 320 | | | 321 | 8 | assert(!arguments.empty()); | 322 | 8 | Arena arena; | 323 | 8 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 324 | 8 | arguments_raw.data(), arena); | 325 | 8 | nested_func->insert_result_into(get_nested_place(place), to); | 326 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 327 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 328 | | // so we need to clear the data, thus not to affect the next insert_result_into | 329 | 8 | this->data(place).clear(); | 330 | 8 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 312 | 289 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 314 | 289 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 315 | 289 | auto arguments = this->data(place).get_arguments(this->argument_types); | 316 | 289 | ColumnRawPtrs arguments_raw(arguments.size()); | 317 | 578 | for (size_t i = 0; i < arguments.size(); ++i) { | 318 | 289 | arguments_raw[i] = arguments[i].get(); | 319 | 289 | } | 320 | | | 321 | 289 | assert(!arguments.empty()); | 322 | 289 | Arena arena; | 323 | 289 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 324 | 289 | arguments_raw.data(), arena); | 325 | 289 | nested_func->insert_result_into(get_nested_place(place), to); | 326 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 327 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 328 | | // so we need to clear the data, thus not to affect the next insert_result_into | 329 | 289 | this->data(place).clear(); | 330 | 289 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 312 | 64 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 314 | 64 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 315 | 64 | auto arguments = this->data(place).get_arguments(this->argument_types); | 316 | 64 | ColumnRawPtrs arguments_raw(arguments.size()); | 317 | 128 | for (size_t i = 0; i < arguments.size(); ++i) { | 318 | 64 | arguments_raw[i] = arguments[i].get(); | 319 | 64 | } | 320 | | | 321 | 64 | assert(!arguments.empty()); | 322 | 64 | Arena arena; | 323 | 64 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 324 | 64 | arguments_raw.data(), arena); | 325 | 64 | nested_func->insert_result_into(get_nested_place(place), to); | 326 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 327 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 328 | | // so we need to clear the data, thus not to affect the next insert_result_into | 329 | 64 | this->data(place).clear(); | 330 | 64 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 312 | 167 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 314 | 167 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 315 | 167 | auto arguments = this->data(place).get_arguments(this->argument_types); | 316 | 167 | ColumnRawPtrs arguments_raw(arguments.size()); | 317 | 334 | for (size_t i = 0; i < arguments.size(); ++i) { | 318 | 167 | arguments_raw[i] = arguments[i].get(); | 319 | 167 | } | 320 | | | 321 | 167 | assert(!arguments.empty()); | 322 | 167 | Arena arena; | 323 | 167 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 324 | 167 | arguments_raw.data(), arena); | 325 | 167 | nested_func->insert_result_into(get_nested_place(place), to); | 326 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 327 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 328 | | // so we need to clear the data, thus not to affect the next insert_result_into | 329 | 167 | this->data(place).clear(); | 330 | 167 | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 312 | 64 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 314 | 64 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 315 | 64 | auto arguments = this->data(place).get_arguments(this->argument_types); | 316 | 64 | ColumnRawPtrs arguments_raw(arguments.size()); | 317 | 128 | for (size_t i = 0; i < arguments.size(); ++i) { | 318 | 64 | arguments_raw[i] = arguments[i].get(); | 319 | 64 | } | 320 | | | 321 | 64 | assert(!arguments.empty()); | 322 | 64 | Arena arena; | 323 | 64 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 324 | 64 | arguments_raw.data(), arena); | 325 | 64 | nested_func->insert_result_into(get_nested_place(place), to); | 326 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 327 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 328 | | // so we need to clear the data, thus not to affect the next insert_result_into | 329 | 64 | this->data(place).clear(); | 330 | 64 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 312 | 18 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 314 | 18 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 315 | 18 | auto arguments = this->data(place).get_arguments(this->argument_types); | 316 | 18 | ColumnRawPtrs arguments_raw(arguments.size()); | 317 | 54 | for (size_t i = 0; i < arguments.size(); ++i) { | 318 | 36 | arguments_raw[i] = arguments[i].get(); | 319 | 36 | } | 320 | | | 321 | 18 | assert(!arguments.empty()); | 322 | 18 | Arena arena; | 323 | 18 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 324 | 18 | arguments_raw.data(), arena); | 325 | 18 | nested_func->insert_result_into(get_nested_place(place), to); | 326 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 327 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 328 | | // so we need to clear the data, thus not to affect the next insert_result_into | 329 | 18 | this->data(place).clear(); | 330 | 18 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 312 | 36 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 314 | 36 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 315 | 36 | auto arguments = this->data(place).get_arguments(this->argument_types); | 316 | 36 | ColumnRawPtrs arguments_raw(arguments.size()); | 317 | 108 | for (size_t i = 0; i < arguments.size(); ++i) { | 318 | 72 | arguments_raw[i] = arguments[i].get(); | 319 | 72 | } | 320 | | | 321 | 36 | assert(!arguments.empty()); | 322 | 36 | Arena arena; | 323 | 36 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 324 | 36 | arguments_raw.data(), arena); | 325 | 36 | nested_func->insert_result_into(get_nested_place(place), to); | 326 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 327 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 328 | | // so we need to clear the data, thus not to affect the next insert_result_into | 329 | 36 | this->data(place).clear(); | 330 | 36 | } |
|
331 | | |
332 | 120 | void reset(AggregateDataPtr place) const override { |
333 | 120 | this->data(place).clear(); |
334 | 120 | nested_func->reset(get_nested_place(place)); |
335 | 120 | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE5resetEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE5resetEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE5resetEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE5resetEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE5resetEPc Line | Count | Source | 332 | 57 | void reset(AggregateDataPtr place) const override { | 333 | 57 | this->data(place).clear(); | 334 | 57 | nested_func->reset(get_nested_place(place)); | 335 | 57 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE5resetEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE5resetEPc Line | Count | Source | 332 | 16 | void reset(AggregateDataPtr place) const override { | 333 | 16 | this->data(place).clear(); | 334 | 16 | nested_func->reset(get_nested_place(place)); | 335 | 16 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE5resetEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE5resetEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE5resetEPc _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE5resetEPc Line | Count | Source | 332 | 47 | void reset(AggregateDataPtr place) const override { | 333 | 47 | this->data(place).clear(); | 334 | 47 | nested_func->reset(get_nested_place(place)); | 335 | 47 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE5resetEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE5resetEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE5resetEPc |
336 | | |
337 | 1.73k | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE12size_of_dataEv Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE12size_of_dataEv _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE12size_of_dataEv Line | Count | Source | 337 | 12 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE12size_of_dataEv _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE12size_of_dataEv Line | Count | Source | 337 | 737 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE12size_of_dataEv _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE12size_of_dataEv Line | Count | Source | 337 | 154 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE12size_of_dataEv Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE12size_of_dataEv Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE12size_of_dataEv _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE12size_of_dataEv Line | Count | Source | 337 | 456 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE12size_of_dataEv Line | Count | Source | 337 | 202 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE12size_of_dataEv Line | Count | Source | 337 | 60 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE12size_of_dataEv Line | Count | Source | 337 | 118 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
|
338 | | |
339 | 1.99k | size_t align_of_data() const override { return nested_func->align_of_data(); }Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE13align_of_dataEv Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE13align_of_dataEv _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE13align_of_dataEv Line | Count | Source | 339 | 18 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE13align_of_dataEv _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE13align_of_dataEv Line | Count | Source | 339 | 577 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE13align_of_dataEv _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE13align_of_dataEv Line | Count | Source | 339 | 363 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE13align_of_dataEv Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE13align_of_dataEv Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE13align_of_dataEv _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE13align_of_dataEv Line | Count | Source | 339 | 907 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE13align_of_dataEv Line | Count | Source | 339 | 74 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE13align_of_dataEv Line | Count | Source | 339 | 36 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE13align_of_dataEv Line | Count | Source | 339 | 24 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
|
340 | | |
341 | 2.76k | void create(AggregateDataPtr __restrict place) const override { |
342 | 2.76k | new (place) Data<stable>; |
343 | 2.76k | SAFE_CREATE(nested_func->create(get_nested_place(place)), |
344 | 2.76k | this->data(place).~Data<stable>()); |
345 | 2.76k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE6createEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE6createEPc Line | Count | Source | 341 | 12 | void create(AggregateDataPtr __restrict place) const override { | 342 | 12 | new (place) Data<stable>; | 343 | 12 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 12 | this->data(place).~Data<stable>()); | 345 | 12 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE6createEPc Line | Count | Source | 341 | 1.31k | void create(AggregateDataPtr __restrict place) const override { | 342 | 1.31k | new (place) Data<stable>; | 343 | 1.31k | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 1.31k | this->data(place).~Data<stable>()); | 345 | 1.31k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE6createEPc Line | Count | Source | 341 | 183 | void create(AggregateDataPtr __restrict place) const override { | 342 | 183 | new (place) Data<stable>; | 343 | 183 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 183 | this->data(place).~Data<stable>()); | 345 | 183 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE6createEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE6createEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE6createEPc Line | Count | Source | 341 | 703 | void create(AggregateDataPtr __restrict place) const override { | 342 | 703 | new (place) Data<stable>; | 343 | 703 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 703 | this->data(place).~Data<stable>()); | 345 | 703 | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE6createEPc Line | Count | Source | 341 | 354 | void create(AggregateDataPtr __restrict place) const override { | 342 | 354 | new (place) Data<stable>; | 343 | 354 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 354 | this->data(place).~Data<stable>()); | 345 | 354 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE6createEPc Line | Count | Source | 341 | 50 | void create(AggregateDataPtr __restrict place) const override { | 342 | 50 | new (place) Data<stable>; | 343 | 50 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 50 | this->data(place).~Data<stable>()); | 345 | 50 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE6createEPc Line | Count | Source | 341 | 144 | void create(AggregateDataPtr __restrict place) const override { | 342 | 144 | new (place) Data<stable>; | 343 | 144 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 144 | this->data(place).~Data<stable>()); | 345 | 144 | } |
|
346 | | |
347 | 2.76k | void destroy(AggregateDataPtr __restrict place) const noexcept override { |
348 | 2.76k | this->data(place).~Data<stable>(); |
349 | 2.76k | nested_func->destroy(get_nested_place(place)); |
350 | 2.76k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE7destroyEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE7destroyEPc Line | Count | Source | 347 | 12 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 12 | this->data(place).~Data<stable>(); | 349 | 12 | nested_func->destroy(get_nested_place(place)); | 350 | 12 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE7destroyEPc Line | Count | Source | 347 | 1.31k | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 1.31k | this->data(place).~Data<stable>(); | 349 | 1.31k | nested_func->destroy(get_nested_place(place)); | 350 | 1.31k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE7destroyEPc Line | Count | Source | 347 | 183 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 183 | this->data(place).~Data<stable>(); | 349 | 183 | nested_func->destroy(get_nested_place(place)); | 350 | 183 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE7destroyEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE7destroyEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE7destroyEPc Line | Count | Source | 347 | 703 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 703 | this->data(place).~Data<stable>(); | 349 | 703 | nested_func->destroy(get_nested_place(place)); | 350 | 703 | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE7destroyEPc Line | Count | Source | 347 | 353 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 353 | this->data(place).~Data<stable>(); | 349 | 353 | nested_func->destroy(get_nested_place(place)); | 350 | 353 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE7destroyEPc Line | Count | Source | 347 | 50 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 50 | this->data(place).~Data<stable>(); | 349 | 50 | nested_func->destroy(get_nested_place(place)); | 350 | 50 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE7destroyEPc Line | Count | Source | 347 | 144 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 144 | this->data(place).~Data<stable>(); | 349 | 144 | nested_func->destroy(get_nested_place(place)); | 350 | 144 | } |
|
351 | | |
352 | 135 | String get_name() const override { return nested_func->get_name() + "Distinct"; }Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE8get_nameB5cxx11Ev _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE8get_nameB5cxx11Ev Line | Count | Source | 352 | 44 | String get_name() const override { return nested_func->get_name() + "Distinct"; } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE8get_nameB5cxx11Ev _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE8get_nameB5cxx11Ev Line | Count | Source | 352 | 29 | String get_name() const override { return nested_func->get_name() + "Distinct"; } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE8get_nameB5cxx11Ev _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE8get_nameB5cxx11Ev Line | Count | Source | 352 | 62 | String get_name() const override { return nested_func->get_name() + "Distinct"; } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE8get_nameB5cxx11Ev |
353 | | |
354 | 570 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE15get_return_typeEv _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE15get_return_typeEv Line | Count | Source | 354 | 10 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE15get_return_typeEv _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE15get_return_typeEv Line | Count | Source | 354 | 238 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE15get_return_typeEv _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE15get_return_typeEv Line | Count | Source | 354 | 34 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE15get_return_typeEv _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE15get_return_typeEv Line | Count | Source | 354 | 162 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE15get_return_typeEv Line | Count | Source | 354 | 83 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE15get_return_typeEv Line | Count | Source | 354 | 23 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE15get_return_typeEv Line | Count | Source | 354 | 20 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); } |
|
355 | | |
356 | 59 | IAggregateFunction* transmit_to_stable() override { |
357 | 59 | return new AggregateFunctionDistinct<Data, true>(nested_func, |
358 | 59 | IAggregateFunction::argument_types); |
359 | 59 | } Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE18transmit_to_stableEv Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE18transmit_to_stableEv Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE18transmit_to_stableEv Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE18transmit_to_stableEv Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE18transmit_to_stableEv Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE18transmit_to_stableEv Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE18transmit_to_stableEv Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE18transmit_to_stableEv Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE18transmit_to_stableEv Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE18transmit_to_stableEv _ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE18transmit_to_stableEv Line | Count | Source | 356 | 47 | IAggregateFunction* transmit_to_stable() override { | 357 | 47 | return new AggregateFunctionDistinct<Data, true>(nested_func, | 358 | 47 | IAggregateFunction::argument_types); | 359 | 47 | } |
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18transmit_to_stableEv _ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18transmit_to_stableEv Line | Count | Source | 356 | 12 | IAggregateFunction* transmit_to_stable() override { | 357 | 12 | return new AggregateFunctionDistinct<Data, true>(nested_func, | 358 | 12 | IAggregateFunction::argument_types); | 359 | 12 | } |
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE18transmit_to_stableEv |
360 | | }; |
361 | | |
362 | | template <typename T> |
363 | | struct FunctionStableTransfer { |
364 | | using FunctionStable = T; |
365 | | }; |
366 | | |
367 | | template <template <bool stable> typename Data> |
368 | | struct FunctionStableTransfer<AggregateFunctionDistinct<Data, false>> { |
369 | | using FunctionStable = AggregateFunctionDistinct<Data, true>; |
370 | | }; |
371 | | |
372 | | } // namespace doris |
373 | | |
374 | | #include "common/compile_check_end.h" |