Coverage Report

Created: 2026-09-24 04:40

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
543
    void clear() { data.clear(); }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE5clearEv
Line
Count
Source
59
5
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE5clearEv
Line
Count
Source
59
8
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE5clearEv
Line
Count
Source
59
385
    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
5
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE5clearEv
60
61
1.14k
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
1.14k
        const auto& vec =
63
1.14k
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
1.14k
                        .get_data();
65
1.14k
        if constexpr (stable) {
66
0
            data.emplace(vec[row_num], data.size());
67
1.14k
        } else {
68
1.14k
            data.insert(vec[row_num]);
69
1.14k
        }
70
1.14k
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE3addEPPKNS_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_13PrimitiveTypeE3ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
22
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
22
        const auto& vec =
63
22
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
22
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
22
        } else {
68
22
            data.insert(vec[row_num]);
69
22
        }
70
22
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
870
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
870
        const auto& vec =
63
870
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
870
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
870
        } else {
68
870
            data.insert(vec[row_num]);
69
870
        }
70
870
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
210
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
210
        const auto& vec =
63
210
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
210
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
210
        } else {
68
210
            data.insert(vec[row_num]);
69
210
        }
70
210
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE3addEPPKNS_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_13PrimitiveTypeE7ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
71
72
33
    void merge(const Self& rhs, Arena&) {
73
33
        DCHECK(!stable);
74
33
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
33
            if (data.empty() && !rhs.data.empty()) {
77
6
                data.reserve(rhs.data.size());
78
6
            }
79
50
            for (const auto& elem : rhs.data) {
80
50
                data.insert(elem);
81
50
            }
82
33
        }
83
33
    }
_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
17
    void merge(const Self& rhs, Arena&) {
73
17
        DCHECK(!stable);
74
17
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
17
            if (data.empty() && !rhs.data.empty()) {
77
2
                data.reserve(rhs.data.size());
78
2
            }
79
26
            for (const auto& elem : rhs.data) {
80
26
                data.insert(elem);
81
26
            }
82
17
        }
