Coverage Report

Created: 2026-09-24 14:26

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
541
    void clear() { data.clear(); }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE5clearEv
Line
Count
Source
59
4
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE5clearEv
Line
Count
Source
59
7
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE5clearEv
Line
Count
Source
59
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.12k
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
1.12k
        const auto& vec =
63
1.12k
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
1.12k
                        .get_data();
65
1.12k
        if constexpr (stable) {
66
0
            data.emplace(vec[row_num], data.size());
67
1.12k
        } else {
68
1.12k
            data.insert(vec[row_num]);
69
1.12k
        }
70
1.12k
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
16
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
16
        const auto& vec =
63
16
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
16
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
16
        } else {
68
16
            data.insert(vec[row_num]);
69
16
        }
70
16
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
19
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
19
        const auto& vec =
63
19
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
19
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
19
        } else {
68
19
            data.insert(vec[row_num]);
69
19
        }
70
19
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
863
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
863
        const auto& vec =
63
863
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
863
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
863
        } else {
68
863
            data.insert(vec[row_num]);
69
863
        }
70
863
    }
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
17
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
17
        const auto& vec =
63
17
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
17
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
17
        } else {
68
17
            data.insert(vec[row_num]);
69
17
        }
70
17
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
71
72
28
    void merge(const Self& rhs, Arena&) {
73
28
        DCHECK(!stable);
74
28
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
28
            if (data.empty() && !rhs.data.empty()) {
77
6
                data.reserve(rhs.data.size());
78
6
            }
79
47
            for (const auto& elem : rhs.data) {
80
47
                data.insert(elem);
81
47
            }
82
28
        }
83
28
    }
_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
12
    void merge(const Self& rhs, Arena&) {
73
12
        DCHECK(!stable);
74
12
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
12
            if (data.empty() && !rhs.data.empty()) {
77
2
                data.reserve(rhs.data.size());
78
2
            }
79
23
            for (const auto& elem : rhs.data) {
80
23
                data.insert(elem);
81
23
            }
82
12
        }
