Coverage Report

Created: 2026-09-24 08:44

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
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, doris::flat_hash_map<typename PrimitiveTypeTraits<T>::CppType, uint32_t>,
55
            doris::flat_hash_set<typename PrimitiveTypeTraits<T>::CppType>>;
56
    using Self = AggregateFunctionDistinctSingleNumericData<T, stable>;
57
    Container data;
58
59
538
    void clear() { data.clear(); }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE5clearEv
Line
Count
Source
59
4
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE5clearEv
Line
Count
Source
59
7
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE5clearEv
Line
Count
Source
59
383
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE5clearEv
Line
Count
Source
59
140
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE5clearEv
Line
Count
Source
59
4
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE5clearEv
60
61
1.12k
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
1.12k
        const auto& vec =
63
1.12k
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
1.12k
                        .get_data();
65
1.12k
        if constexpr (stable) {
66
0
            data.emplace(vec[row_num], data.size());
67
1.12k
        } else {
68
1.12k
            data.insert(vec[row_num]);
69
1.12k
        }
70
1.12k
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
16
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
16
        const auto& vec =
63
16
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
16
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
16
        } else {
68
16
            data.insert(vec[row_num]);
69
16
        }
70
16
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
19
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
19
        const auto& vec =
63
19
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
19
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
19
        } else {
68
19
            data.insert(vec[row_num]);
69
19
        }
70
19
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
869
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
869
        const auto& vec =
63
869
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
869
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
869
        } else {
68
869
            data.insert(vec[row_num]);
69
869
        }
70
869
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
209
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
209
        const auto& vec =
63
209
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
209
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
209
        } else {
68
209
            data.insert(vec[row_num]);
69
209
        }
70
209
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
16
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
16
        const auto& vec =
63
16
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
16
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
16
        } else {
68
16
            data.insert(vec[row_num]);
69
16
        }
70
16
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
71
72
21
    void merge(const Self& rhs, Arena&) {
73
21
        DCHECK(!stable);
74
21
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
21
            if (data.empty() && !rhs.data.empty()) {
77
6
                data.reserve(rhs.data.size());
78
6
            }
79
35
            for (const auto& elem : rhs.data) {
80
35
                data.insert(elem);
81
35
            }
82
21
        }
83
21
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE5mergeERKS2_RNS_5ArenaE
Line
Count
Source
72
4
    void merge(const Self& rhs, Arena&) {
73
4
        DCHECK(!stable);
74
4
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
4
            if (data.empty() && !rhs.data.empty()) {
77
1
                data.reserve(rhs.data.size());
78
1
            }
79
6
            for (const auto& elem : rhs.data) {
80
6
                data.insert(elem);
81
6
            }
82
4
        }
83
4
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE5mergeERKS2_RNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE5mergeERKS2_RNS_5ArenaE
Line
Count
Source
72
4
    void merge(const Self& rhs, Arena&) {
73
4
        DCHECK(!stable);
74
4
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
4
            if (data.empty() && !rhs.data.empty()) {
77
1
                data.reserve(rhs.data.size());
78
1
            }
79
6
            for (const auto& elem : rhs.data) {
80
6
                data.insert(elem);
81
6
            }
82
4
        }
83
4
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE5mergeERKS2_RNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE5mergeERKS2_RNS_5ArenaE
Line
Count
Source
72
4
    void merge(const Self& rhs, Arena&) {
73
4
        DCHECK(!stable);
74
4
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
4
            if (data.empty() && !rhs.data.empty()) {
77
1
                data.reserve(rhs.data.size());
78
1
            }
79
6
            for (const auto& elem : rhs.data) {
80
6
                data.insert(elem);
81
6
            }
82
4
        }
83
4
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE5mergeERKS2_RNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE5mergeERKS2_RNS_5ArenaE
Line
Count
Source
72
5
    void merge(const Self& rhs, Arena&) {
73
5
        DCHECK(!stable);
74
5
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
5
            if (data.empty() && !rhs.data.empty()) {
77
2
                data.reserve(rhs.data.size());
78
2
            }
79
11
            for (const auto& elem : rhs.data) {
80
11
                data.insert(elem);
81
11
            }
82
5
        }
83
5
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE5mergeERKS2_RNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE5mergeERKS2_RNS_5ArenaE
Line
Count
Source
72
4
    void merge(const Self& rhs, Arena&) {
73
4
        DCHECK(!stable);
74
4
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
4
            if (data.empty() && !rhs.data.empty()) {
77
1
                data.reserve(rhs.data.size());
78
1
            }
79
6
            for (const auto& elem : rhs.data) {
80
6
                data.insert(elem);
81
6
            }
82
4
        }
