Coverage Report

Created: 2026-09-25 06:16

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exprs/aggregate/aggregate_function_distinct.h
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
// This file is copied from
18
// https://github.com/ClickHouse/ClickHouse/blob/master/src/AggregateFunctions/AggregateFunctionDistinct.h
19
// and modified by Doris
20
21
#pragma once
22
23
#include <assert.h>
24
#include <glog/logging.h>
25
#include <stddef.h>
26
27
#include <type_traits>
28
#include <utility>
29
#include <vector>
30
31
#include "core/assert_cast.h"
32
#include "core/column/column.h"
33
#include "core/data_type/data_type.h"
34
#include "core/string_ref.h"
35
#include "core/types.h"
36
#include "exprs/aggregate/aggregate_function.h"
37
38
namespace doris {
39
class Arena;
40
class BufferReadable;
41
class BufferWritable;
42
template <PrimitiveType>
43
class ColumnVector;
44
} // namespace doris
45
template <typename, typename>
46
struct DefaultHash;
47
48
namespace doris {
49
50
template <PrimitiveType T, bool stable>
51
struct AggregateFunctionDistinctSingleNumericData {
52
    /// When creating, the hash table must be small.
53
    using Container = std::conditional_t<
54
            stable, doris::flat_hash_map<typename PrimitiveTypeTraits<T>::CppType, uint32_t>,
55
            doris::flat_hash_set<typename PrimitiveTypeTraits<T>::CppType>>;
56
    using Self = AggregateFunctionDistinctSingleNumericData<T, stable>;
57
    Container data;
58
59
541
    void clear() { data.clear(); }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE5clearEv
Line
Count
Source
59
4
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE5clearEv
Line
Count
Source
59
7
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE5clearEv
Line
Count
Source
59
383
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE5clearEv
Line
Count
Source
59
141
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE5clearEv
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE5clearEv
Line
Count
Source
59
6
    void clear() { data.clear(); }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb1EE5clearEv
60
61
1.17k
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
1.17k
        const auto& vec =
63
1.17k
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
1.17k
                        .get_data();
65
1.17k
        if constexpr (stable) {
66
0
            data.emplace(vec[row_num], data.size());
67
1.17k
        } else {
68
1.17k
            data.insert(vec[row_num]);
69
1.17k
        }
70
1.17k
    }
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
16
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
16
        const auto& vec =
63
16
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
16
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
16
        } else {
68
16
            data.insert(vec[row_num]);
69
16
        }
70
16
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE3ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
19
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
19
        const auto& vec =
63
19
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
19
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
19
        } else {
68
19
            data.insert(vec[row_num]);
69
19
        }
70
19
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE4ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
869
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
869
        const auto& vec =
63
869
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
869
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
869
        } else {
68
869
            data.insert(vec[row_num]);
69
869
        }
70
869
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
224
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
224
        const auto& vec =
63
224
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
224
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
224
        } else {
68
224
            data.insert(vec[row_num]);
69
224
        }
70
224
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
61
46
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena&) {
62
46
        const auto& vec =
63
46
                assert_cast<const ColumnVector<T>&, TypeCheckOnRelease::DISABLE>(*columns[0])
64
46
                        .get_data();
65
        if constexpr (stable) {
66
            data.emplace(vec[row_num], data.size());
67
46
        } else {
68
46
            data.insert(vec[row_num]);
69
46
        }
70
46
    }
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
49
            for (const auto& elem : rhs.data) {
80
49
                data.insert(elem);
81
49
            }
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
25
            for (const auto& elem : rhs.data) {
80
25
                data.insert(elem);
81
25
            }
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
689
    void serialize(BufferWritable& buf) const {
86
689
        DCHECK(!stable);
87
689
        if constexpr (!stable) {
88
689
            buf.write_var_uint(data.size());
89
736
            for (const auto& value : data) {
90
736
                buf.write_binary(value);
91
736
            }
92
689
        }
93
689
    }