83
17
    }
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
659
    void serialize(BufferWritable& buf) const {
86
659
        DCHECK(!stable);
87
659
        if constexpr (!stable) {
88
659
            buf.write_var_uint(data.size());
89
706
            for (const auto& value : data) {
90
706
                buf.write_binary(value);
91
706
            }
92
659
        }
93
659
    }
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
5
    void serialize(BufferWritable& buf) const {
86
5
        DCHECK(!stable);
87
5
        if constexpr (!stable) {
88
5
            buf.write_var_uint(data.size());
89
10
            for (const auto& value : data) {
90
10
                buf.write_binary(value);
91
10
            }
92
5
        }
93
5
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
5
    void serialize(BufferWritable& buf) const {
86
5
        DCHECK(!stable);
87
5
        if constexpr (!stable) {
88
5
            buf.write_var_uint(data.size());
89
10
            for (const auto& value : data) {
90
10
                buf.write_binary(value);
91
10
            }
92
5
        }
93
5
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
532
    void serialize(BufferWritable& buf) const {
86
532
        DCHECK(!stable);
87
532
        if constexpr (!stable) {
88
532
            buf.write_var_uint(data.size());
89
535
            for (const auto& value : data) {
90
535
                buf.write_binary(value);
91
535
            }
92
532
        }
93
532
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
112
    void serialize(BufferWritable& buf) const {
86
112
        DCHECK(!stable);
87
112
        if constexpr (!stable) {
88
112
            buf.write_var_uint(data.size());
89
141
            for (const auto& value : data) {
90
141
                buf.write_binary(value);
91
141
            }
92
112
        }
93
112
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
5
    void serialize(BufferWritable& buf) const {
86
5
        DCHECK(!stable);
87
5
        if constexpr (!stable) {
88
5
            buf.write_var_uint(data.size());
89
10
            for (const auto& value : data) {
90
10
                buf.write_binary(value);
91
10
            }
92
5
        }
93
5
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE9serializeERNS_14BufferWritableE
94
95
599
    void deserialize(BufferReadable& buf, Arena&) {
96
599
        DCHECK(!stable);
97
599
        if constexpr (!stable) {
98
599
            uint64_t new_size = 0;
99
599
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
599
            if (data.empty() && new_size != 0) {
102
356
                data.reserve(new_size);
103
356
            }
104
599
            typename PrimitiveTypeTraits<T>::CppType x;
105
1.27k
            for (size_t i = 0; i < new_size; ++i) {
106
674
                buf.read_binary(x);
107
674
                data.insert(x);
108
674
            }
109
599
        }
110
599
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
7
    void deserialize(BufferReadable& buf, Arena&) {
96
7
        DCHECK(!stable);
97
7
        if constexpr (!stable) {
98
7
            uint64_t new_size = 0;
99
7
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
7
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
7
            typename PrimitiveTypeTraits<T>::CppType x;
105
23
            for (size_t i = 0; i < new_size; ++i) {
106
16
                buf.read_binary(x);
107
16
                data.insert(x);
108
16
            }
109
7
        }
110
7
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
7
    void deserialize(BufferReadable& buf, Arena&) {
96
7
        DCHECK(!stable);
97
7
        if constexpr (!stable) {
98
7
            uint64_t new_size = 0;
99
7
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
7
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
7
            typename PrimitiveTypeTraits<T>::CppType x;
105
23
            for (size_t i = 0; i < new_size; ++i) {
106
16
                buf.read_binary(x);
107
16
                data.insert(x);
108
16
            }
109
7
        }
110
7
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
456
    void deserialize(BufferReadable& buf, Arena&) {
96
456
        DCHECK(!stable);
97
456
        if constexpr (!stable) {
98
456
            uint64_t new_size = 0;
99
456
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
456
            if (data.empty() && new_size != 0) {
102
272
                data.reserve(new_size);
103
272
            }
104
456
            typename PrimitiveTypeTraits<T>::CppType x;
105
919
            for (size_t i = 0; i < new_size; ++i) {
106
463
                buf.read_binary(x);
107
463
                data.insert(x);
108
463
            }
109
456
        }
110
456
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
122
    void deserialize(BufferReadable& buf, Arena&) {
96
122
        DCHECK(!stable);
97
122
        if constexpr (!stable) {
98
122
            uint64_t new_size = 0;
99
122
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
122
            if (data.empty() && new_size != 0) {
102
78
                data.reserve(new_size);
103
78
            }
104
122
            typename PrimitiveTypeTraits<T>::CppType x;
105
285
            for (size_t i = 0; i < new_size; ++i) {
106
163
                buf.read_binary(x);
107
163
                data.insert(x);
108
163
            }
109
122
        }
110
122
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
7
    void deserialize(BufferReadable& buf, Arena&) {
96
7
        DCHECK(!stable);
97
7
        if constexpr (!stable) {
98
7
            uint64_t new_size = 0;
99
7
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
7
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
7
            typename PrimitiveTypeTraits<T>::CppType x;
105
23
            for (size_t i = 0; i < new_size; ++i) {
106
16
                buf.read_binary(x);
107
16
                data.insert(x);
108
16
            }
109
7
        }
110
7
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
111
112
596
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
596
        deserialize(buf, arena);
115
596
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
7
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
7
        deserialize(buf, arena);
115
7
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
7
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
7
        deserialize(buf, arena);
115
7
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
456
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
456
        deserialize(buf, arena);
115
456
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
119
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
119
        deserialize(buf, arena);
115
119
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
7
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
7
        deserialize(buf, arena);
115
7
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
116
117
439
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
439
        MutableColumns argument_columns;
119
439
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
439
        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
439
        } else {
131
638
            for (const auto& elem : data) {
132
638
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
638
            }
134
439
        }
135
136
439
        return argument_columns;
137
439
    }
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
3
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
3
        MutableColumns argument_columns;
119
3
        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
3
        } else {
131
13
            for (const auto& elem : data) {
132
13
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
13
            }
134
3
        }
135
136
3
        return argument_columns;
137
3
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
6
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
6
        MutableColumns argument_columns;
119
6
        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
6
        } else {
131
15
            for (const auto& elem : data) {
132
15
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
15
            }
134
6
        }
135
136
6
        return argument_columns;
137
6
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
323
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
323
        MutableColumns argument_columns;
119
323
        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
323
        } else {
131
441
            for (const auto& elem : data) {
132
441
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
441
            }
134
323
        }
135
136
323
        return argument_columns;
137
323
    }
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
3
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
3
        MutableColumns argument_columns;
119
3
        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
3
        } else {
131
13
            for (const auto& elem : data) {
132
13
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
13
            }
134
3
        }
135
136
3
        return argument_columns;
137
3
    }
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
355
    void clear() { data.clear(); }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5clearEv
Line
Count
Source
148
243
    void clear() { data.clear(); }
_ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5clearEv
Line
Count
Source
148
112
    void clear() { data.clear(); }
149
150
209
    void merge(const Self& rhs, Arena& arena) {
151
209
        DCHECK(!stable);
152
209
        if constexpr (!stable) {
153
241
            for (const auto& elem : rhs.data) {
154
241
                StringRef key = elem;
155
241
                key.data = arena.insert(key.data, key.size);
156
241
                data.emplace(key);
157
241
            }
158
209
        }
159
209
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5mergeERKS1_RNS_5ArenaE
Line
Count
Source
150
209
    void merge(const Self& rhs, Arena& arena) {
151
209
        DCHECK(!stable);
152
209
        if constexpr (!stable) {
153
241
            for (const auto& elem : rhs.data) {
154
241
                StringRef key = elem;
155
241
                key.data = arena.insert(key.data, key.size);
156
241
                data.emplace(key);
157
241
            }
158
209
        }
159
209
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5mergeERKS1_RNS_5ArenaE
160
161
255
    void serialize(BufferWritable& buf) const {
162
255
        DCHECK(!stable);
163
255
        if constexpr (!stable) {
164
255
            buf.write_var_uint(data.size());
165
289
            for (const auto& elem : data) {
166
289
                buf.write_binary(elem);
167
289
            }
168
255
        }
169
255
    }
_ZNK5doris36AggregateFunctionDistinctGenericDataILb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
161
255
    void serialize(BufferWritable& buf) const {
162
255
        DCHECK(!stable);
163
255
        if constexpr (!stable) {
164
255
            buf.write_var_uint(data.size());
165
289
            for (const auto& elem : data) {
166
289
                buf.write_binary(elem);
167
289
            }
168
255
        }
169
255
    }
Unexecuted instantiation: _ZNK5doris36AggregateFunctionDistinctGenericDataILb1EE9serializeERNS_14BufferWritableE
170
171
205
    void deserialize_and_merge(Self& rhs, BufferReadable& buf, Arena& arena) {
172
        // deserialize() borrows StringRefs from buf; merge() copies them into the arena.
173
205
        rhs.deserialize(buf, arena);
174
205
        merge(rhs, arena);
175
205
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE21deserialize_and_mergeERS1_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
171
205
    void deserialize_and_merge(Self& rhs, BufferReadable& buf, Arena& arena) {
172
        // deserialize() borrows StringRefs from buf; merge() copies them into the arena.
173
205
        rhs.deserialize(buf, arena);
174
205
        merge(rhs, arena);
175
205
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE21deserialize_and_mergeERS1_RNS_14BufferReadableERNS_5ArenaE
176
177
209
    void deserialize(BufferReadable& buf, Arena& arena) {
178
209
        DCHECK(!stable);
179
209
        if constexpr (!stable) {
180
209
            UInt64 size;
181
209
            buf.read_var_uint(size);
182
183
209
            StringRef ref;
184
450
            for (size_t i = 0; i < size; ++i) {
185
241
                buf.read_binary(ref);
186
241
                data.insert(ref);
187
241
            }
188
209
        }
189
209
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
177
209
    void deserialize(BufferReadable& buf, Arena& arena) {
178
209
        DCHECK(!stable);
179
209
        if constexpr (!stable) {
180
209
            UInt64 size;
181
209
            buf.read_var_uint(size);
182
183
209
            StringRef ref;
184
450
            for (size_t i = 0; i < size; ++i) {
185
241
                buf.read_binary(ref);
186
241
                data.insert(ref);
187
241
            }
188
209
        }
189
209
    }
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
756
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
756
        auto key = columns[0]->get_data_at(row_num);
199
756
        key.data = arena.insert(key.data, key.size);
200
201
756
        if constexpr (stable) {
202
254
            data.emplace(key, data.size());
203
502
        } else {
204
502
            data.insert(key);
205
502
        }
206
756
    }
_ZN5doris42AggregateFunctionDistinctSingleGenericDataILb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
197
502
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
502
        auto key = columns[0]->get_data_at(row_num);
199
502
        key.data = arena.insert(key.data, key.size);
200
201
        if constexpr (stable) {
202
            data.emplace(key, data.size());
203
502
        } else {
204
502
            data.insert(key);
205
502
        }
206
502
    }
_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
257
    MutableColumns get_arguments(const DataTypes& argument_types) const {
209
257
        MutableColumns argument_columns;
210
257
        argument_columns.emplace_back(argument_types[0]->create_column());
211
257
        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
174
        } else {
220
242
            for (const auto& elem : data) {
221
242
                argument_columns[0]->insert_data(elem.data, elem.size);
222
242
            }
223
174
        }
224
225
257
        return argument_columns;
226
257
    }
_ZNK5doris42AggregateFunctionDistinctSingleGenericDataILb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE
Line
Count
Source
208
174
    MutableColumns get_arguments(const DataTypes& argument_types) const {
209
174
        MutableColumns argument_columns;
210
174
        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
174
        } else {
220
242
            for (const auto& elem : data) {
221
242
                argument_columns[0]->insert_data(elem.data, elem.size);
222
242
            }
223
174
        }
224
225
174
        return argument_columns;
226
174
    }
_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.09k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
7.09k
        return place + prefix_size;
296
7.09k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE16get_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_13PrimitiveTypeE3EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
36
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
36
        return place + prefix_size;
296
36
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
3.38k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
3.38k
        return place + prefix_size;
296
3.38k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
1.02k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
1.02k
        return place + prefix_size;
296
1.02k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE16get_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_13PrimitiveTypeE7EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE16get_nested_placeEPc
Line
Count
Source
294
1.67k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
1.67k
        return place + prefix_size;
296
1.67k
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE16get_nested_placeEPc
Line
Count
Source
294
626
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
626
        return place + prefix_size;
296
626
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE16get_nested_placeEPc
Line
Count
Source
294
88
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
88
        return place + prefix_size;
296
88
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE16get_nested_placeEPc
Line
Count
Source
294
213
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
213
        return place + prefix_size;
296
213
    }
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.97k
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
1.97k
                      arguments),
306
1.97k
              nested_func(std::move(nested_func_)),
307
1.97k
              arguments_num(arguments.size()) {
308
1.97k
        size_t nested_size = nested_func->align_of_data();
309
1.97k
        CHECK_GT(nested_size, 0);
310
1.97k
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
1.97k
    }
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EEC2ESt10shared_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_13PrimitiveTypeE3EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
5
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
5
                      arguments),
306
5
              nested_func(std::move(nested_func_)),
307
5
              arguments_num(arguments.size()) {
308
5
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
5
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
5
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
854
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
854
                      arguments),
306
854
              nested_func(std::move(nested_func_)),
307
854
              arguments_num(arguments.size()) {
308
854
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
854
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
854
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
274
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
274
                      arguments),
306
274
              nested_func(std::move(nested_func_)),
307
274
              arguments_num(arguments.size()) {
308
274
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
274
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
274
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EEC2ESt10shared_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_13PrimitiveTypeE7EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
744
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
744
                      arguments),
306
744
              nested_func(std::move(nested_func_)),
307
744
              arguments_num(arguments.size()) {
308
744
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
744
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
744
    }
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
60
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
60
                      arguments),