83
12
    }
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
687
    void serialize(BufferWritable& buf) const {
86
687
        DCHECK(!stable);
87
687
        if constexpr (!stable) {
88
687
            buf.write_var_uint(data.size());
89
748
            for (const auto& value : data) {
90
748
                buf.write_binary(value);
91
748
            }
92
687
        }
93
687
    }
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
4
    void serialize(BufferWritable& buf) const {
86
4
        DCHECK(!stable);
87
4
        if constexpr (!stable) {
88
4
            buf.write_var_uint(data.size());
89
10
            for (const auto& value : data) {
90
10
                buf.write_binary(value);
91
10
            }
92
4
        }
93
4
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
4
    void serialize(BufferWritable& buf) const {
86
4
        DCHECK(!stable);
87
4
        if constexpr (!stable) {
88
4
            buf.write_var_uint(data.size());
89
10
            for (const auto& value : data) {
90
10
                buf.write_binary(value);
91
10
            }
92
4
        }
93
4
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
561
    void serialize(BufferWritable& buf) const {
86
561
        DCHECK(!stable);
87
561
        if constexpr (!stable) {
88
561
            buf.write_var_uint(data.size());
89
568
            for (const auto& value : data) {
90
568
                buf.write_binary(value);
91
568
            }
92
561
        }
93
561
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
114
    void serialize(BufferWritable& buf) const {
86
114
        DCHECK(!stable);
87
114
        if constexpr (!stable) {
88
114
            buf.write_var_uint(data.size());
89
150
            for (const auto& value : data) {
90
150
                buf.write_binary(value);
91
150
            }
92
114
        }
93
114
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
4
    void serialize(BufferWritable& buf) const {
86
4
        DCHECK(!stable);
87
4
        if constexpr (!stable) {
88
4
            buf.write_var_uint(data.size());
89
10
            for (const auto& value : data) {
90
10
                buf.write_binary(value);
91
10
            }
92
4
        }
93
4
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE9serializeERNS_14BufferWritableE
94
95
624
    void deserialize(BufferReadable& buf, Arena&) {
96
624
        DCHECK(!stable);
97
624
        if constexpr (!stable) {
98
624
            uint64_t new_size = 0;
99
624
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
624
            if (data.empty() && new_size != 0) {
102
377
                data.reserve(new_size);
103
377
            }
104
624
            typename PrimitiveTypeTraits<T>::CppType x;
105
1.34k
            for (size_t i = 0; i < new_size; ++i) {
106
716
                buf.read_binary(x);
107
716
                data.insert(x);
108
716
            }
109
624
        }
110
624
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
6
    void deserialize(BufferReadable& buf, Arena&) {
96
6
        DCHECK(!stable);
97
6
        if constexpr (!stable) {
98
6
            uint64_t new_size = 0;
99
6
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
6
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
6
            typename PrimitiveTypeTraits<T>::CppType x;
105
22
            for (size_t i = 0; i < new_size; ++i) {
106
16
                buf.read_binary(x);
107
16
                data.insert(x);
108
16
            }
109
6
        }
110
6
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
6
    void deserialize(BufferReadable& buf, Arena&) {
96
6
        DCHECK(!stable);
97
6
        if constexpr (!stable) {
98
6
            uint64_t new_size = 0;
99
6
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
6
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
6
            typename PrimitiveTypeTraits<T>::CppType x;
105
22
            for (size_t i = 0; i < new_size; ++i) {
106
16
                buf.read_binary(x);
107
16
                data.insert(x);
108
16
            }
109
6
        }
110
6
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
482
    void deserialize(BufferReadable& buf, Arena&) {
96
482
        DCHECK(!stable);
97
482
        if constexpr (!stable) {
98
482
            uint64_t new_size = 0;
99
482
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
482
            if (data.empty() && new_size != 0) {
102
287
                data.reserve(new_size);
103
287
            }
104
482
            typename PrimitiveTypeTraits<T>::CppType x;
105
978
            for (size_t i = 0; i < new_size; ++i) {
106
496
                buf.read_binary(x);
107
496
                data.insert(x);
108
496
            }
109
482
        }
110
482
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
124
    void deserialize(BufferReadable& buf, Arena&) {
96
124
        DCHECK(!stable);
97
124
        if constexpr (!stable) {
98
124
            uint64_t new_size = 0;
99
124
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
124
            if (data.empty() && new_size != 0) {
102
84
                data.reserve(new_size);
103
84
            }
104
124
            typename PrimitiveTypeTraits<T>::CppType x;
105
296
            for (size_t i = 0; i < new_size; ++i) {
106
172
                buf.read_binary(x);
107
172
                data.insert(x);
108
172
            }
109
124
        }
110
124
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
6
    void deserialize(BufferReadable& buf, Arena&) {
96
6
        DCHECK(!stable);
97
6
        if constexpr (!stable) {
98
6
            uint64_t new_size = 0;
99
6
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
6
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
6
            typename PrimitiveTypeTraits<T>::CppType x;
105
22
            for (size_t i = 0; i < new_size; ++i) {
106
16
                buf.read_binary(x);
107
16
                data.insert(x);
108
16
            }
109
6
        }
110
6
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
111
112
623
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
623
        deserialize(buf, arena);
115
623
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
6
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
6
        deserialize(buf, arena);
115
6
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
6
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
6
        deserialize(buf, arena);
115
6
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
483
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
483
        deserialize(buf, arena);
115
483
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
122
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
122
        deserialize(buf, arena);
115
122
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
6
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
6
        deserialize(buf, arena);
115
6
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
116
117
436
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
436
        MutableColumns argument_columns;
119
436
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
436
        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
436
        } else {
131
630
            for (const auto& elem : data) {
132
630
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
630
            }
134
436
        }
135
136
436
        return argument_columns;
137
436
    }
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
2
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
2
        MutableColumns argument_columns;
119
2
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
        if constexpr (stable) {
122
            argument_columns[0]->resize(data.size());
123
            // argument_columns[0] is a mutable column created using create_column.
124
            // since get_raw_data returns a StringRef, const_cast is required here.
125
            auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>(
126
                    argument_columns[0]->get_raw_data().data);
127
            for (auto it : data) {
128
                ptr[it.second] = it.first;
129
            }
130
2
        } else {
131
10
            for (const auto& elem : data) {
132
10
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
10
            }
134
2
        }
135
136
2
        return argument_columns;
137
2
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
5
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
5
        MutableColumns argument_columns;
119
5
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
        if constexpr (stable) {
122
            argument_columns[0]->resize(data.size());
123
            // argument_columns[0] is a mutable column created using create_column.
124
            // since get_raw_data returns a StringRef, const_cast is required here.
125
            auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>(
126
                    argument_columns[0]->get_raw_data().data);
127
            for (auto it : data) {
128
                ptr[it.second] = it.first;
129
            }
130
5
        } else {
131
13
            for (const auto& elem : data) {
132
13
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
13
            }
134
5
        }
135
136
5
        return argument_columns;
137
5
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
322
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
322
        MutableColumns argument_columns;
119
322
        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
322
        } else {
131
439
            for (const auto& elem : data) {
132
439
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
439
            }
134
322
        }
135
136
322
        return argument_columns;
137
322
    }
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
12
            for (const auto& elem : data) {
132
12
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
12
            }
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
348
    void clear() { data.clear(); }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5clearEv
Line
Count
Source
148
236
    void clear() { data.clear(); }
_ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5clearEv
Line
Count
Source
148
112
    void clear() { data.clear(); }
149
150
220
    void merge(const Self& rhs, Arena& arena) {
151
220
        DCHECK(!stable);
152
220
        if constexpr (!stable) {
153
258
            for (const auto& elem : rhs.data) {
154
258
                StringRef key = elem;
155
258
                key.data = arena.insert(key.data, key.size);
156
258
                data.emplace(key);
157
258
            }
158
220
        }
159
220
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5mergeERKS1_RNS_5ArenaE
Line
Count
Source
150
220
    void merge(const Self& rhs, Arena& arena) {
151
220
        DCHECK(!stable);
152
220
        if constexpr (!stable) {
153
258
            for (const auto& elem : rhs.data) {
154
258
                StringRef key = elem;
155
258
                key.data = arena.insert(key.data, key.size);
156
258
                data.emplace(key);
157
258
            }
158
220
        }
159
220
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5mergeERKS1_RNS_5ArenaE
160
161
266
    void serialize(BufferWritable& buf) const {
162
266
        DCHECK(!stable);
163
266
        if constexpr (!stable) {
164
266
            buf.write_var_uint(data.size());
165
306
            for (const auto& elem : data) {
166
306
                buf.write_binary(elem);
167
306
            }
168
266
        }
169
266
    }
_ZNK5doris36AggregateFunctionDistinctGenericDataILb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
161
266
    void serialize(BufferWritable& buf) const {
162
266
        DCHECK(!stable);
163
266
        if constexpr (!stable) {
164
266
            buf.write_var_uint(data.size());
165
306
            for (const auto& elem : data) {
166
306
                buf.write_binary(elem);
167
306
            }
168
266
        }
169
266
    }
Unexecuted instantiation: _ZNK5doris36AggregateFunctionDistinctGenericDataILb1EE9serializeERNS_14BufferWritableE
170
171
218
    void deserialize_and_merge(Self& rhs, BufferReadable& buf, Arena& arena) {
172
        // deserialize() borrows StringRefs from buf; merge() copies them into the arena.
173
218
        rhs.deserialize(buf, arena);
174
218
        merge(rhs, arena);
175
218
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE21deserialize_and_mergeERS1_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
171
218
    void deserialize_and_merge(Self& rhs, BufferReadable& buf, Arena& arena) {
172
        // deserialize() borrows StringRefs from buf; merge() copies them into the arena.
173
218
        rhs.deserialize(buf, arena);
174
218
        merge(rhs, arena);
175
218
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE21deserialize_and_mergeERS1_RNS_14BufferReadableERNS_5ArenaE
176
177
220
    void deserialize(BufferReadable& buf, Arena& arena) {
178
220
        DCHECK(!stable);
179
220
        if constexpr (!stable) {
180
220
            UInt64 size;
181
220
            buf.read_var_uint(size);
182
183
220
            StringRef ref;
184
478
            for (size_t i = 0; i < size; ++i) {
185
258
                buf.read_binary(ref);
186
258
                data.insert(ref);
187
258
            }
188
220
        }
189
220
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
177
220
    void deserialize(BufferReadable& buf, Arena& arena) {
178
220
        DCHECK(!stable);
179
220
        if constexpr (!stable) {
180
220
            UInt64 size;
181
220
            buf.read_var_uint(size);
182
183
220
            StringRef ref;
184
478
            for (size_t i = 0; i < size; ++i) {
185
258
                buf.read_binary(ref);
186
258
                data.insert(ref);
187
258
            }
188
220
        }
189
220
    }
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
735
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
735
        auto key = columns[0]->get_data_at(row_num);
199
735
        key.data = arena.insert(key.data, key.size);
200
201
735
        if constexpr (stable) {
202
254
            data.emplace(key, data.size());
203
481
        } else {
204
481
            data.insert(key);
205
481
        }
206
735
    }
_ZN5doris42AggregateFunctionDistinctSingleGenericDataILb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
197
481
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
481
        auto key = columns[0]->get_data_at(row_num);
199
481
        key.data = arena.insert(key.data, key.size);
200
201
        if constexpr (stable) {
202
            data.emplace(key, data.size());
203
481
        } else {
204
481
            data.insert(key);
205
481
        }
206
481
    }
_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
250
    MutableColumns get_arguments(const DataTypes& argument_types) const {
209
250
        MutableColumns argument_columns;
210
250
        argument_columns.emplace_back(argument_types[0]->create_column());
211
250
        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
167
        } else {
220
225
            for (const auto& elem : data) {
221
225
                argument_columns[0]->insert_data(elem.data, elem.size);
222
225
            }
223
167
        }
224
225
250
        return argument_columns;
226
250
    }
_ZNK5doris42AggregateFunctionDistinctSingleGenericDataILb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE
Line
Count
Source
208
167
    MutableColumns get_arguments(const DataTypes& argument_types) const {
209
167
        MutableColumns argument_columns;
210
167
        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
167
        } else {
220
225
            for (const auto& elem : data) {
221
225
                argument_columns[0]->insert_data(elem.data, elem.size);
222
225
            }
223
167
        }
224
225
167
        return argument_columns;
226
167
    }
_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.28k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
7.28k
        return place + prefix_size;
296
7.28k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
16
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
16
        return place + prefix_size;
296
16
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
28
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
28
        return place + prefix_size;
296
28
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
3.52k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
3.52k
        return place + prefix_size;
296
3.52k
    }
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
20
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
20
        return place + prefix_size;
296
20
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE16get_nested_placeEPc
Line
Count
Source
294
1.65k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
1.65k
        return place + prefix_size;
296
1.65k
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE16get_nested_placeEPc
Line
Count
Source
294
628
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
628
        return place + prefix_size;
296
628
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE16get_nested_placeEPc
Line
Count
Source
294
136
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
136
        return place + prefix_size;
296
136
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE16get_nested_placeEPc
Line
Count
Source
294
253
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
253
        return place + prefix_size;
296
253
    }
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.81k
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
1.81k
                      arguments),
306
1.81k
              nested_func(std::move(nested_func_)),
307
1.81k
              arguments_num(arguments.size()) {
308
1.81k
        size_t nested_size = nested_func->align_of_data();
309
1.81k
        CHECK_GT(nested_size, 0);
310
1.81k
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
1.81k
    }
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
3
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
3
                      arguments),
306
3
              nested_func(std::move(nested_func_)),
307
3
              arguments_num(arguments.size()) {
308
3
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
3
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
3
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
4
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
4
                      arguments),
306
4
              nested_func(std::move(nested_func_)),
307
4
              arguments_num(arguments.size()) {
308
4
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
4
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
4
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
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
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
275
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
275
                      arguments),
306
275
              nested_func(std::move(nested_func_)),
307
275
              arguments_num(arguments.size()) {
308
275
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
275
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
275
    }
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
690
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
690
                      arguments),
306
690
              nested_func(std::move(nested_func_)),
307
690
              arguments_num(arguments.size()) {
308
690
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
690
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
690
    }
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
61
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
61
                      arguments),
306
61
              nested_func(std::move(nested_func_)),
307
61
              arguments_num(arguments.size()) {
308
61
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
61
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
61
    }
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
25
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
25
                      arguments),
306
25
              nested_func(std::move(nested_func_)),
307
25
              arguments_num(arguments.size()) {
308
25
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
25
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
25
    }
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
10
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
10
                      arguments),