83
4
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE5mergeERKS2_RNS_5ArenaE
84
85
663
    void serialize(BufferWritable& buf) const {
86
663
        DCHECK(!stable);
87
663
        if constexpr (!stable) {
88
663
            buf.write_var_uint(data.size());
89
717
            for (const auto& value : data) {
90
717
                buf.write_binary(value);
91
717
            }
92
663
        }
93
663
    }
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
3
    void serialize(BufferWritable& buf) const {
86
3
        DCHECK(!stable);
87
3
        if constexpr (!stable) {
88
3
            buf.write_var_uint(data.size());
89
8
            for (const auto& value : data) {
90
8
                buf.write_binary(value);
91
8
            }
92
3
        }
93
3
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
3
    void serialize(BufferWritable& buf) const {
86
3
        DCHECK(!stable);
87
3
        if constexpr (!stable) {
88
3
            buf.write_var_uint(data.size());
89
8
            for (const auto& value : data) {
90
8
                buf.write_binary(value);
91
8
            }
92
3
        }
93
3
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
549
    void serialize(BufferWritable& buf) const {
86
549
        DCHECK(!stable);
87
549
        if constexpr (!stable) {
88
549
            buf.write_var_uint(data.size());
89
554
            for (const auto& value : data) {
90
554
                buf.write_binary(value);
91
554
            }
92
549
        }
93
549
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
105
    void serialize(BufferWritable& buf) const {
86
105
        DCHECK(!stable);
87
105
        if constexpr (!stable) {
88
105
            buf.write_var_uint(data.size());
89
139
            for (const auto& value : data) {
90
139
                buf.write_binary(value);
91
139
            }
92
105
        }
93
105
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
3
    void serialize(BufferWritable& buf) const {
86
3
        DCHECK(!stable);
87
3
        if constexpr (!stable) {
88
3
            buf.write_var_uint(data.size());
89
8
            for (const auto& value : data) {
90
8
                buf.write_binary(value);
91
8
            }
92
3
        }
93
3
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE9serializeERNS_14BufferWritableE
94
95
600
    void deserialize(BufferReadable& buf, Arena&) {
96
600
        DCHECK(!stable);
97
600
        if constexpr (!stable) {
98
600
            uint64_t new_size = 0;
99
600
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
600
            if (data.empty() && new_size != 0) {
102
375
                data.reserve(new_size);
103
375
            }
104
600
            typename PrimitiveTypeTraits<T>::CppType x;
105
1.28k
            for (size_t i = 0; i < new_size; ++i) {
106
683
                buf.read_binary(x);
107
683
                data.insert(x);
108
683
            }
109
600
        }
110
600
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
5
    void deserialize(BufferReadable& buf, Arena&) {
96
5
        DCHECK(!stable);
97
5
        if constexpr (!stable) {
98
5
            uint64_t new_size = 0;
99
5
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
5
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
5
            typename PrimitiveTypeTraits<T>::CppType x;
105
19
            for (size_t i = 0; i < new_size; ++i) {
106
14
                buf.read_binary(x);
107
14
                data.insert(x);
108
14
            }
109
5
        }
110
5
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
5
    void deserialize(BufferReadable& buf, Arena&) {
96
5
        DCHECK(!stable);
97
5
        if constexpr (!stable) {
98
5
            uint64_t new_size = 0;
99
5
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
5
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
5
            typename PrimitiveTypeTraits<T>::CppType x;
105
19
            for (size_t i = 0; i < new_size; ++i) {
106
14
                buf.read_binary(x);
107
14
                data.insert(x);
108
14
            }
109
5
        }
110
5
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
470
    void deserialize(BufferReadable& buf, Arena&) {
96
470
        DCHECK(!stable);
97
470
        if constexpr (!stable) {
98
470
            uint64_t new_size = 0;
99
470
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
470
            if (data.empty() && new_size != 0) {
102
287
                data.reserve(new_size);
103
287
            }
104
470
            typename PrimitiveTypeTraits<T>::CppType x;
105
950
            for (size_t i = 0; i < new_size; ++i) {
106
480
                buf.read_binary(x);
107
480
                data.insert(x);
108
480
            }
109
470
        }
110
470
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
115
    void deserialize(BufferReadable& buf, Arena&) {
96
115
        DCHECK(!stable);
97
115
        if constexpr (!stable) {
98
115
            uint64_t new_size = 0;
99
115
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
115
            if (data.empty() && new_size != 0) {
102
82
                data.reserve(new_size);
103
82
            }
104
115
            typename PrimitiveTypeTraits<T>::CppType x;
105
276
            for (size_t i = 0; i < new_size; ++i) {
106
161
                buf.read_binary(x);
107
161
                data.insert(x);
108
161
            }
109
115
        }
110
115
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
5
    void deserialize(BufferReadable& buf, Arena&) {
96
5
        DCHECK(!stable);
97
5
        if constexpr (!stable) {
98
5
            uint64_t new_size = 0;
99
5
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
5
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
5
            typename PrimitiveTypeTraits<T>::CppType x;
105
19
            for (size_t i = 0; i < new_size; ++i) {
106
14
                buf.read_binary(x);
107
14
                data.insert(x);
108
14
            }
109
5
        }
110
5
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
111
112
600
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
600
        deserialize(buf, arena);
115
600
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
5
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
5
        deserialize(buf, arena);
115
5
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
5
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
5
        deserialize(buf, arena);
115
5
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
471
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
471
        deserialize(buf, arena);
115
471
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
114
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
114
        deserialize(buf, arena);
115
114
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
5
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
5
        deserialize(buf, arena);
115
5
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
116
117
433
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
433
        MutableColumns argument_columns;
119
433
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
433
        if constexpr (stable) {
122
0
            argument_columns[0]->resize(data.size());
123
            // argument_columns[0] is a mutable column created using create_column.
124
            // since get_raw_data returns a StringRef, const_cast is required here.
125
0
            auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>(
126
0
                    argument_columns[0]->get_raw_data().data);
127
0
            for (auto it : data) {
128
0
                ptr[it.second] = it.first;
129
0
            }
130
433
        } else {
131
628
            for (const auto& elem : data) {
132
628
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
628
            }
134
433
        }
135
136
433
        return argument_columns;
137
433
    }
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
2
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
2
        MutableColumns argument_columns;
119
2
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
        if constexpr (stable) {
122
            argument_columns[0]->resize(data.size());
123
            // argument_columns[0] is a mutable column created using create_column.
124
            // since get_raw_data returns a StringRef, const_cast is required here.
125
            auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>(
126
                    argument_columns[0]->get_raw_data().data);
127
            for (auto it : data) {
128
                ptr[it.second] = it.first;
129
            }
130
2
        } else {
131
10
            for (const auto& elem : data) {
132
10
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
10
            }
134
2
        }
135
136
2
        return argument_columns;
137
2
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
5
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
5
        MutableColumns argument_columns;
119
5
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
        if constexpr (stable) {
122
            argument_columns[0]->resize(data.size());
123
            // argument_columns[0] is a mutable column created using create_column.
124
            // since get_raw_data returns a StringRef, const_cast is required here.
125
            auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>(
126
                    argument_columns[0]->get_raw_data().data);
127
            for (auto it : data) {
128
                ptr[it.second] = it.first;
129
            }
130
5
        } else {
131
13
            for (const auto& elem : data) {
132
13
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
13
            }
134
5
        }
135
136
5
        return argument_columns;
137
5
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
320
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
320
        MutableColumns argument_columns;
119
320
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
        if constexpr (stable) {
122
            argument_columns[0]->resize(data.size());
123
            // argument_columns[0] is a mutable column created using create_column.
124
            // since get_raw_data returns a StringRef, const_cast is required here.
125
            auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>(
126
                    argument_columns[0]->get_raw_data().data);
127
            for (auto it : data) {
128
                ptr[it.second] = it.first;
129
            }
130
320
        } else {
131
439
            for (const auto& elem : data) {
132
439
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
439
            }
134
320
        }
135
136
320
        return argument_columns;
137
320
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
104
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
104
        MutableColumns argument_columns;
119
104
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
        if constexpr (stable) {
122
            argument_columns[0]->resize(data.size());
123
            // argument_columns[0] is a mutable column created using create_column.
124
            // since get_raw_data returns a StringRef, const_cast is required here.
125
            auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>(
126
                    argument_columns[0]->get_raw_data().data);
127
            for (auto it : data) {
128
                ptr[it.second] = it.first;
129
            }
130
104
        } else {
131
156
            for (const auto& elem : data) {
132
156
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
156
            }
134
104
        }
135
136
104
        return argument_columns;
137
104
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
2
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
2
        MutableColumns argument_columns;
119
2
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
        if constexpr (stable) {
122
            argument_columns[0]->resize(data.size());
123
            // argument_columns[0] is a mutable column created using create_column.
124
            // since get_raw_data returns a StringRef, const_cast is required here.
125
            auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>(
126
                    argument_columns[0]->get_raw_data().data);
127
            for (auto it : data) {
128
                ptr[it.second] = it.first;
129
            }
130
2
        } else {
131
10
            for (const auto& elem : data) {
132
10
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
10
            }
134
2
        }
135
136
2
        return argument_columns;
137
2
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
138
};
139
140
template <bool stable>
141
struct AggregateFunctionDistinctGenericData {
142
    /// When creating, the hash table must be small.
143
    using Container = std::conditional_t<stable, doris::flat_hash_map<StringRef, uint32_t>,
144
                                         doris::flat_hash_set<StringRef, StringRefHash>>;
145
    using Self = AggregateFunctionDistinctGenericData;
146
    Container data;
147
148
350
    void clear() { data.clear(); }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5clearEv
Line
Count
Source
148
238
    void clear() { data.clear(); }
_ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5clearEv
Line
Count
Source
148
112
    void clear() { data.clear(); }
149
150
225
    void merge(const Self& rhs, Arena& arena) {
151
225
        DCHECK(!stable);
152
225
        if constexpr (!stable) {
153
258
            for (const auto& elem : rhs.data) {
154
258
                StringRef key = elem;
155
258
                key.data = arena.insert(key.data, key.size);
156
258
                data.emplace(key);
157
258
            }
158
225
        }
159
225
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5mergeERKS1_RNS_5ArenaE
Line
Count
Source
150
225
    void merge(const Self& rhs, Arena& arena) {
151
225
        DCHECK(!stable);
152
225
        if constexpr (!stable) {
153
258
            for (const auto& elem : rhs.data) {
154
258
                StringRef key = elem;
155
258
                key.data = arena.insert(key.data, key.size);
156
258
                data.emplace(key);
157
258
            }
158
225
        }
159
225
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5mergeERKS1_RNS_5ArenaE
160
161
271
    void serialize(BufferWritable& buf) const {
162
271
        DCHECK(!stable);
163
271
        if constexpr (!stable) {
164
271
            buf.write_var_uint(data.size());
165
306
            for (const auto& elem : data) {
166
306
                buf.write_binary(elem);
167
306
            }
168
271
        }
169
271
    }
_ZNK5doris36AggregateFunctionDistinctGenericDataILb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
161
271
    void serialize(BufferWritable& buf) const {
162
271
        DCHECK(!stable);
163
271
        if constexpr (!stable) {
164
271
            buf.write_var_uint(data.size());
165
306
            for (const auto& elem : data) {
166
306
                buf.write_binary(elem);
167
306
            }
168
271
        }
169
271
    }
Unexecuted instantiation: _ZNK5doris36AggregateFunctionDistinctGenericDataILb1EE9serializeERNS_14BufferWritableE
170
171
221
    void deserialize_and_merge(Self& rhs, BufferReadable& buf, Arena& arena) {
172
        // deserialize() borrows StringRefs from buf; merge() copies them into the arena.
173
221
        rhs.deserialize(buf, arena);
174
221
        merge(rhs, arena);
175
221
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE21deserialize_and_mergeERS1_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
171
221
    void deserialize_and_merge(Self& rhs, BufferReadable& buf, Arena& arena) {
172
        // deserialize() borrows StringRefs from buf; merge() copies them into the arena.
173
221
        rhs.deserialize(buf, arena);
174
221
        merge(rhs, arena);
175
221
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE21deserialize_and_mergeERS1_RNS_14BufferReadableERNS_5ArenaE
176
177
225
    void deserialize(BufferReadable& buf, Arena& arena) {
178
225
        DCHECK(!stable);
179
225
        if constexpr (!stable) {
180
225
            UInt64 size;
181
225
            buf.read_var_uint(size);
182
183
225
            StringRef ref;
184
483
            for (size_t i = 0; i < size; ++i) {
185
258
                buf.read_binary(ref);
186
258
                data.insert(ref);
187
258
            }
188
225
        }
189
225
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
177
225
    void deserialize(BufferReadable& buf, Arena& arena) {
178
225
        DCHECK(!stable);
179
225
        if constexpr (!stable) {
180
225
            UInt64 size;
181
225
            buf.read_var_uint(size);
182
183
225
            StringRef ref;
184
483
            for (size_t i = 0; i < size; ++i) {
185
258
                buf.read_binary(ref);
186
258
                data.insert(ref);
187
258
            }
188
225
        }
189
225
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
190
};
191
192
template <bool stable>
193
struct AggregateFunctionDistinctSingleGenericData
194
        : public AggregateFunctionDistinctGenericData<stable> {
195
    using Base = AggregateFunctionDistinctGenericData<stable>;
196
    using Base::data;
197
737
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
737
        auto key = columns[0]->get_data_at(row_num);
199
737
        key.data = arena.insert(key.data, key.size);
200
201
737
        if constexpr (stable) {
202
254
            data.emplace(key, data.size());
203
483
        } else {
204
483
            data.insert(key);
205
483
        }
206
737
    }
_ZN5doris42AggregateFunctionDistinctSingleGenericDataILb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
197
483
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
483
        auto key = columns[0]->get_data_at(row_num);
199
483
        key.data = arena.insert(key.data, key.size);
200
201
        if constexpr (stable) {
202
            data.emplace(key, data.size());
203
483
        } else {
204
483
            data.insert(key);
205
483
        }
206
483
    }
_ZN5doris42AggregateFunctionDistinctSingleGenericDataILb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
197
254
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
254
        auto key = columns[0]->get_data_at(row_num);
199
254
        key.data = arena.insert(key.data, key.size);
200
201
254
        if constexpr (stable) {
202
254
            data.emplace(key, data.size());
203
        } else {
204
            data.insert(key);
205
        }
206
254
    }
207
208
252
    MutableColumns get_arguments(const DataTypes& argument_types) const {
209
252
        MutableColumns argument_columns;
210
252
        argument_columns.emplace_back(argument_types[0]->create_column());
211
252
        if constexpr (stable) {
212
83
            std::vector<StringRef> tmp(data.size());
213
164
            for (auto it : data) {
214
164
                tmp[it.second] = it.first;
215
164
            }
216
247
            for (int i = 0; i < data.size(); i++) {
217
164
                argument_columns[0]->insert_data(tmp[i].data, tmp[i].size);
218
164
            }
219
169
        } else {
220
227
            for (const auto& elem : data) {
221
227
                argument_columns[0]->insert_data(elem.data, elem.size);
222
227
            }
223
169
        }
224
225
252
        return argument_columns;
226
252
    }
_ZNK5doris42AggregateFunctionDistinctSingleGenericDataILb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE
Line
Count
Source
208
169
    MutableColumns get_arguments(const DataTypes& argument_types) const {
209
169
        MutableColumns argument_columns;
210
169
        argument_columns.emplace_back(argument_types[0]->create_column());
211
        if constexpr (stable) {
212
            std::vector<StringRef> tmp(data.size());
213
            for (auto it : data) {
214
                tmp[it.second] = it.first;
215
            }
216
            for (int i = 0; i < data.size(); i++) {
217
                argument_columns[0]->insert_data(tmp[i].data, tmp[i].size);
218
            }
219
169
        } else {
220
227
            for (const auto& elem : data) {
221
227
                argument_columns[0]->insert_data(elem.data, elem.size);
222
227
            }
223
169
        }
224
225
169
        return argument_columns;
226
169
    }
_ZNK5doris42AggregateFunctionDistinctSingleGenericDataILb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE
Line
Count
Source
208
83
    MutableColumns get_arguments(const DataTypes& argument_types) const {
209
83
        MutableColumns argument_columns;
210
83
        argument_columns.emplace_back(argument_types[0]->create_column());
211
83
        if constexpr (stable) {
212
83
            std::vector<StringRef> tmp(data.size());
213
164
            for (auto it : data) {
214
164
                tmp[it.second] = it.first;
215
164
            }
216
247
            for (int i = 0; i < data.size(); i++) {
217
164
                argument_columns[0]->insert_data(tmp[i].data, tmp[i].size);
218
164
            }
219
        } else {
220
            for (const auto& elem : data) {
221
                argument_columns[0]->insert_data(elem.data, elem.size);
222
            }
223
        }
224
225
83
        return argument_columns;
226
83
    }
227
};
228
229
template <bool stable>
230
struct AggregateFunctionDistinctMultipleGenericData
231
        : public AggregateFunctionDistinctGenericData<stable> {
232
    using Base = AggregateFunctionDistinctGenericData<stable>;
233
    using Base::data;
234
84
    void add(const IColumn** columns, size_t columns_num, size_t row_num, Arena& arena) {
235
84
        const char* begin = nullptr;
236
84
        StringRef key(begin, 0);
237
252
        for (size_t i = 0; i < columns_num; ++i) {
238
168
            auto cur_ref = columns[i]->serialize_value_into_arena(row_num, arena, begin);
239
168
            key.data = cur_ref.data - key.size;
240
168
            key.size += cur_ref.size;
241
168
        }
242
243
84
        if constexpr (stable) {
244
55
            data.emplace(key, data.size());
245
55
        } else {
246
29
            data.emplace(key);
247
29
        }
248
84
    }
_ZN5doris44AggregateFunctionDistinctMultipleGenericDataILb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
234
29
    void add(const IColumn** columns, size_t columns_num, size_t row_num, Arena& arena) {
235
29
        const char* begin = nullptr;
236
29
        StringRef key(begin, 0);
237
87
        for (size_t i = 0; i < columns_num; ++i) {
238
58
            auto cur_ref = columns[i]->serialize_value_into_arena(row_num, arena, begin);
239
58
            key.data = cur_ref.data - key.size;
240
58
            key.size += cur_ref.size;
241
58
        }
242
243
        if constexpr (stable) {
244
            data.emplace(key, data.size());
245
29
        } else {
246
29
            data.emplace(key);
247
29
        }
248
29
    }
_ZN5doris44AggregateFunctionDistinctMultipleGenericDataILb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
234
55
    void add(const IColumn** columns, size_t columns_num, size_t row_num, Arena& arena) {
235
55
        const char* begin = nullptr;
236
55
        StringRef key(begin, 0);
237
165
        for (size_t i = 0; i < columns_num; ++i) {
238
110
            auto cur_ref = columns[i]->serialize_value_into_arena(row_num, arena, begin);
239
110
            key.data = cur_ref.data - key.size;
240
110
            key.size += cur_ref.size;
241
110
        }
242
243
55
        if constexpr (stable) {
244
55
            data.emplace(key, data.size());
245
        } else {
246
            data.emplace(key);
247
        }
248
55
    }
249
250
47
    MutableColumns get_arguments(const DataTypes& argument_types) const {
251
47
        MutableColumns argument_columns(argument_types.size());
252
141
        for (size_t i = 0; i < argument_types.size(); ++i) {
253
94
            argument_columns[i] = argument_types[i]->create_column();
254
94
        }
255
256
47
        if constexpr (stable) {
257
29
            std::vector<StringRef> tmp(data.size());
258
54
            for (auto it : data) {
259
54
                tmp[it.second] = it.first;
260
54
            }
261
83
            for (int i = 0; i < data.size(); i++) {
262
54
                const char* begin = tmp[i].data;
263
108
                for (auto& column : argument_columns) {
264
108
                    begin = column->deserialize_and_insert_from_arena(begin);
265
108
                }
266
54
            }
267
29
        } else {
268
18
            for (const auto& elem : data) {
269
18
                const char* begin = elem.data;
270
36
                for (auto& column : argument_columns) {
271
36
                    begin = column->deserialize_and_insert_from_arena(begin);
272
36
                }
273
18
            }
274
18
        }
275
276
47
        return argument_columns;
277
47
    }
_ZNK5doris44AggregateFunctionDistinctMultipleGenericDataILb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE
Line
Count
Source
250
18
    MutableColumns get_arguments(const DataTypes& argument_types) const {
251
18
        MutableColumns argument_columns(argument_types.size());
252
54
        for (size_t i = 0; i < argument_types.size(); ++i) {
253
36
            argument_columns[i] = argument_types[i]->create_column();
254
36
        }
255
256
        if constexpr (stable) {
257
            std::vector<StringRef> tmp(data.size());
258
            for (auto it : data) {
259
                tmp[it.second] = it.first;
260
            }
261
            for (int i = 0; i < data.size(); i++) {
262
                const char* begin = tmp[i].data;
263
                for (auto& column : argument_columns) {
264
                    begin = column->deserialize_and_insert_from_arena(begin);
265
                }
266
            }
267
18
        } else {
268
18
            for (const auto& elem : data) {
269
18
                const char* begin = elem.data;
270
36
                for (auto& column : argument_columns) {
271
36
                    begin = column->deserialize_and_insert_from_arena(begin);
272
36
                }
273
18
            }
274
18
        }
275
276
18
        return argument_columns;
277
18
    }
_ZNK5doris44AggregateFunctionDistinctMultipleGenericDataILb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE
Line
Count
Source
250
29
    MutableColumns get_arguments(const DataTypes& argument_types) const {
251
29
        MutableColumns argument_columns(argument_types.size());
252
87
        for (size_t i = 0; i < argument_types.size(); ++i) {
253
58
            argument_columns[i] = argument_types[i]->create_column();
254
58
        }
255
256
29
        if constexpr (stable) {
257
29
            std::vector<StringRef> tmp(data.size());
258
54
            for (auto it : data) {
259
54
                tmp[it.second] = it.first;
260
54
            }
261
83
            for (int i = 0; i < data.size(); i++) {
262
54
                const char* begin = tmp[i].data;
263
108
                for (auto& column : argument_columns) {
264
108
                    begin = column->deserialize_and_insert_from_arena(begin);
265
108
                }
266
54
            }
267
        } else {
268
            for (const auto& elem : data) {
269
                const char* begin = elem.data;
270
                for (auto& column : argument_columns) {
271
                    begin = column->deserialize_and_insert_from_arena(begin);
272
                }
273
            }
274
        }
275
276
29
        return argument_columns;
277
29
    }
278
};
279
280
/** Adaptor for aggregate functions.
281
  * Adding -Distinct suffix to aggregate function
282
**/
283
template <template <bool stable> typename Data, bool stable = false>
284
class AggregateFunctionDistinct final
285
        : public IAggregateFunctionDataHelper<Data<stable>,
286
                                              AggregateFunctionDistinct<Data, stable>>,
287
          VarargsExpression,
288
          NullableAggregateFunction {
289
private:
290
    size_t prefix_size;
291
    AggregateFunctionPtr nested_func;
292
    size_t arguments_num;
293
294
7.45k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
7.45k
        return place + prefix_size;
296
7.45k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
12
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
12
        return place + prefix_size;
296
12
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
24
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
24
        return place + prefix_size;
296
24
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
3.41k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
3.41k
        return place + prefix_size;
296
3.41k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
968
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
968
        return place + prefix_size;
296
968
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
12
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
12
        return place + prefix_size;
296
12
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE16get_nested_placeEPc
Line
Count
Source
294
1.78k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
1.78k
        return place + prefix_size;
296
1.78k
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE16get_nested_placeEPc
Line
Count
Source
294
858
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
858
        return place + prefix_size;
296
858
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE16get_nested_placeEPc
Line
Count
Source
294
136
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
136
        return place + prefix_size;
296
136
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE16get_nested_placeEPc
Line
Count
Source
294
250
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
250
        return place + prefix_size;
296
250
    }
297
298
    ConstAggregateDataPtr get_nested_place(ConstAggregateDataPtr __restrict place) const noexcept {
299
        return place + prefix_size;
300
    }
301
302
public:
303
    AggregateFunctionDistinct(AggregateFunctionPtr nested_func_, const DataTypes& arguments)
304
1.80k
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
1.80k
                      arguments),
306
1.80k
              nested_func(std::move(nested_func_)),
307
1.80k
              arguments_num(arguments.size()) {
308
1.80k
        size_t nested_size = nested_func->align_of_data();
309
1.80k
        CHECK_GT(nested_size, 0);
310
1.80k
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
1.80k
    }
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
3
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
3
                      arguments),
306
3
              nested_func(std::move(nested_func_)),
307
3
              arguments_num(arguments.size()) {
308
3
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
3
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
3
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
4
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
4
                      arguments),
306
4
              nested_func(std::move(nested_func_)),
307
4
              arguments_num(arguments.size()) {
308
4
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
4
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
4
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
747
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
747
                      arguments),
306
747
              nested_func(std::move(nested_func_)),
307
747
              arguments_num(arguments.size()) {
308
747
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
747
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
747
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
262
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
262
                      arguments),
306
262
              nested_func(std::move(nested_func_)),
307
262
              arguments_num(arguments.size()) {
308
262
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
262
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
262
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
3
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
3
                      arguments),
306
3
              nested_func(std::move(nested_func_)),
307
3
              arguments_num(arguments.size()) {
308
3
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
3
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
3
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
688
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
688
                      arguments),
306
688
              nested_func(std::move(nested_func_)),
307
688
              arguments_num(arguments.size()) {
308
688
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
688
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
688
    }
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
61
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
61
                      arguments),
306
61
              nested_func(std::move(nested_func_)),
307
61
              arguments_num(arguments.size()) {
308
61
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
61
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
61
    }
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
25
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
25
                      arguments),
306
25
              nested_func(std::move(nested_func_)),
307
25
              arguments_num(arguments.size()) {
308
25
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
25
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
25
    }
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
10
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
10
                      arguments),
306
10
              nested_func(std::move(nested_func_)),
307
10
              arguments_num(arguments.size()) {
308
10
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
10
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
10
    }
312
313
    void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num,
314
1.95k
             Arena& arena) const override {
315
1.95k
        this->data(place).add(columns, arguments_num, row_num, arena);
316
1.95k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
16
             Arena& arena) const override {
315
16
        this->data(place).add(columns, arguments_num, row_num, arena);
316
16
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
19
             Arena& arena) const override {
315
19
        this->data(place).add(columns, arguments_num, row_num, arena);
316
19
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
869
             Arena& arena) const override {
315
869
        this->data(place).add(columns, arguments_num, row_num, arena);
316
869
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
210
             Arena& arena) const override {
315
210
        this->data(place).add(columns, arguments_num, row_num, arena);
316
210
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
16
             Arena& arena) const override {
315
16
        this->data(place).add(columns, arguments_num, row_num, arena);
316
16
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
483
             Arena& arena) const override {
315
483
        this->data(place).add(columns, arguments_num, row_num, arena);
316
483
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
254
             Arena& arena) const override {
315
254
        this->data(place).add(columns, arguments_num, row_num, arena);
316
254
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
29
             Arena& arena) const override {
315
29
        this->data(place).add(columns, arguments_num, row_num, arena);
316
29
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
55
             Arena& arena) const override {
315
55
        this->data(place).add(columns, arguments_num, row_num, arena);
316
55
    }
317
318
    void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs,
319
5
               Arena& arena) const override {
320
5
        this->data(place).merge(this->data(rhs), arena);
321
5
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
319
1
               Arena& arena) const override {
320
1
        this->data(place).merge(this->data(rhs), arena);
321
1
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
319
4
               Arena& arena) const override {
320
4
        this->data(place).merge(this->data(rhs), arena);
321
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE5mergeEPcPKcRNS_5ArenaE
322
323
924
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
924
        this->data(place).serialize(buf);
325
924
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
1
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
1
        this->data(place).serialize(buf);
325
1
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
1
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
1
        this->data(place).serialize(buf);
325
1
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
547
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
547
        this->data(place).serialize(buf);
325
547
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
103
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
103
        this->data(place).serialize(buf);
325
103
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
1
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
1
        this->data(place).serialize(buf);
325
1
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
256
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
256
        this->data(place).serialize(buf);
325
256
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
15
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
15
        this->data(place).serialize(buf);
325
15
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE
326
327
    void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf,
328
5
                     Arena& arena) const override {
329
5
        this->data(place).deserialize(buf, arena);
330
5
    }
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
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
328
1
                     Arena& arena) const override {
329
1
        this->data(place).deserialize(buf, arena);
330
1
    }
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
328
4
                     Arena& arena) const override {
329
4
        this->data(place).deserialize(buf, arena);
330
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
331
332
    void deserialize_and_merge(AggregateDataPtr __restrict place, AggregateDataPtr __restrict rhs,
333
801
                               BufferReadable& buf, Arena& arena) const override {
334
801
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
801
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
1
                               BufferReadable& buf, Arena& arena) const override {
334
1
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
1
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
1
                               BufferReadable& buf, Arena& arena) const override {
334
1
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
1
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
467
                               BufferReadable& buf, Arena& arena) const override {
334
467
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
467
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
110
                               BufferReadable& buf, Arena& arena) const override {
334
110
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
110
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
1
                               BufferReadable& buf, Arena& arena) const override {
334
1
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
1
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
206
                               BufferReadable& buf, Arena& arena) const override {
334
206
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
206
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
15
                               BufferReadable& buf, Arena& arena) const override {
334
15
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
15
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
336
337
732
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
732
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
732
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
732
        ColumnRawPtrs arguments_raw(arguments.size());
342
1.51k
        for (size_t i = 0; i < arguments.size(); ++i) {
343
779
            arguments_raw[i] = arguments[i].get();
344
779
        }
345
346
732
        assert(!arguments.empty());
347
732
        Arena arena;
348
732
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
732
                                            arguments_raw.data(), arena);
350
732
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
732
        this->data(place).clear();
355
732
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
2
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
2
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
2
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
2
        ColumnRawPtrs arguments_raw(arguments.size());
342
4
        for (size_t i = 0; i < arguments.size(); ++i) {
343
2
            arguments_raw[i] = arguments[i].get();
344
2
        }
345
346
2
        assert(!arguments.empty());
347
2
        Arena arena;
348
2
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
2
                                            arguments_raw.data(), arena);
350
2
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
2
        this->data(place).clear();
355
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
5
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
5
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
5
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
5
        ColumnRawPtrs arguments_raw(arguments.size());
342
10
        for (size_t i = 0; i < arguments.size(); ++i) {
343
5
            arguments_raw[i] = arguments[i].get();
344
5
        }
345
346
5
        assert(!arguments.empty());
347
5
        Arena arena;
348
5
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
5
                                            arguments_raw.data(), arena);
350
5
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
5
        this->data(place).clear();
355
5
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
320
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
320
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
320
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
320
        ColumnRawPtrs arguments_raw(arguments.size());
342
640
        for (size_t i = 0; i < arguments.size(); ++i) {
343
320
            arguments_raw[i] = arguments[i].get();
344
320
        }
345
346
320
        assert(!arguments.empty());
347
320
        Arena arena;
348
320
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
320
                                            arguments_raw.data(), arena);
350
320
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
320
        this->data(place).clear();
355
320
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
104
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
104
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
104
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
104
        ColumnRawPtrs arguments_raw(arguments.size());
342
208
        for (size_t i = 0; i < arguments.size(); ++i) {
343
104
            arguments_raw[i] = arguments[i].get();
344
104
        }
345
346
104
        assert(!arguments.empty());
347
104
        Arena arena;
348
104
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
104
                                            arguments_raw.data(), arena);