_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
555
    void serialize(BufferWritable& buf) const {
86
555
        DCHECK(!stable);
87
555
        if constexpr (!stable) {
88
555
            buf.write_var_uint(data.size());
89
559
            for (const auto& value : data) {
90
559
                buf.write_binary(value);
91
559
            }
92
555
        }
93
555
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE9serializeERNS_14BufferWritableE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
85
116
    void serialize(BufferWritable& buf) const {
86
116
        DCHECK(!stable);
87
116
        if constexpr (!stable) {
88
116
            buf.write_var_uint(data.size());
89
147
            for (const auto& value : data) {
90
147
                buf.write_binary(value);
91
147
            }
92
116
        }
93
116
    }
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
628
    void deserialize(BufferReadable& buf, Arena&) {
96
628
        DCHECK(!stable);
97
628
        if constexpr (!stable) {
98
628
            uint64_t new_size = 0;
99
628
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
628
            if (data.empty() && new_size != 0) {
102
381
                data.reserve(new_size);
103
381
            }
104
628
            typename PrimitiveTypeTraits<T>::CppType x;
105
1.33k
            for (size_t i = 0; i < new_size; ++i) {
106
704
                buf.read_binary(x);
107
704
                data.insert(x);
108
704
            }
109
628
        }
110
628
    }
_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
478
    void deserialize(BufferReadable& buf, Arena&) {
96
478
        DCHECK(!stable);
97
478
        if constexpr (!stable) {
98
478
            uint64_t new_size = 0;
99
478
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
478
            if (data.empty() && new_size != 0) {
102
287
                data.reserve(new_size);
103
287
            }
104
478
            typename PrimitiveTypeTraits<T>::CppType x;
105
965
            for (size_t i = 0; i < new_size; ++i) {
106
487
                buf.read_binary(x);
107
487
                data.insert(x);
108
487
            }
109
478
        }
110
478
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
95
126
    void deserialize(BufferReadable& buf, Arena&) {
96
126
        DCHECK(!stable);
97
126
        if constexpr (!stable) {
98
126
            uint64_t new_size = 0;
99
126
            buf.read_var_uint(new_size);
100
            // Avoid reserving an upper bound when merging into a nonempty set.
101
126
            if (data.empty() && new_size != 0) {
102
88
                data.reserve(new_size);
103
88
            }
104
126
            typename PrimitiveTypeTraits<T>::CppType x;
105
295
            for (size_t i = 0; i < new_size; ++i) {
106
169
                buf.read_binary(x);
107
169
                data.insert(x);
108
169
            }
109
126
        }
110
126
    }
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
625
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
625
        deserialize(buf, arena);
115
625
    }
_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
479
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
479
        deserialize(buf, arena);
115
479
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
122
    void deserialize_and_merge(Self& /*rhs*/, BufferReadable& buf, Arena& arena) {
113
        // Numeric keys can be inserted directly without building a temporary hash set.
114
122
        deserialize(buf, arena);
115
122
    }
Unexecuted instantiation: _ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
_ZN5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE21deserialize_and_mergeERS2_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
112
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
435
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
435
        MutableColumns argument_columns;
119
435
        argument_columns.emplace_back(argument_types[0]->create_column());
120
121
435
        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
435
        } else {
131
655
            for (const auto& elem : data) {
132
655
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
655
            }
134
435
        }
135
136
435
        return argument_columns;
137
435
    }
_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
319
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
319
        MutableColumns argument_columns;
119
319
        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
319
        } else {
131
439
            for (const auto& elem : data) {
132
439
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
439
            }
134
319
        }
135
136
319
        return argument_columns;
137
319
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE5ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
105
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
105
        MutableColumns argument_columns;
119
105
        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
105
        } else {
131
165
            for (const auto& elem : data) {
132
165
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
165
            }
134
105
        }
135
136
105
        return argument_columns;
137
105
    }
Unexecuted instantiation: _ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE6ELb1EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZNK5doris42AggregateFunctionDistinctSingleNumericDataILNS_13PrimitiveTypeE7ELb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
117
4
    MutableColumns get_arguments(const DataTypes& argument_types) const {
118
4
        MutableColumns argument_columns;
119
4
        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
4
        } else {
131
28
            for (const auto& elem : data) {
132
28
                argument_columns[0]->insert(Field::create_field<T>(elem));
133
28
            }
134
4
        }
135
136
4
        return argument_columns;
137
4
    }
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
351
    void clear() { data.clear(); }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5clearEv
Line
Count
Source
148
239
    void clear() { data.clear(); }
_ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5clearEv
Line
Count
Source
148
112
    void clear() { data.clear(); }
149
150
225
    void merge(const Self& rhs, Arena& arena) {
151
225
        DCHECK(!stable);
152
225
        if constexpr (!stable) {
153
258
            for (const auto& elem : rhs.data) {
154
258
                StringRef key = elem;
155
258
                key.data = arena.insert(key.data, key.size);
156
258
                data.emplace(key);
157
258
            }
158
225
        }
159
225
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE5mergeERKS1_RNS_5ArenaE
Line
Count
Source
150
225
    void merge(const Self& rhs, Arena& arena) {
151
225
        DCHECK(!stable);
152
225
        if constexpr (!stable) {
153
258
            for (const auto& elem : rhs.data) {
154
258
                StringRef key = elem;
155
258
                key.data = arena.insert(key.data, key.size);
156
258
                data.emplace(key);
157
258
            }
158
225
        }
159
225
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE5mergeERKS1_RNS_5ArenaE
160
161
271
    void serialize(BufferWritable& buf) const {
162
271
        DCHECK(!stable);
163
271
        if constexpr (!stable) {
164
271
            buf.write_var_uint(data.size());
165
306
            for (const auto& elem : data) {
166
306
                buf.write_binary(elem);
167
306
            }
168
271
        }
169
271
    }
_ZNK5doris36AggregateFunctionDistinctGenericDataILb0EE9serializeERNS_14BufferWritableE
Line
Count
Source
161
271
    void serialize(BufferWritable& buf) const {
162
271
        DCHECK(!stable);
163
271
        if constexpr (!stable) {
164
271
            buf.write_var_uint(data.size());
165
306
            for (const auto& elem : data) {
166
306
                buf.write_binary(elem);
167
306
            }
168
271
        }
169
271
    }
Unexecuted instantiation: _ZNK5doris36AggregateFunctionDistinctGenericDataILb1EE9serializeERNS_14BufferWritableE
170
171
221
    void deserialize_and_merge(Self& rhs, BufferReadable& buf, Arena& arena) {
172
        // deserialize() borrows StringRefs from buf; merge() copies them into the arena.
173
221
        rhs.deserialize(buf, arena);
174
221
        merge(rhs, arena);
175
221
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE21deserialize_and_mergeERS1_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
171
221
    void deserialize_and_merge(Self& rhs, BufferReadable& buf, Arena& arena) {
172
        // deserialize() borrows StringRefs from buf; merge() copies them into the arena.
173
221
        rhs.deserialize(buf, arena);
174
221
        merge(rhs, arena);
175
221
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE21deserialize_and_mergeERS1_RNS_14BufferReadableERNS_5ArenaE
176
177
225
    void deserialize(BufferReadable& buf, Arena& arena) {
178
225
        DCHECK(!stable);
179
225
        if constexpr (!stable) {
180
225
            UInt64 size;
181
225
            buf.read_var_uint(size);
182
183
225
            StringRef ref;
184
483
            for (size_t i = 0; i < size; ++i) {
185
258
                buf.read_binary(ref);
186
258
                data.insert(ref);
187
258
            }
188
225
        }
189
225
    }
_ZN5doris36AggregateFunctionDistinctGenericDataILb0EE11deserializeERNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
177
225
    void deserialize(BufferReadable& buf, Arena& arena) {
178
225
        DCHECK(!stable);
179
225
        if constexpr (!stable) {
180
225
            UInt64 size;
181
225
            buf.read_var_uint(size);
182
183
225
            StringRef ref;
184
483
            for (size_t i = 0; i < size; ++i) {
185
258
                buf.read_binary(ref);
186
258
                data.insert(ref);
187
258
            }
188
225
        }
189
225
    }
Unexecuted instantiation: _ZN5doris36AggregateFunctionDistinctGenericDataILb1EE11deserializeERNS_14BufferReadableERNS_5ArenaE
190
};
191
192
template <bool stable>
193
struct AggregateFunctionDistinctSingleGenericData
194
        : public AggregateFunctionDistinctGenericData<stable> {
195
    using Base = AggregateFunctionDistinctGenericData<stable>;
196
    using Base::data;
197
777
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
777
        auto key = columns[0]->get_data_at(row_num);
199
777
        key.data = arena.insert(key.data, key.size);
200
201
777
        if constexpr (stable) {
202
252
            data.emplace(key, data.size());
203
525
        } else {
204
525
            data.insert(key);
205
525
        }
206
777
    }
_ZN5doris42AggregateFunctionDistinctSingleGenericDataILb0EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
197
525
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
525
        auto key = columns[0]->get_data_at(row_num);
199
525
        key.data = arena.insert(key.data, key.size);
200
201
        if constexpr (stable) {
202
            data.emplace(key, data.size());
203
525
        } else {
204
525
            data.insert(key);
205
525
        }
206
525
    }
_ZN5doris42AggregateFunctionDistinctSingleGenericDataILb1EE3addEPPKNS_7IColumnEmmRNS_5ArenaE
Line
Count
Source
197
252
    void add(const IColumn** columns, size_t /* columns_num */, size_t row_num, Arena& arena) {
198
252
        auto key = columns[0]->get_data_at(row_num);
199
252
        key.data = arena.insert(key.data, key.size);
200
201
252
        if constexpr (stable) {
202
252
            data.emplace(key, data.size());
203
        } else {
204
            data.insert(key);
205
        }
206
252
    }
207
208
253
    MutableColumns get_arguments(const DataTypes& argument_types) const {
209
253
        MutableColumns argument_columns;
210
253
        argument_columns.emplace_back(argument_types[0]->create_column());
211
253
        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
170
        } else {
220
252
            for (const auto& elem : data) {
221
252
                argument_columns[0]->insert_data(elem.data, elem.size);
222
252
            }
223
170
        }
224
225
253
        return argument_columns;
226
253
    }
_ZNK5doris42AggregateFunctionDistinctSingleGenericDataILb0EE13get_argumentsERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE
Line
Count
Source
208
170
    MutableColumns get_arguments(const DataTypes& argument_types) const {
209
170
        MutableColumns argument_columns;
210
170
        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
170
        } else {
220
252
            for (const auto& elem : data) {
221
252
                argument_columns[0]->insert_data(elem.data, elem.size);
222
252
            }
223
170
        }
224
225
170
        return argument_columns;
226
170
    }