306
60
              nested_func(std::move(nested_func_)),
307
60
              arguments_num(arguments.size()) {
308
60
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
60
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
60
    }
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
18
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
18
                      arguments),
306
18
              nested_func(std::move(nested_func_)),
307
18
              arguments_num(arguments.size()) {
308
18
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
18
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
18
    }
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
9
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
9
                      arguments),
306
9
              nested_func(std::move(nested_func_)),
307
9
              arguments_num(arguments.size()) {
308
9
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
9
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
9
    }
312
313
    void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num,
314
1.98k
             Arena& arena) const override {
315
1.98k
        this->data(place).add(columns, arguments_num, row_num, arena);
316
1.98k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE3addEPcPPKNS_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_13PrimitiveTypeE3EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
22
             Arena& arena) const override {
315
22
        this->data(place).add(columns, arguments_num, row_num, arena);
316
22
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
871
             Arena& arena) const override {
315
871
        this->data(place).add(columns, arguments_num, row_num, arena);
316
871
    }
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
19
             Arena& arena) const override {
315
19
        this->data(place).add(columns, arguments_num, row_num, arena);
316
19
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
502
             Arena& arena) const override {
315
502
        this->data(place).add(columns, arguments_num, row_num, arena);
316
502
    }
_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
17
               Arena& arena) const override {
320
17
        this->data(place).merge(this->data(rhs), arena);
321
17
    }
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
13
               Arena& arena) const override {
320
13
        this->data(place).merge(this->data(rhs), arena);
321
13
    }
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
904
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
904
        this->data(place).serialize(buf);
