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 | | class Arena; |
40 | | class BufferReadable; |
41 | | class BufferWritable; |
42 | | template <PrimitiveType> |
43 | | class ColumnVector; |
44 | | } // namespace doris |
45 | | template <typename, typename> |
46 | | struct DefaultHash; |
47 | | |
48 | | namespace doris { |
49 | | |
50 | | template <PrimitiveType T, bool stable> |
51 | | struct AggregateFunctionDistinctSingleNumericData { |
52 | | /// When creating, the hash table must be small. |
53 | | using Container = std::conditional_t< |
54 | | stable, phmap::flat_hash_map<typename PrimitiveTypeTraits<T>::CppType, uint32_t>, |
55 | | phmap::flat_hash_set<typename PrimitiveTypeTraits<T>::CppType>>; |
56 | | using Self = AggregateFunctionDistinctSingleNumericData<T, stable>; |
57 | | Container data; |
58 | | |
59 | 419 | void clear() { data.clear(); }Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE5clearEv Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE5clearEv _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE5clearEv Line | Count | Source | 59 | 3 | void clear() { data.clear(); } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE5clearEv _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE5clearEv Line | Count | Source | 59 | 335 | void clear() { data.clear(); } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE5clearEv _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE5clearEv Line | Count | Source | 59 | 81 | void clear() { data.clear(); } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE5clearEv Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE5clearEv Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE5clearEv |
60 | | |
61 | 781 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { |
62 | 781 | const auto& vec = |
63 | 781 | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) |
64 | 781 | .get_data(); |
65 | 781 | if constexpr (stable) { |
66 | 0 | data.emplace(vec[row_num], data.size()); |
67 | 781 | } else { |
68 | 781 | data.insert(vec[row_num]); |
69 | 781 | } |
70 | 781 | } Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 61 | 3 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { | 62 | 3 | const auto& vec = | 63 | 3 | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) | 64 | 3 | .get_data(); | 65 | | if constexpr (stable) { | 66 | | data.emplace(vec[row_num], data.size()); | 67 | 3 | } else { | 68 | 3 | data.insert(vec[row_num]); | 69 | 3 | } | 70 | 3 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 61 | 709 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { | 62 | 709 | const auto& vec = | 63 | 709 | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) | 64 | 709 | .get_data(); | 65 | | if constexpr (stable) { | 66 | | data.emplace(vec[row_num], data.size()); | 67 | 709 | } else { | 68 | 709 | data.insert(vec[row_num]); | 69 | 709 | } | 70 | 709 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 61 | 69 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { | 62 | 69 | const auto& vec = | 63 | 69 | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) | 64 | 69 | .get_data(); | 65 | | if constexpr (stable) { | 66 | | data.emplace(vec[row_num], data.size()); | 67 | 69 | } else { | 68 | 69 | data.insert(vec[row_num]); | 69 | 69 | } | 70 | 69 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE |
71 | | |
72 | 516 | void merge(const Self& rhs, Arena&) { |
73 | 516 | DCHECK(!stable); |
74 | 516 | if constexpr (!stable) { |
75 | 516 | data.merge(Container(rhs.data)); |
76 | 516 | } |
77 | 516 | } Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE5mergeERKS2_RNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE5mergeERKS2_RNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE5mergeERKS2_RNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE5mergeERKS2_RNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE5mergeERKS2_RNS_5ArenaE Line | Count | Source | 72 | 467 | void merge(const Self& rhs, Arena&) { | 73 | 467 | DCHECK(!stable); | 74 | 467 | if constexpr (!stable) { | 75 | 467 | data.merge(Container(rhs.data)); | 76 | 467 | } | 77 | 467 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE5mergeERKS2_RNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE5mergeERKS2_RNS_5ArenaE Line | Count | Source | 72 | 49 | void merge(const Self& rhs, Arena&) { | 73 | 49 | DCHECK(!stable); | 74 | 49 | if constexpr (!stable) { | 75 | 49 | data.merge(Container(rhs.data)); | 76 | 49 | } | 77 | 49 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE5mergeERKS2_RNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE5mergeERKS2_RNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE5mergeERKS2_RNS_5ArenaE |
78 | | |
79 | 593 | void serialize(BufferWritable& buf) const { |
80 | 593 | DCHECK(!stable); |
81 | 593 | if constexpr (!stable) { |
82 | 593 | buf.write_var_uint(data.size()); |
83 | 595 | for (const auto& value : data) { |
84 | 595 | buf.write_binary(value); |
85 | 595 | } |
86 | 593 | } |
87 | 593 | } Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE9serializeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE9serializeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE9serializeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE9serializeERNS_14BufferWritableE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE9serializeERNS_14BufferWritableE Line | Count | Source | 79 | 546 | void serialize(BufferWritable& buf) const { | 80 | 546 | DCHECK(!stable); | 81 | 546 | if constexpr (!stable) { | 82 | 546 | buf.write_var_uint(data.size()); | 83 | 549 | for (const auto& value : data) { | 84 | 549 | buf.write_binary(value); | 85 | 549 | } | 86 | 546 | } | 87 | 546 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE9serializeERNS_14BufferWritableE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE9serializeERNS_14BufferWritableE Line | Count | Source | 79 | 47 | void serialize(BufferWritable& buf) const { | 80 | 47 | DCHECK(!stable); | 81 | 47 | if constexpr (!stable) { | 82 | 47 | buf.write_var_uint(data.size()); | 83 | 47 | for (const auto& value : data) { | 84 | 46 | buf.write_binary(value); | 85 | 46 | } | 86 | 47 | } | 87 | 47 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE9serializeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE9serializeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE9serializeERNS_14BufferWritableE |
88 | | |
89 | 517 | void deserialize(BufferReadable& buf, Arena&) { |
90 | 517 | DCHECK(!stable); |
91 | 517 | if constexpr (!stable) { |
92 | 517 | uint64_t new_size = 0; |
93 | 517 | buf.read_var_uint(new_size); |
94 | 517 | typename PrimitiveTypeTraits<T>::CppType x; |
95 | 1.03k | for (size_t i = 0; i < new_size; ++i) { |
96 | 519 | buf.read_binary(x); |
97 | 519 | data.insert(x); |
98 | 519 | } |
99 | 517 | } |
100 | 517 | } Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 89 | 468 | void deserialize(BufferReadable& buf, Arena&) { | 90 | 468 | DCHECK(!stable); | 91 | 468 | if constexpr (!stable) { | 92 | 468 | uint64_t new_size = 0; | 93 | 468 | buf.read_var_uint(new_size); | 94 | 468 | typename PrimitiveTypeTraits<T>::CppType x; | 95 | 939 | for (size_t i = 0; i < new_size; ++i) { | 96 | 471 | buf.read_binary(x); | 97 | 471 | data.insert(x); | 98 | 471 | } | 99 | 468 | } | 100 | 468 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 89 | 49 | void deserialize(BufferReadable& buf, Arena&) { | 90 | 49 | DCHECK(!stable); | 91 | 49 | if constexpr (!stable) { | 92 | 49 | uint64_t new_size = 0; | 93 | 49 | buf.read_var_uint(new_size); | 94 | 49 | typename PrimitiveTypeTraits<T>::CppType x; | 95 | 97 | for (size_t i = 0; i < new_size; ++i) { | 96 | 48 | buf.read_binary(x); | 97 | 48 | data.insert(x); | 98 | 48 | } | 99 | 49 | } | 100 | 49 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE |
101 | | |
102 | 343 | MutableColumns get_arguments(const DataTypes& argument_types) const { |
103 | 343 | MutableColumns argument_columns; |
104 | 343 | argument_columns.emplace_back(argument_types[0]->create_column()); |
105 | | |
106 | 343 | if constexpr (stable) { |
107 | 0 | argument_columns[0]->resize(data.size()); |
108 | | // argument_columns[0] is a mutable column created using create_column. |
109 | | // since get_raw_data returns a StringRef, const_cast is required here. |
110 | 0 | auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>( |
111 | 0 | argument_columns[0]->get_raw_data().data); |
112 | 0 | for (auto it : data) { |
113 | 0 | ptr[it.second] = it.first; |
114 | 0 | } |
115 | 343 | } else { |
116 | 425 | for (const auto& elem : data) { |
117 | 425 | argument_columns[0]->insert(Field::create_field<T>(elem)); |
118 | 425 | } |
119 | 343 | } |
120 | | |
121 | 343 | return argument_columns; |
122 | 343 | } 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 | 102 | 3 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 103 | 3 | MutableColumns argument_columns; | 104 | 3 | argument_columns.emplace_back(argument_types[0]->create_column()); | 105 | | | 106 | | if constexpr (stable) { | 107 | | argument_columns[0]->resize(data.size()); | 108 | | // argument_columns[0] is a mutable column created using create_column. | 109 | | // since get_raw_data returns a StringRef, const_cast is required here. | 110 | | auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>( | 111 | | argument_columns[0]->get_raw_data().data); | 112 | | for (auto it : data) { | 113 | | ptr[it.second] = it.first; | 114 | | } | 115 | 3 | } else { | 116 | 3 | for (const auto& elem : data) { | 117 | 3 | argument_columns[0]->insert(Field::create_field<T>(elem)); | 118 | 3 | } | 119 | 3 | } | 120 | | | 121 | 3 | return argument_columns; | 122 | 3 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 102 | 278 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 103 | 278 | MutableColumns argument_columns; | 104 | 278 | argument_columns.emplace_back(argument_types[0]->create_column()); | 105 | | | 106 | | if constexpr (stable) { | 107 | | argument_columns[0]->resize(data.size()); | 108 | | // argument_columns[0] is a mutable column created using create_column. | 109 | | // since get_raw_data returns a StringRef, const_cast is required here. | 110 | | auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>( | 111 | | argument_columns[0]->get_raw_data().data); | 112 | | for (auto it : data) { | 113 | | ptr[it.second] = it.first; | 114 | | } | 115 | 278 | } else { | 116 | 368 | for (const auto& elem : data) { | 117 | 368 | argument_columns[0]->insert(Field::create_field<T>(elem)); | 118 | 368 | } | 119 | 278 | } | 120 | | | 121 | 278 | return argument_columns; | 122 | 278 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 102 | 62 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 103 | 62 | MutableColumns argument_columns; | 104 | 62 | argument_columns.emplace_back(argument_types[0]->create_column()); | 105 | | | 106 | | if constexpr (stable) { | 107 | | argument_columns[0]->resize(data.size()); | 108 | | // argument_columns[0] is a mutable column created using create_column. | 109 | | // since get_raw_data returns a StringRef, const_cast is required here. | 110 | | auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>( | 111 | | argument_columns[0]->get_raw_data().data); | 112 | | for (auto it : data) { | 113 | | ptr[it.second] = it.first; | 114 | | } | 115 | 62 | } else { | 116 | 62 | for (const auto& elem : data) { | 117 | 54 | argument_columns[0]->insert(Field::create_field<T>(elem)); | 118 | 54 | } | 119 | 62 | } | 120 | | | 121 | 62 | return argument_columns; | 122 | 62 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE |
123 | | }; |
124 | | |
125 | | template <bool stable> |
126 | | struct AggregateFunctionDistinctGenericData { |
127 | | /// When creating, the hash table must be small. |
128 | | using Container = std::conditional_t<stable, phmap::flat_hash_map<StringRef, uint32_t>, |
129 | | phmap::flat_hash_set<StringRef, StringRefHash>>; |
130 | | using Self = AggregateFunctionDistinctGenericData; |
131 | | Container data; |
132 | | |
133 | 317 | void clear() { data.clear(); }_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5clearEv Line | Count | Source | 133 | 231 | void clear() { data.clear(); } |
_ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5clearEv Line | Count | Source | 133 | 86 | void clear() { data.clear(); } |
|
134 | | |
135 | 224 | void merge(const Self& rhs, Arena& arena) { |
136 | 224 | DCHECK(!stable); |
137 | 224 | if constexpr (!stable) { |
138 | 260 | for (const auto& elem : rhs.data) { |
139 | 260 | StringRef key = elem; |
140 | 260 | key.data = arena.insert(key.data, key.size); |
141 | 260 | data.emplace(key); |
142 | 260 | } |
143 | 224 | } |
144 | 224 | } _ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5mergeERKS1_RNS_5ArenaE Line | Count | Source | 135 | 224 | void merge(const Self& rhs, Arena& arena) { | 136 | 224 | DCHECK(!stable); | 137 | 224 | if constexpr (!stable) { | 138 | 260 | for (const auto& elem : rhs.data) { | 139 | 260 | StringRef key = elem; | 140 | 260 | key.data = arena.insert(key.data, key.size); | 141 | 260 | data.emplace(key); | 142 | 260 | } | 143 | 224 | } | 144 | 224 | } |
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5mergeERKS1_RNS_5ArenaE |
145 | | |
146 | 267 | void serialize(BufferWritable& buf) const { |
147 | 267 | DCHECK(!stable); |
148 | 267 | if constexpr (!stable) { |
149 | 267 | buf.write_var_uint(data.size()); |
150 | 305 | for (const auto& elem : data) { |
151 | 305 | buf.write_binary(elem); |
152 | 305 | } |
153 | 267 | } |
154 | 267 | } _ZNK5doris36AggregateFunctionDistinctGenericDataILb0EE9serializeERNS_14BufferWritableE Line | Count | Source | 146 | 267 | void serialize(BufferWritable& buf) const { | 147 | 267 | DCHECK(!stable); | 148 | 267 | if constexpr (!stable) { | 149 | 267 | buf.write_var_uint(data.size()); | 150 | 305 | for (const auto& elem : data) { | 151 | 305 | buf.write_binary(elem); | 152 | 305 | } | 153 | 267 | } | 154 | 267 | } |
Unexecuted instantiation: _ZNK5doris36AggregateFunctionDistinctGenericDataILb1EE9serializeERNS_14BufferWritableE |
155 | | |
156 | 225 | void deserialize(BufferReadable& buf, Arena& arena) { |
157 | 225 | DCHECK(!stable); |
158 | 225 | if constexpr (!stable) { |
159 | 225 | UInt64 size; |
160 | 225 | buf.read_var_uint(size); |
161 | | |
162 | 225 | StringRef ref; |
163 | 485 | for (size_t i = 0; i < size; ++i) { |
164 | 260 | buf.read_binary(ref); |
165 | 260 | data.insert(ref); |
166 | 260 | } |
167 | 225 | } |
168 | 225 | } _ZN5doris36AggregateFunctionDistinctGenericDataILb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 156 | 225 | void deserialize(BufferReadable& buf, Arena& arena) { | 157 | 225 | DCHECK(!stable); | 158 | 225 | if constexpr (!stable) { | 159 | 225 | UInt64 size; | 160 | 225 | buf.read_var_uint(size); | 161 | | | 162 | 225 | StringRef ref; | 163 | 485 | for (size_t i = 0; i < size; ++i) { | 164 | 260 | buf.read_binary(ref); | 165 | 260 | data.insert(ref); | 166 | 260 | } | 167 | 225 | } | 168 | 225 | } |
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE |
169 | | }; |
170 | | |
171 | | template <bool stable> |
172 | | struct AggregateFunctionDistinctSingleGenericData |
173 | | : public AggregateFunctionDistinctGenericData<stable> { |
174 | | using Base = AggregateFunctionDistinctGenericData<stable>; |
175 | | using Base::data; |
176 | 634 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) { |
177 | 634 | auto key = columns[0]->get_data_at(row_num); |
178 | 634 | key.data = arena.insert(key.data, key.size); |
179 | | |
180 | 634 | if constexpr (stable) { |
181 | 163 | data.emplace(key, data.size()); |
182 | 471 | } else { |
183 | 471 | data.insert(key); |
184 | 471 | } |
185 | 634 | } _ZN5doris42AggregateFunctionDistinctSingleGenericDataILb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 176 | 471 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) { | 177 | 471 | auto key = columns[0]->get_data_at(row_num); | 178 | 471 | key.data = arena.insert(key.data, key.size); | 179 | | | 180 | | if constexpr (stable) { | 181 | | data.emplace(key, data.size()); | 182 | 471 | } else { | 183 | 471 | data.insert(key); | 184 | 471 | } | 185 | 471 | } |
_ZN5doris42AggregateFunctionDistinctSingleGenericDataILb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 176 | 163 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) { | 177 | 163 | auto key = columns[0]->get_data_at(row_num); | 178 | 163 | key.data = arena.insert(key.data, key.size); | 179 | | | 180 | 163 | if constexpr (stable) { | 181 | 163 | data.emplace(key, data.size()); | 182 | | } else { | 183 | | data.insert(key); | 184 | | } | 185 | 163 | } |
|
186 | | |
187 | 220 | MutableColumns get_arguments(const DataTypes& argument_types) const { |
188 | 220 | MutableColumns argument_columns; |
189 | 220 | argument_columns.emplace_back(argument_types[0]->create_column()); |
190 | 220 | if constexpr (stable) { |
191 | 57 | std::vector<StringRef> tmp(data.size()); |
192 | 95 | for (auto it : data) { |
193 | 95 | tmp[it.second] = it.first; |
194 | 95 | } |
195 | 152 | for (int i = 0; i < data.size(); i++) { |
196 | 95 | argument_columns[0]->insert_data(tmp[i].data, tmp[i].size); |
197 | 95 | } |
198 | 163 | } else { |
199 | 219 | for (const auto& elem : data) { |
200 | 219 | argument_columns[0]->insert_data(elem.data, elem.size); |
201 | 219 | } |
202 | 163 | } |
203 | | |
204 | 220 | return argument_columns; |
205 | 220 | } _ZNK5doris42AggregateFunctionDistinctSingleGenericDataILb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE Line | Count | Source | 187 | 163 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 188 | 163 | MutableColumns argument_columns; | 189 | 163 | argument_columns.emplace_back(argument_types[0]->create_column()); | 190 | | if constexpr (stable) { | 191 | | std::vector<StringRef> tmp(data.size()); | 192 | | for (auto it : data) { | 193 | | tmp[it.second] = it.first; | 194 | | } | 195 | | for (int i = 0; i < data.size(); i++) { | 196 | | argument_columns[0]->insert_data(tmp[i].data, tmp[i].size); | 197 | | } | 198 | 163 | } else { | 199 | 219 | for (const auto& elem : data) { | 200 | 219 | argument_columns[0]->insert_data(elem.data, elem.size); | 201 | 219 | } | 202 | 163 | } | 203 | | | 204 | 163 | return argument_columns; | 205 | 163 | } |
_ZNK5doris42AggregateFunctionDistinctSingleGenericDataILb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE Line | Count | Source | 187 | 57 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 188 | 57 | MutableColumns argument_columns; | 189 | 57 | argument_columns.emplace_back(argument_types[0]->create_column()); | 190 | 57 | if constexpr (stable) { | 191 | 57 | std::vector<StringRef> tmp(data.size()); | 192 | 95 | for (auto it : data) { | 193 | 95 | tmp[it.second] = it.first; | 194 | 95 | } | 195 | 152 | for (int i = 0; i < data.size(); i++) { | 196 | 95 | argument_columns[0]->insert_data(tmp[i].data, tmp[i].size); | 197 | 95 | } | 198 | | } else { | 199 | | for (const auto& elem : data) { | 200 | | argument_columns[0]->insert_data(elem.data, elem.size); | 201 | | } | 202 | | } | 203 | | | 204 | 57 | return argument_columns; | 205 | 57 | } |
|
206 | | }; |
207 | | |
208 | | template <bool stable> |
209 | | struct AggregateFunctionDistinctMultipleGenericData |
210 | | : public AggregateFunctionDistinctGenericData<stable> { |
211 | | using Base = AggregateFunctionDistinctGenericData<stable>; |
212 | | using Base::data; |
213 | 84 | void add(const IColumn** columns, size_t columns_num, size_t row_num, Arena& arena) { |
214 | 84 | const char* begin = nullptr; |
215 | 84 | StringRef key(begin, 0); |
216 | 252 | for (size_t i = 0; i < columns_num; ++i) { |
217 | 168 | auto cur_ref = columns[i]->serialize_value_into_arena(row_num, arena, begin); |
218 | 168 | key.data = cur_ref.data - key.size; |
219 | 168 | key.size += cur_ref.size; |
220 | 168 | } |
221 | | |
222 | 84 | if constexpr (stable) { |
223 | 55 | data.emplace(key, data.size()); |
224 | 55 | } else { |
225 | 29 | data.emplace(key); |
226 | 29 | } |
227 | 84 | } _ZN5doris44AggregateFunctionDistinctMultipleGenericDataILb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 213 | 29 | void add(const IColumn** columns, size_t columns_num, size_t row_num, Arena& arena) { | 214 | 29 | const char* begin = nullptr; | 215 | 29 | StringRef key(begin, 0); | 216 | 87 | for (size_t i = 0; i < columns_num; ++i) { | 217 | 58 | auto cur_ref = columns[i]->serialize_value_into_arena(row_num, arena, begin); | 218 | 58 | key.data = cur_ref.data - key.size; | 219 | 58 | key.size += cur_ref.size; | 220 | 58 | } | 221 | | | 222 | | if constexpr (stable) { | 223 | | data.emplace(key, data.size()); | 224 | 29 | } else { | 225 | 29 | data.emplace(key); | 226 | 29 | } | 227 | 29 | } |
_ZN5doris44AggregateFunctionDistinctMultipleGenericDataILb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 213 | 55 | void add(const IColumn** columns, size_t columns_num, size_t row_num, Arena& arena) { | 214 | 55 | const char* begin = nullptr; | 215 | 55 | StringRef key(begin, 0); | 216 | 165 | for (size_t i = 0; i < columns_num; ++i) { | 217 | 110 | auto cur_ref = columns[i]->serialize_value_into_arena(row_num, arena, begin); | 218 | 110 | key.data = cur_ref.data - key.size; | 219 | 110 | key.size += cur_ref.size; | 220 | 110 | } | 221 | | | 222 | 55 | if constexpr (stable) { | 223 | 55 | data.emplace(key, data.size()); | 224 | | } else { | 225 | | data.emplace(key); | 226 | | } | 227 | 55 | } |
|
228 | | |
229 | 47 | MutableColumns get_arguments(const DataTypes& argument_types) const { |
230 | 47 | MutableColumns argument_columns(argument_types.size()); |
231 | 141 | for (size_t i = 0; i < argument_types.size(); ++i) { |
232 | 94 | argument_columns[i] = argument_types[i]->create_column(); |
233 | 94 | } |
234 | | |
235 | 47 | if constexpr (stable) { |
236 | 29 | std::vector<StringRef> tmp(data.size()); |
237 | 54 | for (auto it : data) { |
238 | 54 | tmp[it.second] = it.first; |
239 | 54 | } |
240 | 83 | for (int i = 0; i < data.size(); i++) { |
241 | 54 | const char* begin = tmp[i].data; |
242 | 108 | for (auto& column : argument_columns) { |
243 | 108 | begin = column->deserialize_and_insert_from_arena(begin); |
244 | 108 | } |
245 | 54 | } |
246 | 29 | } else { |
247 | 18 | for (const auto& elem : data) { |
248 | 18 | const char* begin = elem.data; |
249 | 36 | for (auto& column : argument_columns) { |
250 | 36 | begin = column->deserialize_and_insert_from_arena(begin); |
251 | 36 | } |
252 | 18 | } |
253 | 18 | } |
254 | | |
255 | 47 | return argument_columns; |
256 | 47 | } _ZNK5doris44AggregateFunctionDistinctMultipleGenericDataILb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE Line | Count | Source | 229 | 18 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 230 | 18 | MutableColumns argument_columns(argument_types.size()); | 231 | 54 | for (size_t i = 0; i < argument_types.size(); ++i) { | 232 | 36 | argument_columns[i] = argument_types[i]->create_column(); | 233 | 36 | } | 234 | | | 235 | | if constexpr (stable) { | 236 | | std::vector<StringRef> tmp(data.size()); | 237 | | for (auto it : data) { | 238 | | tmp[it.second] = it.first; | 239 | | } | 240 | | for (int i = 0; i < data.size(); i++) { | 241 | | const char* begin = tmp[i].data; | 242 | | for (auto& column : argument_columns) { | 243 | | begin = column->deserialize_and_insert_from_arena(begin); | 244 | | } | 245 | | } | 246 | 18 | } else { | 247 | 18 | for (const auto& elem : data) { | 248 | 18 | const char* begin = elem.data; | 249 | 36 | for (auto& column : argument_columns) { | 250 | 36 | begin = column->deserialize_and_insert_from_arena(begin); | 251 | 36 | } | 252 | 18 | } | 253 | 18 | } | 254 | | | 255 | 18 | return argument_columns; | 256 | 18 | } |
_ZNK5doris44AggregateFunctionDistinctMultipleGenericDataILb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE Line | Count | Source | 229 | 29 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 230 | 29 | MutableColumns argument_columns(argument_types.size()); | 231 | 87 | for (size_t i = 0; i < argument_types.size(); ++i) { | 232 | 58 | argument_columns[i] = argument_types[i]->create_column(); | 233 | 58 | } | 234 | | | 235 | 29 | if constexpr (stable) { | 236 | 29 | std::vector<StringRef> tmp(data.size()); | 237 | 54 | for (auto it : data) { | 238 | 54 | tmp[it.second] = it.first; | 239 | 54 | } | 240 | 83 | for (int i = 0; i < data.size(); i++) { | 241 | 54 | const char* begin = tmp[i].data; | 242 | 108 | for (auto& column : argument_columns) { | 243 | 108 | begin = column->deserialize_and_insert_from_arena(begin); | 244 | 108 | } | 245 | 54 | } | 246 | | } else { | 247 | | for (const auto& elem : data) { | 248 | | const char* begin = elem.data; | 249 | | for (auto& column : argument_columns) { | 250 | | begin = column->deserialize_and_insert_from_arena(begin); | 251 | | } | 252 | | } | 253 | | } | 254 | | | 255 | 29 | return argument_columns; | 256 | 29 | } |
|
257 | | }; |
258 | | |
259 | | /** Adaptor for aggregate functions. |
260 | | * Adding -Distinct suffix to aggregate function |
261 | | **/ |
262 | | template <template <bool stable> typename Data, bool stable = false> |
263 | | class AggregateFunctionDistinct |
264 | | : public IAggregateFunctionDataHelper<Data<stable>, |
265 | | AggregateFunctionDistinct<Data, stable>>, |
266 | | VarargsExpression, |
267 | | NullableAggregateFunction { |
268 | | private: |
269 | | size_t prefix_size; |
270 | | AggregateFunctionPtr nested_func; |
271 | | size_t arguments_num; |
272 | | |
273 | 6.43k | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { |
274 | 6.43k | return place + prefix_size; |
275 | 6.43k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE16get_nested_placeEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE16get_nested_placeEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE16get_nested_placeEPc Line | Count | Source | 273 | 12 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 274 | 12 | return place + prefix_size; | 275 | 12 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE16get_nested_placeEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE16get_nested_placeEPc Line | Count | Source | 273 | 3.34k | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 274 | 3.34k | return place + prefix_size; | 275 | 3.34k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE16get_nested_placeEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE16get_nested_placeEPc Line | Count | Source | 273 | 513 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 274 | 513 | return place + prefix_size; | 275 | 513 | } |
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 | 273 | 1.67k | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 274 | 1.67k | return place + prefix_size; | 275 | 1.67k | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE16get_nested_placeEPc Line | Count | Source | 273 | 481 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 274 | 481 | return place + prefix_size; | 275 | 481 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE16get_nested_placeEPc Line | Count | Source | 273 | 136 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 274 | 136 | return place + prefix_size; | 275 | 136 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE16get_nested_placeEPc Line | Count | Source | 273 | 274 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 274 | 274 | return place + prefix_size; | 275 | 274 | } |
|
276 | | |
277 | | ConstAggregateDataPtr get_nested_place(ConstAggregateDataPtr __restrict place) const noexcept { |
278 | | return place + prefix_size; |
279 | | } |
280 | | |
281 | | public: |
282 | | AggregateFunctionDistinct(AggregateFunctionPtr nested_func_, const DataTypes& arguments) |
283 | 2.29k | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( |
284 | 2.29k | arguments), |
285 | 2.29k | nested_func(std::move(nested_func_)), |
286 | 2.29k | arguments_num(arguments.size()) { |
287 | 2.29k | size_t nested_size = nested_func->align_of_data(); |
288 | 2.29k | CHECK_GT(nested_size, 0); |
289 | 2.29k | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; |
290 | 2.29k | } 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 | 283 | 1 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 284 | 1 | arguments), | 285 | 1 | nested_func(std::move(nested_func_)), | 286 | 1 | arguments_num(arguments.size()) { | 287 | 1 | size_t nested_size = nested_func->align_of_data(); | 288 | | CHECK_GT(nested_size, 0); | 289 | 1 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 290 | 1 | } |
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE Line | Count | Source | 283 | 907 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 284 | 907 | arguments), | 285 | 907 | nested_func(std::move(nested_func_)), | 286 | 907 | arguments_num(arguments.size()) { | 287 | 907 | size_t nested_size = nested_func->align_of_data(); | 288 | | CHECK_GT(nested_size, 0); | 289 | 907 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 290 | 907 | } |
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE Line | Count | Source | 283 | 390 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 284 | 390 | arguments), | 285 | 390 | nested_func(std::move(nested_func_)), | 286 | 390 | arguments_num(arguments.size()) { | 287 | 390 | size_t nested_size = nested_func->align_of_data(); | 288 | | CHECK_GT(nested_size, 0); | 289 | 390 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 290 | 390 | } |
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 | 283 | 921 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 284 | 921 | arguments), | 285 | 921 | nested_func(std::move(nested_func_)), | 286 | 921 | arguments_num(arguments.size()) { | 287 | 921 | size_t nested_size = nested_func->align_of_data(); | 288 | | CHECK_GT(nested_size, 0); | 289 | 921 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 290 | 921 | } |
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 283 | 45 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 284 | 45 | arguments), | 285 | 45 | nested_func(std::move(nested_func_)), | 286 | 45 | arguments_num(arguments.size()) { | 287 | 45 | size_t nested_size = nested_func->align_of_data(); | 288 | | CHECK_GT(nested_size, 0); | 289 | 45 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 290 | 45 | } |
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 283 | 25 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 284 | 25 | arguments), | 285 | 25 | nested_func(std::move(nested_func_)), | 286 | 25 | arguments_num(arguments.size()) { | 287 | 25 | size_t nested_size = nested_func->align_of_data(); | 288 | | CHECK_GT(nested_size, 0); | 289 | 25 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 290 | 25 | } |
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 283 | 10 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 284 | 10 | arguments), | 285 | 10 | nested_func(std::move(nested_func_)), | 286 | 10 | arguments_num(arguments.size()) { | 287 | 10 | size_t nested_size = nested_func->align_of_data(); | 288 | | CHECK_GT(nested_size, 0); | 289 | 10 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 290 | 10 | } |
|
291 | | |
292 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
293 | 1.50k | Arena& arena) const override { |
294 | 1.50k | this->data(place).add(columns, arguments_num, row_num, arena); |
295 | 1.50k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 293 | 3 | Arena& arena) const override { | 294 | 3 | this->data(place).add(columns, arguments_num, row_num, arena); | 295 | 3 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 293 | 715 | Arena& arena) const override { | 294 | 715 | this->data(place).add(columns, arguments_num, row_num, arena); | 295 | 715 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 293 | 69 | Arena& arena) const override { | 294 | 69 | this->data(place).add(columns, arguments_num, row_num, arena); | 295 | 69 | } |
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 | 293 | 471 | Arena& arena) const override { | 294 | 471 | this->data(place).add(columns, arguments_num, row_num, arena); | 295 | 471 | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 293 | 163 | Arena& arena) const override { | 294 | 163 | this->data(place).add(columns, arguments_num, row_num, arena); | 295 | 163 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 293 | 29 | Arena& arena) const override { | 294 | 29 | this->data(place).add(columns, arguments_num, row_num, arena); | 295 | 29 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 293 | 55 | Arena& arena) const override { | 294 | 55 | this->data(place).add(columns, arguments_num, row_num, arena); | 295 | 55 | } |
|
296 | | |
297 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
298 | 740 | Arena& arena) const override { |
299 | 740 | this->data(place).merge(this->data(rhs), arena); |
300 | 740 | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 298 | 467 | Arena& arena) const override { | 299 | 467 | this->data(place).merge(this->data(rhs), arena); | 300 | 467 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 298 | 49 | Arena& arena) const override { | 299 | 49 | this->data(place).merge(this->data(rhs), arena); | 300 | 49 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 298 | 209 | Arena& arena) const override { | 299 | 209 | this->data(place).merge(this->data(rhs), arena); | 300 | 209 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 298 | 15 | Arena& arena) const override { | 299 | 15 | this->data(place).merge(this->data(rhs), arena); | 300 | 15 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE5mergeEPcPKcRNS_5ArenaE |
301 | | |
302 | 860 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
303 | 860 | this->data(place).serialize(buf); |
304 | 860 | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 302 | 546 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 303 | 546 | this->data(place).serialize(buf); | 304 | 546 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 302 | 47 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 303 | 47 | this->data(place).serialize(buf); | 304 | 47 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 302 | 252 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 303 | 252 | this->data(place).serialize(buf); | 304 | 252 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 302 | 15 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 303 | 15 | this->data(place).serialize(buf); | 304 | 15 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE |
305 | | |
306 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
307 | 742 | Arena& arena) const override { |
308 | 742 | this->data(place).deserialize(buf, arena); |
309 | 742 | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 307 | 468 | Arena& arena) const override { | 308 | 468 | this->data(place).deserialize(buf, arena); | 309 | 468 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 307 | 49 | Arena& arena) const override { | 308 | 49 | this->data(place).deserialize(buf, arena); | 309 | 49 | } |
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 | 307 | 210 | Arena& arena) const override { | 308 | 210 | this->data(place).deserialize(buf, arena); | 309 | 210 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 307 | 15 | Arena& arena) const override { | 308 | 15 | this->data(place).deserialize(buf, arena); | 309 | 15 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE |
310 | | |
311 | 610 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { |
312 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. |
313 | 610 | auto* place = const_cast<AggregateDataPtr>(targetplace); |
314 | 610 | auto arguments = this->data(place).get_arguments(this->argument_types); |
315 | 610 | ColumnRawPtrs arguments_raw(arguments.size()); |
316 | 1.26k | for (size_t i = 0; i < arguments.size(); ++i) { |
317 | 657 | arguments_raw[i] = arguments[i].get(); |
318 | 657 | } |
319 | | |
320 | 610 | assert(!arguments.empty()); |
321 | 610 | Arena arena; |
322 | 610 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), |
323 | 610 | arguments_raw.data(), arena); |
324 | 610 | nested_func->insert_result_into(get_nested_place(place), to); |
325 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. |
326 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows |
327 | | // so we need to clear the data, thus not to affect the next insert_result_into |
328 | 610 | this->data(place).clear(); |
329 | 610 | } 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 | 311 | 3 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 312 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 313 | 3 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 314 | 3 | auto arguments = this->data(place).get_arguments(this->argument_types); | 315 | 3 | ColumnRawPtrs arguments_raw(arguments.size()); | 316 | 6 | for (size_t i = 0; i < arguments.size(); ++i) { | 317 | 3 | arguments_raw[i] = arguments[i].get(); | 318 | 3 | } | 319 | | | 320 | 3 | assert(!arguments.empty()); | 321 | 3 | Arena arena; | 322 | 3 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 323 | 3 | arguments_raw.data(), arena); | 324 | 3 | nested_func->insert_result_into(get_nested_place(place), to); | 325 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 326 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 327 | | // so we need to clear the data, thus not to affect the next insert_result_into | 328 | 3 | this->data(place).clear(); | 329 | 3 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 311 | 278 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 312 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 313 | 278 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 314 | 278 | auto arguments = this->data(place).get_arguments(this->argument_types); | 315 | 278 | ColumnRawPtrs arguments_raw(arguments.size()); | 316 | 556 | for (size_t i = 0; i < arguments.size(); ++i) { | 317 | 278 | arguments_raw[i] = arguments[i].get(); | 318 | 278 | } | 319 | | | 320 | 278 | assert(!arguments.empty()); | 321 | 278 | Arena arena; | 322 | 278 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 323 | 278 | arguments_raw.data(), arena); | 324 | 278 | nested_func->insert_result_into(get_nested_place(place), to); | 325 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 326 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 327 | | // so we need to clear the data, thus not to affect the next insert_result_into | 328 | 278 | this->data(place).clear(); | 329 | 278 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 311 | 62 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 312 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 313 | 62 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 314 | 62 | auto arguments = this->data(place).get_arguments(this->argument_types); | 315 | 62 | ColumnRawPtrs arguments_raw(arguments.size()); | 316 | 124 | for (size_t i = 0; i < arguments.size(); ++i) { | 317 | 62 | arguments_raw[i] = arguments[i].get(); | 318 | 62 | } | 319 | | | 320 | 62 | assert(!arguments.empty()); | 321 | 62 | Arena arena; | 322 | 62 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 323 | 62 | arguments_raw.data(), arena); | 324 | 62 | nested_func->insert_result_into(get_nested_place(place), to); | 325 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 326 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 327 | | // so we need to clear the data, thus not to affect the next insert_result_into | 328 | 62 | this->data(place).clear(); | 329 | 62 | } |
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 | 311 | 163 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 312 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 313 | 163 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 314 | 163 | auto arguments = this->data(place).get_arguments(this->argument_types); | 315 | 163 | ColumnRawPtrs arguments_raw(arguments.size()); | 316 | 326 | for (size_t i = 0; i < arguments.size(); ++i) { | 317 | 163 | arguments_raw[i] = arguments[i].get(); | 318 | 163 | } | 319 | | | 320 | 163 | assert(!arguments.empty()); | 321 | 163 | Arena arena; | 322 | 163 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 323 | 163 | arguments_raw.data(), arena); | 324 | 163 | nested_func->insert_result_into(get_nested_place(place), to); | 325 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 326 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 327 | | // so we need to clear the data, thus not to affect the next insert_result_into | 328 | 163 | this->data(place).clear(); | 329 | 163 | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 311 | 57 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 312 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 313 | 57 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 314 | 57 | auto arguments = this->data(place).get_arguments(this->argument_types); | 315 | 57 | ColumnRawPtrs arguments_raw(arguments.size()); | 316 | 114 | for (size_t i = 0; i < arguments.size(); ++i) { | 317 | 57 | arguments_raw[i] = arguments[i].get(); | 318 | 57 | } | 319 | | | 320 | 57 | assert(!arguments.empty()); | 321 | 57 | Arena arena; | 322 | 57 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 323 | 57 | arguments_raw.data(), arena); | 324 | 57 | nested_func->insert_result_into(get_nested_place(place), to); | 325 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 326 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 327 | | // so we need to clear the data, thus not to affect the next insert_result_into | 328 | 57 | this->data(place).clear(); | 329 | 57 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 311 | 18 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 312 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 313 | 18 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 314 | 18 | auto arguments = this->data(place).get_arguments(this->argument_types); | 315 | 18 | ColumnRawPtrs arguments_raw(arguments.size()); | 316 | 54 | for (size_t i = 0; i < arguments.size(); ++i) { | 317 | 36 | arguments_raw[i] = arguments[i].get(); | 318 | 36 | } | 319 | | | 320 | 18 | assert(!arguments.empty()); | 321 | 18 | Arena arena; | 322 | 18 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 323 | 18 | arguments_raw.data(), arena); | 324 | 18 | nested_func->insert_result_into(get_nested_place(place), to); | 325 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 326 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 327 | | // so we need to clear the data, thus not to affect the next insert_result_into | 328 | 18 | this->data(place).clear(); | 329 | 18 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 311 | 29 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 312 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 313 | 29 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 314 | 29 | auto arguments = this->data(place).get_arguments(this->argument_types); | 315 | 29 | ColumnRawPtrs arguments_raw(arguments.size()); | 316 | 87 | for (size_t i = 0; i < arguments.size(); ++i) { | 317 | 58 | arguments_raw[i] = arguments[i].get(); | 318 | 58 | } | 319 | | | 320 | 29 | assert(!arguments.empty()); | 321 | 29 | Arena arena; | 322 | 29 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 323 | 29 | arguments_raw.data(), arena); | 324 | 29 | nested_func->insert_result_into(get_nested_place(place), to); | 325 | | // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function. | 326 | | // but with distinct agg and over() window function together, the result will be inserted into many times with different rows | 327 | | // so we need to clear the data, thus not to affect the next insert_result_into | 328 | 29 | this->data(place).clear(); | 329 | 29 | } |
|
330 | | |
331 | 126 | void reset(AggregateDataPtr place) const override { |
332 | 126 | this->data(place).clear(); |
333 | 126 | nested_func->reset(get_nested_place(place)); |
334 | 126 | } 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 | 331 | 57 | void reset(AggregateDataPtr place) const override { | 332 | 57 | this->data(place).clear(); | 333 | 57 | nested_func->reset(get_nested_place(place)); | 334 | 57 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE5resetEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE5resetEPc Line | Count | Source | 331 | 19 | void reset(AggregateDataPtr place) const override { | 332 | 19 | this->data(place).clear(); | 333 | 19 | nested_func->reset(get_nested_place(place)); | 334 | 19 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE5resetEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE5resetEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE5resetEPc _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE5resetEPc Line | Count | Source | 331 | 50 | void reset(AggregateDataPtr place) const override { | 332 | 50 | this->data(place).clear(); | 333 | 50 | nested_func->reset(get_nested_place(place)); | 334 | 50 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE5resetEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE5resetEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE5resetEPc |
335 | | |
336 | 1.54k | 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 | 336 | 1 | 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 | 336 | 724 | 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 | 336 | 128 | 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 | 336 | 419 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE12size_of_dataEv Line | Count | Source | 336 | 144 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE12size_of_dataEv Line | Count | Source | 336 | 36 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE12size_of_dataEv Line | Count | Source | 336 | 92 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
|
337 | | |
338 | 2.04k | 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 | 338 | 3 | 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 | 338 | 557 | 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 | 338 | 403 | 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 | 338 | 957 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE13align_of_dataEv Line | Count | Source | 338 | 72 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE13align_of_dataEv Line | Count | Source | 338 | 34 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE13align_of_dataEv Line | Count | Source | 338 | 20 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
|
339 | | |
340 | 2.54k | void create(AggregateDataPtr __restrict place) const override { |
341 | 2.54k | new (place) Data<stable>; |
342 | 2.54k | SAFE_CREATE(nested_func->create(get_nested_place(place)), |
343 | 2.54k | this->data(place).~Data<stable>()); |
344 | 2.54k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE6createEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE6createEPc Line | Count | Source | 340 | 3 | void create(AggregateDataPtr __restrict place) const override { | 341 | 3 | new (place) Data<stable>; | 342 | 3 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 343 | 3 | this->data(place).~Data<stable>()); | 344 | 3 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE6createEPc Line | Count | Source | 340 | 1.36k | void create(AggregateDataPtr __restrict place) const override { | 341 | 1.36k | new (place) Data<stable>; | 342 | 1.36k | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 343 | 1.36k | this->data(place).~Data<stable>()); | 344 | 1.36k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE6createEPc Line | Count | Source | 340 | 185 | void create(AggregateDataPtr __restrict place) const override { | 341 | 185 | new (place) Data<stable>; | 342 | 185 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 343 | 185 | this->data(place).~Data<stable>()); | 344 | 185 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE6createEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE6createEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE6createEPc Line | Count | Source | 340 | 650 | void create(AggregateDataPtr __restrict place) const override { | 341 | 650 | new (place) Data<stable>; | 342 | 650 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 343 | 650 | this->data(place).~Data<stable>()); | 344 | 650 | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE6createEPc Line | Count | Source | 340 | 184 | void create(AggregateDataPtr __restrict place) const override { | 341 | 184 | new (place) Data<stable>; | 342 | 184 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 343 | 184 | this->data(place).~Data<stable>()); | 344 | 184 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE6createEPc Line | Count | Source | 340 | 50 | void create(AggregateDataPtr __restrict place) const override { | 341 | 50 | new (place) Data<stable>; | 342 | 50 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 343 | 50 | this->data(place).~Data<stable>()); | 344 | 50 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE6createEPc Line | Count | Source | 340 | 108 | void create(AggregateDataPtr __restrict place) const override { | 341 | 108 | new (place) Data<stable>; | 342 | 108 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 343 | 108 | this->data(place).~Data<stable>()); | 344 | 108 | } |
|
345 | | |
346 | 2.54k | void destroy(AggregateDataPtr __restrict place) const noexcept override { |
347 | 2.54k | this->data(place).~Data<stable>(); |
348 | 2.54k | nested_func->destroy(get_nested_place(place)); |
349 | 2.54k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE7destroyEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE7destroyEPc Line | Count | Source | 346 | 3 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 347 | 3 | this->data(place).~Data<stable>(); | 348 | 3 | nested_func->destroy(get_nested_place(place)); | 349 | 3 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE7destroyEPc Line | Count | Source | 346 | 1.36k | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 347 | 1.36k | this->data(place).~Data<stable>(); | 348 | 1.36k | nested_func->destroy(get_nested_place(place)); | 349 | 1.36k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE7destroyEPc Line | Count | Source | 346 | 185 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 347 | 185 | this->data(place).~Data<stable>(); | 348 | 185 | nested_func->destroy(get_nested_place(place)); | 349 | 185 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE7destroyEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE7destroyEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE7destroyEPc Line | Count | Source | 346 | 650 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 347 | 650 | this->data(place).~Data<stable>(); | 348 | 650 | nested_func->destroy(get_nested_place(place)); | 349 | 650 | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE7destroyEPc Line | Count | Source | 346 | 184 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 347 | 184 | this->data(place).~Data<stable>(); | 348 | 184 | nested_func->destroy(get_nested_place(place)); | 349 | 184 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE7destroyEPc Line | Count | Source | 346 | 50 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 347 | 50 | this->data(place).~Data<stable>(); | 348 | 50 | nested_func->destroy(get_nested_place(place)); | 349 | 50 | } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE7destroyEPc Line | Count | Source | 346 | 108 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 347 | 108 | this->data(place).~Data<stable>(); | 348 | 108 | nested_func->destroy(get_nested_place(place)); | 349 | 108 | } |
|
350 | | |
351 | 150 | 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 | 351 | 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 | 351 | 37 | 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 | 351 | 69 | 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 |
352 | | |
353 | 525 | 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 | 353 | 2 | 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 | 353 | 219 | 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 | 353 | 28 | 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 | 353 | 156 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE15get_return_typeEv Line | Count | Source | 353 | 80 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE15get_return_typeEv Line | Count | Source | 353 | 23 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); } |
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE15get_return_typeEv Line | Count | Source | 353 | 17 | DataTypePtr get_return_type() const override { return nested_func->get_return_type(); } |
|
354 | | |
355 | 55 | IAggregateFunction* transmit_to_stable() override { |
356 | 55 | return new AggregateFunctionDistinct<Data, true>(nested_func, |
357 | 55 | IAggregateFunction::argument_types); |
358 | 55 | } 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 | 355 | 45 | IAggregateFunction* transmit_to_stable() override { | 356 | 45 | return new AggregateFunctionDistinct<Data, true>(nested_func, | 357 | 45 | IAggregateFunction::argument_types); | 358 | 45 | } |
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18transmit_to_stableEv _ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18transmit_to_stableEv Line | Count | Source | 355 | 10 | IAggregateFunction* transmit_to_stable() override { | 356 | 10 | return new AggregateFunctionDistinct<Data, true>(nested_func, | 357 | 10 | IAggregateFunction::argument_types); | 358 | 10 | } |
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE18transmit_to_stableEv |
359 | | }; |
360 | | |
361 | | template <typename T> |
362 | | struct FunctionStableTransfer { |
363 | | using FunctionStable = T; |
364 | | }; |
365 | | |
366 | | template <template <bool stable> typename Data> |
367 | | struct FunctionStableTransfer<AggregateFunctionDistinct<Data, false>> { |
368 | | using FunctionStable = AggregateFunctionDistinct<Data, true>; |
369 | | }; |
370 | | |
371 | | } // namespace doris |