Coverage Report

Created: 2026-09-23 10:05

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
534
    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
379
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE5clearEv
Line
Count
Source
59
140
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE5clearEv
Line
Count
Source
59
4
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE5clearEv
60
61
1.13k
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
1.13k
        const auto& vec =
63
1.13k
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
1.13k
                        .get_data();
65
1.13k
        if constexpr (stable) {
66
0
            data.emplace(vec[row_num], data.size());
67
1.13k
        } else {
68
1.13k
            data.insert(vec[row_num]);
69
1.13k
        }
70
1.13k
    }
_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
876
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
876
        const auto& vec =
63
876
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
876
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
876
        } else {
68
876
            data.insert(vec[row_num]);
69
876
        }
70
876
    }
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
16
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
16
        const auto& vec =
63
16
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
16
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
16
        } else {
68
16
            data.insert(vec[row_num]);
69
16
        }
70
16
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
71
72
35
    void merge(const Self& rhs, Arena&) {
73
35
        DCHECK(!stable);
74
35
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
35
            if (data.empty() && !rhs.data.empty()) {
77
6
                data.reserve(rhs.data.size());
78
6
            }
79
50
            for (const auto& elem : rhs.data) {
80
50
                data.insert(elem);
81
50
            }
82
35
        }
83
35
    }