306
10
              nested_func(std::move(nested_func_)),
307
10
              arguments_num(arguments.size()) {
308
10
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
10
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
10
    }
312
313
    void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num,
314
1.94k
             Arena& arena) const override {
315
1.94k
        this->data(place).add(columns, arguments_num, row_num, arena);
316
1.94k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
16
             Arena& arena) const override {
315
16
        this->data(place).add(columns, arguments_num, row_num, arena);
316
16
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
19
             Arena& arena) const override {
315
19
        this->data(place).add(columns, arguments_num, row_num, arena);
316
19
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
867
             Arena& arena) const override {
315
867
        this->data(place).add(columns, arguments_num, row_num, arena);
316
867
    }
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
17
             Arena& arena) const override {
315
17
        this->data(place).add(columns, arguments_num, row_num, arena);
316
17
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
481
             Arena& arena) const override {
315
481
        this->data(place).add(columns, arguments_num, row_num, arena);
316
481
    }
_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
10
               Arena& arena) const override {
320
10
        this->data(place).merge(this->data(rhs), arena);
321
10
    }
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
8
               Arena& arena) const override {
320
8
        this->data(place).merge(this->data(rhs), arena);
321
8
    }
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
2
               Arena& arena) const override {
320
2
        this->data(place).merge(this->data(rhs), arena);
321
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE5mergeEPcPKcRNS_5ArenaE
322
323
943
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
943
        this->data(place).serialize(buf);
325
943
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
2
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
2
        this->data(place).serialize(buf);
325
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
2
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
2
        this->data(place).serialize(buf);
325
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
559
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
559
        this->data(place).serialize(buf);
325
559
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
112
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
112
        this->data(place).serialize(buf);
325
112
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
2
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
2
        this->data(place).serialize(buf);
325
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
251
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
251
        this->data(place).serialize(buf);
325
251
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
15
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
15
        this->data(place).serialize(buf);
325
15
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE
326
327
    void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf,
328
4
                     Arena& arena) const override {
329
4
        this->data(place).deserialize(buf, arena);
330
4
    }
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
2
                     Arena& arena) const override {
329
2
        this->data(place).deserialize(buf, arena);
330
2
    }
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
2
                     Arena& arena) const override {
329
2
        this->data(place).deserialize(buf, arena);
330
2
    }
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
821
                               BufferReadable& buf, Arena& arena) const override {
334
821
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
821
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
2
                               BufferReadable& buf, Arena& arena) const override {
334
2
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
2
                               BufferReadable& buf, Arena& arena) const override {
334
2
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
479
                               BufferReadable& buf, Arena& arena) const override {
334
479
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
479
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
118
                               BufferReadable& buf, Arena& arena) const override {
334
118
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
118
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
2
                               BufferReadable& buf, Arena& arena) const override {
334
2
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
203
                               BufferReadable& buf, Arena& arena) const override {
334
203
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
203
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
15
                               BufferReadable& buf, Arena& arena) const override {
334
15
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
15
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
336
337
733
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
733
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
733
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
733
        ColumnRawPtrs arguments_raw(arguments.size());
342
1.51k
        for (size_t i = 0; i < arguments.size(); ++i) {
343
780
            arguments_raw[i] = arguments[i].get();
344
780
        }
345
346
733
        assert(!arguments.empty());
347
733
        Arena arena;
348
733
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
733
                                            arguments_raw.data(), arena);