325
904
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
3
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
3
        this->data(place).serialize(buf);
325
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
3
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
3
        this->data(place).serialize(buf);
325
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
530
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
530
        this->data(place).serialize(buf);
325
530
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
110
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
110
        this->data(place).serialize(buf);
325
110
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
3
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
3
        this->data(place).serialize(buf);
325
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
252
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
252
        this->data(place).serialize(buf);
325
252
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
3
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
3
        this->data(place).serialize(buf);
325
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE
326
327
    void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf,
328
7
                     Arena& arena) const override {
329
7
        this->data(place).deserialize(buf, arena);
330
7
    }
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
3
                     Arena& arena) const override {
329
3
        this->data(place).deserialize(buf, arena);
330
3
    }
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
781
                               BufferReadable& buf, Arena& arena) const override {
334
781
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
781
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
3
                               BufferReadable& buf, Arena& arena) const override {
334
3
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
3
                               BufferReadable& buf, Arena& arena) const override {
334
3
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
452
                               BufferReadable& buf, Arena& arena) const override {
334
452
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
452
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
115
                               BufferReadable& buf, Arena& arena) const override {
334
115
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
115
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
3
                               BufferReadable& buf, Arena& arena) const override {
334
3
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
202
                               BufferReadable& buf, Arena& arena) const override {
334
202
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
202
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
3
                               BufferReadable& buf, Arena& arena) const override {
334
3
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
336
337
743
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
743
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
743
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
743
        ColumnRawPtrs arguments_raw(arguments.size());
342
1.53k
        for (size_t i = 0; i < arguments.size(); ++i) {
343
790
            arguments_raw[i] = arguments[i].get();
344
790
        }
345
346
743
        assert(!arguments.empty());
347
743
        Arena arena;
348
743
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
743
                                            arguments_raw.data(), arena);