_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.72k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
7.72k
        return place + prefix_size;
296
7.72k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
47
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
47
        return place + prefix_size;
296
47
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
59
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
59
        return place + prefix_size;
296
59
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
3.51k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
3.51k
        return place + prefix_size;
296
3.51k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
1.20k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
1.20k
        return place + prefix_size;
296
1.20k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE16get_nested_placeEPc
Line
Count
Source
294
55
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
55
        return place + prefix_size;
296
55
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE16get_nested_placeEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE16get_nested_placeEPc
Line
Count
Source
294
1.71k
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
1.71k
        return place + prefix_size;
296
1.71k
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE16get_nested_placeEPc
Line
Count
Source
294
739
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
739
        return place + prefix_size;
296
739
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE16get_nested_placeEPc
Line
Count
Source
294
136
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
136
        return place + prefix_size;
296
136
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE16get_nested_placeEPc
Line
Count
Source
294
250
    AggregateDataPtr get_nested_place(AggregateDataPtr __restrict place) const noexcept {
295
250
        return place + prefix_size;
296
250
    }
297
298
    ConstAggregateDataPtr get_nested_place(ConstAggregateDataPtr __restrict place) const noexcept {
299
        return place + prefix_size;
300
    }
301
302
public:
303
    AggregateFunctionDistinct(AggregateFunctionPtr nested_func_, const DataTypes& arguments)
304
1.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
862
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
862
                      arguments),
306
862
              nested_func(std::move(nested_func_)),
307
862
              arguments_num(arguments.size()) {
308
862
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
862
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
862
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
276
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
276
                      arguments),
306
276
              nested_func(std::move(nested_func_)),
307
276
              arguments_num(arguments.size()) {
308
276
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
276
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
276
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
Line
Count
Source
304
5
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
5
                      arguments),
306
5
              nested_func(std::move(nested_func_)),
307
5
              arguments_num(arguments.size()) {
308
5
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
5
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
5
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS6_IKNS_9IDataTypeEESaISC_EE
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
747
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
747
                      arguments),