350
733
        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
733
        this->data(place).clear();
355
733
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
2
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
2
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
2
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
2
        ColumnRawPtrs arguments_raw(arguments.size());
342
4
        for (size_t i = 0; i < arguments.size(); ++i) {
343
2
            arguments_raw[i] = arguments[i].get();
344
2
        }
345
346
2
        assert(!arguments.empty());
347
2
        Arena arena;
348
2
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
2
                                            arguments_raw.data(), arena);
350
2
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
2
        this->data(place).clear();
355
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
5
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
5
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
5
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
5
        ColumnRawPtrs arguments_raw(arguments.size());
342
10
        for (size_t i = 0; i < arguments.size(); ++i) {
343
5
            arguments_raw[i] = arguments[i].get();
344
5
        }
345
346
5
        assert(!arguments.empty());
347
5
        Arena arena;
348
5
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
5
                                            arguments_raw.data(), arena);
350
5
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
5
        this->data(place).clear();
355
5
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
322
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
322
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
322
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
322
        ColumnRawPtrs arguments_raw(arguments.size());
342
644
        for (size_t i = 0; i < arguments.size(); ++i) {
343
322
            arguments_raw[i] = arguments[i].get();
344
322
        }
345
346
322
        assert(!arguments.empty());
347
322
        Arena arena;