_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
19
    void merge(const Self& rhs, Arena&) {
73
19
        DCHECK(!stable);
74
19
        if constexpr (!stable) {
75
            // Only an empty destination has a known final size; other sets may overlap.
76
19
            if (data.empty() && !rhs.data.empty()) {
77
2
                data.reserve(rhs.data.size());
78
2
            }
79
26
            for (const auto& elem : rhs.data) {
80
26
                data.insert(elem);
81
26
            }
82
19
        }
83
19
    }
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
681
    void serialize(BufferWritable& buf) const {
86
681
        DCHECK(!stable);
87
681
        if constexpr (!stable) {
88
681
            buf.write_var_uint(data.size());
89
724
            for (const auto& value : data) {
90
724
                buf.write_binary(value);
91
724
            }
92
681
        }
93
681
    }
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
6
    void serialize(BufferWritable& buf) const {
86
6
        DCHECK(!stable);
87
6
        if constexpr (!stable) {
88
6
            buf.write_var_uint(data.size());
89
10
            for (const auto& value : data) {
90
10
                buf.write_binary(value);
91
10
            }
92
6
        }
93
6
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
6
    void serialize(BufferWritable& buf) const {
86
6
        DCHECK(!stable);
87
6
        if constexpr (!stable) {
88
6
            buf.write_var_uint(data.size());
89
10
            for (const auto& value : data) {
90
10
                buf.write_binary(value);
91
10
            }
92
6
        }
93
6
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
546
    void serialize(BufferWritable& buf) const {
86
546
        DCHECK(!stable);
87
546
        if constexpr (!stable) {
88
546
            buf.write_var_uint(data.size());
89
552
            for (const auto& value : data) {
90
552
                buf.write_binary(value);
91
552
            }
92
546
        }
93
546
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
117
    void serialize(BufferWritable& buf) const {
86
117
        DCHECK(!stable);
87
117
        if constexpr (!stable) {
88
117
            buf.write_var_uint(data.size());
89
142
            for (const auto& value : data) {
90
142
                buf.write_binary(value);
91
142
            }
92
117
        }
93
117
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
6
    void serialize(BufferWritable& buf) const {
86
6
        DCHECK(!stable);
87
6
        if constexpr (!stable) {
88
6
            buf.write_var_uint(data.size());
89
10
            for (const auto& value : data) {
90
10
                buf.write_binary(value);
91
10
            }
92
6
        }
93
6
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE9serializeERNS_14BufferWritableE
94
95
622
    void deserialize(BufferReadable& buf, Arena&) {
96
622
        DCHECK(!stable);
97
622
        if constexpr (!stable) {
98
622
            uint64_t new_size = 0;
99
622
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
622
            if (data.empty() && new_size != 0) {
102
371
                data.reserve(new_size);
103
371
            }
104
622
            typename PrimitiveTypeTraits<T>::CppType x;
105
1.31k
            for (size_t i = 0; i < new_size; ++i) {
106
692
                buf.read_binary(x);
107
692
                data.insert(x);
108
692
            }
109
622
        }
110
622
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
8
    void deserialize(BufferReadable& buf, Arena&) {
96
8
        DCHECK(!stable);
97
8
        if constexpr (!stable) {
98
8
            uint64_t new_size = 0;
99
8
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
8
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
8
            typename PrimitiveTypeTraits<T>::CppType x;
105
24
            for (size_t i = 0; i < new_size; ++i) {
106
16
                buf.read_binary(x);
107
16
                data.insert(x);
108
16
            }
109
8
        }
110
8
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
8
    void deserialize(BufferReadable& buf, Arena&) {
96
8
        DCHECK(!stable);
97
8
        if constexpr (!stable) {
98
8
            uint64_t new_size = 0;
99
8
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
8
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
8
            typename PrimitiveTypeTraits<T>::CppType x;
105
24
            for (size_t i = 0; i < new_size; ++i) {
106
16
                buf.read_binary(x);
107
16
                data.insert(x);
108
16
            }
109
8
        }
110
8
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
471
    void deserialize(BufferReadable& buf, Arena&) {
96
471
        DCHECK(!stable);
97
471
        if constexpr (!stable) {
98
471
            uint64_t new_size = 0;
99
471
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
471
            if (data.empty() && new_size != 0) {
102
285
                data.reserve(new_size);
103
285
            }
104
471
            typename PrimitiveTypeTraits<T>::CppType x;
105
951
            for (size_t i = 0; i < new_size; ++i) {
106
480
                buf.read_binary(x);
107
480
                data.insert(x);
108
480
            }
109
471
        }
110
471
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
127
    void deserialize(BufferReadable& buf, Arena&) {
96
127
        DCHECK(!stable);
97
127
        if constexpr (!stable) {
98
127
            uint64_t new_size = 0;
99
127
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
127
            if (data.empty() && new_size != 0) {
102
80
                data.reserve(new_size);
103
80
            }
104
127
            typename PrimitiveTypeTraits<T>::CppType x;
105
291
            for (size_t i = 0; i < new_size; ++i) {
106
164
                buf.read_binary(x);
107
164
                data.insert(x);
108
164
            }
109
127
        }
110
127
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
8
    void deserialize(BufferReadable& buf, Arena&) {
96
8
        DCHECK(!stable);
97
8
        if constexpr (!stable) {
98
8
            uint64_t new_size = 0;
99
8
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
8
            if (data.empty() && new_size != 0) {
102
2
                data.reserve(new_size);
103
2
            }
104
8
            typename PrimitiveTypeTraits<T>::CppType x;
105
24
            for (size_t i = 0; i < new_size; ++i) {
106
16
                buf.read_binary(x);
107
16
                data.insert(x);
108
16
            }
109
8
        }
110
8
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
111
112
618
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
618
        deserialize(buf, arena);
115
618
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
8
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
8
        deserialize(buf, arena);
115
8
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
8
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
8
        deserialize(buf, arena);
115
8
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
471
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
471
        deserialize(buf, arena);
115
471
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
123
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
123
        deserialize(buf, arena);
115
123
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
8
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
8
        deserialize(buf, arena);
115
8
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
116
117
429
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
429
        MutableColumns argument_columns;
119
429
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
429
        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
429
        } else {
131
633
            for (const auto& elem : data) {
132
633
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
633
            }
134
429
        }
135
136
429
        return argument_columns;
137
429
    }
_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
316
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
316
        MutableColumns argument_columns;
119
316
        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
316
        } else {
131
444
            for (const auto& elem : data) {
132
444
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
444
            }
134
316
        }
135
136
316
        return argument_columns;
137
316
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
104
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
104
        MutableColumns argument_columns;
119
104
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
        if constexpr (stable) {
122
            argument_columns[0]->resize(data.size());
123
            // argument_columns[0] is a mutable column created using create_column.
124
            // since get_raw_data returns a StringRef, const_cast is required here.
125
            auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>(
126
                    argument_columns[0]->get_raw_data().data);
127
            for (auto it : data) {
128
                ptr[it.second] = it.first;
129
            }
130
104
        } else {
131
156
            for (const auto& elem : data) {
132
156
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
156
            }
134
104
        }
135
136
104
        return argument_columns;
137
104
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
2
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
2
        MutableColumns argument_columns;
119
2
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
        if constexpr (stable) {
122
            argument_columns[0]->resize(data.size());
123
            // argument_columns[0] is a mutable column created using create_column.
124
            // since get_raw_data returns a StringRef, const_cast is required here.
125
            auto ptr = (typename PrimitiveTypeTraits<T>::CppType*)const_cast<char*>(
126
                    argument_columns[0]->get_raw_data().data);
127
            for (auto it : data) {
128
                ptr[it.second] = it.first;
129
            }
130
2
        } else {
131
10
            for (const auto& elem : data) {
132
10
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
10
            }
134
2
        }
135
136
2
        return argument_columns;
137
2
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
138
};
139
140
template <bool stable>
141
struct AggregateFunctionDistinctGenericData {
142
    /// When creating, the hash table must be small.
143
    using Container = std::conditional_t<stable, doris::flat_hash_map<StringRef, uint32_t>,
144
                                         doris::flat_hash_set<StringRef, StringRefHash>>;
145
    using Self = AggregateFunctionDistinctGenericData;
146
    Container data;
147
148
347
    void clear() { data.clear(); }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5clearEv
Line
Count
Source
148
235
    void clear() { data.clear(); }
_ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5clearEv
Line
Count
Source
148
112
    void clear() { data.clear(); }
149
150
209
    void merge(const Self& rhs, Arena& arena) {
151
209
        DCHECK(!stable);
152
209
        if constexpr (!stable) {
153
241
            for (const auto& elem : rhs.data) {
154
241
                StringRef key = elem;
155
241
                key.data = arena.insert(key.data, key.size);
156
241
                data.emplace(key);
157
241
            }
158
209
        }
159
209
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5mergeERKS1_RNS_5ArenaE
Line
Count
Source
150
209
    void merge(const Self& rhs, Arena& arena) {
151
209
        DCHECK(!stable);
152
209
        if constexpr (!stable) {
153
241
            for (const auto& elem : rhs.data) {
154
241
                StringRef key = elem;
155
241
                key.data = arena.insert(key.data, key.size);
156
241
                data.emplace(key);
157
241
            }
158
209
        }
159
209
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5mergeERKS1_RNS_5ArenaE
160
161
255
    void serialize(BufferWritable& buf) const {
162
255
        DCHECK(!stable);
163
255
        if constexpr (!stable) {
164
255
            buf.write_var_uint(data.size());
165
289
            for (const auto& elem : data) {
166
289
                buf.write_binary(elem);
167
289
            }
168
255
        }
169
255
    }
_ZNK5doris36AggregateFunctionDistinctGenericDataILb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
161
255
    void serialize(BufferWritable& buf) const {
162
255
        DCHECK(!stable);
163
255
        if constexpr (!stable) {
164
255
            buf.write_var_uint(data.size());
165
289
            for (const auto& elem : data) {
166
289
                buf.write_binary(elem);
167
289
            }
168
255
        }
169
255
    }
Unexecuted instantiation: _ZNK5doris36AggregateFunctionDistinctGenericDataILb1EE9serializeERNS_14BufferWritableE
170
171
205
    void deserialize_and_merge(Self& rhs, BufferReadable& buf, Arena& arena) {
172
        // deserialize() borrows StringRefs from buf; merge() copies them into the arena.
173
205
        rhs.deserialize(buf, arena);
174
205
        merge(rhs, arena);
175
205
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE21deserialize_and_mergeERS1_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
171
205
    void deserialize_and_merge(Self& rhs, BufferReadable& buf, Arena& arena) {
172
        // deserialize() borrows StringRefs from buf; merge() copies them into the arena.
173
205
        rhs.deserialize(buf, arena);
174
205
        merge(rhs, arena);
175
205
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE21deserialize_and_mergeERS1_RNS_14BufferReadableERNS_5ArenaE
176
177
209
    void deserialize(BufferReadable& buf, Arena& arena) {
178
209
        DCHECK(!stable);
179
209
        if constexpr (!stable) {
180
209
            UInt64 size;
181
209
            buf.read_var_uint(size);
182
183
209
            StringRef ref;
184
450
            for (size_t i = 0; i < size; ++i) {
185
241
                buf.read_binary(ref);
186
241
                data.insert(ref);
187
241
            }
188
209
        }
189
209
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
177
209
    void deserialize(BufferReadable& buf, Arena& arena) {
178
209
        DCHECK(!stable);
179
209
        if constexpr (!stable) {
180
209
            UInt64 size;
181
209
            buf.read_var_uint(size);
182
183
209
            StringRef ref;
184
450
            for (size_t i = 0; i < size; ++i) {
185
241
                buf.read_binary(ref);
186
241
                data.insert(ref);
187
241
            }
188
209
        }
189
209
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
190
};
191
192
template <bool stable>
193
struct AggregateFunctionDistinctSingleGenericData
194
        : public AggregateFunctionDistinctGenericData<stable> {
195
    using Base = AggregateFunctionDistinctGenericData<stable>;
196
    using Base::data;
197
734
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
734
        auto key = columns[0]->get_data_at(row_num);
199
734
        key.data = arena.insert(key.data, key.size);
200
201
734
        if constexpr (stable) {
202
254
            data.emplace(key, data.size());
203
480
        } else {
204
480
            data.insert(key);
205
480
        }
206
734
    }
_ZN5doris42AggregateFunctionDistinctSingleGenericDataILb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
197
480
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
480
        auto key = columns[0]->get_data_at(row_num);
199
480
        key.data = arena.insert(key.data, key.size);
200
201
        if constexpr (stable) {
202
            data.emplace(key, data.size());
203
480
        } else {
204
480
            data.insert(key);
205
480
        }
206
480
    }
_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.26k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
7.26k
        return place + prefix_size;
296
7.26k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
24
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
24
        return place + prefix_size;
296
24
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
36
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
36
        return place + prefix_size;
296
36
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
3.46k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
3.46k
        return place + prefix_size;
296
3.46k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
1.05k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
1.05k
        return place + prefix_size;
296
1.05k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
24
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
24
        return place + prefix_size;
296
24
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE16get_nested_placeEPc
Line
Count
Source
294
1.68k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
1.68k
        return place + prefix_size;
296
1.68k
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE16get_nested_placeEPc
Line
Count
Source
294
672
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
672
        return place + prefix_size;
296
672
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE16get_nested_placeEPc
Line
Count
Source
294
88
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
88
        return place + prefix_size;
296
88
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE16get_nested_placeEPc
Line
Count
Source
294
214
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
214
        return place + prefix_size;
296
214
    }
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.99k
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
1.99k
                      arguments),
306
1.99k
              nested_func(std::move(nested_func_)),
307
1.99k
              arguments_num(arguments.size()) {
308
1.99k
        size_t nested_size = nested_func->align_of_data();
309
1.99k
        CHECK_GT(nested_size, 0);
310
1.99k
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
1.99k
    }
_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
879
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
879
                      arguments),
306
879
              nested_func(std::move(nested_func_)),
307
879
              arguments_num(arguments.size()) {
308
879
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
879
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
879
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
262
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
262
                      arguments),
306
262
              nested_func(std::move(nested_func_)),
307
262
              arguments_num(arguments.size()) {
308
262
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
262
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
262
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
3
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
3
                      arguments),
306
3
              nested_func(std::move(nested_func_)),
307
3
              arguments_num(arguments.size()) {
308
3
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
3
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
3
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
757
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
757
                      arguments),
306
757
              nested_func(std::move(nested_func_)),
307
757
              arguments_num(arguments.size()) {
308
757
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
757
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
757
    }
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
60
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
60
                      arguments),
306
60
              nested_func(std::move(nested_func_)),
307
60
              arguments_num(arguments.size()) {
308
60
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
60
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
60
    }
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
18
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
18
                      arguments),
306
18
              nested_func(std::move(nested_func_)),
307
18
              arguments_num(arguments.size()) {
308
18
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
18
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
18
    }
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
9
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
9
                      arguments),
306
9
              nested_func(std::move(nested_func_)),
307
9
              arguments_num(arguments.size()) {
308
9
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
9
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
9
    }
312
313
    void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num,
314
1.95k
             Arena& arena) const override {
315
1.95k
        this->data(place).add(columns, arguments_num, row_num, arena);
316
1.95k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
16
             Arena& arena) const override {
315
16
        this->data(place).add(columns, arguments_num, row_num, arena);
316
16
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
19
             Arena& arena) const override {
315
19
        this->data(place).add(columns, arguments_num, row_num, arena);
316
19
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
876
             Arena& arena) const override {
315
876
        this->data(place).add(columns, arguments_num, row_num, arena);
316
876
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
210
             Arena& arena) const override {
315
210
        this->data(place).add(columns, arguments_num, row_num, arena);
316
210
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
16
             Arena& arena) const override {
315
16
        this->data(place).add(columns, arguments_num, row_num, arena);
316
16
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
480
             Arena& arena) const override {
315
480
        this->data(place).add(columns, arguments_num, row_num, arena);
316
480
    }
_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
19
               Arena& arena) const override {
320
19
        this->data(place).merge(this->data(rhs), arena);
321
19
    }
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
15
               Arena& arena) const override {
320
15
        this->data(place).merge(this->data(rhs), arena);
321
15
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
319
4
               Arena& arena) const override {
320
4
        this->data(place).merge(this->data(rhs), arena);
321
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE5mergeEPcPKcRNS_5ArenaE
322
323
926
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
926
        this->data(place).serialize(buf);
325
926
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
4
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
4
        this->data(place).serialize(buf);
325
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
4
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
4
        this->data(place).serialize(buf);
325
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
544
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
544
        this->data(place).serialize(buf);
325
544
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
115
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
115
        this->data(place).serialize(buf);
325
115
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
4
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
4
        this->data(place).serialize(buf);
325
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
252
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
252
        this->data(place).serialize(buf);
325
252
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
3
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
3
        this->data(place).serialize(buf);
325
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE
326
327
    void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf,
328
8
                     Arena& arena) const override {
329
8
        this->data(place).deserialize(buf, arena);
330
8
    }
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
4
                     Arena& arena) const override {
329
4
        this->data(place).deserialize(buf, arena);
330
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
328
4
                     Arena& arena) const override {
329
4
        this->data(place).deserialize(buf, arena);
330
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
331
332
    void deserialize_and_merge(AggregateDataPtr __restrict place, AggregateDataPtr __restrict rhs,
333
803
                               BufferReadable& buf, Arena& arena) const override {
334
803
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
803
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
4
                               BufferReadable& buf, Arena& arena) const override {
334
4
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
4
                               BufferReadable& buf, Arena& arena) const override {
334
4
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
467
                               BufferReadable& buf, Arena& arena) const override {
334
467
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
467
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
119
                               BufferReadable& buf, Arena& arena) const override {
334
119
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
119
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
4
                               BufferReadable& buf, Arena& arena) const override {
334
4
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
202
                               BufferReadable& buf, Arena& arena) const override {
334
202
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
202
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
3
                               BufferReadable& buf, Arena& arena) const override {
334
3
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
3
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
336
337
726
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
726
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
726
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
726
        ColumnRawPtrs arguments_raw(arguments.size());
342
1.49k
        for (size_t i = 0; i < arguments.size(); ++i) {
343
773
            arguments_raw[i] = arguments[i].get();
344
773
        }
345
346
726
        assert(!arguments.empty());
347
726
        Arena arena;
348
726
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
726
                                            arguments_raw.data(), arena);
350
726
        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
726
        this->data(place).clear();
355
726
    }
_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
316
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
316
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
316
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
316
        ColumnRawPtrs arguments_raw(arguments.size());
342
632
        for (size_t i = 0; i < arguments.size(); ++i) {
343
316
            arguments_raw[i] = arguments[i].get();
344
316
        }
345
346
316
        assert(!arguments.empty());
347
316
        Arena arena;
348
316
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
316
                                            arguments_raw.data(), arena);
350
316
        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
316
        this->data(place).clear();
355
316
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
104
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
104
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
104
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
104
        ColumnRawPtrs arguments_raw(arguments.size());
342
208
        for (size_t i = 0; i < arguments.size(); ++i) {
343
104
            arguments_raw[i] = arguments[i].get();
344
104
        }
345
346
104
        assert(!arguments.empty());
347
104
        Arena arena;
348
104
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
104
                                            arguments_raw.data(), arena);