350
743
        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
743
        this->data(place).clear();
355
743
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
3
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
3
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
3
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
3
        ColumnRawPtrs arguments_raw(arguments.size());
342
6
        for (size_t i = 0; i < arguments.size(); ++i) {
343
3
            arguments_raw[i] = arguments[i].get();
344
3
        }
345
346
3
        assert(!arguments.empty());
347
3
        Arena arena;
348
3
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
3
                                            arguments_raw.data(), arena);
350
3
        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
3
        this->data(place).clear();
355
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
6
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
6
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
6
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
6
        ColumnRawPtrs arguments_raw(arguments.size());
342
12
        for (size_t i = 0; i < arguments.size(); ++i) {
343
6
            arguments_raw[i] = arguments[i].get();
344
6
        }
345
346
6
        assert(!arguments.empty());
347
6
        Arena arena;
348
6
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
6
                                            arguments_raw.data(), arena);
350
6
        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
6
        this->data(place).clear();
355
6
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
323
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
323
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
323
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
323
        ColumnRawPtrs arguments_raw(arguments.size());
342
646
        for (size_t i = 0; i < arguments.size(); ++i) {
343
323
            arguments_raw[i] = arguments[i].get();
344
323
        }
345
346
323
        assert(!arguments.empty());
347
323
        Arena arena;