306
747
              nested_func(std::move(nested_func_)),
307
747
              arguments_num(arguments.size()) {
308
747
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
747
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
747
    }
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
61
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
61
                      arguments),
306
61
              nested_func(std::move(nested_func_)),
307
61
              arguments_num(arguments.size()) {
308
61
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
61
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
61
    }
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
25
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
25
                      arguments),
306
25
              nested_func(std::move(nested_func_)),
307
25
              arguments_num(arguments.size()) {
308
25
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
25
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
25
    }
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EEC2ESt10shared_ptrINS_18IAggregateFunctionEERKSt6vectorIS3_IKNS_9IDataTypeEESaIS9_EE
Line
Count
Source
304
10
            : IAggregateFunctionDataHelper<Data<stable>, AggregateFunctionDistinct<Data, stable>>(
305
10
                      arguments),
306
10
              nested_func(std::move(nested_func_)),
307
10
              arguments_num(arguments.size()) {
308
10
        size_t nested_size = nested_func->align_of_data();
309
        CHECK_GT(nested_size, 0);
310
10
        prefix_size = (sizeof(Data<stable>) + nested_size - 1) / nested_size * nested_size;
311
10
    }
312
313
    void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num,
314
2.03k
             Arena& arena) const override {
315
2.03k
        this->data(place).add(columns, arguments_num, row_num, arena);
316
2.03k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
16
             Arena& arena) const override {
315
16
        this->data(place).add(columns, arguments_num, row_num, arena);
316
16
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
19
             Arena& arena) const override {
315
19
        this->data(place).add(columns, arguments_num, row_num, arena);
316
19
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
869
             Arena& arena) const override {
315
869
        this->data(place).add(columns, arguments_num, row_num, arena);
316
869
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
224
             Arena& arena) const override {
315
224
        this->data(place).add(columns, arguments_num, row_num, arena);
316
224
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
46
             Arena& arena) const override {
315
46
        this->data(place).add(columns, arguments_num, row_num, arena);
316
46
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
526
             Arena& arena) const override {
315
526
        this->data(place).add(columns, arguments_num, row_num, arena);
316
526
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
314
252
             Arena& arena) const override {
315
252
        this->data(place).add(columns, arguments_num, row_num, arena);
316
252
    }
_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
950
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
950
        this->data(place).serialize(buf);
325
950
    }
_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
553
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
553
        this->data(place).serialize(buf);
325
553
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
114
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
114
        this->data(place).serialize(buf);
325
114
    }
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
256
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
256
        this->data(place).serialize(buf);
325
256
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
323
15
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
324
15
        this->data(place).serialize(buf);
325
15
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE9serializeEPKcRNS_14BufferWritableE
326
327
    void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf,
328
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
826
                               BufferReadable& buf, Arena& arena) const override {
334
826
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
826
    }
_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
475
                               BufferReadable& buf, Arena& arena) const override {
334
475
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
475
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
118
                               BufferReadable& buf, Arena& arena) const override {
334
118
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
118
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE21deserialize_and_mergeEPcS6_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
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
206
                               BufferReadable& buf, Arena& arena) const override {
334
206
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
206
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
333
15
                               BufferReadable& buf, Arena& arena) const override {
334
15
        this->data(place).deserialize_and_merge(this->data(rhs), buf, arena);
335
15
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE21deserialize_and_mergeEPcS3_RNS_14BufferReadableERNS_5ArenaE
336
337
736
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
736
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
736
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
736
        ColumnRawPtrs arguments_raw(arguments.size());
342
1.51k
        for (size_t i = 0; i < arguments.size(); ++i) {
343
783
            arguments_raw[i] = arguments[i].get();
344
783
        }
345
346
736
        assert(!arguments.empty());
347
736
        Arena arena;
348
736
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
736
                                            arguments_raw.data(), arena);
350
736
        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
736
        this->data(place).clear();
355
736
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
2
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
2
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
2
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
2
        ColumnRawPtrs arguments_raw(arguments.size());
342
4
        for (size_t i = 0; i < arguments.size(); ++i) {
343
2
            arguments_raw[i] = arguments[i].get();
344
2
        }
345
346
2
        assert(!arguments.empty());
347
2
        Arena arena;