350
104
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
104
        this->data(place).clear();
355
104
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
2
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
2
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
2
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
2
        ColumnRawPtrs arguments_raw(arguments.size());
342
4
        for (size_t i = 0; i < arguments.size(); ++i) {
343
2
            arguments_raw[i] = arguments[i].get();
344
2
        }
345
346
2
        assert(!arguments.empty());
347
2
        Arena arena;
348
2
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
2
                                            arguments_raw.data(), arena);
350
2
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
2
        this->data(place).clear();
355
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
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
145
    void reset(AggregateDataPtr place) const override {
358
145
        this->data(place).clear();
359
145
        nested_func->reset(get_nested_place(place));
360
145
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE5resetEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE5resetEPc
Line
Count
Source
357
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
50
    void reset(AggregateDataPtr place) const override {
358
50
        this->data(place).clear();
359
50
        nested_func->reset(get_nested_place(place));
360
50
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE5resetEPc
361
362
1.60k
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE12size_of_dataEv
Line
Count
Source
362
7
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE12size_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE12size_of_dataEv
Line
Count
Source
362
8
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE12size_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE12size_of_dataEv
Line
Count
Source
362
702
    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
267
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE12size_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE12size_of_dataEv
Line
Count
Source
362
7
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE12size_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE12size_of_dataEv
Line
Count
Source
362
416
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE12size_of_dataEv
Line
Count
Source
362
146
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE12size_of_dataEv
Line
Count
Source
362
15
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE12size_of_dataEv
Line
Count
Source
362
37
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
363
364
1.83k
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE13align_of_dataEv
Line
Count
Source
364
7
    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
575
    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
307
    size_t align_of_data() const override { return nested_func->align_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE13align_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE13align_of_dataEv
Line
Count
Source
364
9
    size_t align_of_data() const override { return nested_func->align_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE13align_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE13align_of_dataEv
Line
Count
Source
364
785
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE13align_of_dataEv
Line
Count
Source
364
100
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE13align_of_dataEv
Line
Count
Source
364
24
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE13align_of_dataEv
Line
Count
Source
364
18
    size_t align_of_data() const override { return nested_func->align_of_data(); }
365
366
2.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
10
    void create(AggregateDataPtr __restrict place) const override {
367
10
        new (place) Data<stable>;
368
10
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
10
                    this->data(place).~Data<stable>());
370
10
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE6createEPc
Line
Count
Source
366
13
    void create(AggregateDataPtr __restrict place) const override {
367
13
        new (place) Data<stable>;
368
13
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
13
                    this->data(place).~Data<stable>());
370
13
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE6createEPc
Line
Count
Source
366
1.38k
    void create(AggregateDataPtr __restrict place) const override {
367
1.38k
        new (place) Data<stable>;
368
1.38k
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
1.38k
                    this->data(place).~Data<stable>());
370
1.38k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE6createEPc
Line
Count
Source
366
408
    void create(AggregateDataPtr __restrict place) const override {
367
408
        new (place) Data<stable>;
368
408
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
408
                    this->data(place).~Data<stable>());
370
408
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE6createEPc
Line
Count
Source
366
10
    void create(AggregateDataPtr __restrict place) const override {
367
10
        new (place) Data<stable>;
368
10
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
10
                    this->data(place).~Data<stable>());
370
10
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE6createEPc
Line
Count
Source
366
651
    void create(AggregateDataPtr __restrict place) const override {
367
651
        new (place) Data<stable>;
368
651
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
651
                    this->data(place).~Data<stable>());
370
651
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE6createEPc
Line
Count
Source
366
253
    void create(AggregateDataPtr __restrict place) const override {
367
253
        new (place) Data<stable>;
368
253
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
253
                    this->data(place).~Data<stable>());
370
253
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE6createEPc
Line
Count
Source
366
26
    void create(AggregateDataPtr __restrict place) const override {
367
26
        new (place) Data<stable>;
368
26
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
26
                    this->data(place).~Data<stable>());
370
26
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE6createEPc
Line
Count
Source
366
78
    void create(AggregateDataPtr __restrict place) const override {
367
78
        new (place) Data<stable>;
368
78
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
78
                    this->data(place).~Data<stable>());
370
78
    }
371
372
2.83k
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
2.83k
        this->data(place).~Data<stable>();
374
2.83k
        nested_func->destroy(get_nested_place(place));
375
2.83k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
10
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
10
        this->data(place).~Data<stable>();
374
10
        nested_func->destroy(get_nested_place(place));
375
10
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
13
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
13
        this->data(place).~Data<stable>();
374
13
        nested_func->destroy(get_nested_place(place));
375
13
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
1.38k
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
1.38k
        this->data(place).~Data<stable>();
374
1.38k
        nested_func->destroy(get_nested_place(place));
375
1.38k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
408
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
408
        this->data(place).~Data<stable>();
374
408
        nested_func->destroy(get_nested_place(place));
375
408
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
10
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
10
        this->data(place).~Data<stable>();
374
10
        nested_func->destroy(get_nested_place(place));
375
10
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE7destroyEPc
Line
Count
Source
372
651
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
651
        this->data(place).~Data<stable>();
374
651
        nested_func->destroy(get_nested_place(place));
375
651
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE7destroyEPc
Line
Count
Source
372
252
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
252
        this->data(place).~Data<stable>();
374
252
        nested_func->destroy(get_nested_place(place));
375
252
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE7destroyEPc
Line
Count
Source
372
26
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
26
        this->data(place).~Data<stable>();
374
26
        nested_func->destroy(get_nested_place(place));
375
26
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE7destroyEPc
Line
Count
Source
372
78
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
78
        this->data(place).~Data<stable>();
374
78
        nested_func->destroy(get_nested_place(place));
375
78
    }
376
377
153
    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
60
    String get_name() const override { return nested_func->get_name() + "Distinct"; }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE8get_nameB5cxx11Ev
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE8get_nameB5cxx11Ev
Line
Count
Source
377
30
    String get_name() const override { return nested_func->get_name() + "Distinct"; }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE8get_nameB5cxx11Ev
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE8get_nameB5cxx11Ev
Line
Count
Source
377
63
    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.12k
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE15get_return_typeEv
Line
Count
Source
379
11
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE15get_return_typeEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE15get_return_typeEv
Line
Count
Source
379
23
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE15get_return_typeEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE15get_return_typeEv
Line
Count
Source
379
812
    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
240
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE15get_return_typeEv
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE15get_return_typeEv
Line
Count
Source
379
11
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE15get_return_typeEv
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE15get_return_typeEv
Line
Count
Source
379
698
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE15get_return_typeEv
Line
Count
Source
379
262
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE15get_return_typeEv
Line
Count
Source
379
39
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE15get_return_typeEv
Line
Count
Source
379
32
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
380
381
69
    IAggregateFunction* transmit_to_stable() override {
382
69
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
69
                                                         IAggregateFunction::argument_types);
384
69
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE18transmit_to_stableEv
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE18transmit_to_stableEv
Line
Count
Source
381
60
    IAggregateFunction* transmit_to_stable() override {
382
60
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
60
                                                         IAggregateFunction::argument_types);
384
60
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18transmit_to_stableEv
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18transmit_to_stableEv
Line
Count
Source
381
9
    IAggregateFunction* transmit_to_stable() override {
382
9
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
9
                                                         IAggregateFunction::argument_types);
384
9
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE18transmit_to_stableEv
385
};
386
387
template <typename T>
388
struct FunctionStableTransfer {
389
    using FunctionStable = T;
390
};
391
392
template <template <bool stable> typename Data>
393
struct FunctionStableTransfer<AggregateFunctionDistinct<Data, false>> {
394
    using FunctionStable = AggregateFunctionDistinct<Data, true>;
395
};
396
397
} // namespace doris