350
104
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
104
        this->data(place).clear();
355
104
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
2
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
2
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
2
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
2
        ColumnRawPtrs arguments_raw(arguments.size());
342
4
        for (size_t i = 0; i < arguments.size(); ++i) {
343
2
            arguments_raw[i] = arguments[i].get();
344
2
        }
345
346
2
        assert(!arguments.empty());
347
2
        Arena arena;
348
2
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
2
                                            arguments_raw.data(), arena);
350
2
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
2
        this->data(place).clear();
355
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
169
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
169
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
169
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
169
        ColumnRawPtrs arguments_raw(arguments.size());
342
338
        for (size_t i = 0; i < arguments.size(); ++i) {
343
169
            arguments_raw[i] = arguments[i].get();
344
169
        }
345
346
169
        assert(!arguments.empty());
347
169
        Arena arena;
348
169
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
169
                                            arguments_raw.data(), arena);
350
169
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
169
        this->data(place).clear();
355
169
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
83
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
83
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
83
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
83
        ColumnRawPtrs arguments_raw(arguments.size());
342
166
        for (size_t i = 0; i < arguments.size(); ++i) {
343
83
            arguments_raw[i] = arguments[i].get();
344
83
        }
345
346
83
        assert(!arguments.empty());
347
83
        Arena arena;