348
2
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
2
                                            arguments_raw.data(), arena);
350
2
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
2
        this->data(place).clear();
355
2
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
5
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
5
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
5
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
5
        ColumnRawPtrs arguments_raw(arguments.size());
342
10
        for (size_t i = 0; i < arguments.size(); ++i) {
343
5
            arguments_raw[i] = arguments[i].get();
344
5
        }
345
346
5
        assert(!arguments.empty());
347
5
        Arena arena;
348
5
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
5
                                            arguments_raw.data(), arena);
350
5
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
5
        this->data(place).clear();
355
5
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
320
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
320
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
320
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
320
        ColumnRawPtrs arguments_raw(arguments.size());
342
640
        for (size_t i = 0; i < arguments.size(); ++i) {
343
320
            arguments_raw[i] = arguments[i].get();
344
320
        }
345
346
320
        assert(!arguments.empty());
347
320
        Arena arena;
348
320
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
320
                                            arguments_raw.data(), arena);
350
320
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
320
        this->data(place).clear();
355
320
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
105
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
105
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
105
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
105
        ColumnRawPtrs arguments_raw(arguments.size());
342
210
        for (size_t i = 0; i < arguments.size(); ++i) {
343
105
            arguments_raw[i] = arguments[i].get();
344
105
        }
345
346
105
        assert(!arguments.empty());
347
105
        Arena arena;
348
105
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
105
                                            arguments_raw.data(), arena);
350
105
        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
105
        this->data(place).clear();
355
105
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
4
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
4
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
4
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
4
        ColumnRawPtrs arguments_raw(arguments.size());
342
8
        for (size_t i = 0; i < arguments.size(); ++i) {
343
4
            arguments_raw[i] = arguments[i].get();
344
4
        }
345
346
4
        assert(!arguments.empty());
347
4
        Arena arena;
348
4
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
4
                                            arguments_raw.data(), arena);
350
4
        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
4
        this->data(place).clear();
355
4
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
170
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
170
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
170
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
170
        ColumnRawPtrs arguments_raw(arguments.size());
342
340
        for (size_t i = 0; i < arguments.size(); ++i) {
343
170
            arguments_raw[i] = arguments[i].get();
344
170
        }
345
346
170
        assert(!arguments.empty());
347
170
        Arena arena;
348
170
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
170
                                            arguments_raw.data(), arena);
350
170
        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
170
        this->data(place).clear();
355
170
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
83
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
83
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
83
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
83
        ColumnRawPtrs arguments_raw(arguments.size());
342
166
        for (size_t i = 0; i < arguments.size(); ++i) {
343
83
            arguments_raw[i] = arguments[i].get();
344
83
        }
345
346
83
        assert(!arguments.empty());
347
83
        Arena arena;
348
83
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
83
                                            arguments_raw.data(), arena);
350
83
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
83
        this->data(place).clear();
355
83
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
18
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
18
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
18
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
18
        ColumnRawPtrs arguments_raw(arguments.size());
342
54
        for (size_t i = 0; i < arguments.size(); ++i) {
343
36
            arguments_raw[i] = arguments[i].get();
344
36
        }
345
346
18
        assert(!arguments.empty());
347
18
        Arena arena;
348
18
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
18
                                            arguments_raw.data(), arena);
350
18
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
18
        this->data(place).clear();
355
18
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
337
29
    void insert_result_into(ConstAggregateDataPtr targetplace, IColumn& to) const override {
338
        // place is essentially an AggregateDataPtr, passed as a ConstAggregateDataPtr.
339
29
        auto* place = const_cast<AggregateDataPtr>(targetplace);
340
29
        auto arguments = this->data(place).get_arguments(this->argument_types);
341
29
        ColumnRawPtrs arguments_raw(arguments.size());
342
87
        for (size_t i = 0; i < arguments.size(); ++i) {
343
58
            arguments_raw[i] = arguments[i].get();
344
58
        }
345
346
29
        assert(!arguments.empty());
347
29
        Arena arena;
348
29
        nested_func->add_batch_single_place(arguments[0]->size(), get_nested_place(place),
349
29
                                            arguments_raw.data(), arena);
350
29
        nested_func->insert_result_into(get_nested_place(place), to);
351
        // for distinct agg function, the real calculate is add_batch_single_place at last step of insert_result_into function.
352
        // but with distinct agg and over() window function together, the result will be inserted into many times with different rows
353
        // so we need to clear the data, thus not to affect the next insert_result_into
354
29
        this->data(place).clear();
355
29
    }