348
322
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
322
                                            arguments_raw.data(), arena);
350
322
        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
322
        this->data(place).clear();
355
322
    }
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
167
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
167
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
167
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
167
        ColumnRawPtrs arguments_raw(arguments.size());
342
334
        for (size_t i = 0; i < arguments.size(); ++i) {
343
167
            arguments_raw[i] = arguments[i].get();
344
167
        }
345
346
167
        assert(!arguments.empty());
347
167
        Arena arena;
348
167
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
167
                                            arguments_raw.data(), arena);
350
167
        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
167
        this->data(place).clear();
355
167
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
83
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
83
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
83
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
83
        ColumnRawPtrs arguments_raw(arguments.size());
342
166
        for (size_t i = 0; i < arguments.size(); ++i) {
343
83
            arguments_raw[i] = arguments[i].get();
344
83
        }
345
346
83
        assert(!arguments.empty());
347
83
        Arena arena;
348
83
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
83
                                            arguments_raw.data(), arena);
350
83
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
83
        this->data(place).clear();
355
83
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
18
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
18
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
18
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
18
        ColumnRawPtrs arguments_raw(arguments.size());
342
54
        for (size_t i = 0; i < arguments.size(); ++i) {
343
36
            arguments_raw[i] = arguments[i].get();
344
36
        }
