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 | 453 | void clear() { data.clear(); }Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE5clearEv Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE5clearEv _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE5clearEv Line | Count | Source | 60 | 6 | void clear() { data.clear(); } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE5clearEv _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE5clearEv Line | Count | Source | 60 | 359 | void clear() { data.clear(); } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE5clearEv _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE5clearEv Line | Count | Source | 60 | 88 | void clear() { data.clear(); } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE5clearEv Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE5clearEv Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE5clearEv |
61 | | |
62 | 828 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { |
63 | 828 | const auto& vec = |
64 | 828 | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) |
65 | 828 | .get_data(); |
66 | 828 | if constexpr (stable) { |
67 | 0 | data.emplace(vec[row_num], data.size()); |
68 | 828 | } else { |
69 | 828 | data.insert(vec[row_num]); |
70 | 828 | } |
71 | 828 | } Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 62 | 6 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { | 63 | 6 | const auto& vec = | 64 | 6 | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) | 65 | 6 | .get_data(); | 66 | | if constexpr (stable) { | 67 | | data.emplace(vec[row_num], data.size()); | 68 | 6 | } else { | 69 | 6 | data.insert(vec[row_num]); | 70 | 6 | } | 71 | 6 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 62 | 740 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { | 63 | 740 | const auto& vec = | 64 | 740 | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) | 65 | 740 | .get_data(); | 66 | | if constexpr (stable) { | 67 | | data.emplace(vec[row_num], data.size()); | 68 | 740 | } else { | 69 | 740 | data.insert(vec[row_num]); | 70 | 740 | } | 71 | 740 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 62 | 82 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) { | 63 | 82 | const auto& vec = | 64 | 82 | assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0]) | 65 | 82 | .get_data(); | 66 | | if constexpr (stable) { | 67 | | data.emplace(vec[row_num], data.size()); | 68 | 82 | } else { | 69 | 82 | data.insert(vec[row_num]); | 70 | 82 | } | 71 | 82 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE |
72 | | |
73 | 523 | void merge(const Self& rhs, Arena&) { |
74 | 523 | DCHECK(!stable); |
75 | 523 | if constexpr (!stable) { |
76 | 523 | data.merge(Container(rhs.data)); |
77 | 523 | } |
78 | 523 | } 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 | 73 | 457 | void merge(const Self& rhs, Arena&) { | 74 | 457 | DCHECK(!stable); | 75 | 457 | if constexpr (!stable) { | 76 | 457 | data.merge(Container(rhs.data)); | 77 | 457 | } | 78 | 457 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE5mergeERKS2_RNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE5mergeERKS2_RNS_5ArenaE Line | Count | Source | 73 | 66 | void merge(const Self& rhs, Arena&) { | 74 | 66 | DCHECK(!stable); | 75 | 66 | if constexpr (!stable) { | 76 | 66 | data.merge(Container(rhs.data)); | 77 | 66 | } | 78 | 66 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE5mergeERKS2_RNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE5mergeERKS2_RNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE5mergeERKS2_RNS_5ArenaE |
79 | | |
80 | 601 | void serialize(BufferWritable& buf) const { |
81 | 601 | DCHECK(!stable); |
82 | 601 | if constexpr (!stable) { |
83 | 601 | buf.write_var_uint(data.size()); |
84 | 601 | for (const auto& value : data) { |
85 | 597 | buf.write_binary(value); |
86 | 597 | } |
87 | 601 | } |
88 | 601 | } 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 | 80 | 535 | void serialize(BufferWritable& buf) const { | 81 | 535 | DCHECK(!stable); | 82 | 535 | if constexpr (!stable) { | 83 | 535 | buf.write_var_uint(data.size()); | 84 | 535 | for (const auto& value : data) { | 85 | 533 | buf.write_binary(value); | 86 | 533 | } | 87 | 535 | } | 88 | 535 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE9serializeERNS_14BufferWritableE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE9serializeERNS_14BufferWritableE Line | Count | Source | 80 | 66 | void serialize(BufferWritable& buf) const { | 81 | 66 | DCHECK(!stable); | 82 | 66 | if constexpr (!stable) { | 83 | 66 | buf.write_var_uint(data.size()); | 84 | 66 | for (const auto& value : data) { | 85 | 64 | buf.write_binary(value); | 86 | 64 | } | 87 | 66 | } | 88 | 66 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE9serializeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE9serializeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE9serializeERNS_14BufferWritableE |
89 | | |
90 | 523 | void deserialize(BufferReadable& buf, Arena&) { |
91 | 523 | DCHECK(!stable); |
92 | 523 | if constexpr (!stable) { |
93 | 523 | uint64_t new_size = 0; |
94 | 523 | buf.read_var_uint(new_size); |
95 | 523 | typename PrimitiveTypeTraits<T>::CppType x; |
96 | 1.04k | for (size_t i = 0; i < new_size; ++i) { |
97 | 519 | buf.read_binary(x); |
98 | 519 | data.insert(x); |
99 | 519 | } |
100 | 523 | } |
101 | 523 | } 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 | 90 | 457 | void deserialize(BufferReadable& buf, Arena&) { | 91 | 457 | DCHECK(!stable); | 92 | 457 | if constexpr (!stable) { | 93 | 457 | uint64_t new_size = 0; | 94 | 457 | buf.read_var_uint(new_size); | 95 | 457 | typename PrimitiveTypeTraits<T>::CppType x; | 96 | 912 | for (size_t i = 0; i < new_size; ++i) { | 97 | 455 | buf.read_binary(x); | 98 | 455 | data.insert(x); | 99 | 455 | } | 100 | 457 | } | 101 | 457 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 90 | 66 | void deserialize(BufferReadable& buf, Arena&) { | 91 | 66 | DCHECK(!stable); | 92 | 66 | if constexpr (!stable) { | 93 | 66 | uint64_t new_size = 0; | 94 | 66 | buf.read_var_uint(new_size); | 95 | 66 | typename PrimitiveTypeTraits<T>::CppType x; | 96 | 130 | for (size_t i = 0; i < new_size; ++i) { | 97 | 64 | buf.read_binary(x); | 98 | 64 | data.insert(x); | 99 | 64 | } | 100 | 66 | } | 101 | 66 | } |
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE |
102 | | |
103 | 380 | MutableColumns get_arguments(const DataTypes& argument_types) const { |
104 | 380 | MutableColumns argument_columns; |
105 | 380 | argument_columns.emplace_back(argument_types[0]->create_column()); |
106 | | |
107 | 380 | 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 | 380 | } else { |
117 | 453 | for (const auto& elem : data) { |
118 | 453 | argument_columns[0]->insert(Field::create_field<T>(elem)); |
119 | 453 | } |
120 | 380 | } |
121 | | |
122 | 380 | return argument_columns; |
123 | 380 | } 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 | 6 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 104 | 6 | MutableColumns argument_columns; | 105 | 6 | 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 | 6 | } else { | 117 | 6 | for (const auto& elem : data) { | 118 | 6 | argument_columns[0]->insert(Field::create_field<T>(elem)); | 119 | 6 | } | 120 | 6 | } | 121 | | | 122 | 6 | return argument_columns; | 123 | 6 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 103 | 302 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 104 | 302 | MutableColumns argument_columns; | 105 | 302 | 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 | 302 | } else { | 117 | 383 | for (const auto& elem : data) { | 118 | 383 | argument_columns[0]->insert(Field::create_field<T>(elem)); | 119 | 383 | } | 120 | 302 | } | 121 | | | 122 | 302 | return argument_columns; | 123 | 302 | } |
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 103 | 72 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 104 | 72 | MutableColumns argument_columns; | 105 | 72 | 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 | 72 | } else { | 117 | 72 | for (const auto& elem : data) { | 118 | 64 | argument_columns[0]->insert(Field::create_field<T>(elem)); | 119 | 64 | } | 120 | 72 | } | 121 | | | 122 | 72 | return argument_columns; | 123 | 72 | } |
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 | 226 | void merge(const Self& rhs, Arena& arena) { |
137 | 226 | DCHECK(!stable); |
138 | 226 | 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 | 226 | } |
145 | 226 | } _ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5mergeERKS1_RNS_5ArenaE Line | Count | Source | 136 | 226 | void merge(const Self& rhs, Arena& arena) { | 137 | 226 | DCHECK(!stable); | 138 | 226 | 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 | 226 | } | 145 | 226 | } |
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 | 657 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) { |
178 | 657 | auto key = columns[0]->get_data_at(row_num); |
179 | 657 | key.data = arena.insert(key.data, key.size); |
180 | | |
181 | 657 | if constexpr (stable) { |
182 | 179 | data.emplace(key, data.size()); |
183 | 478 | } else { |
184 | 478 | data.insert(key); |
185 | 478 | } |
186 | 657 | } _ZN5doris42AggregateFunctionDistinctSingleGenericDataILb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE Line | Count | Source | 177 | 478 | void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) { | 178 | 478 | auto key = columns[0]->get_data_at(row_num); | 179 | 478 | key.data = arena.insert(key.data, key.size); | 180 | | | 181 | | if constexpr (stable) { | 182 | | data.emplace(key, data.size()); | 183 | 478 | } else { | 184 | 478 | data.insert(key); | 185 | 478 | } | 186 | 478 | } |
_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 | 53 | MutableColumns get_arguments(const DataTypes& argument_types) const { |
231 | 53 | MutableColumns argument_columns(argument_types.size()); |
232 | 159 | for (size_t i = 0; i < argument_types.size(); ++i) { |
233 | 106 | argument_columns[i] = argument_types[i]->create_column(); |
234 | 106 | } |
235 | | |
236 | 53 | 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 | 17 | } |
255 | | |
256 | 53 | return argument_columns; |
257 | 53 | } _ZNK5doris44AggregateFunctionDistinctMultipleGenericDataILb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE Line | Count | Source | 230 | 17 | MutableColumns get_arguments(const DataTypes& argument_types) const { | 231 | 17 | MutableColumns argument_columns(argument_types.size()); | 232 | 51 | for (size_t i = 0; i < argument_types.size(); ++i) { | 233 | 34 | argument_columns[i] = argument_types[i]->create_column(); | 234 | 34 | } | 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 | 17 | } 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 | 17 | } | 255 | | | 256 | 17 | return argument_columns; | 257 | 17 | } |
_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.67k | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { |
275 | 6.67k | return place + prefix_size; |
276 | 6.67k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE16get_nested_placeEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE16get_nested_placeEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE16get_nested_placeEPc Line | Count | Source | 274 | 24 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 24 | return place + prefix_size; | 276 | 24 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE16get_nested_placeEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE16get_nested_placeEPc Line | Count | Source | 274 | 3.31k | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 3.31k | return place + prefix_size; | 276 | 3.31k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE16get_nested_placeEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE16get_nested_placeEPc Line | Count | Source | 274 | 612 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 612 | return place + prefix_size; | 276 | 612 | } |
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.69k | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 1.69k | return place + prefix_size; | 276 | 1.69k | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE16get_nested_placeEPc Line | Count | Source | 274 | 585 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 585 | return place + prefix_size; | 276 | 585 | } |
_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 | 312 | AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept { | 275 | 312 | return place + prefix_size; | 276 | 312 | } |
|
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 | 1.90k | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( |
285 | 1.90k | arguments), |
286 | 1.90k | nested_func(std::move(nested_func_)), |
287 | 1.90k | arguments_num(arguments.size()) { |
288 | 1.90k | size_t nested_size = nested_func->align_of_data(); |
289 | 1.90k | CHECK_GT(nested_size, 0); |
290 | 1.90k | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; |
291 | 1.90k | } 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 | 2 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 285 | 2 | arguments), | 286 | 2 | nested_func(std::move(nested_func_)), | 287 | 2 | arguments_num(arguments.size()) { | 288 | 2 | size_t nested_size = nested_func->align_of_data(); | 289 | | CHECK_GT(nested_size, 0); | 290 | 2 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 291 | 2 | } |
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE Line | Count | Source | 284 | 696 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 285 | 696 | arguments), | 286 | 696 | nested_func(std::move(nested_func_)), | 287 | 696 | arguments_num(arguments.size()) { | 288 | 696 | size_t nested_size = nested_func->align_of_data(); | 289 | | CHECK_GT(nested_size, 0); | 290 | 696 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 291 | 696 | } |
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE Line | Count | Source | 284 | 347 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 285 | 347 | arguments), | 286 | 347 | nested_func(std::move(nested_func_)), | 287 | 347 | arguments_num(arguments.size()) { | 288 | 347 | size_t nested_size = nested_func->align_of_data(); | 289 | | CHECK_GT(nested_size, 0); | 290 | 347 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 291 | 347 | } |
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 | 770 | : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>( | 285 | 770 | arguments), | 286 | 770 | nested_func(std::move(nested_func_)), | 287 | 770 | arguments_num(arguments.size()) { | 288 | 770 | size_t nested_size = nested_func->align_of_data(); | 289 | | CHECK_GT(nested_size, 0); | 290 | 770 | prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size; | 291 | 770 | } |
_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 | 1.58k | Arena& arena) const override { |
295 | 1.58k | this->data(place).add(columns, arguments_num, row_num, arena); |
296 | 1.58k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 294 | 6 | Arena& arena) const override { | 295 | 6 | this->data(place).add(columns, arguments_num, row_num, arena); | 296 | 6 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 294 | 740 | Arena& arena) const override { | 295 | 740 | this->data(place).add(columns, arguments_num, row_num, arena); | 296 | 740 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 294 | 82 | Arena& arena) const override { | 295 | 82 | this->data(place).add(columns, arguments_num, row_num, arena); | 296 | 82 | } |
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 | 478 | Arena& arena) const override { | 295 | 478 | this->data(place).add(columns, arguments_num, row_num, arena); | 296 | 478 | } |
_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 | 750 | Arena& arena) const override { |
300 | 750 | this->data(place).merge(this->data(rhs), arena); |
301 | 750 | } 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 | 299 | 457 | Arena& arena) const override { | 300 | 457 | this->data(place).merge(this->data(rhs), arena); | 301 | 457 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 299 | 66 | Arena& arena) const override { | 300 | 66 | this->data(place).merge(this->data(rhs), arena); | 301 | 66 | } |
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 | 874 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
304 | 874 | this->data(place).serialize(buf); |
305 | 874 | } 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 | 303 | 535 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 304 | 535 | this->data(place).serialize(buf); | 305 | 535 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 303 | 66 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 304 | 66 | this->data(place).serialize(buf); | 305 | 66 | } |
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 | 750 | Arena& arena) const override { |
309 | 750 | this->data(place).deserialize(buf, arena); |
310 | 750 | } 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 | 308 | 457 | Arena& arena) const override { | 309 | 457 | this->data(place).deserialize(buf, arena); | 310 | 457 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 308 | 66 | Arena& arena) const override { | 309 | 66 | this->data(place).deserialize(buf, arena); | 310 | 66 | } |
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 | 665 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { |
313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. |
314 | 665 | auto* place = const_cast<AggregateDataPtr>(targetplace); |
315 | 665 | auto arguments = this->data(place).get_arguments(this->argument_types); |
316 | 665 | ColumnRawPtrs arguments_raw(arguments.size()); |
317 | 1.38k | for (size_t i = 0; i < arguments.size(); ++i) { |
318 | 719 | arguments_raw[i] = arguments[i].get(); |
319 | 719 | } |
320 | | |
321 | 665 | assert(!arguments.empty()); |
322 | 665 | Arena arena; |
323 | 665 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), |
324 | 665 | arguments_raw.data(), arena); |
325 | 665 | 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 | 665 | this->data(place).clear(); |
330 | 665 | } 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 | 6 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 314 | 6 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 315 | 6 | auto arguments = this->data(place).get_arguments(this->argument_types); | 316 | 6 | ColumnRawPtrs arguments_raw(arguments.size()); | 317 | 12 | for (size_t i = 0; i < arguments.size(); ++i) { | 318 | 6 | arguments_raw[i] = arguments[i].get(); | 319 | 6 | } | 320 | | | 321 | 6 | assert(!arguments.empty()); | 322 | 6 | Arena arena; | 323 | 6 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 324 | 6 | arguments_raw.data(), arena); | 325 | 6 | 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 | 6 | this->data(place).clear(); | 330 | 6 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 312 | 302 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 314 | 302 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 315 | 302 | auto arguments = this->data(place).get_arguments(this->argument_types); | 316 | 302 | ColumnRawPtrs arguments_raw(arguments.size()); | 317 | 604 | for (size_t i = 0; i < arguments.size(); ++i) { | 318 | 302 | arguments_raw[i] = arguments[i].get(); | 319 | 302 | } | 320 | | | 321 | 302 | assert(!arguments.empty()); | 322 | 302 | Arena arena; | 323 | 302 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 324 | 302 | arguments_raw.data(), arena); | 325 | 302 | 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 | 302 | this->data(place).clear(); | 330 | 302 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 312 | 72 | void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override { | 313 | | // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr. | 314 | 72 | auto* place = const_cast<AggregateDataPtr>(targetplace); | 315 | 72 | auto arguments = this->data(place).get_arguments(this->argument_types); | 316 | 72 | ColumnRawPtrs arguments_raw(arguments.size()); | 317 | 144 | for (size_t i = 0; i < arguments.size(); ++i) { | 318 | 72 | arguments_raw[i] = arguments[i].get(); | 319 | 72 | } | 320 | | | 321 | 72 | assert(!arguments.empty()); | 322 | 72 | Arena arena; | 323 | 72 | nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place), | 324 | 72 | arguments_raw.data(), arena); | 325 | 72 | 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 | 72 | this->data(place).clear(); | 330 | 72 | } |
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.48k | 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 | 2 | 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 | 670 | 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 | 144 | 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 | 396 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE12size_of_dataEv Line | Count | Source | 337 | 155 | 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 | 53 | size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); } |
|
338 | | |
339 | 1.77k | 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 | 6 | 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 | 464 | 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 | 365 | 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 | 806 | size_t align_of_data() const override { return nested_func->align_of_data(); } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE13align_of_dataEv Line | Count | Source | 339 | 78 | 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.61k | void create(AggregateDataPtr __restrict place) const override { |
342 | 2.61k | new (place) Data<stable>; |
343 | 2.61k | SAFE_CREATE(nested_func->create(get_nested_place(place)), |
344 | 2.61k | this->data(place).~Data<stable>()); |
345 | 2.61k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE6createEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE6createEPc Line | Count | Source | 341 | 6 | void create(AggregateDataPtr __restrict place) const override { | 342 | 6 | new (place) Data<stable>; | 343 | 6 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 6 | this->data(place).~Data<stable>()); | 345 | 6 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE6createEPc Line | Count | Source | 341 | 1.32k | void create(AggregateDataPtr __restrict place) const override { | 342 | 1.32k | new (place) Data<stable>; | 343 | 1.32k | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 1.32k | this->data(place).~Data<stable>()); | 345 | 1.32k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE6createEPc Line | Count | Source | 341 | 227 | void create(AggregateDataPtr __restrict place) const override { | 342 | 227 | new (place) Data<stable>; | 343 | 227 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 227 | this->data(place).~Data<stable>()); | 345 | 227 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE6createEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE6createEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE6createEPc _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE6createEPc Line | Count | Source | 341 | 657 | void create(AggregateDataPtr __restrict place) const override { | 342 | 657 | new (place) Data<stable>; | 343 | 657 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 657 | this->data(place).~Data<stable>()); | 345 | 657 | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE6createEPc Line | Count | Source | 341 | 229 | void create(AggregateDataPtr __restrict place) const override { | 342 | 229 | new (place) Data<stable>; | 343 | 229 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 229 | this->data(place).~Data<stable>()); | 345 | 229 | } |
_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 | 120 | void create(AggregateDataPtr __restrict place) const override { | 342 | 120 | new (place) Data<stable>; | 343 | 120 | SAFE_CREATE(nested_func->create(get_nested_place(place)), | 344 | 120 | this->data(place).~Data<stable>()); | 345 | 120 | } |
|
346 | | |
347 | 2.61k | void destroy(AggregateDataPtr __restrict place) const noexcept override { |
348 | 2.61k | this->data(place).~Data<stable>(); |
349 | 2.61k | nested_func->destroy(get_nested_place(place)); |
350 | 2.61k | } Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE7destroyEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE7destroyEPc Line | Count | Source | 347 | 6 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 6 | this->data(place).~Data<stable>(); | 349 | 6 | nested_func->destroy(get_nested_place(place)); | 350 | 6 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE7destroyEPc Line | Count | Source | 347 | 1.32k | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 1.32k | this->data(place).~Data<stable>(); | 349 | 1.32k | nested_func->destroy(get_nested_place(place)); | 350 | 1.32k | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE7destroyEPc Line | Count | Source | 347 | 227 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 227 | this->data(place).~Data<stable>(); | 349 | 227 | nested_func->destroy(get_nested_place(place)); | 350 | 227 | } |
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE7destroyEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE7destroyEPc Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE7destroyEPc _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE7destroyEPc Line | Count | Source | 347 | 656 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 656 | this->data(place).~Data<stable>(); | 349 | 656 | nested_func->destroy(get_nested_place(place)); | 350 | 656 | } |
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE7destroyEPc Line | Count | Source | 347 | 228 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 228 | this->data(place).~Data<stable>(); | 349 | 228 | nested_func->destroy(get_nested_place(place)); | 350 | 228 | } |
_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 | 120 | void destroy(AggregateDataPtr __restrict place) const noexcept override { | 348 | 120 | this->data(place).~Data<stable>(); | 349 | 120 | nested_func->destroy(get_nested_place(place)); | 350 | 120 | } |
|
351 | | |
352 | 134 | 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 | 61 | 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 | 567 | 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 | 4 | 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 | 239 | 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 | 36 | 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" |