356
357
146
    void reset(AggregateDataPtr place) const override {
358
146
        this->data(place).clear();
359
146
        nested_func->reset(get_nested_place(place));
360
146
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE5resetEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE5resetEPc
Line
Count
Source
357
61
    void reset(AggregateDataPtr place) const override {
358
61
        this->data(place).clear();
359
61
        nested_func->reset(get_nested_place(place));
360
61
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE5resetEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE5resetEPc
Line
Count
Source
357
34
    void reset(AggregateDataPtr place) const override {
358
34
        this->data(place).clear();
359
34
        nested_func->reset(get_nested_place(place));
360
34
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE5resetEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE5resetEPc
Line
Count
Source
357
51
    void reset(AggregateDataPtr place) const override {
358
51
        this->data(place).clear();
359
51
        nested_func->reset(get_nested_place(place));
360
51
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE5resetEPc
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE5resetEPc
361
362
1.85k
    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
813
    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
308
    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
9
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE12size_of_dataEv
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE12size_of_dataEv
Line
Count
Source
362
444
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE12size_of_dataEv
Line
Count
Source
362
176
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE12size_of_dataEv
Line
Count
Source
362
39
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE12size_of_dataEv
Line
Count
Source
362
50
    size_t size_of_data() const override { return prefix_size + nested_func->size_of_data(); }
363
364
1.84k
    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
562
    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
323
    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
13
    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
776
    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
34
    size_t align_of_data() const override { return nested_func->align_of_data(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE13align_of_dataEv
Line
Count
Source
364
20
    size_t align_of_data() const override { return nested_func->align_of_data(); }
365
366
3.05k
    void create(AggregateDataPtr __restrict place) const override {
367
3.05k
        new (place) Data<stable>;
368
3.05k
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
3.05k
                    this->data(place).~Data<stable>());
370
3.05k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE6createEPc
Line
Count
Source
366
21
    void create(AggregateDataPtr __restrict place) const override {
367
21
        new (place) Data<stable>;
368
21
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
21
                    this->data(place).~Data<stable>());
370
21
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE6createEPc
Line
Count
Source
366
24
    void create(AggregateDataPtr __restrict place) const override {
367
24
        new (place) Data<stable>;
368
24
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
24
                    this->data(place).~Data<stable>());
370
24
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE6createEPc
Line
Count
Source
366
1.40k
    void create(AggregateDataPtr __restrict place) const override {
367
1.40k
        new (place) Data<stable>;
368
1.40k
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
1.40k
                    this->data(place).~Data<stable>());
370
1.40k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE6createEPc
Line
Count
Source
366
477
    void create(AggregateDataPtr __restrict place) const override {
367
477
        new (place) Data<stable>;
368
477
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
477
                    this->data(place).~Data<stable>());
370
477
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE6createEPc
Line
Count
Source
366
23
    void create(AggregateDataPtr __restrict place) const override {
367
23
        new (place) Data<stable>;
368
23
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
23
                    this->data(place).~Data<stable>());
370
23
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE6createEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE6createEPc
Line
Count
Source
366
663
    void create(AggregateDataPtr __restrict place) const override {
367
663
        new (place) Data<stable>;
368
663
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
663
                    this->data(place).~Data<stable>());
370
663
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE6createEPc
Line
Count
Source
366
287
    void create(AggregateDataPtr __restrict place) const override {
367
287
        new (place) Data<stable>;
368
287
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
287
                    this->data(place).~Data<stable>());
370
287
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE6createEPc
Line
Count
Source
366
50
    void create(AggregateDataPtr __restrict place) const override {
367
50
        new (place) Data<stable>;
368
50
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
50
                    this->data(place).~Data<stable>());
370
50
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE6createEPc
Line
Count
Source
366
96
    void create(AggregateDataPtr __restrict place) const override {
367
96
        new (place) Data<stable>;
368
96
        SAFE_CREATE(nested_func->create(get_nested_place(place)),
369
96
                    this->data(place).~Data<stable>());
370
96
    }
371
372
3.05k
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
3.05k
        this->data(place).~Data<stable>();
374
3.05k
        nested_func->destroy(get_nested_place(place));
375
3.05k
    }
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
22
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
22
        this->data(place).~Data<stable>();
374
22
        nested_func->destroy(get_nested_place(place));
375
22
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
25
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
25
        this->data(place).~Data<stable>();
374
25
        nested_func->destroy(get_nested_place(place));
375
25
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
1.40k
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
1.40k
        this->data(place).~Data<stable>();
374
1.40k
        nested_func->destroy(get_nested_place(place));
375
1.40k
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
477
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
477
        this->data(place).~Data<stable>();
374
477
        nested_func->destroy(get_nested_place(place));
375
477
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE7destroyEPc
Line
Count
Source
372
24
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
24
        this->data(place).~Data<stable>();
374
24
        nested_func->destroy(get_nested_place(place));
375
24
    }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE7destroyEPc
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE7destroyEPc
Line
Count
Source
372
663
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
663
        this->data(place).~Data<stable>();
374
663
        nested_func->destroy(get_nested_place(place));
375
663
    }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE7destroyEPc
Line
Count
Source
372
287
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
287
        this->data(place).~Data<stable>();
374
287
        nested_func->destroy(get_nested_place(place));
375
287
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE7destroyEPc
Line
Count
Source
372
50
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
50
        this->data(place).~Data<stable>();
374
50
        nested_func->destroy(get_nested_place(place));
375
50
    }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE7destroyEPc
Line
Count
Source
372
96
    void destroy(AggregateDataPtr __restrict place) const noexcept override {
373
96
        this->data(place).~Data<stable>();
374
96
        nested_func->destroy(get_nested_place(place));
375
96
    }
376
377
155
    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
59
    String get_name() const override { return nested_func->get_name() + "Distinct"; }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE8get_nameB5cxx11Ev
_ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE8get_nameB5cxx11Ev
Line
Count
Source
377
32
    String get_name() const override { return nested_func->get_name() + "Distinct"; }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE8get_nameB5cxx11Ev
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE8get_nameB5cxx11Ev
Line
Count
Source
377
64
    String get_name() const override { return nested_func->get_name() + "Distinct"; }
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE8get_nameB5cxx11Ev
378
379
2.50k
    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
869
    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
347
    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
21
    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
860
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE15get_return_typeEv
Line
Count
Source
379
281
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE15get_return_typeEv
Line
Count
Source
379
53
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
_ZNK5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE15get_return_typeEv
Line
Count
Source
379
35
    DataTypePtr get_return_type() const override { return nested_func->get_return_type(); }
380
381
71
    IAggregateFunction* transmit_to_stable() override {
382
71
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
71
                                                         IAggregateFunction::argument_types);
384
71
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE3EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE4EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE5EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE6EE6OutputELb1EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb0EE18transmit_to_stableEv
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_7ReducerILNS_13PrimitiveTypeE7EE6OutputELb1EE18transmit_to_stableEv
_ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb0EE18transmit_to_stableEv
Line
Count
Source
381
61
    IAggregateFunction* transmit_to_stable() override {
382
61
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
61
                                                         IAggregateFunction::argument_types);
384
61
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_42AggregateFunctionDistinctSingleGenericDataELb1EE18transmit_to_stableEv
_ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb0EE18transmit_to_stableEv
Line
Count
Source
381
10
    IAggregateFunction* transmit_to_stable() override {
382
10
        return new AggregateFunctionDistinct<Data, true>(nested_func,
383
10
                                                         IAggregateFunction::argument_types);
384
10
    }
Unexecuted instantiation: _ZN5doris25AggregateFunctionDistinctINS_44AggregateFunctionDistinctMultipleGenericDataELb1EE18transmit_to_stableEv
385
};
386
387
template <typename T>
388
struct FunctionStableTransfer {
389
    using FunctionStable = T;
390
};
391
392
template <template <bool stable> typename Data>
393
struct FunctionStableTransfer<AggregateFunctionDistinct<Data, false>> {
394
    using FunctionStable = AggregateFunctionDistinct<Data, true>;
395
};
396
397
} // namespace doris