348
323
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
323
                                            arguments_raw.data(), arena);
350
323
        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
323
        this->data(place).clear();
355
323
    }
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
3
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
3
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
3
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
3
        ColumnRawPtrs arguments_raw(arguments.size());
342
6
        for (size_t i = 0; i < arguments.size(); ++i) {
343
3
            arguments_raw[i] = arguments[i].get();
344
3
        }
345
346
3
        assert(!arguments.empty());
347
3
        Arena arena;
348
3
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
3
                                            arguments_raw.data(), arena);
350
3
        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
3
        this->data(place).clear();
355
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
174
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
174
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
174
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
174
        ColumnRawPtrs arguments_raw(arguments.size());
342
348
        for (size_t i = 0; i < arguments.size(); ++i) {
343
174
            arguments_raw[i] = arguments[i].get();
344
174
        }
345
346
174
        assert(!arguments.empty());
347
174
        Arena arena;
348
174
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
174
                                            arguments_raw.data(), arena);
350
174
        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
174
        this->data(place).clear();
355
174
    }
_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
145
    void reset(AggregateDataPtr place) const override {
358
145
        this->data(place).clear();
359
145
        nested_func->reset(get_nested_place(place));
360
145
    }
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
60
    void reset(AggregateDataPtr place) const override {
358
60
        this->data(place).clear();
359
60
        nested_func->reset(get_nested_place(place));
360
60
    }
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.54k
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE12size_of_dataEv
Line
Count
Source
362
7
    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
8
    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
689
    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
271
    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
7
    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
378
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE12size_of_dataEv
Line
Count
Source
362
133
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE12size_of_dataEv
Line
Count
Source
362
15
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE12size_of_dataEv
Line
Count
Source
362
37
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
363
364
1.82k
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE13align_of_dataEv
Line
Count
Source
364
9
    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
14
    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
560
    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
319
    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
11
    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
773
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE13align_of_dataEv
Line
Count
Source
364
98
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE13align_of_dataEv
Line
Count
Source
364
24
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE13align_of_dataEv
Line
Count
Source
364
18
    size_t align_of_data() const override { return nested_func->align_of_data(); }
365
366
2.73k
    void create(AggregateDataPtr __restrict place) const override {
367
2.73k
        new (place) Data<stable>;
368
2.73k
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
2.73k
                    this->data(place).~Data<stable>());
370
2.73k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE6createEPc
Line
Count
Source
366
9
    void create(AggregateDataPtr __restrict place) const override {
367
9
        new (place) Data<stable>;
368
9
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
9
                    this->data(place).~Data<stable>());
370
9
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE6createEPc
Line
Count
Source
366
12
    void create(AggregateDataPtr __restrict place) const override {
367
12
        new (place) Data<stable>;
368
12
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
12
                    this->data(place).~Data<stable>());
370
12
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE6createEPc
Line
Count
Source
366
1.33k
    void create(AggregateDataPtr __restrict place) const override {
367
1.33k
        new (place) Data<stable>;
368
1.33k
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
1.33k
                    this->data(place).~Data<stable>());