345
346
18
        assert(!arguments.empty());
347
18
        Arena arena;
348
18
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
18
                                            arguments_raw.data(), arena);
350
18
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
18
        this->data(place).clear();
355
18
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
29
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
29
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
29
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
29
        ColumnRawPtrs arguments_raw(arguments.size());
342
87
        for (size_t i = 0; i < arguments.size(); ++i) {
343
58
            arguments_raw[i] = arguments[i].get();
344
58
        }
345
346
29
        assert(!arguments.empty());
347
29
        Arena arena;
348
29
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
29
                                            arguments_raw.data(), arena);
350
29
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
29
        this->data(place).clear();
355
29
    }
356
357
146
    void reset(AggregateDataPtr place) const override {
358
146
        this->data(place).clear();
359
146
        nested_func->reset(get_nested_place(place));
360
146
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE5resetEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE5resetEPc
Line
Count
Source
357
61
    void reset(AggregateDataPtr place) const override {
358
61
        this->data(place).clear();
359
61
        nested_func->reset(get_nested_place(place));
360
61
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE5resetEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE5resetEPc
Line
Count
Source
357
34
    void reset(AggregateDataPtr place) const override {
358
34
        this->data(place).clear();
359
34
        nested_func->reset(get_nested_place(place));
360
34
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE5resetEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE5resetEPc
Line
Count
Source
357
51
    void reset(AggregateDataPtr place) const override {
358
51
        this->data(place).clear();
359
51
        nested_func->reset(get_nested_place(place));
360
51
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE5resetEPc
361
362
1.80k
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE12size_of_dataEv
Line
Count
Source
362
5
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE12size_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE12size_of_dataEv
Line
Count
Source
362
6
    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
829
    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
288
    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
6
    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
419
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE12size_of_dataEv
Line
Count
Source
362
158
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE12size_of_dataEv
Line
Count
Source
362
39
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE12size_of_dataEv
Line
Count
Source
362
56
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
363
364
1.72k
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE13align_of_dataEv
Line
Count
Source
364
6
    size_t align_of_data() const override { return nested_func->align_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE13align_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE13align_of_dataEv
Line
Count
Source
364
12
    size_t align_of_data() const override { return nested_func->align_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE13align_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE13align_of_dataEv
Line
Count
Source
364
503
    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
322
    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
10
    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
713
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE13align_of_dataEv
Line
Count
Source
364
103
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE13align_of_dataEv
Line
Count
Source
364
34
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE13align_of_dataEv
Line
Count
Source
364
20
    size_t align_of_data() const override { return nested_func->align_of_data(); }
365
366
2.83k
    void create(AggregateDataPtr __restrict place) const override {
367
2.83k
        new (place) Data<stable>;
368
2.83k
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
2.83k
                    this->data(place).~Data<stable>());
370
2.83k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE6createEPc
Line
Count
Source
366
6
    void create(AggregateDataPtr __restrict place) const override {
367
6
        new (place) Data<stable>;
368
6
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
6
                    this->data(place).~Data<stable>());
370
6
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE6createEPc
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_13PrimitiveTypeE4EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE6createEPc
Line
Count
Source
366
1.41k
    void create(AggregateDataPtr __restrict place) const override {
367
1.41k
        new (place) Data<stable>;
368
1.41k
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
1.41k
                    this->data(place).~Data<stable>());
370
1.41k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE6createEPc
Line
Count
Source
366
390
    void create(AggregateDataPtr __restrict place) const override {
367
390
        new (place) Data<stable>;
368
390
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
390
                    this->data(place).~Data<stable>());
370
390
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE6createEPc
Line
Count
Source
366
7
    void create(AggregateDataPtr __restrict place) const override {
367
7
        new (place) Data<stable>;
368
7
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
7
                    this->data(place).~Data<stable>());
370
7
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE6createEPc
Line
Count
Source
366
637
    void create(AggregateDataPtr __restrict place) const override {
367
637
        new (place) Data<stable>;
368
637
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
637
                    this->data(place).~Data<stable>());
370
637
    }
_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
50
    void create(AggregateDataPtr __restrict place) const override {
367
50
        new (place) Data<stable>;
368
50
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
50
                    this->data(place).~Data<stable>());
370
50
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE6createEPc
Line
Count
Source
366
98
    void create(AggregateDataPtr __restrict place) const override {
367
98
        new (place) Data<stable>;
368
98
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
98
                    this->data(place).~Data<stable>());
370
98
    }
371
372
2.84k
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
2.84k
        this->data(place).~Data<stable>();
374
2.84k
        nested_func->destroy(get_nested_place(place));
375
2.84k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
6
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
6
        this->data(place).~Data<stable>();
374
6
        nested_func->destroy(get_nested_place(place));
375
6
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE7destroyEPc
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_13PrimitiveTypeE4EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
1.41k
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
1.41k
        this->data(place).~Data<stable>();
374
1.41k
        nested_func->destroy(get_nested_place(place));
375
1.41k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
390
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
390
        this->data(place).~Data<stable>();
374
390
        nested_func->destroy(get_nested_place(place));
375
390
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
7
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
7
        this->data(place).~Data<stable>();
374
7
        nested_func->destroy(get_nested_place(place));
375
7
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE7destroyEPc
Line
Count
Source
372
637
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
637
        this->data(place).~Data<stable>();
374
637
        nested_func->destroy(get_nested_place(place));
375
637
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE7destroyEPc
Line
Count
Source
372
231
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
231
        this->data(place).~Data<stable>();
374
231
        nested_func->destroy(get_nested_place(place));
375
231
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE7destroyEPc
Line
Count
Source
372
50
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
50
        this->data(place).~Data<stable>();
374
50
        nested_func->destroy(get_nested_place(place));
375
50
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE7destroyEPc
Line
Count
Source
372
98
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
98
        this->data(place).~Data<stable>();
374
98
        nested_func->destroy(get_nested_place(place));
375
98
    }
376
377
147
    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
50
    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
65
    String get_name() const override { return nested_func->get_name() + "Distinct"; }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE8get_nameB5cxx11Ev
378
379
2.17k
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE15get_return_typeEv
Line
Count
Source
379
11
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE15get_return_typeEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE15get_return_typeEv
Line
Count
Source
379
43
    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
886
    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
305
    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
15
    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
602
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE15get_return_typeEv
Line
Count
Source
379
220
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE15get_return_typeEv
Line
Count
Source
379
51
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE15get_return_typeEv
Line
Count
Source
379
37
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
380
381
71
    IAggregateFunction* transmit_to_stable() override {
382
71
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
71
                                                         IAggregateFunction::argument_types);
384
71
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE18transmit_to_stableEv
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE18transmit_to_stableEv
Line
Count
Source
381
61
    IAggregateFunction* transmit_to_stable() override {
382
61
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
61
                                                         IAggregateFunction::argument_types);
384
61
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18transmit_to_stableEv
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18transmit_to_stableEv
Line
Count
Source
381
10
    IAggregateFunction* transmit_to_stable() override {
382
10
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
10
                                                         IAggregateFunction::argument_types);
384
10
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE18transmit_to_stableEv
385
};
386
387
template <typename T>
388
struct FunctionStableTransfer {
389
    using FunctionStable = T;
390
};
391
392
template <template <bool stable> typename Data>
393
struct FunctionStableTransfer<AggregateFunctionDistinct<Data, false>> {
394
    using FunctionStable = AggregateFunctionDistinct<Data, true>;
395
};
396
397
} // namespace doris