348
83
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
83
                                            arguments_raw.data(), arena);
350
83
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
83
        this->data(place).clear();
355
83
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
18
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
18
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
18
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
18
        ColumnRawPtrs arguments_raw(arguments.size());
342
54
        for (size_t i = 0; i < arguments.size(); ++i) {
343
36
            arguments_raw[i] = arguments[i].get();
344
36
        }
345
346
18
        assert(!arguments.empty());
347
18
        Arena arena;
348
18
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
18
                                            arguments_raw.data(), arena);
350
18
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
18
        this->data(place).clear();
355
18
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
29
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
29
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
29
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
29
        ColumnRawPtrs arguments_raw(arguments.size());
342
87
        for (size_t i = 0; i < arguments.size(); ++i) {
343
58
            arguments_raw[i] = arguments[i].get();
344
58
        }
345
346
29
        assert(!arguments.empty());
347
29
        Arena arena;
348
29
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
29
                                            arguments_raw.data(), arena);
350
29
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
29
        this->data(place).clear();
355
29
    }
356
357
146
    void reset(AggregateDataPtr place) const override {
358
146
        this->data(place).clear();
359
146
        nested_func->reset(get_nested_place(place));
360
146
    }
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
357
61
    void reset(AggregateDataPtr place) const override {
358
61
        this->data(place).clear();
359
61
        nested_func->reset(get_nested_place(place));
360
61
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE5resetEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE5resetEPc
Line
Count
Source
357
34
    void reset(AggregateDataPtr place) const override {
358
34
        this->data(place).clear();
359
34
        nested_func->reset(get_nested_place(place));
360
34
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE5resetEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE5resetEPc
Line
Count
Source
357
51
    void reset(AggregateDataPtr place) const override {
358
51
        this->data(place).clear();
359
51
        nested_func->reset(get_nested_place(place));
360
51
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE5resetEPc
361
362
1.78k
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE12size_of_dataEv
Line
Count
Source
362
4
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE12size_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE12size_of_dataEv
Line
Count
Source
362
5
    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
362
780
    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
362
277
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE12size_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE12size_of_dataEv
Line
Count
Source
362
4
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE12size_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE12size_of_dataEv
Line
Count
Source
362
444
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE12size_of_dataEv
Line
Count
Source
362
182
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE12size_of_dataEv
Line
Count
Source
362
39
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE12size_of_dataEv
Line
Count
Source
362
50
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
363
364
1.71k
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE13align_of_dataEv
Line
Count
Source
364
6
    size_t align_of_data() const override { return nested_func->align_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE13align_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE13align_of_dataEv
Line
Count
Source
364
12
    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
364
507
    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
364
309
    size_t align_of_data() const override { return nested_func->align_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE13align_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE13align_of_dataEv
Line
Count
Source
364
9
    size_t align_of_data() const override { return nested_func->align_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE13align_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE13align_of_dataEv
Line
Count
Source
364
717
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE13align_of_dataEv
Line
Count
Source
364
102
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE13align_of_dataEv
Line
Count
Source
364
34
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE13align_of_dataEv
Line
Count
Source
364
20
    size_t align_of_data() const override { return nested_func->align_of_data(); }
365
366
2.92k
    void create(AggregateDataPtr __restrict place) const override {
367
2.92k
        new (place) Data<stable>;
368
2.92k
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
2.92k
                    this->data(place).~Data<stable>());
370
2.92k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE6createEPc
Line
Count
Source
366
4
    void create(AggregateDataPtr __restrict place) const override {
367
4
        new (place) Data<stable>;
368
4
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
4
                    this->data(place).~Data<stable>());
370
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE6createEPc
Line
Count
Source
366
7
    void create(AggregateDataPtr __restrict place) const override {
367
7
        new (place) Data<stable>;
368
7
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
7
                    this->data(place).~Data<stable>());
370
7
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE6createEPc
Line
Count
Source
366
1.35k
    void create(AggregateDataPtr __restrict place) const override {
367
1.35k
        new (place) Data<stable>;
368
1.35k
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
1.35k
                    this->data(place).~Data<stable>());
370
1.35k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE6createEPc
Line
Count
Source
366
363
    void create(AggregateDataPtr __restrict place) const override {
367
363
        new (place) Data<stable>;
368
363
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
363
                    this->data(place).~Data<stable>());
370
363
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE6createEPc
Line
Count
Source
366
4
    void create(AggregateDataPtr __restrict place) const override {
367
4
        new (place) Data<stable>;
368
4
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
4
                    this->data(place).~Data<stable>());
370
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE6createEPc
Line
Count
Source
366
697
    void create(AggregateDataPtr __restrict place) const override {
367
697
        new (place) Data<stable>;
368
697
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
697
                    this->data(place).~Data<stable>());
370
697
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE6createEPc
Line
Count
Source
366
346
    void create(AggregateDataPtr __restrict place) const override {
367
346
        new (place) Data<stable>;
368
346
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
346
                    this->data(place).~Data<stable>());
370
346
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE6createEPc
Line
Count
Source
366
50
    void create(AggregateDataPtr __restrict place) const override {
367
50
        new (place) Data<stable>;
368
50
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
50
                    this->data(place).~Data<stable>());
370
50
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE6createEPc
Line
Count
Source
366
96
    void create(AggregateDataPtr __restrict place) const override {
367
96
        new (place) Data<stable>;
368
96
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
96
                    this->data(place).~Data<stable>());
370
96
    }
371
372
2.91k
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
2.91k
        this->data(place).~Data<stable>();
374
2.91k
        nested_func->destroy(get_nested_place(place));
375
2.91k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
4
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
4
        this->data(place).~Data<stable>();
374
4
        nested_func->destroy(get_nested_place(place));
375
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
7
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
7
        this->data(place).~Data<stable>();
374
7
        nested_func->destroy(get_nested_place(place));
375
7
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
1.35k
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
1.35k
        this->data(place).~Data<stable>();
374
1.35k
        nested_func->destroy(get_nested_place(place));
375
1.35k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
363
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
363
        this->data(place).~Data<stable>();
374
363
        nested_func->destroy(get_nested_place(place));
375
363
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
4
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
4
        this->data(place).~Data<stable>();
374
4
        nested_func->destroy(get_nested_place(place));
375
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE7destroyEPc
Line
Count
Source
372
696
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
696
        this->data(place).~Data<stable>();
374
696
        nested_func->destroy(get_nested_place(place));
375
696
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE7destroyEPc
Line
Count
Source
372
345
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
345
        this->data(place).~Data<stable>();
374
345
        nested_func->destroy(get_nested_place(place));
375
345
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE7destroyEPc
Line
Count
Source
372
50
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
50
        this->data(place).~Data<stable>();
374
50
        nested_func->destroy(get_nested_place(place));
375
50
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE7destroyEPc
Line
Count
Source
372
96
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
96
        this->data(place).~Data<stable>();
374
96
        nested_func->destroy(get_nested_place(place));
375
96
    }
376
377
141
    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
377
47
    String get_name() const override { return nested_func->get_name() + "Distinct"; }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE8get_nameB5cxx11Ev
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE8get_nameB5cxx11Ev
Line
Count
Source
377
30
    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
377
64
    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
378
379
2.26k
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE15get_return_typeEv
Line
Count
Source
379
11
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE15get_return_typeEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE15get_return_typeEv
Line
Count
Source
379
23
    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
379
794
    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
379
281
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE15get_return_typeEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE15get_return_typeEv
Line
Count
Source
379
11
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE15get_return_typeEv
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE15get_return_typeEv
Line
Count
Source
379
716
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE15get_return_typeEv
Line
Count
Source
379
349
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE15get_return_typeEv
Line
Count
Source
379
49
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE15get_return_typeEv
Line
Count
Source
379
35
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
380
381
71
    IAggregateFunction* transmit_to_stable() override {
382
71
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
71
                                                         IAggregateFunction::argument_types);
384
71
    }
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
381
61
    IAggregateFunction* transmit_to_stable() override {
382
61
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
61
                                                         IAggregateFunction::argument_types);
384
61
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18transmit_to_stableEv
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18transmit_to_stableEv
Line
Count
Source
381
10
    IAggregateFunction* transmit_to_stable() override {
382
10
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
10
                                                         IAggregateFunction::argument_types);
384
10
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE18transmit_to_stableEv
385
};
386
387
template <typename T>
388
struct FunctionStableTransfer {
389
    using FunctionStable = T;
390
};
391
392
template <template <bool stable> typename Data>
393
struct FunctionStableTransfer<AggregateFunctionDistinct<Data, false>> {
394
    using FunctionStable = AggregateFunctionDistinct<Data, true>;
395
};
396
397
} // namespace doris