370
1.33k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE6createEPc
Line
Count
Source
366
393
    void create(AggregateDataPtr __restrict place) const override {
367
393
        new (place) Data<stable>;
368
393
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
393
                    this->data(place).~Data<stable>());
370
393
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE6createEPc
Line
Count
Source
366
9
    void create(AggregateDataPtr __restrict place) const override {
367
9
        new (place) Data<stable>;
368
9
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
9
                    this->data(place).~Data<stable>());
370
9
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE6createEPc
Line
Count
Source
366
639
    void create(AggregateDataPtr __restrict place) const override {
367
639
        new (place) Data<stable>;
368
639
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
639
                    this->data(place).~Data<stable>());
370
639
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE6createEPc
Line
Count
Source
366
231
    void create(AggregateDataPtr __restrict place) const override {
367
231
        new (place) Data<stable>;
368
231
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
231
                    this->data(place).~Data<stable>());
370
231
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE6createEPc
Line
Count
Source
366
26
    void create(AggregateDataPtr __restrict place) const override {
367
26
        new (place) Data<stable>;
368
26
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
26
                    this->data(place).~Data<stable>());
370
26
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE6createEPc
Line
Count
Source
366
78
    void create(AggregateDataPtr __restrict place) const override {
367
78
        new (place) Data<stable>;
368
78
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
78
                    this->data(place).~Data<stable>());
370
78
    }
371
372
2.73k
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
2.73k
        this->data(place).~Data<stable>();
374
2.73k
        nested_func->destroy(get_nested_place(place));
375
2.73k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
9
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
9
        this->data(place).~Data<stable>();
374
9
        nested_func->destroy(get_nested_place(place));
375
9
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
12
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
12
        this->data(place).~Data<stable>();
374
12
        nested_func->destroy(get_nested_place(place));
375
12
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
1.33k
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
1.33k
        this->data(place).~Data<stable>();
374
1.33k
        nested_func->destroy(get_nested_place(place));
375
1.33k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
393
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
393
        this->data(place).~Data<stable>();
374
393
        nested_func->destroy(get_nested_place(place));
375
393
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
9
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
9
        this->data(place).~Data<stable>();
374
9
        nested_func->destroy(get_nested_place(place));
375
9
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE7destroyEPc
Line
Count
Source
372
639
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
639
        this->data(place).~Data<stable>();
374
639
        nested_func->destroy(get_nested_place(place));
375
639
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE7destroyEPc
Line
Count
Source
372
230
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
230
        this->data(place).~Data<stable>();
374
230
        nested_func->destroy(get_nested_place(place));
375
230
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE7destroyEPc
Line
Count
Source
372
26
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
26
        this->data(place).~Data<stable>();
374
26
        nested_func->destroy(get_nested_place(place));
375
26
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE7destroyEPc
Line
Count
Source
372
77
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
77
        this->data(place).~Data<stable>();
374
77
        nested_func->destroy(get_nested_place(place));
375
77
    }
376
377
140
    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
44
    String get_name() const override { return nested_func->get_name() + "Distinct"; }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE8get_nameB5cxx11Ev
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE8get_nameB5cxx11Ev
Line
Count
Source
377
32
    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
1.94k
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE15get_return_typeEv
Line
Count
Source
379
16
    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
28
    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
732
    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
239
    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
16
    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
620
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE15get_return_typeEv
Line
Count
Source
379
232
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE15get_return_typeEv
Line
Count
Source
379
33
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE15get_return_typeEv
Line
Count
Source
379
32
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
380
381
69
    IAggregateFunction* transmit_to_stable() override {
382
69
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
69
                                                         IAggregateFunction::argument_types);
384
69
    }
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
60
    IAggregateFunction* transmit_to_stable() override {
382
60
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
60
                                                         IAggregateFunction::argument_types);
384
60
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18transmit_to_stableEv
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18transmit_to_stableEv
Line
Count
Source
381
9
    IAggregateFunction* transmit_to_stable() override {
382
9
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
9
                                                         IAggregateFunction::argument_types);
384
9
    }
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